iotex-core icon indicating copy to clipboard operation
iotex-core copied to clipboard

Web3 API doesn't process custom error correctly

Open ququzone opened this issue 1 year ago • 0 comments

What version of iotex-core image (or code branch) are you using?

latest

What operating system and processor architecture are you using?

What did you do? If possible, provide a recipe for reproducing the error.

If contract emit revert error with custom error, the web3 rpc return 0x, doesn't return error message. Use below cmd can reproduce error on testnet.

cast call 0x2d93899a441a12a694D3b6D1a505931c99fbDDc4 'validPrice(uint256,uint256,bytes)(bool)' 3387000 1726021000 0xd6c42fdc96b0cc44f3d2e3abfb9dbc889d574ab93057e6d04e4d10073106b886261dc7964f8a9f7b59f584fddab8528e758a151a8a09fe4fe0c332f00ba70da31c

What did you expect to see?

(code: 3, message: execution reverted: custom error c9cf1f8b:, data: Some(String("0xc9cf1f8b")))

What did you see instead?

ququzone avatar Sep 11 '24 03:09 ququzone