-
Notifications
You must be signed in to change notification settings - Fork 20
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
Generalized querier getter #318
Generalized querier getter #318
Conversation
@Kayanski do you prefer this over your original design? If so I can proceed with finalizing this. |
yes this is a good idea ! |
Codecov ReportAttention:
Additional details and impacted files
|
packages/cw-orch-core/Cargo.toml
Outdated
@@ -25,7 +25,7 @@ eth = ["dep:snailquote"] | |||
|
|||
[dependencies] | |||
thiserror = { workspace = true } | |||
cosmwasm-std = { workspace = true } | |||
cosmwasm-std.workspace = true |
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.
Why this change, is it linting or manual ?
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 was giving me issues for some reason, don't know why
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
* Added first queriers * Added bank + Wasm traits * Removed deprecated code * Lint * Format * Generalized querier getter (#318) * show POC of generalized querier getter * update * fix merge and impl for all envs * Doon't verify mockj error anymore * Fixed test * update `QueryHandler` and WasmQuerier functions * fix smart query URL * fix compile * format and clippy --------- Co-authored-by: Kayanski <kowalski.kowalskin@gmail.com> * Added instantiate2 (#309) * Added instantiate2 * some fixes * Added instantiate2 addr getter * Format * Nits * Merged daemon queriers * Corrected querier in tests * Renamed queriers * fix tests * Fix tests * Renamed trait types * Changed types for osmosis test tube * Feature fix * Removed unused querier traits, adapted all daemon queriers with same structure --------- Co-authored-by: CyberHoward <88450409+CyberHoward@users.noreply.github.com>
* Added first queriers * Added bank + Wasm traits * Added cw-multi-test 0.20.0 * Removed secp, removed ibc-relayer-types * Removed ibc-relayer-types completely * updated prost typesé * Start testing authz * Added authz test * Removed deprecated code * Lint * Format * add authz querier * tx handler error with anyhow test * format * Added authz builder method for options * Some nits * Revert with_authz, added sender options setter * Check rest of authz queries * Added mock state env id * Added fee grant in daemon builder and interface * Format * fix find_wasm_path_with * Generalized querier getter (#318) * show POC of generalized querier getter * update * fix merge and impl for all envs * Doon't verify mockj error anymore * Fixed test * update `QueryHandler` and WasmQuerier functions * fix smart query URL * fix compile * format and clippy --------- Co-authored-by: Kayanski <kowalski.kowalskin@gmail.com> * Added instantiate2 (#309) * Added instantiate2 * some fixes * Added instantiate2 addr getter * Format * Nits * Merged daemon queriers * Corrected querier in tests * Renamed queriers * fix tests * Fix tests * Renamed trait types * Changed types for osmosis test tube * Fixed features --------- Co-authored-by: Buckram <buckram123@gmail.com> Co-authored-by: CyberHoward <88450409+CyberHoward@users.noreply.github.com>
This draft PR shows a different approach to querier construction and access.
Instead of having a
Getter
trait for each querier we have a singleQuerierGetter
trait that retrieves a querierQ
. This querierQ
implements aQuerier
trait. Both are shown below:The inclusion of
type Error
inQuerier
prevents some duplicate code in the traits.Now each querier trait needs to add
Querier
as its trait bound, like so:To get allow for retrieving the querier we implement the
QuerierGetter
with a specified querier like so:We can then create arbitrary sets of supported queriers, like:
And use that as a trait-bound!
Thoughts?