SavingsXDai
Variables
wxdai
contract IWXDAI wxdaideploymentChainId
uint256 deploymentChainIdPERMIT_TYPEHASH
bytes32 PERMIT_TYPEHASHVERSION
string VERSIONErrors
ERC2612ExpiredSignature
error ERC2612ExpiredSignature(uint256 deadline)Permit deadline has expired.
ERC2612InvalidSigner
error ERC2612InvalidSigner(address signer, address owner)Mismatched signature.
Functions
constructor
constructor(string _name, string _ticker) publicSet the underlying asset contract. This must be an ERC20-compatible contract (ERC20 or ERC777).
receive
receive() external payable_isValidSignature
function _isValidSignature(address signer, bytes32 digest, bytes signature) internal view returns (bool)permit
function permit(address owner, address spender, uint256 value, uint256 deadline, bytes signature) publicpermit
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external_Sets value as the allowance of spender over owner's tokens, given owner's signed approval.
IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here.
Emits an {Approval} event.
Requirements:
- spendercannot be the zero address.
- deadlinemust be a timestamp in the future.
- v,- rand- smust be a valid- secp256k1signature from- ownerover the EIP712-formatted function arguments.
- the signature must use - owner's current nonce (see {nonces}).
For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section].
CAUTION: See Security Considerations above._
nonces
function nonces(address owner) public view virtual returns (uint256)See {IERC20Permit-nonces}.
DOMAIN_SEPARATOR
function DOMAIN_SEPARATOR() external view virtual returns (bytes32)See {IERC20Permit-DOMAIN_SEPARATOR}.
Last updated