Ackee-Blockchain / trident

Rust-based framework to Fuzz and Integration test Solana programs to help you ship secure code.
https://ackee.xyz/
MIT License
185 stars 18 forks source link

Extend use statements and Data Accounts paths for fuzz snapshots #141

Closed lukacan closed 5 months ago

lukacan commented 6 months ago

Currently, once the accounts_snapshots.rs file is generated, users need to manually import the structures stored inside the Data Accounts. This PR addresses this issue by obtaining full paths (if possible) to the defined types, employing the same logic used for obtaining full paths to the Instruction input arguments for .program_client.

The Test generator has been updated to consolidate all extracted data into a single vector called programs_data, rather than using separate fields for IDL and data required for the fuzzer.

Additional minor updates include:

Ikrk commented 6 months ago

lgtm. good job. Just some minor comments... Also, we have to keep in mind, that the SPL data types and also the composite accounts types are not imported. So in these cases the user will still have to import it manually.