Skip to content

docs: point wallet setup at the GenLayer Chain RPC, not the GenLayer RPC - #514

Open
ygd58 wants to merge 1 commit into
genlayerlabs:mainfrom
ygd58:fix/networks-docs-wallet-endpoint
Open

ygd58 wants to merge 1 commit into
genlayerlabs:mainfrom
ygd58:fix/networks-docs-wallet-endpoint

Conversation

@ygd58

@ygd58 ygd58 commented Sep 11, 2026

Copy link
Copy Markdown

Summary

Fixes #486 — MetaMask's "Add network" flow validates via net_version, which the GenLayer RPC (rpc-bradbury.genlayer.com / rpc-asimov.genlayer.com) doesn't implement, only eth_chainId. The GenLayer Chain RPC (rpc.testnet-chain.genlayer.com) does implement net_version and works.

Verified live today against both, before making this change:

rpc-bradbury.genlayer.com net_version
  -> {"error":{"code":-32601,"message":"method not found: net_version"}}

rpc.testnet-chain.genlayer.com net_version
  -> {"result":"0x107d"}

Both report chain id 4221 (0x107d) via eth_chainId, and Bradbury/Asimov share the exact same GenLayer Chain RPC URL — so switching which endpoint the wallet buttons point at doesn't change which chain a reader ends up on, it only changes whether "Add network" actually succeeds.

Change

  • Reworded the intro paragraph — the "use either endpoint for standard wallet operations" sentence was the actual source of the bug reports. Replaced with explicit guidance: GenLayer Chain RPC for wallets, GenLayer RPC for CLI/SDKs/gen_* tooling.
  • Bradbury's and Asimov's <AddToWallet> buttons now point rpcUrls at rpc.testnet-chain.genlayer.com instead of their respective rpc-bradbury/rpc-asimov URLs. These buttons call MetaMask's wallet_addEthereumChain directly, so this was live, clickable, broken UI on the page, not just misleading prose.
  • Left Studionet's <AddToWallet> button alone — no evidence yet its RPC has the same net_version gap, and its rpcUrl is also its only real API endpoint (unlike Bradbury/Asimov, which have a separate Chain RPC to point wallets at instead).
  • Updated the "GenLayer Chain (L2)" section's intro to match — it previously said "you typically don't need this directly," which now contradicts the wallet setup instructions pointing here.

Out of scope

Fixing net_version on the GenLayer RPC itself needs genlayer-node access, which I don't have. Also worth flagging for whoever does: the Chain RPC's net_version currently returns the hex form ("0x107d") rather than the JSON-RPC spec's decimal string ("4221") — MetaMask tolerates the hex today per the issue, but other tooling may not.

Testing

Verified the file compiles with the real @mdx-js/mdx compiler.

Summary by CodeRabbit

  • Documentation
    • Updated network setup guidance to clarify wallet compatibility requirements.
    • Directed wallet configuration to the GenLayer Chain RPC and smart-contract tooling to the GenLayer RPC.
    • Updated Bradbury and Asimov “Add to wallet” buttons to use the GenLayer Chain RPC endpoint.

Fixes genlayerlabs#486. MetaMask's "Add network" validates via net_version, which
the GenLayer RPC (rpc-bradbury.genlayer.com / rpc-asimov.genlayer.com)
does not implement - only eth_chainId. The GenLayer Chain RPC
(rpc.testnet-chain.genlayer.com) does implement it and works. Verified
live today against both:

  rpc-bradbury.genlayer.com net_version
    -> {"error":{"code":-32601,"message":"method not found: net_version"}}
  rpc.testnet-chain.genlayer.com net_version
    -> {"result":"0x107d"}

Both report chain id 4221 (0x107d) via eth_chainId, and Bradbury/Asimov
share the exact same GenLayer Chain RPC URL - so switching which
endpoint the wallet buttons use doesn't change which chain a reader
ends up on, it just changes whether "Add network" actually succeeds.

Changes:
- Reworded the intro paragraph: the "use either endpoint for standard
  wallet operations" line was the actual source of the bug reports -
  replaced with "use GenLayer Chain RPC for wallets, GenLayer RPC for
  CLI/SDKs/gen_* tooling".
- Bradbury's and Asimov's <AddToWallet> buttons now point rpcUrls at
  rpc.testnet-chain.genlayer.com instead of their respective
  rpc-bradbury/rpc-asimov URLs. These buttons call MetaMask's
  wallet_addEthereumChain directly, so they were previously live,
  clickable, broken UI on this page - not just misleading prose.
  (Left Studionet's button alone; no evidence yet its RPC has the
  same gap, and its rpcUrl is also its only real API endpoint, unlike
  Bradbury/Asimov which have a separate reachable Chain RPC to point
  wallets at instead.)
- Updated the GenLayer Chain (L2) section's intro to match, since it
  previously said "you typically don't need this directly" while now
  being the one endpoint the wallet setup above actually depends on.

Out of scope (needs genlayer-node access, not something I can fix
here): implementing net_version on the GenLayer RPC itself, and the
Chain RPC's net_version currently returning the hex form ("0x107d")
rather than the JSON-RPC spec's decimal string ("4221") - MetaMask
tolerates the hex today per the issue, but it's worth flagging for
whoever eventually touches that RPC method.

Verified the file compiles with the real @mdx-js/mdx compiler.
@netlify

netlify Bot commented Sep 11, 2026

Copy link
Copy Markdown

Deploy Preview for genlayer-docs ready!

Name Link
🔨 Latest commit a3efef9
🔍 Latest deploy log https://app.netlify.com/projects/genlayer-docs/deploys/6aa3e02af55fa70008ff4330
😎 Deploy Preview https://deploy-preview-514--genlayer-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 7e3ef896-5d64-47b1-b662-7a757d67e47b

📥 Commits

Reviewing files that changed from the base of the PR and between 1cd8e2d and a3efef9.

📒 Files selected for processing (1)
  • pages/developers/networks.mdx

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The network documentation now separates wallet and tooling RPC usage. Bradbury and Asimov “Add to wallet” buttons now use the GenLayer Chain RPC, which supports net_version validation.

Changes

Wallet RPC documentation

Layer / File(s) Summary
Wallet endpoint guidance
pages/developers/networks.mdx
The documentation explains that wallets require net_version from the GenLayer Chain RPC. The Bradbury and Asimov wallet buttons use the GenLayer Chain RPC. CLI, SDK, and gen_* tooling use the GenLayer RPC.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: muncleuscles

Merge Risk: ⚪ Minimal · up to a3efe

The updated wallet guidance and buttons should direct users to the compatible GenLayer Chain RPC without introducing runtime changes.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning Issue #486 has two coding objectives. The PR updates pages/developers/networks.mdx to distinguish wallet use of https://rpc.testnet-chain.genlayer.com from CLI, SDK, and gen_* use of the GenLaye… Implement net_version on the GenLayer RPC, with the required response format for the issue, or link this work to a separate issue that explicitly removes that requirement from #486.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title uses the Conventional Commits format and clearly states the main documentation change: directing wallet setup to the GenLayer Chain RPC.
Description check ✅ Passed The description is detailed and directly supports the template requirements. It explains the issue, changes, testing, and out-of-scope work. It does not use the exact "## Description" heading, but the…
Out of Scope Changes check ✅ Passed The documented changes remain within Issue #486. Endpoint guidance, wallet button endpoints, and the GenLayer Chain wallet explanation directly address MetaMask validation and endpoint selection. No u…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Full details: Linked Issues check

Explanation

Issue #486 has two coding objectives. The PR updates pages/developers/networks.mdx to distinguish wallet use of https://rpc.testnet-chain.genlayer.com from CLI, SDK, and gen_* use of the GenLayer RPC. It also updates the Bradbury and Asimov wallet buttons. However, the issue also requires net_version on the GenLayer RPC. The PR summary explicitly states that this implementation is not included. The focused diff read was unavailable, but the provided change summary establishes this unmet requirement.

  • Fix all pre-merge checks with AI
✨ 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.

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.

Bradbury: rpc-bradbury.genlayer.com does not implement net_version, so MetaMask cannot add the network

1 participant