[SDK] buildWrapCalldata + WrapERC7984 explain/verify - #9498
Draft
0xPrabh wants to merge 1 commit into
Draft
Conversation
Encode wrap(to, amount) for ERC-7984 shield (selector 0xbf376c7a), add WrapERC7984 tx type with builder classification, and verify self-directed wrap calldata including amount × rate uint64 checks. Ticket: CHALO-1154 Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
0xPrabh
marked this pull request as draft
August 13, 2026 13:31
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.
Description
Adds
buildWrapCalldata(to, amount, rate?)andWrapERC7984transaction support for the ERC-7984 shield path.wrap(address,uint256)with selector0xbf376c7ato,amount > 0, and optionalamount × rateuint64 fit (euint64)TransactionType.WrapERC7984with builder +classifyTransactionmappingErc7984Token.verifyTransactionwrap branch (direct + sendMultiSig shapes); self-directedto == baseAddressgasLimit(WP owns gas)Issue Number
CHALO-1154
Parent: CHALO-1135
Type of change
How Has This Been Tested?
yarn workspace @bitgo/abstract-eth unit-test --grep "buildWrapCalldata|Method IDs"(19 passing)BITGOJS_TEST_PASSWORD=password yarn workspace @bitgo/sdk-coin-eth unit-test --grep "WrapERC7984|verifyTransaction – Wrap"(13 passing)Checklist:
Made with Cursor