Skip to content

Storage layout printer#

Name: storage-layout

Prints storage layout of contracts in given paths or in the whole project.

Example#

wake print storage-layout                                         PoolManager storage layout                                         ┏━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┓ SlotOffsetName                 Type                                            Contract    ┡━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━┩ 0   0     owneraddress                                         Owned 20    STORAGE_PLACEHOLDERbytes12                                         Owned 1   0     protocolFeesAccruedmapping(Currency => uint256)                    Fees 2   0     hookFeesAccruedmapping(address => mapping(Currency => uint256))Fees 3   0     protocolFeeControllercontract IProtocolFeeController                 Fees 4   0     _balancesmapping(uint256 => mapping(address => uint256)) ERC1155 5   0     _operatorApprovalsmapping(address => mapping(address => bool))    ERC1155 6   0     _uristring                                          ERC1155 7   0     lockDatastruct IPoolManager.LockData                    PoolManager 8   0     currencyDeltamapping(address => mapping(Currency => int256)) PoolManager 9   0     reservesOfmapping(Currency => uint256)                    PoolManager 10  0     poolsmapping(PoolId => struct Pool.State)            PoolManager └──────┴────────┴───────────────────────┴──────────────────────────────────────────────────┴─────────────┘

Parameters#

Command-line name TOML name Type Default value Description
--name (multiple) names List[str] [] Names of contracts to print storage layout for.
--split-slots split_slots bool False Print a horizontal line between different slots.
--table-style table_style str "" Rich style of the table.
--header-style header_style str "" Rich style of the table header.
--style style str cyan Rich style of the table cells.