A command-line tool to upgrade version 0 Aleo credits records by either:
- providing a single record manually, or
- scanning a block range for eligible records and upgrading them all.
- Python 3.7+.
- A new version of
leo
in your$PATH
. - A new version of
snarkos
in your$PATH
.
Clone the repository and make the script executable:
chmod +x upgrade_records.py
./upgrade_records.py --url https://api.explorer.provable.com/v1 --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH --network testnet upgrade --record '{ owner: aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px.private, microcredits: 7u64.private, _nonce: 3428133761460433721334995787017674239816935068080249724009991718593481148292group.public, _version: 0u8.public}'
./upgrade_records.py --url https://api.explorer.provable.com/v1 --private-key APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH --network testnet scan --start 1 --end 3000
--start
and --end
represent the range of blocks in which to scan for your records. Note that scanning for a large range of blocks may take quite some time.