PS C:\Users\Keola> spl-token mint 4ZPyP3fGWEoFV7ey32jqwJGCydyK9(censored) 80000000 14fbryUnN5Px4GGg1MMgTKawpyvBXUz(censored) Error: "Account 14fbryUnN5Px4GGg1MMgTKawpyvBXUz(censored) is owned by 11111111111111111111111111111111, not configured program id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" PS C:\Users\Keola>
1 Answer
Looks like you're missing a few steps for minting a token.
Step 1: Create a token, this will generate the tokens mint address. For your specific token, it looks like it needs to be created with the token extension program, which must be specified when generating the token mint address.
spl-token create-token --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb [here is where you can add token extensions specific flags as well]
Note: The mint address is used to store the global information for a class of tokens. You can not store actual tokens here, they are stored in a user's token account.
Step 2: Create a token account. This is used to store the token balance of a specific user. Here you need to specify both the program id used to create your token and the mint address of the token (which is what is generated in the step above).
spl-token create-account [mint_address] --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
Step 3: Now you can mint your token into your token account.
spl-token mint --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb [mint_address] [amount_of_tokens_to_mint][--] [RECIPIENT_TOKEN_ACCOUNT_ADDRESS]
Note: RECIPIENT_TOKEN_ACCOUNT_ADDRESS is the token account address of recipient, which in your case should be the token account you just created in step 2. The default is set to the associated token account for --mint-authority
.
Specifically for the error shown, --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
needs to be included in your mint command and it also looks like the token account was not configured for token extensions (as shown in step 2 above).