Skip to content
Lattice

VaultCoreLib Constants

Git Source

VAULT_CORE_STORAGE_SLOT

keccak256(abi.encode(uint256(keccak256("lattice.storage.VaultCore")) - 1)) & ~bytes32(uint256(0xff)). Precomputed: 0x391c4f0f82559e85ff01d307d4b19b40f088495abd453c84d7e0fa35497de600

bytes32 constant VAULT_CORE_STORAGE_SLOT = 0x391c4f0f82559e85ff01d307d4b19b40f088495abd453c84d7e0fa35497de600;

VAULT_CORE_ERC165_STORAGE_LOCATION

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

bytes32 constant VAULT_CORE_ERC165_STORAGE_LOCATION =
    0x9ca7f3e2e2bfb15fdf072b85dde92837cddacee6cf2f6b38cd06c9457c1c4200;

ERC165_MAP_IVAULTCORE_SLOT

0xa86d8962 is type(IVaultCore).interfaceId (XOR of VaultCore-specific selectors; inherited IERC4626/IERC20 excluded). keccak256(abi.encode(bytes4(0xa86d8962), 0x9ca7f3e2e2bfb15fdf072b85dde92837cddacee6cf2f6b38cd06c9457c1c4200)).

bytes32 constant ERC165_MAP_IVAULTCORE_SLOT = 0xee1c77df59bab5696d7427515bb0fba56d8719259c4cc5bc6587a3654b26bdf2;

VAULT_CORE_RECOVERY_STORAGE_SLOT

keccak256(abi.encode(uint256(keccak256("lattice.storage.VaultCoreRecovery")) - 1)) & ~bytes32(uint256(0xff)). Precomputed: 0x47912b574bd5afb37a2207dcbb19ecd0a5ba9d0ace45a4775d2beed47d20cd00

bytes32 constant VAULT_CORE_RECOVERY_STORAGE_SLOT = 0x47912b574bd5afb37a2207dcbb19ecd0a5ba9d0ace45a4775d2beed47d20cd00;

ERC165_MAP_IVAULTCORERECOVERY_SLOT

0x065383d4 is type(IVaultCoreRecovery).interfaceId. keccak256(abi.encode(bytes4(0x065383d4), 0x9ca7f3e2e2bfb15fdf072b85dde92837cddacee6cf2f6b38cd06c9457c1c4200)).

bytes32 constant ERC165_MAP_IVAULTCORERECOVERY_SLOT =
    0x5537f73b9d1f73b54596091975d6c567826a5e930691e592f6a854f19cdcd2fb;