IBridge

Git Source

Title: IBridge

Author: Merge Layers Inc.

Interface for rebalancing bridge implementations

Functions

sendMsg

rebalance through bridge

function sendMsg(
    uint256 _extractedAmount,
    address _market,
    uint32 _dstChainId,
    address _token,
    bytes calldata _message,
    bytes calldata _bridgeData
) external payable;

Parameters

NameTypeDescription
_extractedAmountuint256extracted amount for rebalancing
_marketaddressdestination address
_dstChainIduint32destination chain id
_tokenaddressthe token to rebalance
_messagebytesoperation message data
_bridgeDatabytesspecific bridge datas

getFee

computes fee for bridge operation

function getFee(uint32 _dstChainId, bytes calldata _message, bytes calldata _bridgeData)
    external
    view
    returns (uint256);

Parameters

NameTypeDescription
_dstChainIduint32destination chain id
_messagebytesoperation message data
_bridgeDatabytesspecific bridge data

Returns

NameTypeDescription
<none>uint256fee Computed bridge fee