Skip to content

Commit ecca913

Browse files
committed
fix: txorigin as spender
1 parent d63b064 commit ecca913

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/bridge/SequencerInbox.sol

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,12 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox
648648
uint256 gasPrice,
649649
uint256 extraGas
650650
) internal {
651-
address batchPoster = msg.sender;
651+
bytes memory spendingReportMsg;
652+
653+
// report the account who paid the gas (tx.origin) for the tx as batch poster
654+
// if msg.sender is used and is a contract, fund might stuck in a L2 address due to lack of aliasing
655+
// solhint-disable-next-line avoid-tx-origin
656+
address batchPoster = tx.origin;
652657

653658
// this msg isn't included in the current sequencer batch, but instead added to
654659
// the delayed messages queue that is yet to be included

0 commit comments

Comments
 (0)