node icon indicating copy to clipboard operation
node copied to clipboard

Revert reason is not clear for ZRC20s even when using `eth_call`

Open gartnera opened this issue 9 months ago • 1 comments

When your contract call is reverted inside ZRC20 contracts, the revert reason will be entirely opaque. Typically you can switch to eth_call to get a detailed reason but that does not seem to work on zetachain.

Even with https://github.com/zeta-chain/ethermint/pull/234 you would still have to manually map the error codes yourself. We should consider mapping these error codes at the protocol/rpc level and returning nicer error messages.

We should also consider an ethermint change to ensure that revert reasons are returned from eth_estimateGas calls. Related to https://github.com/ethereum/go-ethereum/issues/20714

gartnera avatar Mar 26 '25 21:03 gartnera

Yes, this makes to map the regular error with text message.

More an improvement than a bug per se.

lumtis avatar Mar 27 '25 10:03 lumtis

Should not be relevant anymore as we improved the cctx error messaging

lumtis avatar Sep 02 '25 13:09 lumtis