Closed VY5FR2NWJ9 closed 1 month ago
I wonder if it would be sensible to have the option to make backwards incompatible fields such as discriminator Option<>, or if there is a way of migrating old IDL JSON files to the new format (as a client, who does not have access to the project)
Yes, I'll add a utility to convert an old IDL to a new one, and this will be supported by default with declare_program!
.
awesome, that sounds great
The macro attempts to parse the
Idl
type usingserde_json
, but complains about mandatorydiscriminator
field for IDLs generated before anchor 0.30Example IDL that does not work with this macro: https://github.com/drift-labs/protocol-v2/blob/master/sdk/src/idl/drift.json
I wonder if it would be sensible to have the option to make backwards incompatible fields such as
discriminator
Option<>, or if there is a way of migrating old IDL JSON files to the new format (as a client, who does not have access to the project)