Skip to content

feat(address): show Kleros verified tag on address page#277

Merged
AugustoL merged 5 commits intodevfrom
feat/kleros-verified-tag
Mar 6, 2026
Merged

feat(address): show Kleros verified tag on address page#277
AugustoL merged 5 commits intodevfrom
feat/kleros-verified-tag

Conversation

@AugustoL
Copy link
Collaborator

@AugustoL AugustoL commented Mar 4, 2026

Description

Add live Kleros Address Tags (ATQ) support on the address page. When an Ethereum mainnet address is registered in the Kleros curated Address Tag registry, a clickable tag badge with the Kleros logo and public name is displayed next to the address type indicator, linking to the Kleros Curate item page. Also migrates REACT_APP_ENVIRONMENT to VITE_ENVIRONMENT for proper Vite compatibility.

Related Issue

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactoring
  • Performance improvement
  • Other (please describe):

Changes Made

  • Added KlerosService.ts with GraphQL query against the Kleros ATQ subgraph on The Graph, including 1-hour in-memory cache and Kleros Curate URL helpers
  • Added useKlerosTag hook that queries The Graph first and falls back to the metadata CDN (addresses/evm/{chainId}/{address}.json)
  • Added AddressMetadata interface and fetchAddress() function to MetadataService.ts for CDN fallback
  • Rendered a clickable tag badge in AddressHeader with Kleros logo, public name tag, and external link arrow
  • Passed klerosTag prop through all 5 display components (AccountDisplay, ContractDisplay, ERC20Display, ERC721Display, ERC1155Display) to AddressHeader
  • Added klerosVerifiedTooltip i18n key in both English and Spanish address locale files
  • Added .kleros-verified-tag and .kleros-logo CSS styles with Kleros purple branding
  • Added Kleros logo asset (public/kleros-logo.png)
  • Migrated REACT_APP_ENVIRONMENTVITE_ENVIRONMENT in home/index.tsx, networks.ts, subdomains.ts, AppContext.tsx, constants.ts, and vite.config.ts

Screenshots (if applicable)

Checklist

  • I have run npm run format:fix and npm run lint:fix
  • I have run npm run typecheck with no errors
  • I have run tests with npm run test:run
  • I have tested my changes locally
  • I have updated documentation if needed
  • My code follows the project's architecture patterns

Additional Notes

  • The Graph API key is a public key restricted to authorized domains, safe to include in source
  • The tag only appears for Ethereum mainnet addresses (chainId 1) registered in the Kleros ATQ registry
  • Falls back gracefully to the metadata CDN if The Graph query fails

Add source field support from explorer-metadata PR #11 to display
a "Verified by Kleros" tag next to addresses tagged by the Kleros
curated list.
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

🚀 Preview: https://pr-277--openscan.netlify.app
📝 Commit: c40524fac204e3a3c3312e5a398d11660708979b

AugustoL added 4 commits March 4, 2026 16:39
- Add KlerosService with GraphQL query against Kleros ATQ subgraph
- Add useKlerosTag hook with fallback to metadata CDN
- Show Public Name Tag as clickable link to Kleros Curate item
- Add Kleros logo to tag badge
- Migrate REACT_APP_ENVIRONMENT to VITE_ENVIRONMENT
- Inject VITE_THE_GRAPH_API_KEY in CI workflows
AugustoL added a commit that referenced this pull request Mar 5, 2026
- Add useEtherscan hook fetching from Etherscan V2 API (single key, 60+ chains)
- Add useContractVerification hook running Sourcify and Etherscan simultaneously;
  source is an array — empty means unverified, ["sourcify"], ["etherscan"], or both
- Replace useSourcify calls in ContractDisplay, ERC20Display, ERC721Display,
  ERC1155Display with useContractVerification; add proxy detection to ERC721/ERC1155
- Show Sourcify and Etherscan as linked tag badges on the status row in
  ContractInfoCard, following the same style as Kleros tags (PR #277)
- Compute verification URLs internally in ContractInfoCard (correct partial_match
  path for Sourcify; per-chain explorer URL for Etherscan); remove sourcifyUrl prop
- Add Etherscan API key field to Settings (after Alchemy, before AI keys)
- Add etherscan key to ApiKeys type and all 5 locale files
- Fix double separator between EVM Version and Contract Details rows
@AugustoL AugustoL requested a review from MatiasOS March 6, 2026 13:59
Copy link
Member

@MatiasOS MatiasOS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is missing some locale translation too

@AugustoL AugustoL merged commit 727b28e into dev Mar 6, 2026
6 of 8 checks passed
@AugustoL AugustoL deleted the feat/kleros-verified-tag branch March 11, 2026 19:05
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.

2 participants