0

I have Truffle installed on an Ubuntu 14.04 LTS box. Here are my Truffle and Solidity version numbers:

Truffle v4.0.6 (core: 4.0.6)
Solidity v0.4.19 (solc-js)

I am following along the Blockgeeks "How To Learn Solidity" tutorial:

https://blockgeeks.com/guides/solidity/

After running Truffle init, that guide and other tutorials I have seen on the Web say I should have the following files in the directories created by the Truffle init command:

  • contracts\ConvertLib.sol
  • contracts\MetaCoin.sol
  • contracts\Migrations.sol

  • migrations\1_initial_migration.js

  • migrations\2_initial_migration.js

I only have the files marked in bold. The other files are missing. Does anyone know how I get the other files?

  • 1
    truffle unbox Metacoin is the new command...truffle init is depreccated. – Crissi Mariam Robert Mar 8 '18 at 17:54
  • @cmr Thanks, that did it. If you're so inclined, please change your comment to an answer and I'll upvote and accept. – Robert Oschler Mar 8 '18 at 18:00
  • Thank you for your motivation.Its really means a lot for a beginner like me. Thank you once again. – Crissi Mariam Robert Mar 9 '18 at 4:22
1

In truffle v4, truffle init is deprecated in favor of truffle unbox.

truffle unbox just creates the contracts/ and migrations/. directories and a blank truffle.js.

Inorder to unbox Metacoin use the following command. truffle unbox MetaCoin.

You can refer other boilerplates from the following link. http://truffleframework.com/boxes/

2

From Truffle 4.0.0, "init" only creates a bare environment. Quoting document here:

Speaking of boxes, truffle init now creates a bare Truffle project. If you'd like a specific example, try a box instead!

As cmr commented, Metacoin can be unboxed, see main site.

truffle unbox metacoin

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.