API Reference

Introspection

This crate handles type introspection of contracts. In other words, it examines which functions can be called on a given contract. This is referred to as the contract's interface.

Interfaces

Starting from version 3.x.x, the interfaces are no longer part of the openzeppelin_access package. The references documented here are contained in the openzeppelin_interfaces package version 2.1.0-alpha.0.

use openzeppelin_interfaces::introspection::ISRC5;

Interface of the SRC5 Introspection Standard as defined in SNIP-5.

SRC5 ID

0x3f918d17e5ee77373b56385708f855659a07f75997f365cf87748628532a055

Functions

Functions

supports_interface(interface_id: felt252) → bool

external

#

Checks whether the contract implements the given interface.

Check Computing the Interface ID for more information on how to compute this ID.

Core

use openzeppelin_introspection::src5::SRC5Component;

SRC5 component extending ISRC5.

Embeddable Implementations

SRC5Impl

Internal Implementations

InternalImpl

Embeddable functions

supports_interface(self: @ContractState, interface_id: felt252) → bool

external

#

Internal functions

register_interface(ref self: ComponentState, interface_id: felt252)

internal

#

Registers support for the given interface_id.

deregister_interface(ref self: ComponentState, interface_id: felt252)

internal

#

Deregisters support for the given interface_id.

On this page

InterfacesISRC5CoreSRC5Component