Skip to content

Commit

Permalink
docs: explain tofork no code size check
Browse files Browse the repository at this point in the history
  • Loading branch information
gzeoneth committed Oct 2, 2024
1 parent 191c404 commit a562642
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/bridge/Inbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ contract Inbox is AbsInbox, IInbox {
if (!_chainIdChanged()) revert NotForked();
// solhint-disable-next-line avoid-tx-origin
if (msg.sender != tx.origin) revert NotOrigin();
// no code size check required because we only want to know if msg.sender is an EOA to undo alias
// arbos will discard unsigned tx with gas limit too large
if (gasLimit > type(uint64).max) {
revert GasLimitTooLarge();
Expand Down Expand Up @@ -142,6 +143,7 @@ contract Inbox is AbsInbox, IInbox {
if (!_chainIdChanged()) revert NotForked();
// solhint-disable-next-line avoid-tx-origin
if (msg.sender != tx.origin) revert NotOrigin();
// no code size check required because we only want to know if msg.sender is an EOA to undo alias
// arbos will discard unsigned tx with gas limit too large
if (gasLimit > type(uint64).max) {
revert GasLimitTooLarge();
Expand Down Expand Up @@ -174,6 +176,7 @@ contract Inbox is AbsInbox, IInbox {
if (!_chainIdChanged()) revert NotForked();
// solhint-disable-next-line avoid-tx-origin
if (msg.sender != tx.origin) revert NotOrigin();
// no code size check required because we only want to know if msg.sender is an EOA to undo alias
// arbos will discard unsigned tx with gas limit too large
if (gasLimit > type(uint64).max) {
revert GasLimitTooLarge();
Expand Down

0 comments on commit a562642

Please sign in to comment.