diff --git a/config.json b/config.json index 487a80a1..7b655fdb 100644 --- a/config.json +++ b/config.json @@ -648,6 +648,7 @@ "routeProcessor3Address": "0xfc506AaA1340b4dedFfd88bE278bEe058952D674", "routeProcessor3_2Address": "0x09bD2A33c47746fF03b86BCe4E885D03C74a8E8C", "uniV2Router02Address": "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506", + "uniV2Router02HardcodedAddress": "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506", "zeroEx": { "apiUrl": "https://arbitrum.api.0x.org/", "proxyAddress": "0xdef1c0ded9bec7f1a1670819833240f027b25eff" diff --git a/src/modes/suniv2.js b/src/modes/suniv2.js index 71075d23..36cf3bdf 100644 --- a/src/modes/suniv2.js +++ b/src/modes/suniv2.js @@ -387,7 +387,7 @@ async function checkArb( signer, config.uniV2Router02Address, fromToken.address, - "1" + "0".repeat(config.nativeWrappedToken.decimals), + maximumInput.toString(), toToken.address, toToken.decimals ); diff --git a/src/modes/univ2Hardcoded.js b/src/modes/univ2Hardcoded.js index 4ea401dc..1aadb76c 100644 --- a/src/modes/univ2Hardcoded.js +++ b/src/modes/univ2Hardcoded.js @@ -384,9 +384,9 @@ async function checkArb( const amountOut = await getAmountOutFlareSwap( signer, - config.uniV2Router02Address, - fromToken.address, - "1" + "0".repeat(config.nativeWrappedToken.decimals), + config.uniV2Router02HardcodedAddress, + config.nativeWrappedToken.address, + maximumInputFixed.mul("1" + "0".repeat(config.nativeWrappedToken.decimals)).div(ethers.utils.parseEther(ethPrice)), toToken.address, toToken.decimals );