Skip to content

Latest commit

 

History

History
42 lines (36 loc) · 790 Bytes

StorageDetails.md

File metadata and controls

42 lines (36 loc) · 790 Bytes

Stroage Details

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>