- Install Dependencies
bun install- Create
.envfile from.env.sampleand populate the variables. - Fetch the projects from allo v1 via the indexer
bun run fetch > fetch-output.txtThe 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
- Remove duplicates by running
bun run dedupe > dedupe-output.txtThis will read the raw master file and generate data/profile-master-{mainnet/testnet}-final.json
- Migrate the profiles (make sure you adjust the BATCH_SIZE to control how many profiles are created per transaction)
bun run migrateThe 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