Modular smart account framework implementing ERC-4337 and ERC-7579
Vortex is a modular smart account implementation built on ERC-7579 and ERC-4337, designed for extensibility, modularity, and minimalism. It provides a flexible framework for validating user operations and executing arbitrary logic using plug-and-play modules.
For more detailed information, you can read the full article at Vortex: Account Abstraction
This repository contains the smart contracts for the Vortex Smart Account system, compliant with both ERC-7579 (modular account abstraction) and ERC-4337 (account abstraction via alt mempool).
It enables customizable validation, execution, and fallback behavior via modules, allowing developers to compose smart accounts tailored to their use cases.
The architecture of Vortex Account Abstraction is designed to be modular, flexible, and secure, with each smart account being composed of independent modules for validation, execution, and runtime logic. Below is a high-level overview of the core components and their interactions.
- Vortex: Handles the account’s core functionality, including interacting with modules, validating user operations, and executing transactions.
- AccountCore: Base contract implementing the ERC-7579 module interface and ERC-4337 compatibility.
- ModuleManager: Manages the registration and resolution of modules per type.
Enables the creation of modular smart accounts via a factory pattern, adhering to ERC-4337 and ERC-7579 specifications. Below is a list of available factories included in this repository.
The Vortex smart account is designed around ERC-7579 modules that plug into the account’s core functionality. Each module serves a specific purpose—validation, execution, or fallback handling—and can be enabled or disabled independently. Below is a list of available modules included in this repository.
Modules responsible for verifying user operations before execution.
Modules responsible for executing transactions on behalf of the smart account via a callback.
Modules responsible for extending the fallback functionality of a smart account.
You can checkout the deployment information here
Create .env file with the following variables:
# EOA
MNEMONIC="YOUR_MNEMONIC"
PRIVATE_KEY="YOUR_PRIVATE_KEY"
EOA_INDEX=0 # Optional (Default to 0)
# RPC URL Using Alchemy
RPC_API_KEY="YOUR_ALCHEMY_API_KEY"
ETHEREUM_RPC_URL="https://eth-mainnet.g.alchemy.com/v2/${RPC_API_KEY}"
OPTIMISM_RPC_URL="https://opt-mainnet.g.alchemy.com/v2/${RPC_API_KEY}"
POLYGON_RPC_URL="https://polygon-mainnet.g.alchemy.com/v2/${RPC_API_KEY}"
BASE_RPC_URL="https://base-mainnet.g.alchemy.com/v2/${RPC_API_KEY}"
ARBITRUM_RPC_URL="https://arb-mainnet.g.alchemy.com/v2/${RPC_API_KEY}"
# RPC URL Using Infura
RPC_API_KEY="YOUR_INFURA_API_KEY"
ETHEREUM_RPC_URL="https://mainnet.infura.io/v3/${RPC_API_KEY}"
OPTIMISM_RPC_URL="https://optimism-mainnet.infura.io/v3/${RPC_API_KEY}"
POLYGON_RPC_URL="https://polygon-mainnet.infura.io/v3/${RPC_API_KEY}"
BASE_RPC_URL="https://base-mainnet.infura.io/v3/${RPC_API_KEY}"
ARBITRUM_RPC_URL="https://arbitrum-mainnet.infura.io/v3/${RPC_API_KEY}"
# Etherscan
ETHERSCAN_API_KEY_ETHEREUM="YOUR_ETHERSCAN_API_KEY"
ETHERSCAN_URL_ETHEREUM="https://api.etherscan.io/api"
ETHERSCAN_URL_SEPOLIA="https://api-sepolia.etherscan.io/api"
ETHERSCAN_API_KEY_OPTIMISM="YOUR_OPTIMISTIC_ETHERSCAN_API_KEY"
ETHERSCAN_URL_OPTIMISM="https://api-optimistic.etherscan.io/api"
ETHERSCAN_URL_OPTIMISM_SEPOLIA="https://api-sepolia-optimistic.etherscan.io/api"
ETHERSCAN_API_KEY_POLYGON="YOUR_POLYGONSCAN_API_KEY"
ETHERSCAN_URL_POLYGON="https://api.polygonscan.com/api"
ETHERSCAN_URL_POLYGON_AMOY="https://api-amoy.polygonscan.com/api"
ETHERSCAN_API_KEY_BASE="YOUR_BASESCAN_API_KEY"
ETHERSCAN_URL_BASE="https://api.basescan.org/api"
ETHERSCAN_URL_BASE_SEPOLIA="https://api-sepolia.basescan.org/api"
ETHERSCAN_API_KEY_ARBITRUM="YOUR_ARBISCAN_API_KEY"
ETHERSCAN_URL_ARBITRUM="https://api.arbiscan.io/api"
ETHERSCAN_URL_ARBITRUM_SEPOLIA="https://api-sepolia.arbiscan.io/api"
forge build --sizesforge test --chain <CHAIN-ID>forge script script/Deploy.s.sol --sig 'run()' --broadcast --verify --rpc-url <CHAIN-ID>The following repositories served as key references during the development of this project:
- ERC-7579 / ERC-7579 Implementation – Reference implementation of ERC-7579 standard, showcasing modular account architecture.
- ZeroDev / Kernel – Modular smart account system demonstrating validator, executor, and hook architecture with ERC-7579 support.
- Biconomy / Nexus – ERC-4337 compliant smart account implementation with modular design, used as reference for factory and validator setup.
- rhinestone / ModuleKit – Lightweight framework for building and testing ERC-7579 modules, useful for structuring this project's module system.
- Vectorized / Solady - Gas optimized Solidity snippets.