Skip to content

feat(aggregator): add IWalletAggregator interface and wallet validation path#8

Merged
hooftly merged 1 commit intomainfrom
develop
Sep 9, 2025
Merged

feat(aggregator): add IWalletAggregator interface and wallet validation path#8
hooftly merged 1 commit intomainfrom
develop

Conversation

@hooftly
Copy link
Member

@hooftly hooftly commented Sep 9, 2025

Summary

This PR introduces a dedicated IWalletAggregator interface and wires the
PQCWallet validation flow to support optional aggregator-based signature
verification. It also adds a mock aggregator and deterministic tests to ensure
the forceOnChainVerify flag behaves as intended.

Changes

  • Added IWalletAggregator interface for wallet aggregators.
  • Updated PQCWallet.validateUserOp to call the aggregator when on-chain
    verification is disabled, bypassing the signature-length gate.
  • Introduced mock aggregator that reverts on validateUserOp calls to signal
    aggregator path usage in tests.
  • Added deterministic tests:
    • forceOnChainVerify enabled → aggregator disabled.
    • forceOnChainVerify disabled → aggregator sentinel returned, mock revert hit.

Motivation

This work provides a clean contract interface for aggregators and lays the
groundwork for future integrations, while ensuring deterministic control
through the forceOnChainVerify flag. The mock aggregator and tests provide
strong guardrails around path selection.

Testing

  • forge build
  • forge test -vv

Checklist

  • Tests added or updated
  • Docs updated
  • Lint checks pass
  • Ready for review.

…idation path

- Added dedicated IWalletAggregator interface and wired PQCWallet.validateUserOp
  to invoke it whenever on-chain verification is disabled, bypassing signature-
  length gate.
- Introduced mock aggregator that reverts on validateUserOp calls to clearly
  signal aggregator path during testing.
- Created deterministic tests verifying that forceOnChainVerify disables
  aggregator usage, while disabling the flag returns the aggregator sentinel
  and triggers the mock’s revert.
- Defined minimal IWalletAggregator interface to support compilation and
  future integrations.
@hooftly hooftly merged commit bfa4239 into main Sep 9, 2025
2 checks passed
@hooftly hooftly deleted the develop branch September 9, 2025 18:59
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