Skip to content

Latest commit

 

History

History
50 lines (28 loc) · 1.72 KB

File metadata and controls

50 lines (28 loc) · 1.72 KB

Permit

1. Summary

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

2. Important links

{% embed url="https://github.com/PWNFinance/pwn_contracts/blob/master/src/loan/vault/Permit.sol" %}

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
addressassetAddress of the asset the permit is for
addressownerOwner of the asset
uint256amountAmount of the asset
uint256deadlineDeadline for the permit
uint8vv value of the signature
bytes32rr value of the signature
bytes32ss value of the signature