You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if the IDL lists the same name for an account and an instruction, this will produce go code in which the account name and the instruction name will be the same. For example the IDl for the token-swap program here will yield
The text was updated successfully, but these errors were encountered:
sol-mocha
changed the title
Code Generation Produced Conflicts between Account State and Instruction Name
Code Generation Produced Conflicts between Account and Instruction Struct
Feb 2, 2023
The whole anchor-go package needs to be refactored from top to bottom 😅
I'll get to it (eventually).
And one of the things that would need to be done is to split the various generated stuff into separate folders (but even before that, there's a lot more).
The whole anchor-go package needs to be refactored from top to bottom 😅
I'll get to it (eventually).
And one of the things that would need to be done is to split the various generated stuff into separate folders (but even before that, there's a lot more).
You might like what we're building for grizzlython 👀 dcaf labs is working on some code gen tooling, forked/refactored from anchor-go
Currently, if the IDL lists the same name for an account and an instruction, this will produce go code in which the account name and the instruction name will be the same. For example the IDl for the token-swap program here will yield
and
One Possible fix can be to introduce a flag to add a custom suffix to the account struct (or the instruction struct).
In this example with a custom account suffix of
Account
we would getThe text was updated successfully, but these errors were encountered: