SwapperV2 contract is a base contract that provides event definitions used across swap operations in the LiFi protocol. It doesn’t expose any public functions but defines the standard events emitted during swap and bridge operations.
Purpose
SwapperV2 serves as a shared event interface for:- Generic swap operations
- Bridge operations
- Cross-chain transfers
- Event tracking and indexing
Events
LiFiSwappedGeneric
Emitted when a generic token swap is executed.Unique identifier for the transaction
Name or identifier of the integrator
Referrer address or identifier
Address of the token being swapped from
Address of the token being swapped to
Amount of tokens swapped from
Amount of tokens received
LiFiGenericSwapCompleted
Emitted when a swap operation completes and tokens are transferred to the receiver.Unique identifier for the transaction
Name or identifier of the integrator
Referrer address or identifier
Address receiving the swapped tokens
Address of the initial token
Address of the final token
Initial token amount
Final token amount received
LiFiTransferStarted
Emitted when a bridge transfer is initiated.Complete bridge data structure containing:
transactionId: Unique transaction identifierbridge: Name of the bridge being usedintegrator: Integrator identifierreferrer: Referrer addresssendingAssetId: Token being sentreceiver: Destination addressminAmount: Minimum amount expecteddestinationChainId: Target chain IDhasSourceSwaps: Whether source swaps are includedhasDestinationCall: Whether destination calls are included
LiFiTransferCompleted
Emitted when a transfer is successfully completed.Unique identifier for the transaction
Address of the token received
Address that received the tokens
Amount of tokens received
Block timestamp when completed
LiFiTransferRecovered
Emitted when tokens are recovered from a failed transfer.Unique identifier for the transaction
Address of the token recovered
Address receiving the recovered tokens
Amount of tokens recovered
Block timestamp when recovered
BridgeToNonEVMChain
Emitted when bridging to a non-EVM chain with bytes receiver.Unique identifier for the transaction
Target chain identifier
Receiver address in bytes format
BridgeToNonEVMChainBytes32
Emitted when bridging to a non-EVM chain with bytes32 receiver.Unique identifier for the transaction
Target chain identifier
Receiver address in bytes32 format