IERC20PermitAllowed.sol
1 // SPDX-License-Identifier: GPL-2.0-or-later 2 pragma solidity >=0.6.0; 3 4 /// @title Interface for permit 5 /// @notice Interface used by DAI/CHAI for permit 6 interface IERC20PermitAllowed { 7 /// @notice Approve the spender to spend some tokens via the holder signature 8 /// @dev This is the permit interface used by DAI and CHAI 9 /// @param holder The address of the token holder, the token owner 10 /// @param spender The address of the token spender 11 /// @param nonce The holder's nonce, increases at each call to permit 12 /// @param expiry The timestamp at which the permit is no longer valid 13 /// @param allowed Boolean that sets approval amount, true for type(uint256).max and false for 0 14 /// @param v Must produce valid secp256k1 signature from the holder along with `r` and `s` 15 /// @param r Must produce valid secp256k1 signature from the holder along with `v` and `s` 16 /// @param s Must produce valid secp256k1 signature from the holder along with `r` and `v` 17 function permit( 18 address holder, 19 address spender, 20 uint256 nonce, 21 uint256 expiry, 22 bool allowed, 23 uint8 v, 24 bytes32 r, 25 bytes32 s 26 ) external; 27 }