solanaj
solanaj copied to clipboard
initializeMint InvalidAccountData invalid account data for instruction
When I created the token, I got an error message. The error message is as follows:
Program log: Instruction: InitializeMint, Program log: Error: InvalidAccountData, Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 1576 of 399850 compute units, Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA failed: invalid account data for instruction
Here is my code: Account mintAccount = new Account(); TransactionInstruction createAccount = SystemProgram.createAccount(payerAccount.getPublicKey(),mintAccount.getPublicKey(), lamports, 338, TokenProgram.PROGRAM_ID); TransactionInstruction initializeMint = TokenProgram.initializeMint(mintAccount.getPublicKey(), 9, contractManage, contractManage);