Skip to content

Commit 06f345a

Browse files
author
nashqueue
committed
Ignite cli scaffold map commit
1 parent be19141 commit 06f345a

File tree

26 files changed

+3153
-157
lines changed

26 files changed

+3153
-157
lines changed

docs/static/openapi.yml

Lines changed: 229 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29809,6 +29809,175 @@ paths:
2980929809
format: uint64
2981029810
tags:
2981129811
- Query
29812+
/scavenge/scavenge/commit:
29813+
get:
29814+
summary: Queries a list of Commit items.
29815+
operationId: ScavengeScavengeCommitAll
29816+
responses:
29817+
'200':
29818+
description: A successful response.
29819+
schema:
29820+
type: object
29821+
properties:
29822+
commit:
29823+
type: array
29824+
items:
29825+
type: object
29826+
properties:
29827+
index:
29828+
type: string
29829+
solutionHash:
29830+
type: string
29831+
solutionScavengerHash:
29832+
type: string
29833+
pagination:
29834+
type: object
29835+
properties:
29836+
next_key:
29837+
type: string
29838+
format: byte
29839+
title: |-
29840+
next_key is the key to be passed to PageRequest.key to
29841+
query the next page most efficiently
29842+
total:
29843+
type: string
29844+
format: uint64
29845+
title: >-
29846+
total is total number of results available if
29847+
PageRequest.count_total
29848+
29849+
was set, its value is undefined otherwise
29850+
description: >-
29851+
PageResponse is to be embedded in gRPC response messages where
29852+
the
29853+
29854+
corresponding request message has used PageRequest.
29855+
29856+
message SomeResponse {
29857+
repeated Bar results = 1;
29858+
PageResponse page = 2;
29859+
}
29860+
default:
29861+
description: An unexpected error response.
29862+
schema:
29863+
type: object
29864+
properties:
29865+
code:
29866+
type: integer
29867+
format: int32
29868+
message:
29869+
type: string
29870+
details:
29871+
type: array
29872+
items:
29873+
type: object
29874+
properties:
29875+
'@type':
29876+
type: string
29877+
additionalProperties: {}
29878+
parameters:
29879+
- name: pagination.key
29880+
description: |-
29881+
key is a value returned in PageResponse.next_key to begin
29882+
querying the next page most efficiently. Only one of offset or key
29883+
should be set.
29884+
in: query
29885+
required: false
29886+
type: string
29887+
format: byte
29888+
- name: pagination.offset
29889+
description: >-
29890+
offset is a numeric offset that can be used when key is unavailable.
29891+
29892+
It is less efficient than using key. Only one of offset or key
29893+
should
29894+
29895+
be set.
29896+
in: query
29897+
required: false
29898+
type: string
29899+
format: uint64
29900+
- name: pagination.limit
29901+
description: >-
29902+
limit is the total number of results to be returned in the result
29903+
page.
29904+
29905+
If left empty it will default to a value to be set by each app.
29906+
in: query
29907+
required: false
29908+
type: string
29909+
format: uint64
29910+
- name: pagination.count_total
29911+
description: >-
29912+
count_total is set to true to indicate that the result set should
29913+
include
29914+
29915+
a count of the total number of items available for pagination in
29916+
UIs.
29917+
29918+
count_total is only respected when offset is used. It is ignored
29919+
when key
29920+
29921+
is set.
29922+
in: query
29923+
required: false
29924+
type: boolean
29925+
- name: pagination.reverse
29926+
description: >-
29927+
reverse is set to true if results are to be returned in the
29928+
descending order.
29929+
29930+
29931+
Since: cosmos-sdk 0.43
29932+
in: query
29933+
required: false
29934+
type: boolean
29935+
tags:
29936+
- Query
29937+
'/scavenge/scavenge/commit/{index}':
29938+
get:
29939+
summary: Queries a Commit by index.
29940+
operationId: ScavengeScavengeCommit
29941+
responses:
29942+
'200':
29943+
description: A successful response.
29944+
schema:
29945+
type: object
29946+
properties:
29947+
commit:
29948+
type: object
29949+
properties:
29950+
index:
29951+
type: string
29952+
solutionHash:
29953+
type: string
29954+
solutionScavengerHash:
29955+
type: string
29956+
default:
29957+
description: An unexpected error response.
29958+
schema:
29959+
type: object
29960+
properties:
29961+
code:
29962+
type: integer
29963+
format: int32
29964+
message:
29965+
type: string
29966+
details:
29967+
type: array
29968+
items:
29969+
type: object
29970+
properties:
29971+
'@type':
29972+
type: string
29973+
additionalProperties: {}
29974+
parameters:
29975+
- name: index
29976+
in: path
29977+
required: true
29978+
type: string
29979+
tags:
29980+
- Query
2981229981
/scavenge/scavenge/params:
2981329982
get:
2981429983
summary: Parameters queries the parameters of the module.
@@ -51733,6 +51902,15 @@ definitions:
5173351902
description: |-
5173451903
Version defines the versioning scheme used to negotiate the IBC verison in
5173551904
the connection handshake.
51905+
scavenge.scavenge.Commit:
51906+
type: object
51907+
properties:
51908+
index:
51909+
type: string
51910+
solutionHash:
51911+
type: string
51912+
solutionScavengerHash:
51913+
type: string
5173651914
scavenge.scavenge.MsgCommitSolutionResponse:
5173751915
type: object
5173851916
scavenge.scavenge.MsgRevealSolutionResponse:
@@ -51742,6 +51920,45 @@ definitions:
5174251920
scavenge.scavenge.Params:
5174351921
type: object
5174451922
description: Params defines the parameters for the module.
51923+
scavenge.scavenge.QueryAllCommitResponse:
51924+
type: object
51925+
properties:
51926+
commit:
51927+
type: array
51928+
items:
51929+
type: object
51930+
properties:
51931+
index:
51932+
type: string
51933+
solutionHash:
51934+
type: string
51935+
solutionScavengerHash:
51936+
type: string
51937+
pagination:
51938+
type: object
51939+
properties:
51940+
next_key:
51941+
type: string
51942+
format: byte
51943+
title: |-
51944+
next_key is the key to be passed to PageRequest.key to
51945+
query the next page most efficiently
51946+
total:
51947+
type: string
51948+
format: uint64
51949+
title: >-
51950+
total is total number of results available if
51951+
PageRequest.count_total
51952+
51953+
was set, its value is undefined otherwise
51954+
description: |-
51955+
PageResponse is to be embedded in gRPC response messages where the
51956+
corresponding request message has used PageRequest.
51957+
51958+
message SomeResponse {
51959+
repeated Bar results = 1;
51960+
PageResponse page = 2;
51961+
}
5174551962
scavenge.scavenge.QueryAllScavengeResponse:
5174651963
type: object
5174751964
properties:
@@ -51787,6 +52004,18 @@ definitions:
5178752004
repeated Bar results = 1;
5178852005
PageResponse page = 2;
5178952006
}
52007+
scavenge.scavenge.QueryGetCommitResponse:
52008+
type: object
52009+
properties:
52010+
commit:
52011+
type: object
52012+
properties:
52013+
index:
52014+
type: string
52015+
solutionHash:
52016+
type: string
52017+
solutionScavengerHash:
52018+
type: string
5179052019
scavenge.scavenge.QueryGetScavengeResponse:
5179152020
type: object
5179252021
properties:

proto/scavenge/commit.proto

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
syntax = "proto3";
2+
package scavenge.scavenge;
3+
4+
option go_package = "scavenge/x/scavenge/types";
5+
6+
message Commit {
7+
string index = 1;
8+
string solutionHash = 2;
9+
string solutionScavengerHash = 3;
10+
11+
}
12+

proto/scavenge/genesis.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package scavenge.scavenge;
44
import "gogoproto/gogo.proto";
55
import "scavenge/params.proto";
66
import "scavenge/scavenge.proto";
7+
import "scavenge/commit.proto";
78
// this line is used by starport scaffolding # genesis/proto/import
89

910
option go_package = "scavenge/x/scavenge/types";
@@ -12,5 +13,6 @@ option go_package = "scavenge/x/scavenge/types";
1213
message GenesisState {
1314
Params params = 1 [(gogoproto.nullable) = false];
1415
repeated Scavenge scavengeList = 2 [(gogoproto.nullable) = false];
16+
repeated Commit commitList = 3 [(gogoproto.nullable) = false];
1517
// this line is used by starport scaffolding # genesis/proto/state
1618
}

proto/scavenge/query.proto

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import "google/api/annotations.proto";
66
import "cosmos/base/query/v1beta1/pagination.proto";
77
import "scavenge/params.proto";
88
import "scavenge/scavenge.proto";
9+
import "scavenge/commit.proto";
910
// this line is used by starport scaffolding # 1
1011

1112
option go_package = "scavenge/x/scavenge/types";
@@ -26,6 +27,16 @@ service Query {
2627
option (google.api.http).get = "/scavenge/scavenge/scavenge";
2728
}
2829

30+
// Queries a Commit by index.
31+
rpc Commit(QueryGetCommitRequest) returns (QueryGetCommitResponse) {
32+
option (google.api.http).get = "/scavenge/scavenge/commit/{index}";
33+
}
34+
35+
// Queries a list of Commit items.
36+
rpc CommitAll(QueryAllCommitRequest) returns (QueryAllCommitResponse) {
37+
option (google.api.http).get = "/scavenge/scavenge/commit";
38+
}
39+
2940
// this line is used by starport scaffolding # 2
3041
}
3142

@@ -56,4 +67,22 @@ message QueryAllScavengeResponse {
5667
cosmos.base.query.v1beta1.PageResponse pagination = 2;
5768
}
5869

70+
message QueryGetCommitRequest {
71+
string index = 1;
72+
73+
}
74+
75+
message QueryGetCommitResponse {
76+
Commit commit = 1 [(gogoproto.nullable) = false];
77+
}
78+
79+
message QueryAllCommitRequest {
80+
cosmos.base.query.v1beta1.PageRequest pagination = 1;
81+
}
82+
83+
message QueryAllCommitResponse {
84+
repeated Commit commit = 1 [(gogoproto.nullable) = false];
85+
cosmos.base.query.v1beta1.PageResponse pagination = 2;
86+
}
87+
5988
// this line is used by starport scaffolding # 3

0 commit comments

Comments
 (0)