Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MockTokenMinter

Git Source

Inherits: ITokenMinter

Title: MockTokenMinter

Mock implementation of ITokenMinter for testing

Manages mappings between remote and local tokens

State Variables

tokenMappings

mapping(uint32 => mapping(bytes32 => address)) public tokenMappings

Functions

getLocalToken

Get the local token address for a remote token

function getLocalToken(uint32 remoteDomain, bytes32 remoteToken) external view returns (address localToken);

Parameters

NameTypeDescription
remoteDomainuint32The domain of the remote chain
remoteTokenbytes32The token address on the remote chain

Returns

NameTypeDescription
localTokenaddressThe corresponding token address on this chain

setLocalToken

Set the local token for a remote token (testing only)

function setLocalToken(uint32 remoteDomain, bytes32 remoteToken, address localToken) external;

Parameters

NameTypeDescription
remoteDomainuint32The domain of the remote chain
remoteTokenbytes32The token address on the remote chain
localTokenaddressThe token address on this chain