Permit.sol defines a Permit struct for off-chain signed ERC-20 permits.
{% embed url="https://github.com/PWNFinance/pwn_contracts/blob/master/src/loan/vault/Permit.sol" %}
- Permit.sol is written in Solidity version 0.8.16
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:
address
current
address
expected
InvalidPermitAsset
InvalidPermitAsset error is thrown when the permit asset doesn't match.
This error has two parameters:
address
current
address
expected
Type | Name | Comment |
---|---|---|
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 |