CCIPBurnMintTokenPool
Inherits: Policy, PolicyEnabler, BurnMintTokenPoolBase, ICCIPTokenPool, ITypeAndVersion
Title: CCIPBurnMintTokenPool
Bophades policy to handling minting and burning of OHM using Chainlink CCIP on non-canonical chains
As the CCIP contracts have a minimum solidity version of 0.8.24, this policy is also compiled with 0.8.24
Despite being a policy, the admin functions inherited from TokenPool are not virtual and cannot be overriden, and so remain gated to the owner.
Constants
_TYPE_AND_VERSION
Unique identifier for the TokenPool
This is used to identify the TokenPool to CCIP
string internal constant _TYPE_AND_VERSION = "BurnMintTokenPool 1.5.1";
State Variables
MINTR
Bophades module for minting and burning OHM
MINTRv1 public MINTR;
Functions
constructor
constructor(
address kernel_,
address ohm_,
address rmnProxy_,
address ccipRouter_
) Policy(Kernel(kernel_)) TokenPool(IERC20(ohm_), 9, new address[](0), rmnProxy_, ccipRouter_);
Parameters
| Name | Type | Description |
|---|---|---|
| kernel_ | address | |
| ohm_ | address | |
| rmnProxy_ | address | |
| ccipRouter_ | address |
configureDependencies
Define module dependencies for this policy.
function configureDependencies() external override returns (Keycode[] memory dependencies);
Returns
| Name | Type | Description |
|---|---|---|
| dependencies | Keycode[] | - Keycode array of module dependencies. |
requestPermissions
Function called by kernel to set module function permissions.
function requestPermissions()
external
view
override
returns (Permissions[] memory permissions);
Returns
| Name | Type | Description |
|---|---|---|
| permissions | Permissions[] | - Array of keycodes and function selectors for requested permissions. |
VERSION
Returns the version of the policy
function VERSION() external pure returns (uint8 major, uint8 minor);
Returns
| Name | Type | Description |
|---|---|---|
| major | uint8 | The major version of the policy |
| minor | uint8 | The minor version of the policy |
_burn
Burns the specified amount of OHM
Implementation of the _burn function from the BurnMintTokenPoolAbstract contract
function _burn(uint256 amount_) internal override onlyEnabled;
Parameters
| Name | Type | Description |
|---|---|---|
| amount_ | uint256 |
_mint
Mints the specified amount of OHM
Implementation of the _mint function from the BurnMintTokenPoolBase contract
function _mint(address receiver_, uint256 amount_) internal override onlyEnabled;
Parameters
| Name | Type | Description |
|---|---|---|
| receiver_ | address | |
| amount_ | uint256 |
getBridgedSupply
Returns the amount of OHM that has been bridged from mainnet
This function is not used in this policy, so it returns 0
function getBridgedSupply() external pure returns (uint256);
Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint256 |
typeAndVersion
function typeAndVersion() external pure override returns (string memory);
Returns
| Name | Type | Description |
|---|---|---|
| <none> | string |
supportsInterface
function supportsInterface(
bytes4 interfaceId
) public pure override(TokenPool, PolicyEnabler) returns (bool);
Parameters
| Name | Type | Description |
|---|---|---|
| interfaceId | bytes4 |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool |