Aztec Boilerplate

Introducing the Aztec Boilerplate

We’ve just released a clean starter template to help you get building on Aztec faster. The aztec-boilerplate includes everything you need to start developing privacy-preserving smart contracts while applying the most up-to-date industry standards.

What’s included

The boilerplate includes a Counter Contract written in Noir that shows private-to-public execution and owner access control. The key examples are:

  • Owner Initialization: Sets an owner’s address for restricted actions.
  • Counter Management: Functions to increment and retrieve the counter value, demonstrating privacy-preserving state changes.

It integrates with the Aztec.js SDK for TypeScript bindings and utilities, enabling easy contract interaction.

Testing Suite

A full test suite with Noir unit tests and TypeScript integration tests using Jest is included. To run tests use the following commands:

// Run all tests
yarn test

// Run noir tests
yarn test:nr

// Run js tests
yarn test:js

Automated benchmarking

Using the Aztec Benchmark CLI, Automated benchmarking measures performance metrics like Gates, DA Gas, and L2 Gas, with GitHub Actions comparing metrics across pull requests.

Whenever you push a commit to a PR, the action will run benchmarks and compare the metrics, and as a result, it will comment a table showing the difference in metrics between the base branch and your current PR. Allowing developers to optimize their code and build efficient applications.

You can also run the benchmark locally (it currently doesn’t generate the comparison table, but it will soon!).

yarn benchmark

Whether you are learning Aztec, participating in a hackathon, prototyping something fast, or starting the next revolutionary project for Aztec, the boilerplate is the best starting pack for it!

Get started

Visit the Aztec Boilerplate Repository to start building privacy-preserving applications. Drop your projects or questions below!

Built with <3 by Wonderland

7 Likes