jamesbachini / DEX-Arbitrage

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

Cannot read properties of undefined (reading 'routes') #32

Closed Devilla closed 1 year ago

Devilla commented 1 year ago

I can deploy the contract locally, but when I try to run this step: npx hardhat run .\scripts\trade.js I get this error:

console.log(`Loaded ${config.routes.length} routes`);
                             ^
TypeError: Cannot read properties of undefined (reading 'routes')
    at Object.<anonymous> (C:\Users\Lenovo\work\bots\dex-arbitrage\scripts\trade.js:10:30)
    at Module._compile (node:internal/modules/cjs/loader:1218:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
    at Module.load (node:internal/modules/cjs/loader:1081:32)
    at Function.Module._load (node:internal/modules/cjs/loader:922:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47
jamesbachini commented 1 year ago

Did you edit the config file?

Devilla commented 1 year ago

Did you edit the config file?

No, I'll check and update.

Devilla commented 1 year ago

Did you edit the config file?

Okay, it's working now. Do you have deployed the arbContract address on the Aurora network that you can share, since I'm unable to deploy the contract it is stuck on deployment for the Aurora network.