mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Added permit to IAToken interface
This commit is contained in:
parent
44528c7733
commit
2ae2680834
|
@ -95,6 +95,27 @@ interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken {
|
|||
**/
|
||||
function handleRepayment(address user, uint256 amount) external;
|
||||
|
||||
/**
|
||||
* @dev implements the permit function as for
|
||||
* https://github.com/ethereum/EIPs/blob/8a34d644aacf0f9f8f00815307fd7dd5da07655f/EIPS/eip-2612.md
|
||||
* @param owner The owner of the funds
|
||||
* @param spender The spender
|
||||
* @param value The amount
|
||||
* @param deadline The deadline timestamp, type(uint256).max for max deadline
|
||||
* @param v Signature param
|
||||
* @param s Signature param
|
||||
* @param r Signature param
|
||||
*/
|
||||
function permit(
|
||||
address owner,
|
||||
address spender,
|
||||
uint256 value,
|
||||
uint256 deadline,
|
||||
uint8 v,
|
||||
bytes32 r,
|
||||
bytes32 s
|
||||
) external;
|
||||
|
||||
/**
|
||||
* @dev Returns the address of the incentives controller contract
|
||||
**/
|
||||
|
|
|
@ -341,7 +341,7 @@ contract AToken is
|
|||
uint8 v,
|
||||
bytes32 r,
|
||||
bytes32 s
|
||||
) external {
|
||||
) external override {
|
||||
require(owner != address(0), 'INVALID_OWNER');
|
||||
//solium-disable-next-line
|
||||
require(block.timestamp <= deadline, 'INVALID_EXPIRATION');
|
||||
|
|
Loading…
Reference in New Issue
Block a user