I have several smart contracts which needs to be added on genesis.json file. The smart contract contains arrays, and mappings (from uint and address to struct). The struct contains strings and several uint numbers.
These contracts are regularly updated, and we need to regenerate storage slot accordingly. Based on solidity documentation, ( https://docs.soliditylang.org/en/v0.8.13/internals/layout_in_storage.html ) we are currently manually observing the properties present in smart contract and calculating possible values of storage slots and writing it to genesis file. Position of variables and length of strings are hardcoded to simplify the process.
Is there an approach to dynamically generate storage for a given smart contract. Use of hardhat, local blockchain, geth or libraries like etherjs is also possible to add, if required.