Creating a project

To use most platon truffle commands, you need to run them against an existing platon truffle project. So the first step is to create a platon truffle project.

You can create a bare project template, but for those just getting started, you can use platon truffle Boxes, which are example applications and project templates. We’ll use the MetaCoin box, which creates a token that can be transferred between accounts:

  1. Create a new directory for your platon truffle project:

    mkdir MetaCoin
    cd MetaCoin
  2. Download (“unbox”) the MetaCoin box:

    platon-truffle unbox metacoin


You can use the platon-truffle unbox <box-name> command to download any of the other platon truffle Boxes.


To create a bare platon truffle project with no smart contracts included, use platon-truffle init.


You can use an optional –force to initialize the project in the current directory regardless of its state (e.g. even if it contains other files or directories). This applies to both the init and unbox commands. Be careful, this will potentially overwrite files that exist in the directory.

Once this operation is completed, you’ll now have a project structure with the following items: