[英]Waiting for transaction confirmation using web3.py?
我正在使用以下方式發送交易:
sign_txn = web3.eth.account.signTransaction(token_tx, private_key=private_key)
tx_hash = web3.eth.sendRawTransaction(sign_txn.rawTransaction)
並且我想等待交易確認以繼續我的腳本的工作,我該怎么做才能在交易已經完成時不浪費額外的等待驗證時間?
我可能會誤會你,
但是web3.eth.get_transaction_receipt()
你在找什么?
https://web3py.readthedocs.io/en/stable/web3.eth.html#web3.eth.Eth.get_transaction_receipt
如果不是,請澄清您期望的結果:)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.