Skip to content

allo-protocol/migration-scripts

Repository files navigation

migration-scripts

  1. Install Dependencies
bun install
  1. Create .env file from .env.sample and populate the variables.
  2. Fetch the projects from allo v1 via the indexer
bun run fetch > fetch-output.txt

The result is:

  • writes all projects by chainId onto data/${chainId}.json
  • groups all project by mainnet / testnet based on the env and write it onto data/profile-master-{mainnet/testnet}-raw.json. This will be the input file for the next command to create/migrate profiles on allo v2
  1. Remove duplicates by running
bun run dedupe  > dedupe-output.txt

This will read the raw master file and generate data/profile-master-{mainnet/testnet}-final.json

  1. Migrate the profiles (make sure you adjust the BATCH_SIZE to control how many profiles are created per transaction)
bun run migrate

The result is:

  • write the mapping from allo v1 project -> allo v2 profile onto data/mapping-${mainnet/testnet}.json

Note: The mapping are also stored on-chain. Events are also emmitted

About

Allo v1 -> Allo v2 migration helper scripts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published