Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

IERC20Permit

Fully qualified path: openzeppelin_interfaces::token::erc20::IERC20Permit

pub trait IERC20Permit<TState>

Trait functions

permit

Sets amount as the allowance of spender over owner’s tokens, given the signature.

Requirements:

  • deadline must be a timestamp in the future.
  • signature must be a valid secp256k1 signature from owner over the EIP712-formatted function arguments.

Fully qualified path: openzeppelin_interfaces::token::erc20::IERC20Permit::permit

fn permit(
    ref self: TState,
    owner: ContractAddress,
    spender: ContractAddress,
    amount: u256,
    deadline: u64,
    signature: Span<felt252>,
)

nonces

Returns the current nonce for owner.

Fully qualified path: openzeppelin_interfaces::token::erc20::IERC20Permit::nonces

fn nonces(self: @TState, owner: ContractAddress) -> felt252

DOMAIN_SEPARATOR

Returns the domain separator used in the encoding of the signatures for permit.

Fully qualified path: openzeppelin_interfaces::token::erc20::IERC20Permit::DOMAIN_SEPARATOR

fn DOMAIN_SEPARATOR(self: @TState) -> felt252