Pair (ERC-20)
This documentation covers ERC-20 functionality for denominating pool tokens. For Pegasys-specific functionality, see Pair.
#
Code#
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 Pegasys
for all pairs.
#
symbolReturns UNI-V2
for all pairs.
#
decimalsReturns 18
for all pairs.
#
totalSupplyReturns the total amount of pool tokens for a pair.
#
balanceOfReturns the amount of pool 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.
- See Using Permit.
- Emits Approval.