Skip to content

defi-wonderland/aztec-standards

Repository files navigation

Aztec Standards

npm version

Aztec Standards is a comprehensive collection of reusable, standardized contracts for the Aztec Network. It provides a robust foundation of token primitives and utilities that support both private and public operations, empowering developers to build innovative privacy-preserving applications with ease.

Development

Prerequisite: Start an Aztec local network in a separate terminal:

aztec start --local-network

Tests: yarn test runs Noir and JS tests. JS tests expect the network to be running at http://localhost:8080 (or NODE_URL).

Benchmarks: yarn bench connects to the same running network.

Set NODE_URL to override the default (e.g. http://localhost:9000).

Table of Contents

Dripper Contract

The Dripper contract provides a convenient faucet mechanism for minting tokens into private or public balances. Anyone can easily invoke the functions to request tokens for testing or development purposes.

📖 View detailed Dripper documentation

Token Contract

The Token contract implements an ERC-20-like token with Aztec-specific privacy extensions. It supports transfers and interactions explicitly through private balances and public balances, offering full coverage of Aztec's confidentiality features.

We published the AIP-20 Aztec Token Standard to the forum. Feel free to review and discuss the specification there.

📖 View detailed Token documentation

Vault Contract

The Vault contract is a standalone yield-bearing vault that holds an underlying AIP-20 asset and issues AIP-20 share tokens to depositors. The vault and shares token are separate contracts — the vault manages deposit/withdraw/redeem logic while delegating share token operations (mint, burn, transfer) to an external AIP-20 Token contract configured with the vault as its minter.

We published the AIP-4626: Tokenized Vault Standard to the forum. Feel free to review and discuss the specification there.

📖 View detailed Vault documentation

NFT Contract

The NFT contract implements an ERC-721-like non-fungible token with Aztec-specific privacy extensions. It supports transfers and interactions through both private and public ownership, offering full coverage of Aztec's confidentiality features for unique digital assets.

📖 View detailed NFT documentation

Escrow Standard Contract & Library

The Escrow Standard contains two elements:

  • Escrow Contract: a minimal private contract designed to have keys with which authorized callers can spend private balances of tokens and NFTs compliants with AIP-20 and AIP-721, respectively.
  • Logic Library: a set of contract library methods that standardizes and facilitates the management of Escrow contracts from another contract, a.k.a. the Logic contract.

📖 View detailed Escrow documentation

To see examples of Logic contract implementations, such as a linear vesting contract or a clawback escrow contract, go to aztec-escrow-extensions.

Future Contracts

Additional standardized contracts (e.g., staking, governance, pools) will be added under this repository, with descriptions and function lists.

About

Comprehensive collection of reusable, standardized contracts for the Aztec Network

Resources

License

Stars

Watchers

Forks

Contributors