Skip to main content

CCIPBurnMintTokenPool

Git Source

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

NameTypeDescription
kernel_address
ohm_address
rmnProxy_address
ccipRouter_address

configureDependencies​

Define module dependencies for this policy.

function configureDependencies() external override returns (Keycode[] memory dependencies);

Returns

NameTypeDescription
dependenciesKeycode[]- 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

NameTypeDescription
permissionsPermissions[]- 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

NameTypeDescription
majoruint8The major version of the policy
minoruint8The 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

NameTypeDescription
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

NameTypeDescription
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

NameTypeDescription
<none>uint256

typeAndVersion​

function typeAndVersion() external pure override returns (string memory);

Returns

NameTypeDescription
<none>string

supportsInterface​

function supportsInterface(
bytes4 interfaceId
) public pure override(TokenPool, PolicyEnabler) returns (bool);

Parameters

NameTypeDescription
interfaceIdbytes4

Returns

NameTypeDescription
<none>bool