Appearance
PToken
PToken.sol
is a ERC20 smart contract. When the factory contract deploys the pool, the pool deploys 3 PTokens described in Components of Potentia.
PToken minting and burning are exclusive functions of the pool. All other operations, such as transfer
, decimals
, and balanceOf
, adhere to the standard ERC20 standard.
1. mint
solidity
function mint(address _to, uint256 _amt) external virtual onlyOwner
This functions mints PToken to the caller's address. This can only be called by the pool and can not directly be called by the traders.
Parameters
Name | Type | Description |
---|---|---|
_to | address | Address of the caller |
_amt | uint256 | Amount of PTokens to mint |
2. burn
solidity
function burn(address _from, uint256 _amt) external virtual onlyOwner
This functions burns PToken. This can only be called by the pool and can not directly be called by the traders.
Parameters
Name | Type | Description |
---|---|---|
_from | address | Address of the caller |
_amt | uint256 | Amount of PTokens to burn |