Skip to content
LogoLogo

IBridgeAdapterFactory

Git Source

Functions

isBridgeAdapter

Address => Whether this is a BridgeAdapter instance deployed by this factory.

function isBridgeAdapter(address adapter) external view returns (bool);

Parameters

NameTypeDescription
adapteraddress

Returns

NameTypeDescription
<none>bool

createBridgeAdapter

Deploys a bridge adapter instance.

function createBridgeAdapter(address controller, BridgeAdapterInitParams calldata baParams)
        external
        returns (address adapter);

Parameters

NameTypeDescription
controlleraddressThe address of the bridge controller for which to deploy the adapter.
baParamsBridgeAdapterInitParamsThe bridge adapter initialization parameters and controller configuration.

Returns

NameTypeDescription
adapteraddressThe address of the deployed bridge adapter.

Events

BridgeAdapterCreated

event BridgeAdapterCreated(address indexed controller, uint256 indexed bridgeId, address indexed adapter);

Parameters

NameTypeDescription
controlleraddress
bridgeIduint256
adapteraddress

Structs

BridgeAdapterInitParams

Bridge adapter initialization parameters and controller configuration.

struct BridgeAdapterInitParams {
        uint16 bridgeId;
        bytes initData;
        uint256 initialMaxBridgeLossBps;
    }

Properties

NameTypeDescription
bridgeIduint16The ID of the bridge for which the adapter is being created.
initDatabytesThe optional initialization data for the bridge adapter.
initialMaxBridgeLossBpsuint256The initial maximum bridge loss in basis points for this bridge ID and controller.