SpokeCoreFactory
Inherits: AccessManagedUpgradeable, CaliberFactory, BridgeAdapterFactory, ISpokeCoreFactory
State Variables
CaliberMailboxSaltDomain
bytes32 private constant CaliberMailboxSaltDomain = 0x4b3676c1328bb93bf4cdb2e4a60e8517fd898e78bd01e7956950c3ff62d3872f;
SpokeCoreFactoryStorageLocation
bytes32 private constant SpokeCoreFactoryStorageLocation =
0xcb1a6cd67f0aa55e138668b826a3a98a6a6ef973cbafe7a0845e7a69c97a6000;
Functions
_getSpokeCoreFactoryStorage
function _getSpokeCoreFactoryStorage() internal pure returns (SpokeCoreFactoryStorage storage $);
constructor
constructor(address _registry) MakinaContext(_registry);
initialize
function initialize(address _initialAuthority) external initializer;
isCaliberMailbox
Address => Whether this is a CaliberMailbox instance deployed by this factory.
function isCaliberMailbox(address caliberMailbox) external view override returns (bool);
createCaliber
Deploys a new Caliber instance.
function createCaliber(
ICaliber.CaliberInitParams calldata cParams,
IMakinaGovernable.MakinaGovernableInitParams calldata mgParams,
address accountingToken,
address hubMachine,
bytes32 salt
) external override restricted returns (address);
Parameters
Name | Type | Description |
---|---|---|
cParams | ICaliber.CaliberInitParams | The caliber initialization parameters. |
mgParams | IMakinaGovernable.MakinaGovernableInitParams | The makina governable initialization parameters. |
accountingToken | address | The address of the accounting token. |
hubMachine | address | The address of the hub machine. |
salt | bytes32 | The salt used to deploy the Caliber deterministically. |
Returns
Name | Type | Description |
---|---|---|
<none> | address | caliber The address of the deployed Caliber instance. |
createBridgeAdapter
Deploys a bridge adapter instance.
function createBridgeAdapter(uint16 bridgeId, bytes calldata initData) external returns (address);
Parameters
Name | Type | Description |
---|---|---|
bridgeId | uint16 | The ID of the bridge for which the adapter is being created. |
initData | bytes | The optional initialization data for the bridge adapter. |
Returns
Name | Type | Description |
---|---|---|
<none> | address | adapter The address of the deployed bridge adapter. |
_createCaliberMailbox
Internal logic for caliber mailbox deployment via create3. This function only performs the deployment. It does not update factory storage nor emit an event.
function _createCaliberMailbox(
IMakinaGovernable.MakinaGovernableInitParams calldata mgParams,
address hubMachine,
bytes32 salt
) internal returns (address);
Structs
SpokeCoreFactoryStorage
Note: storage-location: erc7201:makina.storage.SpokeCoreFactory
struct SpokeCoreFactoryStorage {
mapping(address mailbox => bool isMailbox) _isCaliberMailbox;
mapping(address mailbox => bytes32 salt) _instanceSalts;
}