Why Migrate?
Benefits of Migration
Migrating from V2 to Nexus smart accounts provides several benefits:
1
Enhanced Security
Improved security model with modular validators
2
Better Performance
More gas-efficient transaction processing
3
Expanded Features
Access to the newest account abstraction capabilities
4
Future Compatibility
Ensure your smart account remains compatible with the latest AbstractJS SDK
Migration Process Overview
Migration Steps
The migration follows these steps:
1
Connect to V2 Account
Connect to your existing V2 smart account
2
Deploy V2 Account
If not already deployed. Ensure the account is deployed on-chain
3
Migrate to Nexus
Update implementation and initialize the Nexus account
4
Verify Migration
Test the migrated account with a transaction
5
Update Your Application
Use the latest SDK to interact with the migrated account
Prerequisites
Required Setup
1
Update SDK
Update to the latest version of the AbstractJS SDK:
2
Prepare Credentials
Make sure you have your EOA’s private key and the V2 account address
Step 1: Connect to Your V2 Account
V2 Account Connection
First, set up the necessary connections to your V2 smart account:
Step 2: Check Deployment Status
Account Deployment Check
Check if your V2 account is already deployed, and deploy it if necessary:
Step 3: Migrate to Nexus
Nexus Migration
Now perform the migration by updating the implementation to Nexus and initializing the Nexus account:
Step 4: Test Your Migrated Account
Migration Verification
After migration, verify that your account works correctly by creating a test transaction:
Step 5: Update Your Application
Application Update
Update your application to use the Nexus SDK for all future interactions:
Troubleshooting
Common Issues and Solutions
If you encounter issues during migration:
1
Check Funds
Ensure your EOA has sufficient funds for gas
2
Verify Deployment
Verify the V2 account is properly deployed
3
Check Configuration
Check that all environment variables are set correctly
Next Steps
Post-Migration Actions
1
Store Account Address
STORE YOUR ACCOUNT ADDRESS in your application’s persistent storage
2
Update Application Code
Update your application code to use the
accountAddress
parameter in all future interactions3
Test Thoroughly
Test thoroughly with real transactions to ensure everything works as expected