-
Notifications
You must be signed in to change notification settings - Fork 230
feat: ERC-4337-compatible passkey (P-256) account system #2443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a comprehensive passkey signing system for the Nibiru EVM, including smart contracts, a TypeScript SDK, and deployment tooling. The changes are well-structured and cover a lot of ground. My review focuses on several areas for improvement:
- Gas Efficiency: The
evm-e2ePasskeyAccountFactorycontract should use the clone pattern for significant gas savings, similar to itsevm-forgecounterpart. - SDK Portability & Performance: The TypeScript SDK can be improved by removing Node.js-specific dependencies for better browser support and by optimizing resource usage in the bundler interaction logic.
- Code Clarity & Robustness: Some of the scripts and SDK code can be made more maintainable and robust with minor refactoring and by adding cleanup logic.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2443 +/- ##
==========================================
+ Coverage 59.21% 59.26% +0.04%
==========================================
Files 359 360 +1
Lines 24254 24281 +27
==========================================
+ Hits 14362 14389 +27
Misses 8660 8660
Partials 1232 1232
🚀 New features to boost your workflow:
|
This pull request introduces a new passkey-based ERC-4337 account abstraction flow for Nibiru EVM end-to-end tests, including new smart contracts, a TypeScript SDK for passkey operations, and updated documentation and tooling. It adds a minimal ERC-4337 account contract secured by P-256 signatures, a factory for deploying such accounts, and a Hardhat/TypeScript SDK for testing and interacting with the flow. The documentation is expanded to guide users through setup, deployment, and testing. Several dependency and configuration changes ensure compatibility and smooth development.
ERC-4337 Passkey Account Implementation:
PasskeyAccountandPasskeyAccountFactorycontracts implementing a minimal ERC-4337 account abstraction secured by P-256 public keys and signatures, with a factory for deploying minimal-proxy clones. (evm-e2e/contracts/passkey/PasskeyAccount.sol)EntryPointV06tagging the EntryPoint implementation with a version string for bundler compatibility. (evm-e2e/contracts/passkey/EntryPointV06.sol)evm-e2e/contracts/passkey/UserOperation.sol,evm-e2e/contracts/passkey/interfaces/IEntryPoint.sol) [1] [2]Passkey SDK Addition:
passkey-sdkpackage with TypeScript code for passkey-based user operation construction, bundler interaction, and utilities, including scripts for local bundler operation and E2E tests. (evm-e2e/passkey-sdk/package.json,evm-e2e/passkey-sdk/src/bundler.ts,evm-e2e/passkey-sdk/src/index.ts) [1] [2] [3]Documentation and Developer Tooling:
README.mdwith detailed instructions for installing dependencies, deploying the passkey account factory, running a bundler, and executing E2E tests for the passkey ERC-4337 flow. (evm-e2e/README.md) [1] [2]justfile,package.json) and addresses for new contracts (.entrypoint.addr,.passkeyfactory.addr). [1] [2] [3] [4]Build and Dependency Configuration:
evm-e2e/hardhat.config.ts,evm-e2e/hardhat.config.js) [1] [2]@account-abstraction/contracts@0.6.0and reverted@openzeppelin/contractsto4.9.6for compatibility. (evm-e2e/package.json,evm-e2e/package-lock.json) [1] [2] [3] [4] [5]Addresses and Scripts:
evm-e2e/.entrypoint.addr,evm-e2e/.passkeyfactory.addr) [1] [2]evm-e2e/package.json)These changes collectively enable end-to-end testing and development of passkey-secured ERC-4337 accounts on Nibiru EVM, with a modern SDK and streamlined developer experience.