Join our community of builders on

Telegram!Telegram

Interfaces

Smart contract interfaces utilities and implementations

List of standardized interfaces

These interfaces are available as .sol files. These are useful to interact with third party contracts that implement them.

  • IERC7540 (IERC7540Operator, IERC7540Deposit, IERC7540Redeem): Operator management and asynchronous deposit/redeem request interfaces for ERC-7540 tokenized vaults.
  • IERC7575 (IERC7575, IERC7575Share): Multi-asset ERC-4626 vaults and share-to-vault lookup interfaces.
  • IERC7786Attributes: Standard attributes for ERC-7786 cross-chain messaging.
  • IERC7913SignatureVerifier
  • IERC7943: ERC-20 based interface for RWA tokens with account restrictions, asset freezing, and forced transfers.
  • IERC7969 (IDKIMRegistry): Onchain DKIM public key registry interface for email-based authentication.

Detailed ABI

IERC7540

IERC7575

IERC7786Attributes

IERC7913SignatureVerifier IERC7943 IERC7969
import "@openzeppelin/community-contracts/interfaces/IERC7540.sol";

Interface for operator management in ERC-7540 asynchronous vaults. Operators can manage deposit and redeem requests on behalf of a controller.

setOperator(address operator, bool approved) → bool

external

#

Grants or revokes permissions for operator to manage requests on behalf of the caller.

  • MUST set the operator status to the approved value.
  • MUST emit the IERC7540Operator.OperatorSet event when the operator status is set.
  • MUST return true.

isOperator(address controller, address operator) → bool status

external

#

Returns true if the operator is approved as an operator for a controller.

OperatorSet(address indexed controller, address indexed operator, bool approved)

event

#

Emitted when controller sets the approved status for an operator.

import "@openzeppelin/community-contracts/interfaces/IERC7540.sol";

Interface for asynchronous deposit requests in ERC-7540 vaults. Enables users to request deposits that transition through Pending and Claimable states before being claimed via the standard ERC-4626 deposit/mint functions.

requestDeposit(uint256 assets, address controller, address owner) → uint256 requestId

external

#

Transfers assets from owner into the Vault and submits a request for asynchronous deposit.

  • MUST support ERC-20 approve / transferFrom on asset as a deposit request flow.
  • owner MUST equal msg.sender unless the owner has approved the msg.sender as an operator.
  • MUST revert if all of assets cannot be requested for deposit.
  • MUST emit the IERC7540Deposit.DepositRequest event.

Most implementations will require owner to have approved the Vault to spend at least assets of the underlying asset token (e.g. via asset.approve(vault, assets)) before calling this function.

pendingDepositRequest(uint256 requestId, address controller) → uint256 pendingAssets

external

#

Returns the amount of requested assets in Pending state.

  • MUST NOT include any assets in Claimable state for deposit or mint.
  • MUST NOT show any variations depending on the caller.
  • MUST NOT revert unless due to integer overflow caused by an unreasonably large input.

claimableDepositRequest(uint256 requestId, address controller) → uint256 claimableAssets

external

#

Returns the amount of requested assets in Claimable state for the controller to deposit or mint.

  • MUST NOT include any assets in Pending state.
  • MUST NOT show any variations depending on the caller.
  • MUST NOT revert unless due to integer overflow caused by an unreasonably large input.

deposit(uint256 assets, address receiver, address controller) → uint256 shares

external

#

Claims a pending deposit request by minting shares to receiver. Decreases claimableDepositRequest for the controller and transfers shares to receiver.

  • MUST emit the Deposit event.
  • MUST revert if controller does not have sufficient claimable assets.
  • controller MUST equal msg.sender unless the controller has approved the msg.sender as an operator.

mint(uint256 shares, address receiver, address controller) → uint256 assets

external

#

Claims a pending deposit request by minting exactly shares to receiver. Decreases claimableDepositRequest for the controller and transfers shares to receiver.

  • MUST emit the Deposit event.
  • MUST revert if controller does not have sufficient claimable assets.
  • controller MUST equal msg.sender unless the controller has approved the msg.sender as an operator.

DepositRequest(address indexed controller, address indexed owner, uint256 indexed requestId, address sender, uint256 assets)

event

#

Emitted when owner has locked assets in the Vault to request a deposit. controller controls this request. sender is the caller of requestDeposit.

import "@openzeppelin/community-contracts/interfaces/IERC7540.sol";

Interface for asynchronous redeem requests in ERC-7540 vaults. Enables users to request redemptions that transition through Pending and Claimable states before being claimed via the standard ERC-4626 redeem/withdraw functions.

requestRedeem(uint256 shares, address controller, address owner) → uint256 requestId

external

#

Assumes control of shares from owner into the Vault and submits a request for asynchronous redeem.

Authorization for a msg.sender not equal to owner may come either from ERC-20 approval over the shares of owner or from an operator approval via IERC7540Operator.setOperator. Operators are not subject to allowance restrictions, while non-infinite ERC-20 approvals are consumed.

Most implementations will require owner to have approved the Vault to spend at least shares of the Vault's share token (e.g. via share.approve(vault, shares)) before calling this function.

pendingRedeemRequest(uint256 requestId, address controller) → uint256 pendingShares

external

#

Returns the amount of requested shares in Pending state.

  • MUST NOT include any shares in Claimable state for redeem or withdraw.
  • MUST NOT show any variations depending on the caller.
  • MUST NOT revert unless due to integer overflow caused by an unreasonably large input.

claimableRedeemRequest(uint256 requestId, address controller) → uint256 claimableShares

external

#

Returns the amount of requested shares in Claimable state for the controller to redeem or withdraw.

  • MUST NOT include any shares in Pending state for redeem or withdraw.
  • MUST NOT show any variations depending on the caller.
  • MUST NOT revert unless due to integer overflow caused by an unreasonably large input.

RedeemRequest(address indexed controller, address indexed owner, uint256 indexed requestId, address sender, uint256 shares)

event

#

Emitted when sender has locked shares, owned by owner, in the Vault to request a redemption. controller controls this request.

import "@openzeppelin/community-contracts/interfaces/IERC7540.sol";

Interface of the fully asynchronous Vault interface of ERC7540, as defined in https://eips.ethereum.org/EIPS/eip-7540

import "@openzeppelin/community-contracts/interfaces/IERC7575.sol";

Multi-Asset ERC-4626 Vaults, as defined in https://eips.ethereum.org/EIPS/eip-7575

share() → address shareTokenAddress

external

#

The address of the underlying share received on deposit into the vault.

import "@openzeppelin/community-contracts/interfaces/IERC7575.sol";

Share-to-Vault lookup, as defined in https://eips.ethereum.org/EIPS/eip-7575

Functions

vault(address asset) → address vault

external

#

The address of the vault for a specific asset.

import "@openzeppelin/community-contracts/interfaces/IERC7786Attributes.sol";

Standard attributes for ERC-7786. These attributes may be standardized in different ERCs.

requestRelay(uint256 value, uint256 gasLimit, address refundRecipient)

external

#
import "@openzeppelin/community-contracts/interfaces/IERC7943.sol";

forcedTransfer(address from, address to, uint256 amount) → bool result

external

#

Requires specific authorization. Used for regulatory compliance or recovery scenarios.

setFrozenTokens(address account, uint256 amount) → bool result

external

#

Requires specific authorization. Frozen tokens cannot be transferred by the account.

canTransact(address account) → bool allowed

external

#

This is often used for allowlist/KYC/KYB/AML checks.

getFrozenTokens(address account) → uint256 amount

external

#

It could return an amount higher than the account's balance.

canTransfer(address from, address to, uint256 amount) → bool allowed

external

#

This can involve checks like allowlists, blocklists, transfer limits and other policy-defined restrictions.

ForcedTransfer(address indexed from, address indexed to, uint256 amount)

event

#

Frozen(address indexed account, uint256 amount)

event

#

ERC7943CannotTransact(address account)

error

#

ERC7943CannotTransfer(address from, address to, uint256 amount)

error

#

ERC7943InsufficientUnfrozenBalance(address account, uint256 amount, uint256 unfrozen)

error

#
import "@openzeppelin/community-contracts/interfaces/IERC7943.sol";

forcedTransfer(address from, address to, uint256 tokenId) → bool result

external

#

Requires specific authorization. Used for regulatory compliance or recovery scenarios.

setFrozenTokens(address account, uint256 tokenId, bool frozenStatus) → bool result

external

#

Requires specific authorization. Frozen tokens cannot be transferred by the account.

canTransact(address account) → bool allowed

external

#

This is often used for allowlist/KYC/KYB/AML checks.

getFrozenTokens(address account, uint256 tokenId) → bool frozenStatus

external

#

It could return true even if account does not hold the token.

canTransfer(address from, address to, uint256 tokenId) → bool allowed

external

#

This can involve checks like allowlists, blocklists, transfer limits and other policy-defined restrictions.

ForcedTransfer(address indexed from, address indexed to, uint256 indexed tokenId)

event

#

Frozen(address indexed account, uint256 indexed tokenId, bool indexed frozenStatus)

event

#

ERC7943CannotTransact(address account)

error

#

ERC7943CannotTransfer(address from, address to, uint256 tokenId)

error

#

ERC7943InsufficientUnfrozenBalance(address account, uint256 tokenId)

error

#
import "@openzeppelin/community-contracts/interfaces/IERC7943.sol";

forcedTransfer(address from, address to, uint256 tokenId, uint256 amount) → bool result

external

#

Requires specific authorization. Used for regulatory compliance or recovery scenarios.

setFrozenTokens(address account, uint256 tokenId, uint256 amount) → bool result

external

#

Requires specific authorization. Frozen tokens cannot be transferred by the account.

canTransact(address account) → bool allowed

external

#

This is often used for allowlist/KYC/KYB/AML checks.

getFrozenTokens(address account, uint256 tokenId) → uint256 amount

external

#

It could return an amount higher than the account's balance.

canTransfer(address from, address to, uint256 tokenId, uint256 amount) → bool allowed

external

#

This can involve checks like allowlists, blocklists, transfer limits and other policy-defined restrictions.

ForcedTransfer(address indexed from, address indexed to, uint256 indexed tokenId, uint256 amount)

event

#

Frozen(address indexed account, uint256 indexed tokenId, uint256 amount)

event

#

ERC7943CannotTransact(address account)

error

#

ERC7943CannotTransfer(address from, address to, uint256 tokenId, uint256 amount)

error

#

ERC7943InsufficientUnfrozenBalance(address account, uint256 tokenId, uint256 amount, uint256 unfrozen)

error

#
import "@openzeppelin/community-contracts/interfaces/IERC7969.sol";

This interface provides a standard way to register and validate DKIM public key hashes onchain Domain owners can register their DKIM public key hashes and third parties can verify their validity The interface enables email-based account abstraction and secure account recovery mechanisms.

The ERC-165 identifier for this interface is 0xdee3d600.

isKeyHashValid(bytes32 domainHash, bytes32 keyHash) → bool

external

#

Checks if a DKIM key hash is valid for a given domain

KeyHashRegistered(bytes32 domainHash, bytes32 keyHash)

event

#

Emitted when a new DKIM public key hash is registered for a domain

KeyHashRevoked(bytes32 domainHash)

event

#

Emitted when a DKIM public key hash is revoked for a domain