Skip to content
Lattice

LidoAdapterLib Constants

Git Source

LIDO_ADAPTER_STORAGE_SLOT

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

bytes32 constant LIDO_ADAPTER_STORAGE_SLOT = 0x3d4dff0246f0af54636d62603e75b921d2876c293bb97376b20bb8265ecb3900;

LIDO_ADAPTER_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 LIDO_ADAPTER_ERC165_STORAGE_LOCATION =
    0x9ca7f3e2e2bfb15fdf072b85dde92837cddacee6cf2f6b38cd06c9457c1c4200;

ERC165_MAP_IPROTOCOLADAPTER_SLOT

0x8f7783e6 is type(IProtocolAdapter).interfaceId (same value the Aave/Compound/ERC4626/Curve adapters register; the ERC-165 map slot is shared because the interface ID is identical). keccak256(abi.encode(bytes4(0x8f7783e6), 0x9ca7f3e2e2bfb15fdf072b85dde92837cddacee6cf2f6b38cd06c9457c1c4200)).

bytes32 constant ERC165_MAP_IPROTOCOLADAPTER_SLOT = 0x789387b95720f4aa713e912bc377a2f999f1310b69003727d9c01b7ea1494c77;

ERC165_MAP_ILIDOADAPTER_SLOT

0x83d0afd2 is type(ILidoAdapter).interfaceId. keccak256(abi.encode(bytes4(0x83d0afd2), 0x9ca7f3e2e2bfb15fdf072b85dde92837cddacee6cf2f6b38cd06c9457c1c4200)).

bytes32 constant ERC165_MAP_ILIDOADAPTER_SLOT = 0x6167b6f3924e213fbc2c85ec2d6ca3e7f5267a73935588adb9fb05f57a52b315;

_WETH_UNWRAPPER_SALT

keccak256("lattice.LidoAdapter.WETHUnwrapper") — CREATE2 salt for the per-diamond WETHUnwrapper.

bytes32 constant _WETH_UNWRAPPER_SALT = 0x564152588ece721544930d70d150570f94d5fc5c0638cf70676b240372aabb9c;