ameliatastic / seahorse-lang

Write Anchor-compatible Solana programs in Python
Apache License 2.0
327 stars 48 forks source link

IDL not correctly generated #69

Closed miguel-ot closed 1 year ago

miguel-ot commented 1 year ago

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! :)

I am using Seahorse 0.2.4 .

Screenshot_20221129_101624 Screenshot_20221129_102923