You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TransactionRevertError: Transaction has been reverted by the EVM:
undefined
{
innerError: undefined,
reason: 'Returned error: err: intrinsic gas too low: have 34000, want 53496 (supplied gas 34000)',
signature: undefined,
receipt: undefined,
code: 402
}
I believe part of the issue is getRevertReason is called before the transaction is submitted, and while it would be nice to throw before submitting the transaction (so the user's gas isn't spent), 1.x explicitly says for sendTransaction that the receipt would be available if the network rejects the transaction. So I believe we'd want to call getRevertReason only after the transaction has failed (e.g. transactionReceipt.status === 0)
Is there an existing issue for this?
Current Behavior
yields the thrown error:
I believe part of the issue is getRevertReason is called before the transaction is submitted, and while it would be nice to throw before submitting the transaction (so the user's gas isn't spent),
1.x
explicitly says for sendTransaction that the receipt would be available if the network rejects the transaction. So I believe we'd want to callgetRevertReason
only after the transaction has failed (e.g.transactionReceipt.status === 0
)Expected Behavior
Receipt to be apart of thrown error as is in
1.x
Steps to Reproduce
Web3.js Version
4.x
Environment
Anything Else?
No response
The text was updated successfully, but these errors were encountered: