EatTheBlocks Forum

Cannot read property 'address' of undefined

when running “node run-arbitrage.js” for course “Profitable Flashloans” I and getting “(node:81288) UnhandledPromiseRejectionWarning: TypeError: Cannot read property ‘address’ of undefined”.

Also my “pragma solidity ^0.5.0;” is in red, is that fine? or did I import something incorrectly

You can ignore the red, it seems Visual Studio Code is configured with the wrong version of Solidity.
You need to deploy the smart contract to the Blockchain before running the script, you are missing one step.

1 Like