EatTheBlocks Forum

Can someone help me. running arbitrage.js gives me this error

(node:2209) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'address' of undefined
    at init (/Users/olgacastillo1/floans/run-arbitrage.js:29:35)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
(node:2209) 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(). (rejection id: 1)
(node:2209) [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.

Have you deployed the contract yet ? If not thats what its askin for. Its saying that it cannot read a address that the flashloan method will be called onto.

@Batman I am having the same issue even after getting it deployed trying to figure out how to hard code or put it in the flashloan.json file. do you use the contract address or the ether block address. I hard coded it in the arbitrage.js file because when I added this code
“networks”: [

    {"address": "0x9a9e56ddb6e31e026f80b13d59410bebbc1ce"}


to the flashloan.json file it still gave the same error

normally you would want truffle to do that for you. Im not sure that will work