Interfaces
This document is better viewed at https://docs.openzeppelin.com/contracts/api/interfaces |
List of standardized interfaces
These interfaces are available as .sol
files, and also as compiler .json
ABI files (through the npm package). These
are useful to interact with third party contracts that implement them.
Detailed ABI
IERC1271
import "@openzeppelin/contracts/interfaces/IERC1271.sol";
Interface of the ERC1271 standard signature validation method for contracts as defined in ERC-1271.
Available since v4.1.
IERC1363
import "@openzeppelin/contracts/interfaces/IERC1363.sol";
transferAndCall(address to, uint256 value) → bool
external
Transfer tokens from msg.sender
to another address and then call onTransferReceived
on receiver
transferAndCall(address to, uint256 value, bytes data) → bool
external
Transfer tokens from msg.sender
to another address and then call onTransferReceived
on receiver
transferFromAndCall(address from, address to, uint256 value) → bool
external
Transfer tokens from one address to another and then call onTransferReceived
on receiver
transferFromAndCall(address from, address to, uint256 value, bytes data) → bool
external
Transfer tokens from one address to another and then call onTransferReceived
on receiver
IERC1363Receiver
import "@openzeppelin/contracts/interfaces/IERC1363Receiver.sol";
onTransferReceived(address operator, address from, uint256 value, bytes data) → bytes4
external
Any ERC1363 smart contract calls this function on the recipient
after a transfer
or a transferFrom
. This function MAY throw to revert and reject the
transfer. Return of other than the magic value MUST result in the
transaction being reverted.
Note: the token contract address is always the message sender.
IERC2981
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
Interface for the NFT Royalty Standard.
A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal support for royalty payments across all NFT marketplaces and ecosystem participants.
Available since v4.5.
IERC3156FlashLender
import "@openzeppelin/contracts/interfaces/IERC3156FlashLender.sol";
Interface of the ERC3156 FlashLender, as defined in ERC-3156.
Available since v4.1.
IERC3156FlashBorrower
import "@openzeppelin/contracts/interfaces/IERC3156FlashBorrower.sol";
Interface of the ERC3156 FlashBorrower, as defined in ERC-3156.
Available since v4.1.