diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index e9d0d2baa087..976ac1f525ee 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -467,7 +467,7 @@ func (app *BaseApp) cacheTxContext(ctx sdk.Context, txBytes []byte) (sdk.Context // Note, gas execution info is always returned. A reference to a Result is // returned if the tx does not run out of gas and if all the messages are valid // and execute successfully. An error is returned otherwise. -func (app *BaseApp) runTx(mode runTxMode, txBytes []byte, tx sdk.Tx) (gInfo sdk.GasInfo, result *sdk.Result, err error) { +func (app *BaseApp) runTx(mode runTxMode, txBytes []byte, tx sdk.TxI) (gInfo sdk.GasInfo, result *sdk.Result, err error) { // NOTE: GasWanted should be returned by the AnteHandler. GasUsed is // determined by the GasMeter. We need access to the context to get the gas // meter so we initialize upfront. diff --git a/baseapp/baseapp_test.go b/baseapp/baseapp_test.go index 79d6cb5f5ab5..75c76b29df95 100644 --- a/baseapp/baseapp_test.go +++ b/baseapp/baseapp_test.go @@ -648,7 +648,7 @@ func (msg msgCounter2) ValidateBasic() error { // amino decode func testTxDecoder(cdc *codec.Codec) sdk.TxDecoder { - return func(txBytes []byte) (sdk.Tx, error) { + return func(txBytes []byte) (sdk.TxI, error) { var tx txTest if len(txBytes) == 0 { return nil, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "tx bytes are empty") @@ -664,7 +664,7 @@ func testTxDecoder(cdc *codec.Codec) sdk.TxDecoder { } func anteHandlerTxTest(t *testing.T, capKey sdk.StoreKey, storeKey []byte) sdk.AnteHandler { - return func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + return func(ctx sdk.Context, tx sdk.TxI, simulate bool) (newCtx sdk.Context, err error) { newCtx = ctx.WithEventManager(sdk.NewEventManager()) store := newCtx.KVStore(capKey) txTest := tx.(txTest) @@ -942,7 +942,7 @@ func TestSimulateTx(t *testing.T) { gasConsumed := uint64(5) anteOpt := func(bapp *BaseApp) { - bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.TxI, simulate bool) (newCtx sdk.Context, err error) { newCtx = ctx.WithGasMeter(sdk.NewGasMeter(gasConsumed)) return }) @@ -1008,7 +1008,7 @@ func TestSimulateTx(t *testing.T) { func TestRunInvalidTransaction(t *testing.T) { anteOpt := func(bapp *BaseApp) { - bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.TxI, simulate bool) (newCtx sdk.Context, err error) { return }) } @@ -1111,7 +1111,7 @@ func TestRunInvalidTransaction(t *testing.T) { func TestTxGasLimits(t *testing.T) { gasGranted := uint64(10) anteOpt := func(bapp *BaseApp) { - bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.TxI, simulate bool) (newCtx sdk.Context, err error) { newCtx = ctx.WithGasMeter(sdk.NewGasMeter(gasGranted)) // AnteHandlers must have their own defer/recover in order for the BaseApp @@ -1199,7 +1199,7 @@ func TestTxGasLimits(t *testing.T) { func TestMaxBlockGasLimits(t *testing.T) { gasGranted := uint64(10) anteOpt := func(bapp *BaseApp) { - bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.TxI, simulate bool) (newCtx sdk.Context, err error) { newCtx = ctx.WithGasMeter(sdk.NewGasMeter(gasGranted)) defer func() { @@ -1368,7 +1368,7 @@ func TestBaseAppAnteHandler(t *testing.T) { func TestGasConsumptionBadTx(t *testing.T) { gasWanted := uint64(5) anteOpt := func(bapp *BaseApp) { - bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.TxI, simulate bool) (newCtx sdk.Context, err error) { newCtx = ctx.WithGasMeter(sdk.NewGasMeter(gasWanted)) defer func() { @@ -1439,7 +1439,7 @@ func TestGasConsumptionBadTx(t *testing.T) { func TestQuery(t *testing.T) { key, value := []byte("hello"), []byte("goodbye") anteOpt := func(bapp *BaseApp) { - bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.TxI, simulate bool) (newCtx sdk.Context, err error) { store := ctx.KVStore(capKey1) store.Set(key, value) return diff --git a/baseapp/helpers.go b/baseapp/helpers.go index 085d6b4ed642..b8ca928406cf 100644 --- a/baseapp/helpers.go +++ b/baseapp/helpers.go @@ -10,15 +10,15 @@ import ( var isAlphaNumeric = regexp.MustCompile(`^[a-zA-Z0-9]+$`).MatchString -func (app *BaseApp) Check(tx sdk.Tx) (sdk.GasInfo, *sdk.Result, error) { +func (app *BaseApp) Check(tx sdk.TxI) (sdk.GasInfo, *sdk.Result, error) { return app.runTx(runTxModeCheck, nil, tx) } -func (app *BaseApp) Simulate(txBytes []byte, tx sdk.Tx) (sdk.GasInfo, *sdk.Result, error) { +func (app *BaseApp) Simulate(txBytes []byte, tx sdk.TxI) (sdk.GasInfo, *sdk.Result, error) { return app.runTx(runTxModeSimulate, txBytes, tx) } -func (app *BaseApp) Deliver(tx sdk.Tx) (sdk.GasInfo, *sdk.Result, error) { +func (app *BaseApp) Deliver(tx sdk.TxI) (sdk.GasInfo, *sdk.Result, error) { return app.runTx(runTxModeDeliver, nil, tx) } diff --git a/client/tx/tx.go b/client/tx/tx.go index 7ae89d0aff53..f87a135586f3 100644 --- a/client/tx/tx.go +++ b/client/tx/tx.go @@ -32,7 +32,7 @@ type ( } ClientFee interface { - sdk.Fee + sdk.FeeI SetGas(uint64) SetAmount(sdk.Coins) } @@ -48,13 +48,13 @@ type ( // signatures, and provide canonical bytes to sign over. The transaction must // also know how to encode itself. ClientTx interface { - sdk.Tx + sdk.TxI codec.ProtoMarshaler SetMsgs(...sdk.Msg) error GetSignatures() []sdk.Signature SetSignatures(...ClientSignature) error - GetFee() sdk.Fee + GetFee() sdk.FeeI SetFee(ClientFee) error GetMemo() string SetMemo(string) diff --git a/server/mock/tx.go b/server/mock/tx.go index 27441051ce8a..beec27133a01 100644 --- a/server/mock/tx.go +++ b/server/mock/tx.go @@ -16,7 +16,7 @@ type kvstoreTx struct { bytes []byte } -var _ sdk.Tx = kvstoreTx{} +var _ sdk.TxI = kvstoreTx{} func NewTx(key, value string) kvstoreTx { bytes := fmt.Sprintf("%s=%s", key, value) @@ -58,8 +58,8 @@ func (tx kvstoreTx) GetSigners() []sdk.AccAddress { // takes raw transaction bytes and decodes them into an sdk.Tx. An sdk.Tx has // all the signatures and can be used to authenticate. -func decodeTx(txBytes []byte) (sdk.Tx, error) { - var tx sdk.Tx +func decodeTx(txBytes []byte) (sdk.TxI, error) { + var tx sdk.TxI split := bytes.Split(txBytes, []byte("=")) if len(split) == 1 { diff --git a/std/tx.go b/std/tx.go index 8b922f637938..a6f709eb56cf 100644 --- a/std/tx.go +++ b/std/tx.go @@ -1,7 +1,7 @@ package std import ( - "github.com/tendermint/go-amino" + amino "github.com/tendermint/go-amino" "github.com/tendermint/tendermint/crypto" clientx "github.com/cosmos/cosmos-sdk/client/tx" @@ -11,7 +11,7 @@ import ( ) var ( - _ sdk.Tx = (*Transaction)(nil) + _ sdk.TxI = (*Transaction)(nil) _ clientx.ClientTx = (*Transaction)(nil) _ clientx.Generator = TxGenerator{} _ clientx.ClientFee = &StdFee{} @@ -147,7 +147,7 @@ func (tx *Transaction) SetSignatures(sdkSigs ...clientx.ClientSignature) error { } // GetFee returns the transaction's fee. -func (tx Transaction) GetFee() sdk.Fee { +func (tx Transaction) GetFee() sdk.FeeI { return tx.Fee } diff --git a/tests/mocks/types_handler.go b/tests/mocks/types_handler.go index da80614ae884..4025236a5c91 100644 --- a/tests/mocks/types_handler.go +++ b/tests/mocks/types_handler.go @@ -34,7 +34,7 @@ func (m *MockAnteDecorator) EXPECT() *MockAnteDecoratorMockRecorder { } // AnteHandle mocks base method -func (m *MockAnteDecorator) AnteHandle(ctx types.Context, tx types.Tx, simulate bool, next types.AnteHandler) (types.Context, error) { +func (m *MockAnteDecorator) AnteHandle(ctx types.Context, tx types.TxI, simulate bool, next types.AnteHandler) (types.Context, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AnteHandle", ctx, tx, simulate, next) ret0, _ := ret[0].(types.Context) diff --git a/types/codec.go b/types/codec.go index c00d95b2ee84..65e9b6e084ad 100644 --- a/types/codec.go +++ b/types/codec.go @@ -11,7 +11,7 @@ import ( // Register the sdk message type func RegisterCodec(cdc *codec.Codec) { cdc.RegisterInterface((*Msg)(nil), nil) - cdc.RegisterInterface((*Tx)(nil), nil) + cdc.RegisterInterface((*TxI)(nil), nil) } // Register the sdk message type diff --git a/types/config_test.go b/types/config_test.go index df208e32f361..512ed107c99c 100644 --- a/types/config_test.go +++ b/types/config_test.go @@ -24,9 +24,9 @@ func TestConfig_SetTxEncoder(t *testing.T) { mockErr := errors.New("test") config := sdk.NewConfig() require.Nil(t, config.GetTxEncoder()) - encFunc := sdk.TxEncoder(func(tx sdk.Tx) ([]byte, error) { return nil, nil }) + encFunc := sdk.TxEncoder(func(tx sdk.TxI) ([]byte, error) { return nil, nil }) config.SetTxEncoder(encFunc) - _, err := config.GetTxEncoder()(sdk.Tx(nil)) + _, err := config.GetTxEncoder()(sdk.TxI(nil)) require.Error(t, mockErr, err) config.Seal() diff --git a/types/handler.go b/types/handler.go index 03d1f02d5806..62e6072fb34e 100644 --- a/types/handler.go +++ b/types/handler.go @@ -5,11 +5,11 @@ type Handler func(ctx Context, msg Msg) (*Result, error) // AnteHandler authenticates transactions, before their internal messages are handled. // If newCtx.IsZero(), ctx is used instead. -type AnteHandler func(ctx Context, tx Tx, simulate bool) (newCtx Context, err error) +type AnteHandler func(ctx Context, tx TxI, simulate bool) (newCtx Context, err error) // AnteDecorator wraps the next AnteHandler to perform custom pre- and post-processing. type AnteDecorator interface { - AnteHandle(ctx Context, tx Tx, simulate bool, next AnteHandler) (newCtx Context, err error) + AnteHandle(ctx Context, tx TxI, simulate bool, next AnteHandler) (newCtx Context, err error) } // ChainDecorator chains AnteDecorators together with each AnteDecorator @@ -36,7 +36,7 @@ func ChainAnteDecorators(chain ...AnteDecorator) AnteHandler { chain = append(chain, Terminator{}) } - return func(ctx Context, tx Tx, simulate bool) (Context, error) { + return func(ctx Context, tx TxI, simulate bool) (Context, error) { return chain[0].AnteHandle(ctx, tx, simulate, ChainAnteDecorators(chain[1:]...)) } } @@ -61,6 +61,6 @@ func ChainAnteDecorators(chain ...AnteDecorator) AnteHandler { type Terminator struct{} // Simply return provided Context and nil error -func (t Terminator) AnteHandle(ctx Context, _ Tx, _ bool, _ AnteHandler) (Context, error) { +func (t Terminator) AnteHandle(ctx Context, _ TxI, _ bool, _ AnteHandler) (Context, error) { return ctx, nil } diff --git a/types/handler_test.go b/types/handler_test.go index 670da2fccb55..0470954009b1 100644 --- a/types/handler_test.go +++ b/types/handler_test.go @@ -15,7 +15,7 @@ func TestChainAnteDecorators(t *testing.T) { // test panic require.Nil(t, sdk.ChainAnteDecorators([]sdk.AnteDecorator{}...)) - ctx, tx := sdk.Context{}, sdk.Tx(nil) + ctx, tx := sdk.Context{}, sdk.TxI(nil) mockCtrl := gomock.NewController(t) mockAnteDecorator1 := mocks.NewMockAnteDecorator(mockCtrl) mockAnteDecorator1.EXPECT().AnteHandle(gomock.Eq(ctx), gomock.Eq(tx), true, gomock.Any()).Times(1) diff --git a/types/result.go b/types/result.go index 41fad03b0cff..f7cc38d00443 100644 --- a/types/result.go +++ b/types/result.go @@ -79,12 +79,12 @@ type TxResponse struct { Info string `json:"info,omitempty"` GasWanted int64 `json:"gas_wanted,omitempty"` GasUsed int64 `json:"gas_used,omitempty"` - Tx Tx `json:"tx,omitempty"` + Tx TxI `json:"tx,omitempty"` Timestamp string `json:"timestamp,omitempty"` } // NewResponseResultTx returns a TxResponse given a ResultTx from tendermint -func NewResponseResultTx(res *ctypes.ResultTx, tx Tx, timestamp string) TxResponse { +func NewResponseResultTx(res *ctypes.ResultTx, tx TxI, timestamp string) TxResponse { if res == nil { return TxResponse{} } diff --git a/types/result_test.go b/types/result_test.go index 70f7d98fbbdb..06af4e12db6b 100644 --- a/types/result_test.go +++ b/types/result_test.go @@ -91,12 +91,12 @@ func TestResponseResultTx(t *testing.T) { Info: "info", GasWanted: 100, GasUsed: 90, - Tx: sdk.Tx(nil), + Tx: sdk.TxI(nil), Timestamp: "timestamp", } - require.Equal(t, want, sdk.NewResponseResultTx(resultTx, sdk.Tx(nil), "timestamp")) - require.Equal(t, sdk.TxResponse{}, sdk.NewResponseResultTx(nil, sdk.Tx(nil), "timestamp")) + require.Equal(t, want, sdk.NewResponseResultTx(resultTx, sdk.TxI(nil), "timestamp")) + require.Equal(t, sdk.TxResponse{}, sdk.NewResponseResultTx(nil, sdk.TxI(nil), "timestamp")) require.Equal(t, `Response: Height: 10 TxHash: 74657374 @@ -108,7 +108,7 @@ func TestResponseResultTx(t *testing.T) { GasWanted: 100 GasUsed: 90 Codespace: codespace - Timestamp: timestamp`, sdk.NewResponseResultTx(resultTx, sdk.Tx(nil), "timestamp").String()) + Timestamp: timestamp`, sdk.NewResponseResultTx(resultTx, sdk.TxI(nil), "timestamp").String()) require.True(t, sdk.TxResponse{}.Empty()) require.False(t, want.Empty()) diff --git a/types/tx_msg.go b/types/tx_msg.go index 9123cd9be94a..7eac35522c48 100644 --- a/types/tx_msg.go +++ b/types/tx_msg.go @@ -31,9 +31,9 @@ type ( GetSigners() []AccAddress } - // Fee defines an interface for an application application-defined concrete + // FeeI defines an interface for an application application-defined concrete // transaction type to be able to set and return the transaction fee. - Fee interface { + FeeI interface { GetGas() uint64 GetAmount() Coins } @@ -46,7 +46,7 @@ type ( } // Tx defines the interface a transaction must fulfill. - Tx interface { + TxI interface { // Gets the all the transaction's messages. GetMsgs() []Msg @@ -57,10 +57,10 @@ type ( ) // TxDecoder unmarshals transaction bytes -type TxDecoder func(txBytes []byte) (Tx, error) +type TxDecoder func(txBytes []byte) (TxI, error) // TxEncoder marshals transaction to bytes -type TxEncoder func(tx Tx) ([]byte, error) +type TxEncoder func(tx TxI) ([]byte, error) //__________________________________________________________ diff --git a/types/types.pb.go b/types/types.pb.go index 6b4d9813ab5f..01184a4d631b 100644 --- a/types/types.pb.go +++ b/types/types.pb.go @@ -5,6 +5,7 @@ package types import ( fmt "fmt" + types1 "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" types "github.com/tendermint/tendermint/abci/types" @@ -26,6 +27,37 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +type SignMode int32 + +const ( + SignMode_SIGN_MODE_UNSPECIFIED SignMode = 0 + SignMode_SIGN_MODE_DIRECT SignMode = 1 + SignMode_SIGN_MODE_TEXTUAL SignMode = 2 + SignMode_SIGN_MODE_LEGACY_AMINO_JSON SignMode = 127 +) + +var SignMode_name = map[int32]string{ + 0: "SIGN_MODE_UNSPECIFIED", + 1: "SIGN_MODE_DIRECT", + 2: "SIGN_MODE_TEXTUAL", + 127: "SIGN_MODE_LEGACY_AMINO_JSON", +} + +var SignMode_value = map[string]int32{ + "SIGN_MODE_UNSPECIFIED": 0, + "SIGN_MODE_DIRECT": 1, + "SIGN_MODE_TEXTUAL": 2, + "SIGN_MODE_LEGACY_AMINO_JSON": 127, +} + +func (x SignMode) String() string { + return proto.EnumName(SignMode_name, int32(x)) +} + +func (SignMode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{0} +} + // Coin defines a token with a denomination and an amount. // // NOTE: The amount field is an Int which implements the custom method @@ -384,574 +416,3343 @@ func (m *SimulationResponse) GetResult() *Result { return nil } -func init() { - proto.RegisterType((*Coin)(nil), "cosmos_sdk.v1.Coin") - proto.RegisterType((*DecCoin)(nil), "cosmos_sdk.v1.DecCoin") - proto.RegisterType((*IntProto)(nil), "cosmos_sdk.v1.IntProto") - proto.RegisterType((*DecProto)(nil), "cosmos_sdk.v1.DecProto") - proto.RegisterType((*ValAddresses)(nil), "cosmos_sdk.v1.ValAddresses") - proto.RegisterType((*GasInfo)(nil), "cosmos_sdk.v1.GasInfo") - proto.RegisterType((*Result)(nil), "cosmos_sdk.v1.Result") - proto.RegisterType((*SimulationResponse)(nil), "cosmos_sdk.v1.SimulationResponse") +type Tx struct { + Body *TxBody `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + AuthInfo *AuthInfo `protobuf:"bytes,2,opt,name=auth_info,json=authInfo,proto3" json:"auth_info,omitempty"` + Signatures [][]byte `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"` } -func init() { proto.RegisterFile("types/types.proto", fileDescriptor_2c0f90c600ad7e2e) } - -var fileDescriptor_2c0f90c600ad7e2e = []byte{ - // 534 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0x4f, 0x6f, 0xd3, 0x4e, - 0x10, 0xb5, 0x7f, 0xf6, 0x2f, 0x7f, 0x36, 0xe1, 0x4f, 0x17, 0x8a, 0xa2, 0x0a, 0xec, 0xc8, 0x48, - 0x28, 0x48, 0xd4, 0x16, 0x29, 0xa7, 0x70, 0xc2, 0x04, 0x55, 0xe1, 0x84, 0x16, 0x01, 0x12, 0x97, - 0x68, 0xe3, 0xdd, 0xba, 0x56, 0xe3, 0xdd, 0xc8, 0xbb, 0x29, 0xca, 0x2d, 0x47, 0x8e, 0x7c, 0x84, - 0x7e, 0x9c, 0x1e, 0x73, 0xac, 0x10, 0xb2, 0x20, 0xb9, 0x70, 0xee, 0x91, 0x13, 0xda, 0xb5, 0xc1, - 0x6a, 0x7a, 0xe3, 0x92, 0xcc, 0xce, 0xbc, 0x79, 0x33, 0xf3, 0xfc, 0xc0, 0x8e, 0x5c, 0xcc, 0xa8, - 0x08, 0xf4, 0xaf, 0x3f, 0xcb, 0xb8, 0xe4, 0xf0, 0x46, 0xc4, 0x45, 0xca, 0xc5, 0x58, 0x90, 0x13, - 0xff, 0xf4, 0xe9, 0xde, 0x23, 0x79, 0x9c, 0x64, 0x64, 0x3c, 0xc3, 0x99, 0x5c, 0x04, 0x1a, 0x11, - 0xc4, 0x3c, 0xe6, 0x55, 0x54, 0xb4, 0xed, 0x1d, 0x5c, 0xc7, 0x49, 0xca, 0x08, 0xcd, 0xd2, 0x84, - 0xc9, 0x00, 0x4f, 0xa2, 0x24, 0xb8, 0x36, 0xcb, 0x3b, 0x04, 0xf6, 0x4b, 0x9e, 0x30, 0x78, 0x17, - 0xfc, 0x4f, 0x28, 0xe3, 0x69, 0xc7, 0xec, 0x9a, 0xbd, 0x26, 0x2a, 0x1e, 0xf0, 0x21, 0xa8, 0xe1, - 0x94, 0xcf, 0x99, 0xec, 0xfc, 0xa7, 0xd2, 0x61, 0xeb, 0x3c, 0x77, 0x8d, 0xaf, 0xb9, 0x6b, 0x8d, - 0x98, 0x44, 0x65, 0x69, 0x60, 0xff, 0x3c, 0x73, 0x4d, 0xef, 0x35, 0xa8, 0x0f, 0x69, 0xf4, 0x2f, - 0x5c, 0x43, 0x1a, 0x6d, 0x71, 0x3d, 0x06, 0x8d, 0x11, 0x93, 0x6f, 0xb4, 0x18, 0x0f, 0x80, 0x95, - 0x30, 0x59, 0x50, 0x5d, 0x9d, 0xaf, 0xf2, 0x0a, 0x3a, 0xa4, 0xd1, 0x5f, 0x28, 0xa1, 0xd1, 0x36, - 0x54, 0xd1, 0xab, 0xbc, 0x17, 0x82, 0xf6, 0x7b, 0x3c, 0x7d, 0x41, 0x48, 0x46, 0x85, 0xa0, 0x02, - 0x3e, 0x01, 0x4d, 0xfc, 0xe7, 0xd1, 0x31, 0xbb, 0x56, 0xaf, 0x1d, 0xde, 0xfc, 0x95, 0xbb, 0xa0, - 0x02, 0xa1, 0x0a, 0x30, 0xb0, 0x97, 0xdf, 0xba, 0xa6, 0xc7, 0x41, 0xfd, 0x10, 0x8b, 0x11, 0x3b, - 0xe2, 0xf0, 0x19, 0x00, 0x31, 0x16, 0xe3, 0x4f, 0x98, 0x49, 0x4a, 0xf4, 0x50, 0x3b, 0xdc, 0xbd, - 0xcc, 0xdd, 0x9d, 0x05, 0x4e, 0xa7, 0x03, 0xaf, 0xaa, 0x79, 0xa8, 0x19, 0x63, 0xf1, 0x41, 0xc7, - 0xd0, 0x07, 0x0d, 0x55, 0x99, 0x0b, 0x4a, 0xb4, 0x0e, 0x76, 0x78, 0xe7, 0x32, 0x77, 0x6f, 0x55, - 0x3d, 0xaa, 0xe2, 0xa1, 0x7a, 0x8c, 0xc5, 0x3b, 0x15, 0xcd, 0x40, 0x0d, 0x51, 0x31, 0x9f, 0x4a, - 0x08, 0x81, 0x4d, 0xb0, 0xc4, 0x7a, 0x52, 0x1b, 0xe9, 0x18, 0xde, 0x06, 0xd6, 0x94, 0xc7, 0x85, - 0xa0, 0x48, 0x85, 0x70, 0x00, 0x6a, 0xf4, 0x94, 0x32, 0x29, 0x3a, 0x56, 0xd7, 0xea, 0xb5, 0xfa, - 0xf7, 0xfd, 0xca, 0x03, 0xbe, 0xf2, 0x80, 0x5f, 0x7c, 0xfd, 0x57, 0x0a, 0x14, 0xda, 0x4a, 0x24, - 0x54, 0x76, 0x0c, 0xec, 0xcf, 0x67, 0xae, 0xe1, 0x2d, 0x4d, 0x00, 0xdf, 0x26, 0xe9, 0x7c, 0x8a, - 0x65, 0xc2, 0x19, 0xa2, 0x62, 0xc6, 0x99, 0xa0, 0xf0, 0x79, 0xb1, 0x78, 0xc2, 0x8e, 0xb8, 0x5e, - 0xa1, 0xd5, 0xbf, 0xe7, 0x5f, 0xf1, 0xa9, 0x5f, 0x0a, 0x13, 0x36, 0x14, 0xe9, 0x2a, 0x77, 0x4d, - 0x7d, 0x85, 0xd6, 0x6a, 0x1f, 0xd4, 0x32, 0x7d, 0x85, 0x5e, 0xb5, 0xd5, 0xdf, 0xdd, 0x6a, 0x2d, - 0x4e, 0x44, 0x25, 0x28, 0x1c, 0x5e, 0xfc, 0x70, 0x8c, 0xe5, 0xda, 0x31, 0xce, 0xd7, 0x8e, 0xb9, - 0x5a, 0x3b, 0xe6, 0xf7, 0xb5, 0x63, 0x7e, 0xd9, 0x38, 0xc6, 0x6a, 0xe3, 0x18, 0x17, 0x1b, 0xc7, - 0xf8, 0xe8, 0xc5, 0x89, 0x3c, 0x9e, 0x4f, 0xfc, 0x88, 0xa7, 0x41, 0x41, 0x55, 0xfe, 0xed, 0x0b, - 0x72, 0x52, 0x18, 0x7c, 0x52, 0xd3, 0x0e, 0x3f, 0xf8, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x0e, 0xe8, - 0xc3, 0x0c, 0x62, 0x03, 0x00, 0x00, +func (m *Tx) Reset() { *m = Tx{} } +func (*Tx) ProtoMessage() {} +func (*Tx) Descriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{8} } - -func (this *Coin) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Coin) - if !ok { - that2, ok := that.(Coin) - if ok { - that1 = &that2 - } else { - return false +func (m *Tx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Tx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Tx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Denom != that1.Denom { - return false - } - if !this.Amount.Equal(that1.Amount) { - return false - } - return true } -func (this *DecCoin) Equal(that interface{}) bool { - if that == nil { - return this == nil - } +func (m *Tx) XXX_Merge(src proto.Message) { + xxx_messageInfo_Tx.Merge(m, src) +} +func (m *Tx) XXX_Size() int { + return m.Size() +} +func (m *Tx) XXX_DiscardUnknown() { + xxx_messageInfo_Tx.DiscardUnknown(m) +} - that1, ok := that.(*DecCoin) - if !ok { - that2, ok := that.(DecCoin) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Denom != that1.Denom { - return false +var xxx_messageInfo_Tx proto.InternalMessageInfo + +func (m *Tx) GetBody() *TxBody { + if m != nil { + return m.Body } - if !this.Amount.Equal(that1.Amount) { - return false + return nil +} + +func (m *Tx) GetAuthInfo() *AuthInfo { + if m != nil { + return m.AuthInfo } - return true + return nil } -func (m *Coin) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + +func (m *Tx) GetSignatures() [][]byte { + if m != nil { + return m.Signatures } - return dAtA[:n], nil + return nil } -func (m *Coin) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type SignDoc struct { + Body *TxBody `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + AuthInfo *AuthInfo `protobuf:"bytes,2,opt,name=auth_info,json=authInfo,proto3" json:"auth_info,omitempty"` + ChainId string `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + AccountNumber uint64 `protobuf:"varint,4,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` + // account_sequence starts at 1 rather than 0 to avoid the case where + // the default 0 value must be omitted in protobuf serialization + AccountSequence uint64 `protobuf:"varint,5,opt,name=account_sequence,json=accountSequence,proto3" json:"account_sequence,omitempty"` } -func (m *Coin) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err +func (m *SignDoc) Reset() { *m = SignDoc{} } +func (*SignDoc) ProtoMessage() {} +func (*SignDoc) Descriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{9} +} +func (m *SignDoc) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SignDoc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SignDoc.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0xa + return b[:n], nil } - return len(dAtA) - i, nil +} +func (m *SignDoc) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignDoc.Merge(m, src) +} +func (m *SignDoc) XXX_Size() int { + return m.Size() +} +func (m *SignDoc) XXX_DiscardUnknown() { + xxx_messageInfo_SignDoc.DiscardUnknown(m) } -func (m *DecCoin) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +var xxx_messageInfo_SignDoc proto.InternalMessageInfo + +func (m *SignDoc) GetBody() *TxBody { + if m != nil { + return m.Body } - return dAtA[:n], nil + return nil } -func (m *DecCoin) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *SignDoc) GetAuthInfo() *AuthInfo { + if m != nil { + return m.AuthInfo + } + return nil } -func (m *DecCoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTypes(dAtA, i, uint64(size)) +func (m *SignDoc) GetChainId() string { + if m != nil { + return m.ChainId } - i-- - dAtA[i] = 0x12 - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0xa + return "" +} + +func (m *SignDoc) GetAccountNumber() uint64 { + if m != nil { + return m.AccountNumber } - return len(dAtA) - i, nil + return 0 } -func (m *IntProto) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *SignDoc) GetAccountSequence() uint64 { + if m != nil { + return m.AccountSequence } - return dAtA[:n], nil + return 0 } -func (m *IntProto) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type TxBody struct { + Messages []*types1.Any `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` + Memo string `protobuf:"bytes,2,opt,name=memo,proto3" json:"memo,omitempty"` + TimeoutHeight int64 `protobuf:"varint,3,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` + ExtensionOptions []*types1.Any `protobuf:"bytes,1023,rep,name=extension_options,json=extensionOptions,proto3" json:"extension_options,omitempty"` } -func (m *IntProto) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Int.Size() - i -= size - if _, err := m.Int.MarshalTo(dAtA[i:]); err != nil { - return 0, err +func (m *TxBody) Reset() { *m = TxBody{} } +func (*TxBody) ProtoMessage() {} +func (*TxBody) Descriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{10} +} +func (m *TxBody) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TxBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TxBody.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } - i = encodeVarintTypes(dAtA, i, uint64(size)) + return b[:n], nil } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil +} +func (m *TxBody) XXX_Merge(src proto.Message) { + xxx_messageInfo_TxBody.Merge(m, src) +} +func (m *TxBody) XXX_Size() int { + return m.Size() +} +func (m *TxBody) XXX_DiscardUnknown() { + xxx_messageInfo_TxBody.DiscardUnknown(m) } -func (m *DecProto) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +var xxx_messageInfo_TxBody proto.InternalMessageInfo + +func (m *TxBody) GetMessages() []*types1.Any { + if m != nil { + return m.Messages } - return dAtA[:n], nil + return nil } -func (m *DecProto) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *TxBody) GetMemo() string { + if m != nil { + return m.Memo + } + return "" } -func (m *DecProto) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Dec.Size() - i -= size - if _, err := m.Dec.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTypes(dAtA, i, uint64(size)) +func (m *TxBody) GetTimeoutHeight() int64 { + if m != nil { + return m.TimeoutHeight } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return 0 } -func (m *ValAddresses) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *TxBody) GetExtensionOptions() []*types1.Any { + if m != nil { + return m.ExtensionOptions } - return dAtA[:n], nil + return nil } -func (m *ValAddresses) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type AuthInfo struct { + SignerInfos []*SignerInfo `protobuf:"bytes,1,rep,name=signer_infos,json=signerInfos,proto3" json:"signer_infos,omitempty"` + // The first signer is the primary signer and the one which pays the fee + Fee *Fee `protobuf:"bytes,2,opt,name=fee,proto3" json:"fee,omitempty"` } -func (m *ValAddresses) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Addresses) > 0 { - for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Addresses[iNdEx]) - copy(dAtA[i:], m.Addresses[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Addresses[iNdEx]))) - i-- - dAtA[i] = 0xa +func (m *AuthInfo) Reset() { *m = AuthInfo{} } +func (*AuthInfo) ProtoMessage() {} +func (*AuthInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{11} +} +func (m *AuthInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AuthInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AuthInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - return len(dAtA) - i, nil } - -func (m *GasInfo) 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 *AuthInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_AuthInfo.Merge(m, src) } - -func (m *GasInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *AuthInfo) XXX_Size() int { + return m.Size() +} +func (m *AuthInfo) XXX_DiscardUnknown() { + xxx_messageInfo_AuthInfo.DiscardUnknown(m) } -func (m *GasInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.GasUsed != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.GasUsed)) - i-- - dAtA[i] = 0x10 - } - if m.GasWanted != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.GasWanted)) - i-- - dAtA[i] = 0x8 +var xxx_messageInfo_AuthInfo proto.InternalMessageInfo + +func (m *AuthInfo) GetSignerInfos() []*SignerInfo { + if m != nil { + return m.SignerInfos } - return len(dAtA) - i, nil + return nil } -func (m *Result) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *AuthInfo) GetFee() *Fee { + if m != nil { + return m.Fee } - return dAtA[:n], nil + return nil } -func (m *Result) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type SignerInfo struct { + // PublicKey key is optional for accounts that already exist in state + PublicKey *types1.Any `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // ModeInfo describes the signing mode of the signer and is a nested + // structure to support nested multisig pubkey's + ModeInfo *ModeInfo `protobuf:"bytes,2,opt,name=mode_info,json=modeInfo,proto3" json:"mode_info,omitempty"` } -func (m *Result) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Events) > 0 { - for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a +func (m *SignerInfo) Reset() { *m = SignerInfo{} } +func (*SignerInfo) ProtoMessage() {} +func (*SignerInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{12} +} +func (m *SignerInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SignerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SignerInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if len(m.Log) > 0 { - i -= len(m.Log) - copy(dAtA[i:], m.Log) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Log))) - i-- - dAtA[i] = 0x12 - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0xa +} +func (m *SignerInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignerInfo.Merge(m, src) +} +func (m *SignerInfo) XXX_Size() int { + return m.Size() +} +func (m *SignerInfo) XXX_DiscardUnknown() { + xxx_messageInfo_SignerInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_SignerInfo proto.InternalMessageInfo + +func (m *SignerInfo) GetPublicKey() *types1.Any { + if m != nil { + return m.PublicKey } - return len(dAtA) - i, nil + return nil } -func (m *SimulationResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *SignerInfo) GetModeInfo() *ModeInfo { + if m != nil { + return m.ModeInfo } - return dAtA[:n], nil + return nil } -func (m *SimulationResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type ModeInfo struct { + // Types that are valid to be assigned to Sum: + // *ModeInfo_Single_ + // *ModeInfo_Multi_ + Sum isModeInfo_Sum `protobuf_oneof:"sum"` } -func (m *SimulationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Result != nil { - { - size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - { - size, err := m.GasInfo.MarshalToSizedBuffer(dAtA[:i]) +func (m *ModeInfo) Reset() { *m = ModeInfo{} } +func (*ModeInfo) ProtoMessage() {} +func (*ModeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{13} +} +func (m *ModeInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModeInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) if err != nil { - return 0, err + return nil, err } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + return b[:n], nil } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil +} +func (m *ModeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModeInfo.Merge(m, src) +} +func (m *ModeInfo) XXX_Size() int { + return m.Size() +} +func (m *ModeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ModeInfo.DiscardUnknown(m) } -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 +var xxx_messageInfo_ModeInfo proto.InternalMessageInfo + +type isModeInfo_Sum interface { + isModeInfo_Sum() + MarshalTo([]byte) (int, error) + Size() int } -func (m *Coin) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = m.Amount.Size() - n += 1 + l + sovTypes(uint64(l)) - return n + +type ModeInfo_Single_ struct { + Single *ModeInfo_Single `protobuf:"bytes,1,opt,name=single,proto3,oneof" json:"single,omitempty"` +} +type ModeInfo_Multi_ struct { + Multi *ModeInfo_Multi `protobuf:"bytes,2,opt,name=multi,proto3,oneof" json:"multi,omitempty"` } -func (m *DecCoin) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) +func (*ModeInfo_Single_) isModeInfo_Sum() {} +func (*ModeInfo_Multi_) isModeInfo_Sum() {} + +func (m *ModeInfo) GetSum() isModeInfo_Sum { + if m != nil { + return m.Sum } - l = m.Amount.Size() - n += 1 + l + sovTypes(uint64(l)) - return n + return nil } -func (m *IntProto) Size() (n int) { - if m == nil { - return 0 +func (m *ModeInfo) GetSingle() *ModeInfo_Single { + if x, ok := m.GetSum().(*ModeInfo_Single_); ok { + return x.Single } - var l int - _ = l - l = m.Int.Size() - n += 1 + l + sovTypes(uint64(l)) - return n + return nil } -func (m *DecProto) Size() (n int) { - if m == nil { - return 0 +func (m *ModeInfo) GetMulti() *ModeInfo_Multi { + if x, ok := m.GetSum().(*ModeInfo_Multi_); ok { + return x.Multi } - var l int - _ = l - l = m.Dec.Size() - n += 1 + l + sovTypes(uint64(l)) - return n + return nil } -func (m *ValAddresses) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Addresses) > 0 { - for _, b := range m.Addresses { - l = len(b) - n += 1 + l + sovTypes(uint64(l)) - } +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ModeInfo) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ModeInfo_Single_)(nil), + (*ModeInfo_Multi_)(nil), } - return n } -func (m *GasInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.GasWanted != 0 { - n += 1 + sovTypes(uint64(m.GasWanted)) +// Single is the mode info for a single signer. It is structured as a message +// to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the future +type ModeInfo_Single struct { + Mode SignMode `protobuf:"varint,1,opt,name=mode,proto3,enum=cosmos_sdk.v1.SignMode" json:"mode,omitempty"` +} + +func (m *ModeInfo_Single) Reset() { *m = ModeInfo_Single{} } +func (*ModeInfo_Single) ProtoMessage() {} +func (*ModeInfo_Single) Descriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{13, 0} +} +func (m *ModeInfo_Single) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModeInfo_Single) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModeInfo_Single.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - if m.GasUsed != 0 { - n += 1 + sovTypes(uint64(m.GasUsed)) +} +func (m *ModeInfo_Single) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModeInfo_Single.Merge(m, src) +} +func (m *ModeInfo_Single) XXX_Size() int { + return m.Size() +} +func (m *ModeInfo_Single) XXX_DiscardUnknown() { + xxx_messageInfo_ModeInfo_Single.DiscardUnknown(m) +} + +var xxx_messageInfo_ModeInfo_Single proto.InternalMessageInfo + +func (m *ModeInfo_Single) GetMode() SignMode { + if m != nil { + return m.Mode } - return n + return SignMode_SIGN_MODE_UNSPECIFIED } -func (m *Result) Size() (n int) { - if m == nil { - return 0 +// Multi is the mode info for a multisig public key +type ModeInfo_Multi struct { + // bitarray specifies which keys within the multisig are signing + Bitarray *CompactBitArray `protobuf:"bytes,1,opt,name=bitarray,proto3" json:"bitarray,omitempty"` + // mode_infos is the corresponding modes of the signers of the multisig + // which could include nested multisig public keys + ModeInfos []*ModeInfo `protobuf:"bytes,2,rep,name=mode_infos,json=modeInfos,proto3" json:"mode_infos,omitempty"` +} + +func (m *ModeInfo_Multi) Reset() { *m = ModeInfo_Multi{} } +func (*ModeInfo_Multi) ProtoMessage() {} +func (*ModeInfo_Multi) Descriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{13, 1} +} +func (m *ModeInfo_Multi) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModeInfo_Multi) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModeInfo_Multi.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 *ModeInfo_Multi) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModeInfo_Multi.Merge(m, src) +} +func (m *ModeInfo_Multi) XXX_Size() int { + return m.Size() +} +func (m *ModeInfo_Multi) XXX_DiscardUnknown() { + xxx_messageInfo_ModeInfo_Multi.DiscardUnknown(m) +} + +var xxx_messageInfo_ModeInfo_Multi proto.InternalMessageInfo + +func (m *ModeInfo_Multi) GetBitarray() *CompactBitArray { + if m != nil { + return m.Bitarray + } + return nil +} + +func (m *ModeInfo_Multi) GetModeInfos() []*ModeInfo { + if m != nil { + return m.ModeInfos + } + return nil +} + +// Fee 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. +type Fee struct { + Amount Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=Coins" json:"amount"` + GasLimit uint64 `protobuf:"varint,2,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` +} + +func (m *Fee) Reset() { *m = Fee{} } +func (*Fee) ProtoMessage() {} +func (*Fee) Descriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{14} +} +func (m *Fee) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Fee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Fee.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 *Fee) XXX_Merge(src proto.Message) { + xxx_messageInfo_Fee.Merge(m, src) +} +func (m *Fee) XXX_Size() int { + return m.Size() +} +func (m *Fee) XXX_DiscardUnknown() { + xxx_messageInfo_Fee.DiscardUnknown(m) +} + +var xxx_messageInfo_Fee proto.InternalMessageInfo + +// CompactBitArray is an implementation of a space efficient bit array. +// This is used to ensure that the encoded data takes up a minimal amount of +// space after proto encoding. +// This is not thread safe, and is not intended for concurrent usage. +type CompactBitArray struct { + ExtraBitsStored uint32 `protobuf:"varint,1,opt,name=extra_bits_stored,json=extraBitsStored,proto3" json:"extra_bits_stored,omitempty"` + Elems []byte `protobuf:"bytes,2,opt,name=elems,proto3" json:"elems,omitempty"` +} + +func (m *CompactBitArray) Reset() { *m = CompactBitArray{} } +func (*CompactBitArray) ProtoMessage() {} +func (*CompactBitArray) Descriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{15} +} +func (m *CompactBitArray) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CompactBitArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CompactBitArray.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 *CompactBitArray) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompactBitArray.Merge(m, src) +} +func (m *CompactBitArray) XXX_Size() int { + return m.Size() +} +func (m *CompactBitArray) XXX_DiscardUnknown() { + xxx_messageInfo_CompactBitArray.DiscardUnknown(m) +} + +var xxx_messageInfo_CompactBitArray proto.InternalMessageInfo + +func (m *CompactBitArray) GetExtraBitsStored() uint32 { + if m != nil { + return m.ExtraBitsStored + } + return 0 +} + +func (m *CompactBitArray) GetElems() []byte { + if m != nil { + return m.Elems + } + return nil +} + +func init() { + proto.RegisterEnum("cosmos_sdk.v1.SignMode", SignMode_name, SignMode_value) + proto.RegisterType((*Coin)(nil), "cosmos_sdk.v1.Coin") + proto.RegisterType((*DecCoin)(nil), "cosmos_sdk.v1.DecCoin") + proto.RegisterType((*IntProto)(nil), "cosmos_sdk.v1.IntProto") + proto.RegisterType((*DecProto)(nil), "cosmos_sdk.v1.DecProto") + proto.RegisterType((*ValAddresses)(nil), "cosmos_sdk.v1.ValAddresses") + proto.RegisterType((*GasInfo)(nil), "cosmos_sdk.v1.GasInfo") + proto.RegisterType((*Result)(nil), "cosmos_sdk.v1.Result") + proto.RegisterType((*SimulationResponse)(nil), "cosmos_sdk.v1.SimulationResponse") + proto.RegisterType((*Tx)(nil), "cosmos_sdk.v1.Tx") + proto.RegisterType((*SignDoc)(nil), "cosmos_sdk.v1.SignDoc") + proto.RegisterType((*TxBody)(nil), "cosmos_sdk.v1.TxBody") + proto.RegisterType((*AuthInfo)(nil), "cosmos_sdk.v1.AuthInfo") + proto.RegisterType((*SignerInfo)(nil), "cosmos_sdk.v1.SignerInfo") + proto.RegisterType((*ModeInfo)(nil), "cosmos_sdk.v1.ModeInfo") + proto.RegisterType((*ModeInfo_Single)(nil), "cosmos_sdk.v1.ModeInfo.Single") + proto.RegisterType((*ModeInfo_Multi)(nil), "cosmos_sdk.v1.ModeInfo.Multi") + proto.RegisterType((*Fee)(nil), "cosmos_sdk.v1.Fee") + proto.RegisterType((*CompactBitArray)(nil), "cosmos_sdk.v1.CompactBitArray") +} + +func init() { proto.RegisterFile("types/types.proto", fileDescriptor_2c0f90c600ad7e2e) } + +var fileDescriptor_2c0f90c600ad7e2e = []byte{ + // 1181 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x73, 0x1b, 0x45, + 0x13, 0xd6, 0x5a, 0xb2, 0x2c, 0xb7, 0xe5, 0x58, 0x9e, 0xc4, 0xef, 0x2b, 0x3b, 0x44, 0x72, 0x89, + 0x8f, 0x4a, 0x02, 0x59, 0x81, 0x13, 0x28, 0x4a, 0xe1, 0xa2, 0xb5, 0x14, 0x47, 0x21, 0xb6, 0x53, + 0x23, 0x07, 0x08, 0x97, 0xad, 0xd5, 0xee, 0x78, 0x35, 0x15, 0xed, 0x8e, 0xd8, 0x99, 0x0d, 0xd1, + 0x81, 0x22, 0xdc, 0xa8, 0xe2, 0xc2, 0x4f, 0xc8, 0x99, 0x3f, 0xc1, 0x35, 0xdc, 0x72, 0x4c, 0x51, + 0x60, 0xc0, 0xbe, 0x70, 0xce, 0x91, 0x0b, 0xd4, 0x7c, 0xc8, 0x22, 0x32, 0xce, 0x81, 0x2a, 0x2e, + 0xab, 0x9e, 0xee, 0x67, 0xfa, 0xe3, 0x99, 0x9e, 0x1e, 0xc1, 0xb2, 0x18, 0x0d, 0x09, 0xaf, 0xab, + 0xaf, 0x3d, 0x4c, 0x98, 0x60, 0x68, 0xd1, 0x67, 0x3c, 0x62, 0xdc, 0xe5, 0xc1, 0x7d, 0xfb, 0xc1, + 0x3b, 0x6b, 0x6f, 0x88, 0x3e, 0x4d, 0x02, 0x77, 0xe8, 0x25, 0x62, 0x54, 0x57, 0x88, 0x7a, 0xc8, + 0x42, 0x36, 0x91, 0xf4, 0xb6, 0xb5, 0xab, 0x27, 0x71, 0x82, 0xc4, 0x01, 0x49, 0x22, 0x1a, 0x8b, + 0xba, 0xd7, 0xf3, 0x69, 0xfd, 0x44, 0xac, 0xb5, 0xd5, 0x90, 0xb1, 0x70, 0x40, 0x34, 0xbe, 0x97, + 0xee, 0xd7, 0xbd, 0x78, 0xa4, 0x4d, 0xb5, 0x2d, 0xc8, 0x6d, 0x32, 0x1a, 0xa3, 0x73, 0x30, 0x1b, + 0x90, 0x98, 0x45, 0x65, 0x6b, 0xdd, 0xba, 0x38, 0x8f, 0xf5, 0x02, 0xbd, 0x0a, 0x79, 0x2f, 0x62, + 0x69, 0x2c, 0xca, 0x33, 0x52, 0xed, 0x2c, 0x3c, 0x39, 0xa8, 0x66, 0x7e, 0x3c, 0xa8, 0x66, 0x3b, + 0xb1, 0xc0, 0xc6, 0xd4, 0xc8, 0xfd, 0xfe, 0xb8, 0x6a, 0xd5, 0x6e, 0xc1, 0x5c, 0x8b, 0xf8, 0xff, + 0xc6, 0x57, 0x8b, 0xf8, 0x53, 0xbe, 0x2e, 0x41, 0xa1, 0x13, 0x8b, 0x3b, 0x8a, 0xa7, 0x0b, 0x90, + 0xa5, 0xb1, 0xd0, 0xae, 0x5e, 0x8c, 0x2f, 0xf5, 0x12, 0xda, 0x22, 0xfe, 0x31, 0x34, 0x20, 0xfe, + 0x34, 0x54, 0xba, 0x97, 0xfa, 0x9a, 0x03, 0xc5, 0x8f, 0xbc, 0x41, 0x33, 0x08, 0x12, 0xc2, 0x39, + 0xe1, 0xe8, 0x2d, 0x98, 0xf7, 0xc6, 0x8b, 0xb2, 0xb5, 0x9e, 0xbd, 0x58, 0x74, 0xce, 0xfc, 0x71, + 0x50, 0x85, 0x09, 0x08, 0x4f, 0x00, 0x8d, 0xdc, 0xa3, 0x9f, 0xd6, 0xad, 0x1a, 0x83, 0xb9, 0x2d, + 0x8f, 0x77, 0xe2, 0x7d, 0x86, 0xae, 0x01, 0x84, 0x1e, 0x77, 0x3f, 0xf7, 0x62, 0x41, 0x02, 0x15, + 0x34, 0xe7, 0xac, 0x3c, 0x3f, 0xa8, 0x2e, 0x8f, 0xbc, 0x68, 0xd0, 0xa8, 0x4d, 0x6c, 0x35, 0x3c, + 0x1f, 0x7a, 0xfc, 0x63, 0x25, 0x23, 0x1b, 0x0a, 0xd2, 0x92, 0x72, 0x12, 0x28, 0x1e, 0x72, 0xce, + 0xd9, 0xe7, 0x07, 0xd5, 0xa5, 0xc9, 0x1e, 0x69, 0xa9, 0xe1, 0xb9, 0xd0, 0xe3, 0x77, 0xa5, 0x34, + 0x84, 0x3c, 0x26, 0x3c, 0x1d, 0x08, 0x84, 0x20, 0x17, 0x78, 0xc2, 0x53, 0x91, 0x8a, 0x58, 0xc9, + 0xa8, 0x04, 0xd9, 0x01, 0x0b, 0x35, 0xa1, 0x58, 0x8a, 0xa8, 0x01, 0x79, 0xf2, 0x80, 0xc4, 0x82, + 0x97, 0xb3, 0xeb, 0xd9, 0x8b, 0x0b, 0x1b, 0xaf, 0xd8, 0x93, 0xf6, 0xb0, 0x65, 0x7b, 0xd8, 0xba, + 0x31, 0xda, 0x12, 0xe4, 0xe4, 0x24, 0x49, 0xd8, 0xec, 0x68, 0xe4, 0xbe, 0x7e, 0x5c, 0xcd, 0xd4, + 0x1e, 0x59, 0x80, 0xba, 0x34, 0x4a, 0x07, 0x9e, 0xa0, 0x2c, 0xc6, 0x84, 0x0f, 0x59, 0xcc, 0x09, + 0xba, 0xae, 0x13, 0xa7, 0xf1, 0x3e, 0x53, 0x29, 0x2c, 0x6c, 0xfc, 0xcf, 0x7e, 0xa1, 0x85, 0x6d, + 0x43, 0x8c, 0x53, 0x90, 0x4e, 0x9f, 0x1e, 0x54, 0x2d, 0x55, 0x85, 0xe2, 0xea, 0x0a, 0xe4, 0x13, + 0x55, 0x85, 0x4a, 0x75, 0x61, 0x63, 0x65, 0x6a, 0xab, 0x2e, 0x11, 0x1b, 0x50, 0xed, 0x1b, 0x0b, + 0x66, 0xf6, 0x1e, 0xa2, 0x4b, 0x90, 0xeb, 0xb1, 0x60, 0x64, 0xc2, 0x4d, 0xef, 0xd9, 0x7b, 0xe8, + 0xb0, 0x60, 0x84, 0x15, 0x04, 0x5d, 0x83, 0x79, 0x2f, 0x15, 0x7d, 0x9d, 0x9e, 0x8e, 0xf1, 0xff, + 0x29, 0x7c, 0x33, 0x15, 0x7d, 0x99, 0x0c, 0x2e, 0x78, 0x46, 0x42, 0x15, 0x00, 0x4e, 0xc3, 0xd8, + 0x13, 0x69, 0x42, 0x34, 0x61, 0x45, 0xfc, 0x37, 0x8d, 0x39, 0xf3, 0x9f, 0x2d, 0x98, 0xeb, 0xd2, + 0x30, 0x6e, 0x31, 0xff, 0xbf, 0x4f, 0x69, 0x15, 0x0a, 0x7e, 0xdf, 0xa3, 0xb1, 0x4b, 0x83, 0x72, + 0x56, 0x1d, 0xeb, 0x9c, 0x5a, 0x77, 0x02, 0xf4, 0x3a, 0x9c, 0xf1, 0x7c, 0x5f, 0x5e, 0x13, 0x37, + 0x4e, 0xa3, 0x1e, 0x49, 0xca, 0x39, 0xd9, 0x40, 0x78, 0xd1, 0x68, 0x77, 0x94, 0x12, 0x5d, 0x82, + 0xd2, 0x18, 0xc6, 0xc9, 0x67, 0x29, 0x89, 0x7d, 0x52, 0x9e, 0x55, 0xc0, 0x25, 0xa3, 0xef, 0x1a, + 0xb5, 0xa9, 0xef, 0x7b, 0x0b, 0xf2, 0x3a, 0x73, 0xf4, 0x36, 0x14, 0x22, 0xc2, 0xb9, 0x17, 0x9a, + 0x1b, 0xb1, 0xb0, 0x71, 0xce, 0xd6, 0xb3, 0xc3, 0x1e, 0xcf, 0x0e, 0xbb, 0x19, 0x8f, 0xf0, 0x31, + 0x4a, 0x76, 0x65, 0x44, 0x22, 0x66, 0x5a, 0x50, 0xc9, 0x32, 0x51, 0x41, 0x23, 0xc2, 0x52, 0xe1, + 0xf6, 0x09, 0x0d, 0xfb, 0x42, 0x55, 0x92, 0xc5, 0x8b, 0x46, 0x7b, 0x53, 0x29, 0x91, 0x03, 0xcb, + 0xe4, 0xa1, 0x20, 0x31, 0xa7, 0x2c, 0x76, 0xd9, 0x50, 0x76, 0x1b, 0x2f, 0xff, 0x39, 0xf7, 0x92, + 0xb0, 0xa5, 0x63, 0xfc, 0xae, 0x86, 0x9b, 0x0a, 0x04, 0x14, 0xc6, 0x54, 0xa2, 0x0f, 0xa0, 0x28, + 0x4f, 0x90, 0x24, 0x8a, 0xf8, 0x71, 0x19, 0xab, 0x53, 0xcc, 0x77, 0x15, 0x44, 0x71, 0xbf, 0xc0, + 0x8f, 0x65, 0x8e, 0x5e, 0x83, 0xec, 0x3e, 0x21, 0xe6, 0xb8, 0xd0, 0xd4, 0xa6, 0x1b, 0x84, 0x60, + 0x69, 0x36, 0x51, 0xbf, 0x00, 0x98, 0xb8, 0x41, 0x57, 0x01, 0x86, 0x69, 0x6f, 0x40, 0x7d, 0xf7, + 0x3e, 0x19, 0xf7, 0xc7, 0x3f, 0x57, 0x31, 0xaf, 0x71, 0x1f, 0x12, 0xd5, 0x23, 0x11, 0x0b, 0xc8, + 0xcb, 0x7a, 0x64, 0x9b, 0x05, 0x44, 0xf7, 0x48, 0x64, 0x24, 0x13, 0xfe, 0x87, 0x19, 0x28, 0x8c, + 0x8d, 0xe8, 0x7d, 0xc8, 0x73, 0x1a, 0x87, 0x03, 0x62, 0x22, 0x57, 0x4e, 0xf1, 0x62, 0x77, 0x15, + 0xea, 0x66, 0x06, 0x1b, 0x3c, 0x7a, 0x17, 0x66, 0xa3, 0x74, 0x20, 0xa8, 0x09, 0x7f, 0xe1, 0xb4, + 0x8d, 0xdb, 0x12, 0x74, 0x33, 0x83, 0x35, 0x7a, 0xed, 0x3a, 0xe4, 0xb5, 0x2b, 0xf4, 0x26, 0xe4, + 0x64, 0x66, 0x2a, 0xf0, 0x99, 0x13, 0xe9, 0x4b, 0x86, 0xa4, 0x0f, 0xac, 0x40, 0x3a, 0xf5, 0xb5, + 0xaf, 0x2c, 0x98, 0x55, 0xfe, 0x50, 0x03, 0x0a, 0x3d, 0x2a, 0xbc, 0x24, 0xf1, 0x46, 0xa7, 0x64, + 0xbe, 0xc9, 0xa2, 0xa1, 0xe7, 0x0b, 0x87, 0x8a, 0xa6, 0x44, 0xe1, 0x63, 0x3c, 0x7a, 0x0f, 0xe0, + 0x98, 0x3c, 0x5e, 0x9e, 0x51, 0xe7, 0x7c, 0x2a, 0x7b, 0xf3, 0x63, 0xf6, 0x4c, 0xcf, 0xe8, 0xaf, + 0x33, 0x0b, 0x59, 0x9e, 0x46, 0xb5, 0x01, 0x64, 0x6f, 0x10, 0x22, 0x87, 0xa7, 0x79, 0xa2, 0x74, + 0xd7, 0x9c, 0x3d, 0x91, 0x0b, 0x8d, 0x9d, 0x45, 0x39, 0xde, 0xbe, 0xfb, 0xa5, 0x3a, 0x2b, 0x57, + 0x7c, 0xfc, 0x72, 0xa1, 0xf3, 0x20, 0xa7, 0xbc, 0x3b, 0xa0, 0x11, 0xd5, 0x53, 0x2e, 0x87, 0xe5, + 0xc0, 0xbc, 0x2d, 0xd7, 0x8d, 0xa2, 0x9c, 0xac, 0xf2, 0x69, 0x53, 0x27, 0x77, 0x0f, 0x96, 0xa6, + 0xaa, 0x42, 0x97, 0xd5, 0x5d, 0x48, 0x3c, 0xb7, 0x47, 0x05, 0x77, 0xb9, 0x60, 0x89, 0x79, 0x53, + 0x16, 0xf1, 0x92, 0x32, 0x38, 0x54, 0xf0, 0xae, 0x52, 0xcb, 0xe7, 0x95, 0x0c, 0x48, 0xc4, 0x55, + 0x94, 0x22, 0xd6, 0x0b, 0x5d, 0xcf, 0x65, 0x0e, 0x85, 0x31, 0xe3, 0x68, 0x15, 0x56, 0xba, 0x9d, + 0xad, 0x1d, 0x77, 0x7b, 0xb7, 0xd5, 0x76, 0xef, 0xee, 0x74, 0xef, 0xb4, 0x37, 0x3b, 0x37, 0x3a, + 0xed, 0x56, 0x29, 0x83, 0xce, 0x41, 0x69, 0x62, 0x6a, 0x75, 0x70, 0x7b, 0x73, 0xaf, 0x64, 0xa1, + 0x15, 0x58, 0x9e, 0x68, 0xf7, 0xda, 0x9f, 0xec, 0xdd, 0x6d, 0xde, 0x2e, 0xcd, 0xa0, 0x2a, 0x9c, + 0x9f, 0xa8, 0x6f, 0xb7, 0xb7, 0x9a, 0x9b, 0xf7, 0xdc, 0xe6, 0x76, 0x67, 0x67, 0xd7, 0xbd, 0xd5, + 0xdd, 0xdd, 0x29, 0x7d, 0xe9, 0xb4, 0x9e, 0xfd, 0x56, 0xc9, 0x3c, 0x3a, 0xac, 0x64, 0x9e, 0x1c, + 0x56, 0xac, 0xa7, 0x87, 0x15, 0xeb, 0xd7, 0xc3, 0x8a, 0xf5, 0xed, 0x51, 0x25, 0xf3, 0xf4, 0xa8, + 0x92, 0x79, 0x76, 0x54, 0xc9, 0x7c, 0x5a, 0x0b, 0xa9, 0xe8, 0xa7, 0x3d, 0xdb, 0x67, 0x51, 0x5d, + 0x53, 0x6a, 0x7e, 0xae, 0xf0, 0xe0, 0xbe, 0xfe, 0xab, 0xd2, 0xcb, 0xab, 0x4b, 0x72, 0xf5, 0xaf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xb6, 0xa8, 0x9a, 0x6e, 0x2c, 0x09, 0x00, 0x00, +} + +func (this *Coin) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Coin) + if !ok { + that2, ok := that.(Coin) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Denom != that1.Denom { + return false + } + if !this.Amount.Equal(that1.Amount) { + return false + } + return true +} +func (this *DecCoin) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DecCoin) + if !ok { + that2, ok := that.(DecCoin) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Denom != that1.Denom { + return false + } + if !this.Amount.Equal(that1.Amount) { + return false + } + return true +} +func (this *Fee) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Fee) + if !ok { + that2, ok := that.(Fee) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Amount) != len(that1.Amount) { + return false + } + for i := range this.Amount { + if !this.Amount[i].Equal(&that1.Amount[i]) { + return false + } + } + if this.GasLimit != that1.GasLimit { + return false + } + return true +} +func (m *Coin) 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 *Coin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Coin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) } - l = len(m.Log) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) + i-- + dAtA[i] = 0x12 + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa } - if len(m.Events) > 0 { - for _, e := range m.Events { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) + return len(dAtA) - i, nil +} + +func (m *DecCoin) 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 *DecCoin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DecCoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *IntProto) 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 *IntProto) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IntProto) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Int.Size() + i -= size + if _, err := m.Int.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *DecProto) 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 *DecProto) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DecProto) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Dec.Size() + i -= size + if _, err := m.Dec.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ValAddresses) 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 *ValAddresses) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValAddresses) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Addresses) > 0 { + for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Addresses[iNdEx]) + copy(dAtA[i:], m.Addresses[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Addresses[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GasInfo) 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 *GasInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GasInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GasUsed != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.GasUsed)) + i-- + dAtA[i] = 0x10 + } + if m.GasWanted != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.GasWanted)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Result) 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 *Result) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Result) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Events) > 0 { + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Events[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.Log) > 0 { + i -= len(m.Log) + copy(dAtA[i:], m.Log) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Log))) + i-- + dAtA[i] = 0x12 + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SimulationResponse) 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 *SimulationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SimulationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Result != nil { + { + size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + { + size, err := m.GasInfo.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 (m *Tx) 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 *Tx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Tx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signatures) > 0 { + for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signatures[iNdEx]) + copy(dAtA[i:], m.Signatures[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Signatures[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if m.AuthInfo != nil { + { + size, err := m.AuthInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.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 (m *SignDoc) 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 *SignDoc) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SignDoc) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AccountSequence != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.AccountSequence)) + i-- + dAtA[i] = 0x28 + } + if m.AccountNumber != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.AccountNumber)) + i-- + dAtA[i] = 0x20 + } + if len(m.ChainId) > 0 { + i -= len(m.ChainId) + copy(dAtA[i:], m.ChainId) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId))) + i-- + dAtA[i] = 0x1a + } + if m.AuthInfo != nil { + { + size, err := m.AuthInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Body != nil { + { + size, err := m.Body.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 (m *TxBody) 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 *TxBody) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxBody) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ExtensionOptions) > 0 { + for iNdEx := len(m.ExtensionOptions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ExtensionOptions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3f + i-- + dAtA[i] = 0xfa + } + } + if m.TimeoutHeight != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.TimeoutHeight)) + i-- + dAtA[i] = 0x18 + } + if len(m.Memo) > 0 { + i -= len(m.Memo) + copy(dAtA[i:], m.Memo) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Memo))) + i-- + dAtA[i] = 0x12 + } + if len(m.Messages) > 0 { + for iNdEx := len(m.Messages) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Messages[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 (m *AuthInfo) 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 *AuthInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AuthInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Fee != nil { + { + size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.SignerInfos) > 0 { + for iNdEx := len(m.SignerInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SignerInfos[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 (m *SignerInfo) 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 *SignerInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SignerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ModeInfo != nil { + { + size, err := m.ModeInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.PublicKey != nil { + { + size, err := m.PublicKey.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 (m *ModeInfo) 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 *ModeInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Sum != nil { + { + size := m.Sum.Size() + i -= size + if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *ModeInfo_Single_) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModeInfo_Single_) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Single != nil { + { + size, err := m.Single.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 (m *ModeInfo_Multi_) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModeInfo_Multi_) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Multi != nil { + { + size, err := m.Multi.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *ModeInfo_Single) 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 *ModeInfo_Single) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModeInfo_Single) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Mode != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Mode)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ModeInfo_Multi) 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 *ModeInfo_Multi) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModeInfo_Multi) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ModeInfos) > 0 { + for iNdEx := len(m.ModeInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ModeInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Bitarray != nil { + { + size, err := m.Bitarray.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 (m *Fee) 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 *Fee) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Fee) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GasLimit != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.GasLimit)) + i-- + dAtA[i] = 0x10 + } + 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] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *CompactBitArray) 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 *CompactBitArray) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CompactBitArray) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Elems) > 0 { + i -= len(m.Elems) + copy(dAtA[i:], m.Elems) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Elems))) + i-- + dAtA[i] = 0x12 + } + if m.ExtraBitsStored != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ExtraBitsStored)) + i-- + dAtA[i] = 0x8 + } + 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 *Coin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovTypes(uint64(l)) + return n +} + +func (m *DecCoin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovTypes(uint64(l)) + return n +} + +func (m *IntProto) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Int.Size() + n += 1 + l + sovTypes(uint64(l)) + return n +} + +func (m *DecProto) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Dec.Size() + n += 1 + l + sovTypes(uint64(l)) + return n +} + +func (m *ValAddresses) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Addresses) > 0 { + for _, b := range m.Addresses { + l = len(b) + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *GasInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.GasWanted != 0 { + n += 1 + sovTypes(uint64(m.GasWanted)) + } + if m.GasUsed != 0 { + n += 1 + sovTypes(uint64(m.GasUsed)) + } + return n +} + +func (m *Result) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Log) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Events) > 0 { + for _, e := range m.Events { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *SimulationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.GasInfo.Size() + n += 1 + l + sovTypes(uint64(l)) + if m.Result != nil { + l = m.Result.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *Tx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.AuthInfo != nil { + l = m.AuthInfo.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Signatures) > 0 { + for _, b := range m.Signatures { + l = len(b) + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *SignDoc) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Body != nil { + l = m.Body.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.AuthInfo != nil { + l = m.AuthInfo.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ChainId) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.AccountNumber != 0 { + n += 1 + sovTypes(uint64(m.AccountNumber)) + } + if m.AccountSequence != 0 { + n += 1 + sovTypes(uint64(m.AccountSequence)) + } + return n +} + +func (m *TxBody) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Messages) > 0 { + for _, e := range m.Messages { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + l = len(m.Memo) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.TimeoutHeight != 0 { + n += 1 + sovTypes(uint64(m.TimeoutHeight)) + } + if len(m.ExtensionOptions) > 0 { + for _, e := range m.ExtensionOptions { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *AuthInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SignerInfos) > 0 { + for _, e := range m.SignerInfos { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.Fee != nil { + l = m.Fee.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *SignerInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PublicKey != nil { + l = m.PublicKey.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.ModeInfo != nil { + l = m.ModeInfo.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *ModeInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Sum != nil { + n += m.Sum.Size() + } + return n +} + +func (m *ModeInfo_Single_) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Single != nil { + l = m.Single.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *ModeInfo_Multi_) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Multi != nil { + l = m.Multi.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *ModeInfo_Single) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Mode != 0 { + n += 1 + sovTypes(uint64(m.Mode)) + } + return n +} + +func (m *ModeInfo_Multi) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Bitarray != nil { + l = m.Bitarray.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.ModeInfos) > 0 { + for _, e := range m.ModeInfos { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *Fee) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.GasLimit != 0 { + n += 1 + sovTypes(uint64(m.GasLimit)) + } + return n +} + +func (m *CompactBitArray) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ExtraBitsStored != 0 { + n += 1 + sovTypes(uint64(m.ExtraBitsStored)) + } + l = len(m.Elems) + if l > 0 { + 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 (this *ValAddresses) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ValAddresses{`, + `Addresses:` + fmt.Sprintf("%v", this.Addresses) + `,`, + `}`, + }, "") + return s +} +func (this *Tx) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Tx{`, + `Body:` + strings.Replace(this.Body.String(), "TxBody", "TxBody", 1) + `,`, + `AuthInfo:` + strings.Replace(this.AuthInfo.String(), "AuthInfo", "AuthInfo", 1) + `,`, + `Signatures:` + fmt.Sprintf("%v", this.Signatures) + `,`, + `}`, + }, "") + return s +} +func (this *SignDoc) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SignDoc{`, + `Body:` + strings.Replace(this.Body.String(), "TxBody", "TxBody", 1) + `,`, + `AuthInfo:` + strings.Replace(this.AuthInfo.String(), "AuthInfo", "AuthInfo", 1) + `,`, + `ChainId:` + fmt.Sprintf("%v", this.ChainId) + `,`, + `AccountNumber:` + fmt.Sprintf("%v", this.AccountNumber) + `,`, + `AccountSequence:` + fmt.Sprintf("%v", this.AccountSequence) + `,`, + `}`, + }, "") + return s +} +func (this *TxBody) String() string { + if this == nil { + return "nil" + } + repeatedStringForMessages := "[]*Any{" + for _, f := range this.Messages { + repeatedStringForMessages += strings.Replace(fmt.Sprintf("%v", f), "Any", "types1.Any", 1) + "," + } + repeatedStringForMessages += "}" + repeatedStringForExtensionOptions := "[]*Any{" + for _, f := range this.ExtensionOptions { + repeatedStringForExtensionOptions += strings.Replace(fmt.Sprintf("%v", f), "Any", "types1.Any", 1) + "," + } + repeatedStringForExtensionOptions += "}" + s := strings.Join([]string{`&TxBody{`, + `Messages:` + repeatedStringForMessages + `,`, + `Memo:` + fmt.Sprintf("%v", this.Memo) + `,`, + `TimeoutHeight:` + fmt.Sprintf("%v", this.TimeoutHeight) + `,`, + `ExtensionOptions:` + repeatedStringForExtensionOptions + `,`, + `}`, + }, "") + return s +} +func (this *AuthInfo) String() string { + if this == nil { + return "nil" + } + repeatedStringForSignerInfos := "[]*SignerInfo{" + for _, f := range this.SignerInfos { + repeatedStringForSignerInfos += strings.Replace(f.String(), "SignerInfo", "SignerInfo", 1) + "," + } + repeatedStringForSignerInfos += "}" + s := strings.Join([]string{`&AuthInfo{`, + `SignerInfos:` + repeatedStringForSignerInfos + `,`, + `Fee:` + strings.Replace(this.Fee.String(), "Fee", "Fee", 1) + `,`, + `}`, + }, "") + return s +} +func (this *SignerInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SignerInfo{`, + `PublicKey:` + strings.Replace(fmt.Sprintf("%v", this.PublicKey), "Any", "types1.Any", 1) + `,`, + `ModeInfo:` + strings.Replace(this.ModeInfo.String(), "ModeInfo", "ModeInfo", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ModeInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ModeInfo{`, + `Sum:` + fmt.Sprintf("%v", this.Sum) + `,`, + `}`, + }, "") + return s +} +func (this *ModeInfo_Single_) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ModeInfo_Single_{`, + `Single:` + strings.Replace(fmt.Sprintf("%v", this.Single), "ModeInfo_Single", "ModeInfo_Single", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ModeInfo_Multi_) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ModeInfo_Multi_{`, + `Multi:` + strings.Replace(fmt.Sprintf("%v", this.Multi), "ModeInfo_Multi", "ModeInfo_Multi", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ModeInfo_Single) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ModeInfo_Single{`, + `Mode:` + fmt.Sprintf("%v", this.Mode) + `,`, + `}`, + }, "") + return s +} +func (this *ModeInfo_Multi) String() string { + if this == nil { + return "nil" + } + repeatedStringForModeInfos := "[]*ModeInfo{" + for _, f := range this.ModeInfos { + repeatedStringForModeInfos += strings.Replace(f.String(), "ModeInfo", "ModeInfo", 1) + "," + } + repeatedStringForModeInfos += "}" + s := strings.Join([]string{`&ModeInfo_Multi{`, + `Bitarray:` + strings.Replace(this.Bitarray.String(), "CompactBitArray", "CompactBitArray", 1) + `,`, + `ModeInfos:` + repeatedStringForModeInfos + `,`, + `}`, + }, "") + return s +} +func (this *Fee) String() string { + if this == nil { + return "nil" + } + repeatedStringForAmount := "[]Coin{" + for _, f := range this.Amount { + repeatedStringForAmount += fmt.Sprintf("%v", f) + "," + } + repeatedStringForAmount += "}" + s := strings.Join([]string{`&Fee{`, + `Amount:` + repeatedStringForAmount + `,`, + `GasLimit:` + fmt.Sprintf("%v", this.GasLimit) + `,`, + `}`, + }, "") + return s +} +func (this *CompactBitArray) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CompactBitArray{`, + `ExtraBitsStored:` + fmt.Sprintf("%v", this.ExtraBitsStored) + `,`, + `Elems:` + fmt.Sprintf("%v", this.Elems) + `,`, + `}`, + }, "") + return s +} +func valueToStringTypes(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Coin) 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: Coin: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Coin: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.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 *DecCoin) 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: DecCoin: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DecCoin: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.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 *IntProto) 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: IntProto: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IntProto: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Int.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 *DecProto) 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: DecProto: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DecProto: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dec", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Dec.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 *ValAddresses) 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: ValAddresses: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValAddresses: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addresses", 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.Addresses = append(m.Addresses, make([]byte, postIndex-iNdEx)) + copy(m.Addresses[len(m.Addresses)-1], dAtA[iNdEx:postIndex]) + 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 *GasInfo) 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: GasInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GasInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType) + } + m.GasWanted = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasWanted |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) + } + m.GasUsed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasUsed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *Result) 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: Result: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Result: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", 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.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Log = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Events", 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.Events = append(m.Events, types.Event{}) + if err := m.Events[len(m.Events)-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 *SimulationResponse) 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: SimulationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SimulationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GasInfo", 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 + } + if err := m.GasInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", 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 + } + if m.Result == nil { + m.Result = &Result{} + } + if err := m.Result.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 *Tx) 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: Tx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Tx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", 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 + } + if m.Body == nil { + m.Body = &TxBody{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AuthInfo", 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 + } + if m.AuthInfo == nil { + m.AuthInfo = &AuthInfo{} + } + if err := m.AuthInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signatures", 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.Signatures = append(m.Signatures, make([]byte, postIndex-iNdEx)) + copy(m.Signatures[len(m.Signatures)-1], dAtA[iNdEx:postIndex]) + 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 *SignDoc) 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: SignDoc: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignDoc: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", 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 + } + if m.Body == nil { + m.Body = &TxBody{} + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AuthInfo", 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 + } + if m.AuthInfo == nil { + m.AuthInfo = &AuthInfo{} + } + if err := m.AuthInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType) + } + m.AccountNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AccountNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountSequence", wireType) + } + m.AccountSequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AccountSequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 } } - return n -} - -func (m *SimulationResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.GasInfo.Size() - n += 1 + l + sovTypes(uint64(l)) - if m.Result != nil { - l = m.Result.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 (this *ValAddresses) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ValAddresses{`, - `Addresses:` + fmt.Sprintf("%v", this.Addresses) + `,`, - `}`, - }, "") - return s -} -func valueToStringTypes(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" + if iNdEx > l { + return io.ErrUnexpectedEOF } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) + return nil } -func (m *Coin) Unmarshal(dAtA []byte) error { +func (m *TxBody) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -974,17 +3775,17 @@ func (m *Coin) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Coin: wiretype end group for non-group") + return fmt.Errorf("proto: TxBody: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Coin: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TxBody: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -994,27 +3795,29 @@ func (m *Coin) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.Messages = append(m.Messages, &types1.Any{}) + if err := m.Messages[len(m.Messages)-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 Amount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Memo", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1042,7 +3845,58 @@ func (m *Coin) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Memo = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutHeight", wireType) + } + m.TimeoutHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TimeoutHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 1023: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExtensionOptions", 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.ExtensionOptions = append(m.ExtensionOptions, &types1.Any{}) + if err := m.ExtensionOptions[len(m.ExtensionOptions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1070,7 +3924,7 @@ func (m *Coin) Unmarshal(dAtA []byte) error { } return nil } -func (m *DecCoin) Unmarshal(dAtA []byte) error { +func (m *AuthInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1093,17 +3947,17 @@ func (m *DecCoin) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DecCoin: wiretype end group for non-group") + return fmt.Errorf("proto: AuthInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DecCoin: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AuthInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SignerInfos", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -1113,29 +3967,31 @@ func (m *DecCoin) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.SignerInfos = append(m.SignerInfos, &SignerInfo{}) + if err := m.SignerInfos[len(m.SignerInfos)-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 Amount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -1145,23 +4001,150 @@ func (m *DecCoin) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fee == nil { + m.Fee = &Fee{} + } + if err := m.Fee.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 *SignerInfo) 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: SignerInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignerInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", 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 + } + if m.PublicKey == nil { + m.PublicKey = &types1.Any{} + } + if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ModeInfo", 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 + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.ModeInfo == nil { + m.ModeInfo = &ModeInfo{} + } + if err := m.ModeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1189,7 +4172,7 @@ func (m *DecCoin) Unmarshal(dAtA []byte) error { } return nil } -func (m *IntProto) Unmarshal(dAtA []byte) error { +func (m *ModeInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1212,17 +4195,17 @@ func (m *IntProto) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IntProto: wiretype end group for non-group") + return fmt.Errorf("proto: ModeInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IntProto: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ModeInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Single", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -1232,84 +4215,32 @@ func (m *IntProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Int.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + v := &ModeInfo_Single{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } + m.Sum = &ModeInfo_Single_{v} 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 *DecProto) 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: DecProto: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DecProto: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Multi", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -1319,25 +4250,26 @@ func (m *DecProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Dec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + v := &ModeInfo_Multi{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } + m.Sum = &ModeInfo_Multi_{v} iNdEx = postIndex default: iNdEx = preIndex @@ -1363,7 +4295,7 @@ func (m *DecProto) Unmarshal(dAtA []byte) error { } return nil } -func (m *ValAddresses) Unmarshal(dAtA []byte) error { +func (m *ModeInfo_Single) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1386,17 +4318,17 @@ func (m *ValAddresses) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ValAddresses: wiretype end group for non-group") + return fmt.Errorf("proto: Single: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ValAddresses: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Single: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) } - var byteLen int + m.Mode = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -1406,24 +4338,11 @@ func (m *ValAddresses) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + m.Mode |= SignMode(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.Addresses = append(m.Addresses, make([]byte, postIndex-iNdEx)) - copy(m.Addresses[len(m.Addresses)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -1448,7 +4367,7 @@ func (m *ValAddresses) Unmarshal(dAtA []byte) error { } return nil } -func (m *GasInfo) Unmarshal(dAtA []byte) error { +func (m *ModeInfo_Multi) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1471,17 +4390,17 @@ func (m *GasInfo) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GasInfo: wiretype end group for non-group") + return fmt.Errorf("proto: Multi: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GasInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Multi: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bitarray", wireType) } - m.GasWanted = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -1491,16 +4410,33 @@ func (m *GasInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.GasWanted |= uint64(b&0x7F) << shift + 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 + } + if m.Bitarray == nil { + m.Bitarray = &CompactBitArray{} + } + if err := m.Bitarray.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ModeInfos", wireType) } - m.GasUsed = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -1510,11 +4446,26 @@ func (m *GasInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.GasUsed |= uint64(b&0x7F) << shift + 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.ModeInfos = append(m.ModeInfos, &ModeInfo{}) + if err := m.ModeInfos[len(m.ModeInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -1539,7 +4490,7 @@ func (m *GasInfo) Unmarshal(dAtA []byte) error { } return nil } -func (m *Result) Unmarshal(dAtA []byte) error { +func (m *Fee) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1562,17 +4513,17 @@ func (m *Result) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Result: wiretype end group for non-group") + return fmt.Errorf("proto: Fee: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Result: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Fee: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -1582,63 +4533,31 @@ func (m *Result) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} + m.Amount = append(m.Amount, Coin{}) + if err := m.Amount[len(m.Amount)-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 Log", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Log = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) } - var msglen int + m.GasLimit = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -1648,26 +4567,11 @@ func (m *Result) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.GasLimit |= uint64(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.Events = append(m.Events, types.Event{}) - if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -1692,7 +4596,7 @@ func (m *Result) Unmarshal(dAtA []byte) error { } return nil } -func (m *SimulationResponse) Unmarshal(dAtA []byte) error { +func (m *CompactBitArray) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1715,17 +4619,17 @@ func (m *SimulationResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SimulationResponse: wiretype end group for non-group") + return fmt.Errorf("proto: CompactBitArray: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SimulationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CompactBitArray: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GasInfo", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExtraBitsStored", wireType) } - var msglen int + m.ExtraBitsStored = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -1735,30 +4639,16 @@ func (m *SimulationResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.ExtraBitsStored |= uint32(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 - } - if err := m.GasInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Elems", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -1768,26 +4658,24 @@ func (m *SimulationResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Result == nil { - m.Result = &Result{} - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Elems = append(m.Elems[:0], dAtA[iNdEx:postIndex]...) + if m.Elems == nil { + m.Elems = []byte{} } iNdEx = postIndex default: diff --git a/types/types.proto b/types/types.proto index c26219caa789..79fa5d1b53d4 100644 --- a/types/types.proto +++ b/types/types.proto @@ -3,6 +3,7 @@ package cosmos_sdk.v1; import "third_party/proto/gogoproto/gogo.proto"; import "third_party/proto/tendermint/abci/types/types.proto"; +import "google/protobuf/any.proto"; option go_package = "github.com/cosmos/cosmos-sdk/types"; option (gogoproto.goproto_stringer_all) = false; @@ -78,3 +79,114 @@ message SimulationResponse { GasInfo gas_info = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; Result result = 2; } + +message Tx { + option (gogoproto.stringer) = true; + + TxBody body = 1; + AuthInfo auth_info = 2; + repeated bytes signatures = 3; +} + +message SignDoc { + option (gogoproto.stringer) = true; + + TxBody body = 1; + AuthInfo auth_info = 2; + string chain_id = 3; + uint64 account_number = 4; + // account_sequence starts at 1 rather than 0 to avoid the case where + // the default 0 value must be omitted in protobuf serialization + uint64 account_sequence = 5; +} + +message TxBody { + option (gogoproto.stringer) = true; + + repeated google.protobuf.Any messages = 1; + string memo = 2; + int64 timeout_height = 3; + repeated google.protobuf.Any extension_options = 1023; +} + +message AuthInfo { + option (gogoproto.stringer) = true; + + repeated SignerInfo signer_infos = 1; + // The first signer is the primary signer and the one which pays the fee + Fee fee = 2; +} + +message SignerInfo { + option (gogoproto.stringer) = true; + + // PublicKey key is optional for accounts that already exist in state + google.protobuf.Any public_key = 1; + // ModeInfo describes the signing mode of the signer and is a nested + // structure to support nested multisig pubkey's + ModeInfo mode_info = 2; +} + +message ModeInfo { + option (gogoproto.stringer) = true; + + oneof sum { + Single single = 1; + Multi multi = 2; + } + + // Single is the mode info for a single signer. It is structured as a message + // to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the future + message Single { + option (gogoproto.stringer) = true; + + SignMode mode = 1; + } + + // Multi is the mode info for a multisig public key + message Multi { + option (gogoproto.stringer) = true; + + // bitarray specifies which keys within the multisig are signing + CompactBitArray bitarray = 1; + // mode_infos is the corresponding modes of the signers of the multisig + // which could include nested multisig public keys + repeated ModeInfo mode_infos = 2; + } +} + +enum SignMode { + SIGN_MODE_UNSPECIFIED = 0; + + SIGN_MODE_DIRECT = 1; + + SIGN_MODE_TEXTUAL = 2; + + SIGN_MODE_LEGACY_AMINO_JSON = 127; +} + +// Fee 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 Fee { + option (gogoproto.goproto_getters) = false; + option (gogoproto.equal) = true; + option (gogoproto.stringer) = true; + + repeated Coin amount = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "Coins"]; + uint64 gas_limit = 2; +} + +// CompactBitArray is an implementation of a space efficient bit array. +// This is used to ensure that the encoded data takes up a minimal amount of +// space after proto encoding. +// This is not thread safe, and is not intended for concurrent usage. +message CompactBitArray { +// option (gogoproto.sizer) = false; +// option (gogoproto.goproto_stringer) = false; + option (gogoproto.stringer) = true; + + uint32 extra_bits_stored = 1; + bytes elems = 2; +} diff --git a/x/auth/ante/ante_test.go b/x/auth/ante/ante_test.go index 9278caff2b0d..6157298eaaa5 100644 --- a/x/auth/ante/ante_test.go +++ b/x/auth/ante/ante_test.go @@ -21,13 +21,13 @@ import ( ) // run the tx through the anteHandler and ensure its valid -func checkValidTx(t *testing.T, anteHandler sdk.AnteHandler, ctx sdk.Context, tx sdk.Tx, simulate bool) { +func checkValidTx(t *testing.T, anteHandler sdk.AnteHandler, ctx sdk.Context, tx sdk.TxI, simulate bool) { _, err := anteHandler(ctx, tx, simulate) require.Nil(t, err) } // run the tx through the anteHandler and ensure it fails with the given code -func checkInvalidTx(t *testing.T, anteHandler sdk.AnteHandler, ctx sdk.Context, tx sdk.Tx, simulate bool, expErr error) { +func checkInvalidTx(t *testing.T, anteHandler sdk.AnteHandler, ctx sdk.Context, tx sdk.TxI, simulate bool, expErr error) { _, err := anteHandler(ctx, tx, simulate) require.NotNil(t, err) require.True(t, errors.Is(expErr, err)) @@ -63,7 +63,7 @@ func TestSimulateGasCost(t *testing.T) { require.NoError(t, err) // set up msgs and fee - var tx sdk.Tx + var tx sdk.TxI msg1 := types.NewTestMsg(addr1, addr2) msg2 := types.NewTestMsg(addr3, addr1) msg3 := types.NewTestMsg(addr2, addr3) @@ -100,7 +100,7 @@ func TestAnteHandlerSigErrors(t *testing.T) { priv3, _, addr3 := types.KeyTestPubAddr() // msg and signatures - var tx sdk.Tx + var tx sdk.TxI msg1 := types.NewTestMsg(addr1, addr2) msg2 := types.NewTestMsg(addr1, addr3) fee := types.NewTestStdFee() @@ -161,7 +161,7 @@ func TestAnteHandlerAccountNumbers(t *testing.T) { require.NoError(t, err) // msg and signatures - var tx sdk.Tx + var tx sdk.TxI msg := types.NewTestMsg(addr1) fee := types.NewTestStdFee() @@ -219,7 +219,7 @@ func TestAnteHandlerAccountNumbersAtBlockHeightZero(t *testing.T) { require.NoError(t, err) // msg and signatures - var tx sdk.Tx + var tx sdk.TxI msg := types.NewTestMsg(addr1) fee := types.NewTestStdFee() @@ -281,7 +281,7 @@ func TestAnteHandlerSequences(t *testing.T) { app.BankKeeper.SetBalances(ctx, addr3, types.NewTestCoins()) // msg and signatures - var tx sdk.Tx + var tx sdk.TxI msg := types.NewTestMsg(addr1) fee := types.NewTestStdFee() @@ -345,7 +345,7 @@ func TestAnteHandlerFees(t *testing.T) { app.AccountKeeper.SetAccount(ctx, acc1) // msg and signatures - var tx sdk.Tx + var tx sdk.TxI msg := types.NewTestMsg(addr1) privs, accnums, seqs := []crypto.PrivKey{priv1}, []uint64{0}, []uint64{0} fee := types.NewTestStdFee() @@ -388,7 +388,7 @@ func TestAnteHandlerMemoGas(t *testing.T) { app.AccountKeeper.SetAccount(ctx, acc1) // msg and signatures - var tx sdk.Tx + var tx sdk.TxI msg := types.NewTestMsg(addr1) privs, accnums, seqs := []crypto.PrivKey{priv1}, []uint64{0}, []uint64{0} fee := types.NewStdFee(0, sdk.NewCoins(sdk.NewInt64Coin("atom", 0))) @@ -439,7 +439,7 @@ func TestAnteHandlerMultiSigner(t *testing.T) { app.BankKeeper.SetBalances(ctx, addr3, types.NewTestCoins()) // set up msgs and fee - var tx sdk.Tx + var tx sdk.TxI msg1 := types.NewTestMsg(addr1, addr2) msg2 := types.NewTestMsg(addr3, addr1) msg3 := types.NewTestMsg(addr2, addr3) @@ -483,7 +483,7 @@ func TestAnteHandlerBadSignBytes(t *testing.T) { app.AccountKeeper.SetAccount(ctx, acc2) app.BankKeeper.SetBalances(ctx, addr2, types.NewTestCoins()) - var tx sdk.Tx + var tx sdk.TxI msg := types.NewTestMsg(addr1) msgs := []sdk.Msg{msg} fee := types.NewTestStdFee() @@ -560,7 +560,7 @@ func TestAnteHandlerSetPubKey(t *testing.T) { app.AccountKeeper.SetAccount(ctx, acc2) app.BankKeeper.SetBalances(ctx, addr2, types.NewTestCoins()) - var tx sdk.Tx + var tx sdk.TxI // test good tx and set public key msg := types.NewTestMsg(addr1) @@ -685,7 +685,7 @@ func TestAnteHandlerSigLimitExceeded(t *testing.T) { app.BankKeeper.SetBalances(ctx, addr, types.NewTestCoins()) } - var tx sdk.Tx + var tx sdk.TxI msg := types.NewTestMsg(addr1, addr2, addr3, addr4, addr5, addr6, addr7, addr8) msgs := []sdk.Msg{msg} fee := types.NewTestStdFee() @@ -719,7 +719,7 @@ func TestCustomSignatureVerificationGasConsumer(t *testing.T) { app.AccountKeeper.SetAccount(ctx, acc1) app.BankKeeper.SetBalances(ctx, addr1, sdk.NewCoins(sdk.NewInt64Coin("atom", 150))) - var tx sdk.Tx + var tx sdk.TxI msg := types.NewTestMsg(addr1) privs, accnums, seqs := []crypto.PrivKey{priv1}, []uint64{0}, []uint64{0} fee := types.NewTestStdFee() diff --git a/x/auth/ante/basic.go b/x/auth/ante/basic.go index 41ba96d8bb73..5fc4c223080a 100644 --- a/x/auth/ante/basic.go +++ b/x/auth/ante/basic.go @@ -25,7 +25,7 @@ func NewValidateBasicDecorator() ValidateBasicDecorator { return ValidateBasicDecorator{} } -func (vbd ValidateBasicDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { +func (vbd ValidateBasicDecorator) AnteHandle(ctx sdk.Context, tx sdk.TxI, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { // no need to validate basic on recheck tx, call next antehandler if ctx.IsReCheckTx() { return next(ctx, tx, simulate) @@ -40,7 +40,7 @@ func (vbd ValidateBasicDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulat // Tx must have GetMemo() method to use ValidateMemoDecorator type TxWithMemo interface { - sdk.Tx + sdk.TxI GetMemo() string } @@ -57,7 +57,7 @@ func NewValidateMemoDecorator(ak AccountKeeper) ValidateMemoDecorator { } } -func (vmd ValidateMemoDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { +func (vmd ValidateMemoDecorator) AnteHandle(ctx sdk.Context, tx sdk.TxI, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { memoTx, ok := tx.(TxWithMemo) if !ok { return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") @@ -95,7 +95,7 @@ func NewConsumeGasForTxSizeDecorator(ak AccountKeeper) ConsumeTxSizeGasDecorator } } -func (cgts ConsumeTxSizeGasDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { +func (cgts ConsumeTxSizeGasDecorator) AnteHandle(ctx sdk.Context, tx sdk.TxI, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { sigTx, ok := tx.(SigVerifiableTx) if !ok { return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid tx type") diff --git a/x/auth/ante/fee.go b/x/auth/ante/fee.go index 5b1044c58664..85d7ee05c665 100644 --- a/x/auth/ante/fee.go +++ b/x/auth/ante/fee.go @@ -15,7 +15,7 @@ var ( // FeeTx defines the interface to be implemented by Tx to use the FeeDecorators type FeeTx interface { - sdk.Tx + sdk.TxI GetGas() uint64 GetFee() sdk.Coins FeePayer() sdk.AccAddress @@ -33,7 +33,7 @@ func NewMempoolFeeDecorator() MempoolFeeDecorator { return MempoolFeeDecorator{} } -func (mfd MempoolFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { +func (mfd MempoolFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.TxI, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { feeTx, ok := tx.(FeeTx) if !ok { return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") @@ -82,7 +82,7 @@ func NewDeductFeeDecorator(ak AccountKeeper, bk types.BankKeeper) DeductFeeDecor } } -func (dfd DeductFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { +func (dfd DeductFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.TxI, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { feeTx, ok := tx.(FeeTx) if !ok { return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") diff --git a/x/auth/ante/setup.go b/x/auth/ante/setup.go index 1e3e8eb68d67..57246cdf8268 100644 --- a/x/auth/ante/setup.go +++ b/x/auth/ante/setup.go @@ -14,7 +14,7 @@ var ( // GasTx defines a Tx with a GetGas() method which is needed to use SetUpContextDecorator type GasTx interface { - sdk.Tx + sdk.TxI GetGas() uint64 } @@ -29,7 +29,7 @@ func NewSetUpContextDecorator() SetUpContextDecorator { return SetUpContextDecorator{} } -func (sud SetUpContextDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { +func (sud SetUpContextDecorator) AnteHandle(ctx sdk.Context, tx sdk.TxI, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { // all transactions must implement GasTx gasTx, ok := tx.(GasTx) if !ok { diff --git a/x/auth/ante/setup_test.go b/x/auth/ante/setup_test.go index 698a0ecedbd1..c2ee4287541e 100644 --- a/x/auth/ante/setup_test.go +++ b/x/auth/ante/setup_test.go @@ -80,7 +80,7 @@ func TestRecoverPanic(t *testing.T) { type OutOfGasDecorator struct{} // AnteDecorator that will throw OutOfGas panic -func (ogd OutOfGasDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { +func (ogd OutOfGasDecorator) AnteHandle(ctx sdk.Context, tx sdk.TxI, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { overLimit := ctx.GasMeter().Limit() + 1 // Should panic with outofgas error @@ -92,6 +92,6 @@ func (ogd OutOfGasDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate boo type PanicDecorator struct{} -func (pd PanicDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { +func (pd PanicDecorator) AnteHandle(ctx sdk.Context, tx sdk.TxI, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { panic("random error") } diff --git a/x/auth/ante/sigverify.go b/x/auth/ante/sigverify.go index 93ae0f3b4ae4..2aebf1401cee 100644 --- a/x/auth/ante/sigverify.go +++ b/x/auth/ante/sigverify.go @@ -37,7 +37,7 @@ type SignatureVerificationGasConsumer = func(meter sdk.GasMeter, sig []byte, pub // SigVerifiableTx defines a Tx interface for all signature verification decorators type SigVerifiableTx interface { - sdk.Tx + sdk.TxI GetSignatures() [][]byte GetSigners() []sdk.AccAddress GetPubKeys() []crypto.PubKey // If signer already has pubkey in context, this list will have nil in its place @@ -57,7 +57,7 @@ func NewSetPubKeyDecorator(ak AccountKeeper) SetPubKeyDecorator { } } -func (spkd SetPubKeyDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { +func (spkd SetPubKeyDecorator) AnteHandle(ctx sdk.Context, tx sdk.TxI, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { sigTx, ok := tx.(SigVerifiableTx) if !ok { return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid tx type") @@ -114,7 +114,7 @@ func NewSigGasConsumeDecorator(ak AccountKeeper, sigGasConsumer SignatureVerific } } -func (sgcd SigGasConsumeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { +func (sgcd SigGasConsumeDecorator) AnteHandle(ctx sdk.Context, tx sdk.TxI, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { sigTx, ok := tx.(SigVerifiableTx) if !ok { return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") @@ -167,7 +167,7 @@ func NewSigVerificationDecorator(ak AccountKeeper) SigVerificationDecorator { } } -func (svd SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { +func (svd SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.TxI, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { // no need to verify signatures on recheck tx if ctx.IsReCheckTx() { return next(ctx, tx, simulate) @@ -234,7 +234,7 @@ func NewIncrementSequenceDecorator(ak AccountKeeper) IncrementSequenceDecorator } } -func (isd IncrementSequenceDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { +func (isd IncrementSequenceDecorator) AnteHandle(ctx sdk.Context, tx sdk.TxI, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { // no need to increment sequence on RecheckTx if ctx.IsReCheckTx() && !simulate { return next(ctx, tx, simulate) @@ -272,7 +272,7 @@ func NewValidateSigCountDecorator(ak AccountKeeper) ValidateSigCountDecorator { } } -func (vscd ValidateSigCountDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { +func (vscd ValidateSigCountDecorator) AnteHandle(ctx sdk.Context, tx sdk.TxI, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { sigTx, ok := tx.(SigVerifiableTx) if !ok { return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a sigTx") diff --git a/x/auth/client/query.go b/x/auth/client/query.go index 85bd747bc3c5..c16776a08e37 100644 --- a/x/auth/client/query.go +++ b/x/auth/client/query.go @@ -169,7 +169,7 @@ func formatTxResult(cdc *codec.Codec, resTx *ctypes.ResultTx, resBlock *ctypes.R return sdk.NewResponseResultTx(resTx, tx, resBlock.Block.Time.Format(time.RFC3339)), nil } -func parseTx(cdc *codec.Codec, txBytes []byte) (sdk.Tx, error) { +func parseTx(cdc *codec.Codec, txBytes []byte) (sdk.TxI, error) { var tx types.StdTx err := cdc.UnmarshalBinaryBare(txBytes, &tx) diff --git a/x/auth/client/tx_test.go b/x/auth/client/tx_test.go index ab2ce267ece3..970f39a6b1d0 100644 --- a/x/auth/client/tx_test.go +++ b/x/auth/client/tx_test.go @@ -103,7 +103,7 @@ func TestDefaultTxEncoder(t *testing.T) { func TestConfiguredTxEncoder(t *testing.T) { cdc := makeCodec() - customEncoder := func(tx sdk.Tx) ([]byte, error) { + customEncoder := func(tx sdk.TxI) ([]byte, error) { return json.Marshal(tx) } diff --git a/x/auth/types/stdtx.go b/x/auth/types/stdtx.go index 16d7f319408b..efa7a03a0a53 100644 --- a/x/auth/types/stdtx.go +++ b/x/auth/types/stdtx.go @@ -140,9 +140,9 @@ func CountSubKeys(pub crypto.PubKey) int { // DEPRECATED // --------------------------------------------------------------------------- -var _ sdk.Tx = (*StdTx)(nil) +var _ sdk.TxI = (*StdTx)(nil) -// StdTx is a standard way to wrap a Msg with Fee and Signatures. +// StdTx is a standard way to wrap a Msg with FeeI and Signatures. // NOTE: the first signature is the fee payer (Signatures must not be nil). type StdTx struct { Msgs []sdk.Msg `json:"msg" yaml:"msg"` @@ -319,7 +319,7 @@ type StdSignature struct { // DefaultTxDecoder logic for standard transaction decoding func DefaultTxDecoder(cdc *codec.Codec) sdk.TxDecoder { - return func(txBytes []byte) (sdk.Tx, error) { + return func(txBytes []byte) (sdk.TxI, error) { var tx = StdTx{} if len(txBytes) == 0 { @@ -339,7 +339,7 @@ func DefaultTxDecoder(cdc *codec.Codec) sdk.TxDecoder { // DefaultTxEncoder logic for standard transaction encoding func DefaultTxEncoder(cdc *codec.Codec) sdk.TxEncoder { - return func(tx sdk.Tx) ([]byte, error) { + return func(tx sdk.TxI) ([]byte, error) { return cdc.MarshalBinaryBare(tx) } } diff --git a/x/auth/types/test_utils.go b/x/auth/types/test_utils.go index 4c0d801af377..15c724587bec 100644 --- a/x/auth/types/test_utils.go +++ b/x/auth/types/test_utils.go @@ -31,7 +31,7 @@ func KeyTestPubAddr() (crypto.PrivKey, crypto.PubKey, sdk.AccAddress) { return key, pub, addr } -func NewTestTx(ctx sdk.Context, msgs []sdk.Msg, privs []crypto.PrivKey, accNums []uint64, seqs []uint64, fee StdFee) sdk.Tx { +func NewTestTx(ctx sdk.Context, msgs []sdk.Msg, privs []crypto.PrivKey, accNums []uint64, seqs []uint64, fee StdFee) sdk.TxI { sigs := make([]StdSignature, len(privs)) for i, priv := range privs { signBytes := StdSignBytes(ctx.ChainID(), accNums[i], seqs[i], fee, msgs, "") @@ -48,7 +48,7 @@ func NewTestTx(ctx sdk.Context, msgs []sdk.Msg, privs []crypto.PrivKey, accNums return tx } -func NewTestTxWithMemo(ctx sdk.Context, msgs []sdk.Msg, privs []crypto.PrivKey, accNums []uint64, seqs []uint64, fee StdFee, memo string) sdk.Tx { +func NewTestTxWithMemo(ctx sdk.Context, msgs []sdk.Msg, privs []crypto.PrivKey, accNums []uint64, seqs []uint64, fee StdFee, memo string) sdk.TxI { sigs := make([]StdSignature, len(privs)) for i, priv := range privs { signBytes := StdSignBytes(ctx.ChainID(), accNums[i], seqs[i], fee, msgs, memo) @@ -65,7 +65,7 @@ func NewTestTxWithMemo(ctx sdk.Context, msgs []sdk.Msg, privs []crypto.PrivKey, return tx } -func NewTestTxWithSignBytes(msgs []sdk.Msg, privs []crypto.PrivKey, accNums []uint64, seqs []uint64, fee StdFee, signBytes []byte, memo string) sdk.Tx { +func NewTestTxWithSignBytes(msgs []sdk.Msg, privs []crypto.PrivKey, accNums []uint64, seqs []uint64, fee StdFee, signBytes []byte, memo string) sdk.TxI { sigs := make([]StdSignature, len(privs)) for i, priv := range privs { sig, err := priv.Sign(signBytes) diff --git a/x/genutil/client/rest/query.go b/x/genutil/client/rest/query.go index 0159223e8e7c..b737443fc2bf 100644 --- a/x/genutil/client/rest/query.go +++ b/x/genutil/client/rest/query.go @@ -32,7 +32,7 @@ func QueryGenesisTxs(cliCtx context.CLIContext, w http.ResponseWriter) { } genState := types.GetGenesisStateFromAppState(cliCtx.Codec, appState) - genTxs := make([]sdk.Tx, len(genState.GenTxs)) + genTxs := make([]sdk.TxI, len(genState.GenTxs)) for i, tx := range genState.GenTxs { err := cliCtx.Codec.UnmarshalJSON(tx, &genTxs[i]) if err != nil { diff --git a/x/ibc/ante/ante.go b/x/ibc/ante/ante.go index 82484be5a32e..b542bd886ef2 100644 --- a/x/ibc/ante/ante.go +++ b/x/ibc/ante/ante.go @@ -25,7 +25,7 @@ func NewProofVerificationDecorator(clientKeeper client.Keeper, channelKeeper cha // AnteHandle executes MsgUpdateClient, MsgPacket, MsgAcknowledgement, MsgTimeout. // The packet execution messages are then passed to the respective application handlers. -func (pvr ProofVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { +func (pvr ProofVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.TxI, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { for _, msg := range tx.GetMsgs() { var err error switch msg := msg.(type) { diff --git a/x/ibc/ante/ante_test.go b/x/ibc/ante/ante_test.go index 11cf8047ee8a..2e113f97966b 100644 --- a/x/ibc/ante/ante_test.go +++ b/x/ibc/ante/ante_test.go @@ -74,7 +74,7 @@ func queryProof(chain *TestChain, key string) (proof commitmenttypes.MerkleProof return } -func (suite *HandlerTestSuite) newTx(msg sdk.Msg) sdk.Tx { +func (suite *HandlerTestSuite) newTx(msg sdk.Msg) sdk.TxI { return authtypes.StdTx{ Msgs: []sdk.Msg{msg}, }