Open sol-mocha opened 1 year ago
Yep, what you're describing is totally a bug.
The whole anchor-go package needs to be refactored from top to bottom :sweat_smile:
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).
Yep, what you're describing is totally a bug.
The whole anchor-go package needs to be refactored from top to bottom :sweat_smile:
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 get