saber-hq / anchor-gen

Generates an Anchor CPI crate from a JSON IDL.
https://crates.io/crates/anchor-gen
Apache License 2.0
105 stars 58 forks source link

Support named enum variants #45

Open ChewingGlass opened 1 year ago

ChewingGlass commented 1 year ago

Fixes #40

macalinao commented 1 year ago

do you have any test cases?

ChewingGlass commented 1 year ago

I didn’t see any tests in the repo? It’s being used in this repo with no issues https://github.com/helium/account-compression-anchor-gen

macalinao commented 1 year ago

I didn’t see any tests in the repo? It’s being used in this repo with no issues https://github.com/helium/account-compression-anchor-gen

Ah I meant adding some IDLs into this repo which contain named enum variants

I'd appreciate if you could fix Clippy so I can merge this in, or allow me to push to your branch

ChewingGlass commented 1 year ago

Sent you an invite in case you wanted to add those idls. Also fixed the cargo fmt

qiluge commented 1 month ago

current anchor-gen cannot decode jupiter tx, likehttps://solscan.io/tx/NyTYMGzS3ADiPw8QEjybv886ANXQrrgvzKWbRX64xAZStMspSYSRESxjcuqoWQhRk3rRkns8dLcd8fyX96hPMmm. Maybe this update could resolve this problem? image