espresso-sequencer icon indicating copy to clipboard operation
espresso-sequencer copied to clipboard

Decode contract errors before logging them

Open sveitser opened this issue 1 year ago • 0 comments

Currently we log the raw data: error synchronizing with HotShot contract, leaf submission failed with 16: error sending transaction: Contract call reverted with data: 0x34e423ff000000000000000000000000000000000000000000000000000000000000b47b000000000000000000000000000000000000000000000000000000000000b485

we should decode the errors with ethers and log them in a more readable way, e. g.

cast abi-decode --input "IncorrectBlockNumber(uint256 blockNumber, uint256 expectedBlockNumber)" 0x000000000000000000000000000000000000000000000000000000000000b47b000000000000000000000000000000000000000000000000000000000000b485         
46203 [4.62e4]
46213 [4.621e4]

sveitser avatar Dec 29 '23 11:12 sveitser