Skip to content

@contracts:slot.array

Derive the storage slot of element index of a dynamic array declared at a base slot: keccak256(base) + index.

Returns: bytes32

@contracts:slot.array(base index)
NameTypeDescription
basebytes32Declared slot of the array
indexnumberElement index
# Slot of the first element of a dynamic array at slot 2
set $slot @contracts:slot.array(2 0)