-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Gateway] Scaffold the Gateway type (#57)
Simply ran ``` ignite scaffold map gateway --module gateway --signer address --no-message --index address --yes ```
- Loading branch information
Showing
16 changed files
with
881 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
syntax = "proto3"; | ||
package pocket.gateway; | ||
|
||
option go_package = "pocket/x/gateway/types"; | ||
|
||
message Gateway { | ||
string address = 1; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
syntax = "proto3"; | ||
|
||
package pocket.gateway; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "pocket/gateway/params.proto"; | ||
import "pocket/gateway/gateway.proto"; | ||
|
||
option go_package = "pocket/x/gateway/types"; | ||
|
||
// GenesisState defines the gateway module's genesis state. | ||
message GenesisState { | ||
Params params = 1 [(gogoproto.nullable) = false]; | ||
Params params = 1 [(gogoproto.nullable) = false]; | ||
repeated Gateway gatewayList = 2 [(gogoproto.nullable) = false]; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,58 @@ | ||
syntax = "proto3"; | ||
|
||
package pocket.gateway; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "google/api/annotations.proto"; | ||
import "cosmos/base/query/v1beta1/pagination.proto"; | ||
import "pocket/gateway/params.proto"; | ||
import "pocket/gateway/gateway.proto"; | ||
|
||
option go_package = "pocket/x/gateway/types"; | ||
|
||
// Query defines the gRPC querier service. | ||
service Query { | ||
|
||
// Parameters queries the parameters of the module. | ||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { | ||
rpc Params (QueryParamsRequest) returns (QueryParamsResponse) { | ||
option (google.api.http).get = "/pocket/gateway/params"; | ||
|
||
} | ||
|
||
// Queries a list of Gateway items. | ||
rpc Gateway (QueryGetGatewayRequest) returns (QueryGetGatewayResponse) { | ||
option (google.api.http).get = "/pocket/gateway/gateway/{address}"; | ||
|
||
} | ||
rpc GatewayAll (QueryAllGatewayRequest) returns (QueryAllGatewayResponse) { | ||
option (google.api.http).get = "/pocket/gateway/gateway"; | ||
|
||
} | ||
} | ||
|
||
// QueryParamsRequest is request type for the Query/Params RPC method. | ||
message QueryParamsRequest {} | ||
|
||
// QueryParamsResponse is response type for the Query/Params RPC method. | ||
message QueryParamsResponse { | ||
|
||
// params holds all the parameters of this module. | ||
Params params = 1 [(gogoproto.nullable) = false]; | ||
} | ||
} | ||
|
||
message QueryGetGatewayRequest { | ||
string address = 1; | ||
} | ||
|
||
message QueryGetGatewayResponse { | ||
Gateway gateway = 1 [(gogoproto.nullable) = false]; | ||
} | ||
|
||
message QueryAllGatewayRequest { | ||
cosmos.base.query.v1beta1.PageRequest pagination = 1; | ||
} | ||
|
||
message QueryAllGatewayResponse { | ||
repeated Gateway gateway = 1 [(gogoproto.nullable) = false]; | ||
cosmos.base.query.v1beta1.PageResponse pagination = 2; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.