1

While trying to create a transaction containing as instructions the creation of a mint account, initialize mint instruction and ATA creation), it gives me the custom program error code 0x0 while trying to perform the transaction, which I found to be something like: "Lamport balance below rent-exempt threshold".

So, basically, the following would be the transaction creation: enter image description here

Followed by airdropping some SOL to all keys (just in case): enter image description here

Right after that, the transaction is sent: enter image description here

Then, the custom error code 0x0 at instruction 0 appears. There no intermediate lines of code between the snippets

What am I missing here? Any suggestions?

EDIT: After some research, it looks like the error might be due to the account that I’m trying to create in instruction 0 being already in use. I will confirm this and update here

EDIT2: It looks like since it is a System Program error, the code 0x0 relates to the account being already in use, however it gives me always the same error despite using Keypair.generate for both baseaccount and mintKey

enter image description here

Kind of stuck in here

1 Answer 1

1

Found the issue. Basically, the airdrop to the mintKey, before sending the transaction, was causing it. As soon as the airdrop was removed, it worked perfectly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.