uniswap-v2-contracts/dependencies/@openzeppelin-contracts-5.3.0/interfaces/IERC777Sender.sol
Uncle Fatso 5f4365a3a8
make soldeer dependencies part of the repository
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
2025-06-29 15:05:11 +03:00

36 lines
1.2 KiB
Solidity

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC777Sender.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-777 Tokens Sender standard as defined in the ERC.
*
* {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[ERC-1820 global registry].
*
* See {IERC1820Registry} and {IERC1820Implementer}.
*/
interface IERC777Sender {
/**
* @dev 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 calldata userData,
bytes calldata operatorData
) external;
}