本页面使用机器翻译自英语,可能包含错误或不清楚的语言。如需最准确的信息,请参阅英文原文。由于更新频繁,部分内容可能与英文原文有出入。请加入我们在 Crowdin 上的努力,帮助我们改进本页面的翻译。 (Crowdin translation page, Contributing guide)
新手指南
安装
需要先安装 Python 3.7.2+
创建示例目录
> mkdir web3py-ext-examples & cd _$
设置 python 虚拟环境(最好,但可选)
> python -m venv .venv> ./.venv/bin/activate
安装
> pip install web3py-ext
开始
创建文件
运行
> python fee-delegated-value-transfer.py
输出
decoded transaction: { "type": 9, "to": "0xA2a8854b1802D8Cd5De631E690817c253d6a9153", "value": 100000000000000000, "nonce": 43, "gasPrice": 50000000000, "gas": 63000, "from": "0xA2a8854b1802D8Cd5De631E690817c253d6a9153", "feePayer": "0xCb0eb737dfda52756495A5e08A9b37AAB3b271dA", "signatures": [ { "v": 2037, "r": 93578354654414740427739002022919644896409290347939533211703795054759757354902, "s": 9134800547522066540800971891951614240623136207355204747806684032906366307747 } ], "feePayerSignatures": [ { "v": 2038, "r": 20302025172377290126887017758452014810405132492378310771239790273428447745777, "s": 53258287859492498716919703834973997323471810974924373733878093996195872661689 } ], "chainId": 1001}tx hash: 0x205430ddd219681f4e1657b46aafa104609210d686554dfae8653eb22295d953 receipt: AttributeDict({'blockHash': HexBytes('0x584ad0ac61625084509403db672087fac9e3967f09d5d4a7f96087f821848c77'), 'blockNumber': 126525583, 'contractAddress': None, 'cumulativeGasUsed': 31000, 'effectiveGasPrice': 25000000000, 'from': '0xA2a8854b1802D8Cd5De631E690817c253d6a9153', 'gasUsed': 31000, 'logs': [], 'logsBloom': HexBytes('0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'), 'status': 1, 'to': '0xA2a8854b1802D8Cd5De631E690817c253d6a9153', 'transactionHash': HexBytes('0x205430ddd219681f4e1657b46aafa104609210d686554dfae8653eb22295d953'), 'transactionIndex': 0, 'type': 0})