@contracts:slot.array
Derive the storage slot of element index of a dynamic array declared at a base slot: keccak256(base) + index.
Returns: bytes32
Syntax
Section titled “Syntax”@contracts:slot.array(base index)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
base | bytes32 | Declared slot of the array |
index | number | Element index |
Examples
Section titled “Examples”# Slot of the first element of a dynamic array at slot 2set $slot @contracts:slot.array(2 0)