Skip to content

Commit

Permalink
chore: fix protobuf linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Lockwarr committed Nov 11, 2024
1 parent 4426156 commit 99a6582
Show file tree
Hide file tree
Showing 31 changed files with 1,493 additions and 408 deletions.
40 changes: 33 additions & 7 deletions proto/nolus/contractmanager/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ service Query {
}

// Queries a Failure by contract address and failure ID.
rpc AddressFailure(QueryFailuresRequest) returns (QueryFailuresResponse) {
rpc AddressFailure(QueryFailureRequest) returns (QueryFailureResponse) {
option (google.api.http).get = "/nolus/contractmanager/failures/{address}/{failure_id}";
}

// Queries Failures by contract address.
rpc AddressFailures(QueryFailuresRequest) returns (QueryFailuresResponse) {
rpc AddressFailures(QueryFailuresByAddressRequest) returns (QueryFailuresByAddressResponse) {
option (google.api.http).get = "/nolus/contractmanager/failures/{address}";
}

Expand All @@ -46,11 +46,9 @@ message QueryParamsResponse {

// QueryFailuresRequest is request type for the Query/Failures RPC method.
message QueryFailuresRequest {
// address of the contract which Sudo call failed.
string address = 1;
// ID of the failure for the given contract.
uint64 failure_id = 2;
cosmos.base.query.v1beta1.PageRequest pagination = 3;
// address of the contract which Sudo call failed.
string address = 1;
cosmos.base.query.v1beta1.PageRequest pagination = 2;
}

// QueryFailuresResponse is response type for the Query/Failures RPC method.
Expand All @@ -59,4 +57,32 @@ message QueryFailuresResponse {
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

// QueryFailureRequest is request type for the Query/Failures/{address}/{failure_id} RPC method.
message QueryFailureRequest {
// address of the contract which Sudo call failed.
string address = 1;
// ID of the failure for the given contract.
uint64 failure_id = 2;
cosmos.base.query.v1beta1.PageRequest pagination = 3;
}

// QueryFailureResponse is response type for the Query/Failures/{failure_id} RPC method.
message QueryFailureResponse {
repeated Failure failures = 1 [(gogoproto.nullable) = false];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

// QueryFailuresByAddressRequest is request type for the Query/Failures/{address} RPC method.
message QueryFailuresByAddressRequest {
// address of the contract which Sudo call failed.
string address = 1;
cosmos.base.query.v1beta1.PageRequest pagination = 2;
}

// QueryFailureResponse is response type for the Query/Failures/{address} RPC method.
message QueryFailuresByAddressResponse {
repeated Failure failures = 1 [(gogoproto.nullable) = false];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

// this line is used by starport scaffolding # 3
1 change: 1 addition & 0 deletions proto/nolus/contractmanager/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ option go_package = "github.com/Nolus-Protocol/nolus-core/x/contractmanager/type
service Msg {
option (cosmos.msg.v1.service) = true;

// UpdateParams updates the x/contractmanager parameters.
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
// this line is used by starport scaffolding # proto/tx/rpc
}
Expand Down
3 changes: 2 additions & 1 deletion proto/nolus/feerefunder/fee.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "gogoproto/gogo.proto";

option go_package = "github.com/Nolus-Protocol/nolus-core/x/feerefunder/types";

// Fee defines the ICS29 receive, acknowledgement and timeout fees
// Fee defines the ICS29 receive, acknowledgement and timeout fees.
message Fee {
// the packet receive fee
repeated cosmos.base.v1beta1.Coin recv_fee = 1 [
Expand All @@ -28,6 +28,7 @@ message Fee {
];
}

// PacketID uniquely identifies a packet by its channel, port and sequence.
message PacketID {
string channel_id = 1;
string port_id = 2;
Expand Down
1 change: 1 addition & 0 deletions proto/nolus/feerefunder/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ message GenesisState {
// this line is used by starport scaffolding # genesis/proto/state
}

// FeeInfo defines the fee information for a fee in the feerefunder module.
message FeeInfo {
string payer = 1;
PacketID packet_id = 2 [(gogoproto.nullable) = false];
Expand Down
4 changes: 3 additions & 1 deletion proto/nolus/feerefunder/query.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
syntax = "proto3";
package nolus.feerefunder;

import "cosmos/base/query/v1beta1/pagination.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "nolus/feerefunder/genesis.proto";
Expand All @@ -16,6 +15,7 @@ service Query {
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/nolus/feerefunder/params";
}
// FeeInfo queries the fee information for a fee in the feerefunder module.
rpc FeeInfo(FeeInfoRequest) returns (FeeInfoResponse) {
option (google.api.http).get = "/nolus/feerefunder/info";
}
Expand All @@ -31,12 +31,14 @@ message QueryParamsResponse {
Params params = 1 [(gogoproto.nullable) = false];
}

// FeeInfoRequest is the request type for the Query/FeeInfo RPC method.
message FeeInfoRequest {
string channel_id = 1;
string port_id = 2;
uint64 sequence = 3;
}

// FeeInfoResponse is the response type for the Query/FeeInfo RPC method.
message FeeInfoResponse {
FeeInfo fee_info = 1;
}
Expand Down
1 change: 1 addition & 0 deletions proto/nolus/feerefunder/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ option go_package = "github.com/Nolus-Protocol/nolus-core/x/feerefunder/types";
service Msg {
option (cosmos.msg.v1.service) = true;

// UpdateParams updates the x/feerefunder parameters.
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
// this line is used by starport scaffolding # proto/tx/rpc
}
Expand Down
2 changes: 2 additions & 0 deletions proto/nolus/interchainqueries/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import "nolus/interchainqueries/params.proto";

option go_package = "github.com/Nolus-Protocol/nolus-core/x/interchainqueries/types";

// RegisteredQuery defines a query that was registered by a user.
message RegisteredQuery {
// The unique id of the registered query.
uint64 id = 1;
Expand Down Expand Up @@ -49,6 +50,7 @@ message RegisteredQuery {
uint64 registered_at_height = 12;
}

// KVKey defines a key-value pair for KVStore.
message KVKey {
// Path (storage prefix) to the storage where you want to read value by key
// (usually name of cosmos-sdk module: 'staking', 'bank', etc.)
Expand Down
13 changes: 13 additions & 0 deletions proto/nolus/interchainqueries/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,22 @@ service Query {
option (google.api.http).get = "/nolus/interchainqueries/params";
}

// RegisteredQueries queries the registered queries of the module.
rpc RegisteredQueries(QueryRegisteredQueriesRequest) returns (QueryRegisteredQueriesResponse) {
option (google.api.http).get = "/nolus/interchainqueries/registered_queries";
}

// RegisteredQuery queries the registered query of the module.
rpc RegisteredQuery(QueryRegisteredQueryRequest) returns (QueryRegisteredQueryResponse) {
option (google.api.http).get = "/nolus/interchainqueries/registered_query";
}

// QueryResult queries the result of a registered query.
rpc QueryResult(QueryRegisteredQueryResultRequest) returns (QueryRegisteredQueryResultResponse) {
option (google.api.http).get = "/nolus/interchainqueries/query_result";
}

// LastRemoteHeight queries the last remote height of a connection.
rpc LastRemoteHeight(QueryLastRemoteHeight) returns (QueryLastRemoteHeightResponse) {
option (google.api.http).get = "/nolus/interchainqueries/remote_height";
}
Expand All @@ -43,45 +47,54 @@ message QueryParamsResponse {
Params params = 1 [(gogoproto.nullable) = false];
}

// QueryRegisteredQueriesRequest is request type for the Query/RegisteredQueries RPC method.
message QueryRegisteredQueriesRequest {
repeated string owners = 1;
string connection_id = 2;
cosmos.base.query.v1beta1.PageRequest pagination = 3;
}

// QueryRegisteredQueriesResponse is response type for the Query/RegisteredQueries RPC method.
message QueryRegisteredQueriesResponse {
repeated RegisteredQuery registered_queries = 1 [(gogoproto.nullable) = false];

// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

// QueryRegisteredQueryRequest is request type for the Query/RegisteredQuery RPC method.
message QueryRegisteredQueryRequest {
uint64 query_id = 1;
}

// QueryRegisteredQueryResponse is response type for the Query/RegisteredQuery RPC method.
message QueryRegisteredQueryResponse {
RegisteredQuery registered_query = 1;
}

// QueryRegisteredQueryResultRequest is request type for the Query/QueryResult RPC method.
message QueryRegisteredQueryResultRequest {
uint64 query_id = 1;
}

// QueryRegisteredQueryResultResponse is response type for the Query/QueryResult RPC method.
message QueryRegisteredQueryResultResponse {
QueryResult result = 1;
}

// Transaction defines a transaction message for the interchainqueries module.
message Transaction {
uint64 id = 1;
uint64 height = 2;
bytes data = 3;
}

// QueryLastRemoteHeight is request type for the Query/LastRemoteHeight RPC method.
message QueryLastRemoteHeight {
string connection_id = 1;
}

// QueryLastRemoteHeightResponse is response type for the Query/LastRemoteHeight RPC method.
message QueryLastRemoteHeightResponse {
uint64 height = 1;
}
27 changes: 25 additions & 2 deletions proto/nolus/interchainqueries/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,23 @@ option go_package = "github.com/Nolus-Protocol/nolus-core/x/interchainqueries/ty
service Msg {
option (cosmos.msg.v1.service) = true;

// RegisterInterchainQuery registers a new interchain query.
rpc RegisterInterchainQuery(MsgRegisterInterchainQuery) returns (MsgRegisterInterchainQueryResponse);

// SubmitQueryResult submits a result of an interchain query.
rpc SubmitQueryResult(MsgSubmitQueryResult) returns (MsgSubmitQueryResultResponse);

// RemoveInterchainQuery removes an interchain query.
rpc RemoveInterchainQuery(MsgRemoveInterchainQueryRequest) returns (MsgRemoveInterchainQueryResponse);

// UpdateInterchainQuery updates an interchain query.
rpc UpdateInterchainQuery(MsgUpdateInterchainQueryRequest) returns (MsgUpdateInterchainQueryResponse);

// UpdateParams updates the x/interchainqueries parameters.
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
}

// MsgRegisterInterchainQuery is the MsgRegisterInterchainQuery request type.
message MsgRegisterInterchainQuery {
option (cosmos.msg.v1.signer) = "sender";

Expand All @@ -47,10 +57,12 @@ message MsgRegisterInterchainQuery {
string sender = 6;
}

// MsgRegisterInterchainQueryResponse is the MsgRegisterInterchainQuery response type.
message MsgRegisterInterchainQueryResponse {
uint64 id = 1;
}

// MsgSubmitQueryResult is the MsgSubmitQueryResult request type.
message MsgSubmitQueryResult {
option (cosmos.msg.v1.signer) = "sender";

Expand All @@ -63,6 +75,7 @@ message MsgSubmitQueryResult {
QueryResult result = 4;
}

// QueryResult is the result of an interchain query.
message QueryResult {
repeated StorageValue kv_results = 1;
Block block = 2;
Expand All @@ -71,6 +84,7 @@ message QueryResult {
bool allow_kv_callbacks = 5;
}

// StorageValue is the key-value pair for KVStore.
message StorageValue {
// is the substore name (acc, staking, etc.)
string storage_prefix = 1;
Expand All @@ -81,11 +95,12 @@ message StorageValue {
// is the value in IAVL store
bytes value = 3;

// is the Merkle Proof which proves existence of key-value pair in IAVL
// is the Merkle proof which proves existence of key-value pair in IAVL
// storage
tendermint.crypto.ProofOps Proof = 4;
tendermint.crypto.ProofOps proof = 4;
}

// Block is the block info of the chain needed for the interchainqueries module.
message Block {
// We need to know block X+1 to verify response of transaction for block X
// since LastResultsHash is root hash of all results from the txs from the
Expand All @@ -98,6 +113,7 @@ message Block {
TxValue tx = 3;
}

// TxValue is the transaction info of the chain needed for the interchainqueries module.
message TxValue {
tendermint.abci.ExecTxResult response = 1;

Expand All @@ -113,15 +129,20 @@ message TxValue {
bytes data = 4;
}

// MsgSubmitQueryResultResponse is the MsgSubmitQueryResult response type.
message MsgSubmitQueryResultResponse {}

// MsgRemoveInterchainQueryRequest is the MsgRemoveInterchainQuery request type.
message MsgRemoveInterchainQueryRequest {
option (cosmos.msg.v1.signer) = "sender";
uint64 query_id = 1;
string sender = 2; // is the signer of the message
}

// MsgRemoveInterchainQueryResponse is the MsgRemoveInterchainQuery response type.
message MsgRemoveInterchainQueryResponse {}

// MsgUpdateInterchainQueryRequest is the MsgUpdateInterchainQuery request type.
message MsgUpdateInterchainQueryRequest {
option (cosmos.msg.v1.signer) = "sender";
uint64 query_id = 1;
Expand All @@ -130,6 +151,8 @@ message MsgUpdateInterchainQueryRequest {
string new_transactions_filter = 4;
string sender = 5; // is the signer of the message
}

// MsgUpdateInterchainQueryResponse is the MsgUpdateInterchainQuery response type.
message MsgUpdateInterchainQueryResponse {}

// MsgUpdateParams is the MsgUpdateParams request type.
Expand Down
6 changes: 4 additions & 2 deletions proto/nolus/interchaintxs/v1/query.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
syntax = "proto3";
package nolus.interchaintxs.v1;

import "cosmos/base/query/v1beta1/pagination.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "nolus/interchaintxs/v1/params.proto";
Expand All @@ -14,6 +13,8 @@ service Query {
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/nolus/interchaintxs/params";
}

// InterchainAccountAddress queries the interchain account address of the owner.
rpc InterchainAccountAddress(QueryInterchainAccountAddressRequest) returns (QueryInterchainAccountAddressResponse) {
option (google.api.http).get =
"/nolus/interchaintxs/{owner_address}/{interchain_account_id}/"
Expand All @@ -30,6 +31,7 @@ message QueryParamsResponse {
Params params = 1 [(gogoproto.nullable) = false];
}

// QueryInterchainAccountAddressRequest is the request type for the Query/InterchainAccountAddress RPC method.
message QueryInterchainAccountAddressRequest {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
Expand All @@ -45,7 +47,7 @@ message QueryInterchainAccountAddressRequest {
string connection_id = 3;
}

// Query response for an interchain account address
// Query response for an interchain account address.
message QueryInterchainAccountAddressResponse {
// The corresponding interchain account address on the host chain
string interchain_account_address = 1;
Expand Down
Loading

0 comments on commit 99a6582

Please sign in to comment.