Inherits: IERC20Extended, ERC3009
Author: M^0 Labs
Returns the EIP712 typehash used in the encoding of the digest for the permit function.
Keeping this constant, despite permit
parameter name differences, to ensure max EIP-2612 compatibility. keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)")
Returns the number of decimals UIs should assume all amounts have.
Returns the symbol of the token.
Returns the allowance spender
is allowed to spend on behalf of account
.
Constructs the ERC20Extended contract.
Parameters
name_
string
The name of the token.
symbol_
string
The symbol of the token.
decimals_
uint8
The number of decimals the token uses.
Allows a calling account to approve spender
to spend up to amount
of its token balance.
MUST emit an Approval
event.
Parameters
spender_
address
amount_
uint256
Returns
success_
bool
Whether or not the approval was successful.
Approves spender
to spend up to amount
of the token balance of owner
, via a signature.
Parameters
owner_
address
spender_
address
value_
uint256
deadline_
uint256
v_
uint8
r_
bytes32
s_
bytes32
Approves spender
to spend up to amount
of the token balance of owner
, via a signature.
Parameters
owner_
address
spender_
address
value_
uint256
deadline_
uint256
signature_
bytes
Allows a calling account to transfer amount
tokens to recipient
.
Parameters
recipient_
address
amount_
uint256
Returns
success_
bool
Whether or not the transfer was successful.
Allows a calling account to transfer amount
tokens from sender
, with allowance, to a recipient
.
Parameters
sender_
address
recipient_
address
amount_
uint256
Returns
success_
bool
Whether or not the transfer was successful.
Returns the name of the contract/token.
Approve spender_
to spend amount_
of tokens from account_
.
Parameters
account_
address
The address approving the allowance.
spender_
address
The address approved to spend the tokens.
amount_
uint256
The amount of tokens being approved for spending.
Set the amount_
of tokens spender_
is allowed to spend from account_
.
Parameters
account_
address
The address for which the allowance is set.
spender_
address
The address allowed to spend the tokens.
amount_
uint256
The amount of tokens being allowed for spending.
Performs the approval based on the permit info, validates the deadline, and returns the digest.
Parameters
owner_
address
The address of the account approving the allowance.
spender_
address
The address of the account being allowed to spend the tokens.
amount_
uint256
The amount of tokens being approved for spending.
deadline_
uint256
The deadline by which the signature must be used.
Returns
digest_
bytes32
The EIP-712 digest of the permit.