Skip to content

Running NormalSwap and FlashSwap error #2

Closed
@The-WiZaX

Description

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 /home/js/uniswap-sushiswap-arbitrage-bot/node_modules/web3-providers-ws/lib/index.js:114:45
at Array.forEach ()
at WebsocketProvider._onMessage (/home/js/uniswap-sushiswap-arbitrage-bot/node_modules/web3-providers-ws/lib/index.js:102:69)
at W3CWebSocket._dispatchEvent [as dispatchEvent] (/home/js/uniswap-sushiswap-arbitrage-bot/node_modules/yaeti/lib/EventTarget.js:115:12)
at W3CWebSocket.onMessage (/home/js/uniswap-sushiswap-arbitrage-bot/node_modules/websocket/lib/W3CWebSocket.js:234:14)
at WebSocketConnection. (/home/js/uniswap-sushiswap-arbitrage-bot/node_modules/websocket/lib/W3CWebSocket.js:205:19)
at WebSocketConnection.emit (events.js:314:20)
at WebSocketConnection.processFrame (/home/js/uniswap-sushiswap-arbitrage-bot/node_modules/websocket/lib/WebSocketConnection.js:554:26)
at /home/js/uniswap-sushiswap-arbitrage-bot/node_modules/websocket/lib/WebSocketConnection.js:323:40
(node:3946) UnhandledPromiseRejectionWarning: 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 /home/js/uniswap-sushiswap-arbitrage-bot/node_modules/web3-providers-ws/lib/index.js:114:45
at Array.forEach ()
at WebsocketProvider._onMessage (/home/js/uniswap-sushiswap-arbitrage-bot/node_modules/web3-providers-ws/lib/index.js:102:69)
at W3CWebSocket._dispatchEvent [as dispatchEvent] (/home/js/uniswap-sushiswap-arbitrage-bot/node_modules/yaeti/lib/EventTarget.js:115:12)
at W3CWebSocket.onMessage (/home/js/uniswap-sushiswap-arbitrage-bot/node_modules/websocket/lib/W3CWebSocket.js:234:14)
at WebSocketConnection. (/home/js/uniswap-sushiswap-arbitrage-bot/node_modules/websocket/lib/W3CWebSocket.js:205:19)
at WebSocketConnection.emit (events.js:314:20)
at WebSocketConnection.processFrame (/home/js/uniswap-sushiswap-arbitrage-bot/node_modules/websocket/lib/WebSocketConnection.js:554:26)
at /home/js/uniswap-sushiswap-arbitrage-bot/node_modules/websocket/lib/WebSocketConnection.js:323:40
(node:3946) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --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."

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions