-
Notifications
You must be signed in to change notification settings - Fork 213
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
[solana/cosmwasm/near] Rust tests refactor #1238
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
pythnet/pythnet_sdk/src/gen/mod.rs
Outdated
}, | ||
}; | ||
|
||
fn default_emitter_addr() -> [u8; 32] { |
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.
Some examples of the functions that will live here.
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.
I like the idea of moving the code somewhere where it can be shared. I'm not sure whether it makes sense in this crate or not though, so I will let @ali-bahjati and @Reisen opine on that.
If they don't like this approach, I think another option would be to make a separate crate like pythnet-sdk-test-utils
(?)
I definitely think this is a good change. Here are my thoughts: I suggest changing the feature name and module to Then as a structural refactor I think it's better to rename the pythnet-sdk to accumulators-sdk and we can then move it to |
fa963d7
to
94188ec
Compare
94188ec
to
559cec4
Compare
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.
It seems to have the near changes included. Perhaps we can remove them?
Apart from that it looks good to me as a good move and we can later do more structural changes (which I mentioned in the comments).
price: i64::MAX.into(), | ||
conf: u64::MAX.into(), | ||
price: i64::MAX, | ||
conf: u64::MAX, |
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.
Clippy did this
I have the very ambitious project to "move up" a lot of the code that we use to generate accumulator updates in the Rust tests for the rust ecosystems (Cosmwasm, Near and Solana).
This PR is about deciding where this code should live.
I made a feature
gen
inpythnet-sdk
that exposes the generator functions.The reason why it's feature gated is that I use
wormhole_sdk
and I think it's good to be able to usepythnet
-sdk without any wormhole dependencies.