Skip to content

feat(abstract-eth): add ZAMA staking delegate flow#8775

Draft
Vijay-Jagannathan wants to merge 1 commit into
masterfrom
vijayjagannathan/si-560-sdk-delegate-flow-approve-deposit
Draft

feat(abstract-eth): add ZAMA staking delegate flow#8775
Vijay-Jagannathan wants to merge 1 commit into
masterfrom
vijayjagannathan/si-560-sdk-delegate-flow-approve-deposit

Conversation

@Vijay-Jagannathan
Copy link
Copy Markdown
Contributor

Summary

  • Implements SDK builder and ABI encoding utilities for the ZAMA ERC-4626 staking delegate flow (approve + deposit)
  • Adds zamaStakingUtils.ts with encoding for approve(address,uint256) (0x095ea7b3) and deposit(uint256,address) (0x6e553f65)
  • Adds zamaStakingBuilder.ts with ZamaStakingBuilder class providing buildApprove() and buildDeposit() methods that produce {to, data, value} tx requests for WP
  • Adds CoinFeature.STAKING to ERC7984_TOKEN_FEATURES in statics
  • 38 new unit tests with ABI round-trip decoding verification

Architecture

UI → Staking Service (returns ZamaApproveIntent / ZamaDepositIntent)
   → WP (calls SDK builder methods)
   → SDK (builds TX here via ZamaStakingBuilder)

Transaction Flow

Step Method Contract Selector
TX1 (Approve) approve(address,uint256) ZAMA Token 0x095ea7b3
TX2 (Deposit) deposit(uint256,address) OperatorStaking 0x6e553f65

Dependencies

  • SI-554 — Public Types intent definitions (PR: BitGo/public-types#374)

Ticket: SI-560

Test plan

  • All 160 abstract-eth unit tests pass (38 new)
  • ESLint passes on all new files
  • TypeScript compiles without errors
  • ABI method selectors verified against known values (0x095ea7b3, 0x6e553f65)
  • Round-trip ABI encode/decode validates parameter correctness

🤖 Generated with Claude Code

@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 14, 2026

SI-560

@Vijay-Jagannathan Vijay-Jagannathan force-pushed the vijayjagannathan/si-560-sdk-delegate-flow-approve-deposit branch 4 times, most recently from 4d2d1ec to 44bfb4b Compare May 15, 2026 10:56
Implement SDK builder and ABI encoding utilities for the ZAMA ERC-4626
staking delegate flow:

- zamaStakingUtils.ts: ABI encoding for ERC20 approve(address,uint256)
  and ERC4626 deposit(uint256,address) with correct selectors
  (0x095ea7b3, 0x6e553f65)
- zamaStakingBuilder.ts: ZamaStakingBuilder class with buildApprove()
  and buildDeposit() methods producing {to, data, value} tx requests
- Add CoinFeature.STAKING to ERC7984_TOKEN_FEATURES
- Comprehensive unit tests (38 new tests) with ABI round-trip decoding

TICKET: SI-560

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Vijay-Jagannathan Vijay-Jagannathan force-pushed the vijayjagannathan/si-560-sdk-delegate-flow-approve-deposit branch from 44bfb4b to 6fbf386 Compare May 15, 2026 11:04
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