首页 > 解决方案 > 以太坊 EIP-1559 兼容 Web3 原始交易结构

问题描述

我正在使用与EIP-1559兼容的 Web3 包,并且我正在尝试为使用maxFeePerGasandmaxPriorityFeePerGas而不是gasPrice.

只是为了澄清我在问什么,这是我在伦敦分叉(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字段的交易时,它们生成的二进制原始结构会是什么样子?谢谢!

标签: pythonethereumweb3web3py

解决方案


推荐阅读