Tezos support in Truffle is experimental. Give it a spin, and help us out by filing issues on Github.

Creating a Tezos Project

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

The best way to create a project with Tezos is to start with the tezos-example Truffle Box. Truffle boxes are example applications and project templates, and we've built one specifically for Tezos.

  1. Create a new directory for your Truffle project:

    mkdir tezos-example
    cd tezos-example
  2. Download ("unbox") the tezos-example box:

    truffle unbox tezos-example

    Note: You can use the `truffle unbox ` command to download any of the other Truffle Boxes, though note that as of this writing, few exist for Tezos.

    Note: To create a bare Truffle project with no smart contracts included, use `truffle init`.

    Note: 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:

See the Writing LIGO Contracts section to get building!