You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.3 KiB
Solidity
33 lines
1.3 KiB
Solidity
2 years ago
|
// SPDX-License-Identifier: MIT
|
||
|
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1363Receiver.sol)
|
||
|
|
||
|
pragma solidity ^0.8.0;
|
||
|
|
||
|
interface IERC1363Receiver {
|
||
|
/*
|
||
|
* Note: the ERC-165 identifier for this interface is 0x88a7ca5c.
|
||
|
* 0x88a7ca5c === bytes4(keccak256("onTransferReceived(address,address,uint256,bytes)"))
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* @notice Handle the receipt of ERC1363 tokens
|
||
|
* @dev 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.
|
||
|
* @param operator address The address which called `transferAndCall` or `transferFromAndCall` function
|
||
|
* @param from address The address which are token transferred from
|
||
|
* @param value uint256 The amount of tokens transferred
|
||
|
* @param data bytes Additional data with no specified format
|
||
|
* @return `bytes4(keccak256("onTransferReceived(address,address,uint256,bytes)"))`
|
||
|
* unless throwing
|
||
|
*/
|
||
|
function onTransferReceived(
|
||
|
address operator,
|
||
|
address from,
|
||
|
uint256 value,
|
||
|
bytes memory data
|
||
|
) external returns (bytes4);
|
||
|
}
|