forge inspect <contract> storageLayout
forge inspect FundMe storageLayout
{
"storage": [
{
"astId": 44901,
"contract": "src/FundMe.sol:FundMe",
"label": "s_funders",
"offset": 0,
"slot": "0",
"type": "t_array(t_address)dyn_storage"
},
{
"astId": 44905,
"contract": "src/FundMe.sol:FundMe",
"label": "s_addressToAmountFunded",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_address,t_uint256)"
}
]
}
- Once the contract is deployed, to inspect storage
cast storage <deployedAddress>
cast storage <deployedAddress> <storage_slot>