Permit

1. Summary

Permit.sol defines a Permit struct for off-chain signed ERC-20 permits.

3. Contract details

  • Permit.sol is written in Solidity version 0.8.16

Errors

error InvalidPermitOwner(address current, address expected);
error InvalidPermitAsset(address current, address expected);
InvalidPermitOwner

InvalidPermitOwner error is thrown when the permit owner doesn't match.

This error has two parameters:

  • addresscurrent

  • addressexpected

InvalidPermitAsset

InvalidPermitAsset error is thrown when the permit asset doesn't match.

This error has two parameters:

  • addresscurrent

  • addressexpected

Permit Struct

TypeNameComment

address

asset

Address of the asset the permit is for

address

owner

Owner of the asset

uint256

amount

Amount of the asset

uint256

deadline

Deadline for the permit

uint8

v

v value of the signature

bytes32

r

r value of the signature

bytes32

s

s value of the signature

Last updated