AA Wallet Solidity is an Ethereum-based smart contract for account abstraction wallets, enabling users to interact with transactions and contracts in ways that differ from traditional Ethereum addresses.
- Node.js: v16.x or higher
- EntryPoint.sol
- SWTokenPaymaster.sol
- USDCTokenPaymaster.sol
- SmarterAccountV1.sol
- SmarterAccountV1Factory.sol
Run the following command in the root directory to install the necessary npm packages:
npm install
-
Copy the example environment file:
cp .env.example .env
-
Modify the environment variables in the
.env
file:# Replace with your actual Etherscan API key SCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1 # Replace with your Ethereum address private key PRIVATE_KEY=0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1
Execute the following commands to run different tests:
-
Entry point test:
npm run entry-test
Deploy the ERC4337 component to various networks using the commands below:
Deploy to Polygon:
npm run deploy-polygon
Deploy to Mumbai Testnet:
npm run deploy-mumbai
You can find the deployed contract addresses here.
For the source code, please visit the GitHub repository.