Repository navigation
feat(statics): wire mainnet ERC-7984 wrapper-underlying metadata for Zama tokens (CHALO-2007) - #10091
Merged
0xPrabh merged 1 commit intoOct 29, 2026
Conversation
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.
Contributor
Contributor
|
|
0xPrabh
force-pushed
the
prabhsharansingh/chalo-2007-erc7984-mainnet-wrapper-metadata
branch
from
October 29, 2026 05:33
2c59454 to
a198d17
Compare
…Zama tokens (CHALO-2007) Register underlyingErc20Address, rate, and requiresApprovalReset for all six mainnet Zama confidential pairs (eth:czama, eth:cxaut, eth:ctgbp, eth:cweth, eth:cusdt, eth:cusdc). Values verified on-chain via underlying()/rate(). abstract-eth registers an ERC-7984 shield pair only when underlyingErc20Address is set, so this enables the shield/unshield (wrap/wrapApprove/unwrap/ finalizeUnwrap) journey for mainnet wallets. eth:cusdt sets requiresApprovalReset=true (real USDT requires approve(0) before non-zero approve); all other underlyings are standard ERC-20. Also updates the sdk-coin-eth wrapper-registry scoping test, which asserted the old no-metadata state (eth:cusdt underlyingErc20Address === undefined) and now asserts the wired on-chain value - the three intent verifications it runs resolve wrappers by network scope and are unchanged. statics unit tests: 41522 passing. AMS allowlisting/vetting (CHALO-1145) remains the separate gate.
0xPrabh
force-pushed
the
prabhsharansingh/chalo-2007-erc7984-mainnet-wrapper-metadata
branch
from
October 29, 2026 06:52
d70f28c to
61e3815
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Registers
underlyingErc20Address,rate, andrequiresApprovalResetfor all six mainnet Zama ERC-7984 confidential pairs in statics. This is the missing SDK-side prerequisite for shield/unshield on production:abstract-ethregisters a shield pair only whenunderlyingErc20Addressis set (abstractEthLikeNewCoins.ts:501), so until now everywrap/wrapApprove/unwrapintent on mainnet threw ``'...' is not a registered ERC-7984 shield pair''.Metadata (verified on-chain via
eth_call, 2026-10-29)underlying()rate()requiresApprovalReset0x80cb147f…980710xA12cC123…f4F310000000000000x73cc9af9…eef10x68749665…82F3810xa873750c…edd90x27f6C828…528710000000000000xda9396b8…48930xC02aaA39…6Cc210000000000000xae0207c7…0c500xdAC17F95…1ec710xe978f221…72b20xA0b86991…eb481buildWrapCalldata(minted = floor(amount / rate)):1e12for 18dp→6dp pairs,1for 6dp→6dp pairs — all six internally consistent.requiresApprovalReset = trueonly foreth:cusdt(real mainnet USDT reverts non-zero→non-zero approve; same guard as the Hoodi TUSDTMOCK mock, see CHALO-1815). Others are standard ERC-20.decimals()/symbol()confirmed on-chain (cZAMA, cXAUt, ctGBP, cWETH, cUSDT, cUSDC — all 6dp), matching the existing staticsdecimalPlaces.Changes
modules/statics/src/coins/erc7984Tokens.ts— wrapper args for the six mainneterc7984()entries; header comment updatedmodules/statics/src/tokenConfig.ts— refreshed the "omitted on mainnet" doc commentmodules/statics/test/unit/erc7984Tokens.ts— replaced "leaves mainnet wrapper metadata unset" with exact assertions for all six mainnet pairsNotes / out of scope
undefinedthrough the optionalfeatures/prefix/suffix/network/primaryKeyCurvepositional params preserves current behavior exactly (defaults apply onundefined).Verification
mocha test/unit/erc7984Tokens.tsinmodules/statics: 41522 passing, 0 failing (full registry validation suite included)prettier --checkclean on all touched filesCloses CHALO-2007