metaplex-foundation / shank

Extracts IDL from Solana Rust contracts
https://docs.rs/crate/shank_macro/latest
116 stars 23 forks source link

Support "wrapped" structs #44

Closed jarry-xiao closed 1 year ago

jarry-xiao commented 1 year ago
#[derive(Debug, Clone, Copy, BorshDeserialize, BorshSerialize)]
#[repr(transparent)]
pub struct Foo(pub u64);

Will not get picked up by shank, but this will:

#[derive(Debug, Clone, Copy, BorshDeserialize, BorshSerialize)]
#[repr(transparent)]
pub struct Foo {
    x: u64,
}

Feels like there shouldn't be much of a difference