Skip to content

Feat/add web UI#1

Merged
tim-hm merged 33 commits intomainfrom
feat/add-web-ui
Jan 27, 2026
Merged

Feat/add web UI#1
tim-hm merged 33 commits intomainfrom
feat/add-web-ui

Conversation

@tim-hm
Copy link
Collaborator

@tim-hm tim-hm commented Jan 23, 2026

No description provided.

- forge-std v1.14.0
- openzeppelin-contracts v5.5.0
- Add GitHub Actions workflow for PRs (format, lint, build, test)
- Add solhint for Solidity linting with gas optimization rules
- Add fix:web and fix:contracts scripts
- Update README with dependencies and commands table
@tim-hm tim-hm marked this pull request as draft January 26, 2026 10:16
tim-hm added 18 commits January 26, 2026 11:40
- Read NIL_TOKEN_ADDRESS from environment (required)
- Add optional DRIP_AMOUNT and COOLDOWN_SECONDS with defaults
- Removes hardcoded token address for flexibility across networks
- Add docker-compose.yml with nil-anvil service
- Add deploy-faucet.sh script that waits for anvil, deploys faucet, funds it
- Add README with usage instructions and test account info
- Add wagmi config with Sepolia and Anvil chains
- Add contract ABI and address resolution per chain
- Add useFaucetStatus hook for reading faucet state
- Add useClaim hook for claim transactions
- Add FaucetCard component with claim flow UI
- Add shadcn/ui button and card components
- Update layout with RainbowKit and React Query providers
- Update page with FaucetCard and network switcher
- Add docker:up, docker:down, docker:deploy scripts
- Add .env.example with configuration docs
- Replace custom anvil chain definition with wagmi's built-in
- Hide ETH balance in ConnectButton (not relevant for faucet UX)
- Add contracts/ to oxlint ignorePatterns
- Replace unsafe type assertions with proper type guard
- Source .env file in deploy script if it exists
- If DEV_WALLET is set, fund that address with 10 ETH for gas
- Document DEV_WALLET in .env.example
- Track shown toasts by txHash to prevent spam on re-renders
- Use formatTimeRemaining for human-readable cooldown (e.g. "1m" instead of "0.016h")
- Add Nillion logo from nilpay
- Update primary color to Nillion indigo (#4f46e5)
- Add subtle grid background pattern
- Support light and dark mode with appropriate color variants
Replace faucet balance with user-centric stats: NIL balance, times
claimed, and last claimed timestamp. Add explorer links for faucet
and token contracts. Clean up gitignore and README formatting.
- Restructure card: balance hero, claim button, collapsible details
- Show network name in balance label ("on the Sepolia network")
- Hide header connect button when not connected (avoid duplication)
- Make Anvil network dev-only (NODE_ENV check)
- Soften card border and details divider (50% opacity)
- Add favicon using Nillion logo
- Update metadata description
Migrate from wagmi v2 to v3 API - useAccount is now useConnection.
- Move drip amount and cooldown into collapsible Details section
- Add polling interval (1s) to fix stuck transaction pending state
- Only show pending when txHash exists
- Use human readable durations ("1 minute" instead of "1m")
- Refetch canClaim when client-side countdown ends
- On Anvil only, override canClaim when cooldown timer reaches 0
  (block.timestamp doesn't advance without transactions)
- On real networks, trust contract's canClaim to avoid reverted txs
- Migrate useClaim to write.mutate() pattern (wagmi v3)
- Simplify UI text and remove redundant elements
- Consolidate countdown useEffects into single effect with proper cleanup
- Extract AddressLink component to eliminate duplicate anchor markup
- Add React.memo to ClaimButton for render optimization
- Move truncateAddress to format.ts and ANVIL_CHAIN_ID to contracts.ts
- Add JSDoc comments to useClaim and useFaucetStatus hooks
- Add SSR guard for window.open() in toast action
- Remove unused card component exports (CardTitle, CardAction, CardFooter)
- Remove debug console.log statement
- Improve WalletConnect project ID documentation
Document the full deployment workflow including environment variables,
forge script commands, frontend configuration, and admin functions.
Use the same background images and colors as bridge.nillion.network:
- Light mode: light gray with decorative background image
- Dark mode: deep purple with luminosity blend mode
- White title text to contrast against colorful backgrounds
@vercel
Copy link

vercel bot commented Jan 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
faucet-ui Ready Ready Preview, Comment Jan 27, 2026 2:49pm

Request Review

Instead of hardcoding token addresses per chain, read the TOKEN()
address directly from the faucet contract. This removes configuration
duplication since the faucet already knows its token.
Prevents showing a disabled claim button when data hasn't loaded yet
(e.g. when faucet is empty but canClaim hasn't returned yet).
- next 16.1.4 → 16.1.5
- react/react-dom 19.2.3 → 19.2.4
- viem 2.44.4 → 2.45.0
- oxlint 1.41.0 → 1.42.0
- pnpm 10.28.0 → 10.28.2
- Track loading state from both useReadContract (token) and
  useReadContracts (main data) to prevent flash of incomplete UI
- Show loading when waiting for token address to enable main query
- Fix ESLint no-unsafe-type-assertion by using proper type guards
  with 'in' operator and typeof checks for canClaim result
- Remove duplicate loading indicators from ClaimButton
- Add FaucetCardContent component to handle loading/error/ready states
- Show single card-level spinner while contract data loads
- Display user-friendly error message if contract read fails
@tim-hm tim-hm marked this pull request as ready for review January 27, 2026 14:50
@tim-hm tim-hm merged commit d561458 into main Jan 27, 2026
6 checks passed
@tim-hm tim-hm deleted the feat/add-web-ui branch January 27, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant