I created a token on solana devnet and could easily create a account with create-account command. Then minded the tokens and all went well.
Now I try to go to testnet and create an account for this token but it throws an error:
spl-token create-account 8X1oYwCiKbPdcfzQSS3C6DoqZzr319Hv5btnZ6DfMvTi --url=testnet
Creating account 3nYJ1PGggmyjc8Ht2uqCTPeMLkBNGngm7h4THysbPXM6 RPC response error -32002: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x2 [18 log messages]
I tried to look up the error in their github but it's not really helping me: https://github.com/solana-labs/solana-program-library/blob/ea354ab358021aa08f774e2d4028b33ec56d4180/token/program/src/error.rs#L16
#[error("Invalid Mint")] InvalidMint,
The same problem comes up when I do it the other way around, create token and account on testnet then try to create an account on devnet. (same with mainnet).
I have enough SOL in all the networks so that's not the problem and I have the right authority and keypair.
I feel that im just missing 1 step in the process. Please let me know how to fix this :)