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 proto annotation for Msg services #13178

Merged
merged 15 commits into from
Sep 14, 2022
Merged
2 changes: 2 additions & 0 deletions proto/cosmos/auth/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types";

// Msg defines the x/auth Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;

// UpdateParams defines a governance operation for updating the x/auth module
// parameters. The authority is hard-coded to the x/gov module account.
//
Expand Down
2 changes: 2 additions & 0 deletions proto/cosmos/authz/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ option (gogoproto.goproto_getters_all) = false;

// Msg defines the authz Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;

// Grant grants the provided authorization to the grantee on the granter's
// account with the provided expiration time. If there is already a grant
// for the given (granter, grantee, Authorization) triple, then the grant
Expand Down
2 changes: 2 additions & 0 deletions proto/cosmos/bank/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types";

// Msg defines the bank Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;

// Send defines a method for sending coins from one account to another account.
rpc Send(MsgSend) returns (MsgSendResponse);

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

// Msg defines the bank Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;

// VerifyInvariant defines a method to verify a particular invariance.
rpc VerifyInvariant(MsgVerifyInvariant) returns (MsgVerifyInvariantResponse);

Expand Down
2 changes: 2 additions & 0 deletions proto/cosmos/distribution/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import "cosmos/distribution/v1beta1/distribution.proto";

// Msg defines the distribution Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;

// SetWithdrawAddress defines a method to change the withdraw address
// for a delegator (or validator self-delegation).
rpc SetWithdrawAddress(MsgSetWithdrawAddress)
Expand Down
2 changes: 2 additions & 0 deletions proto/cosmos/evidence/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import "cosmos/msg/v1/msg.proto";

// Msg defines the evidence Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;

// SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or
// counterfactual signing.
rpc SubmitEvidence(MsgSubmitEvidence) returns (MsgSubmitEvidenceResponse);
Expand Down
1 change: 1 addition & 0 deletions proto/cosmos/feegrant/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant";

// Msg defines the feegrant msg service.
service Msg {
option (cosmos.msg.v1.service) = true;

// GrantAllowance grants fee allowance to the grantee on the granter's
// account with the provided expiration time.
Expand Down
2 changes: 2 additions & 0 deletions proto/cosmos/gov/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1";

// Msg defines the gov Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;

// SubmitProposal defines a method to create new proposal given a content.
rpc SubmitProposal(MsgSubmitProposal) returns (MsgSubmitProposalResponse);

Expand Down
2 changes: 2 additions & 0 deletions proto/cosmos/gov/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1";

// Msg defines the bank Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;

// SubmitProposal defines a method to create new proposal given a content.
rpc SubmitProposal(MsgSubmitProposal) returns (MsgSubmitProposalResponse);

Expand Down
1 change: 1 addition & 0 deletions proto/cosmos/group/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import "cosmos/msg/v1/msg.proto";

// Msg is the cosmos.group.v1 Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;

// CreateGroup creates a new group with an admin account address, a list of members and some optional metadata.
rpc CreateGroup(MsgCreateGroup) returns (MsgCreateGroupResponse);
Expand Down
2 changes: 2 additions & 0 deletions proto/cosmos/mint/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import "cosmos_proto/cosmos.proto";

// Msg defines the x/mint Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;

// UpdateParams defines a governance operation for updating the x/mint module
// parameters. The authority is hard-coded to the x/gov module account.
//
Expand Down
8 changes: 7 additions & 1 deletion proto/cosmos/msg/v1/msg.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ import "google/protobuf/descriptor.proto";
// We need this right now because gogoproto codegen needs to import the extension.
option go_package = "github.com/cosmos/cosmos-sdk/types/msgservice";

extend google.protobuf.ServiceOptions {
// service indicates that the service is a Msg service and that requests
// must be transported via blockchain transactions rather than gRPC.
bool service = 11110000;
}

extend google.protobuf.MessageOptions {
// signer must be used in cosmos messages in order
// to signal to external clients which fields in a
Expand All @@ -19,4 +25,4 @@ extend google.protobuf.MessageOptions {
// kind in case the signer information is contained within
// a message inside the cosmos message.
repeated string signer = 11110000;
}
}
3 changes: 3 additions & 0 deletions proto/cosmos/nft/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ import "cosmos/msg/v1/msg.proto";

// Msg defines the nft Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;

// 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.v1.signer) = "sender";
Expand Down
2 changes: 2 additions & 0 deletions proto/cosmos/slashing/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import "cosmos/msg/v1/msg.proto";

// Msg defines the slashing Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;

// Unjail defines a method for unjailing a jailed validator, thus returning
// them into the bonded validator set, so they can begin receiving provisions
// and rewards again.
Expand Down
2 changes: 2 additions & 0 deletions proto/cosmos/staking/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types";

// Msg defines the staking Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;

// CreateValidator defines a method for creating a new validator.
rpc CreateValidator(MsgCreateValidator) returns (MsgCreateValidatorResponse);

Expand Down
2 changes: 2 additions & 0 deletions proto/cosmos/upgrade/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types";

// Msg defines the upgrade Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;

// SoftwareUpgrade is a governance operation for initiating a software upgrade.
//
// Since: cosmos-sdk 0.46
Expand Down
2 changes: 2 additions & 0 deletions proto/cosmos/vesting/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/auth/vesting/types";

// Msg defines the bank Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;

// CreateVestingAccount defines a method that enables creating a vesting
// account.
rpc CreateVestingAccount(MsgCreateVestingAccount) returns (MsgCreateVestingAccountResponse);
Expand Down
31 changes: 21 additions & 10 deletions types/msgservice/msg.pb.go

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

16 changes: 8 additions & 8 deletions x/auth/types/tx.pb.go

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

80 changes: 40 additions & 40 deletions x/auth/vesting/types/tx.pb.go

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

Loading