Open yang19950611 opened 2 weeks ago
I believe Token Mints should be created with size 82
, not 338
. See if that works.
I believe Token Mints should be created with size
82
, not338
. See if that works.
Thank you very much, I changed it to 82 and solved the problem. May I ask how to calculate this space in Java?
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);