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.
- Create a new directory for your Truffle project:
mkdir tezos-example
cd tezos-example
- Download ("unbox") the
tezos-example
box:
truffle unbox tezos-example
Note: You can use the `truffle unbox
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:
contracts/
: Directory for LIGO contractsmigrations/
: Directory for scriptable deployment filestest/
: Directory for test files for testing your application and contractstruffle-config.js
: Truffle configuration file, configured specifically for Tezos
Ready to write some contracts?¶
See the Writing LIGO Contracts section to get building!