Skip to content
LogoLogo

ICaliberMailbox

Git Source

Inherits: IMachineEndpoint

Functions

initialize

Initializer of the contract.

function initialize(IMakinaGovernable.MakinaGovernableInitParams calldata mgParams, uint256 initialCooldownDuration)
        external;

Parameters

NameTypeDescription
mgParamsIMakinaGovernable.MakinaGovernableInitParamsThe makina governable initialization parameters.
initialCooldownDurationuint256The duration of the cooldown period for outgoing bridge transfers.

caliber

Address of the associated caliber.

function caliber() external view returns (address);

Returns

NameTypeDescription
<none>address

cooldownDuration

Duration of the cooldown period for outgoing bridge transfers.

function cooldownDuration() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256

getHubBridgeAdapter

Returns the 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.

Returns

NameTypeDescription
<none>address

hubChainId

Chain ID of the hub.

function hubChainId() external view returns (uint256);

Returns

NameTypeDescription
<none>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.

setCooldownDuration

Sets the duration of the cooldown period for outgoing bridge transfers.

function setCooldownDuration(uint256 newCooldownDuration) external;

Parameters

NameTypeDescription
newCooldownDurationuint256The new duration in seconds.

setHubBridgeAdapter

Registers a hub bridge adapter.

function setHubBridgeAdapter(uint16 bridgeId, address adapter) external;

Parameters

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

Events

CaliberSet

event CaliberSet(address indexed caliber);

Parameters

NameTypeDescription
caliberaddress

CooldownDurationChanged

event CooldownDurationChanged(uint256 oldDuration, uint256 newDuration);

Parameters

NameTypeDescription
oldDurationuint256
newDurationuint256

HubBridgeAdapterSet

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

Parameters

NameTypeDescription
bridgeIduint256
adapteraddress

Structs

SpokeSnapshotContext

Spoke caliber accounting snapshot context.

struct SpokeSnapshotContext {
        uint256 chainId;
        address mailbox;
        uint256 blockNum;
        uint256 blockTime;
    }

Properties

NameTypeDescription
chainIduint256The chain ID of the spoke caliber.
mailboxaddressThe address of the spoke caliber mailbox.
blockNumuint256The block number used as the snapshot reference point.
blockTimeuint256The block timestamp used as the snapshot reference point.

SpokeCaliberAccountingData

Spoke caliber accounting snapshot data.

struct SpokeCaliberAccountingData {
        uint256 netAum;
        bytes[] bridgesIn;
        bytes[] bridgesOut;
        SpokeSnapshotContext context;
    }

Properties

NameTypeDescription
netAumuint256The net AUM denominated in the caliber accounting token.
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).
contextSpokeSnapshotContextThe snapshot context.