Skip to content

feat(wallet): Add PQCWallet ABI, constants, and chain-aware deployment script#4

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

feat(wallet): Add PQCWallet ABI, constants, and chain-aware deployment script#4
hooftly merged 1 commit intomainfrom
develop

Conversation

@hooftly
Copy link
Member

@hooftly hooftly commented Sep 1, 2025

Summary

Introduces the ABI and constants for the PQCWallet contract, improves documentation and helper functions within the wallet, and updates the deployment script to automatically resolve the correct EntryPoint address for Base networks.

Changes

  • ABI
    • Added smart-contracts/abi/PQCWallet.json with the complete ABI for the PQCWallet.
  • Contract
    • Expanded NatSpec documentation for constructor and core functions.
    • Added depositToEntryPoint() to fund the EntryPoint directly.
    • Explicit receive() function for plain ETH transfers.
    • Emit WOTSCommitmentsUpdated consistently on rotation and staging of new WOTS keys.
  • Constants
    • Created contracts/constants/EntryPoint.sol with canonical EntryPoint addresses for Base Mainnet and Base Sepolia.
  • Deployment Script
    • Updated Deploy.s.sol to import canonical addresses.
    • Auto-detects chain via chainid (8453 = Base Mainnet, 84532 = Base Sepolia).
    • Removes placeholder address and reverts on unsupported chains.
    • Deploys wallet with demo WOTS commitments and logs deployed address.

Motivation

This update provides clients and integration tooling with a canonical ABI, locks EntryPoint addresses into constants for reproducibility, and eliminates manual intervention during deployment. The documentation improvements clarify contract usage, while helper functions improve UX for funding and operation.

Testing

  • Verified ABI matches deployed contract interface.
  • Confirmed Deploy script resolves correct EntryPoint on Base Sepolia (84532) and Base Mainnet (8453).
  • Local forge build/test runs successfully with updated contract and script.

Checklist

  • ABI added
  • Contract updated with docs and helpers
  • EntryPoint constants defined
  • Deploy script updated
  • Builds & tests cleanly

- Add `abi/PQCWallet.json` containing full ABI for PQCWallet contract
- Expand PQCWallet contract with NatSpec docs, events, and helper methods:
  - Document constructor, `validateUserOp`, `execute`, `executeBatch`, and ETH handling
  - Add `depositToEntryPoint()` and explicit payable `receive()`
  - Emit `WOTSCommitmentsUpdated` on rotation and staging
- Introduce `contracts/constants/EntryPoint.sol` with canonical Base mainnet & Sepolia addresses
- Update `Deploy.s.sol` to:
  - Import canonical EntryPoint addresses
  - Select correct address based on `chainid` (8453 = mainnet, 84532 = sepolia)
  - Remove placeholder constant, revert on unsupported chains
  - Deploy PQCWallet with demo WOTS key commitments and log deployed address

Rationale: ensures ABI availability for clients, locks in EntryPoint addresses,
adds clearer wallet lifecycle documentation, and makes deployment scripts
chain-aware for both testing and production.
@hooftly hooftly merged commit 9db5cab into main Sep 1, 2025
2 checks passed
@hooftly hooftly deleted the develop branch September 1, 2025 19:39
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