Skip to content

Bump turbo from 2.9.8 to 2.9.14 (0xsequence#1008) #641

Merged
Dargon789 merged 3 commits into
Dargon789:wagmifrom
0xsequence:master
Jun 3, 2026
Merged

Bump turbo from 2.9.8 to 2.9.14 (0xsequence#1008) #641
Dargon789 merged 3 commits into
Dargon789:wagmifrom
0xsequence:master

Conversation

@Dargon789
Copy link
Copy Markdown
Owner

@Dargon789 Dargon789 commented Jun 2, 2026

Summary by Sourcery

Expose explicit sponsorship and error signals from relayer fee endpoints and wire them through wallet clients, while adding a safe isSponsored helper for UIs and updating related packages and tooling.

New Features:

  • Add explicit sponsored and failed flags to relayer feeOptions and feeTokens responses and propagate them through all relayer implementations.
  • Introduce DappClient.isSponsored and ChainSessionManager.isSponsored helpers to safely detect sponsored transactions for a given chain.

Bug Fixes:

  • Ensure swallowed /FeeOptions and feeTokens errors are surfaced via failed flags and no longer misclassified as free sponsorship.
  • Set explicit sponsored:false on local and PK relayer options that never report sponsorship.

Enhancements:

  • Augment StandardRelayerOption with sponsored and failed metadata and re-export runtime type guards for narrowing relayer options.
  • Extend relayer tests to cover sponsorship propagation and error handling for feeOptions and feeTokens.

Build:

  • Bump turbo dev dependency from 2.9.8 to 2.9.14.

Documentation:

  • Document sponsorship behavior and new isSponsored helpers in dapp-client and WDK changelogs and comments.

Tests:

  • Add coverage for relayer sponsorship propagation and error handling in feeOptions and feeTokens tests.

Chores:

  • Bump versions of multiple @0xsequence packages to 3.0.11 / 3.1.0 to release relayer sponsorship fixes.

matt416 and others added 3 commits May 29, 2026 09:50
#1007)

* feat(relayer): propagate sponsored signal and mark swallowed errors

`RpcRelayer.feeOptions` now forwards the server's `sponsored: boolean` to
callers, and both `feeOptions` and `feeTokens` mark their swallowed-error
returns with `failed: true`. The `Relayer` interface and all bundled
implementations (Rpc, Sequence, Local, EIP6963, Pk) are widened to match.

Additive change: existing consumers ignoring the new fields are unaffected.
Downstream sponsorship classifiers should switch from `!feeOption` inference
to `sponsored === true` so a real subsidy is no longer indistinguishable
from a swallowed `/FeeOptions` error.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* feat(wallet-wdk): carry sponsored/failed on StandardRelayerOption

`StandardRelayerOption` gains optional `sponsored` and `failed` fields,
populated on both construction branches in `transactions.ts` from the
relayer SDK's new `feeOptions` return. `isStandardRelayerOption` /
`isERC4337RelayerOption` are re-exported so consumers can narrow before
reading the new fields.

UI consumers that classified sponsorship by "no fee option attached"
should switch to `sponsored === true` to distinguish a real subsidy from
a swallowed `/FeeOptions` error.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* feat(dapp-client): add isSponsored for explicit sponsorship checks

`DappClient.isSponsored(chainId, transactions)` and
`ChainSessionManager.isSponsored(calls)` return true only when the
relayer's `/FeeOptions` endpoint explicitly reports sponsorship; any
error, network failure, or absence of sponsorship returns false. A true
result is always safe to surface as "free gas" in UI.

Prefer this over inferring sponsorship from an empty `getFeeOptions`
array — a swallowed `/FeeOptions` error produces the same empty shape as
a real subsidy. `getFeeOptions` is unchanged.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Bumps [turbo](https://github.com/vercel/turborepo) from 2.9.8 to 2.9.14.
- [Release notes](https://github.com/vercel/turborepo/releases)
- [Changelog](https://github.com/vercel/turborepo/blob/main/RELEASE.md)
- [Commits](vercel/turborepo@v2.9.8...v2.9.14)

---
updated-dependencies:
- dependency-name: turbo
  dependency-version: 2.9.14
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@codesandbox
Copy link
Copy Markdown

codesandbox Bot commented Jun 2, 2026

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Jun 2, 2026

Reviewer's Guide

Propagates explicit sponsorship and error signals from relayer fee endpoints through the relayer interface, wallet WDK, and dapp client, and adds a high-level isSponsored API, while bumping turbo and publishing patch/minor releases of affected packages.

Sequence diagram for DappClient.isSponsored flow using relayer.feeOptions

sequenceDiagram
  participant DappClient
  participant ChainSessionManager
  participant Relayer

  DappClient->>DappClient: getOrInitializeChainManager(chainId)
  DappClient->>ChainSessionManager: isSponsored(transactions)

  ChainSessionManager->>ChainSessionManager: _buildAndSignCalls(callsToSend)
  ChainSessionManager->>ChainSessionManager: _fingerprintCalls(callsToSend)

  ChainSessionManager->>Relayer: feeOptions(walletAddress, chainId, signedCall.to, callsToSend, signedCall.data)
  Relayer-->>ChainSessionManager: { options, quote, sponsored, failed }

  alt [feeOptions.sponsored === true && !feeOptions.failed]
    ChainSessionManager-->>DappClient: true
  else [otherwise or on error]
    ChainSessionManager-->>DappClient: false
  end
Loading

File-Level Changes

Change Details Files
Extend relayer interfaces and implementations to surface sponsorship and error state from feeOptions/feeTokens and add tests for the new behavior.
  • Relayer interface feeTokens return type now includes an optional failed flag to indicate swallowed server/transport errors.
  • Relayer interface feeOptions return type now includes sponsored and optional failed flags, and all concrete relayers (RpcRelayer, SequenceRelayer, LocalRelayer, EIP6963Relayer, PkRelayer) are updated to match.
  • RpcRelayer.feeOptions now forwards sponsored from the server response and returns sponsored:false, failed:true on errors instead of silently returning an empty options array.
  • RpcRelayer.feeTokens now returns failed:true on errors and logs a warning.
  • LocalRelayer.feeOptions now returns an explicit sponsored:false instead of omitting the field.
  • SequenceRelayer.feeOptions now forwards sponsored from the underlying service.feeOptions call.
  • EIP6963Relayer and PkRelayer are updated to pass through the widened feeTokens and feeOptions results.
  • Relayer tests are extended to assert sponsored propagation and failed semantics for feeOptions and feeTokens.
packages/services/relayer/src/relayer/relayer.ts
packages/services/relayer/src/relayer/rpc-relayer/index.ts
packages/services/relayer/src/relayer/standard/sequence.ts
packages/services/relayer/src/relayer/standard/local.ts
packages/services/relayer/src/relayer/standard/eip6963.ts
packages/services/relayer/src/relayer/standard/pk-relayer.ts
packages/services/relayer/test/relayer/relayer.test.ts
Expose sponsorship/error metadata on StandardRelayerOption and wire it through transaction construction with additional tests.
  • StandardRelayerOption type now includes optional sponsored and failed fields to carry relayer-level sponsorship and error state down to the wallet layer.
  • Transactions sequence implementation now sets sponsored and failed on the synthetic empty StandardRelayerOption and on each mapped option from feeOptions.
  • Transactions tests assert that for LocalRelayer/PkRelayer sponsored is explicitly false and failed is undefined, ensuring deterministic semantics for relayers that never sponsor.
packages/wallet/wdk/src/sequence/types/transaction-request.ts
packages/wallet/wdk/src/sequence/types/index.ts
packages/wallet/wdk/src/sequence/transactions.ts
packages/wallet/wdk/test/transactions.test.ts
Add high-level isSponsored helpers on ChainSessionManager and DappClient that rely on the explicit sponsored signal instead of inferring from empty fee options.
  • ChainSessionManager gains an isSponsored(calls) method that builds/signs calls, caches the signed payload fingerprint, invokes relayer.feeOptions, and returns true only when feeOptions.sponsored is true and not failed.
  • ChainSessionManager.isSponsored wraps its logic in a try/catch, logs a warning on failure, and returns false on any error or missing wallet address.
  • DappClient adds an isSponsored(chainId, transactions) method that delegates to ChainSessionManager.isSponsored, with documentation recommending it over inferring sponsorship from getFeeOptions results.
packages/wallet/dapp-client/src/ChainSessionManager.ts
packages/wallet/dapp-client/src/DappClient.ts
Document the sponsorship/error-signal behavior and new APIs in package changelogs and bump package versions accordingly.
  • @0xsequence/relayer changelog documents the new sponsored and failed fields on feeOptions/feeTokens and their semantics, version bumped to 3.1.0.
  • @0xsequence/wallet-wdk changelog documents propagation of sponsored/failed through StandardRelayerOption and re-export of runtime type guards, version bumped to 3.1.0.
  • @0xsequence/dapp-client changelog documents the new isSponsored APIs and guidance on using them, version bumped to 3.1.0.
  • Multiple service and wallet packages (api, builder, guard, identity-instrument, indexer, marketplace, metadata, userdata, abi, wallet-core, wallet-primitives) have patch-level version bumps referencing the relayer sponsored-fees fix.
packages/services/relayer/CHANGELOG.md
packages/wallet/wdk/CHANGELOG.md
packages/wallet/dapp-client/CHANGELOG.md
packages/services/api/CHANGELOG.md
packages/services/builder/CHANGELOG.md
packages/services/guard/CHANGELOG.md
packages/services/identity-instrument/CHANGELOG.md
packages/services/indexer/CHANGELOG.md
packages/services/marketplace/CHANGELOG.md
packages/services/metadata/CHANGELOG.md
packages/services/userdata/CHANGELOG.md
packages/utils/abi/CHANGELOG.md
packages/wallet/core/CHANGELOG.md
packages/wallet/primitives/CHANGELOG.md
Update build tooling and package versions to align with the new release.
  • Root devDependency on turbo is bumped from 2.9.8 to 2.9.14.
  • Package.json versions for relayer, wallet-core, dapp-client, wallet-wdk, wallet-primitives, services, and utils are updated to the new patch/minor versions.
  • Lockfile is updated to reflect the new turbo and internal package versions.
package.json
packages/services/api/package.json
packages/services/builder/package.json
packages/services/guard/package.json
packages/services/identity-instrument/package.json
packages/services/indexer/package.json
packages/services/marketplace/package.json
packages/services/metadata/package.json
packages/services/relayer/package.json
packages/services/userdata/package.json
packages/utils/abi/package.json
packages/wallet/core/package.json
packages/wallet/dapp-client/package.json
packages/wallet/primitives/package.json
packages/wallet/wdk/package.json
pnpm-lock.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@snyk-io
Copy link
Copy Markdown

snyk-io Bot commented Jun 2, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@mergify
Copy link
Copy Markdown

mergify Bot commented Jun 2, 2026

⚠️ The sha of the head commit of this PR conflicts with #639. Mergify cannot evaluate rules on this PR. Once #639 is merged or closed, Mergify will resume processing this PR. ⚠️

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 2 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="packages/services/relayer/src/relayer/standard/sequence.ts" line_range="20-24" />
<code_context>
   }

-  async feeTokens(): Promise<{ isFeeRequired: boolean; tokens?: RpcFeeToken[]; paymentAddress?: Address.Address }> {
+  async feeTokens(): Promise<{
+    isFeeRequired: boolean
+    tokens?: RpcFeeToken[]
+    paymentAddress?: Address.Address
+    failed?: boolean
+  }> {
     try {
</code_context>
<issue_to_address>
**issue (bug_risk):** SequenceRelayer’s `feeTokens` does not surface the new `failed` signal, which may lead to inconsistent error-handling compared to RpcRelayer.

`RpcRelayer.feeTokens` now maps transport errors to `{ isFeeRequired: false, failed: true }`, but `SequenceRelayer.feeTokens` still awaits `this.service.feeTokens()` directly and will throw on network errors without setting `failed`. This means callers relying on the `failed` flag will see different behaviour between relayers.

Consider either wrapping `this.service.feeTokens()` in a try/catch and returning `{ isFeeRequired: false, failed: true }` on failure (to match `RpcRelayer`), or explicitly standardizing/documenting that some relayers throw while others use the flag, and updating callers accordingly, to avoid subtle relayer-specific error-handling paths.
</issue_to_address>

### Comment 2
<location path="packages/services/relayer/test/relayer/relayer.test.ts" line_range="405-418" />
<code_context>
+      expect(result.failed).toBeUndefined()
+    })
+
+    it('should return sponsored:false and failed:true when the server errors', async () => {
+      const warn = vi.spyOn(console, 'warn').mockImplementation(() => {})
+      const fetchImpl = vi.fn(
+        async () =>
+          new Response(JSON.stringify({ error: 'Aborted', code: 1005, msg: 'simulation failed' }), { status: 400 }),
+      )
+      const relayer = new Relayer.RpcRelayer('https://relayer.test', TEST_CHAIN_ID, 'https://rpc.test', fetchImpl)
+
+      const result = await relayer.feeOptions(TEST_WALLET_ADDRESS, TEST_CHAIN_ID, TEST_TO_ADDRESS, [mockCall])
+
+      expect(result).toEqual({ options: [], sponsored: false, failed: true })
+      expect(warn).toHaveBeenCalled()
+      warn.mockRestore()
+    })
</code_context>
<issue_to_address>
**suggestion (testing):** Add a test for network/transport errors in `RpcRelayer.feeOptions` to cover the catch branch when `fetch` rejects, not just when it returns an error HTTP response.

This test covers the 4xx + error-payload path. There’s also a separate failure mode where `fetchImpl` rejects (e.g. network error/timeout) instead of returning a `Response`. Please add a test that uses `vi.fn().mockRejectedValue(new Error('network failure'))` for `fetchImpl` and asserts that `feeOptions` still returns `{ options: [], sponsored: false, failed: true }` and logs a warning, to cover that branch of the `catch` block.

```suggestion
    it('should return sponsored:false and failed:true when the server errors', async () => {
      const warn = vi.spyOn(console, 'warn').mockImplementation(() => {})
      const fetchImpl = vi.fn(
        async () =>
          new Response(JSON.stringify({ error: 'Aborted', code: 1005, msg: 'simulation failed' }), { status: 400 }),
      )
      const relayer = new Relayer.RpcRelayer('https://relayer.test', TEST_CHAIN_ID, 'https://rpc.test', fetchImpl)

      const result = await relayer.feeOptions(TEST_WALLET_ADDRESS, TEST_CHAIN_ID, TEST_TO_ADDRESS, [mockCall])

      expect(result).toEqual({ options: [], sponsored: false, failed: true })
      expect(warn).toHaveBeenCalled()
      warn.mockRestore()
    })

    it('should return sponsored:false and failed:true when the network request fails', async () => {
      const warn = vi.spyOn(console, 'warn').mockImplementation(() => {})
      const fetchImpl = vi.fn().mockRejectedValue(new Error('network failure'))

      const relayer = new Relayer.RpcRelayer('https://relayer.test', TEST_CHAIN_ID, 'https://rpc.test', fetchImpl)

      const result = await relayer.feeOptions(TEST_WALLET_ADDRESS, TEST_CHAIN_ID, TEST_TO_ADDRESS, [mockCall])

      expect(result).toEqual({ options: [], sponsored: false, failed: true })
      expect(warn).toHaveBeenCalled()
      warn.mockRestore()
    })
```
</issue_to_address>

Fix all in Cursor


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread packages/services/relayer/src/relayer/standard/sequence.ts
Comment thread packages/services/relayer/test/relayer/relayer.test.ts
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces explicit sponsorship signals and error tracking across the relayer services, dapp-client, and WDK packages. Specifically, the Relayer interface's feeOptions now returns a sponsored boolean and a failed flag, while feeTokens includes a failed flag to distinguish swallowed errors from actual zero-fee scenarios. A new isSponsored helper has been added to DappClient and ChainSessionManager to safely check for active sponsorship. Feedback on these changes suggests defaulting the sponsored field to false if it is missing from server or service responses to guarantee type safety, and providing a default value of BigInt(0) for tx.value in ChainSessionManager to prevent potential serialization issues.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/wallet/dapp-client/src/ChainSessionManager.ts
Comment thread packages/services/relayer/src/relayer/rpc-relayer/index.ts
Comment thread packages/services/relayer/src/relayer/standard/sequence.ts
@Dargon789 Dargon789 merged commit 936d1da into Dargon789:wagmi Jun 3, 2026
25 of 27 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.

Sequence diagram for DappClient.isSponsored flow using relayer.feeOptions Sequence diagram for explicit sponsorship check via DappClient.isSponsored

3 participants