0x89cA9E23256a3667a1d859Fef2784d8a345aFb22
Explorer: https://coston2-explorer.flare.network/address/0x89cA9E23256a3667a1d859Fef2784d8a345aFb22
This project is a decentralized on-chain random password generator built on the Flare Coston2 Testnet.
It interacts with a deployed smart contract that generates and stores a random hex-encoded password on-chain.
Users can connect their wallet, view the currently stored password, and regenerate a fresh one with a single transaction.
The generated passwords are fully trustless, tamper-proof, and verifiable directly on the blockchain.
Fetches the current password stored in the contract via getPassword().
Triggers the contract’s regenerate() function to create a brand new on-chain password.
Automatically reads the on-chain value from passwordLength().
Ensures only connected users can interact with the contract.
Shows:
- Transaction hash
- Pending status
- Confirmation status
- Error handling
Built with:
- Next.js / React
- TailwindCSS
- viem + wagmi
Traditional password generation relies on:
- Centralized services
- Browsers
- Client-side randomness that can be tampered with
This project replaces that with fully on-chain randomness, providing:
Passwords cannot be altered or predicted by external systems.
Every generated password emits an event and is verifiable on the explorer.
The password is always accessible on-chain—no backend required.
Uses smart contract logic instead of centralized servers.
- Generating random keys for blockchain demos
- Educational tools showing contract interaction
- Proof-of-concept for decentralized randomness
- Wallet-generated secure secrets
- Building more advanced authentication or secret-sharing systems
This repository includes complete frontend integration with wagmi + viem, ensuring a smooth developer and user experience.