"let instance = await..." binds not the contract being called, but called "TruffleContract". #6000
Replies: 2 comments 1 reply
-
It sounds like you may be encountering an issue with the deployment of the MetaCoin contract using Truffle. Here are a few things you can try to fix the issue:
|
Beta Was this translation helpful? Give feedback.
-
This is not an issue with deployment, but rather how REPLs work. If you were to examine instance, you'd see it was bound to the deployed contract instance. Summary
=======
> Total deployments: 2
> Final cost: 0.001894367934056634 ETH
truffle(develop)> let instance = await MetaCoin.deployed()
undefined
truffle(develop)> instance.abi.length
5
truffle(develop)> // This shows that instance has content, and the deployment did in fact succeed. |
Beta Was this translation helpful? Give feedback.
-
I decided to start learning truffle using the documentation and quick start instructions posted on the site, but at the time of using the command in the console
let instance = await MetaCoin.deployed()
the console output "undefined", and writes to the instance TruffleContract.
How can this be fixed?
P.S. I'm sorry if I didn't attach important data, this is my first such request.
Beta Was this translation helpful? Give feedback.
All reactions