Summary
This issue tracks all remaining ERC-20 / ERC-721 naming references that were not fully cleaned up as part of #2267 (Refactor/dispute-kit-registry). The gate token is now NFT-only, so every identifier, file name, enum value, translation key, and UI string that still references ERC-20 or the combined ERC-20/ERC-721 terminology must be updated.
Full Scope
1. File rename
| Current path |
Suggested new path |
web/src/components/DisputeFeatures/Features/GatedErc20.tsx |
GatedNFT.tsx (or GatedErc721.tsx) |
2. Enum value — web/src/dispute-kits/types.ts
Features.GatedErc20 = "gatedErc20" → Features.GatedNFT = "gatedNFT" (or GatedErc721)
- Update every reference to
Features.GatedErc20 throughout the codebase (see below)
3. Component & symbol renames — web/src/components/DisputeFeatures/Features/GatedErc20.tsx
- Component name
GatedErc20 → GatedNFT
- Default export on the last line
- Import +
FeatureUIs map entry in web/src/components/DisputeFeatures/Features/index.tsx (lines 15 and 53)
4. Hook & constant renames — web/src/hooks/useTokenAddressValidation.ts
ERC20_ERC721_ABI → ERC721_ABI / NFT_ABI
- Exported hook
useERC20ERC721Validation → useNFTValidation (or useERC721Validation)
- JSDoc on that hook: still says "valid ERC20 or ERC721 token" — update to "valid NFT (ERC-721)"
tokenType: "ERC-20 or ERC-721" (line 85) → tokenType: "NFT"
- Update the caller in
GatedErc20.tsx (line 46) once hook is renamed
5. Inline UI strings — web/src/components/DisputeFeatures/Features/GatedErc20.tsx
- Line 52:
"Validating ERC-20 or ERC-721 token..." → "Validating NFT..."
- Line 54:
"Valid ERC-20 or ERC-721 token" → "Valid NFT"
6. Translation key renames — all locale files (en, es, fr)
- Key
features.jurors_owning_erc20 → features.jurors_owning_nft
- Update all call-sites that reference this translation key
7. Features.GatedErc20 references in other modules
| File |
Lines |
web/src/dispute-kits/disputeFeature.ts |
Lines 18, 59 |
web/src/dispute-kits/registry.ts |
Lines 65, 79 |
8. Test description string — web/src/dispute-kits/prepareArbitratorExtradata.test.ts
- Line 37:
it("encodes gated ERC20 dispute kit data", ...) → it("encodes gated NFT dispute kit data", ...)
Context
Raised in PR #2267 by @kyrers who observed that an ERC-20 address still passes the balanceOf-based validation (since the ABI signature is identical for ERC-20 and ERC-721). @tractorss noted that a precise check via ERC-165 supportsInterface would tighten this but is out of scope, and that once the whitelist from #2246 is enforced the token-type validation may become redundant entirely.
Related
Summary
This issue tracks all remaining ERC-20 / ERC-721 naming references that were not fully cleaned up as part of #2267 (Refactor/dispute-kit-registry). The gate token is now NFT-only, so every identifier, file name, enum value, translation key, and UI string that still references ERC-20 or the combined ERC-20/ERC-721 terminology must be updated.
Full Scope
1. File rename
web/src/components/DisputeFeatures/Features/GatedErc20.tsxGatedNFT.tsx(orGatedErc721.tsx)2. Enum value —
web/src/dispute-kits/types.tsFeatures.GatedErc20 = "gatedErc20"→Features.GatedNFT = "gatedNFT"(orGatedErc721)Features.GatedErc20throughout the codebase (see below)3. Component & symbol renames —
web/src/components/DisputeFeatures/Features/GatedErc20.tsxGatedErc20→GatedNFTFeatureUIsmap entry inweb/src/components/DisputeFeatures/Features/index.tsx(lines 15 and 53)4. Hook & constant renames —
web/src/hooks/useTokenAddressValidation.tsERC20_ERC721_ABI→ERC721_ABI/NFT_ABIuseERC20ERC721Validation→useNFTValidation(oruseERC721Validation)tokenType: "ERC-20 or ERC-721"(line 85) →tokenType: "NFT"GatedErc20.tsx(line 46) once hook is renamed5. Inline UI strings —
web/src/components/DisputeFeatures/Features/GatedErc20.tsx"Validating ERC-20 or ERC-721 token..."→"Validating NFT...""Valid ERC-20 or ERC-721 token"→"Valid NFT"6. Translation key renames — all locale files (
en,es,fr)features.jurors_owning_erc20→features.jurors_owning_nft7.
Features.GatedErc20references in other modulesweb/src/dispute-kits/disputeFeature.tsweb/src/dispute-kits/registry.ts8. Test description string —
web/src/dispute-kits/prepareArbitratorExtradata.test.tsit("encodes gated ERC20 dispute kit data", ...)→it("encodes gated NFT dispute kit data", ...)Context
Raised in PR #2267 by @kyrers who observed that an ERC-20 address still passes the
balanceOf-based validation (since the ABI signature is identical for ERC-20 and ERC-721). @tractorss noted that a precise check via ERC-165supportsInterfacewould tighten this but is out of scope, and that once the whitelist from #2246 is enforced the token-type validation may become redundant entirely.Related