Skip to content

Finish the MVP#3

Merged
cpb8010 merged 14 commits intomainfrom
lyova-migration
Aug 29, 2025
Merged

Finish the MVP#3
cpb8010 merged 14 commits intomainfrom
lyova-migration

Conversation

@ly0va
Copy link
Member

@ly0va ly0va commented Aug 15, 2025

  • migrate AllowedSessionsValidator.sol
  • add ERC7739 signature verification
  • add MSA factory
  • add deploy script prototype
  • add more tests
  • clean up

@cpb8010 cpb8010 requested a review from Copilot August 17, 2025 20:59
Copy link
Contributor

Copilot AI left a comment

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 completes the MVP implementation for a modular smart account system with session-based authentication. The main purpose is to finalize core functionality including ERC7739 signature verification, factory deployment patterns, and comprehensive session validation.

  • Migrate the AllowedSessionsValidator with session registry management and access control
  • Add ERC7739-compliant signature verification for improved security and replay protection
  • Implement MSA factory pattern with beacon proxy deployment for upgradeable accounts

Reviewed Changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
test/mocks/*.sol Mock contracts for testing targets, ERC20 tokens, ERC1271 validation, and delegate calls
test/Utils.t.sol Utility tests for execution encoding/decoding and mode handling
test/Sessions.t.sol Refactored session tests using new MSATest base class with improved test structure
test/MSATest.sol Base test class providing common MSA setup and user operation utilities
test/Basic.t.sol Comprehensive basic functionality tests including transfers, executions, and signature validation
src/utils/MSAProxy.sol Removed legacy proxy implementation
src/modules/contrib/AllowedSessionsValidator.sol New validator with session registry management and access control
src/modules/WebAuthnValidator.sol Updated with proper ERC1271 support and improved validation logic
src/modules/SessionKeyValidator.sol Enhanced with better error handling and nonce validation
src/modules/EOAKeyValidator.sol Improved with proper event emission and error handling
src/libraries/SessionLib.sol Enhanced session validation logic with better time range handling
src/libraries/Initializable.sol Removed custom initializable implementation
src/interfaces/IMSA.sol Updated interface for multi-validator initialization
src/core/ModuleManager.sol Improved error handling and validation logic
src/core/ERC1271Handler.sol New ERC7739-compliant signature handler
src/core/AccountBase.sol Simplified with hardcoded EntryPoint address
src/ModularSmartAccount.sol Major refactor integrating ERC1271Handler and OpenZeppelin Initializable
src/MSAFactory.sol New factory for deploying beacon proxy accounts
script/Deploy.s.sol Deployment script for the complete system
foundry.toml Reduced optimizer runs for faster compilation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@cpb8010 cpb8010 added the enhancement New feature or request label Aug 17, 2025
@cpb8010 cpb8010 self-requested a review August 17, 2025 21:13
cpb8010
cpb8010 previously approved these changes Aug 17, 2025
Copy link
Contributor

@cpb8010 cpb8010 left a comment

Choose a reason for hiding this comment

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

Open questions, but otherwise looks good

ly0va and others added 2 commits August 20, 2025 00:59
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

@cpb8010 cpb8010 left a comment

Choose a reason for hiding this comment

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

Looks like lots of stuff works!

@cpb8010 cpb8010 enabled auto-merge (squash) August 28, 2025 15:26
@cpb8010 cpb8010 merged commit 3582df8 into main Aug 29, 2025
6 checks passed
@cpb8010 cpb8010 deleted the lyova-migration branch August 29, 2025 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants