Dripper (Faucet) Service
Relevant source files
The following files were used as context for generating this wiki page:
The Dripper contract serves as a convenient faucet mechanism within the Aztec Standards ecosystem. Its primary purpose is to allow users to request and mint tokens into either private or public balances, facilitating testing and development activities on the Aztec Network. By providing a standardized interface for obtaining test assets, it empowers developers to experiment with privacy-preserving applications without the need for manual minting configurations.
The service is strictly designed for development and testing environments and is not intended for production use. It interacts directly with Token Contracts to perform minting operations for specified assets like WETH, DAI, and USDC.
Sources: README.md:12-14, src/dripper/README.md:3-7
Architecture and Integration
The Dripper service operates as a standalone contract that acts as a middleware for minting. It holds dependencies on the core token contract library and the standard Aztec framework.
Dependency Graph
The following diagram illustrates the package dependencies for the Dripper contract as defined in its project configuration.
Sources: src/dripper/Nargo.toml:7-9
Service Flow
The Dripper facilitates two primary data flows: public minting and private minting. When a user invokes a "drip" function, the contract sends a minting request to the target token address.
Sources: src/dripper/README.md:10-27
Functionality
The Dripper provides two main entry points, distinguished by the visibility of the resulting token balance. Both functions accept a u64 amount which is handled as a u128 internally to maintain compatibility with standard token balances.
Public Minting
The drip_to_public function mints tokens directly into the caller's public balance. This is useful for testing transparent interactions and public state transitions.
Private Minting
The drip_to_private function mints tokens into the caller's private balance. This utilizes Aztec's privacy features, resulting in the creation of private notes that are only spendable by the caller.
| Function | Type | Parameter | Description |
|---|---|---|---|
drip_to_public | #[public] | token_address | The AztecAddress of the target token |
amount | Amount to mint (u64) | ||
drip_to_private | #[private] | token_address | The AztecAddress of the target token |
amount | Amount to mint (u64) |
Sources: src/dripper/README.md:10-27
Deployment and Configuration
The Dripper is deployed at a static address in development environments to provide a consistent endpoint for tools and scripts. It is typically configured as the authorized "minter" for test tokens.
Known Deployments
In standard test environments, the Dripper is often the designated minter for common assets.
| Asset | Address | Minter (Dripper) |
|---|---|---|
| WETH | 0x2925...ab34 | 0x1dd7...e997 |
| DAI | 0x264f...2917 | 0x1dd7...e997 |
| USDC | 0x1d29...ee99 | 0x1dd7...e997 |
| Dripper | 0x1dd712303e81139c9ad77f15cd3a88a87946c5f821b78350bb9238122d9fe997 | N/A |
Sources: src/deployments.json:3-29
Build Process
The Dripper contract is compiled into Noir artifacts and then processed into JavaScript/TypeScript artifacts for use in testing suites. The build script inspects the contract JSON and prepares it for export.
# Example of how the dripper is processed during build
aztec inspect-contract target/dripper.json
cp -r target export/@defi-wonderland/aztec-standards/
Sources: scripts/build-package.sh:12-28
Usage Summary
To use the Dripper, a developer simply needs to know the address of the token they wish to receive. The contract simplifies the developer experience by abstracting the complexities of minter permissions and note encryption setup during the initial phase of development.
Warning: This contract is designed for development and testing environments only. Do not use in production.
Sources: src/dripper/README.md:7, src/dripper/README.md:30-34