Skip to content

[SDK] buildUnwrapCalldata + UnwrapERC7984 explain/verify - #9509

Open
0xPrabh wants to merge 1 commit into
masterfrom
CHALO-1155
Open

[SDK] buildUnwrapCalldata + UnwrapERC7984 explain/verify#9509
0xPrabh wants to merge 1 commit into
masterfrom
CHALO-1155

Conversation

@0xPrabh

Copy link
Copy Markdown
Contributor

Description

Adds buildUnwrapCalldata(from, to, encryptedAmount, inputProof) and UnwrapERC7984 transaction support for the ERC-7984 unshield path.

  • Encodes unwrap(address,address,bytes32,bytes) with selector 0x5bf4ef06
  • Validates checksummed from/to, 32-byte encryptedAmount, non-empty inputProof
  • Adds TransactionType.UnwrapERC7984 with builder + classifyTransaction mapping
  • Erc7984Token.verifyTransaction unwrap branch (direct + sendMultiSig); self-directed from == to == baseAddress
  • Does not set gasLimit (WP owns gas)

Issue Number

CHALO-1155

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 "buildUnwrapCalldata|Method IDs" (13 passing)
  • BITGOJS_TEST_PASSWORD=password yarn workspace @bitgo/sdk-coin-eth unit-test --grep "UnwrapERC7984|verifyTransaction – Unwrap" (12 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

@linear-code

Copy link
Copy Markdown
Contributor

CHALO-1155

…/verify
Encode unwrap(from, to, encryptedAmount, inputProof) for ERC-7984 unshield
(selector 0x5bf4ef06), add UnwrapERC7984 tx type with builder classification,
and verify self-directed unwrap calldata (from/to == wallet base address).
Ticket: CHALO-1155
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for freeto 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

@0xPrabh