ConfigurableFungibleToken is a smart contract built on Midnight Network that implements a configurable fungible token with ownership and access control.
This contract is deployed and executed on Midnight Network's Preprod testnet, leveraging Midnight's privacy-first blockchain infrastructure. Midnight Network enables private smart contracts using Zero Knowledge (ZK) proofs while maintaining transparency and security.
The ConfigurableFungibleToken contract provides:
- Token Creation: Initialize a new fungible token with:
- Custom token name
- Configurable initial supply
- Designated initial recipient
- Owner assignment
- Transfer: Send tokens between accounts
- Balance Checking: Query token balances
- Approval System: Allow third parties to spend tokens on your behalf
- Transfer From: Execute approved token transfers
- Mint: Create new tokens (owner only)
- Burn: Destroy tokens (owner only)
- Ownership Transfer: Change contract owner (owner only)
- Ownable Pattern: Role-based access control with a single owner
✅ Configurable Parameters
Define token name, initial supply, and owner at deployment time
✅ ERC-20 Style Interface
Standard fungible token operations familiar to blockchain developers
✅ Privacy on Midnight Network
Leverages Midnight's ZK proof system for enhanced privacy
✅ Owner-Based Access Control
Administrative operations protected by owner-only restrictions
✅ Zero Knowledge Circuits
Compiles to 12 optimized ZK circuits for efficient on-chain execution
The contract is deployed to Midnight Network's Preprod testnet using:
- Proof Server: Generates ZK proofs for transactions
- Private State Provider: Manages local contract state
- Indexer: Queries blockchain data
- Wallet SDK: Handles transaction signing and balance management
After deployment, the contract manages:
- Token name and metadata
- Total supply tracking
- Account balances
- Approved spending allowances
- Current owner address
- Language: Compact (Midnight's smart contract language)
- Network: Midnight Network (Preprod)
- Proof System: Zero Knowledge (ZK) proofs
- Wallet: Shielded + Unshielded wallet support
- Gas Token: DUST (Midnight's resource/gas token)
- Creating custom tokens on Midnight Network
- Privacy-preserving token transfers
- Decentralized finance (DeFi) building blocks
- Testing token functionality in private contexts