Skip to content

improve CelerWallet#8

Merged
hhl42 merged 4 commits into
mainfrom
celerwallet-review
May 9, 2026
Merged

improve CelerWallet#8
hhl42 merged 4 commits into
mainfrom
celerwallet-review

Conversation

@hhl42

@hhl42 hhl42 commented May 9, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI 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.

Pull request overview

This PR refactors and hardens the CelerWallet contract API and internals, updating the surrounding ledger libraries, tests, invariants, and documentation to match the new naming and operator-voting semantics.

Changes:

  • Renamed CelerWallet/ICelerWallet functions, getters, and events (e.g., getBalancebalanceOf, transferToWallettransferBetweenWallets, proposeNewOperatorvoteForOperator).
  • Added an owner-count cap (MAX_OWNERS) enforced at wallet creation, plus a new TooManyOwners custom error to bound loop costs in owner/vote-related logic.
  • Updated tests (including invariants) and gas snapshot logs to reflect the refactor and measured gas changes.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/invariants/handlers/ChannelHandler.sol Updates invariant helper to use balanceOf getter.
test/invariants/ChannelInvariants.t.sol Updates invariant checks to use balanceOf.
test/gas_logs/fine_granularity/DepositEthInBatch.txt Updates measured gas numbers.
test/gas_logs/CelerLedger-Migrate.txt Updates measured migration gas numbers.
test/gas_logs/CelerLedger-ETH.txt Updates measured deploy/call gas numbers.
test/gas_logs/CelerLedger-ERC20.txt Updates measured ERC20 gas numbers.
test/CelerWallet.t.sol Renames events/APIs in tests and adds coverage for MAX_OWNERS and vote/clearing behavior.
test/CelerLedger.Migrate.t.sol Updates operator getter call to walletOperator.
src/lib/ledgerlib/LedgerOperation.sol Updates wallet transfer call to transferBetweenWallets.
src/lib/ledgerlib/LedgerMigrate.sol Updates operator getter call to walletOperator.
src/lib/AgentPayErrors.sol Adds TooManyOwners custom error.
src/interfaces/ICelerWallet.sol Renames API surface and updates NatSpec/events accordingly.
src/CelerWallet.sol Implements new API names, adds MAX_OWNERS cap, and refactors operator voting state.
docs/contracts.md Updates wallet API/event names in docs (but has stale source line anchors).
docs/architecture-summary.md Updates migration/operator-vote terminology reference.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/contracts.md Outdated
Comment thread src/CelerWallet.sol Outdated
@hhl42 hhl42 merged commit 178471a into main May 9, 2026
2 checks passed
@hhl42 hhl42 deleted the celerwallet-review branch May 9, 2026 00:47
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.

2 participants