SwapRouter Contract
Contract Address: 0x7cDa4594a0989B24F9f19608A346381f4009D0D1
The SwapRouter contract is the primary entry point for executing trades on the DuckyDux platform. It is responsible for receiving swap requests, executing them through the appropriate venues, and ensuring that the user receives their tokens.
Etherscan:
View Contract on Etherscan
Core Functions
execute: This function takes a set of swap parameters and executes the trade. It is designed to handle complex, multi-path swaps that may involve multiple venues.executeBatch: Allows for the execution of multiple swaps in a single transaction.
Events
Swap: Emitted when a swap is successfully executed. It includes details about the input and output tokens and amounts.
Recommendation: For most use cases, we recommend using the DuckyDux Developer API instead of interacting with contracts directly. The API handles gas estimation, transaction signing, and provides better error handling.
The SwapRouter is designed to be highly efficient and secure, providing a reliable on-chain mechanism for executing trades.
Last updated on