Added permit to IAToken interface

This commit is contained in:
Hadrien Charlanes 2021-04-01 14:27:09 +02:00
parent 44528c7733
commit 2ae2680834
2 changed files with 22 additions and 1 deletions

View File

@ -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
**/

View File

@ -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');