IDstSwapper
Author: Zeropoint Labs
SPDX-License-Identifier: Apache-2.0
all write functions can only be accessed by superform keepers.
handles all destination chain swaps.
Functions
processTx
would interact with liquidity bridge contract to process multi-tx transactions and move the funds into destination contract.
function processTx(uint256 payloadId_, uint256 index_, uint8 bridgeId_, bytes calldata txData_) external;
Parameters
Name | Type | Description |
---|---|---|
payloadId_ | uint256 | represents the id of the payload |
index_ | uint256 | represents the index of the superformid in the payload |
bridgeId_ | uint8 | represents the id of liquidity bridge used |
txData_ | bytes | represents the transaction data generated by liquidity bridge API. |
batchProcessTx
would interact with liquidity bridge contract to process multi-tx transactions and move the funds into destination contract.
function batchProcessTx(
uint256 payloadId_,
uint256[] calldata indices_,
uint8[] calldata bridgeIds_,
bytes[] calldata txDatas_
)
external;
Parameters
Name | Type | Description |
---|---|---|
payloadId_ | uint256 | represents the array of payload ids used |
indices_ | uint256[] | represents the index of the superformid in the payload |
bridgeIds_ | uint8[] | represents the array of ids of liquidity bridges used |
txDatas_ | bytes[] | represents the array of transaction data generated by liquidity bridge API |
swappedAmount
FIMXE: add natspec
function swappedAmount(uint256 payloadId_, uint256 index_) external view returns (uint256 amount_);
Events
SuperRegistryUpdated
is emitted when the super registry is updated.
event SuperRegistryUpdated(address indexed superRegistry);
SwapProcessed
is emitted when a dst swap transaction is processed
event SwapProcessed(uint256 payloadId, uint256 index, uint256 bridgeId, uint256 finalAmount);