I'm trying to test a contract with Truffle beta (because of the new web3 1.0.0 support).
When i try to create the contract object by using Contract = artifacts.require("Contract"); contract = Contract.at(Contract.address);
and subsequently logging console.log(contract)
it returns a pending promise.
I read the release notes and under 'breaking changes' it says that the .at
function is now async. But when I try to prefix await
to contract = await Contract.at(Contract.address);
I get an error saying that the at
function is in fact not async.
I noticed this error when I tried to call a function with contract.methods.myFunction(argument).call()
and there was an error saying there is no 'methods' for undefined.
Has anyone experienced the same problem?