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 625e034
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions proto/logic/v1beta2/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,23 @@ import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "logic/v1beta2/params.proto";
import "logic/v1beta2/types.proto";
import "cosmos/query/v1/query.proto";

option go_package = "github.com/axone-protocol/axoned/x/logic/types";

// QueryService defines the gRPC querier service.
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

0 comments on commit 625e034

Please sign in to comment.