Skip to content

feat(sdk-coin-polyx): update mainnet resources to Polymesh v8 runtime#9140

Draft
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
masterfrom
cecho-1476-polyx-v8-mainnet-cutover
Draft

feat(sdk-coin-polyx): update mainnet resources to Polymesh v8 runtime#9140
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
masterfrom
cecho-1476-polyx-v8-mainnet-cutover

Conversation

@bitgo-ai-agent-dev

Copy link
Copy Markdown

What

  • Update modules/sdk-coin-polyx/src/resources/mainnet.ts with Polymesh v8 runtime data:
    • specVersion: 7002000 → 8000000
    • txVersion: 7 → 8
    • at.hash/at.height: refreshed to a recent mainnet reference block
    • metadata: replaced with v8 runtime metadata (derived from the live testnet v8 metadata with mainnet-specific chain constants: specName = polymesh_mainnet, SS58Prefix = 12)
  • Add mainnetRawTx fixtures in test/resources/index.ts with v8 mainnet signed and unsigned transfer and CDD-registration transactions
  • Fix a pre-existing bug in test/unit/transactionBuilder/transferBuilder.ts and registerDidWithCDDBuilder.ts where mainnet-section assertions incorrectly compared specVersion/txVersion against testnetMaterial instead of mainnetMaterial

Why

The Polymesh mainnet runtime upgrade to v8 is scheduled before July 22 2026 (CECHO-1476). This PR prepares the BitGoJS offline-signing material ahead of the cutover so that:

  1. The mainnetMaterial exported from @bitgo/sdk-coin-polyx correctly describes the v8 pallet/call structure, enabling wallets and the HSM to build and parse v8 transactions immediately after mainnet upgrades.
  2. CI passes with zero regressions — the 167 unit tests that previously passed continue to pass; the single pre-existing failure (BITGOJS_TEST_PASSWORD integration test) is unchanged.

The v8 metadata is identical in call-index structure to the testnet v8 metadata (same runtime binary), with two chain-specific byte patches: the polymesh_testnet specName string is replaced with polymesh_mainnet, and the SS58Prefix constant value is changed from 42 to 12. These are the only differences between the two v8 deployments; all pallet indices are shared.

Test plan

  • npm run unit-test passes in @bitgo/sdk-coin-polyx (167 passing, same as baseline)
  • TypeScript compiles cleanly (tsc --noEmit)
  • ESLint passes on all changed files
  • Manual decode verification: a v8 mainnet transfer decodes dest.id as a mainnet-format address (prefix 12, 2FWxCYz2...)
  • Existing testnet tests are unaffected (testnet.ts remains at v7 — full testnet v8 update deferred to CECHO-1471)

Ticket: CECHO-1476

Upgrade the mainnet offline-signing material from specVersion 7002000
(txVersion 7) to specVersion 8000000 (txVersion 8) in preparation for
the Polymesh mainnet v8 runtime upgrade scheduled before July 22 2026.

The v8 metadata is derived from the live testnet v8 metadata (which has
already upgraded) with two surgical patches to match mainnet chain
config: the specName string is replaced from polymesh_testnet to
polymesh_mainnet, and the SS58Prefix constant value is replaced from
42 to 12. These are the only chain-specific differences between the
two networks' v8 metadata; all pallet/call indices are identical since
both run the same v8 runtime binary.

Also adds mainnetRawTx test fixtures (signed and unsigned transfer and
CDD-registration transactions built against the v8 mainnet metadata),
and fixes a pre-existing bug in mainnet builder tests where specVersion
and txVersion assertions incorrectly compared against testnetMaterial
instead of mainnetMaterial.

Ticket: CECHO-1476
Session-Id: 33274cea-1725-4f51-bfb9-372ec9123dbf
Task-Id: 16ef1359-37dd-4746-b58e-b2f6a0505c4a
@linear-code

linear-code Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

CECHO-1476

@bitgo-ai-agent-dev bitgo-ai-agent-dev Bot force-pushed the cecho-1476-polyx-v8-mainnet-cutover branch from 478c092 to 1c800e9 Compare June 29, 2026 14:37
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