This scaffold is a Taqueria project that demonstrates how to use TzCompose to automate your deployment pipelines with Taqueria. TzCompose is a powerful tool that allows you to define and execute complex workflows using simple YAML configurations.
This project focuses on deploying two contracts authored in LIGO, which you will find in the contracts/ directory:
-
Increment: A permissioned version of a contract that maintains an internal counter. The counter can be incremented or decremented using the provided entrypoints. This contract delegates permission checks to members of the Membership contract.
-
Membership: A contract that represents a membership system. Users can join the group by paying 1 tez.
The project comes pre-installed with the @taqueria/plugin-tzcompose
package and includes a tzcompose.yaml
file. You can execute the pipelines defined in this file using the command taq run tzcompose.yaml
.
The provided pipeline accomplishes the following:
- Deploy both contracts to the current Taqueria environment. By default, the environment is set to a Flextesa sandbox. Before executing the pipeline, make sure to run
taq start sandbox
, unless you've adjusted the environment configuration to deploy to a testnet or mainnet. The Increment contract will have a dependency on the Manager contract. - Add Bob as a member in the Manager contract.
- As Bob, call the increment entrypoint on the Increment contract, demonstrating that Bob has permissioned access.
- As Alice, call the increment entrypoint on the Increment contract, which will fail and demonstrate that Alice does NOT have permissioned access.
TzCompose is a versatile tool that simplifies the automation of various workflows on the Tezos blockchain. It allows you to write YAML files to configure pipelines consisting of different tasks, which can be executed with a single command across all Tezos networks. TzCompose even supports cloning contracts and transaction sequences between networks.
Some common use cases for TzCompose include:
- Smart contract deployment and maintenance
- Traffic generation for protocol and application testing
- Test-case setups
- Cloning contract deployments and setup logic between networks
Whether you're a dapp developer, protocol engineer, generative artist, or any other enthusiast building on Tezos, TzCompose will greatly streamline your development process.
TzCompose pipelines define a list of tasks that are processed in order, with each task producing a transaction. Some of the available tasks include:
batch
: Send multiple transactions as a single operationcall
: Send a smart contract calldelegate
: Delegate to a bakerdeploy
: Create a smart contractdouble_endorse
: Force a double endorsement slashregister_baker
: Register as a bakertoken_approve
: Approve a token spendertoken_revoke
: Revoke a token spendertoken_transfer
: Send token transfer(s)transfer
: Send tez transfer(s)undelegate
: Remove delegation from a bakerwait
: Wait for a condition
For more information on TzCompose and its usage, please refer to the official documentation.
To get started with this scaffold project:
- Create a project based on this scaffold:
taq new getting-started-tzcompose
- Start the Flextesa sandbox by running
taq start sandbox
. - Execute the TzCompose pipeline by running
taq run tzcompose.yaml
.
Feel free to explore the project structure, modify the contracts, and experiment with different TzCompose configurations to suit your needs.
We hope this scaffold project serves as a helpful starting point for your Taqueria and TzCompose journey!