Skip to content

Commit

Permalink
feat(logic): mark rpc queries as safe
Browse files Browse the repository at this point in the history
This allows to use ICA module safe queries with logic rpc queres
  • Loading branch information
amimart committed Jul 26, 2024
1 parent 963f560 commit 66b1b8c
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 36 deletions.
3 changes: 3 additions & 0 deletions proto/logic/v1beta2/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";

package logic.v1beta2;

import "cosmos/query/v1/query.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "logic/v1beta2/params.proto";
Expand All @@ -13,13 +14,15 @@ option go_package = "github.com/axone-protocol/axoned/x/logic/types";
service QueryService {
// Params queries all parameters for the logic module.
rpc Params(QueryServiceParamsRequest) returns (QueryServiceParamsResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/axone-protocol/axoned/logic/params";
}

// Ask executes a logic query and returns the solutions found.
// Since the query is without any side-effect, the query is not executed in the context of a transaction and no fee
// is charged for this, but the execution is constrained by the current limits configured in the module.
rpc Ask(QueryServiceAskRequest) returns (QueryServiceAskResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/axone-protocol/axoned/logic/ask";
}
}
Expand Down
74 changes: 38 additions & 36 deletions x/logic/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 66b1b8c

Please sign in to comment.