Pool (ERC-20)
This documentation covers ERC-20 functionality for denominating pool tokens. For DMM-specific functionality, see Pool.
#
CodeThe typical ERC20 functions are inherited from OpenZeppelin's ERC20 token implementation. In adiition, the ERC20Permit library containing a permit
function for meta-approvals is used.
#
Events#
ApprovalEmitted each time an approval occurs via approve or permit.
#
TransferEmitted each time a transfer occurs via transfer, transferFrom, mint, or burn.
#
Read-Only Functions#
nameReturns KyberSwap LP
for all pools.
#
symbolReturns DMM-LP
for all pools.
#
decimalsReturns 18
for all pools.
#
totalSupplyReturns the total amount of LP tokens for a pools.
#
balanceOfReturns the amount of LP tokens owned by an address.
#
allowanceReturns the amount of liquidity tokens owned by an address that a spender is allowed to transfer via transferFrom.
#
DOMAIN_SEPARATORReturns a domain separator for use in permit.
#
PERMIT_TYPEHASHReturns a typehash for use in permit.
#
noncesReturns the current nonce for an address for use in permit.
#
State-Changing Functions#
approveLets msg.sender
set their allowance for a spender.
- Emits Approval.
#
transferLets msg.sender
send pool tokens to an address.
- Emits Transfer.
#
transferFromSends pool tokens from one address to another.
- Requires approval.
- Emits Transfer.
#
permitSets the allowance for a spender where approval is granted via a signature.
- Emits Approval.