PoolERC20

PoolERC20

This is an abstract contract for a Pool ERC20 token to use with a proxy. It is inspired by OpenZeppelin ERC20.

_balances

1
mapping(address => uint256) _balances
Copied!

_allowances

1
mapping(address => mapping(address => uint256)) _allowances
Copied!

_totalSupply

1
uint256 _totalSupply
Copied!

_name

1
string _name
Copied!

_symbol

1
string _symbol
Copied!

name

1
function name() public view virtual returns (string)
Copied!
Returns the name of the token.

symbol

1
function symbol() public view virtual returns (string)
Copied!
Returns the symbol of the token, usually a shorter version of the name.

decimals

1
function decimals() public view virtual returns (uint8)
Copied!
Returns the decimals of the token. default to 18

totalSupply

1
function totalSupply() public view virtual returns (uint256)
Copied!
Returns total supply of the token.

balanceOf

1
function balanceOf(address account) public view virtual returns (uint256)
Copied!
Returns the amount of tokens owned by account.

transfer

1
function transfer(address recipient, uint256 amount) public virtual returns (bool)
Copied!
_See {IERC20-transfer}.
Requirements:
  • recipient cannot be the zero address.
  • the caller must have a balance of at least amount._

allowance

1
function allowance(address owner, address spender) public view virtual returns (uint256)
Copied!
See {IERC20-allowance}.

approve

1
function approve(address spender, uint256 amount) public virtual returns (bool)
Copied!
_See {IERC20-approve}.
Requirements:
  • spender cannot be the zero address._

transferFrom

1
function transferFrom(address sender, address recipient, uint256 amount) public virtual returns (bool)
Copied!
_See {IERC20-transferFrom}.
Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}.
Requirements:
  • sender and recipient cannot be the zero address.
  • sender must have a balance of at least amount.
  • the caller must have allowance for sender's tokens of at least amount._