Skip to content

Commit

Permalink
fix: new foundry storage format
Browse files Browse the repository at this point in the history
  • Loading branch information
gzeoneth committed Dec 11, 2024
1 parent 154b045 commit 32af3b5
Show file tree
Hide file tree
Showing 11 changed files with 234 additions and 11 deletions.
18 changes: 17 additions & 1 deletion test/storage/Bridge
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@

╭----------------------------------+------------------------------------------------+------+--------+-------+------------------------------╮
| Name | Type | Slot | Offset | Bytes | Contract |
|----------------------------------|------------------------------------------------|------|--------|-------|------------------------------|
+==========================================================================================================================================+
| _initialized | bool | 0 | 0 | 1 | src/bridge/Bridge.sol:Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+------------------------------|
| _initializing | bool | 0 | 1 | 1 | src/bridge/Bridge.sol:Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+------------------------------|
| allowedDelayedInboxesMap | mapping(address => struct AbsBridge.InOutInfo) | 1 | 0 | 32 | src/bridge/Bridge.sol:Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+------------------------------|
| allowedOutboxesMap | mapping(address => struct AbsBridge.InOutInfo) | 2 | 0 | 32 | src/bridge/Bridge.sol:Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+------------------------------|
| allowedDelayedInboxList | address[] | 3 | 0 | 32 | src/bridge/Bridge.sol:Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+------------------------------|
| allowedOutboxList | address[] | 4 | 0 | 32 | src/bridge/Bridge.sol:Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+------------------------------|
| _activeOutbox | address | 5 | 0 | 20 | src/bridge/Bridge.sol:Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+------------------------------|
| delayedInboxAccs | bytes32[] | 6 | 0 | 32 | src/bridge/Bridge.sol:Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+------------------------------|
| sequencerInboxAccs | bytes32[] | 7 | 0 | 32 | src/bridge/Bridge.sol:Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+------------------------------|
| rollup | contract IOwnable | 8 | 0 | 20 | src/bridge/Bridge.sol:Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+------------------------------|
| sequencerInbox | address | 9 | 0 | 20 | src/bridge/Bridge.sol:Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+------------------------------|
| sequencerReportedSubMessageCount | uint256 | 10 | 0 | 32 | src/bridge/Bridge.sol:Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+------------------------------|
| __gap | uint256[40] | 11 | 0 | 1280 | src/bridge/Bridge.sol:Bridge |
╰----------------------------------+------------------------------------------------+------+--------+-------+------------------------------╯

12 changes: 11 additions & 1 deletion test/storage/ChallengeManager
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@

╭------------------------+---------------------------------------------------+------+--------+-------+-----------------------------------------------------╮
| Name | Type | Slot | Offset | Bytes | Contract |
|------------------------|---------------------------------------------------|------|--------|-------|-----------------------------------------------------|
+==========================================================================================================================================================+
| totalChallengesCreated | uint64 | 0 | 0 | 8 | src/challenge/ChallengeManager.sol:ChallengeManager |
|------------------------+---------------------------------------------------+------+--------+-------+-----------------------------------------------------|
| challenges | mapping(uint256 => struct ChallengeLib.Challenge) | 1 | 0 | 32 | src/challenge/ChallengeManager.sol:ChallengeManager |
|------------------------+---------------------------------------------------+------+--------+-------+-----------------------------------------------------|
| resultReceiver | contract IChallengeResultReceiver | 2 | 0 | 20 | src/challenge/ChallengeManager.sol:ChallengeManager |
|------------------------+---------------------------------------------------+------+--------+-------+-----------------------------------------------------|
| sequencerInbox | contract ISequencerInbox | 3 | 0 | 20 | src/challenge/ChallengeManager.sol:ChallengeManager |
|------------------------+---------------------------------------------------+------+--------+-------+-----------------------------------------------------|
| bridge | contract IBridge | 4 | 0 | 20 | src/challenge/ChallengeManager.sol:ChallengeManager |
|------------------------+---------------------------------------------------+------+--------+-------+-----------------------------------------------------|
| osp | contract IOneStepProofEntry | 5 | 0 | 20 | src/challenge/ChallengeManager.sol:ChallengeManager |
|------------------------+---------------------------------------------------+------+--------+-------+-----------------------------------------------------|
| ospCond | mapping(bytes32 => contract IOneStepProofEntry) | 6 | 0 | 32 | src/challenge/ChallengeManager.sol:ChallengeManager |
╰------------------------+---------------------------------------------------+------+--------+-------+-----------------------------------------------------╯

20 changes: 19 additions & 1 deletion test/storage/ERC20Bridge
Original file line number Diff line number Diff line change
@@ -1,17 +1,35 @@

╭----------------------------------+------------------------------------------------+------+--------+-------+----------------------------------------╮
| Name | Type | Slot | Offset | Bytes | Contract |
|----------------------------------|------------------------------------------------|------|--------|-------|----------------------------------------|
+====================================================================================================================================================+
| _initialized | bool | 0 | 0 | 1 | src/bridge/ERC20Bridge.sol:ERC20Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+----------------------------------------|
| _initializing | bool | 0 | 1 | 1 | src/bridge/ERC20Bridge.sol:ERC20Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+----------------------------------------|
| allowedDelayedInboxesMap | mapping(address => struct AbsBridge.InOutInfo) | 1 | 0 | 32 | src/bridge/ERC20Bridge.sol:ERC20Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+----------------------------------------|
| allowedOutboxesMap | mapping(address => struct AbsBridge.InOutInfo) | 2 | 0 | 32 | src/bridge/ERC20Bridge.sol:ERC20Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+----------------------------------------|
| allowedDelayedInboxList | address[] | 3 | 0 | 32 | src/bridge/ERC20Bridge.sol:ERC20Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+----------------------------------------|
| allowedOutboxList | address[] | 4 | 0 | 32 | src/bridge/ERC20Bridge.sol:ERC20Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+----------------------------------------|
| _activeOutbox | address | 5 | 0 | 20 | src/bridge/ERC20Bridge.sol:ERC20Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+----------------------------------------|
| delayedInboxAccs | bytes32[] | 6 | 0 | 32 | src/bridge/ERC20Bridge.sol:ERC20Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+----------------------------------------|
| sequencerInboxAccs | bytes32[] | 7 | 0 | 32 | src/bridge/ERC20Bridge.sol:ERC20Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+----------------------------------------|
| rollup | contract IOwnable | 8 | 0 | 20 | src/bridge/ERC20Bridge.sol:ERC20Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+----------------------------------------|
| sequencerInbox | address | 9 | 0 | 20 | src/bridge/ERC20Bridge.sol:ERC20Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+----------------------------------------|
| sequencerReportedSubMessageCount | uint256 | 10 | 0 | 32 | src/bridge/ERC20Bridge.sol:ERC20Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+----------------------------------------|
| __gap | uint256[40] | 11 | 0 | 1280 | src/bridge/ERC20Bridge.sol:ERC20Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+----------------------------------------|
| nativeToken | address | 51 | 0 | 20 | src/bridge/ERC20Bridge.sol:ERC20Bridge |
|----------------------------------+------------------------------------------------+------+--------+-------+----------------------------------------|
| nativeTokenDecimals | uint8 | 51 | 20 | 1 | src/bridge/ERC20Bridge.sol:ERC20Bridge |
╰----------------------------------+------------------------------------------------+------+--------+-------+----------------------------------------╯

15 changes: 14 additions & 1 deletion test/storage/ERC20Inbox
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@

╭------------------+--------------------------+------+--------+-------+--------------------------------------╮
| Name | Type | Slot | Offset | Bytes | Contract |
|------------------|--------------------------|------|--------|-------|--------------------------------------|
+============================================================================================================+
| _initialized | bool | 0 | 0 | 1 | src/bridge/ERC20Inbox.sol:ERC20Inbox |
|------------------+--------------------------+------+--------+-------+--------------------------------------|
| _initializing | bool | 0 | 1 | 1 | src/bridge/ERC20Inbox.sol:ERC20Inbox |
|------------------+--------------------------+------+--------+-------+--------------------------------------|
| __gap | uint256[50] | 1 | 0 | 1600 | src/bridge/ERC20Inbox.sol:ERC20Inbox |
|------------------+--------------------------+------+--------+-------+--------------------------------------|
| _paused | bool | 51 | 0 | 1 | src/bridge/ERC20Inbox.sol:ERC20Inbox |
|------------------+--------------------------+------+--------+-------+--------------------------------------|
| __gap | uint256[49] | 52 | 0 | 1568 | src/bridge/ERC20Inbox.sol:ERC20Inbox |
|------------------+--------------------------+------+--------+-------+--------------------------------------|
| bridge | contract IBridge | 101 | 0 | 20 | src/bridge/ERC20Inbox.sol:ERC20Inbox |
|------------------+--------------------------+------+--------+-------+--------------------------------------|
| sequencerInbox | contract ISequencerInbox | 102 | 0 | 20 | src/bridge/ERC20Inbox.sol:ERC20Inbox |
|------------------+--------------------------+------+--------+-------+--------------------------------------|
| allowListEnabled | bool | 102 | 20 | 1 | src/bridge/ERC20Inbox.sol:ERC20Inbox |
|------------------+--------------------------+------+--------+-------+--------------------------------------|
| isAllowed | mapping(address => bool) | 103 | 0 | 32 | src/bridge/ERC20Inbox.sol:ERC20Inbox |
|------------------+--------------------------+------+--------+-------+--------------------------------------|
| __gap | uint256[47] | 104 | 0 | 1504 | src/bridge/ERC20Inbox.sol:ERC20Inbox |
╰------------------+--------------------------+------+--------+-------+--------------------------------------╯

11 changes: 10 additions & 1 deletion test/storage/ERC20Outbox
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@

╭---------+--------------------------------+------+--------+-------+----------------------------------------╮
| Name | Type | Slot | Offset | Bytes | Contract |
|---------|--------------------------------|------|--------|-------|----------------------------------------|
+===========================================================================================================+
| rollup | address | 0 | 0 | 20 | src/bridge/ERC20Outbox.sol:ERC20Outbox |
|---------+--------------------------------+------+--------+-------+----------------------------------------|
| bridge | contract IBridge | 1 | 0 | 20 | src/bridge/ERC20Outbox.sol:ERC20Outbox |
|---------+--------------------------------+------+--------+-------+----------------------------------------|
| spent | mapping(uint256 => bytes32) | 2 | 0 | 32 | src/bridge/ERC20Outbox.sol:ERC20Outbox |
|---------+--------------------------------+------+--------+-------+----------------------------------------|
| roots | mapping(bytes32 => bytes32) | 3 | 0 | 32 | src/bridge/ERC20Outbox.sol:ERC20Outbox |
|---------+--------------------------------+------+--------+-------+----------------------------------------|
| context | struct AbsOutbox.L2ToL1Context | 4 | 0 | 128 | src/bridge/ERC20Outbox.sol:ERC20Outbox |
|---------+--------------------------------+------+--------+-------+----------------------------------------|
| __gap | uint256[42] | 8 | 0 | 1344 | src/bridge/ERC20Outbox.sol:ERC20Outbox |
╰---------+--------------------------------+------+--------+-------+----------------------------------------╯

15 changes: 14 additions & 1 deletion test/storage/Inbox
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@

╭------------------+--------------------------+------+--------+-------+----------------------------╮
| Name | Type | Slot | Offset | Bytes | Contract |
|------------------|--------------------------|------|--------|-------|----------------------------|
+==================================================================================================+
| _initialized | bool | 0 | 0 | 1 | src/bridge/Inbox.sol:Inbox |
|------------------+--------------------------+------+--------+-------+----------------------------|
| _initializing | bool | 0 | 1 | 1 | src/bridge/Inbox.sol:Inbox |
|------------------+--------------------------+------+--------+-------+----------------------------|
| __gap | uint256[50] | 1 | 0 | 1600 | src/bridge/Inbox.sol:Inbox |
|------------------+--------------------------+------+--------+-------+----------------------------|
| _paused | bool | 51 | 0 | 1 | src/bridge/Inbox.sol:Inbox |
|------------------+--------------------------+------+--------+-------+----------------------------|
| __gap | uint256[49] | 52 | 0 | 1568 | src/bridge/Inbox.sol:Inbox |
|------------------+--------------------------+------+--------+-------+----------------------------|
| bridge | contract IBridge | 101 | 0 | 20 | src/bridge/Inbox.sol:Inbox |
|------------------+--------------------------+------+--------+-------+----------------------------|
| sequencerInbox | contract ISequencerInbox | 102 | 0 | 20 | src/bridge/Inbox.sol:Inbox |
|------------------+--------------------------+------+--------+-------+----------------------------|
| allowListEnabled | bool | 102 | 20 | 1 | src/bridge/Inbox.sol:Inbox |
|------------------+--------------------------+------+--------+-------+----------------------------|
| isAllowed | mapping(address => bool) | 103 | 0 | 32 | src/bridge/Inbox.sol:Inbox |
|------------------+--------------------------+------+--------+-------+----------------------------|
| __gap | uint256[47] | 104 | 0 | 1504 | src/bridge/Inbox.sol:Inbox |
╰------------------+--------------------------+------+--------+-------+----------------------------╯

Loading

0 comments on commit 32af3b5

Please sign in to comment.