Pool (ERC-20)
This documentation covers ERC-20 functionality for denominating pool tokens. For Bunicorn Stable-specific functionality, see Pool.
Code
The typical ERC20 functions are inherited from OpenZeppelin's ERC20 token implementation. In addition, the ERC20Permit library containing a permit
function for meta-approvals is used.
Events
Approval
Emitted each time an approval occurs via approve or permit.
Transfer
Emitted each time a transfer occurs via transfer, transferFrom, mint, or burn.
Read-Only Functions
name
Return Bunicorn Pool Token (LP token) for each pool.
symbol
Returns BPT symbol for each pool.
decimals
Returns 18
for all pools.
totalSupply
Returns the total amount of BPT tokens for a pool.
balanceOf
Returns the amount of BPT tokens owned by an address.
allowance
Returns the amount of liquidity tokens owned by an address that a spender is allowed to transfer via transferFrom.
DOMAIN_SEPARATOR
Returns a domain separator for use in permit.
PERMIT_TYPEHASH
Returns a typehash for use in permit.
nonces
Returns the current nonce for an address for use in permit.
State-Changing Functions
approve
Lets msg.sender
set their allowance for a spender.
Emits Approval.
transfer
Lets msg.sender
send pool tokens to an address.
Emits Transfer.
transferFrom
Sends pool tokens from one address to another.
Requires approval.
Emits Transfer.
permit
Sets the allowance for a spender where approval is granted via a signature.
Emits Approval.
Interface
Last updated