A simple CLI to interact with the mpl-migration-validator program.
Install from source with cargo
as normal or use this bash script to download and install the latest binary for your MacOs or Linux system:
bash <(curl -sSf https://raw.githubusercontent.com/metaplex-foundation/goose/main/scripts/install.sh)
By default, goose
looks in your Solana config file for both the keypair and RPC URL to use. However, you can override either of the values found there by passing them in with the -k
and -r
flags.
Open a migration state account for a given collection parent NFT to start the timed countdown:
goose init -c <collection-parent-nft-address> -m <Timed> -s <COLLECTION_SIZE>
There is only one unlock method supported: Timed
unlocks the collection after a two weeks and is the default, so this command can be elided.
The collection size is the number of NFTs in the collection and is not checked by the on-chain program so must be entered correctly by the user.
Cancel a migration countdown by closing the migration state account:
goose cancel -c <collection-parent-nft-address>
Get the migration state of an existing migration state account:
goose get-state -c <collection-parent-nft-address>
Get all migration state accounts on a particular cluster:
goose get-all-states
Update a migration state and check if it's ready to be unlocked:
Updateable values:
- collection size
- rule set pubkey
- collection update authority (USE WITH CAUTION, this should match your NFTs update authority)
goose update -c <collection-parent-nft-address> -s <COLLECTION_SIZE> -R <RULE_SET_PUBKEY> -n <NEW_AUTHORITY_PUBKEY>
You can only specify the specific value you want to update:
goose update -c <collection-parent-nft-address> -n <NEW_AUTHORITY_PUBKEY>
Or leave them all off to simply crank the timestamp check:
goose update -c <collection-parent-nft-address>
Enable migration for a collection:
goose start -c <collection-parent-nft-address>
Migrate items from a mint list, if the migration is enabled:
goose migrate -c <collection-parent-nft-address> -m <mint-list-file.json>
Check mint list for migrated and unmigrated items:
goose check -m <mint-list-file>
This will print out three files:
migrated_mints.json
, unmigrated_mints.json
, and errors.json
You can then run the migrate
command to migrate the items in unmigrated_mints.json
and repeated until all items are successfully migrated. The errors.json
file will contain any itesm that failed the check.