If you have access to your Argent X Starknet mainnet account that is marked as deprecated or have its private key, it might be possible to upgrade it to the latest version of the smart contract.
How to upgrade the wallet using Bun toolkit
1. If you have no private key but have access to the deprecated account in Argent X, please save the private key:
2. Go to https://github.com/argentlabs/upgrade-v0-account?tab=readme-ov-file
3. Click on Code button > Download ZIP:
4. Unzip the archive in a separate folder (double-click the archive)
5. Right-click new folder and open new terminal at folder
5. Install Bun (https://bun.sh/docs/installation)
In Terminal type:
curl -fsSL https://bun.sh/install | bash
Hit Return and wait till installation completes
6. Type:
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
Press Enter.
7. Enter the following command:
bun install
then hit Enter and wait for installation to complete:
This will install bun in the folder you specified. Bun is an all-in-one toolkit for JavaScript and TypeScript apps. It will allow running the upgrade script within your computer.
8. Type
source scripts/user-input.sh
Press Enter
9. Enter your private key, then your deprecated account address and wait for the terminal to inform you it created an .env file:
11. Run the following command:
bun run upgrade
Wait till it completes.
12. Your account is now on contract 0.2.3 - the version that can and needs to be upgraded from within your Argent X wallet. Click on Upgrade to Cairo 1 in your Argent X wallet and proceed with the upgrade. (You might need to wait till the previous upgrade transaction completes and restart your browser)
13. Once the upgrade is done and you can use your Argent X account, please delete the .env file from the upgrade script directory. If you don't see the file, while in this directory, press Cmd+Shift+. to display all files.
Why do I have to do all this??
This script allows you to proceed with the upgrade without your account private key pasted in an unsafe environment, this way your account private key never leaves your device.
We are also working on a more user-friendly solution.