feat(statics): add PolyxNetwork interface with v8SpecVersion and v8TxVersion#9134
Merged
Merged
Conversation
Contributor
d95dde3 to
39e2ea7
Compare
There was a problem hiding this comment.
Pull request overview
This PR extends @bitgo/statics with Polymesh/POLYX-specific network typing and metadata so downstream services can reason about both the current runtime and an upcoming v8 runtime via statics.
Changes:
- Added a
PolyxNetworkinterface extendingAccountNetworkwith Polymesh runtime fields, includingv8SpecVersionandv8TxVersion. - Updated
PolymeshandPolymeshTestnetnetwork definitions to implementPolyxNetworkand to include the new v8 fields. - Added unit tests to assert the presence/values of the new v8 fields on mainnet and testnet POLYX networks.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| modules/statics/src/networks.ts | Introduces PolyxNetwork and updates Polymesh network instances with v8 runtime metadata fields. |
| modules/statics/test/unit/networks.ts | Adds unit tests asserting POLYX v8 fields and basic required Polymesh network properties. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…Version Polymesh runtime v8 is live on testnet. This commit adds the infrastructure prerequisite fields to support the v8 migration: - Introduce PolyxNetwork interface extending AccountNetwork with Polymesh-specific fields: specName, genesisHash, specVersion, chainName, txVersion, v8SpecVersion, and v8TxVersion. - Update Polymesh (mainnet) and PolymeshTestnet classes to implement PolyxNetwork instead of plain AccountNetwork. - Set v8SpecVersion = 8000000 and v8TxVersion = 8 on both network classes to reflect the Polymesh v8 runtime version. - Add unit tests verifying v8 fields on both mainnet and testnet network instances. These fields are required by BASE-2 (v8 metadata/builders) and downstream services (indexer, wallet-platform, HSM parsing) that need to gate logic on the runtime version. Ticket: CECHO-1470 Session-Id: 45130683-1dd5-4330-af56-4edc9845062a Task-Id: 64b6fe5d-9398-4f7c-9331-e87d098b8d9e
caf7b5d to
e12ee2a
Compare
venkateshv1266
approved these changes
Jun 29, 2026
nvrakesh06
approved these changes
Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
PolyxNetworkinterface in@bitgo/staticsthat extendsAccountNetworkwith Polymesh-specific fields:specName,genesisHash,specVersion,chainName,txVersion,v8SpecVersion, andv8TxVersionPolymesh(mainnet) andPolymeshTestnetclasses to implementPolyxNetworkinstead of plainAccountNetworkv8SpecVersion = 8000000andv8TxVersion = 8on both network classes to reflect the Polymesh v8 runtime versionWhy
Polymesh v8 runtime is live on testnet. To safely support dual-path v7/v8 transaction building and parsing across the platform (BitGoJS builders, indexer, wallet-platform routing, HSM parsing), every service needs to know the chain's current specVersion and the upcoming v8 specVersion from a single authoritative source in
@bitgo/statics.Adding
v8SpecVersionandv8TxVersionas typed fields onPolyxNetworkprovides that canonical source. Downstream phases (BASE-2 v8 builders, BASE-3 routing, BASE-4 HSM parsers) all depend on these fields being available before they can gate behavior on the runtime version.This is the infrastructure prerequisite phase that unblocks all other Polymesh v8 migration work.
Test plan
@bitgo/staticsunit tests pass (30721 passing, 14 pre-existing unrelated failures)@bitgo/sdk-coin-polyxunit tests pass (179 passing)v8SpecVersion = 8000000andv8TxVersion = 8on both mainnet and testnetpolyxnetwork objectsTicket: CECHO-1470