Skip to content

bcnmy/mee-upgrade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MEE Nexus Upgrade Tool

A command-line tool to upgrade Biconomy Nexus smart accounts from v2.0.0 to v2.1.0.

What This Tool Does

  • Verifies your Nexus account is currently on v2.0.0
  • Upgrades the implementation to v2.1.0 with proper validator initialization
  • Verifies the upgrade completed successfully
  • Optionally tests the upgraded account with a transaction

Prerequisites

  • Bun runtime installed
  • A Nexus smart account on Base chain running v2.0.0
  • Private key for the account owner
  • USDC on Base for transaction fees (small amount, typically < $0.01)

Installation

Install dependencies:

bun install

Configuration

  1. Copy the example environment file:
cp .env.example .env
  1. Edit .env and add your private key:
KEY=your_private_key_here

Usage

Basic Upgrade

Run the upgrade script:

bun run upgrade.ts

What to Expect

The tool will:

  1. ✅ Check your Nexus account version (must be v2.0.0)
  2. ✅ Prepare upgrade data for v2.1.0 implementation
  3. ✅ Get a fee quote from MEE (in USDC)
  4. ✅ Execute the upgrade transaction
  5. ✅ Wait for confirmation
  6. ✅ Verify the upgrade succeeded

Output example:

============================================================
Upgrade: v2.0.0 → v2.1.0
============================================================
⏳ Checking current Nexus version...
✅ Current version: v2.0.0

⏳ Getting v2.1.0 configuration...
✅ v2.1.0 implementation: 0x...

⏳ Preparing initData for validator initialization...
✅ initData prepared

⏳ Building upgradeToAndCall instruction...
✅ Built 1 instruction(s)

⏳ Getting fusion quote from MEE node...
✅ Fee: 0.000123 USDC

⏳ Executing upgrade via SDK...
✅ Supertx sent: 0x...
   MEE scan: https://meescan.biconomy.io/details/0x...

⏳ Waiting for upgrade to complete...
✅ Upgrade executed successfully

⏳ Verifying upgraded Nexus information...
✅ Nexus upgraded successfully

📋 Upgraded Nexus Information:
   Address: 0x...
   Deployed: true
   Implementation: 0x...
   Version: v2.1.0
   Account ID: ...
   Upgrade Needed: false

✅ Nexus account upgraded to v2.1.0!

Test After Upgrade (Optional)

To verify the upgraded account works correctly, you can execute a test transaction:

  1. Open upgrade.ts
  2. Uncomment lines 224-225 at the bottom:
const nexusAddressOverride = '<your_nexus_address>' as Hex;
await executeAfterUpgrade(nexusAddressOverride);
  1. Replace <your_nexus_address> with your Nexus address
  2. Run bun run upgrade.ts again

This will send 1 wei of USDC to your owner address as a test.

Configuration Details

Network

  • Chain: Base (chainId: 8453)
  • Fee Token: USDC (0x833589fcd6edb6e08f4c7c32d4f71b54bda02913)

Versions

  • From: MEE v2.0.0
  • To: MEE v2.1.0

You can modify these in upgrade.ts if needed for different chains or versions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published