feat: x/blocksdk full module (#192)

* module proto

* lane proto

* proto-gen

* proto-format

* regenerate

* genesis

* stub

* test

* comment

* new keeper functions

* finalize

* lint fix

* proto format

* encounteredLanes

* make protos

* generate

* generate

* msgs

* msgs test

* msg service

* grpc query

* add module

* add module assertions

* add client

* fix proto

* typo
This commit is contained in:
Alex Johnson
2023-11-06 07:49:52 -05:00
committed by GitHub
parent ef654f5cbf
commit 79b9434615
24 changed files with 6860 additions and 15 deletions
+38
View File
@@ -0,0 +1,38 @@
syntax = "proto3";
package sdk.blocksdk.v1;
option go_package = "github.com/skip-mev/block-sdk/x/blocksdk/types";
import "google/api/annotations.proto";
import "gogoproto/gogo.proto";
import "cosmos/query/v1/query.proto";
import "sdk/blocksdk/v1/blocksdk.proto";
// Query defines the x/blocksdk querier service.
service Query {
// Lane queries the a lane by its id.
rpc Lane(QueryLaneRequest) returns (QueryLaneResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/block-sdk/blocksdk/v1/lane/{id}";
}
// Lane queries all lanes in the x/blocksdk module
rpc Lanes(QueryLanesRequest) returns (QueryLanesResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/block-sdk/blocksdk/v1/lanes";
}
}
// QueryLaneRequest is the request type for the Query/Lane RPC method.
message QueryLaneRequest { string id = 1; }
// QueryLaneResponse is the response type for the Query/Lane RPC method.
message QueryLaneResponse { Lane lane = 1 [ (gogoproto.nullable) = false ]; }
// QueryLaneRequest is the request type for the Query/Lanes RPC method.
message QueryLanesRequest {}
// QueryLaneResponse is the response type for the Query/Lanes RPC method.
message QueryLanesResponse {
repeated Lane lanes = 1 [ (gogoproto.nullable) = false ];
}
+33
View File
@@ -0,0 +1,33 @@
syntax = "proto3";
package sdk.blocksdk.v1;
option go_package = "github.com/skip-mev/block-sdk/x/blocksdk/types";
import "gogoproto/gogo.proto";
import "cosmos/msg/v1/msg.proto";
import "cosmos_proto/cosmos.proto";
import "amino/amino.proto";
import "sdk/blocksdk/v1/blocksdk.proto";
// Msg defines the x/blocksdk Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;
// UpdateLane defines a method to update an existing lane in the store.
rpc UpdateLane(MsgUpdateLane) returns (MsgUpdateLaneResponse);
}
// MsgUpdateLane defines a request to update an existing lane in the store.
message MsgUpdateLane {
option (cosmos.msg.v1.signer) = "authority";
option (amino.name) = "block-sdk/x/blocksdk/MsgUpdateLane";
option (gogoproto.equal) = false;
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
Lane lane = 2 [ (gogoproto.nullable) = false ];
}
// MsgUpdateLaneResponse defines a response to update an existing lane in the
// store.
message MsgUpdateLaneResponse {}