Skip to content

feat(statics): add dynamic Canton token construction - #9502

Open
hrishikeshjain wants to merge 2 commits into
masterfrom
CHALO-1299
Open

feat(statics): add dynamic Canton token construction#9502
hrishikeshjain wants to merge 2 commits into
masterfrom
CHALO-1299

Conversation

@hrishikeshjain

Copy link
Copy Markdown
Contributor

Summary

  • Keystone change for AMS-driven Canton token onboarding: createToken now has a canton case mapping AmsTokenConfigcantonToken(...), so AMS-supplied Canton tokens no longer resolve to undefined for every runtime consumer (wallet-platform, retail, IMS, client-admin).
  • Added optional baseUrl to AmsTokenConfig so the registrar endpoint survives the AMS→SDK hop.
  • Wired canton into networkFeatureMapForTokens (previously unwired CANTON_TOKEN_FEATURES), so createTokenMapUsingTrimmedConfigDetails no longer silently skips canton.
  • Exported getFormattedCantonTokens (was module-private) for use by registerWithCoinMap.

Test plan

  • Added tcanton:faketoken fixture (with baseUrl + compound contractAddress) to reducedTokenConfigForAllChains in test/unit/resources/amsTokenConfig.ts
  • createTokenMapUsingTrimmedConfigDetails builds the Canton token with baseUrl preserved, verified via the existing "form base coin for tokens of all the chains" test
  • Full statics unit suite passes (33905 passing)
  • tsc --noEmit passes
  • eslint passes (no new errors)

TICKET: CHALO-1299

Adds the canton case to createToken so AMS-supplied Canton tokens
resolve at runtime instead of silently dropping. Wires baseUrl through
AmsTokenConfig, adds the canton entry to networkFeatureMapForTokens,
and exports getFormattedCantonTokens for registerWithCoinMap.

TICKET: CHALO-1299
@linear-code

linear-code Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

CHALO-1299

Adds registerWithCoinMap(sdk, coinMap) so a dynamically-onboarded
Canton token from AMS can be registered into a running SDK instance
without a statics release, mirroring the SOL registerWithCoinMap
pattern. Wires CantonToken.createTokenConstructors into
registerCoinConstructors so GlobalCoinFactory resolves canton/tcanton
tokens from the coin map at process start.

verifyTransaction hardening is left for a follow-up (release-blocking,
needs confirmation of wallet-platform's txParams shape for
accept/reject/withdraw/wallet-init flows before changing behavior).

TICKET: CHALO-1300

@davidkaplanbitgo davidkaplanbitgo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

BTC changes are fine

@s84krish s84krish left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

wallets owned files look good

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