Skip to content

feat(chains): add Zetrix L2 Testnet (chainId 938748) - #152

Open
armmarov wants to merge 1 commit into
TrustVC:mainfrom
armmarov:feat/add-zetrix-l2-testnet
Open

feat(chains): add Zetrix L2 Testnet (chainId 938748)#152
armmarov wants to merge 1 commit into
TrustVC:mainfrom
armmarov:feat/add-zetrix-l2-testnet

Conversation

@armmarov

@armmarov armmarov commented Jul 20, 2026

Copy link
Copy Markdown

What

Adds Zetrix L2 Testnet (EVM, chainId 938748, native currency ZETRIX2, 18 decimals) to the supported-chains registry so TrustVC-based issuers/verifiers can validate transferable records (eBL) issued on the chain out of the box, without a runtime registerChain shim.

Changes

  • src/utils/supportedChains/index.tsCHAIN_ID.zetrixL2Testnet = '938748' + SUPPORTED_CHAINS entry (label, type test, currency ZETRIX2, RPC, explorer, nativeCurrency).
  • src/utils/network/index.ts — add zetrixL2Testnet to networks and ZETRIX2 to networkCurrency.
  • src/utils/static/icons.ts — chain icon (currently a placeholder SVG; happy to swap in the official Zetrix brand asset before merge — just let me know the preferred source).
  • src/utils/supportedChains/supportedChains.test.ts — test coverage for the new entry.

Details

Tests

npx vitest --run src/utils/supportedChains/supportedChains.test.ts15 passed (incl. the new zetrixL2Testnet case).

Summary by CodeRabbit

  • New Features

    • Added support for the Zetrix L2 test network.
    • Added Zetrix network details, including chain identification, ZETRIX2 currency, RPC access, block explorer links, and network icon.
  • Tests

    • Added coverage to verify the Zetrix L2 network configuration.

Adds Zetrix L2 Testnet (EVM, chainId 938748, native ZETRIX2, 18 decimals) so TrustVC-based
verifiers can validate transferable records / eBL issued on the chain out of the box.

- CHAIN_ID.zetrixL2Testnet = '938748' + SUPPORTED_CHAINS entry
- networkName 'zetrixL2Testnet' + networkCurrency 'ZETRIX2'
- placeholder chain icon (to be replaced with the official Zetrix asset)
- test coverage for the new entry

RPC https://z2-test-node.zetrix.com, explorer https://z2-test-explorer.zetrix.com (EIP-3091).
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds Zetrix L2 testnet support by defining its network and currency, exporting a placeholder icon, registering chain ID 938748 with RPC and explorer metadata, and adding configuration tests.

Changes

Zetrix L2 testnet support

Layer / File(s) Summary
Network and icon contracts
src/utils/network/index.ts, src/utils/static/icons.ts
Adds zetrixL2Testnet, the ZETRIX2 currency literal, and a placeholder iconZetrix export.
Chain registration and validation
src/utils/supportedChains/index.ts, src/utils/supportedChains/supportedChains.test.ts
Registers chain ID 938748 with Zetrix metadata, RPC and explorer URLs, native currency details, and corresponding assertions.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: manishdex25

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding Zetrix L2 Testnet support with chainId 938748.
Description check ✅ Passed The description covers the summary, changes, details, and tests; only the template's Issues section is missing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/utils/static/icons.ts (1)

16-18: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Reminder: Replace the placeholder icon before merge.

The comment indicates that this placeholder SVG should be replaced with the official Zetrix brand asset before or at merge. Please ensure this is updated before the PR is completed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/utils/static/icons.ts` around lines 16 - 18, The iconZetrix export
currently uses a placeholder SVG; replace its data URI with the official Zetrix
brand asset while preserving the existing export and usage contract.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/utils/static/icons.ts`:
- Around line 16-18: The iconZetrix export currently uses a placeholder SVG;
replace its data URI with the official Zetrix brand asset while preserving the
existing export and usage contract.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 39202072-ce1c-4e23-8dc7-bb1aa27c83f7

📥 Commits

Reviewing files that changed from the base of the PR and between 7598cd1 and c3e415e.

📒 Files selected for processing (4)
  • src/utils/network/index.ts
  • src/utils/static/icons.ts
  • src/utils/supportedChains/index.ts
  • src/utils/supportedChains/supportedChains.test.ts

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