syntax = "proto3"; package cosmos_sdk.std.v1; import "third_party/proto/cosmos-proto/cosmos.proto"; import "third_party/proto/gogoproto/gogo.proto"; import "types/types.proto"; import "x/auth/types/types.proto"; import "x/auth/vesting/types/types.proto"; import "x/bank/types/types.proto"; import "x/crisis/types/types.proto"; import "x/distribution/types/types.proto"; import "x/gov/types/types.proto"; import "x/slashing/types/types.proto"; import "x/staking/types/types.proto"; import "x/params/types/proposal/types.proto"; import "x/upgrade/types/types.proto"; option go_package = "github.com/cosmos/cosmos-sdk/std"; // Account defines the application-level Account type. message Account { option (cosmos_proto.interface_type) = "*github.com/cosmos/cosmos-sdk/x/auth/exported.Account"; // sum defines a list of all acceptable concrete Account implementations. oneof sum { cosmos_sdk.x.auth.v1.BaseAccount base_account = 1; cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount continuous_vesting_account = 2; cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount delayed_vesting_account = 3; cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount periodic_vesting_account = 4; cosmos_sdk.x.auth.v1.ModuleAccount module_account = 5; } } // Supply defines the application-level Supply type. message Supply { option (gogoproto.equal) = true; option (cosmos_proto.interface_type) = "*github.com/cosmos/cosmos-sdk/x/bank/exported.SupplyI"; // sum defines a set of all acceptable concrete Supply implementations. oneof sum { cosmos_sdk.x.bank.v1.Supply supply = 1; } } // MsgSubmitProposal defines the application-level message type for handling // governance proposals. message MsgSubmitProposal { option (gogoproto.equal) = true; option (gogoproto.goproto_getters) = false; cosmos_sdk.x.gov.v1.MsgSubmitProposalBase base = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; Content content = 2; } // Proposal defines the application-level concrete proposal type used in // governance proposals. message Proposal { option (gogoproto.equal) = true; cosmos_sdk.x.gov.v1.ProposalBase base = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; Content content = 2 [(gogoproto.nullable) = false]; } // Content defines the application-level allowed Content to be included in a // governance proposal. message Content { option (gogoproto.equal) = true; option (cosmos_proto.interface_type) = "*github.com/cosmos/cosmos-sdk/x/gov/types.Content"; // sum defines a set of all acceptable concrete governance proposal Content // types. oneof sum { cosmos_sdk.x.gov.v1.TextProposal text = 1; cosmos_sdk.x.params.v1.ParameterChangeProposal parameter_change = 2; cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal software_upgrade = 3; cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal cancel_software_upgrade = 4; cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal community_pool_spend = 5; } } // Transaction defines the application-level transaction that can be signed and // processed by the state-machine. It contains a base of common fields and // repeated set of Message types. message Transaction { option (gogoproto.goproto_getters) = false; StdTxBase base = 1 [(gogoproto.jsontag) = "", (gogoproto.embed) = true, (gogoproto.nullable) = false]; repeated Message msgs = 2 [(gogoproto.nullable) = false]; } // Message defines the set of valid concrete message types that can be used to // construct a transaction. message Message { option (cosmos_proto.interface_type) = "github.com/cosmos/cosmos-sdk/types.Msg"; // sum defines the set of all allowed valid messages defined in modules. oneof sum { cosmos_sdk.x.bank.v1.MsgSend msg_send = 1; cosmos_sdk.x.bank.v1.MsgMultiSend msg_multi_send = 2; cosmos_sdk.x.crisis.v1.MsgVerifyInvariant msg_verify_invariant = 3; cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress msg_set_withdraw_address = 4; cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward msg_withdraw_delegator_reward = 5; cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission msg_withdraw_validator_commission = 6; cosmos_sdk.x.distribution.v1.MsgFundCommunityPool msg_fund_community_pool = 7; MsgSubmitProposal msg_submit_proposal = 9; cosmos_sdk.x.gov.v1.MsgVote msg_vote = 10; cosmos_sdk.x.gov.v1.MsgDeposit msg_deposit = 11; cosmos_sdk.x.slashing.v1.MsgUnjail msg_unjail = 12; cosmos_sdk.x.staking.v1.MsgCreateValidator msg_create_validator = 13; cosmos_sdk.x.staking.v1.MsgEditValidator msg_edit_validator = 14; cosmos_sdk.x.staking.v1.MsgDelegate msg_delegate = 15; cosmos_sdk.x.staking.v1.MsgBeginRedelegate msg_begin_redelegate = 16; cosmos_sdk.x.staking.v1.MsgUndelegate msg_undelegate = 17; } } // SignDoc defines a standard application-level signing document to compose // signatures for a Transaction. message SignDoc { StdSignDocBase base = 1 [(gogoproto.jsontag) = "", (gogoproto.embed) = true, (gogoproto.nullable) = false]; repeated Message msgs = 2 [(gogoproto.nullable) = false]; } // StdFee includes the amount of coins paid in fees and the maximum // gas to be used by the transaction. The ratio yields an effective "gasprice", // which must be above some miminum to be accepted into the mempool. message StdFee { option (gogoproto.goproto_getters) = false; option (gogoproto.equal) = true; repeated cosmos_sdk.v1.Coin amount = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; uint64 gas = 2; } // StdSignature defines a signature structure that contains the signature of a // transaction and an optional public key. message StdSignature { option (gogoproto.goproto_getters) = false; bytes pub_key = 1 [(gogoproto.jsontag) = "public_key,omitempty", (gogoproto.moretags) = "yaml:\"public_key\""]; bytes signature = 2; } // StdTxBase defines a transaction base which application-level concrete transaction // types can extend. message StdTxBase { StdFee fee = 1 [(gogoproto.nullable) = false]; repeated StdSignature signatures = 2 [(gogoproto.nullable) = false]; string memo = 3; } // StdSignDocBase defines the base structure for which applications can extend // to define the concrete structure that signers sign over. message StdSignDocBase { string chain_id = 1 [(gogoproto.customname) = "ChainID", (gogoproto.moretags) = "yaml:\"chain_id\""]; uint64 account_number = 2 [(gogoproto.moretags) = "yaml:\"account_number\""]; uint64 sequence = 3; string memo = 4; StdFee fee = 5 [(gogoproto.nullable) = false]; }