Skip to content

Commit

Permalink
docs: improve proto vesting docs about time attributes (#15474)
Browse files Browse the repository at this point in the history
## Description

Added a little bit more comments to note about the meaning / type of the numeric time values.

When I'm creating the vesting accounts, I always have to  double check it, and end up looking at the code.
  • Loading branch information
robert-zaremba committed Mar 20, 2023
1 parent a8dcedd commit 5612bb8
Show file tree
Hide file tree
Showing 12 changed files with 96 additions and 81 deletions.
4 changes: 2 additions & 2 deletions api/cosmos/vesting/v1beta1/tx.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions api/cosmos/vesting/v1beta1/vesting.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions client/v2/internal/testpb/msg.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ message MsgRequest {
repeated bool bools = 21;
repeated uint32 uints = 22;
repeated string strings = 23;
repeated testpb.Enum enums = 24;
repeated google.protobuf.Duration durations = 25;
repeated testpb.AMessage some_messages = 26;
repeated testpb.Enum enums = 24;
repeated google.protobuf.Duration durations = 25;
repeated testpb.AMessage some_messages = 26;

int32 positional1 = 27;
string positional2 = 28;
Expand All @@ -46,8 +46,6 @@ message MsgRequest {
bool hidden_bool = 32;
}


message MsgResponse {
MsgRequest request = 1;
}

34 changes: 20 additions & 14 deletions orm/internal/testpb/bank.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,37 @@ message Module {
go_import: "github.com/cosmos/orm/model/ormdb"
};
option (cosmos.orm.v1alpha1.module_schema) = {
schema_file: {
id: 1
proto_file_name: "testpb/bank.proto"
}
schema_file: {id: 1 proto_file_name: "testpb/bank.proto"}
};
}

message Balance {
option (cosmos.orm.v1.table) = {
id: 1;
primary_key: {fields: "address,denom"}
index: {id: 1 fields: "denom"}
};
primary_key: {
fields:
"address,denom"
}
index: {
id:
1 fields: "denom"
}
};

string address = 1;
string denom = 2;
uint64 amount = 3;
string address = 1;
string denom = 2;
uint64 amount = 3;
}

message Supply {
option (cosmos.orm.v1.table) = {
id: 2;
primary_key: {fields: "denom"}
};
primary_key: {
fields:
"denom"
}
};

string denom = 1;
uint64 amount = 2;
string denom = 1;
uint64 amount = 2;
}
15 changes: 7 additions & 8 deletions orm/internal/testpb/bank_query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ message ListBalanceRequest {
// denom specifies the value of the Denom index key to use in the query.
Denom denom = 2;
}

message AddressDenom {
// address is the value of the address field in the index.
// It can be omitted to query for all valid values of that field in this segment of the index.
Expand All @@ -51,14 +51,14 @@ message ListBalanceRequest {
// It can be omitted to query for all valid values of that field in this segment of the index.
optional string denom = 2;
}

message Denom {
// denom is the value of the denom field in the index.
// It can be omitted to query for all valid values of that field in this segment of the index.
optional string denom = 1;
}
}

// query specifies the type of query - either a prefix or range query.
oneof query {
// prefix_query specifies the index key value to use for the prefix query.
Expand All @@ -68,7 +68,7 @@ message ListBalanceRequest {
}
// pagination specifies optional pagination parameters.
cosmos.base.query.v1beta1.PageRequest pagination = 3;

// RangeQuery specifies the from/to index keys for a range query.
message RangeQuery {
// from is the index key to use for the start of the range query.
Expand Down Expand Up @@ -110,14 +110,14 @@ message ListSupplyRequest {
// denom specifies the value of the Denom index key to use in the query.
Denom denom = 1;
}

message Denom {
// denom is the value of the denom field in the index.
// It can be omitted to query for all valid values of that field in this segment of the index.
optional string denom = 1;
}
}

// query specifies the type of query - either a prefix or range query.
oneof query {
// prefix_query specifies the index key value to use for the prefix query.
Expand All @@ -127,7 +127,7 @@ message ListSupplyRequest {
}
// pagination specifies optional pagination parameters.
cosmos.base.query.v1beta1.PageRequest pagination = 3;

// RangeQuery specifies the from/to index keys for a range query.
message RangeQuery {
// from is the index key to use for the start of the range query.
Expand All @@ -147,4 +147,3 @@ message ListSupplyResponse {
// pagination is the pagination response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

Loading

0 comments on commit 5612bb8

Please sign in to comment.