Content
@
0 reply
0 recast
0 reaction
Akuti
@akuti
One of the great features of foundry is that you can modify variables to test specific cases in your contracts. With `Std Storage` you easily modify public variables without needing to add a setter method. But you can even read and store directly to storage to interact with private variables.
1 reply
1 recast
6 reactions
Akuti
@akuti
Even more powerful is that you can also modify internal variables but it's more complex as it does not work with the simple StdStorage module. You first need to find the storage slot of the variable you want to modify. You can get it easily by using `forge inspect src/ContractName.sol:ContractName storage`.
1 reply
0 recast
0 reaction