seahorse build is not generating the IDL correctly.
When I copy my program to the Solana Playground and then build and deploy, I am able to run it smoothly.
On the other hand, when I execute seahorse build and anchor deploy on my localhost, and then upload the generated .so file, the corresponding private key and the idl, one of the instructions of the program does not work, and I get the following error message: "Reason: Cross-program invocation with unauthorized signer or writable account."
I found out that the reason is that the idl is not correctly generated in the second case because two accounts are not marked as mutable and they should be (see images). I could solve the problem by manually editing the file that gives the idl, but I guess this is not the way it should work! :)
seahorse build
is not generating the IDL correctly.When I copy my program to the Solana Playground and then build and deploy, I am able to run it smoothly.
On the other hand, when I execute
seahorse build
andanchor deploy
on my localhost, and then upload the generated .so file, the corresponding private key and the idl, one of the instructions of the program does not work, and I get the following error message: "Reason: Cross-program invocation with unauthorized signer or writable account."I found out that the reason is that the idl is not correctly generated in the second case because two accounts are not marked as mutable and they should be (see images). I could solve the problem by manually editing the file that gives the idl, but I guess this is not the way it should work! :)
I am using Seahorse 0.2.4 .