faucet
@example
• v1.0.0Token faucet protocol that mints custom tokens using password authentication
Faucet Protocol
A token faucet protocol that enables users to claim custom tokens (MyToken) using password-based authentication. This protocol demonstrates basic token minting mechanics in the TX3 ecosystem.
Features
- Password-protected minting: Secure token distribution using password verification
- Custom token support: Mints MyToken assets with configurable quantities
- Gas fee handling: Automatically manages transaction fees from user input
- Policy-based validation: Uses PasswordPolicy for secure token minting
How It Works
- Claim Process: Users provide a password and specify the token quantity to claim
- Validation: The protocol validates the password against the PasswordPolicy
- Minting: New MyToken assets are minted and sent to the requester
- Fee Management: Transaction fees are deducted from the provided gas input
Parameters
password
: Bytes - Authentication password for token claimingquantity
: Int - Amount of MyToken to mint and claim
Use Cases
- Development Testing: Distribute test tokens for dApp development
- Community Rewards: Controlled token distribution with access control
- Educational Examples: Learn about token minting and policy validation
This protocol serves as an excellent introduction to TX3 minting mechanisms and policy-based access control.
faucet
Published by
@example
Install
trix install example/faucet
Publication datePublished 10 months ago