mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 10:05:18 +00:00
f0fa2e1253
* module files * proto types * types and generated proto types * keeper * client scaffold * add savings module to app * remove placeholder types file * implement rest and add to module * update proto types * validation for supported denoms * generate updates proto types * update comments * update comments * remove unused imports from proto files * regenerate proto files * update proto types * client * deposit type and generated proto types * deposit keeper methods + tests * update savings module file * update app.go + test common * query proto types * query types + generated proto types * keeper logic for deposits queries * cli/rest querier updates * remove abci * remove refs to other modules * remove endblocker call * genesis init test for module account * update genesis test with params * add get/set params test * fix up keeper test * use params getter * simplify if/else statement * remove querier.go and rest/query * update query deposit description * remove legacy querier * register querier * revisions
54 lines
1.6 KiB
Protocol Buffer
54 lines
1.6 KiB
Protocol Buffer
syntax = "proto3";
|
|
package kava.savings.v1beta1;
|
|
|
|
import "kava/savings/v1beta1/store.proto";
|
|
import "gogoproto/gogo.proto";
|
|
import "google/api/annotations.proto";
|
|
import "cosmos_proto/cosmos.proto";
|
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
|
|
|
option go_package = "github.com/kava-labs/kava/x/savings/types";
|
|
|
|
// Query defines the gRPC querier service for savings module
|
|
service Query {
|
|
// Params queries all parameters of the savings module.
|
|
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
|
option (google.api.http).get = "/kava/savings/v1beta1/params";
|
|
}
|
|
|
|
// Deposits queries savings deposits.
|
|
rpc Deposits(QueryDepositsRequest) returns (QueryDepositsResponse) {
|
|
option (google.api.http).get = "/kava/savings/v1beta1/deposits";
|
|
}
|
|
|
|
}
|
|
|
|
// QueryParamsRequest defines the request type for querying x/savings
|
|
// parameters.
|
|
message QueryParamsRequest {}
|
|
|
|
// QueryParamsResponse defines the response type for querying x/savings
|
|
// parameters.
|
|
message QueryParamsResponse {
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
Params params = 1 [(gogoproto.nullable) = false];
|
|
}
|
|
|
|
// QueryDepositsRequest defines the request type for querying x/savings
|
|
// deposits.
|
|
message QueryDepositsRequest {
|
|
string denom = 1;
|
|
string owner = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 3;
|
|
}
|
|
|
|
// QueryDepositsResponse defines the response type for querying x/savings
|
|
// deposits.
|
|
message QueryDepositsResponse {
|
|
repeated Deposit deposits = 1 [(gogoproto.castrepeated) = "Deposits", (gogoproto.nullable) = false];
|
|
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
}
|