Skip to content

Commit

Permalink
feat(x/tx): extract signers using cosmos.msg.v1.signer (#15205)
Browse files Browse the repository at this point in the history
Co-authored-by: Amaury <[email protected]>
  • Loading branch information
aaronc and amaury1093 authored Mar 6, 2023
1 parent 5f47935 commit 1f40d9d
Show file tree
Hide file tree
Showing 15 changed files with 6,484 additions and 14 deletions.
2 changes: 2 additions & 0 deletions x/tx/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
codegen:
@(cd internal/testpb; buf generate)
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "google/protobuf/descriptor.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";

option go_package = "cosmossdk.io/x/tx/textual/internal/testpb";
option go_package = "cosmossdk.io/x/tx/internal/testpb";

// A is used for testing value renderers.
message A {
Expand Down

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

File renamed without changes.
File renamed without changes.
File renamed without changes.
63 changes: 63 additions & 0 deletions x/tx/internal/testpb/signers.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
syntax = "proto3";

import "cosmos/msg/v1/msg.proto";

option go_package = "cosmossdk.io/x/tx/internal/testpb";

message SimpleSigner {
option (cosmos.msg.v1.signer) = "signer";
string signer = 1;
}

message RepeatedSigner {
option (cosmos.msg.v1.signer) = "signer";
repeated string signer = 1;
}

message NestedSigner {
option (cosmos.msg.v1.signer) = "inner";
Inner inner = 1;

message Inner {
option (cosmos.msg.v1.signer) = "signer";
string signer = 1;
}
}

message RepeatedNestedSigner {
option (cosmos.msg.v1.signer) = "inner";
repeated Inner inner = 1;

message Inner {
option (cosmos.msg.v1.signer) = "signer";
string signer = 1;
}
}

message NestedRepeatedSigner {
option (cosmos.msg.v1.signer) = "inner";
Inner inner = 1;

message Inner {
option (cosmos.msg.v1.signer) = "signer";
repeated string signer = 1;
}
}

message RepeatedNestedRepeatedSigner {
option (cosmos.msg.v1.signer) = "inner";
repeated Inner inner = 1;

message Inner {
option (cosmos.msg.v1.signer) = "signer";
repeated string signer = 1;
}
}

message BadSigner {
option (cosmos.msg.v1.signer) = "signer";
bytes signer = 1;
}
message NoSignerOption {
bytes signer = 1;
}
Loading

0 comments on commit 1f40d9d

Please sign in to comment.