Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove wait_until_nonce_changed in favor of web3.eth.wait_for_transaction_receipt #203

Open
gabrielfior opened this issue Apr 17, 2024 · 1 comment

Comments

@gabrielfior
Copy link
Contributor

The function wait_until_nonce_changed is not needed, since the native method on the provider wait_for_transaction_receipt waits until the transaction has been included in the block and returns it, more reference here -> https://web3py.readthedocs.io/en/stable/web3.eth.html#web3.eth.Eth.wait_for_transaction_receipt

Hence we should update the usages (only tests at the moment).

@kongzii
Copy link
Contributor

kongzii commented Apr 17, 2024

Note that we are already doing wait_for_transaction_receipt at

receipt_tx = web3.eth.wait_for_transaction_receipt(send_tx, timeout=timeout)
, but for some reason, that wasn't enough and there were errors.

wait_until_nonce_changed did the trick, and because I didn't know that wait_for_transaction_receipt should be enough, I didn't care about it anymore 😄

So if wait_until_nonce_changed is removed, it's needed to test/debug it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants