Generate Storage Layout Map For Solidity Smart Contracts
08 Mar 2024
- Create the input json file for solc. let’s call it
in.json
.{ "language": "Solidity", "sources": { "Contract.sol": { "urls": [ "/path/to/contract.sol" ] } }, "settings": { "outputSelection": { "*": { "*": [ "storageLayout" ] } } } }
- Generate the layout map:
solc --allow-paths . --standard-json < ./in.json > out.json