-
Notifications
You must be signed in to change notification settings - Fork 70
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
v0.20.1 add stargate queries to wasmOpts #251
Conversation
📝 WalkthroughWalkthroughThe changes in the Changes
Sequence DiagramsequenceDiagram
participant App as Application
participant Wasm as WasmKeeper
participant IBC as IBC Module
participant Dist as Distribution Module
participant Staking as Staking Module
App->>Wasm: Configure Query Plugins
Wasm-->>App: Query Plugin Configuration
App->>Wasm: Initialize with Stargate Queries
Wasm->>IBC: Query IBC Connections
Wasm->>Dist: Query Distribution
Wasm->>Staking: Query Staking Information
Poem
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
app/keepers/keepers.go (1)
319-341
: Stargate query mapping looks comprehensive.Defining the accepted paths and corresponding response types for IBC, distribution, staking, and FanToken modules ensures a modular and explicit approach. This approach enhances the Wasm keeper's query capabilities.
You could consider including a brief comment/inline doc for each path describing its usage, which would help future maintainers.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/keepers/keepers.go
(2 hunks)
🔇 Additional comments (3)
app/keepers/keepers.go (3)
65-65
: New import for IBC connection types.
This import is essential for handling IBC connection queries and aligns with the new stargate query logic introduced below. Great addition!
343-347
: Query plugins enhance Wasm's GRPC-based queries.
Using QueryPlugins (particularly the AcceptListStargateQuerier) properly sets up a filtered approach to allowed queries. This is a secure pattern for limiting what queries a Wasm contract can call.
348-348
: Appending querierOpts to wasmOpts is well-structured.
By appending the newly created QueryPlugins to wasmOpts, you maintain a clean approach to configuring your Wasm keeper. This nicely encapsulates the stargate query logic in a single place.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
AppKeepers
related to query handling.