jamesbachini / DEX-Arbitrage

Example arbitrage trading bot
GNU General Public License v3.0
615 stars 350 forks source link

call exception errors #31

Closed Fifi55555 closed 1 year ago

Fifi55555 commented 1 year ago

Hello, so I have been testing the code, it seems promising but, I get Call Exception errors.. I have made some research and it appears that such an error occurs when the ABI code of the deployed contract is not configured in the code of the bot( as stated here)

Where can I insert the abi code in this code ?

jamesbachini commented 1 year ago

You just need an interface for the Dex functions you are calling from the contract. There's an ABI for our contract but that shouldn't be the issue. Would you happen to be trying it with a DeX which isn't based on Uni v2? If so the function names and parameters may be different to the ones in the contract

Fifi55555 commented 1 year ago

Oh yes, my bad. Thanks that fixed it.

Although,

  1. How can i check a router address whether it is uni v2, apart from checking the dev docs, is there another way?

  2. Can i be able to upgrade my code to support uni v3 and how?

jamesbachini commented 1 year ago
  1. Take a look at the router address on etherscan, in the contract section under write functions you'll see the function name and parameters

  2. Yes you can, you just need to change some of the logic in the Arb.sol contract to execute for a different exchange. Plenty of examples on Github and in the Uniswap docs, which are very good, about how to do swaps in v3.