Skip to content

feat(sdk-coin-eth): add zama token withdrawal support#8919

Draft
MohammedRyaan786 wants to merge 1 commit into
masterfrom
CHALO-529
Draft

feat(sdk-coin-eth): add zama token withdrawal support#8919
MohammedRyaan786 wants to merge 1 commit into
masterfrom
CHALO-529

Conversation

@MohammedRyaan786
Copy link
Copy Markdown
Contributor

@MohammedRyaan786 MohammedRyaan786 commented Jun 2, 2026

TICKET: CHALO-529

This pull request adds support for confidential ERC-7984 token transfers to the Ethereum SDK. The main changes introduce a new TransferBuilderERC7984 class, extend transaction building and verification logic to handle the new confidential transfer type, and provide decoding utilities for confidential transfer calldata. Unit tests are also updated to cover the new functionality.

ERC-7984 Confidential Transfer Support:

  • Introduced TransferBuilderERC7984 in abstract-eth, enabling construction and serialization of confidential ERC-7984 token transfers, with validation for required fields like encryptedHandle and inputProof.
  • Exported TransferBuilderERC7984 from transfer builder index files for both abstract-eth and sdk-coin-eth modules. (F010bc2dR1, modules/sdk-coin-eth/src/lib/transferBuilders/index.tsL1-R8)

Transaction Builder and Type Handling:

  • Updated TransactionBuilder classes in both abstract-eth and sdk-coin-eth to support the new SendERC7984 transaction type, including type checks, instantiation, and handling in relevant methods. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Confidential Transfer Decoding and Classification:

  • Added decodeConfidentialTransferData utility to parse confidential transfer calldata from raw transaction data, extracting recipient, contract, handle, proof, and signature.
  • Enhanced transaction classification logic to detect and classify confidential transfers as SendERC7984 by inspecting inner calldata.
  • Defined new method IDs and ABI types for confidential transfer calls in walletUtil.

Verification Logic:

  • Added verifyConfidentialTransfer method to Erc7984Token, verifying contract address, recipient, and presence of confidential fields in decoded calldata, and integrated this check into the main transaction verification flow. [1] [2]

Testing:

  • Updated unit tests to cover confidential transfer verification and the new builder. [1] [2]

These changes collectively enable secure construction, parsing, and verification of confidential ERC-7984 token transfers within the SDK.

@linear-code
Copy link
Copy Markdown

linear-code Bot commented Jun 2, 2026

CHALO-529

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