Closed saarshah closed 4 years ago
I have followed this tutorial , following command give error
await contract.deploy({arguments: [254]}).send({ from: '0xbbd9e9be525ab967e633bcdaeac8bd5723ed4d6b', gas: 100000000, gasPrice: 819 }); // deploy contract by `send`
Error: SyntaxError: await is only valid in async function
const bn = new BN(10) gives error, ReferenceError: BN is not defined
const bn = new BN(10)
@saarshah ,Async () function returns the object is a Promise, so can't use the outermost layers in await get its return value, you should use the original way, then () chain to deal with this Promise。
I have followed this tutorial , following command give error
Error: SyntaxError: await is only valid in async function
const bn = new BN(10)
gives error, ReferenceError: BN is not defined