ICaliberMailbox
Inherits: IMachineEndpoint
Functions
initialize
Initializer of the contract.
function initialize(IMakinaGovernable.MakinaGovernableInitParams calldata mgParams, uint256 initialCooldownDuration)
external;Parameters
| Name | Type | Description |
|---|---|---|
| mgParams | IMakinaGovernable.MakinaGovernableInitParams | The makina governable initialization parameters. |
| initialCooldownDuration | uint256 | The duration of the cooldown period for outgoing bridge transfers. |
caliber
Address of the associated caliber.
function caliber() external view returns (address);Returns
| Name | Type | Description |
|---|---|---|
| <none> | address |
cooldownDuration
Duration of the cooldown period for outgoing bridge transfers.
function cooldownDuration() external view returns (uint256);Returns
| Name | Type | Description |
|---|---|---|
| <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
| Name | Type | Description |
|---|---|---|
| bridgeId | uint16 | The ID of the bridge. |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | address |
hubChainId
Chain ID of the hub.
function hubChainId() external view returns (uint256);Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint256 |
getSpokeCaliberAccountingData
Returns the accounting data of the associated caliber.
function getSpokeCaliberAccountingData() external view returns (SpokeCaliberAccountingData memory);Returns
| Name | Type | Description |
|---|---|---|
| <none> | SpokeCaliberAccountingData | data The accounting data. |
setCaliber
Sets the associated caliber address.
function setCaliber(address _caliber) external;Parameters
| Name | Type | Description |
|---|---|---|
| _caliber | address | The address of the associated caliber. |
setCooldownDuration
Sets the duration of the cooldown period for outgoing bridge transfers.
function setCooldownDuration(uint256 newCooldownDuration) external;Parameters
| Name | Type | Description |
|---|---|---|
| newCooldownDuration | uint256 | The new duration in seconds. |
setHubBridgeAdapter
Registers a hub bridge adapter.
function setHubBridgeAdapter(uint16 bridgeId, address adapter) external;Parameters
| Name | Type | Description |
|---|---|---|
| bridgeId | uint16 | The ID of the bridge. |
| adapter | address | The address of the hub bridge adapter. |
Events
CaliberSet
event CaliberSet(address indexed caliber);Parameters
| Name | Type | Description |
|---|---|---|
| caliber | address |
CooldownDurationChanged
event CooldownDurationChanged(uint256 oldDuration, uint256 newDuration);Parameters
| Name | Type | Description |
|---|---|---|
| oldDuration | uint256 | |
| newDuration | uint256 |
HubBridgeAdapterSet
event HubBridgeAdapterSet(uint256 indexed bridgeId, address indexed adapter);Parameters
| Name | Type | Description |
|---|---|---|
| bridgeId | uint256 | |
| adapter | address |
Structs
SpokeSnapshotContext
Spoke caliber accounting snapshot context.
struct SpokeSnapshotContext {
uint256 chainId;
address mailbox;
uint256 blockNum;
uint256 blockTime;
}Properties
| Name | Type | Description |
|---|---|---|
| chainId | uint256 | The chain ID of the spoke caliber. |
| mailbox | address | The address of the spoke caliber mailbox. |
| blockNum | uint256 | The block number used as the snapshot reference point. |
| blockTime | uint256 | The 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
| Name | Type | Description |
|---|---|---|
| netAum | uint256 | The net AUM denominated in the caliber accounting token. |
| bridgesIn | bytes[] | The list of incoming bridge amounts, each encoded as abi.encode(token, amount). |
| bridgesOut | bytes[] | The list of outgoing bridge amounts, each encoded as abi.encode(token, amount). |
| context | SpokeSnapshotContext | The snapshot context. |