Repository navigation
feat(statics): add constantAddressPrefix for Hedera account IDs (WCN-4586) - #10173
noegutierrez5 wants to merge 1 commit into
Conversation
Optional literal prefix shared by every address on a network, with no checksum or encoding. Set to '0.0.' on the Hedera mainnet and testnet network records: every account ID on the public Hedera networks is 0.0.<num> (shard 0, realm 0). Kept separate from addressPrefix, which is documented as a bech32 HRP and consumed as one by the cosmos-family coin modules. Additive and non-breaking; no other network record changes. No CHANGELOG edit: release tooling generates it from the conventional commit. Ticket: WCN-4586
There was a problem hiding this comment.
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.
|
|
|
@claude review and git approval rating |
|
Claude finished @noegutierrez5's task in 20s —— View job Review of #10173:
|
Summary
constantAddressPrefix?: stringto theAccountNetworkinterface inmodules/statics/src/networks.ts— additive, non-breaking; no other network record changes.constantAddressPrefix = '0.0.'on theHedera(mainnet) andHederaTestnetnetwork records: every account ID on the public Hedera networks is0.0.<num>(shard 0, realm 0; non-zero realms exist only on private networks and non-zero shards are not active on any network).addressPrefix: that field is documented as a bech32 HRP and is consumed as one by the cosmos-family coin modules, so it must not be repurposed for a literal, non-checksummed prefix.Context
Ticket: WCN-4586
Consumers that need "the constant literal part of every address on this network" (as opposed to a bech32 HRP or a chainId) currently have no statics field to read it from, so they must either hardcode per-coin knowledge or fall back to comparing raw addresses. Hedera is the first such network; the field is generic so future networks can set it without further interface changes.
Value table
0.0.0.0.Both values verified independently (mainnet and testnet public mirror-node account IDs are all
0.0.<num>; not copy-pasted between the two records).How Has This Been Tested?
modules/statics/test/unit/networks.ts: per-network assertions thatconstantAddressPrefixis'0.0.'and that the bech32addressPrefixstays unset (4 new tests, following the Cosmos-familyaddressPrefixtable pattern from feat(statics): expose bech32 HRP via AccountNetwork.addressPrefix (WCN-606) #8848).test/unit/coins.ts(38,534 assertions) passes with and without this change — run with its single out-of-package import (sdk-coin-evm, used only in aninstanceofguard in that spec) stubbed, outside a sparse checkout; CI runs it for real.tsc --noEmiton the statics project: clean; negative control (mistyped field value) produces TS2345, so the check bites.prettier --checkwith the repo config: clean.Type of change
Checklist
feat(statics): …, footerTicket: WCN-4586)