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
Many frameworks depend on eth_call and eth_estimateGas after sending a transaction which reverts to retrieve the revert reason for their sent transaction.
Currently, calling eth_estimateGas on a function which reverts against our relay will return the following error from the mirror-node:
Error raised while fetching estimateGas from mirror-node: {"detail":"","data":"0x858d70bd","statusCode":400}
which contains the revert reason in the "data" field of the thrown error.
What we currently do is treat it as a regular error from the mirror node and we opt to the fallback estimations instead of returning the revert reason to the user to give him context of what is happening (as other ETH clients would for eth_estimateGas)
Steps to reproduce
send a transaction which calls a reverting contract function through eth_sendRawTransaction
send an eth_estimateGas request with the unsigned transaction body and the block number from the receipt of the executed transaction
Expected:
should return the error code for contract revert and the ABI-encoded revert reason from the contract call in the "data" field of the error.
If the returned reason is encoded as a generic Error(string)(prefixed with 0x08c379a) and not a custom error, we can decode it and append it to the message to be consistent with hyperledger/besu#5706:
Description
Many frameworks depend on
eth_call
andeth_estimateGas
after sending a transaction which reverts to retrieve the revert reason for their sent transaction.Currently, calling
eth_estimateGas
on a function which reverts against our relay will return the following error from the mirror-node:which contains the revert reason in the
"data"
field of the thrown error.What we currently do is treat it as a regular error from the mirror node and we opt to the fallback estimations instead of returning the revert reason to the user to give him context of what is happening (as other ETH clients would for
eth_estimateGas
)Steps to reproduce
eth_sendRawTransaction
eth_estimateGas
request with the unsigned transaction body and the block number from the receipt of the executed transactionExpected:
"data"
field of the error.Example with custom error thrown in solidity:
If the returned reason is encoded as a generic
Error(string)
(prefixed with0x08c379a
) and not a custom error, we can decode it and append it to the message to be consistent with hyperledger/besu#5706:Actual:
Additional context
Hedera network
No response
Version
v0.54.0
Operating system
None
The text was updated successfully, but these errors were encountered: