ERC20
Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
Modern and gas efficient ERC20 + EIP-2612 implementation.
Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
Methods
DOMAIN_SEPARATOR
Returns
| Name |
Type |
Description |
| _0 |
bytes32 |
undefined |
allowance
Parameters
| Name |
Type |
Description |
| _0 |
address |
undefined |
| _1 |
address |
undefined |
Returns
| Name |
Type |
Description |
| _0 |
uint256 |
undefined |
approve
Parameters
| Name |
Type |
Description |
| spender |
address |
undefined |
| amount |
uint256 |
undefined |
Returns
| Name |
Type |
Description |
| _0 |
bool |
undefined |
balanceOf
Parameters
| Name |
Type |
Description |
| _0 |
address |
undefined |
Returns
| Name |
Type |
Description |
| _0 |
uint256 |
undefined |
decimals
Returns
| Name |
Type |
Description |
| _0 |
uint8 |
undefined |
name
Returns
| Name |
Type |
Description |
| _0 |
string |
undefined |
nonces
Parameters
| Name |
Type |
Description |
| _0 |
address |
undefined |
Returns
| Name |
Type |
Description |
| _0 |
uint256 |
undefined |
permit
Parameters
| Name |
Type |
Description |
| owner |
address |
undefined |
| spender |
address |
undefined |
| value |
uint256 |
undefined |
| deadline |
uint256 |
undefined |
| v |
uint8 |
undefined |
| r |
bytes32 |
undefined |
| s |
bytes32 |
undefined |
symbol
Returns
| Name |
Type |
Description |
| _0 |
string |
undefined |
totalSupply
Returns
| Name |
Type |
Description |
| _0 |
uint256 |
undefined |
transfer
Parameters
| Name |
Type |
Description |
| to |
address |
undefined |
| amount |
uint256 |
undefined |
Returns
| Name |
Type |
Description |
| _0 |
bool |
undefined |
transferFrom
Parameters
| Name |
Type |
Description |
| from |
address |
undefined |
| to |
address |
undefined |
| amount |
uint256 |
undefined |
Returns
| Name |
Type |
Description |
| _0 |
bool |
undefined |
Events
Approval
Parameters
| Name |
Type |
Description |
owner indexed |
address |
undefined |
spender indexed |
address |
undefined |
| amount |
uint256 |
undefined |
Transfer
Parameters
| Name |
Type |
Description |
from indexed |
address |
undefined |
to indexed |
address |
undefined |
| amount |
uint256 |
undefined |