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

MockTokenMessengerV2

Git Source

Inherits: ITokenMessengerV2

Title: MockTokenMessengerV2

Mock implementation of ITokenMessengerV2 for testing FastMCTP

Returns references to MockMessageTransmitter and MockTokenMinter

State Variables

_localMessageTransmitter

IMessageTransmitter public _localMessageTransmitter

_localMinter

ITokenMinter public _localMinter

Functions

constructor

constructor(address messageTransmitter, address tokenMinter) ;

localMessageTransmitter

Get the local message transmitter

function localMessageTransmitter() external view returns (IMessageTransmitter);

localMinter

Get the local token minter

function localMinter() external view returns (ITokenMinter);

depositForBurnWithHook

Deposit tokens for burn with hook (stub)

function depositForBurnWithHook(
    uint256 amount,
    uint32 destinationDomain,
    bytes32 mintRecipient,
    address burnToken,
    bytes32 destinationCaller,
    uint256 maxFee,
    uint32 minFinalityThreshold,
    bytes memory hookData
) external returns (uint64 nonce);

setLocalMessageTransmitter

Set the message transmitter (testing only)

function setLocalMessageTransmitter(address newTransmitter) external;

setLocalMinter

Set the token minter (testing only)

function setLocalMinter(address newMinter) external;