This project enables eFrogs NFT holders on Linea to create ownership attestations via the Verax Attestation Registry. Initially developed during the Linea/eFrogs hackathon in April 2024 (2nd place), it is now available on Linea Mainnet.
π Demo: efrogs.alainnicolas.fr
This is a pnpm monorepo with two packages:
packages/
βββ contracts/ # Solidity smart contracts (Hardhat)
βββ frontend/ # React SPA (Vite + wagmi + Reown AppKit)
βββββββββββββββ ββββββββββββββββ βββββββββββββββββββ
β Frontend ββββββΆβ EFrogsPortal ββββββΆβ Verax Registry β
β (React) β β (Solidity) β β (Attestations) β
βββββββββββββββ ββββββββββββββββ βββββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββ ββββββββββββββββ
β User Wallet β β eFrogs NFT β
β (wagmi) β β Contract β
βββββββββββββββ ββββββββββββββββ
- User connects their wallet via Reown AppKit (WalletConnect)
- Frontend queries the eFrogs NFT contract for user's balance
- If balance > 0, user can create an attestation
- User pays 0.0001 ETH fee to the Portal
- Portal verifies ownership on-chain and creates a Verax attestation
- Attestation is stored with schema:
(address tokenContract, uint256 balance) - Attestation expires after 30 days
- Node.js >= 22.21.1 (see
.nvmrc) - pnpm >= 10
# Install the correct Node.js version
nvm use
# Install pnpm if not already installed
corepack enable
corepack prepare pnpm@latest --activate- Frontend: React 19 + TypeScript + Vite 7
- Smart Contracts: Solidity 0.8.21 + Hardhat 3
- Wallet Connection: wagmi v3 + viem v2 + Reown AppKit
- Attestations: Verax Attestation Registry
- Network: Linea (mainnet & Sepolia testnet)
- Deployment: Netlify
# Install dependencies
pnpm install
# Copy environment variables
cp packages/frontend/.env.example packages/frontend/.env
# Then edit .env with your API keys
# Start development server
pnpm dev| Variable | Description | Required |
|---|---|---|
VITE_WALLETCONNECT_PROJECT_ID |
WalletConnect Cloud Project ID | Yes |
VITE_INFURA_API_KEY |
Infura API Key for RPC | Yes |
VITE_GRAPH_API_KEY |
The Graph API Key | Yes |
| Variable | Description | Required |
|---|---|---|
INFURA_KEY |
Infura API Key | Yes |
PRIVATE_KEY |
Deployer private key (with 0x) | Yes |
ETHERSCAN_API_KEY |
Lineascan API Key for verification | Yes |
ROUTER_ADDRESS |
Verax Router address | For deployment |
EFROGS_ADDRESS |
eFrogs NFT contract address | For deployment |
pnpm dev # Start frontend dev server
pnpm lint # Run ESLint + Solhint on all packages
pnpm lint:fix # Auto-fix linting issues
pnpm format # Check Prettier formatting
pnpm format:fix # Auto-fix formatting
pnpm typecheck # TypeScript type checking
pnpm test # Run Hardhat testspnpm compile # Compile Solidity contracts
pnpm deploy:portal --network linea # Deploy portal to mainnet
pnpm deploy:portal --network linea-sepolia # Deploy portal to testnet
pnpm deploy:nft --network linea-sepolia # Deploy test NFT (testnet only)pnpm dev # Start dev server with HMR
pnpm build # Build for production
pnpm preview # Preview production build| Network | Address |
|---|---|
| Linea Mainnet | 0x194395587d7b169e63eaf251e86b1892fa8f1960 |
| Linea Sepolia | 0x35c134262605bc69B3383EA132A077d09d8df061 |
| Network | Address |
|---|---|
| Linea Mainnet | 0x5f47bCeB43B8114cf85d3Ac50e9850164dE2984e |
| Linea Sepolia | 0x407e280281B812Adef69A91230659C9D738D82Cb |
| Network | Schema ID |
|---|---|
| Linea Mainnet | 0x5dc8bc...d2f5 |
| Linea Sepolia | 0x5dc8bc...d2f5 |
Schema structure: (address tokenContract, uint256 balance)
To adapt this project for your own NFT collection:
Modify packages/contracts/src/EFrogsPortal.sol:
- Update constructor to accept your NFT contract address
- Adjust the
feeif needed (default: 0.0001 ETH) - Optionally create a new Verax schema for your data structure
# Set environment variables
export ROUTER_ADDRESS=0x... # Verax Router (see docs.ver.ax)
export EFROGS_ADDRESS=0x... # Your NFT contract
# Deploy
pnpm --filter contracts deploy:portal --network linea-sepoliaThe deploy script automatically:
- Deploys the portal contract
- Verifies on Lineascan
- Registers the portal with Verax
Update packages/frontend/src/utils/constants.ts:
EFROGS_CONTRACT/TESTNET_EFROGS_CONTRACT: Your NFT addressesPORTAL_ADDRESS/TESTNET_PORTAL_ADDRESS: Your portal addressesSCHEMA_ID: Your schema ID (if created new)- Subgraph URLs if using custom indexing
- Replace assets in
packages/frontend/public/ - Update styles in
packages/frontend/src/App.css
MIT License - see LICENSE for details.
Contributions are welcome! Feel free to open an issue or a pull request.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request