@@ -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 " ;
@@ -360,8 +362,7 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox
360362 uint256 prevMessageCount ,
361363 uint256 newMessageCount
362364 ) external refundsGas (gasRefunder, IReader4844 (address (0 ))) {
363- // solhint-disable-next-line avoid-tx-origin
364- if (msg .sender != tx .origin ) revert NotOrigin ();
365+ if (! CallerChecker.isCallerCodelessOrigin ()) revert NotCodelessOrigin ();
365366 if (! isBatchPoster[msg .sender ]) revert NotBatchPoster ();
366367 (bytes32 dataHash , IBridge.TimeBounds memory timeBounds ) = formCallDataHash (
367368 data,
@@ -457,10 +458,9 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox
457458 if (hostChainIsArbitrum) revert DataBlobsNotSupported ();
458459
459460 // submit a batch spending report to refund the entity that produced the blob batch data
460- // same as using calldata, we only submit spending report if the caller is the origin of the tx
461+ // same as using calldata, we only submit spending report if the caller is the origin and is codeless
461462 // such that one cannot "double-claim" batch posting refund in the same tx
462- // solhint-disable-next-line avoid-tx-origin
463- if (msg .sender == tx .origin && ! isUsingFeeToken) {
463+ if (CallerChecker.isCallerCodelessOrigin () && ! isUsingFeeToken) {
464464 submitBatchSpendingReport (dataHash, seqMessageIndex, block .basefee , blobGas);
465465 }
466466 }
0 commit comments