x/upgrade gRPC query service (#6590)
* Add .proto and make proto-gen * Correct proto types * Update pseudo tests * Update tests * line break * Fix tests after merge * Update proto/cosmos/upgrade/query.proto Co-authored-by: Aaron Craelius <aaron@regen.network> * Update proto/cosmos/upgrade/query.proto Co-authored-by: Aaron Craelius <aaron@regen.network> * Update proto/cosmos/upgrade/query.proto Co-authored-by: Aaron Craelius <aaron@regen.network> * Update proto/cosmos/upgrade/query.proto Co-authored-by: Aaron Craelius <aaron@regen.network> Co-authored-by: Aaron Craelius <aaron@regen.network>
This commit is contained in:
co-authored by
Aaron Craelius
parent
80e53a4d89
commit
4459201591
@@ -0,0 +1,36 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.upgrade;
|
||||
|
||||
import "cosmos/upgrade/upgrade.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types";
|
||||
|
||||
// Query defines the gRPC upgrade querier service
|
||||
service Query {
|
||||
// CurrentPlan queries the current upgrade plan
|
||||
rpc CurrentPlan(QueryCurrentPlanRequest) returns (QueryCurrentPlanResponse) {}
|
||||
|
||||
// AppliedPlan queries a previously applied upgrade plan by its name
|
||||
rpc AppliedPlan(QueryAppliedPlanRequest) returns (QueryAppliedPlanResponse) {}
|
||||
}
|
||||
|
||||
// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC method
|
||||
message QueryCurrentPlanRequest {}
|
||||
|
||||
// QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC method
|
||||
message QueryCurrentPlanResponse {
|
||||
// plan is the current upgrade plan
|
||||
Plan plan = 1;
|
||||
}
|
||||
|
||||
// QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC method
|
||||
message QueryAppliedPlanRequest {
|
||||
// name is the name of the applied plan to query for
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
// QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC method
|
||||
message QueryAppliedPlanResponse {
|
||||
// height is the block height at which the plan was applied
|
||||
int64 height = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user