2020-01-24 07:32:00 -08:00
|
|
|
syntax = "proto3";
|
2020-07-01 08:26:29 -07:00
|
|
|
package testdata;
|
2020-01-24 07:32:00 -08:00
|
|
|
|
2020-07-06 10:03:45 -07:00
|
|
|
import "gogoproto/gogo.proto";
|
2020-07-29 08:31:23 -07:00
|
|
|
import "google/protobuf/any.proto";
|
2020-08-11 04:49:45 -07:00
|
|
|
import "cosmos/tx/v1beta1/tx.proto";
|
2020-05-05 07:28:20 -07:00
|
|
|
|
2020-07-20 05:30:12 -07:00
|
|
|
option go_package = "github.com/cosmos/cosmos-sdk/testutil/testdata";
|
2020-01-24 07:32:00 -08:00
|
|
|
|
2020-07-29 08:31:23 -07:00
|
|
|
message Customer1 {
|
2020-09-08 15:06:54 -07:00
|
|
|
int32 id = 1;
|
|
|
|
string name = 2;
|
|
|
|
float subscription_fee = 3;
|
2020-07-29 08:31:23 -07:00
|
|
|
|
2020-09-08 15:06:54 -07:00
|
|
|
string payment = 7;
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message Customer2 {
|
2020-09-08 15:06:54 -07:00
|
|
|
int32 id = 1;
|
|
|
|
int32 industry = 2;
|
|
|
|
string name = 3;
|
|
|
|
float fewer = 4;
|
|
|
|
|
|
|
|
int64 reserved = 1047;
|
2020-07-29 08:31:23 -07:00
|
|
|
|
2020-09-08 15:06:54 -07:00
|
|
|
enum City {
|
|
|
|
Laos = 0;
|
|
|
|
LosAngeles = 1;
|
|
|
|
PaloAlto = 2;
|
|
|
|
Moscow = 3;
|
|
|
|
Nairobi = 4;
|
|
|
|
}
|
2020-07-29 08:31:23 -07:00
|
|
|
|
2020-09-08 15:06:54 -07:00
|
|
|
City city = 6;
|
|
|
|
|
|
|
|
google.protobuf.Any miscellaneous = 10;
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message Nested4A {
|
2020-09-08 15:06:54 -07:00
|
|
|
int32 id = 1;
|
|
|
|
string name = 2;
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message Nested3A {
|
2020-11-13 08:36:58 -08:00
|
|
|
int32 id = 1;
|
|
|
|
string name = 2;
|
2020-09-08 15:06:54 -07:00
|
|
|
repeated Nested4A a4 = 4;
|
|
|
|
map<int64, Nested4A> index = 5;
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message Nested2A {
|
2020-09-08 15:06:54 -07:00
|
|
|
int32 id = 1;
|
|
|
|
string name = 2;
|
|
|
|
Nested3A nested = 3;
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message Nested1A {
|
2020-09-08 15:06:54 -07:00
|
|
|
int32 id = 1;
|
|
|
|
Nested2A nested = 2;
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message Nested4B {
|
2020-09-08 15:06:54 -07:00
|
|
|
int32 id = 1;
|
|
|
|
int32 age = 2;
|
|
|
|
string name = 3;
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message Nested3B {
|
2020-11-13 08:36:58 -08:00
|
|
|
int32 id = 1;
|
|
|
|
int32 age = 2;
|
|
|
|
string name = 3;
|
|
|
|
repeated Nested4B b4 = 4;
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message Nested2B {
|
2020-09-08 15:06:54 -07:00
|
|
|
int32 id = 1;
|
|
|
|
double fee = 2;
|
|
|
|
Nested3B nested = 3;
|
|
|
|
string route = 4;
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message Nested1B {
|
2020-09-08 15:06:54 -07:00
|
|
|
int32 id = 1;
|
|
|
|
Nested2B nested = 2;
|
|
|
|
int32 age = 3;
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message Customer3 {
|
2020-09-08 15:06:54 -07:00
|
|
|
int32 id = 1;
|
|
|
|
string name = 2;
|
|
|
|
float sf = 3;
|
|
|
|
float surcharge = 4;
|
|
|
|
string destination = 5;
|
|
|
|
|
|
|
|
oneof payment {
|
|
|
|
string credit_card_no = 7;
|
|
|
|
string cheque_no = 8;
|
|
|
|
}
|
2020-07-29 08:31:23 -07:00
|
|
|
|
2020-09-08 15:06:54 -07:00
|
|
|
Customer1 original = 9;
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message TestVersion1 {
|
2020-11-13 08:36:58 -08:00
|
|
|
int64 x = 1;
|
|
|
|
TestVersion1 a = 2;
|
|
|
|
TestVersion1 b = 3; // [(gogoproto.nullable) = false] generates invalid recursive structs;
|
2020-09-08 15:06:54 -07:00
|
|
|
repeated TestVersion1 c = 4;
|
|
|
|
repeated TestVersion1 d = 5 [(gogoproto.nullable) = false];
|
|
|
|
oneof sum {
|
|
|
|
int32 e = 6;
|
|
|
|
TestVersion1 f = 7;
|
|
|
|
}
|
2020-11-13 08:36:58 -08:00
|
|
|
google.protobuf.Any g = 8;
|
2020-09-08 15:06:54 -07:00
|
|
|
repeated TestVersion1 h = 9; // [(gogoproto.castrepeated) = "TestVersion1"];
|
|
|
|
// google.protobuf.Timestamp i = 10;
|
|
|
|
// google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true];
|
|
|
|
Customer1 k = 12 [(gogoproto.embed) = true];
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
|
|
|
message TestVersion2 {
|
2020-11-13 08:36:58 -08:00
|
|
|
int64 x = 1;
|
|
|
|
TestVersion2 a = 2;
|
|
|
|
TestVersion2 b = 3; // [(gogoproto.nullable) = false];
|
2020-09-08 15:06:54 -07:00
|
|
|
repeated TestVersion2 c = 4;
|
|
|
|
repeated TestVersion2 d = 5; // [(gogoproto.nullable) = false];
|
|
|
|
oneof sum {
|
|
|
|
int32 e = 6;
|
|
|
|
TestVersion2 f = 7;
|
|
|
|
}
|
2020-11-13 08:36:58 -08:00
|
|
|
google.protobuf.Any g = 8;
|
2020-09-08 15:06:54 -07:00
|
|
|
repeated TestVersion1 h = 9; // [(gogoproto.castrepeated) = "TestVersion1"];
|
|
|
|
// google.protobuf.Timestamp i = 10;
|
|
|
|
// google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true];
|
|
|
|
Customer1 k = 12 [(gogoproto.embed) = true];
|
|
|
|
uint64 new_field = 25;
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
|
|
|
message TestVersion3 {
|
2020-11-13 08:36:58 -08:00
|
|
|
int64 x = 1;
|
|
|
|
TestVersion3 a = 2;
|
|
|
|
TestVersion3 b = 3; // [(gogoproto.nullable) = false];
|
2020-09-08 15:06:54 -07:00
|
|
|
repeated TestVersion3 c = 4;
|
|
|
|
repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false];
|
|
|
|
oneof sum {
|
|
|
|
int32 e = 6;
|
|
|
|
TestVersion3 f = 7;
|
|
|
|
}
|
2020-11-13 08:36:58 -08:00
|
|
|
google.protobuf.Any g = 8;
|
2020-09-08 15:06:54 -07:00
|
|
|
repeated TestVersion1 h = 9; //[(gogoproto.castrepeated) = "TestVersion1"];
|
|
|
|
// google.protobuf.Timestamp i = 10;
|
|
|
|
// google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true];
|
|
|
|
Customer1 k = 12 [(gogoproto.embed) = true];
|
|
|
|
string non_critical_field = 1031;
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message TestVersion3LoneOneOfValue {
|
2020-11-13 08:36:58 -08:00
|
|
|
int64 x = 1;
|
|
|
|
TestVersion3 a = 2;
|
|
|
|
TestVersion3 b = 3; // [(gogoproto.nullable) = false];
|
2020-09-08 15:06:54 -07:00
|
|
|
repeated TestVersion3 c = 4;
|
|
|
|
repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false];
|
|
|
|
oneof sum {
|
|
|
|
int32 e = 6;
|
|
|
|
}
|
2020-11-13 08:36:58 -08:00
|
|
|
google.protobuf.Any g = 8;
|
2020-09-08 15:06:54 -07:00
|
|
|
repeated TestVersion1 h = 9; //[(gogoproto.castrepeated) = "TestVersion1"];
|
|
|
|
// google.protobuf.Timestamp i = 10;
|
|
|
|
// google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true];
|
|
|
|
Customer1 k = 12 [(gogoproto.embed) = true];
|
|
|
|
string non_critical_field = 1031;
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message TestVersion3LoneNesting {
|
2020-11-13 08:36:58 -08:00
|
|
|
int64 x = 1;
|
|
|
|
TestVersion3 a = 2;
|
|
|
|
TestVersion3 b = 3; // [(gogoproto.nullable) = false];
|
2020-09-08 15:06:54 -07:00
|
|
|
repeated TestVersion3 c = 4;
|
|
|
|
repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false];
|
|
|
|
oneof sum {
|
|
|
|
TestVersion3LoneNesting f = 7;
|
|
|
|
}
|
2020-11-13 08:36:58 -08:00
|
|
|
google.protobuf.Any g = 8;
|
2020-09-08 15:06:54 -07:00
|
|
|
repeated TestVersion1 h = 9; //[(gogoproto.castrepeated) = "TestVersion1"];
|
|
|
|
// google.protobuf.Timestamp i = 10;
|
|
|
|
// google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true];
|
|
|
|
Customer1 k = 12 [(gogoproto.embed) = true];
|
|
|
|
string non_critical_field = 1031;
|
|
|
|
|
|
|
|
message Inner1 {
|
|
|
|
int64 id = 1;
|
|
|
|
string name = 2;
|
|
|
|
message InnerInner {
|
|
|
|
string id = 1;
|
|
|
|
string city = 2;
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
2020-09-08 15:06:54 -07:00
|
|
|
InnerInner inner = 3;
|
|
|
|
}
|
2020-07-29 08:31:23 -07:00
|
|
|
|
2020-09-08 15:06:54 -07:00
|
|
|
Inner1 inner1 = 14;
|
2020-07-29 08:31:23 -07:00
|
|
|
|
2020-09-08 15:06:54 -07:00
|
|
|
message Inner2 {
|
|
|
|
string id = 1;
|
|
|
|
string country = 2;
|
|
|
|
message InnerInner {
|
|
|
|
string id = 1;
|
|
|
|
string city = 2;
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
2020-09-08 15:06:54 -07:00
|
|
|
InnerInner inner = 3;
|
|
|
|
}
|
2020-07-29 08:31:23 -07:00
|
|
|
|
2020-09-08 15:06:54 -07:00
|
|
|
Inner2 inner2 = 15;
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message TestVersion4LoneNesting {
|
2020-11-13 08:36:58 -08:00
|
|
|
int64 x = 1;
|
|
|
|
TestVersion3 a = 2;
|
|
|
|
TestVersion3 b = 3; // [(gogoproto.nullable) = false];
|
2020-09-08 15:06:54 -07:00
|
|
|
repeated TestVersion3 c = 4;
|
|
|
|
repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false];
|
|
|
|
oneof sum {
|
|
|
|
TestVersion3LoneNesting f = 7;
|
|
|
|
}
|
2020-11-13 08:36:58 -08:00
|
|
|
google.protobuf.Any g = 8;
|
2020-09-08 15:06:54 -07:00
|
|
|
repeated TestVersion1 h = 9; //[(gogoproto.castrepeated) = "TestVersion1"];
|
|
|
|
// google.protobuf.Timestamp i = 10;
|
|
|
|
// google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true];
|
|
|
|
Customer1 k = 12 [(gogoproto.embed) = true];
|
|
|
|
string non_critical_field = 1031;
|
|
|
|
|
|
|
|
message Inner1 {
|
|
|
|
int64 id = 1;
|
|
|
|
string name = 2;
|
|
|
|
message InnerInner {
|
|
|
|
int64 id = 1;
|
|
|
|
string city = 2;
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
2020-09-08 15:06:54 -07:00
|
|
|
InnerInner inner = 3;
|
|
|
|
}
|
2020-07-29 08:31:23 -07:00
|
|
|
|
2020-09-08 15:06:54 -07:00
|
|
|
Inner1 inner1 = 14;
|
2020-07-29 08:31:23 -07:00
|
|
|
|
2020-09-08 15:06:54 -07:00
|
|
|
message Inner2 {
|
|
|
|
string id = 1;
|
|
|
|
string country = 2;
|
|
|
|
message InnerInner {
|
|
|
|
string id = 1;
|
|
|
|
int64 value = 2;
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
2020-09-08 15:06:54 -07:00
|
|
|
InnerInner inner = 3;
|
|
|
|
}
|
2020-07-29 08:31:23 -07:00
|
|
|
|
2020-09-08 15:06:54 -07:00
|
|
|
Inner2 inner2 = 15;
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message TestVersionFD1 {
|
2020-09-08 15:06:54 -07:00
|
|
|
int64 x = 1;
|
|
|
|
TestVersion1 a = 2;
|
|
|
|
oneof sum {
|
|
|
|
int32 e = 6;
|
|
|
|
TestVersion1 f = 7;
|
|
|
|
}
|
2020-11-13 08:36:58 -08:00
|
|
|
google.protobuf.Any g = 8;
|
2020-09-08 15:06:54 -07:00
|
|
|
repeated TestVersion1 h = 9; // [(gogoproto.castrepeated) = "TestVersion1"];
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message TestVersionFD1WithExtraAny {
|
2020-09-08 15:06:54 -07:00
|
|
|
int64 x = 1;
|
|
|
|
TestVersion1 a = 2;
|
|
|
|
oneof sum {
|
|
|
|
int32 e = 6;
|
|
|
|
TestVersion1 f = 7;
|
|
|
|
}
|
2020-11-13 08:36:58 -08:00
|
|
|
AnyWithExtra g = 8;
|
2020-09-08 15:06:54 -07:00
|
|
|
repeated TestVersion1 h = 9; // [(gogoproto.castrepeated) = "TestVersion1"];
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message AnyWithExtra {
|
2020-09-08 15:06:54 -07:00
|
|
|
google.protobuf.Any a = 1 [(gogoproto.embed) = true];
|
|
|
|
int64 b = 3;
|
|
|
|
int64 c = 4;
|
2020-07-29 08:31:23 -07:00
|
|
|
}
|
2020-08-03 12:47:25 -07:00
|
|
|
|
|
|
|
message TestUpdatedTxRaw {
|
2020-11-13 08:36:58 -08:00
|
|
|
bytes body_bytes = 1;
|
|
|
|
bytes auth_info_bytes = 2;
|
|
|
|
repeated bytes signatures = 3;
|
|
|
|
bytes new_field_5 = 5;
|
|
|
|
bytes new_field_1024 = 1024;
|
2020-08-03 12:47:25 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message TestUpdatedTxBody {
|
2020-09-08 15:06:54 -07:00
|
|
|
repeated google.protobuf.Any messages = 1;
|
|
|
|
string memo = 2;
|
|
|
|
int64 timeout_height = 3;
|
|
|
|
uint64 some_new_field = 4;
|
|
|
|
string some_new_field_non_critical_field = 1050;
|
|
|
|
repeated google.protobuf.Any extension_options = 1023;
|
|
|
|
repeated google.protobuf.Any non_critical_extension_options = 2047;
|
2020-08-03 12:47:25 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message TestUpdatedAuthInfo {
|
2020-09-08 15:06:54 -07:00
|
|
|
repeated cosmos.tx.v1beta1.SignerInfo signer_infos = 1;
|
|
|
|
cosmos.tx.v1beta1.Fee fee = 2;
|
|
|
|
bytes new_field_3 = 3;
|
|
|
|
bytes new_field_1024 = 1024;
|
2020-08-03 12:47:25 -07:00
|
|
|
}
|
2020-09-02 13:29:53 -07:00
|
|
|
|
|
|
|
message TestRepeatedUints {
|
2020-09-08 15:06:54 -07:00
|
|
|
repeated uint64 nums = 1;
|
2020-09-02 13:29:53 -07:00
|
|
|
}
|