Skip to content

feat(abstract-eth): add DelegateVotesBuilder for ERC20Votes delegateBySig (CGD-842)#8632

Open
0xPrabh wants to merge 1 commit intomasterfrom
feat/cgd-842-delegate-by-sig
Open

feat(abstract-eth): add DelegateVotesBuilder for ERC20Votes delegateBySig (CGD-842)#8632
0xPrabh wants to merge 1 commit intomasterfrom
feat/cgd-842-delegate-by-sig

Conversation

@0xPrabh
Copy link
Copy Markdown
Contributor

@0xPrabh 0xPrabh commented Apr 27, 2026

Summary

  • Add DelegateVotesBuilder to @bitgo/abstract-eth for building ERC20Votes delegateBySig calldata
  • Add delegateBySigMethodId and delegateBySigTypes constants to walletUtil.ts
  • Add unit tests covering happy path and all validation errors
  • Add EIP-712 delegation fixture using real WLFI contract domain values

Context

Closes CGD-842. Cold wallet holders of governance tokens (WLFI, UNI, COMP, ARB, ENS, OP) can now delegate voting power to a hot wallet without moving funds or paying gas from the cold wallet.

WLFI eip712Domain(): name "World Liberty Financial", version "2", chainId 1.

Test plan

  • DelegateVotesBuilder produces calldata starting with selector 0x5c19a95c
  • Validates delegatee, nonce, expiry, and signature (v/r/s) with meaningful errors
  • EIP-712 signable payload for WLFI matches expected hash from live domain values
  • TypeScript compiles without errors
  • ESLint and prettier pass

🤖 Generated with Claude Code

…ySig

Add DelegateVotesBuilder to build ABI-encoded calldata for the
ERC20Votes delegateBySig function, enabling cold wallet governance
delegation without gas or on-chain transactions from the cold wallet.

The builder encodes delegatee, nonce, expiry, and an EIP-712 ECDSA
signature (v, r, s) into calldata compatible with any OZ ERC20Votes
token (WLFI, UNI, COMP, ARB, ENS, OP).

Also adds:
- delegateBySigMethodId and delegateBySigTypes constants to walletUtil
- Unit tests for DelegateVotesBuilder (happy path + validation)
- EIP-712 delegation fixture using live WLFI domain values

Ticket: CGD-842

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@0xPrabh 0xPrabh requested a review from a team as a code owner April 27, 2026 05:51
@linear
Copy link
Copy Markdown

linear Bot commented Apr 27, 2026

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