Skip to content

[SDK] buildApproveCalldata for wrapper exact-amount approve - #9479

Merged
0xPrabh merged 1 commit into
masterfrom
CHALO-1153
Aug 13, 2026
Merged

[SDK] buildApproveCalldata for wrapper exact-amount approve#9479
0xPrabh merged 1 commit into
masterfrom
CHALO-1153

Conversation

@0xPrabh

@0xPrabh 0xPrabh commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Description

Adds buildApproveCalldata(wrapperAddress, amount) to @bitgo/abstract-eth for the ERC-7984 shield path. Encodes ERC-20 approve(spender, amount) with selector 0x095ea7b3 for exact-amount approvals of the confidential wrapper as spender, including approve(0) for the USDT-style reset branch.

Validates EIP-55 address checksum and non-negative amount. Does not set gasLimit (WP owns gas).

Issue Number

CHALO-1153

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 "Zama Utils" (62 passing, including new approve cases)
  • 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 exact-amount ERC-20 approve(wrapper, amount) for the shield path
(selector 0x095ea7b3), including approve(0) reset. Validates EIP-55 address
checksum and non-negative amount; does not set gasLimit.

Ticket: CHALO-1153
Co-authored-by: Cursor <cursoragent@cursor.com>
@0xPrabh
0xPrabh requested a review from a team as a code owner August 12, 2026 06:37
@linear-code

linear-code Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

CHALO-1153

@MohammedRyaan786 MohammedRyaan786 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@0xPrabh
0xPrabh merged commit abdb919 into master Aug 13, 2026
25 checks passed
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.

2 participants