以太坊EIP1559兼容的Web3原始事务结构

2024-09-30 08:24:58 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用的是一个兼容的Web3包,我试图为原始签名事务找到一个结构,它使用maxFeePerGasmaxPriorityFeePerGas而不是gasPrice

为了澄清我的问题,以下是我在London fork(前EIP-1559)之前用来破译原始签名交易(现在被认为是遗留交易)的方法:

class Transaction(rlp.Serializable):
    fields = [
        ("nonce", big_endian_int),
        ("gas_price", big_endian_int),
        ("gas", big_endian_int),
        ("to", Binary.fixed_length(20, allow_empty=True)),
        ("value", big_endian_int),
        ("data", binary),
        ("v", big_endian_int),
        ("r", big_endian_int),
        ("s", big_endian_int),
    ]

现在,当我对使用maxFeePerGasmaxPriorityFeePerGas字段的事务进行签名时,它们生成的二进制原始结构会是什么样子?谢谢


Tags: 方法交易fork结构事务intweb3gas

热门问题