When executing the command

truffle(develop)> let instance = await MetaCoin.deployed()

How does truffle get the address of the contract that is deployed ?


The address is stored in the build/contracts/MetaCoin.json file under the networks section. Truffle puts the address there when you deploy the contract. You can also manually add addresses to the networks section and Truffle with recognize them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.