使用Web3.Py等待交易确认?
我正在使用以下方式发送交易:
sign_txn = web3.eth.account.signTransaction(token_tx, private_key=private_key)
tx_hash = web3.eth.sendRawTransaction(sign_txn.rawTransaction)
我想等待交易的确认继续我的脚本工作,我该怎么做,以免在交易已经完成时浪费额外的时间等待验证?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我可能会误解您,
但是IS
web3.ETH.GEG_TRANSACTION_RECEIPT()
您在寻找什么?如果不是,请澄清一下您期望的结果:)
I might misunderstand you,
but is
web3.eth.get_transaction_receipt()
what you are looking for?https://web3py.readthedocs.io/en/stable/web3.eth.html#web3.eth.Eth.get_transaction_receipt
if not, please clarify what result you are expecting :)