This repository is the canonical reference implementation of ERC-4337 (Ethereum Account Abstraction) by the standard's authors. It provides a singleton EntryPoint contract that coordinates validation, execution, and gas accounting for UserOperations. The codebase includes abstract base contracts for accounts and paymasters, production-grade sample accounts (SimpleAccount, Simple7702Account), libraries for packed UserOperation hashing and EIP-7702 support, and extensive test and simulation infrastructure. It is deployed on Ethereum mainnet and supports paymasters, signature aggregators, counterfactual deployment via CREATE2, and EIP-7702 delegated code. The architecture is modular: core logic is separated into libraries (UserOperationLib, Helpers, Exec, Eip7702Support) and abstract contracts (BaseAccount, BasePaymaster, StakeManager, NonceManager) that can be reused in custom implementations. Gas optimization is a key focus, with patterns like transient storage, packed storage, and a custom nonReentrant guard. While the repo is tightly coupled to the EntryPoint's design, individual libraries and base contracts are reusable in any ERC-4337 integration.
This repository is a Hardhat-based template for developing Solidity smart contracts. It provides a pre-configured development environment with sensible defaults for compilation, testing, linting, and deployment. The core functionality is demonstrated through a simple `Lock` contract that implements a time-locked withdrawal mechanism, complete with custom errors, events, and comprehensive tests. The template integrates TypeChain for TypeScript bindings, Ethers.js for Ethereum interactions, and various tooling like Solhint, Prettier, and Solcover. It is not a production application but a starting point for new Solidity projects, emphasizing best practices and developer experience.
Rocket Pool is a decentralized Ethereum liquid staking protocol. The repository contains the complete smart contract system for the protocol, including staking contracts (minipools and megapools), the rETH liquid staking token, node operator onboarding, DAO governance, and a custom RocketStorage key-value storage layer. The codebase is built on Hardhat with comprehensive test coverage, deployment scripts for multiple chains, and a mix of Solidity 0.7.6 (legacy) and 0.8.30 (new) contracts. The architecture follows an upgradeable proxy pattern where contracts fetch the latest implementation address from RocketStorage via getContractAddress(name). The protocol supports two concurrent validator systems: the legacy RocketMinipoolDelegate (0.7.6) and the newer RocketMegapoolDelegate (0.8.30). The test suite is extensive, covering deployment, staking flows, DAO governance, and edge cases, but includes several test-only contracts and helpers explicitly marked not for production use. Notable strengths include production-grade Solidity practices (explicit version pragmas, constant definitions, event emission, role-based access control), event-driven logging for off-chain tracking, and a comprehensive test suite. Notable concerns include mixed Solidity versions, potential reentrancy in some external calls, test-only contracts mixed with production code, and complex settings validation logic that may be brittle.