[英]Waiting for transaction confirmation using web3.py?
I am sending a transaction using:我正在使用以下方式发送交易:
sign_txn = web3.eth.account.signTransaction(token_tx, private_key=private_key)
tx_hash = web3.eth.sendRawTransaction(sign_txn.rawTransaction)
and I want to wait for the confirmation of the transaction to continue the work of my script, how can I do this so as not to lose extra time waiting for verification when the transaction is already completed?并且我想等待交易确认以继续我的脚本的工作,我该怎么做才能在交易已经完成时不浪费额外的等待验证时间?
I might misunderstand you,我可能会误会你,
but is web3.eth.get_transaction_receipt()
what you are looking for?但是web3.eth.get_transaction_receipt()
你在找什么?
https://web3py.readthedocs.io/en/stable/web3.eth.html#web3.eth.Eth.get_transaction_receipt https://web3py.readthedocs.io/en/stable/web3.eth.html#web3.eth.Eth.get_transaction_receipt
if not, please clarify what result you are expecting :)如果不是,请澄清您期望的结果:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.