Router
CanaryXSwap is based on Uniswap v2. Read the Uniswap v2 documentation. For more in-depth information on the core contract logic, read the Uniswap v2 Core whitepaper.
Contract info
Contract name: DEXRouter
Contract address: 0x1CF1AFbD46A9bB1e584Da39A9205193169A7A2c7
View the CanaryXSwap: Router contract on Flare Songbird Explorer.
Read functions
WETH
function WETH() external pure returns (address);
Returns the canonical address for Wrapped Songbird: wSGB token (WETH being a vestige from Ethereum network origins).
factory
function factory() external pure returns (address);
Returns the canonical address for CanaryX Factory.
getAmountOut
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut);
getAmountIn
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn);
getAmountsOut
function getAmountsOut(uint amountIn, address[] memory path) internal view returns (uint[] memory amounts);
getAmountsIn
function getAmountsIn(uint amountOut, address[] memory path) internal view returns (uint[] memory amounts);
quote
function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB);
Write functions
addLiquidity
Adds liquidity to a ERC20⇄ERC20 pool.
addLiquidityETH
Adds liquidity to a ERC20⇄WSGB pool.
removeLiquidity
Removes liquidity from a ERC20⇄ERC20 pool.
removeLiquidityETH
Removes liquidity from a ERC20⇄WSGB pool.
removeLiquidityETHSupportingFeeOnTransferTokens
Removes liquidity from a ERC20⇄WSGB for tokens that take a fee on transfer.
removeLiquidityETHWithPermit
Removes liquidity from a ERC20⇄WSGB and receives SGB, without pre-approval, via permit.
removeLiquidityETHWithPermitSupportingFeeOnTransferTokens
Removes liquidity from a ERC20⇄WSGB and receives SGB via permit for tokens that take a fee on transfer.
removeLiquidityWithPermit
Removes liquidity from a ERC20⇄ERC20, without pre-approval, via permit.
swapETHForExactTokens
Receive an exact amount of output tokens for as little SGB as possible.
swapExactETHForTokens
Receive as many output tokens as possible for an exact amount of SGB.
swapExactETHForTokensSupportingFeeOnTransferTokens
Receive as many output tokens as possible for an exact amount of SGB. Supports tokens that take a fee on transfer.
swapExactTokensForETH
Receive as much SGB as possible for an exact amount of input tokens.
swapExactTokensForETHSupportingFeeOnTransferTokens
Receive as much SGB as possible for an exact amount of tokens. Supports tokens that take a fee on transfer.
swapExactTokensForTokens
Receive as many output tokens as possible for an exact amount of input tokens.
swapExactTokensForTokensSupportingFeeOnTransferTokens
Receive as many output tokens as possible for an exact amount of input tokens. Supports tokens that take a fee on transfer.
swapTokensForExactETH
Receive an exact amount of ETH for as few input tokens as possible.
swapTokensForExactTokens
Receive an exact amount of output tokens for as few input tokens as possible.
Last updated