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                                         ┏━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┓ ┃Slot┃Offset┃Name                 ┃Type                                            ┃Contract   ┃ ┡━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━┩ │0   │0     │owner│address                                         │Owned│ ││20    │STORAGE_PLACEHOLDER│bytes12                                         │Owned│ │1   │0     │protocolFeesAccrued│mapping(Currency => uint256)                    │Fees│ │2   │0     │hookFeesAccrued│mapping(address => mapping(Currency => uint256))│Fees│ │3   │0     │protocolFeeController│contract IProtocolFeeController                 │Fees│ │4   │0     │_balances│mapping(uint256 => mapping(address => uint256)) │ERC1155│ │5   │0     │_operatorApprovals│mapping(address => mapping(address => bool))    │ERC1155│ │6   │0     │_uri│string                                          │ERC1155│ │7   │0     │lockData│struct IPoolManager.LockData                    │PoolManager│ │8   │0     │currencyDelta│mapping(address => mapping(Currency => int256)) │PoolManager│ │9   │0     │reservesOf│mapping(Currency => uint256)                    │PoolManager│ │10  │0     │pools│mapping(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.