Skip to content

Instantly share code, notes, and snippets.

@deanmlittle
Last active March 19, 2024 14:32
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deanmlittle/e607650c80c80203116638ae0dd3c63f to your computer and use it in GitHub Desktop.
Save deanmlittle/e607650c80c80203116638ae0dd3c63f to your computer and use it in GitHub Desktop.
Metaplex validator

How to setup :

  1. Create a valid8 folder in your path: mkdir ~/.local/share/valid8

  2. Dump the metaplex program there: solana program dump -u m metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s ~/.local/share/valid8/metadata.so

  3. Create bash script with sudo nano /usr/local/bin/metaplex-test-validator then paste in the following code and save: (if the /user/local/bin directory doesn't exist, you can create it using sudo mkdir -p -m 775 /usr/local/bin)

#!/bin/bash

# Validator command
COMMAND="solana-test-validator -r --bpf-program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s ~/.local/share/valid8/metadata.so"

# Append any additional arguments passed to the script
for arg in "$@"
do
    COMMAND+=" $arg"
done

# Execute the command
eval $COMMAND
  1. Make it executable with: sudo chmod +x /usr/local/bin/metaplex-test-validator

  2. Try run it in your project folder with: metaplex-test-validator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment