Skip to content

fix(safe): use Client provider for reads and Safe gas estimation - #231

Merged
HananINouman merged 1 commit into
mainfrom
fix/safe-provider-rpc-reads
Jul 21, 2026
Merged

HananINouman merged 1 commit into
mainfrom
fix/safe-provider-rpc-reads

Conversation

@HananINouman

@HananINouman HananINouman commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

WalletConnect cannot attach eRPC Basic Auth, so prefer the explicit provider for contract reads/estimateGas and only use the signer to send. Also fix OVM address resolution from deferred ethers listener payloads.

Summary by CodeRabbit

  • Bug Fixes
    • Improved provider selection for deposits, withdrawals, split creation, deployment checks, and tranche reads.
    • Improved compatibility with Safe and contract-wallet transactions.
    • Added gas estimation before submitting contract-wallet transactions.
    • Improved handling of deployment events and OVM address resolution.
  • Tests
    • Expanded coverage for provider forwarding, gas limits, and deployment event parsing.

@HananINouman
HananINouman requested a review from a team as a code owner July 21, 2026 18:46
@coderabbitai

coderabbitai Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@HananINouman, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 40 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 17c8d91a-4c45-4714-b9b5-a02c8f493115

📥 Commits

Reviewing files that changed from the base of the PR and between 0c33481 and cb56b5c.

📒 Files selected for processing (9)
  • src/eoa/eoa.ts
  • src/eoa/eoaHelpers.ts
  • src/index.ts
  • src/splits/splitHelpers.ts
  • src/splits/splits.ts
  • test/eoa/eoa.spec.ts
  • test/eoa/safeEoaHelpers.spec.ts
  • test/splits/ovmDeployHelpers.spec.ts
  • test/splits/splits.spec.ts
📝 Walkthrough

Walkthrough

The SDK now threads explicit providers through EOA, Safe, SplitV2, OVM, and OWR operations. Safe submissions estimate gas before sending transactions, OVM listener parsing is more robust, and related tests assert provider forwarding, gas limits, and listener argument handling.

Changes

Provider plumbing and transaction submission

Layer / File(s) Summary
EOA provider propagation
src/eoa/eoa.ts, src/eoa/eoaHelpers.ts, test/eoa/*
EOA withdrawal and deposit flows pass providers into helper functions, Safe detection, and contract-wallet submissions; tests verify the forwarded provider.
Safe submission and OVM listener handling
src/splits/splitHelpers.ts, test/eoa/safeEoaHelpers.spec.ts, test/splits/ovmDeployHelpers.spec.ts
Safe transaction paths select an explicit provider, estimate gas, include gasLimit, and parse OVM listener arguments with address validation.
Split and OVM helper provider APIs
src/splits/splitHelpers.ts
Read-only SplitV2 and OWR helpers, deployment checks, Safe detection, and OVM deployment submissions accept and forward optional providers.
Client and split workflow wiring
src/index.ts, src/splits/splits.ts, test/splits/splits.spec.ts
Client and validator-manager workflows use this.provider for availability checks, predictions, deployment checks, OWR reads, and deployment calls.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: agaskrobot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: using the Client provider for reads and Safe gas estimation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/safe-provider-rpc-reads

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@HananINouman
HananINouman enabled auto-merge (squash) July 21, 2026 19:03
WalletConnect cannot attach eRPC Basic Auth, so prefer the explicit
provider for contract reads/estimateGas and only use the signer to send.
Also fix OVM address resolution from deferred ethers listener payloads.

Co-authored-by: Cursor <cursoragent@cursor.com>
@HananINouman
HananINouman force-pushed the fix/safe-provider-rpc-reads branch from 33836cc to cb56b5c Compare July 21, 2026 19:06
@HananINouman
HananINouman merged commit bf588ba into main Jul 21, 2026
3 of 4 checks passed
@HananINouman
HananINouman deleted the fix/safe-provider-rpc-reads branch July 21, 2026 19:06

@anadi2311 anadi2311 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.

not verified

@sonarqubecloud

Copy link
Copy Markdown

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.

3 participants