0

I am trying to create a token with a vanity address. I have tried the following.

solana-keygen grind —starts-with test:1

and test....tg.json file has been created. After this, when I run spl-token create-account test...tg.json, it shows no such file or directory (os error2).Which command should I run with to create a token and mint with the vanity keypair json file created?

1 Answer 1

2

spl-token create-account <token-address> is used to create a token account, so you need to pass the token address, not the wallet address.

You can follow the below steps to achieve what you trying to do

# Creates a token and use the token address to create an account 
# or use any existing token address
spl-token create-token --decimals 0
# Creates the token account associated to given token address,
# if the vanity address is set to default Keypair path in Solana config
# you can exclude the --owner flag
spl-token create-account <token-address> --owner <vanity-address>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.