Skip to main content

ICaliberMailbox

Git Source

Inherits: IMachineEndpoint

Functions

initialize

Initializer of the contract.

function initialize(IMakinaGovernable.MakinaGovernableInitParams calldata mgParams, address hubMachine) external;

Parameters

NameTypeDescription
mgParamsIMakinaGovernable.MakinaGovernableInitParamsThe makina governable initialization parameters.
hubMachineaddressThe foreign address of the hub machine.

caliber

Address of the associated caliber.

function caliber() external view returns (address);

getHubBridgeAdapter

Returns the foreign address of the Hub bridge adapter for a given bridge ID.

function getHubBridgeAdapter(uint16 bridgeId) external view returns (address);

Parameters

NameTypeDescription
bridgeIduint16The ID of the bridge.

hubChainId

Chain ID of the hub.

function hubChainId() external view returns (uint256);

getSpokeCaliberAccountingData

Returns the accounting data of the associated caliber.

function getSpokeCaliberAccountingData() external view returns (SpokeCaliberAccountingData memory);

Returns

NameTypeDescription
<none>SpokeCaliberAccountingDatadata The accounting data.

setCaliber

Sets the associated caliber address.

function setCaliber(address caliber) external;

Parameters

NameTypeDescription
caliberaddressThe address of the associated caliber.

setHubBridgeAdapter

Registers a hub bridge adapter.

function setHubBridgeAdapter(uint16 bridgeId, address adapter) external;

Parameters

NameTypeDescription
bridgeIduint16The ID of the bridge.
adapteraddressThe foreign address of the bridge adapter.

Events

CaliberSet

event CaliberSet(address indexed caliber);

HubBridgeAdapterSet

event HubBridgeAdapterSet(uint256 indexed bridgeId, address indexed adapter);

Structs

SpokeCaliberAccountingData

Accounting data of the caliber.

struct SpokeCaliberAccountingData {
uint256 netAum;
bytes[] positions;
bytes[] baseTokens;
bytes[] bridgesIn;
bytes[] bridgesOut;
}

Properties

NameTypeDescription
netAumuint256The net AUM expresses in caliber's accounting token.
positionsbytes[]The list of positions of the caliber, each encoded as abi.encode(positionId, value, isDebt).
baseTokensbytes[]The list of base tokens of the caliber, each encoded as abi.encode(token, value).
bridgesInbytes[]The list of incoming bridge amounts, each encoded as abi.encode(token, amount).
bridgesOutbytes[]The list of outgoing bridge amounts, each encoded as abi.encode(token, amount).