Skip to content

Interface

bridge

function bridge(
			address tokenReceiver,
			uint256 tokenAmount,
			uint24 dstChainSelector,
			uint256 dstGasLimit,
			bytes calldata dstCallData
) external returns (bytes32 messageId)

Performs a cross-chain transfer of your liquidity ERC-20 token via Concero, optionally invoking a receiver hook on the destination chain. _lancaReceive is not invoked when dstGasLimit == 0 and dstCallData == 0x. In that case, the contract simply transfers the tokens to tokenReceiver without calling lancaReceive.

ParameterType (EVM)Description
tokenReceiveraddressAddress on the destination chain to receive tokens (and, if present, execute the hook).
tokenAmountuint256Amount of the liquidity token to bridge.
dstChainSelectoruint24Concero chain selector for the destination chain.
dstGasLimituint256Gas limit for your hook on the destination chain.
dstCallDatabytesABI-encoded arguments for your hook.

_lancaReceive

function _lancaReceive(
	bytes32 id,
	uint24 srcChainSelector,
	address sender,
	uint256 amount,
	bytes memory data
) external;
ParameterType (EVM)Description
messageIdbytes32Unique identifier of the bridge message; use it for tracking and idempotency on the destination.
sourceChainSelectoruint24Concero selector of the source chain the transfer originated from.
tokenSenderaddressSender address on the source chain that initiated the bridge.
tokenAmountuint256Amount of the liquidity token delivered after fees on the destination chain (token decimals).
dstCallDatabytesABI-encoded payload passed through from the sender; parse/validate according to your hook’s schema.

To handle bridged tokens with a hook, your destination contract must implement ILancaClient and support ERC-165 for type(ILancaClient).interfaceId.

When the message arrives:

  • The bridge transfers tokens to tokenReceiver.
  • If a hook is configured, it then calls ILancaClient(tokenReceiver).lancaReceive{gas: dstGasLimit}

If lancaReceive reverts or runs out of gas, the entire delivery reverts atomically (no tokens are transferred).

getBridgeNativeFee

function getBridgeNativeFee(
	uint24 dstChainSelector,
	uint256 dstGasLimit
) external view returns (uint256)

Returns the native currency fee you must pass in msg.value when calling bridge.

NameTypeDescription
dstChainSelectoruint24Selector of the destination chain.
dstGasLimituint256Gas limit for the destination hook (0 if none)