Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

IERC20PermitSafeDispatcherTrait

Fully qualified path: openzeppelin_interfaces::token::erc20::IERC20PermitSafeDispatcherTrait

Part of the group: dispatchers

pub trait IERC20PermitSafeDispatcherTrait<T>

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::IERC20PermitSafeDispatcherTrait::permit

fn permit(
    self: T,
    owner: ContractAddress,
    spender: ContractAddress,
    amount: u256,
    deadline: u64,
    signature: Span<felt252>,
) -> Result<(), Array<felt252>>

nonces

Returns the current nonce for owner.

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

fn nonces(self: T, owner: ContractAddress) -> Result<felt252, Array<felt252>>

DOMAIN_SEPARATOR

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

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

fn DOMAIN_SEPARATOR(self: T) -> Result<felt252, Array<felt252>>