Add an interface folder that lists common interfaces (#2517)
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
29
contracts/interfaces/IERC1363Spender.sol
Normal file
29
contracts/interfaces/IERC1363Spender.sol
Normal file
@ -0,0 +1,29 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
interface IERC1363Spender {
|
||||
/*
|
||||
* Note: the ERC-165 identifier for this interface is 0x7b04a2d0.
|
||||
* 0x7b04a2d0 === bytes4(keccak256("onApprovalReceived(address,uint256,bytes)"))
|
||||
*/
|
||||
|
||||
/**
|
||||
* @notice Handle the approval of ERC1363 tokens
|
||||
* @dev Any ERC1363 smart contract calls this function on the recipient
|
||||
* after an `approve`. This function MAY throw to revert and reject the
|
||||
* approval. 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 owner address The address which called `approveAndCall` function
|
||||
* @param value uint256 The amount of tokens to be spent
|
||||
* @param data bytes Additional data with no specified format
|
||||
* @return `bytes4(keccak256("onApprovalReceived(address,uint256,bytes)"))`
|
||||
* unless throwing
|
||||
*/
|
||||
function onApprovalReceived(
|
||||
address owner,
|
||||
uint256 value,
|
||||
bytes memory data
|
||||
) external returns (bytes4);
|
||||
}
|
||||
Reference in New Issue
Block a user