Skip to content

fix(sdk-coin-starknet): remove dead Sepolia RPC dependency from unit test - #10104

Merged
shubham-damkondwar merged 1 commit into
masterfrom
nehakumari/fix-starknet-dead-sepolia-rpc-test
Oct 30, 2026
Merged

shubham-damkondwar merged 1 commit into
masterfrom
nehakumari/fix-starknet-dead-sepolia-rpc-test

Conversation

@nvjsr

@nvjsr nvjsr commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Problem

The Starknet deploy account RPC wire format test in sdk-coin-starknet calls https://api.cartridge.gg/x/starknet/sepolia, which has been permanently discontinued (HTTP 410 Gone):

$ curl -X POST https://api.cartridge.gg/x/starknet/sepolia
starknet sepolia is discontinued and no longer served
HTTP status: 410

This broke unit tests for every BitGoJS PR that touches sdk-core or its dependents, because lerna's unit-test-changed runs the starknet suite as a dependent of sdk-core. Evidence:

Fix

Replace the live RPC call with local wire-format validation. The test previously verified that the broadcast format reaches the node's parameter validation layer (not a JSON parse error) by POSTing to the live RPC and checking the error message. The new version verifies the same property locally:

  1. Parse tx.toBroadcastFormat() as JSON — a parse failure would mean the node rejects before validation
  2. Verify the JSON-RPC envelope serializes
  3. Assert the required Starknet node fields exist: type, version, nonce, class_hash, contract_address_salt, constructor_calldata

This tests the same property (the wire format is valid enough to reach node validation) without the external dependency.

Testing

Before: 110 passing, 1 failing (SyntaxError from dead API)
After:  111 passing, 0 failing (635ms, fully local)

Impact

  • Unblocks all PRs that currently fail on the starknet test
  • Removes a flaky external dependency from the unit test suite
  • Test runs 5x faster (no network call)

Related

…test

The deploy-account wire format test called
https://api.cartridge.gg/x/starknet/sepolia, which has been
permanently discontinued (HTTP 410 Gone: 'starknet sepolia is
discontinued and no longer served'). This broke unit tests for every
BitGoJS PR that touches sdk-core or its dependents, because lerna
runs the starknet test suite as a dependent module.

Replace the live RPC call with local wire-format validation: parse
the broadcast format, verify the JSON-RPC envelope serializes, and
assert the required Starknet node fields (type, version, nonce,
class_hash, contract_address_salt, constructor_calldata) exist.
This verifies the same property — the wire format would reach node
validation, not a param-parse error — without the external
dependency.

Refs: DEFI-961
@nvjsr
nvjsr requested a review from a team as a code owner October 30, 2026 09:37

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Compatibility checks are failing on Node.js 27-nightly (experimental, non-blocking). This does not block merge, but it signals an incompatibility to fix before this release becomes supported.

View run

@shubham-damkondwar
shubham-damkondwar merged commit e29ac14 into master Oct 30, 2026
27 checks passed
@linear-code

linear-code Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

COINS-2204

@nvjsr
nvjsr deleted the nehakumari/fix-starknet-dead-sepolia-rpc-test branch October 30, 2026 12:20
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.

3 participants