flashloan-box
flashloan-box copied to clipboard
Throwing SyntaxError on await.
Step 8 in the docs,
let f = await Flashloan.deployed() await f.flashloan(RESERVE_ADDRESS)
no matter how i enter that (with the proper address), it returns
SyntaxError: await is only valid in async function
at new Script (vm.js:83:7)
at Object.createScript (vm.js:277:10)
at Object.file (/usr/local/lib/node_modules/truffle/build/webpack:/packages/require/require.js:93:1)
at Object.exec (/usr/local/lib/node_modules/truffle/build/webpack:/packages/require/require.js:121:1)
at Promise (internal/util.js:274:30)
at new Promise (
Im running truffle with multipass on windows 10 no install issues or anything
ubuntu@primary:~/flashloan-aave-box/flashloan-box$ sudo truffle console --network kovan truffle(kovan)> migrate --reset
Compiling your contracts...
- Fetching solc version list from solc-bin. Attempt #1
truffle(kovan)> let f = await Flashloan.deployed() && await f.flashloan(0xFf795577d9AC8bD7D90Ee22b6C1703490b6512FD)
Thrown:
ReferenceError: Flashloan is not defined
at evalmachine.