Closed cryptopapi997 closed 3 months ago
Hello, we will look into it, do you have the source code available in any repository? :)
Yes, but it's closed source. Let me try creating a MRE and get back to you
Alright, added an MRE here:
https://github.com/cryptopapi997/trident-mre
I just tried it again with a fresh git clone and trident init and it throws the same error.
Small thing to note: This uses the latest commit from the anchor repo instead of the official 0.30.0 release. You can switch it to 0.30.0 if you'd like, it still throws the same error
The problem is in the name of the context struct InitPersistentMXE
which is converted by Anchor to kebab case as init_persistent_mxe
and then by Trident back to camel case as InitPersistentMxe
which does not correspond to the original name and is thus not found.
As a temporary workaround, if you rename InitPersistentMXE
to InitPersistentMxe
, then the Trident initialization (of your MRE) works.
Makes sense, thank you! I understand changing this is no simple undertaking as it would require parsing the names from Rust directly. However, I feel like if the error message specified the (incorrectly spelled) struct that caused this, it would've been a lot easier to guess what the problem is without bothering you guys. Opened a quick PR for this here: https://github.com/Ackee-Blockchain/trident/pull/164
Can be closed since https://github.com/Ackee-Blockchain/trident/pull/164 was merged
Hey guys,
I have a project using Anchor 0.30.0 on which I'm trying to run
trident init
. An important specification here is I haveanchor-spl
as a dependency and I have it as version 0.30.0 as downgrading to 0.29.0 (like the docs recommend) would break everything in my program. Additionally, I tested a different 0.30.0 program with anchor-spl at 0.30.0 as well and there it worked fine.My issue is, when I try to run
trident init
on this project it keeps giving meError: Idl(MissingOrInvalidProgramItems("account mod: struct not found"))
. I tried checking the source code, but I'm not exactly sure what this error means exactly. I tried deleting most of my program so that all that gets generated as an idl is the below, but still the same issue. Any tips on how to fix this?