Open samuelvanderwaal opened 2 years ago
For instructions with single arguments we should discuss/consider supporting Rust type aliases so something like this:
pub struct SetCollectionSizeArgs { pub size: u64 } #[account(0, writable, name="collection_metadata", desc="Collection Metadata account")] #[account(1, signer, writable, name="collection_authority", desc="Collection Update authority")] #[account(2, name="collection_mint", desc="Mint of the Collection")] SetCollectionSize(SetCollectionSizeArgs),
could be
type Size = u64; #[account(0, writable, name="collection_metadata", desc="Collection Metadata account")] #[account(1, signer, writable, name="collection_authority", desc="Collection Update authority")] #[account(2, name="collection_mint", desc="Mint of the Collection")] SetCollectionSize(Size),
Alternately, accept a primitive Rust type directly and generate a common-sense name, e.g. SetCollectionSizeArg:
#[account(0, writable, name="collection_metadata", desc="Collection Metadata account")] #[account(1, signer, writable, name="collection_authority", desc="Collection Update authority")] #[account(2, name="collection_mint", desc="Mint of the Collection")] SetCollectionSize(u64),
Getting this down to track the issue and I will try to add more details later.
For instructions with single arguments we should discuss/consider supporting Rust type aliases so something like this:
could be
Alternately, accept a primitive Rust type directly and generate a common-sense name, e.g. SetCollectionSizeArg:
Getting this down to track the issue and I will try to add more details later.