Skip to content

feat: add Plasma mainnet and testnet support - #42

Open
Haaaarry wants to merge 1 commit into
mcpdotdirect:mainfrom
Haaaarry:feat/plasma
Open

feat: add Plasma mainnet and testnet support#42
Haaaarry wants to merge 1 commit into
mcpdotdirect:mainfrom
Haaaarry:feat/plasma

Conversation

@Haaaarry

Copy link
Copy Markdown

Summary

Adds support for the Plasma chain (resolves #19).

Two networks are added because viem 2.39.3 (the version pinned by this repo) exports neither of them:

  • Plasma mainnet — chain id 9745
  • Plasma Testnet — chain id 9746

Both are defined locally with defineChain using the current chain registry (chainid.network / ethereum-lists/chains) values.

Changes

  • src/core/chains.ts
    • define plasma and plasmaTestnet via defineChain
    • register both in chainMap, networkNameMap, and rpcUrlMap
  • README.md
    • add Plasma to the mainnet list and Plasma Testnet to the testnet list

Verification

  • bunx tsc --noEmit passes
  • bun run build passes
  • Confirmed both RPC endpoints respond with the expected chain ids:
    • https://rpc.plasma.to -> 0x2611 (9745)
    • https://testnet-rpc.plasma.to -> 0x2612 (9746)

Add Plasma mainnet (9745) and testnet (9746) via defineChain, since viem 2.39.3 does not export them. RPC endpoints verified against chainid.network.
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.

Add Plasma (XPL) support

1 participant