ERC20Permittable
contract ERC20Permittable
is ERC20, ERC20Detailed
This is ERC20 contract extended by the `permit` function (see EIP712).
Reference
Functions
_now
function _now() internal view returns (uint256)
- Returns:
- uint256
fallback
function (string _name, string _symbol, uint8 _decimals) public
- Modifiers:
- Parameters:
_name
- string_symbol
- string_decimals
- uint8
move
function move(address _from, address _to, uint256 _amount) public
An alias for `transferFrom` function.
- Parameters:
_from
- The address of the sender._to
- The address of the recipient._amount
- The value to transfer.
permit
function permit(address _holder, address _spender, uint256 _nonce, uint256 _expiry, bool _allowed, uint8 _v, bytes32 _r, bytes32 _s) external
Allows to spend holder's unlimited amount by the specified spender. The function can be called by anyone, but requires having allowance parameters signed by the holder according to EIP712.
- Parameters:
_holder
- The holder's address._spender
- The spender's address._nonce
- The nonce taken from `nonces(_holder)` public getter._expiry
- The allowance expiration date (unix timestamp in UTC). Can be zero for no expiration. Forced to zero if `_allowed` is `false`._allowed
- True to enable unlimited allowance for the spender by the holder. False to disable._v
- A final byte of signature (ECDSA component)._r
- The first 32 bytes of signature (ECDSA component)._s
- The second 32 bytes of signature (ECDSA component).
pull
function pull(address _from, uint256 _amount) public
Makes a request to transfer the specified amount from the specified address to the caller's address.
- Parameters:
_from
- The address of the holder._amount
- The value to transfer.
push
function push(address _to, uint256 _amount) public
An alias for `transfer` function.
- Parameters:
_to
- The address of the recipient._amount
- The value to transfer.
transferFrom
function transferFrom(address _sender, address _recipient, uint256 _amount) public returns (bool)
TransferFrom in this contract works in a slightly different form than the generic transferFrom function. This contract allows for "unlimited approval". Should the user approve an address for the maximum uint256 value, then that address will have unlimited approval until told otherwise.
- Parameters:
_sender
- The address of the sender._recipient
- The address of the recipient._amount
- The value to transfer.- Returns:
- Success status.