Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
braverdever committed Nov 9, 2023
1 parent 01aa879 commit 587596c
Show file tree
Hide file tree
Showing 44 changed files with 11,271 additions and 3,628 deletions.
452 changes: 376 additions & 76 deletions docs/static/openapi.yml

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,22 @@ require (
github.com/cosmos/ibc-go/v3 v3.0.0
github.com/gogo/protobuf v1.3.3
github.com/golang/protobuf v1.5.3
github.com/google/go-cmp v0.6.0 // indirect
github.com/gorilla/mux v1.8.0
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect
github.com/ignite-hq/cli v0.22.0
github.com/kr/pretty v0.3.1 // indirect
github.com/regen-network/cosmos-proto v0.3.1 // indirect
github.com/spf13/cast v1.4.1
github.com/spf13/cobra v1.4.0
github.com/stretchr/testify v1.8.2
github.com/stretchr/testify v1.8.3
github.com/tendermint/spn v0.2.1-0.20220609194312-7833ecf4454a
github.com/tendermint/tendermint v0.34.19
github.com/tendermint/tm-db v0.6.7
golang.org/x/net v0.15.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/grpc v1.58.0
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17
google.golang.org/grpc v1.59.0
gopkg.in/yaml.v2 v2.4.0
)

Expand Down
354 changes: 339 additions & 15 deletions go.sum

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions proto/checkers/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ package alice.checkers.checkers;

import "gogoproto/gogo.proto";
import "checkers/params.proto";
import "checkers/system_info.proto";
import "checkers/stored_game.proto";
// this line is used by starport scaffolding # genesis/proto/import

option go_package = "github.com/alice/checkers/x/checkers/types";

// GenesisState defines the checkers module's genesis state.
message GenesisState {
Params params = 1 [(gogoproto.nullable) = false];
SystemInfo systemInfo = 2 [(gogoproto.nullable) = false];
repeated StoredGame storedGameList = 3 [(gogoproto.nullable) = false];
// this line is used by starport scaffolding # genesis/proto/state
}
41 changes: 40 additions & 1 deletion proto/checkers/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
import "checkers/params.proto";
import "checkers/system_info.proto";
import "checkers/stored_game.proto";
// this line is used by starport scaffolding # 1

option go_package = "github.com/alice/checkers/x/checkers/types";
Expand All @@ -15,7 +17,21 @@ service Query {
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/alice/checkers/checkers/params";
}
// this line is used by starport scaffolding # 2
// Queries a SystemInfo by index.
rpc SystemInfo(QueryGetSystemInfoRequest) returns (QueryGetSystemInfoResponse) {
option (google.api.http).get = "/alice/checkers/checkers/system_info";
}
// Queries a StoredGame by index.
rpc StoredGame(QueryGetStoredGameRequest) returns (QueryGetStoredGameResponse) {
option (google.api.http).get = "/alice/checkers/checkers/stored_game/{index}";
}

// Queries a list of StoredGame items.
rpc StoredGameAll(QueryAllStoredGameRequest) returns (QueryAllStoredGameResponse) {
option (google.api.http).get = "/alice/checkers/checkers/stored_game";
}

// this line is used by starport scaffolding # 2
}

// QueryParamsRequest is request type for the Query/Params RPC method.
Expand All @@ -27,4 +43,27 @@ message QueryParamsResponse {
Params params = 1 [(gogoproto.nullable) = false];
}

message QueryGetSystemInfoRequest {}

message QueryGetSystemInfoResponse {
SystemInfo SystemInfo = 1 [(gogoproto.nullable) = false];
}
message QueryGetStoredGameRequest {
string index = 1;

}

message QueryGetStoredGameResponse {
StoredGame storedGame = 1 [(gogoproto.nullable) = false];
}

message QueryAllStoredGameRequest {
cosmos.base.query.v1beta1.PageRequest pagination = 1;
}

message QueryAllStoredGameResponse {
repeated StoredGame storedGame = 1 [(gogoproto.nullable) = false];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

// this line is used by starport scaffolding # 3
14 changes: 14 additions & 0 deletions proto/checkers/stored_game.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
syntax = "proto3";
package alice.checkers.checkers;

option go_package = "github.com/alice/checkers/x/checkers/types";

message StoredGame {
string index = 1;
string board = 2;
string turn = 3;
string black = 4;
string red = 5;

}

9 changes: 9 additions & 0 deletions proto/checkers/system_info.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
syntax = "proto3";
package alice.checkers.checkers;

option go_package = "github.com/alice/checkers/x/checkers/types";

message SystemInfo {
uint64 nextId = 1;

}
Loading

0 comments on commit 587596c

Please sign in to comment.