Query all pinned code ids

This commit is contained in:
Alex Peters
2021-10-07 13:52:06 +02:00
parent 5e88752011
commit b7a99e69ee
8 changed files with 819 additions and 69 deletions

View File

@@ -53,6 +53,11 @@ service Query {
rpc Codes(QueryCodesRequest) returns (QueryCodesResponse) {
option (google.api.http).get = "/cosmwasm/wasm/v1/code";
}
// PinnedCodes gets the pinned code ids
rpc PinnedCodes(QueryPinnedCodesRequest) returns (QueryPinnedCodesResponse) {
option (google.api.http).get = "/cosmwasm/wasm/v1/codes/pinned";
}
}
// QueryContractInfoRequest is the request type for the Query/ContractInfo RPC
@@ -200,3 +205,19 @@ message QueryCodesResponse {
// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
// QueryPinnedCodesRequest is the request type for the Query/PinnedCodes
// RPC method
message QueryPinnedCodesRequest {
// pagination defines an optional pagination for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 2;
}
// QueryPinnedCodesResponse is the response type for the
// Query/PinnedCodes RPC method
message QueryPinnedCodesResponse {
repeated uint64 code_ids = 1
[ (gogoproto.nullable) = false, (gogoproto.customname) = "CodeIDs" ];
// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}