Skip to content

Sequence diagram for building fee options stub signature in wallet execution #557

@Dargon789

Description

@Dargon789

Reviewer's Guide

Implements a proper stubbed signature for wallet fee options transactions, updates corresponding tests, introduces a pnpm workspace-wide minimum package release age, and bumps internal package and tooling versions (including Next.js and pnpm) to 3.0.9 / latest while documenting fee options fixes in various CHANGELOGs.

Sequence diagram for building fee options stub signature in wallet execution

sequenceDiagram
actor Developer
participant Wallet
participant Provider
participant FeeOptionsTopologyBuilder as FeeOptionsTopologyBuilder
participant Config
participant SequenceSignature
participant Bytes

Developer->>Wallet: call executeWithFeeOptions(provider, payload)
Wallet->>Provider: getStatus()
Provider-->>Wallet: WalletStatusWithOnchain
Wallet->>FeeOptionsTopologyBuilder: buildFeeOptionsStubSignature(status)
FeeOptionsTopologyBuilder->>Config: stubFeeOptionsTopology(status.configuration.topology)
Config-->>FeeOptionsTopologyBuilder: transformed_topology
FeeOptionsTopologyBuilder->>SequenceSignature: encodeSignature(options_with_stubbed_topology)
SequenceSignature-->>FeeOptionsTopologyBuilder: rawSignatureBytes
FeeOptionsTopologyBuilder->>Bytes: toHex(rawSignatureBytes)
Bytes-->>FeeOptionsTopologyBuilder: stubSignatureHex
FeeOptionsTopologyBuilder-->>Wallet: stubSignatureHex
Wallet->>Wallet: encode execute call data with payload and stubSignatureHex
Wallet-->>Developer: to, data for fee options transaction
Loading

Class diagram for wallet fee options stub signature generation

classDiagram
class Wallet {
}

class FeeOptionsTopologyBuilder {
  +stubFeeOptionsTopology(topology)
  +buildFeeOptionsStubSignature(status)
}

class FeeOptionsStubSignature {
  +type
  +r
  +s
  +yParity
}

class WalletStatusWithOnchain {
  +chainId
  +configuration
  +pendingUpdates
}

class Configuration {
  +topology
}

class Topology {
}

class PendingUpdate {
  +signature
}

class SequenceSignature {
  +encodeSignature(options)
}

class Bytes {
  +toHex(data)
}

class Config {
  +isSignerLeaf(topology)
  +isNestedLeaf(topology)
}

Wallet ..> FeeOptionsTopologyBuilder : uses
FeeOptionsTopologyBuilder ..> FeeOptionsStubSignature : embeds
FeeOptionsTopologyBuilder ..> Config : inspects_topology
FeeOptionsTopologyBuilder ..> SequenceSignature : encodeSignature
FeeOptionsTopologyBuilder ..> Bytes : toHex
FeeOptionsTopologyBuilder ..> WalletStatusWithOnchain : reads
WalletStatusWithOnchain o-- Configuration : has
WalletStatusWithOnchain o-- PendingUpdate : has_many
Configuration o-- Topology : has
Loading

File-Level Changes

Change Details Files
Replace hardcoded fee options signature placeholder with a topology-aware stub signature derived from wallet status.
  • Introduce a constant stub signature compatible with SequenceSignature.SignatureOfSignerLeaf for fee options usage.
  • Add a recursive helper to traverse and rewrite configuration topology into an unrecovered-signer tree carrying the stub signature while preserving weights, thresholds, and nested structures.
  • Add a builder function that encodes the modified configuration and pending update signatures into a hex-encoded RawTopology signature.
  • Update Wallet.buildFeeOptionsTransaction to use the new stub-signature builder instead of the '0x0001' literal.
packages/wallet/core/src/wallet.ts
Align wallet fee options tests with the new stub signature encoding.
  • Define an expected stub signature constant that matches the new encoding semantics.
  • Update existing test expectations for buildFeeOptionsTransaction to assert against the new stub signature for both deployed and guest wallet scenarios.
packages/wallet/core/test/wallet-fee-options.test.ts
Enforce a pnpm workspace-level minimum release age and upgrade core tooling versions.
  • Add minimumReleaseAge configuration to pnpm-workspace.yaml to prevent installing package releases younger than two weeks, with comments warning against modification.
  • Bump root package.json packageManager to pnpm@10.33.4.
  • Upgrade Next.js dependency from 15.5.14 to 15.5.15 in docs and web extras packages.
pnpm-workspace.yaml
package.json
extras/docs/package.json
extras/web/package.json
Release and propagate fee options fixes across internal packages.
  • Bump multiple internal package versions from 3.0.7 to 3.0.9 to capture fee options-related fixes.
  • Update corresponding CHANGELOG.md files for affected services, wallet, and utility packages with 3.0.8 and 3.0.9 entries documenting fee options fixes and dependency updates.
  • Ensure dependency graphs reference the new 3.0.8/3.0.9 versions (e.g., guard, relayer, wallet-core, wallet-primitives).
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
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/relayer/CHANGELOG.md
packages/services/userdata/CHANGELOG.md
packages/utils/abi/CHANGELOG.md
packages/wallet/core/CHANGELOG.md
packages/wallet/dapp-client/CHANGELOG.md
packages/wallet/primitives/CHANGELOG.md

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

Originally posted by @sourcery-ai[bot] in #556 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

In Review

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions