1

I am have deployed a smart contract on devnet and it the issue is that after making a few rpc calls from my react app I get the following error:

Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: Program failed to complete
   at Connection.sendEncodedTransaction (connection.ts:4934:1)
   at async Connection.sendRawTransaction (connection.ts:4893:1)
   at async sendAndConfirmRawTransaction (send-and-confirm-raw-transaction.ts:74:1)
   at async w.send (provider.ts:124:1)
   at async Object.mint (rpc.ts:26:1)
   at async mintNFT (utils.js:955:1)
   at async _mintNFT (App.js:373:1)

What could be a possible solution to this? I am making a number of calls to my smart contracts and this is making test really difficult.

2 Answers 2

1

Program failed to complete means that your program panicked while processing the instruction. Try adding some debug logging to figure out where it could have happened, or write some unit tests to uncover the issue.

1

Try wrapping the sendTransaction call in a try / catch and explicitly log the error, it'll often give you more detailed information on why the program failed

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.