This contract allow everyone to swap on sushiswap and to send the result to another chain by using LayerZero and Stargate in one transaction.
This contract has been deployed on multiple network, listed above :
This function must be used if you want to swap an ERC20 token against USDC, USDT, BUSD ( on BSC ) or STG. The parameters are listed above :
Parameters | Value |
---|---|
amount (uint256) | The quantity that you want to swap |
route (address[]) | The route used on sushiswap |
minAmount (uint256) | The minimum you want to receive |
chainID (uint16) | The recipient chainID |
srcPoolID (uint256) | The pool ID used on the current network |
dstPoolID (uint256) | The pool ID used on the recipient network |
target (address) | The recipient address |
slippageStargate (uint256) | The maximum slippage in percentage |
chainID, srcPoolID and dstPoolID can be found here : https://stargateprotocol.gitbook.io/stargate/developers/contract-addresses/mainnet
This function must be used if you want to swap a native token ( Ethereum, Matic..) against USDC, USDT, BUSD ( on BSC ) or STG.
The parameters are listed above :
Parameters | Value |
---|---|
amount (uint256) | The quantity that you want to swap |
route (address[]) | The route used on sushiswap |
minAmount (uint256) | The minimum you want to receive |
chainID (uint16) | The recipient chainID |
srcPoolID (uint256) | The pool ID used on the current network |
dstPoolID (uint256) | The pool ID used on the recipient network |
target (address) | The recipient address |
slippageStargate (uint256) | The maximum slippage in percentage |
chainID, srcPoolID and dstPoolID can be found here : https://stargateprotocol.gitbook.io/stargate/developers/contract-addresses/mainnet
Because we are never careful enough, if someone send tokens directly to the contract, the owner has the possibility to send them back by using this function.
Parameters | Value |
---|---|
mode (uint256) | The mode ( 1: ERC20 token - 2: Native token ) |
token (address[]) | The token to send ( put 0x0000000000000000000000000000000000000001 for native token ) |
amount (uint256) | The quantity to send |
recipient (address) | Recipient address |
sushiswap : https://app.sushi.com/
layerZero : https://layerzero.network/
stargate : https://stargate.finance/