Skip to content

feat(statics): add SUPPORTS_MEMO coin feature - #10123

Merged
mohammadalfaiyazbitgo merged 1 commit into
masterfrom
WCN-655-statics-supports-memo
Nov 4, 2026
Merged

mohammadalfaiyazbitgo merged 1 commit into
masterfrom
WCN-655-statics-supports-memo

Conversation

@mohammadalfaiyazbitgo

@mohammadalfaiyazbitgo mohammadalfaiyazbitgo commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

Consolidates memo feature support into the SDK.

  • Adds CoinFeature.SUPPORTS_MEMO = 'supports-memo' (modules/statics/src/base.ts).
  • Stamps it on the 14 base feature constants covering the 29 memo families: XLM_FEATURES, XRP_FEATURES, CSPR_FEATURES, DOT_FEATURES, EOS_FEATURES, HBAR_FEATURES, SOL_FEATURES, STX_FEATURES, COSMOS_SIDECHAIN_FEATURES, TON_FEATURES, BERA_FEATURES, ICP_FEATURES, POLYX_FEATURES, CANTON_FEATURES.
  • Cosmos sidechains are covered via COSMOS_SIDECHAIN_FEATURES (spread into the _WITH_STAKING, ATOM, INJECTIVE, COREUM, SEI, ZETA and TIA constants), so kavacosmos, mantra and the deprecated fetchai are newly covered.
  • OFC coins inherit their base asset's features via getFilteredFeatures, so they carry the feature; consumers must filter tokens.
  • algo and tempo are deliberately excluded.

Issue Number

WCN-655

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

From modules/statics:

  • npx mocha test/unit/coins.ts --grep "Supports Memo Feature" → 3 passing (feature present on 62 mainnet/testnet coins, present on every non-token cosmos-like coin, absent on btc/tbtc/eth/hteth/algo/tempo).
  • yarn unit-test → full statics suite green (41,940 passing).
  • yarn build → tsc passes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My code compiles correctly for both Node and Browser environments

@linear-code

linear-code Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

WCN-655

@github-actions

github-actions Bot commented Nov 3, 2026 •

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

Consolidates memo feature support into the SDK.

TICKET: WCN-655
@mohammadalfaiyazbitgo
mohammadalfaiyazbitgo force-pushed the WCN-655-statics-supports-memo branch from 6bab254 to 2408f5a Compare November 3, 2026 19:54
@mohammadalfaiyazbitgo
mohammadalfaiyazbitgo marked this pull request as ready for review November 3, 2026 19:55
@mohammadalfaiyazbitgo
mohammadalfaiyazbitgo requested a review from a team as a code owner November 3, 2026 19:55

@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.

@mukeshsp

mukeshsp commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

@claude review please

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @mukeshsp's task in 26s —— View job


Review of #10123: add SUPPORTS_MEMO coin feature

I read the diff and traced where the edited constants are spread. I did not run the tests or the build. The checkout has no merge base with origin/master, so I reviewed the HEAD commit directly.

The change is small and consistent with the existing feature style. There is one issue to settle before merging.

Cosmos tokens inherit SUPPORTS_MEMO

  • COSMOS_TOKEN_FEATURES and COSMOS_TOKEN_FEATURES_WITH_STAKING are defined as [...COSMOS_SIDECHAIN_FEATURES] and [...COSMOS_SIDECHAIN_FEATURES_WITH_STAKING] (modules/statics/src/coinFeatures.ts:511-512).
  • Both are used by the tokens in modules/statics/src/coins/cosmosTokens.ts.
  • Adding the feature to COSMOS_SIDECHAIN_FEATURES therefore also stamps every cosmos token with it. The PR description only says OFC coins inherit it.
  • This may be intended, since cosmos tokens do use the base chain's memo ID. If it is, say so in the description.
  • If it isn't, either filter the feature out of the token constants or add it to the chain constants explicitly.
  • The new test is titled "present on every non-token cosmos-like coin", so it doesn't check cosmos tokens either way. I'd add an assertion that pins the intended behavior for them.

Smaller notes

  • Other features already cover memos: ALPHANUMERIC_MEMO_ID is already set on HBAR, STX, TON, CANTON and the cosmos chains. The new doc comment in base.ts should say how SUPPORTS_MEMO differs, e.g. "all memo families" versus "alphanumeric IDs only". Otherwise consumers won't know which one to check.
  • EVM-based coins: BERA is flagged here. BERA_FEATURES appears to be built from EVM defaults, so confirm it really uses address-embedded memos like the other families.
  • Derived constants: TSOL_FEATURES and TCANTON_FEATURES correctly pick up the feature through their spreads.
  • Exclusions: I only checked algo and tempo against the description, and neither is changed in this diff. I didn't confirm that every one of the 29 intended families is covered.

@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.

Code review found no issues

No high-confidence issues detected in this change.

@mohammadalfaiyazbitgo
mohammadalfaiyazbitgo merged commit 3ca6bcb into master Nov 4, 2026
42 of 44 checks passed
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