espresso-sequencer
espresso-sequencer copied to clipboard
Decode contract errors before logging them
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]