My public address is 0x83d052f9D789a4e0E1c2CF76E64c2dd941a06C88
I hereby claim:
- I am 0xgorilla on github.
- I am 0xgorilla (https://keybase.io/0xgorilla) on keybase.
- I have a public key ASDNqHsxbmqb2EHMXxpY-0Mtc0uNhRwnvVWsSRrdgePpjQo
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity >=0.8.4 <0.9.0; | |
| library StorageAddress { | |
| /// @notice compute the storage address of any element of a dynamic array, by its index | |
| /// @dev Primitive type agnostic. Elements are supposedly taking one word in storage | |
| /// (for other length, you'd have to split/concat them accordingly). | |
| /// Main use is in conjunction with hevm.store, as the second parameter | |
| /// hevm.store(myContract, offset, valueToWrite) | |
| /// @param slot the storage slot where the array is in the contract |