Skip to content

fix(client): support legacy wallet gasless execution - #183

Merged
cesarenaldi merged 2 commits into
mainfrom
fix/legacy-wallet-gasless-execution
Jul 7, 2026
Merged

fix(client): support legacy wallet gasless execution#183
cesarenaldi merged 2 commits into
mainfrom
fix/legacy-wallet-gasless-execution

Conversation

@cesarenaldi

@cesarenaldi cesarenaldi commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Estimate Proxy wallet gas for the RelayHub signature and use the relayer-provided relay address.
  • Replace mocked gasless payload assertions with live generic Proxy and Safe legacy wallet gasless execution coverage.
  • Reuse the deposit wallet private key fixture when constructing the deposit wallet signer.

Verification

  • pnpm exec vitest --project client-integration --run packages/client/tests/integration/gasless.test.ts
  • pnpm exec vitest --project client-integration --run packages/client/tests/integration/approvals.test.ts
  • pnpm exec vitest --project client --run packages/client/src/rpc.test.ts
  • pnpm lint
  • pnpm typecheck

Note

Medium Risk
Changes signed RelayHub fields and relay address for Proxy gasless txs, which can break relayer validation if estimates or params are wrong; live integration tests increase env/credential dependence but do not alter production auth paths for deposit wallets.

Overview
Fixes legacy Proxy gasless signing so RelayHub parameters match what the relayer expects.

Proxy workflow now sets gasLimit from eth_estimateGas on the encoded factory call (replacing a fixed placeholder) and uses the relayer’s executeParams.address as the relay in the signed hash instead of the zero address.

Adds JsonRpcClient.ethEstimateGas (with a unit test) to support that estimation.

Integration tests drop MSW submit-shape assertions in favor of live end-to-end gasless runs for Proxy and Safe wallets via approveErc20 and wait(), using builder API auth. The deposit wallet signer fixture is wired through the shared private-key fixture.

Reviewed by Cursor Bugbot for commit 544fdcd. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 766d709. Configure here.

Comment thread packages/client/src/rpc.ts Outdated
@cesarenaldi
cesarenaldi merged commit 2ed7f99 into main Jul 7, 2026
8 checks passed
@cesarenaldi
cesarenaldi deleted the fix/legacy-wallet-gasless-execution branch July 7, 2026 12:14
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