chore: remove abi refs from publisher #10766
Open
+8
−39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Removes unecessary import of abis to
l1-publisher
, now that we add errors to theRollupAbi
(thanks to #10697). This means we can remove my ugly code to try and catch blob and leonidas errors from a header check.Note: I found that the use of
getContractError
is still needed intryGetErrorFromRevertedTx
. Viem doesn't play nice when simulating blob txs and either doesn't allow blob sidecars (hence thecheckBlobSlot
override) or doesn't throw an error to catch.I found a middle ground where
prepareTransactionRequest
would throw with the error we wanted in the case of a blob issue (e.g. incorrect blob proof), but this error still only has the selector thrown and not the custom name e.g.Execution reverted with reason: custom error 0x5ca17bef: 0113d536ef349476f9a5112623449dd1cf574b8213bc6fe33c1edd63bf832890.
To get the name, I used viem's
getContractError
which works fine:The contract function "propose" reverted. Error: Rollup__InvalidBlobProof(bytes32 blobHash) (0x0113d536ef349476f9a5112623449dd1cf574b8213bc6fe33c1edd63bf832890)
Another note: I also snuck in adding the issue number for #10754 in some comments (sorry)