* WIP: using encoding config * Make it compile, test fails * test should be okay * Make tests pass * Add comments * Convert more tests * Make TestAnteHandlerSigErrors work * Make first 2 tests pass * TestAnteHandlerAccountNumbers * Use table tests * Remove print * Use test table * TestAnteHandlerSigErrors * TestAnteHandlerAccountNumbers * TestAnteHandlerAccountNumbers * Refactor TestAccount * Refactor getSignBytes * TestAnteHandlerAccountNumbersAtBlockHeightZero * TestAnteHandlerSequences * TestAnteHandlerFees * TestAnteHandlerMultiSigner * TestAnteHandlerBadSignBytes * TestAnteHandlerSetPubKey * TestAnteHandlerSigLimitExceeded * TestCustomSignatureVerificationGasConsumer * TestAnteHandlerReCheck * Make all tests pass * Refactor a little bit more * Fee test * SetupTest * All tests pass * Refactor to RunTestCase * Don't use StdFee * Revert some little stuff * Finish up last couple of test cases * Less verbose * s/TxGenerator/TxConfig * Add comments * Indent * Move KeyTestPubAddr to testdata * Move testdata to /testutil * Revert to use signature: nil step in signing * Add comments Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
73 lines
1.3 KiB
Protocol Buffer
73 lines
1.3 KiB
Protocol Buffer
syntax = "proto3";
|
|
package testdata;
|
|
|
|
import "google/protobuf/any.proto";
|
|
import "gogoproto/gogo.proto";
|
|
|
|
option go_package = "github.com/cosmos/cosmos-sdk/testutil/testdata";
|
|
|
|
message Dog {
|
|
string size = 1;
|
|
string name = 2;
|
|
}
|
|
|
|
message Cat {
|
|
string moniker = 1;
|
|
int32 lives = 2;
|
|
}
|
|
|
|
message HasAnimal {
|
|
google.protobuf.Any animal = 1;
|
|
int64 x = 2;
|
|
}
|
|
|
|
message HasHasAnimal {
|
|
google.protobuf.Any has_animal = 1;
|
|
}
|
|
|
|
message HasHasHasAnimal {
|
|
google.protobuf.Any has_has_animal = 1;
|
|
}
|
|
|
|
service TestService {
|
|
rpc Echo(EchoRequest) returns (EchoResponse);
|
|
rpc SayHello(SayHelloRequest) returns (SayHelloResponse);
|
|
rpc TestAny(TestAnyRequest) returns (TestAnyResponse);
|
|
}
|
|
|
|
message EchoRequest {
|
|
string message = 1;
|
|
}
|
|
|
|
message EchoResponse {
|
|
string message = 1;
|
|
}
|
|
|
|
message SayHelloRequest {
|
|
string name = 1;
|
|
}
|
|
|
|
message SayHelloResponse {
|
|
string greeting = 1;
|
|
}
|
|
|
|
message TestAnyRequest {
|
|
google.protobuf.Any any_animal = 1;
|
|
}
|
|
|
|
message TestAnyResponse {
|
|
HasAnimal has_animal = 1;
|
|
}
|
|
|
|
// 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;
|
|
}
|