Skip to content

Latest commit

 

History

History
255 lines (240 loc) · 9.41 KB

IERC777Sender.md

File metadata and controls

255 lines (240 loc) · 9.41 KB

IERC777Sender.sol

View Source: contracts/interfaces/IERC777Sender.sol

IERC777Sender contract

Interface of the ERC777TokensSender standard as defined in the EIP.

  • {IERC777} Token holders can be notified of operations performed on their tokens by having a contract implement this interface (contract holders can be their own implementer) and registering it on the https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry].
  • See {IERC1820Registry} and {ERC1820Implementer}.

Functions


tokensToSend

Called by an {IERC777} token contract whenever a registered holder's (from) tokens are about to be moved or destroyed. The type of operation is conveyed by to being the zero address or not. * This call occurs before the token contract's state is updated, so {IERC777-balanceOf}, etc., can be used to query the pre-operation state. * This function may revert to prevent the operation from being executed.

function tokensToSend(address operator, address from, address to, uint256 amount, bytes userData, bytes operatorData) external nonpayable

Arguments

Name Type Description
operator address
from address
to address
amount uint256
userData bytes
operatorData bytes
Source Code
function tokensToSend(
        address operator,
        address from,
        address to,
        uint256 amount,
        bytes calldata userData,
        bytes calldata operatorData
    ) external;

Contracts