Closed jaydencobner closed 1 year ago
I think it's an error coming from Wannaswap saying that the amount you are trading is too low. Are you using the full amount including decimals? i.e 1 ETH = 1000000000000000000 gwei
Most tokens use 18 decimals as well so you can calculate using something like https://eth-converter.com
here is the full error message, it happens every loop for every dex and spams the terminal. i have about $20 worth of Aurora in contract to test with and no edits to the trading scripts have been made. does the contract owners wallet need aurora eth or aurora token for gas fee's?
Error: call revert exception; VM Exception while processing transaction: reverted with reason string "AuroraLibrary: INSUFFICIENT_INPUT_AMOUNT" [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="estimateDualDexTrade(address,address,address,address,uint256)", data="0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000284175726f72614c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e54000000000000000000000000000000000000000000000000", errorArgs=["AuroraLibrary: INSUFFICIENT_INPUT_AMOUNT"], errorName="Error", errorSignature="Error(string)", reason="AuroraLibrary: INSUFFICIENT_INPUT_AMOUNT", code=CALL_EXCEPTION, version=abi/5.7.0)
at Logger.makeError (/home/jayden/DEX-Arbitrage/node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
at Logger.throwError (/home/jayden/DEX-Arbitrage/node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
at Interface.decodeFunctionResult (/home/jayden/DEX-Arbitrage/node_modules/@ethersproject/abi/src.ts/interface.ts:427:23)
at Contract.
errorArgs: [ 'AuroraLibrary: INSUFFICIENT_INPUT_AMOUNT' ],
errorName: 'Error',
errorSignature: 'Error(string)',
address: '0x',
args: [
'0xA1B1742e9c32C7cAa9726d8204bD5715e3419861',
'0xa3a1ef5ae6561572023363862e238afa84c72ef5',
'0x5ce9F0B6AFb36135b5ddBF11705cEB65E634A9dC',
'0x4988a896b1227218e4a686fde5eabdcabd91571f',
BigNumber { value: "0" }
],
transaction: {
data: '0x068e7ca1000000000000000000000000a1b1742e9c32c7caa9726d8204bd5715e3419861000000000000000000000000a3a1ef5ae6561572023363862e238afa84c72ef50000000000000000000000005ce9f0b6afb36135b5ddbf11705ceb65e634a9dc0000000000000000000000004988a896b1227218e4a686fde5eabdcabd91571f0000000000000000000000000000000000000000000000000000000000000000',
to: '0x',
from: '0x***'
}
}
In config/aurora.json on lines 9-16 you'll have a number of baseAssets, remove any that aren't in the contract.
You'll also need some funds in the owner wallet to pay gas fees.
when i remove the unused base assets from aurora.json i get this error: SyntaxError: /home/jayden/DEX-Arbitrage/config/aurora.json: Unexpected token / in JSON at position 393
what funds are gas fee's paid with? Aurora ETH or Aurora token?
Sounds like the JSON isn't valid. Check if there is a comar at the end of the line with baseAssets and delete it. Use jsonlint website to check it's valid
I think aurora uses Eth as the native token but double check in their docs
I got it working, thanks! I just wanted to run it with one base asset for testing, I’m now finding trades every couple of hours which seem profitable, I am going to try other networks. could you explain how I add the routes, I noticed there are many pairs of routes I was wondering if I need the token contract pairs to correspond to trading pairs on those exchanges or if there was an easier way to populate the file, thanks again!
errorArgs: [ 'WannaSwapLibrary: INSUFFICIENT_INPUT_AMOUNT' ], errorName: 'Error', errorSignature: 'Error(string)',
its deployed on Aurora network and there is aurora eth and aurora token in contract owners wallet. there is aurora token in the contract as base currency to test every scan shows the same error