Running NormalSwap and FlashSwap errorSee original GitHub issue
I tried to redo the whole process which is nicely detailed but i’m fucking up somehow
I’m getting the following error, I noticed the arbitrager contract and utils contracts weren’t the same as what we have to put on .env, but even then there is no difference, I tried with both the ones in the guide and ones listed when we deploy them
Also, i’m not sure if it could be related, but I noticed when going through files that in few contracts (Such as Arbitrager.json under ./build/contracts) have sourcepath that leads somewhere else ?
Ex : “sourcePath”: “/home/sammy/ropsten/contracts/Arbitrager.sol”, “absolutePath”: “/home/sammy/ropsten/contracts/Arbitrager.sol”
“Error: Returned values aren’t valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.
at ABICoder.decodeParametersWith (/home/js/uniswap-sushiswap-arbitrage-bot/node_modules/web3-eth-abi/lib/index.js:298:15)
at ABICoder.decodeParameters (/home/js/uniswap-sushiswap-arbitrage-bot/node_modules/web3-eth-abi/lib/index.js:285:17)
at Contract._decodeMethodReturn (/home/js/uniswap-sushiswap-arbitrage-bot/node_modules/web3-eth-contract/lib/index.js:470:22)
at Method.outputFormatter (/home/js/uniswap-sushiswap-arbitrage-bot/node_modules/web3-eth-contract/lib/index.js:760:42)
at Method.formatOutput (/home/js/uniswap-sushiswap-arbitrage-bot/node_modules/web3-core-method/lib/index.js:147:54)
at sendTxCallback (/home/js/uniswap-sushiswap-arbitrage-bot/node_modules/web3-core-method/lib/index.js:523:33)
at Object.callback (/home/js/uniswap-sushiswap-arbitrage-bot/node_modules/web3-core-requestmanager/lib/index.js:308:9)
at Array.forEach (
--unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:3946) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.”
- Created 2 years ago
- Comments:6 (1 by maintainers)
Top GitHub Comments
@6eer Nice tutorial. A newbie developer here who has learnt a lot from your work.
In running the bots, I faced the same bugbear as highlighted by The-WiZaX. Don’t think it’s a gas issue as I’ve tried different gas fees but the both bots could not be deployed. Have you managed to resolve the issue?
I found the bug. its actually inside asyncsVar() function, it tries to get pair address from remote chain where it doesn’t exist because demo_environment.js script doesn’t deploy on remote blockchain but local one!. so it wont find anything related to router or factory which we have provided!!!. I have modified the code which I have forked onto my github repo: https://github.com/tur461/arbitrage-bot_sma please have a check! just mention inside .env file these things: MNEMONIC of the hd wallet — like metamask MORALIS_TOKEN ------ you will get from creating a free account in moralis