Namespace: src5
Functions
supportsInterface
▸ supportsInterface(provider, contractAddress, interfaceId): Promise<boolean>
Implementation of ERC165 introspection. Verify if a contract has implemented some standard functionalities.
Parameters
| Name | Type | Description |
|---|---|---|
provider | Provider | the provider to access to Starknet. |
contractAddress | BigNumberish | the address of the contract to check. |
interfaceId | BigNumberish | the hash of the functionality to check. |
Returns
Promise<boolean>
true if the interfaceId is implemented in this contract.
Example
const snip9InterfaceV2Id = constants.SNIP9_V2_INTERFACE_ID;
const result = src5.supportsInterface(myProvider, accountContractAddress, snip9InterfaceV2Id);
// result = true