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-05-05 07:28:20 -07:00
|
|
|
import "google/protobuf/any.proto";
|
2020-07-06 10:03:45 -07:00
|
|
|
import "gogoproto/gogo.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
|
|
|
|
|
|
|
message Dog {
|
|
|
|
string size = 1;
|
|
|
|
string name = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Cat {
|
2020-04-28 07:13:36 -07:00
|
|
|
string moniker = 1;
|
|
|
|
int32 lives = 2;
|
2020-01-24 07:32:00 -08:00
|
|
|
}
|
2020-05-05 07:28:20 -07:00
|
|
|
|
|
|
|
message HasAnimal {
|
|
|
|
google.protobuf.Any animal = 1;
|
|
|
|
int64 x = 2;
|
|
|
|
}
|
2020-05-06 13:47:03 -07:00
|
|
|
|
|
|
|
message HasHasAnimal {
|
|
|
|
google.protobuf.Any has_animal = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message HasHasHasAnimal {
|
|
|
|
google.protobuf.Any has_has_animal = 1;
|
|
|
|
}
|
2020-06-03 06:33:51 -07:00
|
|
|
|
|
|
|
service TestService {
|
|
|
|
rpc Echo(EchoRequest) returns (EchoResponse);
|
|
|
|
rpc SayHello(SayHelloRequest) returns (SayHelloResponse);
|
2020-07-03 09:42:12 -07:00
|
|
|
rpc TestAny(TestAnyRequest) returns (TestAnyResponse);
|
2020-06-03 06:33:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message EchoRequest {
|
|
|
|
string message = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message EchoResponse {
|
|
|
|
string message = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SayHelloRequest {
|
|
|
|
string name = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SayHelloResponse {
|
|
|
|
string greeting = 1;
|
|
|
|
}
|
2020-07-03 09:42:12 -07:00
|
|
|
|
|
|
|
message TestAnyRequest {
|
|
|
|
google.protobuf.Any any_animal = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TestAnyResponse {
|
|
|
|
HasAnimal has_animal = 1;
|
|
|
|
}
|
2020-07-06 10:03:45 -07:00
|
|
|
|
|
|
|
// msg type for testing
|
|
|
|
message TestMsg {
|
|
|
|
repeated bytes signers = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
|
|
|
}
|
|
|
|
|
|
|
|
// bad MultiSignature with extra fields
|
|
|
|
message BadMultiSignature {
|
|
|
|
option (gogoproto.goproto_unrecognized) = true;
|
|
|
|
repeated bytes signatures = 1;
|
|
|
|
bytes malicious_field = 5;
|
|
|
|
}
|