Skip to main content

IERC20PermitAllowed.sol

Read code on GitHub

Interface used by DAI/CHAI for permit

Methods

permit

Approve the spender to spend some tokens via the holder signature

Solidity
function permit(address holder, address spender, uint256 nonce, uint256 expiry, bool allowed, uint8 v, bytes32 r, bytes32 s) external nonpayable
Details

This is the permit interface used by DAI and CHAI

Parameters

NameTypeDescription
holderaddressAddress of the token holder, the token owner
spenderaddressAddress of the token spender
nonceuint256Holder's nonce, increases at each call to permit
expiryuint256Timestamp at which the permit is no longer valid
allowedboolBoolean that sets approval amount, true for type(uint256).max and false for 0
vuint8Must produce valid secp256k1 signature from the holder along with r and s
rbytes32Must produce valid secp256k1 signature from the holder along with v and s
sbytes32Must produce valid secp256k1 signature from the holder along with r and v