-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend use statements and Data Accounts paths for fuzz snapshots #141
Conversation
6776115
to
23206f1
Compare
lgtm. good job. Just some minor comments... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
1c40b20
to
0b7afaf
Compare
…ts (#141) * ✨ Extend use statements and Data Accounts paths for fuzz snapshots * 🐛 PR Fix: change tuple to struct and update correspondig code * 🐛 PR Fix: update accounts_snapshots.rs program_id import * 🐛 PR Fix: update variable names * 🐛 PR Fix: update unwrap_or into unwrap_or_else * 🐛 PR Fix: update regular expressions and add tests
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:
use crate::PROGRAM_ID
, as it is often used withinaccounts_snapshots.rs
and is available insidetest_fuzz.rs
.