The #[account] attribute should support an optional flag which marks the account as optional.
The resulting IDL for the instruction will include that flag for the account which code generators can then use to adapt the code to make the provided PublicKey for the account optional and only include the account if it is provided.
The
#[account]
attribute should support anoptional
flag which marks the account as optional. The resulting IDL for the instruction will include that flag for the account which code generators can then use to adapt the code to make the providedPublicKey
for the account optional and only include the account if it is provided.