sim:set-storage-at
Set a storage slot value at an address in a fork simulation.
Syntax
Section titled “Syntax”sim:set-storage-at <address> <slot> <value>Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
address |
address |
Contract or account address |
slot |
bytes32 |
Storage slot |
value |
string |
New 32-byte value |
Examples
Section titled “Examples”# Set a storage slot value in a forksim:fork --using anvil ( sim:set-storage-at 0x64c007ba4ab6184753dc1e8e7263e8d06831c5f6 0x0000000000000000000000000000000000000000000000000000000000000001 0x00000000000000000000000000000000000000000000000000000000000000ff)See Also
Section titled “See Also”- set-code — override contract bytecode
- fork — fork the chain
- @contract.storageAt — read a storage slot