Skip to content

[SDK] buildWrapCalldata + WrapERC7984 explain/verify - #9498

Draft
0xPrabh wants to merge 1 commit into
masterfrom
CHALO-1154
Draft

[SDK] buildWrapCalldata + WrapERC7984 explain/verify#9498
0xPrabh wants to merge 1 commit into
masterfrom
CHALO-1154

Conversation

@0xPrabh

@0xPrabh 0xPrabh commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Description

Adds buildWrapCalldata(to, amount, rate?) and WrapERC7984 transaction support for the ERC-7984 shield path.

  • Encodes wrap(address,uint256) with selector 0xbf376c7a
  • Validates checksummed to, amount > 0, and optional amount × rate uint64 fit (euint64)
  • Adds TransactionType.WrapERC7984 with builder + classifyTransaction mapping
  • Erc7984Token.verifyTransaction wrap branch (direct + sendMultiSig shapes); self-directed to == baseAddress
  • Does not set gasLimit (WP owns gas)

Issue Number

CHALO-1154

Parent: CHALO-1135

Type of change

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

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)
  • eslint on touched files

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My commits follow Conventional Commits and I have properly described any BREAKING CHANGES
  • The ticket or github issue was included in the commit message as a reference
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Made with Cursor

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>
@0xPrabh
0xPrabh requested review from a team as code owners August 13, 2026 13:16
@linear-code

linear-code Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

CHALO-1154

@0xPrabh
0xPrabh marked this pull request as draft August 13, 2026 13:31
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.

1 participant