From ebbfaf2a47d3e97a4720f643ca21d5a41676cdc0 Mon Sep 17 00:00:00 2001 From: Marko Date: Thu, 20 Feb 2020 15:24:26 +0100 Subject: [PATCH] Merge PR #5681: proto: migrate bank to hybridcodec --- .codecov.yml | 1 + simapp/app.go | 2 +- x/bank/alias.go | 4 +- x/bank/app_test.go | 2 +- x/bank/client/cli/query.go | 2 +- x/bank/client/cli/tx.go | 2 +- x/bank/client/rest/query.go | 2 +- x/bank/client/rest/tx.go | 2 +- x/bank/handler.go | 4 +- x/bank/internal/types/codec.go | 20 - x/bank/{internal => }/keeper/invariants.go | 2 +- x/bank/{internal => }/keeper/keeper.go | 14 +- x/bank/{internal => }/keeper/keeper_test.go | 2 +- x/bank/{internal => }/keeper/querier.go | 2 +- x/bank/{internal => }/keeper/querier_test.go | 4 +- x/bank/module.go | 4 +- x/bank/simulation/genesis.go | 2 +- x/bank/simulation/operations.go | 4 +- x/bank/simulation/params.go | 2 +- x/bank/types/codec.go | 28 + x/bank/{internal => }/types/errors.go | 0 x/bank/{internal => }/types/events.go | 0 .../{internal => }/types/expected_keepers.go | 0 x/bank/{internal => }/types/genesis.go | 0 x/bank/{internal => }/types/key.go | 0 x/bank/{internal => }/types/key_test.go | 2 +- x/bank/{internal => }/types/msgs.go | 25 - x/bank/{internal => }/types/msgs_test.go | 0 x/bank/{internal => }/types/params.go | 0 x/bank/{internal => }/types/querier.go | 0 x/bank/types/types.pb.go | 1177 +++++++++++++++++ x/bank/types/types.proto | 48 + x/distribution/keeper/test_common.go | 2 +- x/gov/keeper/test_common.go | 2 +- x/slashing/keeper/test_common.go | 2 +- x/slashing/types/types.pb.go | 78 +- x/staking/keeper/test_common.go | 2 +- 37 files changed, 1325 insertions(+), 118 deletions(-) delete mode 100644 x/bank/internal/types/codec.go rename x/bank/{internal => }/keeper/invariants.go (94%) rename x/bank/{internal => }/keeper/keeper.go (97%) rename x/bank/{internal => }/keeper/keeper_test.go (99%) rename x/bank/{internal => }/keeper/querier.go (96%) rename x/bank/{internal => }/keeper/querier_test.go (96%) create mode 100644 x/bank/types/codec.go rename x/bank/{internal => }/types/errors.go (100%) rename x/bank/{internal => }/types/events.go (100%) rename x/bank/{internal => }/types/expected_keepers.go (100%) rename x/bank/{internal => }/types/genesis.go (100%) rename x/bank/{internal => }/types/key.go (100%) rename x/bank/{internal => }/types/key_test.go (91%) rename x/bank/{internal => }/types/msgs.go (84%) rename x/bank/{internal => }/types/msgs_test.go (100%) rename x/bank/{internal => }/types/params.go (100%) rename x/bank/{internal => }/types/querier.go (100%) create mode 100644 x/bank/types/types.pb.go create mode 100644 x/bank/types/types.proto diff --git a/.codecov.yml b/.codecov.yml index 8fd6c94d4ad8..c10133afd9e5 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -47,6 +47,7 @@ ignore: - "*.md" - "*.rst" - "**/*.pb.go" + - "x/**/*.pb.go" - "x/**/test_common.go" - "scripts/" - "contrib" diff --git a/simapp/app.go b/simapp/app.go index 56f5513e2d2b..049f12270837 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -167,7 +167,7 @@ func NewSimApp( appCodec, keys[auth.StoreKey], app.subspaces[auth.ModuleName], auth.ProtoBaseAccount, ) app.BankKeeper = bank.NewBaseKeeper( - app.cdc, keys[bank.StoreKey], app.AccountKeeper, app.subspaces[bank.ModuleName], app.BlacklistedAccAddrs(), + appCodec, keys[bank.StoreKey], app.AccountKeeper, app.subspaces[bank.ModuleName], app.BlacklistedAccAddrs(), ) app.SupplyKeeper = supply.NewKeeper( appCodec, keys[supply.StoreKey], app.AccountKeeper, app.BankKeeper, maccPerms, diff --git a/x/bank/alias.go b/x/bank/alias.go index faa59aa3fd98..9811c9e001ee 100644 --- a/x/bank/alias.go +++ b/x/bank/alias.go @@ -3,8 +3,8 @@ package bank // nolint import ( - "github.com/cosmos/cosmos-sdk/x/bank/internal/keeper" - "github.com/cosmos/cosmos-sdk/x/bank/internal/types" + "github.com/cosmos/cosmos-sdk/x/bank/keeper" + "github.com/cosmos/cosmos-sdk/x/bank/types" ) const ( diff --git a/x/bank/app_test.go b/x/bank/app_test.go index 46a33d3f62f6..4a36d2d8af77 100644 --- a/x/bank/app_test.go +++ b/x/bank/app_test.go @@ -16,7 +16,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" authexported "github.com/cosmos/cosmos-sdk/x/auth/exported" - "github.com/cosmos/cosmos-sdk/x/bank/internal/types" + "github.com/cosmos/cosmos-sdk/x/bank/types" ) type ( diff --git a/x/bank/client/cli/query.go b/x/bank/client/cli/query.go index 046e84051448..e7327a091eb4 100644 --- a/x/bank/client/cli/query.go +++ b/x/bank/client/cli/query.go @@ -11,7 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/bank/internal/types" + "github.com/cosmos/cosmos-sdk/x/bank/types" ) const ( diff --git a/x/bank/client/cli/tx.go b/x/bank/client/cli/tx.go index b2b36c45dbe7..0764045968a7 100644 --- a/x/bank/client/cli/tx.go +++ b/x/bank/client/cli/tx.go @@ -12,7 +12,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" authclient "github.com/cosmos/cosmos-sdk/x/auth/client" - "github.com/cosmos/cosmos-sdk/x/bank/internal/types" + "github.com/cosmos/cosmos-sdk/x/bank/types" ) // GetTxCmd returns the transaction commands for this module diff --git a/x/bank/client/rest/query.go b/x/bank/client/rest/query.go index eb1f3463b7a6..99b3680bbb16 100644 --- a/x/bank/client/rest/query.go +++ b/x/bank/client/rest/query.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/context" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" - "github.com/cosmos/cosmos-sdk/x/bank/internal/types" + "github.com/cosmos/cosmos-sdk/x/bank/types" ) // QueryBalancesRequestHandlerFn returns a REST handler that queries for all diff --git a/x/bank/client/rest/tx.go b/x/bank/client/rest/tx.go index 52fa9f25136b..30178166bb5f 100644 --- a/x/bank/client/rest/tx.go +++ b/x/bank/client/rest/tx.go @@ -9,7 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" authclient "github.com/cosmos/cosmos-sdk/x/auth/client" - "github.com/cosmos/cosmos-sdk/x/bank/internal/types" + "github.com/cosmos/cosmos-sdk/x/bank/types" ) // SendReq defines the properties of a send request's body. diff --git a/x/bank/handler.go b/x/bank/handler.go index 3c83ec4c2af4..30341ab47b57 100644 --- a/x/bank/handler.go +++ b/x/bank/handler.go @@ -3,8 +3,8 @@ package bank import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/x/bank/internal/keeper" - "github.com/cosmos/cosmos-sdk/x/bank/internal/types" + "github.com/cosmos/cosmos-sdk/x/bank/keeper" + "github.com/cosmos/cosmos-sdk/x/bank/types" ) // NewHandler returns a handler for "bank" type messages. diff --git a/x/bank/internal/types/codec.go b/x/bank/internal/types/codec.go deleted file mode 100644 index 6d4d49adc118..000000000000 --- a/x/bank/internal/types/codec.go +++ /dev/null @@ -1,20 +0,0 @@ -package types - -import ( - "github.com/cosmos/cosmos-sdk/codec" -) - -// Register concrete types on codec codec -func RegisterCodec(cdc *codec.Codec) { - cdc.RegisterConcrete(MsgSend{}, "cosmos-sdk/MsgSend", nil) - cdc.RegisterConcrete(MsgMultiSend{}, "cosmos-sdk/MsgMultiSend", nil) -} - -// module codec -var ModuleCdc *codec.Codec - -func init() { - ModuleCdc = codec.New() - RegisterCodec(ModuleCdc) - ModuleCdc.Seal() -} diff --git a/x/bank/internal/keeper/invariants.go b/x/bank/keeper/invariants.go similarity index 94% rename from x/bank/internal/keeper/invariants.go rename to x/bank/keeper/invariants.go index 65730451261b..3833c034d3df 100644 --- a/x/bank/internal/keeper/invariants.go +++ b/x/bank/keeper/invariants.go @@ -4,7 +4,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/bank/internal/types" + "github.com/cosmos/cosmos-sdk/x/bank/types" ) // RegisterInvariants registers the bank module invariants diff --git a/x/bank/internal/keeper/keeper.go b/x/bank/keeper/keeper.go similarity index 97% rename from x/bank/internal/keeper/keeper.go rename to x/bank/keeper/keeper.go index 1475a85cfb92..b1b2bdfa7a4e 100644 --- a/x/bank/internal/keeper/keeper.go +++ b/x/bank/keeper/keeper.go @@ -11,7 +11,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" vestexported "github.com/cosmos/cosmos-sdk/x/auth/vesting/exported" - "github.com/cosmos/cosmos-sdk/x/bank/internal/types" + "github.com/cosmos/cosmos-sdk/x/bank/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) @@ -35,7 +35,7 @@ type BaseKeeper struct { } func NewBaseKeeper( - cdc *codec.Codec, storeKey sdk.StoreKey, ak types.AccountKeeper, paramSpace paramtypes.Subspace, blacklistedAddrs map[string]bool, + cdc codec.Marshaler, storeKey sdk.StoreKey, ak types.AccountKeeper, paramSpace paramtypes.Subspace, blacklistedAddrs map[string]bool, ) BaseKeeper { ps := paramSpace.WithKeyTable(types.ParamKeyTable()) @@ -146,7 +146,7 @@ var _ SendKeeper = (*BaseSendKeeper)(nil) type BaseSendKeeper struct { BaseViewKeeper - cdc *codec.Codec + cdc codec.Marshaler ak types.AccountKeeper storeKey sdk.StoreKey paramSpace paramtypes.Subspace @@ -156,7 +156,7 @@ type BaseSendKeeper struct { } func NewBaseSendKeeper( - cdc *codec.Codec, storeKey sdk.StoreKey, ak types.AccountKeeper, paramSpace paramtypes.Subspace, blacklistedAddrs map[string]bool, + cdc codec.Marshaler, storeKey sdk.StoreKey, ak types.AccountKeeper, paramSpace paramtypes.Subspace, blacklistedAddrs map[string]bool, ) BaseSendKeeper { return BaseSendKeeper{ @@ -341,7 +341,7 @@ func (k BaseSendKeeper) SetBalance(ctx sdk.Context, addr sdk.AccAddress, balance balancesStore := prefix.NewStore(store, types.BalancesPrefix) accountStore := prefix.NewStore(balancesStore, addr.Bytes()) - bz := k.cdc.MustMarshalBinaryBare(balance) + bz := k.cdc.MustMarshalBinaryBare(&balance) accountStore.Set([]byte(balance.Denom), bz) return nil @@ -385,13 +385,13 @@ type ViewKeeper interface { // BaseViewKeeper implements a read only keeper implementation of ViewKeeper. type BaseViewKeeper struct { - cdc *codec.Codec + cdc codec.Marshaler storeKey sdk.StoreKey ak types.AccountKeeper } // NewBaseViewKeeper returns a new BaseViewKeeper. -func NewBaseViewKeeper(cdc *codec.Codec, storeKey sdk.StoreKey, ak types.AccountKeeper) BaseViewKeeper { +func NewBaseViewKeeper(cdc codec.Marshaler, storeKey sdk.StoreKey, ak types.AccountKeeper) BaseViewKeeper { return BaseViewKeeper{ cdc: cdc, storeKey: storeKey, diff --git a/x/bank/internal/keeper/keeper_test.go b/x/bank/keeper/keeper_test.go similarity index 99% rename from x/bank/internal/keeper/keeper_test.go rename to x/bank/keeper/keeper_test.go index d71f1274f1d2..472fe39972d5 100644 --- a/x/bank/internal/keeper/keeper_test.go +++ b/x/bank/keeper/keeper_test.go @@ -13,7 +13,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/vesting" - "github.com/cosmos/cosmos-sdk/x/bank/internal/types" + "github.com/cosmos/cosmos-sdk/x/bank/types" ) const ( diff --git a/x/bank/internal/keeper/querier.go b/x/bank/keeper/querier.go similarity index 96% rename from x/bank/internal/keeper/querier.go rename to x/bank/keeper/querier.go index 072511b2d2a8..be17b371629a 100644 --- a/x/bank/internal/keeper/querier.go +++ b/x/bank/keeper/querier.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/x/bank/internal/types" + "github.com/cosmos/cosmos-sdk/x/bank/types" ) // NewQuerier returns a new sdk.Keeper instance. diff --git a/x/bank/internal/keeper/querier_test.go b/x/bank/keeper/querier_test.go similarity index 96% rename from x/bank/internal/keeper/querier_test.go rename to x/bank/keeper/querier_test.go index 643f7b1798cf..3732aaa74429 100644 --- a/x/bank/internal/keeper/querier_test.go +++ b/x/bank/keeper/querier_test.go @@ -7,8 +7,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/bank/internal/keeper" - "github.com/cosmos/cosmos-sdk/x/bank/internal/types" + "github.com/cosmos/cosmos-sdk/x/bank/keeper" + "github.com/cosmos/cosmos-sdk/x/bank/types" ) func (suite *IntegrationTestSuite) TestQuerier_QueryBalance() { diff --git a/x/bank/module.go b/x/bank/module.go index dfde67f4a85e..7cb86714272c 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -16,9 +16,9 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/bank/client/cli" "github.com/cosmos/cosmos-sdk/x/bank/client/rest" - "github.com/cosmos/cosmos-sdk/x/bank/internal/keeper" - "github.com/cosmos/cosmos-sdk/x/bank/internal/types" + "github.com/cosmos/cosmos-sdk/x/bank/keeper" "github.com/cosmos/cosmos-sdk/x/bank/simulation" + "github.com/cosmos/cosmos-sdk/x/bank/types" sim "github.com/cosmos/cosmos-sdk/x/simulation" ) diff --git a/x/bank/simulation/genesis.go b/x/bank/simulation/genesis.go index b593fa05b070..97716bd2fa6c 100644 --- a/x/bank/simulation/genesis.go +++ b/x/bank/simulation/genesis.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/cosmos/cosmos-sdk/x/bank/internal/types" + "github.com/cosmos/cosmos-sdk/x/bank/types" ) // Simulation parameter constants diff --git a/x/bank/simulation/operations.go b/x/bank/simulation/operations.go index 2d9e8468359a..c3ff22f9ceed 100644 --- a/x/bank/simulation/operations.go +++ b/x/bank/simulation/operations.go @@ -10,8 +10,8 @@ import ( "github.com/cosmos/cosmos-sdk/simapp/helpers" simappparams "github.com/cosmos/cosmos-sdk/simapp/params" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/bank/internal/keeper" - "github.com/cosmos/cosmos-sdk/x/bank/internal/types" + "github.com/cosmos/cosmos-sdk/x/bank/keeper" + "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/simulation" ) diff --git a/x/bank/simulation/params.go b/x/bank/simulation/params.go index f5aa25bf6a0c..458a8a09a16e 100644 --- a/x/bank/simulation/params.go +++ b/x/bank/simulation/params.go @@ -6,7 +6,7 @@ import ( "fmt" "math/rand" - "github.com/cosmos/cosmos-sdk/x/bank/internal/types" + "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/simulation" ) diff --git a/x/bank/types/codec.go b/x/bank/types/codec.go new file mode 100644 index 000000000000..652fb3f2fe23 --- /dev/null +++ b/x/bank/types/codec.go @@ -0,0 +1,28 @@ +package types + +import ( + "github.com/cosmos/cosmos-sdk/codec" +) + +// Register concrete types on codec codec +func RegisterCodec(cdc *codec.Codec) { + cdc.RegisterConcrete(MsgSend{}, "cosmos-sdk/MsgSend", nil) + cdc.RegisterConcrete(MsgMultiSend{}, "cosmos-sdk/MsgMultiSend", nil) +} + +var ( + amino = codec.New() + + // ModuleCdc references the global x/staking module codec. Note, the codec should + // ONLY be used in certain instances of tests and for JSON encoding as Amino is + // still used for that purpose. + // + // The actual codec used for serialization should be provided to x/staking and + // defined at the application level. + ModuleCdc = codec.NewHybridCodec(amino) +) + +func init() { + RegisterCodec(amino) + amino.Seal() +} diff --git a/x/bank/internal/types/errors.go b/x/bank/types/errors.go similarity index 100% rename from x/bank/internal/types/errors.go rename to x/bank/types/errors.go diff --git a/x/bank/internal/types/events.go b/x/bank/types/events.go similarity index 100% rename from x/bank/internal/types/events.go rename to x/bank/types/events.go diff --git a/x/bank/internal/types/expected_keepers.go b/x/bank/types/expected_keepers.go similarity index 100% rename from x/bank/internal/types/expected_keepers.go rename to x/bank/types/expected_keepers.go diff --git a/x/bank/internal/types/genesis.go b/x/bank/types/genesis.go similarity index 100% rename from x/bank/internal/types/genesis.go rename to x/bank/types/genesis.go diff --git a/x/bank/internal/types/key.go b/x/bank/types/key.go similarity index 100% rename from x/bank/internal/types/key.go rename to x/bank/types/key.go diff --git a/x/bank/internal/types/key_test.go b/x/bank/types/key_test.go similarity index 91% rename from x/bank/internal/types/key_test.go rename to x/bank/types/key_test.go index a16a22381d6e..b1e5a7614106 100644 --- a/x/bank/internal/types/key_test.go +++ b/x/bank/types/key_test.go @@ -4,7 +4,7 @@ import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/bank/internal/types" + "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/stretchr/testify/require" ) diff --git a/x/bank/internal/types/msgs.go b/x/bank/types/msgs.go similarity index 84% rename from x/bank/internal/types/msgs.go rename to x/bank/types/msgs.go index 83db26aaefd1..3dab0c6bb538 100644 --- a/x/bank/internal/types/msgs.go +++ b/x/bank/types/msgs.go @@ -5,13 +5,6 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) -// MsgSend - high level transaction of the coin module -type MsgSend struct { - FromAddress sdk.AccAddress `json:"from_address" yaml:"from_address"` - ToAddress sdk.AccAddress `json:"to_address" yaml:"to_address"` - Amount sdk.Coins `json:"amount" yaml:"amount"` -} - var _ sdk.Msg = MsgSend{} // NewMsgSend - construct arbitrary multi-in, multi-out send msg. @@ -52,12 +45,6 @@ func (msg MsgSend) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{msg.FromAddress} } -// MsgMultiSend - high level transaction of the coin module -type MsgMultiSend struct { - Inputs []Input `json:"inputs" yaml:"inputs"` - Outputs []Output `json:"outputs" yaml:"outputs"` -} - var _ sdk.Msg = MsgMultiSend{} // NewMsgMultiSend - construct arbitrary multi-in, multi-out send msg. @@ -99,12 +86,6 @@ func (msg MsgMultiSend) GetSigners() []sdk.AccAddress { return addrs } -// Input models transaction input -type Input struct { - Address sdk.AccAddress `json:"address" yaml:"address"` - Coins sdk.Coins `json:"coins" yaml:"coins"` -} - // ValidateBasic - validate transaction input func (in Input) ValidateBasic() error { if len(in.Address) == 0 { @@ -127,12 +108,6 @@ func NewInput(addr sdk.AccAddress, coins sdk.Coins) Input { } } -// Output models transaction outputs -type Output struct { - Address sdk.AccAddress `json:"address" yaml:"address"` - Coins sdk.Coins `json:"coins" yaml:"coins"` -} - // ValidateBasic - validate transaction output func (out Output) ValidateBasic() error { if len(out.Address) == 0 { diff --git a/x/bank/internal/types/msgs_test.go b/x/bank/types/msgs_test.go similarity index 100% rename from x/bank/internal/types/msgs_test.go rename to x/bank/types/msgs_test.go diff --git a/x/bank/internal/types/params.go b/x/bank/types/params.go similarity index 100% rename from x/bank/internal/types/params.go rename to x/bank/types/params.go diff --git a/x/bank/internal/types/querier.go b/x/bank/types/querier.go similarity index 100% rename from x/bank/internal/types/querier.go rename to x/bank/types/querier.go diff --git a/x/bank/types/types.pb.go b/x/bank/types/types.pb.go new file mode 100644 index 000000000000..0de721984735 --- /dev/null +++ b/x/bank/types/types.pb.go @@ -0,0 +1,1177 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: x/bank/types/types.proto + +package types + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgSend - high level transaction of the coin module +type MsgSend struct { + FromAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"from_address,omitempty" yaml:"from_address"` + ToAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"to_address,omitempty" yaml:"to_address"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` +} + +func (m *MsgSend) Reset() { *m = MsgSend{} } +func (m *MsgSend) String() string { return proto.CompactTextString(m) } +func (*MsgSend) ProtoMessage() {} +func (*MsgSend) Descriptor() ([]byte, []int) { + return fileDescriptor_934ff6b24d3432e2, []int{0} +} +func (m *MsgSend) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSend.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSend) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSend.Merge(m, src) +} +func (m *MsgSend) XXX_Size() int { + return m.Size() +} +func (m *MsgSend) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSend.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSend proto.InternalMessageInfo + +func (m *MsgSend) GetFromAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.FromAddress + } + return nil +} + +func (m *MsgSend) GetToAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.ToAddress + } + return nil +} + +func (m *MsgSend) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Amount + } + return nil +} + +// Input models transaction input +type Input struct { + Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` + Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"` +} + +func (m *Input) Reset() { *m = Input{} } +func (m *Input) String() string { return proto.CompactTextString(m) } +func (*Input) ProtoMessage() {} +func (*Input) Descriptor() ([]byte, []int) { + return fileDescriptor_934ff6b24d3432e2, []int{1} +} +func (m *Input) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Input) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Input.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Input) XXX_Merge(src proto.Message) { + xxx_messageInfo_Input.Merge(m, src) +} +func (m *Input) XXX_Size() int { + return m.Size() +} +func (m *Input) XXX_DiscardUnknown() { + xxx_messageInfo_Input.DiscardUnknown(m) +} + +var xxx_messageInfo_Input proto.InternalMessageInfo + +func (m *Input) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Address + } + return nil +} + +func (m *Input) GetCoins() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Coins + } + return nil +} + +// Output models transaction outputs +type Output struct { + Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` + Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"` +} + +func (m *Output) Reset() { *m = Output{} } +func (m *Output) String() string { return proto.CompactTextString(m) } +func (*Output) ProtoMessage() {} +func (*Output) Descriptor() ([]byte, []int) { + return fileDescriptor_934ff6b24d3432e2, []int{2} +} +func (m *Output) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Output) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Output.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Output) XXX_Merge(src proto.Message) { + xxx_messageInfo_Output.Merge(m, src) +} +func (m *Output) XXX_Size() int { + return m.Size() +} +func (m *Output) XXX_DiscardUnknown() { + xxx_messageInfo_Output.DiscardUnknown(m) +} + +var xxx_messageInfo_Output proto.InternalMessageInfo + +func (m *Output) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Address + } + return nil +} + +func (m *Output) GetCoins() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Coins + } + return nil +} + +// MsgMultiSend - high level transaction of the coin module +type MsgMultiSend struct { + Inputs []Input `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs"` + Outputs []Output `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs"` +} + +func (m *MsgMultiSend) Reset() { *m = MsgMultiSend{} } +func (m *MsgMultiSend) String() string { return proto.CompactTextString(m) } +func (*MsgMultiSend) ProtoMessage() {} +func (*MsgMultiSend) Descriptor() ([]byte, []int) { + return fileDescriptor_934ff6b24d3432e2, []int{3} +} +func (m *MsgMultiSend) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgMultiSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgMultiSend.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgMultiSend) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgMultiSend.Merge(m, src) +} +func (m *MsgMultiSend) XXX_Size() int { + return m.Size() +} +func (m *MsgMultiSend) XXX_DiscardUnknown() { + xxx_messageInfo_MsgMultiSend.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgMultiSend proto.InternalMessageInfo + +func (m *MsgMultiSend) GetInputs() []Input { + if m != nil { + return m.Inputs + } + return nil +} + +func (m *MsgMultiSend) GetOutputs() []Output { + if m != nil { + return m.Outputs + } + return nil +} + +func init() { + proto.RegisterType((*MsgSend)(nil), "cosmos_sdk.x.bank.v1.MsgSend") + proto.RegisterType((*Input)(nil), "cosmos_sdk.x.bank.v1.Input") + proto.RegisterType((*Output)(nil), "cosmos_sdk.x.bank.v1.Output") + proto.RegisterType((*MsgMultiSend)(nil), "cosmos_sdk.x.bank.v1.MsgMultiSend") +} + +func init() { proto.RegisterFile("x/bank/types/types.proto", fileDescriptor_934ff6b24d3432e2) } + +var fileDescriptor_934ff6b24d3432e2 = []byte{ + // 403 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xa8, 0xd0, 0x4f, 0x4a, + 0xcc, 0xcb, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0x86, 0x90, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, + 0x42, 0x22, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0xf1, 0xc5, 0x29, 0xd9, 0x7a, 0x15, 0x7a, 0x20, + 0x45, 0x7a, 0x65, 0x86, 0x52, 0x6a, 0x25, 0x19, 0x99, 0x45, 0x29, 0xf1, 0x05, 0x89, 0x45, 0x25, + 0x95, 0xfa, 0x60, 0x85, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0x08, 0x16, 0x44, 0xb7, 0x94, 0x20, 0x86, + 0x81, 0x4a, 0x7b, 0x98, 0xb8, 0xd8, 0x7d, 0x8b, 0xd3, 0x83, 0x53, 0xf3, 0x52, 0x84, 0xb2, 0xb9, + 0x78, 0xd2, 0x8a, 0xf2, 0x73, 0xe3, 0x13, 0x53, 0x52, 0x8a, 0x52, 0x8b, 0x8b, 0x25, 0x18, 0x15, + 0x18, 0x35, 0x78, 0x9c, 0x3c, 0x3e, 0xdd, 0x93, 0x17, 0xae, 0x4c, 0xcc, 0xcd, 0xb1, 0x52, 0x42, + 0x96, 0x55, 0xfa, 0x75, 0x4f, 0x5e, 0x37, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, + 0x57, 0x1f, 0xe2, 0x30, 0x28, 0xa5, 0x5b, 0x9c, 0x02, 0x75, 0xbd, 0x9e, 0x63, 0x72, 0xb2, 0x23, + 0x44, 0x47, 0x10, 0x37, 0x48, 0x3f, 0x94, 0x23, 0x94, 0xca, 0xc5, 0x55, 0x92, 0x0f, 0xb7, 0x8a, + 0x09, 0x6c, 0x95, 0xdb, 0xa7, 0x7b, 0xf2, 0x82, 0x10, 0xab, 0x10, 0x72, 0x64, 0x58, 0xc4, 0x59, + 0x92, 0x0f, 0xb3, 0x26, 0x96, 0x8b, 0x2d, 0x31, 0x37, 0xbf, 0x34, 0xaf, 0x44, 0x82, 0x59, 0x81, + 0x59, 0x83, 0xdb, 0x48, 0x58, 0x0f, 0x29, 0x04, 0xcb, 0x0c, 0xf5, 0x9c, 0xf3, 0x33, 0xf3, 0x9c, + 0x0c, 0x4e, 0xdc, 0x93, 0x67, 0x58, 0x75, 0x5f, 0x5e, 0x83, 0x08, 0x6b, 0x40, 0x1a, 0x8a, 0x83, + 0xa0, 0x86, 0x2a, 0x6d, 0x64, 0xe4, 0x62, 0xf5, 0xcc, 0x2b, 0x28, 0x2d, 0x11, 0xf2, 0xe6, 0x62, + 0x47, 0x0d, 0x37, 0x43, 0xd2, 0xdd, 0x0d, 0x33, 0x41, 0x28, 0x9a, 0x8b, 0x35, 0x19, 0x64, 0x8f, + 0x04, 0x13, 0x35, 0x1d, 0x0d, 0x31, 0x53, 0x69, 0x13, 0x23, 0x17, 0x9b, 0x7f, 0x69, 0xc9, 0xd0, + 0x72, 0x74, 0x3b, 0x23, 0x17, 0x8f, 0x6f, 0x71, 0xba, 0x6f, 0x69, 0x4e, 0x49, 0x26, 0x38, 0xb1, + 0x5a, 0x72, 0xb1, 0x65, 0x82, 0x02, 0x1e, 0xe4, 0x72, 0x90, 0x75, 0xd2, 0x7a, 0xd8, 0xb2, 0x86, + 0x1e, 0x38, 0x72, 0x9c, 0x58, 0x40, 0xd6, 0x06, 0x41, 0x35, 0x08, 0xd9, 0x70, 0xb1, 0xe7, 0x83, + 0xfd, 0x0f, 0x73, 0xaa, 0x0c, 0x76, 0xbd, 0x90, 0x40, 0x82, 0x6a, 0x86, 0x69, 0x71, 0x72, 0x3e, + 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, + 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x4d, 0xbc, 0x9e, 0x42, 0xce, 0xd3, + 0x49, 0x6c, 0xe0, 0xdc, 0x67, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x64, 0xad, 0xc1, 0x15, 0xea, + 0x03, 0x00, 0x00, +} + +func (m *MsgSend) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSend) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSend) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.ToAddress) > 0 { + i -= len(m.ToAddress) + copy(dAtA[i:], m.ToAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ToAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.FromAddress) > 0 { + i -= len(m.FromAddress) + copy(dAtA[i:], m.FromAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.FromAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Input) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Input) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Input) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Coins) > 0 { + for iNdEx := len(m.Coins) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Coins[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Output) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Output) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Output) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Coins) > 0 { + for iNdEx := len(m.Coins) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Coins[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgMultiSend) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgMultiSend) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgMultiSend) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Outputs) > 0 { + for iNdEx := len(m.Outputs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Outputs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Inputs) > 0 { + for iNdEx := len(m.Inputs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Inputs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgSend) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FromAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ToAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *Input) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Coins) > 0 { + for _, e := range m.Coins { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *Output) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Coins) > 0 { + for _, e := range m.Coins { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *MsgMultiSend) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Inputs) > 0 { + for _, e := range m.Inputs { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Outputs) > 0 { + for _, e := range m.Outputs { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgSend) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSend: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSend: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FromAddress = append(m.FromAddress[:0], dAtA[iNdEx:postIndex]...) + if m.FromAddress == nil { + m.FromAddress = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ToAddress = append(m.ToAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ToAddress == nil { + m.ToAddress = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = append(m.Amount, types.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Input) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Input: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Input: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Coins = append(m.Coins, types.Coin{}) + if err := m.Coins[len(m.Coins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Output) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Output: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Output: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Coins = append(m.Coins, types.Coin{}) + if err := m.Coins[len(m.Coins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgMultiSend) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgMultiSend: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgMultiSend: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Inputs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Inputs = append(m.Inputs, Input{}) + if err := m.Inputs[len(m.Inputs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Outputs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Outputs = append(m.Outputs, Output{}) + if err := m.Outputs[len(m.Outputs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/bank/types/types.proto b/x/bank/types/types.proto new file mode 100644 index 000000000000..9aee8d22a319 --- /dev/null +++ b/x/bank/types/types.proto @@ -0,0 +1,48 @@ +syntax = "proto3"; + +package cosmos_sdk.x.bank.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; + +import "third_party/proto/gogoproto/gogo.proto"; +import "types/types.proto"; + +// MsgSend - high level transaction of the coin module +message MsgSend { + bytes from_address = 1 [ + (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", + (gogoproto.moretags) = "yaml:\"from_address\"" + ]; + bytes to_address = 2 [ + (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", + (gogoproto.moretags) = "yaml:\"to_address\"" + ]; + repeated cosmos_sdk.v1.Coin amount = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// Input models transaction input +message Input { + bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + repeated cosmos_sdk.v1.Coin coins = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// Output models transaction outputs +message Output { + bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + repeated cosmos_sdk.v1.Coin coins = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// MsgMultiSend - high level transaction of the coin module +message MsgMultiSend { + repeated Input inputs = 1 [(gogoproto.nullable) = false]; + repeated Output outputs = 2 [(gogoproto.nullable) = false]; +} diff --git a/x/distribution/keeper/test_common.go b/x/distribution/keeper/test_common.go index a60b36985a4b..0c18e9249525 100644 --- a/x/distribution/keeper/test_common.go +++ b/x/distribution/keeper/test_common.go @@ -132,7 +132,7 @@ func CreateTestInputAdvanced( ctx := sdk.NewContext(ms, abci.Header{ChainID: "foochainid"}, isCheckTx, log.NewNopLogger()) accountKeeper := auth.NewAccountKeeper(appCodec, keyAcc, pk.Subspace(auth.DefaultParamspace), auth.ProtoBaseAccount) - bankKeeper := bank.NewBaseKeeper(cdc, keyBank, accountKeeper, pk.Subspace(bank.DefaultParamspace), blacklistedAddrs) + bankKeeper := bank.NewBaseKeeper(appCodec, keyBank, accountKeeper, pk.Subspace(bank.DefaultParamspace), blacklistedAddrs) maccPerms := map[string][]string{ auth.FeeCollectorName: nil, types.ModuleName: nil, diff --git a/x/gov/keeper/test_common.go b/x/gov/keeper/test_common.go index d521b10bef3b..84df63afb549 100644 --- a/x/gov/keeper/test_common.go +++ b/x/gov/keeper/test_common.go @@ -151,7 +151,7 @@ func createTestInput( pk := keeper.NewKeeper(appCodec, keyParams, tkeyParams) accountKeeper := auth.NewAccountKeeper(appCodec, keyAcc, pk.Subspace(auth.DefaultParamspace), auth.ProtoBaseAccount) - bankKeeper := bank.NewBaseKeeper(cdc, keyBank, accountKeeper, pk.Subspace(bank.DefaultParamspace), blacklistedAddrs) + bankKeeper := bank.NewBaseKeeper(appCodec, keyBank, accountKeeper, pk.Subspace(bank.DefaultParamspace), blacklistedAddrs) supplyKeeper := supply.NewKeeper(appCodec, keySupply, accountKeeper, bankKeeper, maccPerms) sk := staking.NewKeeper(staking.ModuleCdc, keyStaking, bankKeeper, supplyKeeper, pk.Subspace(staking.DefaultParamspace)) diff --git a/x/slashing/keeper/test_common.go b/x/slashing/keeper/test_common.go index 6fa24149f5ef..d80c68b7ed9e 100644 --- a/x/slashing/keeper/test_common.go +++ b/x/slashing/keeper/test_common.go @@ -96,7 +96,7 @@ func CreateTestInput(t *testing.T, defaults types.Params) (sdk.Context, bank.Kee paramsKeeper := keeper.NewKeeper(appCodec, keyParams, tkeyParams) accountKeeper := auth.NewAccountKeeper(appCodec, keyAcc, paramsKeeper.Subspace(auth.DefaultParamspace), auth.ProtoBaseAccount) - bk := bank.NewBaseKeeper(cdc, keyBank, accountKeeper, paramsKeeper.Subspace(bank.DefaultParamspace), blacklistedAddrs) + bk := bank.NewBaseKeeper(appCodec, keyBank, accountKeeper, paramsKeeper.Subspace(bank.DefaultParamspace), blacklistedAddrs) maccPerms := map[string][]string{ auth.FeeCollectorName: nil, staking.NotBondedPoolName: {supply.Burner, supply.Staking}, diff --git a/x/slashing/types/types.pb.go b/x/slashing/types/types.pb.go index 82791e7bcdcd..3537919b2c05 100644 --- a/x/slashing/types/types.pb.go +++ b/x/slashing/types/types.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: x/slashing/internal/types/types.proto +// source: x/slashing/types/types.proto package types @@ -38,7 +38,7 @@ func (m *MsgUnjail) Reset() { *m = MsgUnjail{} } func (m *MsgUnjail) String() string { return proto.CompactTextString(m) } func (*MsgUnjail) ProtoMessage() {} func (*MsgUnjail) Descriptor() ([]byte, []int) { - return fileDescriptor_2b882c3b0cdd6f57, []int{0} + return fileDescriptor_57cb37764f972476, []int{0} } func (m *MsgUnjail) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -87,7 +87,7 @@ type ValidatorSigningInfo struct { func (m *ValidatorSigningInfo) Reset() { *m = ValidatorSigningInfo{} } func (*ValidatorSigningInfo) ProtoMessage() {} func (*ValidatorSigningInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_2b882c3b0cdd6f57, []int{1} + return fileDescriptor_57cb37764f972476, []int{1} } func (m *ValidatorSigningInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -163,43 +163,41 @@ func init() { proto.RegisterType((*ValidatorSigningInfo)(nil), "cosmos_sdk.x.slashing.v1.ValidatorSigningInfo") } -func init() { - proto.RegisterFile("x/slashing/internal/types/types.proto", fileDescriptor_2b882c3b0cdd6f57) -} - -var fileDescriptor_2b882c3b0cdd6f57 = []byte{ - // 491 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x3f, 0x6f, 0xd3, 0x4e, - 0x18, 0xc7, 0x73, 0xbf, 0xfc, 0x5a, 0xca, 0x25, 0x74, 0x70, 0x41, 0x58, 0x11, 0xf2, 0x59, 0x96, - 0x40, 0x59, 0x6a, 0x8b, 0xb2, 0x65, 0xc3, 0x5d, 0x40, 0xe2, 0x8f, 0x64, 0xda, 0x0e, 0x0c, 0x58, - 0xe7, 0xdc, 0xe5, 0x7c, 0xc4, 0xbe, 0x8b, 0x7c, 0xe7, 0x2a, 0x59, 0x79, 0x05, 0x1d, 0x19, 0xfb, - 0x42, 0x78, 0x01, 0x1d, 0x3b, 0x32, 0x19, 0x94, 0x2c, 0x88, 0x31, 0x63, 0x27, 0x64, 0x5f, 0x4c, - 0x23, 0xc4, 0xc0, 0x92, 0xf8, 0xfb, 0xb9, 0xe7, 0xfb, 0x7c, 0xef, 0xf1, 0x63, 0xf8, 0x78, 0x1e, - 0xa8, 0x0c, 0xab, 0x94, 0x0b, 0x16, 0x70, 0xa1, 0x69, 0x21, 0x70, 0x16, 0xe8, 0xc5, 0x8c, 0x2a, - 0xf3, 0xeb, 0xcf, 0x0a, 0xa9, 0xa5, 0x65, 0x8f, 0xa5, 0xca, 0xa5, 0x8a, 0x15, 0x99, 0xfa, 0x73, - 0xbf, 0x75, 0xf8, 0xe7, 0x4f, 0x07, 0x4f, 0x74, 0xca, 0x0b, 0x12, 0xcf, 0x70, 0xa1, 0x17, 0x41, - 0x53, 0x1c, 0x30, 0xc9, 0xe4, 0xed, 0x93, 0xe9, 0x30, 0x40, 0x4c, 0x4a, 0x96, 0x51, 0x53, 0x92, - 0x94, 0x93, 0x40, 0xf3, 0x9c, 0x2a, 0x8d, 0xf3, 0x99, 0x29, 0xf0, 0x3e, 0x01, 0x78, 0xf7, 0xb5, - 0x62, 0xa7, 0xe2, 0x23, 0xe6, 0x99, 0x55, 0xc2, 0xfd, 0x73, 0x9c, 0x71, 0x82, 0xb5, 0x2c, 0x62, - 0x4c, 0x48, 0x61, 0x03, 0x17, 0x0c, 0xfb, 0xe1, 0x9b, 0x9f, 0x15, 0xba, 0x53, 0x6b, 0xaa, 0xd4, - 0xba, 0x42, 0xfb, 0x0b, 0x9c, 0x67, 0x23, 0x6f, 0x03, 0xbc, 0x9b, 0x0a, 0x1d, 0x32, 0xae, 0xd3, - 0x32, 0xf1, 0xc7, 0x32, 0x0f, 0xcc, 0xa5, 0x37, 0x7f, 0x87, 0x8a, 0x4c, 0x37, 0x33, 0x9d, 0xe1, - 0xec, 0xb9, 0x71, 0x44, 0xf7, 0x7e, 0xa7, 0xd4, 0xc4, 0xfb, 0xd2, 0x85, 0xf7, 0xcf, 0x5a, 0xf2, - 0x8e, 0x33, 0xc1, 0x05, 0x7b, 0x29, 0x26, 0xd2, 0x7a, 0x05, 0xdb, 0xd4, 0xcd, 0x45, 0x8e, 0x6e, - 0x2a, 0xe4, 0xff, 0x43, 0xd6, 0xb1, 0x14, 0xaa, 0x0d, 0x6b, 0x5b, 0x58, 0x23, 0xd8, 0x57, 0x1a, - 0x17, 0x3a, 0x4e, 0x29, 0x67, 0xa9, 0xb6, 0xff, 0x73, 0xc1, 0xb0, 0x1b, 0x3e, 0x5c, 0x57, 0xe8, - 0xc0, 0x0c, 0xb4, 0x7d, 0xea, 0x45, 0xbd, 0x46, 0xbe, 0x68, 0x54, 0xed, 0xe5, 0x82, 0xd0, 0x79, - 0x2c, 0x27, 0x13, 0x45, 0xb5, 0xdd, 0xfd, 0xd3, 0xbb, 0x7d, 0xea, 0x45, 0xbd, 0x46, 0xbe, 0x6d, - 0x94, 0xf5, 0x01, 0xf6, 0xeb, 0xb7, 0x4b, 0x49, 0x5c, 0x0a, 0xcd, 0x33, 0xfb, 0x7f, 0x17, 0x0c, - 0x7b, 0x47, 0x03, 0xdf, 0xec, 0xc6, 0x6f, 0x77, 0xe3, 0x9f, 0xb4, 0xbb, 0x09, 0xd1, 0x55, 0x85, - 0x3a, 0xb7, 0xbd, 0xb7, 0xdd, 0xde, 0xc5, 0x37, 0x04, 0xa2, 0x9e, 0x41, 0xa7, 0x35, 0xb1, 0x1c, - 0x08, 0xb5, 0xcc, 0x13, 0xa5, 0xa5, 0xa0, 0xc4, 0xde, 0x71, 0xc1, 0x70, 0x2f, 0xda, 0x22, 0xd6, - 0x09, 0x7c, 0x90, 0x73, 0xa5, 0x28, 0x89, 0x93, 0x4c, 0x8e, 0xa7, 0x2a, 0x1e, 0xcb, 0xb2, 0xfe, - 0xe8, 0xec, 0xdd, 0x66, 0x08, 0x77, 0x5d, 0xa1, 0x47, 0x26, 0xe8, 0xaf, 0x65, 0x5e, 0x74, 0x60, - 0x78, 0xd8, 0xe0, 0x63, 0x43, 0x47, 0x7b, 0x9f, 0x2f, 0x51, 0xe7, 0xc7, 0x25, 0x02, 0x21, 0xba, - 0x5a, 0x3a, 0xe0, 0x7a, 0xe9, 0x80, 0xef, 0x4b, 0x07, 0x5c, 0xac, 0x9c, 0xce, 0xf5, 0xca, 0xe9, - 0x7c, 0x5d, 0x39, 0x9d, 0xf7, 0x3b, 0xcd, 0x36, 0x92, 0xdd, 0x66, 0xc4, 0x67, 0xbf, 0x02, 0x00, - 0x00, 0xff, 0xff, 0x61, 0xf4, 0xaf, 0xf7, 0xf7, 0x02, 0x00, 0x00, +func init() { proto.RegisterFile("x/slashing/types/types.proto", fileDescriptor_57cb37764f972476) } + +var fileDescriptor_57cb37764f972476 = []byte{ + // 488 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0x73, 0x04, 0x4a, 0xb9, 0x84, 0x0e, 0x2e, 0x08, 0x2b, 0xaa, 0x7c, 0x91, 0x07, 0x94, + 0xa5, 0xb6, 0x28, 0x5b, 0x36, 0xdc, 0x01, 0x90, 0xf8, 0x21, 0x99, 0xb6, 0x03, 0x03, 0xd6, 0x39, + 0x77, 0x39, 0x1f, 0xb1, 0xef, 0x22, 0xdf, 0xb9, 0x4a, 0x56, 0xfe, 0x82, 0x8e, 0x8c, 0xfd, 0x43, + 0xf8, 0x03, 0x3a, 0x76, 0x64, 0x32, 0x28, 0x59, 0x10, 0x63, 0xc6, 0x4e, 0xc8, 0xbe, 0x98, 0x46, + 0x15, 0x42, 0x5d, 0xec, 0x7b, 0x9f, 0xfb, 0xbe, 0xf7, 0xbd, 0x77, 0xef, 0xe0, 0xde, 0xcc, 0x57, + 0x29, 0x56, 0x09, 0x17, 0xcc, 0xd7, 0xf3, 0x29, 0x55, 0xe6, 0xeb, 0x4d, 0x73, 0xa9, 0xa5, 0x65, + 0x8f, 0xa4, 0xca, 0xa4, 0x8a, 0x14, 0x99, 0x78, 0x33, 0xaf, 0x11, 0x7a, 0xa7, 0xcf, 0x7a, 0x4f, + 0x75, 0xc2, 0x73, 0x12, 0x4d, 0x71, 0xae, 0xe7, 0x7e, 0x2d, 0xf6, 0x99, 0x64, 0xf2, 0x7a, 0x65, + 0x2a, 0xf4, 0x10, 0x93, 0x92, 0xa5, 0xd4, 0x48, 0xe2, 0x62, 0xec, 0x6b, 0x9e, 0x51, 0xa5, 0x71, + 0x36, 0x35, 0x02, 0xf7, 0x0b, 0x80, 0x0f, 0xde, 0x2a, 0x76, 0x2c, 0x3e, 0x63, 0x9e, 0x5a, 0x05, + 0xdc, 0x39, 0xc5, 0x29, 0x27, 0x58, 0xcb, 0x3c, 0xc2, 0x84, 0xe4, 0x36, 0xe8, 0x83, 0x41, 0x37, + 0x78, 0xf7, 0xbb, 0x44, 0xf7, 0xab, 0x98, 0x2a, 0xb5, 0x2a, 0xd1, 0xce, 0x1c, 0x67, 0xe9, 0xd0, + 0x5d, 0x03, 0xf7, 0xaa, 0x44, 0xfb, 0x8c, 0xeb, 0xa4, 0x88, 0xbd, 0x91, 0xcc, 0x7c, 0x73, 0xe8, + 0xf5, 0x6f, 0x5f, 0x91, 0xc9, 0xba, 0xa7, 0x13, 0x9c, 0xbe, 0x30, 0x19, 0xe1, 0xc3, 0xbf, 0x2e, + 0x15, 0x71, 0xbf, 0xb5, 0xe1, 0xa3, 0x93, 0x86, 0x7c, 0xe0, 0x4c, 0x70, 0xc1, 0x5e, 0x8b, 0xb1, + 0xb4, 0xde, 0xc0, 0xc6, 0x75, 0x7d, 0x90, 0x83, 0xab, 0x12, 0x79, 0xb7, 0xf0, 0x3a, 0x94, 0x42, + 0x35, 0x66, 0x4d, 0x09, 0x6b, 0x08, 0xbb, 0x4a, 0xe3, 0x5c, 0x47, 0x09, 0xe5, 0x2c, 0xd1, 0xf6, + 0x9d, 0x3e, 0x18, 0xb4, 0x83, 0x27, 0xab, 0x12, 0xed, 0x9a, 0x86, 0x36, 0x77, 0xdd, 0xb0, 0x53, + 0x87, 0xaf, 0xea, 0xa8, 0xca, 0xe5, 0x82, 0xd0, 0x59, 0x24, 0xc7, 0x63, 0x45, 0xb5, 0xdd, 0xbe, + 0x99, 0xbb, 0xb9, 0xeb, 0x86, 0x9d, 0x3a, 0x7c, 0x5f, 0x47, 0xd6, 0x27, 0xd8, 0xad, 0x6e, 0x97, + 0x92, 0xa8, 0x10, 0x9a, 0xa7, 0xf6, 0xdd, 0x3e, 0x18, 0x74, 0x0e, 0x7a, 0x9e, 0x99, 0x8d, 0xd7, + 0xcc, 0xc6, 0x3b, 0x6a, 0x66, 0x13, 0xa0, 0x8b, 0x12, 0xb5, 0xae, 0x6b, 0x6f, 0x66, 0xbb, 0x67, + 0x3f, 0x10, 0x08, 0x3b, 0x06, 0x1d, 0x57, 0xc4, 0x72, 0x20, 0xd4, 0x32, 0x8b, 0x95, 0x96, 0x82, + 0x12, 0xfb, 0x5e, 0x1f, 0x0c, 0xb6, 0xc3, 0x0d, 0x62, 0x1d, 0xc1, 0xc7, 0x19, 0x57, 0x8a, 0x92, + 0x28, 0x4e, 0xe5, 0x68, 0xa2, 0xa2, 0x91, 0x2c, 0x84, 0xa6, 0xb9, 0xbd, 0x55, 0x37, 0xd1, 0x5f, + 0x95, 0x68, 0xcf, 0x18, 0xfd, 0x53, 0xe6, 0x86, 0xbb, 0x86, 0x07, 0x35, 0x3e, 0x34, 0x74, 0xb8, + 0xfd, 0xf5, 0x1c, 0xb5, 0x7e, 0x9d, 0x23, 0x10, 0xbc, 0xbc, 0x58, 0x38, 0xe0, 0x72, 0xe1, 0x80, + 0x9f, 0x0b, 0x07, 0x9c, 0x2d, 0x9d, 0xd6, 0xe5, 0xd2, 0x69, 0x7d, 0x5f, 0x3a, 0xad, 0x8f, 0xff, + 0x7f, 0x16, 0x37, 0xdf, 0x7e, 0xbc, 0x55, 0x5f, 0xc5, 0xf3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, + 0xf7, 0x43, 0x16, 0x33, 0x16, 0x03, 0x00, 0x00, } func (this *ValidatorSigningInfo) Equal(that interface{}) bool { diff --git a/x/staking/keeper/test_common.go b/x/staking/keeper/test_common.go index 18a0dfc509ca..3e83a310bf64 100644 --- a/x/staking/keeper/test_common.go +++ b/x/staking/keeper/test_common.go @@ -133,7 +133,7 @@ func CreateTestInput(t *testing.T, isCheckTx bool, initPower int64) (sdk.Context ) bk := bank.NewBaseKeeper( - cdc, + appCodec, bankKey, accountKeeper, pk.Subspace(bank.DefaultParamspace),