Skip to main content

BurnMintTokenPoolBase

Git Source

Inherits: BurnMintTokenPoolAbstract

Base contract for creating BurnMintTokenPools.

This extends the BurnMintTokenPoolAbstract contract to allow for a customisable mint call.

Functions

_mint

Specific mint call for a pool.

Overriding this method allows us to create pools with different mint signatures without duplicating the underlying logic.

function _mint(address receiver_, uint256 amount_) internal virtual;

Parameters

NameTypeDescription
receiver_addressThe address to mint the tokens to.
amount_uint256The amount of tokens to mint.

releaseOrMint

Releases or mints tokens to the receiver address.

This is the same as the releaseOrMint function in the BurnMintTokenPoolAbstract contract, with the direct mint() call replaced by the call to the virtual _mint() function.

function releaseOrMint(Pool.ReleaseOrMintInV1 calldata releaseOrMintIn)
public
virtual
override
returns (Pool.ReleaseOrMintOutV1 memory);

Parameters

NameTypeDescription
releaseOrMintInPool.ReleaseOrMintInV1All data required to release or mint tokens.

Returns

NameTypeDescription
<none>Pool.ReleaseOrMintOutV1releaseOrMintOut The amount of tokens released or minted on the local chain, denominated in the local token's decimals.