Skip to main content

Interfaces IDs

caution

Interface IDs are not the most secure way to ensure that a contract implements a specific set of functions, as they are manually set and can be set to any value.

Interfaces IDs help check if a contract supports a specific interface, e.g., its meta-interface. They are helpful if we want to interact with a contract but don't know if it supports an interface such as ERC725Y, LSP1UniversalReceiver, etc.

The supportsInterface function from the ERC165 standard returns true if the standard is supported, false otherwise.

The interface IDs of each LSP standards can be easily imported in your code from the @lukso/lsp-smart-contracts NPM package. They are accessible as follow:

import { INTERFACE_IDS } from '@lukso/lsp-smart-contracts';

const LSP0_INTERFACE_ID = INTERFACE_IDS.LSP0ERC725Account;
Note on importing INTERFACE_IDS in Hardhat Typescript projects

If you are trying to import the INTERFACE_IDS within a Hardhat Typescript project, use the following import syntax:

import { INTERFACE_IDS } from '@lukso/lsp-smart-contracts/dist/constants.cjs.js';

// This will raise an error if you have ES Lint enabled,
// but will allow you to import the constants in a Hardhat + Typescript based project.
const LSP0_INTERFACE_ID = INTERFACE_IDS.LSP0ERC725Account;

This is due to the current issue that it is not possible to import ES Modules in Hardhat Typescript projects.

ContractInterface IDDescription
ERC1650x01ffc9a7Standard Interface Detection.
ERC12710x1626ba7eStandard Signature Validation Method for Contracts.
ERC725X0x7545acacGeneral executor.
ERC725Y0x629aa694General Data key-value store.
LSP0ERC725Account0x24871b3dInterface of the [LSP-0-ERC725Account] standard, an account based smart contract that represents an identity on-chain.
LSP1UniversalReceiver0x6bb56a14Interface of the LSP1 - Universal Receiver standard, an entry function for a contract to receive arbitrary information.
LSP1UniversalReceiverDelegate0xa245bbdaInterface of the LSP1 - Universal Receiver Delegate standard.
LSP6KeyManager0x23f34c62Interface of the LSP6 - Key Manager standard, a contract acting as a controller of an ERC725 Account using predfined permissions.
LSP7DigitalAsset0xb3c4928fInterface of the LSP7 - Digital Asset standard, a fungible digital asset.
LSP8IdentifiableDigitalAsset0x3a271706Interface of the LSP8 - Identifiable Digital Asset standard, a non-fungible digital asset.
LSP9Vault0x28af17e6Interface of LSP9 - Vault standard, a blockchain vault that can hold assets and interact with other smart contracts.
LSP11BasicSocialRecovery0x049a28f1Interface of the LSP11 - Basic Social Recovery standard, a contract to recover access control into an account.
LSP14Ownable2Step0x94be5999Interface of the LSP14 - Ownable 2-step standard, an extension of the [EIP173] (Ownable) standard with 2-step process to transfer or renounce ownership.
LSP17Extendable0xa918fa6bModule to add more functionalities to a contract using extensions.
LSP17Extension0xcee78b40Module to create a contract that can act as an extension.
LSP20CallVerification0x1a0eb6a5Implementation of a contract calling the verification functions according to LSP20 - Call Verification standard.
LSP20CallVerifier0x0d6ecac7Interface for the LSP20 Call Verification standard, a set of functions intended to perform verifications on behalf of another contract.
LSP25ExecuteRelayCall0x5ac79908