Skip to content
Lattice

SemaphoreLib Constants

Git Source

SEMAPHORE_STORAGE_SLOT

keccak256(abi.encode(uint256(keccak256("lattice.storage.Semaphore")) - 1)) & ~bytes32(uint256(0xff)). Verify with: cast index-erc7201 "lattice.storage.Semaphore".

bytes32 constant SEMAPHORE_STORAGE_SLOT = 0x9014b6f2f89a94726c6607d3b9e5562f77c44e9f80791dbbfea2ef3de33d0300;

SEMAPHORE_ERC165_STORAGE_LOCATION

ERC-165 storage location (same across all Lattice modules). keccak256(abi.encode(uint256(keccak256("diamond.lib.storage.ERC165")) - 1)) & ~bytes32(uint256(0xff)).

bytes32 constant SEMAPHORE_ERC165_STORAGE_LOCATION = 0x9ca7f3e2e2bfb15fdf072b85dde92837cddacee6cf2f6b38cd06c9457c1c4200;

ERC165_MAP_ISEMAPHORE_SLOT

0xf497879d is type(ISemaphore).interfaceId. keccak256(abi.encode(bytes4(0xf497879d), 0x9ca7f3e2e2bfb15fdf072b85dde92837cddacee6cf2f6b38cd06c9457c1c4200)).

bytes32 constant ERC165_MAP_ISEMAPHORE_SLOT = 0xf2439559430b40518d710e6342516a19266235963e7106afd03350497fe51040;