Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add message option extension to signal msg signers in a language agnostic way #10977

Merged
merged 23 commits into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
fd1f255
add: signers proto and modify authz
fdymylja Jan 19, 2022
10c556f
add: signers in bank
fdymylja Jan 19, 2022
6dfa14c
add: signers in crisis, distribution, evidence, feegrant, group
fdymylja Jan 19, 2022
d2969d6
add: signers in nft, slashing, staking.
fdymylja Jan 19, 2022
35460b2
add: vesting and gov, finalise codegen
fdymylja Jan 19, 2022
876716d
Merge branch 'master' into fdymylja/agnostic-signers
fdymylja Jan 19, 2022
3cd815a
add: fix go.sum in api module
fdymylja Jan 19, 2022
7eefcee
Merge remote-tracking branch 'origin/fdymylja/agnostic-signers' into …
fdymylja Jan 19, 2022
f77d8a0
add: msg.pulsar.go file
fdymylja Jan 19, 2022
1b3bd0c
change: address pr comments
fdymylja Jan 19, 2022
e167f1a
remove: old proto generated gofile
fdymylja Jan 19, 2022
fb3bf33
add: assert signers
fdymylja Jan 19, 2022
dd279fd
chore: extra docs on hacks...
fdymylja Jan 19, 2022
22f11be
add: tests and clarify failures
fdymylja Jan 21, 2022
2d2c4b1
Merge branch 'master' into fdymylja/agnostic-signers
fdymylja Jan 21, 2022
082ab20
chore: regen protos
fdymylja Jan 21, 2022
4ef8cb8
add: gov v1beta2
fdymylja Jan 21, 2022
ace8e16
chore: update CHANGELOG.md
fdymylja Jan 21, 2022
7e0c199
Merge branch 'master' into fdymylja/agnostic-signers
fdymylja Jan 27, 2022
d7e5d13
chore: regen files and remove verification
fdymylja Jan 27, 2022
17ae06e
Update types/module/configurator.go
fdymylja Jan 28, 2022
1eb0ac7
merge
fdymylja Jan 28, 2022
025e02a
rever configurator.go changes
fdymylja Jan 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add: signers in nft, slashing, staking.
  • Loading branch information
fdymylja committed Jan 19, 2022
commit d2969d6a5abe79c453c17fe2daf34328e30cdbef
4 changes: 4 additions & 0 deletions proto/cosmos/nft/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ package cosmos.nft.v1beta1;

option go_package = "github.com/cosmos/cosmos-sdk/x/nft";

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

// Msg defines the nft Msg service.
service Msg {
// Send defines a method to send a nft from one account to another account.
rpc Send(MsgSend) returns (MsgSendResponse);
}
// MsgSend represents a message to send a nft from one account to another account.
message MsgSend {
option (cosmos.msg.v1beta1.signers) = "sender";

// class_id defines the unique identifier of the nft classification, similar to the contract address of ERC721
string class_id = 1;

Expand Down
3 changes: 3 additions & 0 deletions proto/cosmos/slashing/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ option (gogoproto.equal_all) = true;

import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "cosmos/msg/v1beta1/msg.proto";

// Msg defines the slashing Msg service.
service Msg {
Expand All @@ -17,6 +18,8 @@ service Msg {

// MsgUnjail defines the Msg/Unjail request type
message MsgUnjail {
option (cosmos.msg.v1beta1.signers) = "validator_addr";

option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = true;

Expand Down
16 changes: 16 additions & 0 deletions proto/cosmos/staking/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import "cosmos_proto/cosmos.proto";
import "cosmos/base/v1beta1/coin.proto";
import "cosmos/staking/v1beta1/staking.proto";

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

option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types";

// Msg defines the staking Msg service.
Expand All @@ -34,6 +36,12 @@ service Msg {

// MsgCreateValidator defines a SDK message for creating a new validator.
message MsgCreateValidator {
// NOTE(fdymylja): this is a particular case in which
// if validator_address == delegator_address then only one
// is expected to sign, otherwise both are.
option (cosmos.msg.v1beta1.signers) = "delegator_address";
option (cosmos.msg.v1beta1.signers) = "validator_address";

option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

Expand All @@ -55,6 +63,8 @@ message MsgCreateValidatorResponse {}

// MsgEditValidator defines a SDK message for editing an existing validator.
message MsgEditValidator {
option (cosmos.msg.v1beta1.signers) = "validator_address";

option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

Expand All @@ -77,6 +87,8 @@ message MsgEditValidatorResponse {}
// MsgDelegate defines a SDK message for performing a delegation of coins
// from a delegator to a validator.
message MsgDelegate {
option (cosmos.msg.v1beta1.signers) = "delegator_address";

option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

Expand All @@ -91,6 +103,8 @@ message MsgDelegateResponse {}
// MsgBeginRedelegate defines a SDK message for performing a redelegation
// of coins from a delegator and source validator to a destination validator.
message MsgBeginRedelegate {
option (cosmos.msg.v1beta1.signers) = "delegator_address";

option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

Expand All @@ -108,6 +122,8 @@ message MsgBeginRedelegateResponse {
// MsgUndelegate defines a SDK message for performing an undelegation from a
// delegate and a validator.
message MsgUndelegate {
option (cosmos.msg.v1beta1.signers) = "delegator_address";

option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

Expand Down