Skip to content

feat(statics): give Sepolia testnet its own underlying asset (sepETH) - #9389

Open
rithwik-bitgo wants to merge 1 commit into
masterfrom
CECHO-1721-sepeth
Open

feat(statics): give Sepolia testnet its own underlying asset (sepETH)#9389
rithwik-bitgo wants to merge 1 commit into
masterfrom
CECHO-1721-sepeth

Conversation

@rithwik-bitgo

@rithwik-bitgo rithwik-bitgo commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Onboards Sepolia (chain ID 11155111) as a testnet-only network for Ethereum, following the existing gteth/hteth pattern (CoinFamily.ETH, no mainnet counterpart since Sepolia is Ethereum's own test network).
  • Gives the coin its own UnderlyingAsset.SEPETH instead of reusing UnderlyingAsset.ETH, so it's distinguishable as its own asset while still sharing the eth family/signing implementation.
  • Coin code: sepeth ("Sepolia Testnet Ethereum"). OFC entry: ofctsepeth (kept ofct-prefixed to satisfy the OFC testnet naming-convention test).

Notes

  • batcherContractAddress / forwarderFactoryAddress / forwarderImplementationAddress are intentionally omitted (optional fields on EthereumNetwork) since BitGo's forwarder/batcher contracts haven't been deployed on Sepolia yet — to be added once contract deployment is complete.
  • Considered making SEPETH a fully standalone CoinFamily, but reverted: getEthLikeTokens (AMS token config tooling) requires every family with an EVM-feature coin to have a canonical mainnet coin named exactly like the family, which a testnet-only chain can't satisfy without adding a fake mainnet entry. Keeping family = CoinFamily.ETH avoids that while still giving Sepolia its own asset identity.
  • No changes needed to networkFeatureMapForTokens.ts (already covers the eth family) or environments.ts (its explorer config is a single shared endpoint per environment, not per-testnet).

CI fix (unrelated to Sepolia)

  • unit-test was failing in @bitgo/sdk-coin-stx (Invalid character in hello) after bn.js was bumped to 5.2.3 (WCN-1224 / chore: update bn.js to version 5.2.3 in package.json and yarn.lock #9349).
  • @stacks/transactions signWithKey passes the message to elliptic as hex. Test fixture message2 = 'hello' is not valid hex; it only passed when elliptic resolved its nested lenient bn.js@4.
  • Fix: test-only change in sdk-coin-stx fixtures — message2 → valid hex deadbeef, regenerated expectedSignature2. No production signing behavior change.

TICKET: CECHO-1721

Test plan

  • yarn workspace @bitgo/statics run unit-test — all 33k+ tests passing
  • tsc --noEmit typecheck clean for modules/statics
  • yarn workspace @bitgo/sdk-coin-stx run unit-test — sign/verify fixtures pass under bn.js@5
  • Contract deployment + forwarder address wiring (follow-up)

@linear-code

linear-code Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

CECHO-1721

@rithwik-bitgo
rithwik-bitgo marked this pull request as ready for review July 30, 2026 08:12
@rithwik-bitgo
rithwik-bitgo requested a review from a team as a code owner July 30, 2026 08:12
@manojkumar138

Copy link
Copy Markdown
Contributor

CI unblock: stx sign/verify fixture

unit-test failures were not from the sepeth statics change. They came from @bitgo/sdk-coin-stx:

  • Root cause: after WCN-1224 / #9349 (bn.js@5.2.3), CI resolves elliptic against strict bn.js@5.
  • @stacks/transactions signWithKey treats the message as hex → fixture message2 = 'hello' throws Invalid character in hello.
  • Fix (test-only): message2deadbeef, regenerated expectedSignature2 in modules/sdk-coin-stx/test/unit/resources.ts.

Commit: a4d99fcdf6

@stacks/transactions signWithKey passes the message to elliptic as hex.
With bn.js@5 (CI when elliptic's nested bn.js@4 is not used), non-hex
messages like 'hello' throw. Switch message2 to valid hex and regenerate
the expected signature so unit tests pass under either layout.

TICKET: CECHO-1721
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.

2 participants