Skip to content

Commit be19141

Browse files
author
nashqueue
committed
Ignite cli scaffold map scavange
1 parent a475dec commit be19141

File tree

27 files changed

+3408
-56
lines changed

27 files changed

+3408
-56
lines changed

docs/static/openapi.yml

Lines changed: 259 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29845,6 +29845,187 @@ paths:
2984529845
additionalProperties: {}
2984629846
tags:
2984729847
- Query
29848+
/scavenge/scavenge/scavenge:
29849+
get:
29850+
summary: Queries a list of Scavenge items.
29851+
operationId: ScavengeScavengeScavengeAll
29852+
responses:
29853+
'200':
29854+
description: A successful response.
29855+
schema:
29856+
type: object
29857+
properties:
29858+
scavenge:
29859+
type: array
29860+
items:
29861+
type: object
29862+
properties:
29863+
index:
29864+
type: string
29865+
solutionHash:
29866+
type: string
29867+
solution:
29868+
type: string
29869+
description:
29870+
type: string
29871+
reward:
29872+
type: string
29873+
scavenger:
29874+
type: string
29875+
pagination:
29876+
type: object
29877+
properties:
29878+
next_key:
29879+
type: string
29880+
format: byte
29881+
title: |-
29882+
next_key is the key to be passed to PageRequest.key to
29883+
query the next page most efficiently
29884+
total:
29885+
type: string
29886+
format: uint64
29887+
title: >-
29888+
total is total number of results available if
29889+
PageRequest.count_total
29890+
29891+
was set, its value is undefined otherwise
29892+
description: >-
29893+
PageResponse is to be embedded in gRPC response messages where
29894+
the
29895+
29896+
corresponding request message has used PageRequest.
29897+
29898+
message SomeResponse {
29899+
repeated Bar results = 1;
29900+
PageResponse page = 2;
29901+
}
29902+
default:
29903+
description: An unexpected error response.
29904+
schema:
29905+
type: object
29906+
properties:
29907+
code:
29908+
type: integer
29909+
format: int32
29910+
message:
29911+
type: string
29912+
details:
29913+
type: array
29914+
items:
29915+
type: object
29916+
properties:
29917+
'@type':
29918+
type: string
29919+
additionalProperties: {}
29920+
parameters:
29921+
- name: pagination.key
29922+
description: |-
29923+
key is a value returned in PageResponse.next_key to begin
29924+
querying the next page most efficiently. Only one of offset or key
29925+
should be set.
29926+
in: query
29927+
required: false
29928+
type: string
29929+
format: byte
29930+
- name: pagination.offset
29931+
description: >-
29932+
offset is a numeric offset that can be used when key is unavailable.
29933+
29934+
It is less efficient than using key. Only one of offset or key
29935+
should
29936+
29937+
be set.
29938+
in: query
29939+
required: false
29940+
type: string
29941+
format: uint64
29942+
- name: pagination.limit
29943+
description: >-
29944+
limit is the total number of results to be returned in the result
29945+
page.
29946+
29947+
If left empty it will default to a value to be set by each app.
29948+
in: query
29949+
required: false
29950+
type: string
29951+
format: uint64
29952+
- name: pagination.count_total
29953+
description: >-
29954+
count_total is set to true to indicate that the result set should
29955+
include
29956+
29957+
a count of the total number of items available for pagination in
29958+
UIs.
29959+
29960+
count_total is only respected when offset is used. It is ignored
29961+
when key
29962+
29963+
is set.
29964+
in: query
29965+
required: false
29966+
type: boolean
29967+
- name: pagination.reverse
29968+
description: >-
29969+
reverse is set to true if results are to be returned in the
29970+
descending order.
29971+
29972+
29973+
Since: cosmos-sdk 0.43
29974+
in: query
29975+
required: false
29976+
type: boolean
29977+
tags:
29978+
- Query
29979+
'/scavenge/scavenge/scavenge/{index}':
29980+
get:
29981+
summary: Queries a Scavenge by index.
29982+
operationId: ScavengeScavengeScavenge
29983+
responses:
29984+
'200':
29985+
description: A successful response.
29986+
schema:
29987+
type: object
29988+
properties:
29989+
scavenge:
29990+
type: object
29991+
properties:
29992+
index:
29993+
type: string
29994+
solutionHash:
29995+
type: string
29996+
solution:
29997+
type: string
29998+
description:
29999+
type: string
30000+
reward:
30001+
type: string
30002+
scavenger:
30003+
type: string
30004+
default:
30005+
description: An unexpected error response.
30006+
schema:
30007+
type: object
30008+
properties:
30009+
code:
30010+
type: integer
30011+
format: int32
30012+
message:
30013+
type: string
30014+
details:
30015+
type: array
30016+
items:
30017+
type: object
30018+
properties:
30019+
'@type':
30020+
type: string
30021+
additionalProperties: {}
30022+
parameters:
30023+
- name: index
30024+
in: path
30025+
required: true
30026+
type: string
30027+
tags:
30028+
- Query
2984830029
/tendermint/spn/claim/airdrop_supply:
2984930030
get:
2985030031
summary: Queries a AirdropSupply by index.
@@ -51561,13 +51742,91 @@ definitions:
5156151742
scavenge.scavenge.Params:
5156251743
type: object
5156351744
description: Params defines the parameters for the module.
51745+
scavenge.scavenge.QueryAllScavengeResponse:
51746+
type: object
51747+
properties:
51748+
scavenge:
51749+
type: array
51750+
items:
51751+
type: object
51752+
properties:
51753+
index:
51754+
type: string
51755+
solutionHash:
51756+
type: string
51757+
solution:
51758+
type: string
51759+
description:
51760+
type: string
51761+
reward:
51762+
type: string
51763+
scavenger:
51764+
type: string
51765+
pagination:
51766+
type: object
51767+
properties:
51768+
next_key:
51769+
type: string
51770+
format: byte
51771+
title: |-
51772+
next_key is the key to be passed to PageRequest.key to
51773+
query the next page most efficiently
51774+
total:
51775+
type: string
51776+
format: uint64
51777+
title: >-
51778+
total is total number of results available if
51779+
PageRequest.count_total
51780+
51781+
was set, its value is undefined otherwise
51782+
description: |-
51783+
PageResponse is to be embedded in gRPC response messages where the
51784+
corresponding request message has used PageRequest.
51785+
51786+
message SomeResponse {
51787+
repeated Bar results = 1;
51788+
PageResponse page = 2;
51789+
}
51790+
scavenge.scavenge.QueryGetScavengeResponse:
51791+
type: object
51792+
properties:
51793+
scavenge:
51794+
type: object
51795+
properties:
51796+
index:
51797+
type: string
51798+
solutionHash:
51799+
type: string
51800+
solution:
51801+
type: string
51802+
description:
51803+
type: string
51804+
reward:
51805+
type: string
51806+
scavenger:
51807+
type: string
5156451808
scavenge.scavenge.QueryParamsResponse:
5156551809
type: object
5156651810
properties:
5156751811
params:
5156851812
description: params holds all the parameters of this module.
5156951813
type: object
5157051814
description: QueryParamsResponse is response type for the Query/Params RPC method.
51815+
scavenge.scavenge.Scavenge:
51816+
type: object
51817+
properties:
51818+
index:
51819+
type: string
51820+
solutionHash:
51821+
type: string
51822+
solution:
51823+
type: string
51824+
description:
51825+
type: string
51826+
reward:
51827+
type: string
51828+
scavenger:
51829+
type: string
5157151830
tendermint.spn.claim.ClaimRecord:
5157251831
type: object
5157351832
properties:

proto/scavenge/genesis.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ package scavenge.scavenge;
33

44
import "gogoproto/gogo.proto";
55
import "scavenge/params.proto";
6+
import "scavenge/scavenge.proto";
67
// this line is used by starport scaffolding # genesis/proto/import
78

89
option go_package = "scavenge/x/scavenge/types";
910

1011
// GenesisState defines the scavenge module's genesis state.
1112
message GenesisState {
1213
Params params = 1 [(gogoproto.nullable) = false];
14+
repeated Scavenge scavengeList = 2 [(gogoproto.nullable) = false];
1315
// this line is used by starport scaffolding # genesis/proto/state
1416
}

proto/scavenge/query.proto

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import "gogoproto/gogo.proto";
55
import "google/api/annotations.proto";
66
import "cosmos/base/query/v1beta1/pagination.proto";
77
import "scavenge/params.proto";
8+
import "scavenge/scavenge.proto";
89
// this line is used by starport scaffolding # 1
910

1011
option go_package = "scavenge/x/scavenge/types";
@@ -15,7 +16,17 @@ service Query {
1516
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
1617
option (google.api.http).get = "/scavenge/scavenge/params";
1718
}
18-
// this line is used by starport scaffolding # 2
19+
// Queries a Scavenge by index.
20+
rpc Scavenge(QueryGetScavengeRequest) returns (QueryGetScavengeResponse) {
21+
option (google.api.http).get = "/scavenge/scavenge/scavenge/{index}";
22+
}
23+
24+
// Queries a list of Scavenge items.
25+
rpc ScavengeAll(QueryAllScavengeRequest) returns (QueryAllScavengeResponse) {
26+
option (google.api.http).get = "/scavenge/scavenge/scavenge";
27+
}
28+
29+
// this line is used by starport scaffolding # 2
1930
}
2031

2132
// QueryParamsRequest is request type for the Query/Params RPC method.
@@ -27,4 +38,22 @@ message QueryParamsResponse {
2738
Params params = 1 [(gogoproto.nullable) = false];
2839
}
2940

41+
message QueryGetScavengeRequest {
42+
string index = 1;
43+
44+
}
45+
46+
message QueryGetScavengeResponse {
47+
Scavenge scavenge = 1 [(gogoproto.nullable) = false];
48+
}
49+
50+
message QueryAllScavengeRequest {
51+
cosmos.base.query.v1beta1.PageRequest pagination = 1;
52+
}
53+
54+
message QueryAllScavengeResponse {
55+
repeated Scavenge scavenge = 1 [(gogoproto.nullable) = false];
56+
cosmos.base.query.v1beta1.PageResponse pagination = 2;
57+
}
58+
3059
// this line is used by starport scaffolding # 3

proto/scavenge/scavenge.proto

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

0 commit comments

Comments
 (0)