Skip to content

Commit

Permalink
Merge pull request #769 from public-awesome/adding-msgsrvr-and-query-…
Browse files Browse the repository at this point in the history
…srvr

feat(x/globalfee): Adding msg server and query server
  • Loading branch information
jhernandezb authored Apr 24, 2023
2 parents 661700f + ca3454c commit 3bccb63
Show file tree
Hide file tree
Showing 14 changed files with 4,597 additions and 39 deletions.
241 changes: 241 additions & 0 deletions docs/proto/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,27 @@

- [stargaze/globalfee/v1/proposal.proto](#stargaze/globalfee/v1/proposal.proto)
- [stargaze/globalfee/v1/query.proto](#stargaze/globalfee/v1/query.proto)
- [QueryAuthorizationsRequest](#publicawesome.stargaze.globalfee.v1.QueryAuthorizationsRequest)
- [QueryAuthorizationsResponse](#publicawesome.stargaze.globalfee.v1.QueryAuthorizationsResponse)
- [QueryCodeAuthorizationRequest](#publicawesome.stargaze.globalfee.v1.QueryCodeAuthorizationRequest)
- [QueryCodeAuthorizationResponse](#publicawesome.stargaze.globalfee.v1.QueryCodeAuthorizationResponse)
- [QueryContractAuthorizationRequest](#publicawesome.stargaze.globalfee.v1.QueryContractAuthorizationRequest)
- [QueryContractAuthorizationResponse](#publicawesome.stargaze.globalfee.v1.QueryContractAuthorizationResponse)
- [QueryParamsRequest](#publicawesome.stargaze.globalfee.v1.QueryParamsRequest)
- [QueryParamsResponse](#publicawesome.stargaze.globalfee.v1.QueryParamsResponse)

- [Query](#publicawesome.stargaze.globalfee.v1.Query)

- [stargaze/globalfee/v1/tx.proto](#stargaze/globalfee/v1/tx.proto)
- [MsgRemoveCodeAuthorization](#publicawesome.stargaze.globalfee.v1.MsgRemoveCodeAuthorization)
- [MsgRemoveCodeAuthorizationResponse](#publicawesome.stargaze.globalfee.v1.MsgRemoveCodeAuthorizationResponse)
- [MsgRemoveContractAuthorization](#publicawesome.stargaze.globalfee.v1.MsgRemoveContractAuthorization)
- [MsgRemoveContractAuthorizationResponse](#publicawesome.stargaze.globalfee.v1.MsgRemoveContractAuthorizationResponse)
- [MsgSetCodeAuthorization](#publicawesome.stargaze.globalfee.v1.MsgSetCodeAuthorization)
- [MsgSetCodeAuthorizationResponse](#publicawesome.stargaze.globalfee.v1.MsgSetCodeAuthorizationResponse)
- [MsgSetContractAuthorization](#publicawesome.stargaze.globalfee.v1.MsgSetContractAuthorization)
- [MsgSetContractAuthorizationResponse](#publicawesome.stargaze.globalfee.v1.MsgSetContractAuthorizationResponse)

- [Msg](#publicawesome.stargaze.globalfee.v1.Msg)

- [stargaze/mint/v1beta1/mint.proto](#stargaze/mint/v1beta1/mint.proto)
Expand Down Expand Up @@ -982,6 +1000,117 @@ Params holds parameters for the globalfee module.
## stargaze/globalfee/v1/query.proto



<a name="publicawesome.stargaze.globalfee.v1.QueryAuthorizationsRequest"></a>

### QueryAuthorizationsRequest







<a name="publicawesome.stargaze.globalfee.v1.QueryAuthorizationsResponse"></a>

### QueryAuthorizationsResponse



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `code_authorizations` | [CodeAuthorization](#publicawesome.stargaze.globalfee.v1.CodeAuthorization) | repeated | |
| `contract_authorizations` | [ContractAuthorization](#publicawesome.stargaze.globalfee.v1.ContractAuthorization) | repeated | |






<a name="publicawesome.stargaze.globalfee.v1.QueryCodeAuthorizationRequest"></a>

### QueryCodeAuthorizationRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `code_id` | [uint64](#uint64) | | |






<a name="publicawesome.stargaze.globalfee.v1.QueryCodeAuthorizationResponse"></a>

### QueryCodeAuthorizationResponse



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `methods` | [string](#string) | repeated | |






<a name="publicawesome.stargaze.globalfee.v1.QueryContractAuthorizationRequest"></a>

### QueryContractAuthorizationRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `contract_address` | [string](#string) | | |






<a name="publicawesome.stargaze.globalfee.v1.QueryContractAuthorizationResponse"></a>

### QueryContractAuthorizationResponse



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `methods` | [string](#string) | repeated | |






<a name="publicawesome.stargaze.globalfee.v1.QueryParamsRequest"></a>

### QueryParamsRequest







<a name="publicawesome.stargaze.globalfee.v1.QueryParamsResponse"></a>

### QueryParamsResponse



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `params` | [Params](#publicawesome.stargaze.globalfee.v1.Params) | | |





<!-- end messages -->

<!-- end enums -->
Expand All @@ -996,6 +1125,10 @@ Query defines the gRPC querier service.

| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint |
| ----------- | ------------ | ------------- | ------------| ------- | -------- |
| `CodeAuthorization` | [QueryCodeAuthorizationRequest](#publicawesome.stargaze.globalfee.v1.QueryCodeAuthorizationRequest) | [QueryCodeAuthorizationResponse](#publicawesome.stargaze.globalfee.v1.QueryCodeAuthorizationResponse) | | GET|/stargaze/globalfee/v1/code_authorization/{code_id}|
| `ContractAuthorization` | [QueryContractAuthorizationRequest](#publicawesome.stargaze.globalfee.v1.QueryContractAuthorizationRequest) | [QueryContractAuthorizationResponse](#publicawesome.stargaze.globalfee.v1.QueryContractAuthorizationResponse) | | GET|/stargaze/globalfee/v1/contract_authorization/{contract_address}|
| `Params` | [QueryParamsRequest](#publicawesome.stargaze.globalfee.v1.QueryParamsRequest) | [QueryParamsResponse](#publicawesome.stargaze.globalfee.v1.QueryParamsResponse) | | GET|/stargaze/globalfee/v1/params|
| `Authorizations` | [QueryAuthorizationsRequest](#publicawesome.stargaze.globalfee.v1.QueryAuthorizationsRequest) | [QueryAuthorizationsResponse](#publicawesome.stargaze.globalfee.v1.QueryAuthorizationsResponse) | | GET|/stargaze/globalfee/v1/authorizations|

<!-- end services -->

Expand All @@ -1007,6 +1140,110 @@ Query defines the gRPC querier service.
## stargaze/globalfee/v1/tx.proto



<a name="publicawesome.stargaze.globalfee.v1.MsgRemoveCodeAuthorization"></a>

### MsgRemoveCodeAuthorization



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `sender` | [string](#string) | | |
| `code_id` | [uint64](#uint64) | | |






<a name="publicawesome.stargaze.globalfee.v1.MsgRemoveCodeAuthorizationResponse"></a>

### MsgRemoveCodeAuthorizationResponse







<a name="publicawesome.stargaze.globalfee.v1.MsgRemoveContractAuthorization"></a>

### MsgRemoveContractAuthorization



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `sender` | [string](#string) | | |
| `contract_address` | [string](#string) | | |






<a name="publicawesome.stargaze.globalfee.v1.MsgRemoveContractAuthorizationResponse"></a>

### MsgRemoveContractAuthorizationResponse







<a name="publicawesome.stargaze.globalfee.v1.MsgSetCodeAuthorization"></a>

### MsgSetCodeAuthorization



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `sender` | [string](#string) | | |
| `code_authorization` | [CodeAuthorization](#publicawesome.stargaze.globalfee.v1.CodeAuthorization) | | |






<a name="publicawesome.stargaze.globalfee.v1.MsgSetCodeAuthorizationResponse"></a>

### MsgSetCodeAuthorizationResponse







<a name="publicawesome.stargaze.globalfee.v1.MsgSetContractAuthorization"></a>

### MsgSetContractAuthorization



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `sender` | [string](#string) | | |
| `contract_authorization` | [ContractAuthorization](#publicawesome.stargaze.globalfee.v1.ContractAuthorization) | | |






<a name="publicawesome.stargaze.globalfee.v1.MsgSetContractAuthorizationResponse"></a>

### MsgSetContractAuthorizationResponse






<!-- end messages -->

<!-- end enums -->
Expand All @@ -1021,6 +1258,10 @@ Msg defines the alloc Msg service.

| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint |
| ----------- | ------------ | ------------- | ------------| ------- | -------- |
| `SetCodeAuthorization` | [MsgSetCodeAuthorization](#publicawesome.stargaze.globalfee.v1.MsgSetCodeAuthorization) | [MsgSetCodeAuthorizationResponse](#publicawesome.stargaze.globalfee.v1.MsgSetCodeAuthorizationResponse) | | |
| `RemoveCodeAuthorization` | [MsgRemoveCodeAuthorization](#publicawesome.stargaze.globalfee.v1.MsgRemoveCodeAuthorization) | [MsgRemoveCodeAuthorizationResponse](#publicawesome.stargaze.globalfee.v1.MsgRemoveCodeAuthorizationResponse) | | |
| `SetContractAuthorization` | [MsgSetContractAuthorization](#publicawesome.stargaze.globalfee.v1.MsgSetContractAuthorization) | [MsgSetContractAuthorizationResponse](#publicawesome.stargaze.globalfee.v1.MsgSetContractAuthorizationResponse) | | |
| `RemoveContractAuthorization` | [MsgRemoveContractAuthorization](#publicawesome.stargaze.globalfee.v1.MsgRemoveContractAuthorization) | [MsgRemoveContractAuthorizationResponse](#publicawesome.stargaze.globalfee.v1.MsgRemoveContractAuthorizationResponse) | | |

<!-- end services -->

Expand Down
45 changes: 45 additions & 0 deletions proto/stargaze/globalfee/v1/query.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,54 @@
syntax = "proto3";
package publicawesome.stargaze.globalfee.v1;

import "google/api/annotations.proto";
import "stargaze/globalfee/v1/globalfee.proto";

option go_package = "github.com/public-awesome/stargaze/v9/x/globalfee/types";

// Query defines the gRPC querier service.
service Query {
rpc CodeAuthorization(QueryCodeAuthorizationRequest) returns (QueryCodeAuthorizationResponse) {
option (google.api.http).get =
"/stargaze/globalfee/v1/code_authorization/{code_id}";
}
rpc ContractAuthorization(QueryContractAuthorizationRequest) returns (QueryContractAuthorizationResponse) {
option (google.api.http).get =
"/stargaze/globalfee/v1/contract_authorization/{contract_address}";
}
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/stargaze/globalfee/v1/params";
}
rpc Authorizations(QueryAuthorizationsRequest) returns (QueryAuthorizationsResponse) {
option (google.api.http).get = "/stargaze/globalfee/v1/authorizations";
}
}

message QueryCodeAuthorizationRequest {
uint64 code_id = 1;
}

message QueryCodeAuthorizationResponse {
repeated string methods = 1;
}

message QueryContractAuthorizationRequest {
string contract_address = 1;
}

message QueryContractAuthorizationResponse {
repeated string methods = 1;
}

message QueryParamsRequest {}

message QueryParamsResponse {
Params params = 1;
}

message QueryAuthorizationsRequest {}

message QueryAuthorizationsResponse {
repeated CodeAuthorization code_authorizations = 1;
repeated ContractAuthorization contract_authorizations = 2;
}
36 changes: 36 additions & 0 deletions proto/stargaze/globalfee/v1/tx.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,45 @@
syntax = "proto3";
package publicawesome.stargaze.globalfee.v1;

import "stargaze/globalfee/v1/globalfee.proto";

option go_package = "github.com/public-awesome/stargaze/v9/x/globalfee/types";

// Msg defines the alloc Msg service.
service Msg {
rpc SetCodeAuthorization (MsgSetCodeAuthorization) returns (MsgSetCodeAuthorizationResponse);

rpc RemoveCodeAuthorization(MsgRemoveCodeAuthorization) returns (MsgRemoveCodeAuthorizationResponse);

rpc SetContractAuthorization (MsgSetContractAuthorization ) returns (MsgSetContractAuthorizationResponse);

rpc RemoveContractAuthorization(MsgRemoveContractAuthorization) returns (MsgRemoveContractAuthorizationResponse);
}

message MsgSetCodeAuthorization {
string sender = 1;
CodeAuthorization code_authorization = 2;
}

message MsgSetCodeAuthorizationResponse {}

message MsgRemoveCodeAuthorization {
string sender = 1;
uint64 code_id = 2;
}

message MsgRemoveCodeAuthorizationResponse {}

message MsgSetContractAuthorization {
string sender = 1;
ContractAuthorization contract_authorization = 2;
}

message MsgSetContractAuthorizationResponse {}

message MsgRemoveContractAuthorization {
string sender = 1;
string contract_address = 2;
}

message MsgRemoveContractAuthorizationResponse {}
Loading

0 comments on commit 3bccb63

Please sign in to comment.