solanaj icon indicating copy to clipboard operation
solanaj copied to clipboard

initializeMint InvalidAccountData invalid account data for instruction

Open yang19950611 opened this issue 4 months ago • 2 comments

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);

yang19950611 avatar Sep 30 '24 03:09 yang19950611