Skip to content

Commit

Permalink
oneof tests passing, trying a refactor though
Browse files Browse the repository at this point in the history
  • Loading branch information
kocubinski committed Feb 13, 2023
1 parent 8b04d2f commit 5946320
Show file tree
Hide file tree
Showing 8 changed files with 918 additions and 798 deletions.
61 changes: 49 additions & 12 deletions api/amino/amino.pulsar.go

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

105 changes: 56 additions & 49 deletions api/cosmos/staking/v1beta1/authz.pulsar.go

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

6 changes: 6 additions & 0 deletions proto/amino/amino.proto
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,10 @@ extend google.protobuf.FieldOptions {
bool dont_omitempty = 11110005;

bool embed = 11110006;

string oneof_type_name = 11110007;
}

extend google.protobuf.OneofOptions {
string oneof_field_name = 11110008;
}
5 changes: 3 additions & 2 deletions proto/cosmos/staking/v1beta1/authz.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ message StakeAuthorization {
cosmos.base.v1beta1.Coin max_tokens = 1 [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"];
// validators is the oneof that represents either allow_list or deny_list
oneof validators {
option (amino.oneof_field_name) = "Validators";
// allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's
// account.
Validators allow_list = 2;
Validators allow_list = 2 [(amino.oneof_type_name) = "cosmos-sdk/StakeAuthorization/AllowList"];
// deny_list specifies list of validator addresses to whom grantee can not delegate tokens.
Validators deny_list = 3;
Validators deny_list = 3 [(amino.oneof_type_name) = "cosmos-sdk/StakeAuthorization/DenyList"];
}
// Validators defines list of validator addresses.
message Validators {
Expand Down
Loading

0 comments on commit 5946320

Please sign in to comment.