Nachoxt17 / Arbitrage-Bot-between-UniSwap-and-SushiSwap-with-FlashLoans

105 stars 54 forks source link

Cannot find ./abi folder and json #1

Open alvarheras opened 3 years ago

alvarheras commented 3 years ago

Hi, congratulations on this development

I'm trying to get it up and running so I can build on it.

I run into the problem that after successfully deploying my contract on the network. I throw the run command and it returns me that it cannot find the files inside the abi / folder. I don't know if I should fill this in manually. This is the mistake I take

ffvfvfvfvfvf

Still download json files to complete it but I'm afraid they are from other versions. These jsons inside abi / the ones I got from another repo, I'm afraid the versions and compilation don't match.

vffvvffvvvfvf

When I throw the first command

npx hardhat run scripts/deploy.js --network ropsten

vffvvfvfvfv

If I add the abi / xx.json manually the error that I find is this

vfvfvfvfvfvfvfvfvfvf

In the end, I think that the necessary .abi / will not be generated. Thanks for your time

alvarheras commented 3 years ago

I substituted the json imports against the interface folder. @Nachoxt17 ("Buen proyecto:), me gustaría aportar mis conocimientos de arbitrage cuando entienda el funcionamiento ")

But now I run into this error.

DAI Amount:_ 500
Bot started!
(node:10568) UnhandledPromiseRejectionWarning: Error: call revert exception (method="getPair(address,address)", errorSignature=null, errorArgs=[null], reason=null, code=CALL_EXCEPTION, version=abi/5.1.2)
    at Logger.makeError (C:\Proyecto\CryptoBestPlatform\Arbitrage-Bot-between-UniSwap-and-SushiSwap-with-FlashLoans\node_modules\@ethersproject\logger\lib\index.js:180:21)
    at Logger.throwError (C:\Proyecto\CryptoBestPlatform\Arbitrage-Bot-between-UniSwap-and-SushiSwap-with-FlashLoans\node_modules\@ethersproject\logger\lib\index.js:189:20)
    at Interface.decodeFunctionResult (C:\Proyecto\CryptoBestPlatform\Arbitrage-Bot-between-UniSwap-and-SushiSwap-with-FlashLoans\node_modules\@ethersproject\abi\lib\interface.js:289:23)
    at Contract.<anonymous> (C:\Proyecto\CryptoBestPlatform\Arbitrage-Bot-between-UniSwap-and-SushiSwap-with-FlashLoans\node_modules\@ethersproject\contracts\lib\index.js:329:56)
    at step (C:\Proyecto\CryptoBestPlatform\Arbitrage-Bot-between-UniSwap-and-SushiSwap-with-FlashLoans\node_modules\@ethersproject\contracts\lib\index.js:48:23)
    at Object.next (C:\Proyecto\CryptoBestPlatform\Arbitrage-Bot-between-UniSwap-and-SushiSwap-with-FlashLoans\node_modules\@ethersproject\contracts\lib\index.js:29:53)
    at fulfilled (C:\Proyecto\CryptoBestPlatform\Arbitrage-Bot-between-UniSwap-and-SushiSwap-with-FlashLoans\node_modules\@ethersproject\contracts\lib\index.js:20:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:10568) 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:10568) [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.

I have also had some contracts pending for more than 50 minutes: S

alvarheras commented 3 years ago

I still get the same error as before, it seems that it does not synchronize with the node or contract created since when calling the getpairs () function

Later it comes with null

I am also not very convinced by the fact that the abi version is removed in the error -> version = abi / 5.1.2

Nachoxt17 commented 3 years ago

I still get the same error as before, it seems that it does not synchronize with the node or contract created since when calling the getpairs () function

Later it comes with null

I am also not very convinced by the fact that the abi version is removed in the error -> version = abi / 5.1.2

I also have the same problems, I can't make it work either, and I don't deserve the merit because I just mixed code of other people. Here it is another similar bot made by other person that is actually finished but I can't make it work, if you can, come back and tell me how did you did it please. https://github.com/6eer/uniswap-sushiswap-arbitrage-bot

alvarheras commented 3 years ago

Understood, I proceed to put myself with it and had several other options in view. Thanks for answering