使用 python 的币安智能链上的 Web3 ExtraDataLength 错误

时间:2021-07-20 05:11:22

标签: python blockchain web3 binance-smart-chain

我正在尝试提取发生在特定区块上的交易,但我卡在这里:

from web3 import Web3

bsc = "https://bsc-dataseed.binance.org/"
web3 = Web3(Web3.HTTPProvider(bsc))

block = web3.eth.get_block('latest')

web3.exceptions.ExtraDataLengthError: The field extraData is 97 bytes, but should be 32. It is quite likely that you are connected to a POA chain. Refer to http://web3py.readthedocs.io/en/stable/middleware.html#geth-style-proof-of-authority for more details.

我想获取某个钱包地址所涉及的交易,但我不知道为什么 web3 不让我从 bsc 节点中提取它。

谢谢

0 个答案:

没有答案