Skip to content

Interface

The interface is the main entrypoint for users or protocols to interact with Concero cross-chain infrastructure. It is responsible for executing the entire transaction on a single chain, allowing a user to perform multiple actions with a single function call.

swap

function swap(struct IDexSwap.SwapData[] _swapData, address _receiver) external payable

Performs a swap on a single chain.

Parameters

NameTypeDescription
_swapDatastruct IDexSwap.SwapData[]the swap payload of type IDexSwap.SwapData[]
_receiveraddressthe recipient of the swap

bridge

function bridge(struct IStorage.BridgeData bridgeData, struct IDexSwap.SwapData[] dstSwapData) external payable

Performs a bridge from the source chain to the destination chain.

Parameters

NameTypeDescription
bridgeDatastruct IStorage.BridgeDatabridge payload of type BridgeData
dstSwapDatastruct IDexSwap.SwapData[]destination swap payload. May be empty

swapAndBridge

function swapAndBridge(struct IStorage.BridgeData bridgeData, struct IDexSwap.SwapData[] srcSwapData, struct IDexSwap.SwapData[] dstSwapData) external payable

Performs a bridge coupled with the source chain swap and an optional destination chain swap.

Parameters

NameTypeDescription
bridgeDatastruct IStorage.BridgeDatabridge payload of type BridgeData
srcSwapDatastruct IDexSwap.SwapData[]swap payload for the source chain of type IDexSwap.SwapData[]
dstSwapDatastruct IDexSwap.SwapData[]swap payload for the destination chain of type IDexSwap.SwapData[]. May be empty

Types

BridgeData

    struct BridgeData {
        CCIPToken tokenType;
        uint256 amount;
        uint64 dstChainSelector;
        address receiver;
    }

SwapData

    struct SwapData {
        DexType dexType;
        address fromToken;
        uint256 fromAmount;
        address toToken;
        uint256 toAmount;
        uint256 toAmountMin;
        bytes dexData;
    }
 
    enum DexType {
        UniswapV2,
        UniswapV2FoT,
        SushiV3Single,
        UniswapV3Single,
        SushiV3Multi,
        UniswapV3Multi,
        Aerodrome,
        AerodromeFoT,
        UniswapV2Ether,
        WrapNative,
        UnwrapWNative
    }