@@ -21,6 +21,7 @@ import {
2121 NoSuchKeyset,
2222 NotForked,
2323 NotBatchPosterManager,
24+ NotCodelessOrigin,
2425 RollupNotChanged,
2526 DataBlobsNotSupported,
2627 InitParamZero,
@@ -38,6 +39,7 @@ import "../rollup/IRollupLogic.sol";
3839import "./Messages.sol " ;
3940import "../precompiles/ArbGasInfo.sol " ;
4041import "../precompiles/ArbSys.sol " ;
42+ import "../libraries/CallerChecker.sol " ;
4143import "../libraries/IReader4844.sol " ;
4244
4345import {L1MessageType_batchPostingReport} from "../libraries/MessageTypes.sol " ;
@@ -370,8 +372,7 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox
370372 uint256 newMessageCount ,
371373 bytes memory quote
372374 ) external refundsGas (gasRefunder, IReader4844 (address (0 ))) {
373- // solhint-disable-next-line avoid-tx-origin
374- if (msg .sender != tx .origin ) revert NotOrigin ();
375+ if (! CallerChecker.isCallerCodelessOrigin ()) revert NotCodelessOrigin ();
375376 if (! isBatchPoster[msg .sender ]) revert NotBatchPoster ();
376377
377378 // take keccak2256 hash of all the function arguments except the quote
@@ -483,10 +484,9 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox
483484 if (hostChainIsArbitrum) revert DataBlobsNotSupported ();
484485
485486 // submit a batch spending report to refund the entity that produced the blob batch data
486- // same as using calldata, we only submit spending report if the caller is the origin of the tx
487+ // same as using calldata, we only submit spending report if the caller is the origin and is codeless
487488 // such that one cannot "double-claim" batch posting refund in the same tx
488- // solhint-disable-next-line avoid-tx-origin
489- if (msg .sender == tx .origin && ! isUsingFeeToken) {
489+ if (CallerChecker.isCallerCodelessOrigin () && ! isUsingFeeToken) {
490490 submitBatchSpendingReport (dataHash, seqMessageIndex, block .basefee , blobGas);
491491 }
492492 }
0 commit comments