-
Notifications
You must be signed in to change notification settings - Fork 51
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
fix: Notify user of tx fail in boa call output #188
Conversation
boa/network.py
Outdated
@@ -419,6 +419,8 @@ def _send_txn(self, from_, to=None, gas=None, value=None, data=None): | |||
print(f"tx broadcasted: {tx_hash}") | |||
|
|||
receipt = self._rpc.wait_for_tx_receipt(tx_hash, self.tx_settings.poll_timeout) | |||
if receipt["status"] != "0x1": | |||
raise RuntimeError(f"txn failed: {receipt}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why RuntimeError?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BoaError expects a stack trace. Which should we use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RuntimeError might be ok, but i'm not sure. i think the only way we can reach here is if the fork mode simulation did not raise any errors, but there is an error when actually sending the transaction (presumably caused by a state change between our snapshot and now).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the example in the issue https://bscscan.com/tx/0x77967045c0b62986ad3cf8933c746dff0b448dbffb2e71b89869e64ff54d1012
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@charles-cooper closed #138 as completed in e3c4e9c 2 weeks ago |
it was actually reverted in the same PR - aca2926 |
Closes #138
What I did
How I did it
How to verify it
Description for the changelog
Cute Animal Picture