From deecf98e12d970773a893aee256a0f3bdbf66fb3 Mon Sep 17 00:00:00 2001 From: Dzung Do Date: Wed, 3 Jul 2024 16:07:45 +0700 Subject: [PATCH] remove unused proto --- demo/app/app.go | 21 +- docs/proto/proto-docs.md | 29 -- x/meshsecurityprovider/types/tx.pb.go | 432 ++------------------------ 3 files changed, 48 insertions(+), 434 deletions(-) diff --git a/demo/app/app.go b/demo/app/app.go index 05fcb885..aaa653ae 100644 --- a/demo/app/app.go +++ b/demo/app/app.go @@ -129,6 +129,9 @@ import ( "github.com/osmosis-labs/mesh-security-sdk/x/meshsecurity" meshseckeeper "github.com/osmosis-labs/mesh-security-sdk/x/meshsecurity/keeper" meshsectypes "github.com/osmosis-labs/mesh-security-sdk/x/meshsecurity/types" + meshsecprov "github.com/osmosis-labs/mesh-security-sdk/x/meshsecurityprovider" + meshsecprovkeeper "github.com/osmosis-labs/mesh-security-sdk/x/meshsecurityprovider/keeper" + meshsecprovtypes "github.com/osmosis-labs/mesh-security-sdk/x/meshsecurityprovider/types" ) const appName = "MeshApp" @@ -200,6 +203,7 @@ var ( ica.AppModuleBasic{}, ibcfee.AppModuleBasic{}, meshsecurity.AppModuleBasic{}, + meshsecprov.AppModuleBasic{}, ) // module account permissions @@ -263,6 +267,7 @@ type MeshApp struct { TransferKeeper ibctransferkeeper.Keeper WasmKeeper wasmkeeper.Keeper MeshSecKeeper *meshseckeeper.Keeper + MeshSecProvKeeper meshsecprovkeeper.Keeper ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedICAHostKeeper capabilitykeeper.ScopedKeeper @@ -314,6 +319,7 @@ func NewMeshApp( wasmtypes.StoreKey, icahosttypes.StoreKey, icacontrollertypes.StoreKey, meshsectypes.StoreKey, + meshsecprovtypes.StoreKey, ) tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey) @@ -417,6 +423,13 @@ func NewMeshApp( authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) + app.MeshSecProvKeeper = *meshsecprovkeeper.NewKeeper( + appCodec, + keys[meshsecprovtypes.StoreKey], + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + app.BankKeeper, + ) + app.SlashingKeeper = slashingkeeper.NewKeeper( appCodec, legacyAmino, @@ -591,7 +604,12 @@ func NewMeshApp( meshseckeeper.NewDefaultCustomMsgHandler(app.MeshSecKeeper), ) }) - wasmOpts = append(wasmOpts, meshMessageHandler, + meshProvMessageHandler := wasmkeeper.WithMessageHandlerDecorator(func(nested wasmkeeper.Messenger) wasmkeeper.Messenger { + return wasmkeeper.NewMessageHandlerChain( + meshsecprovkeeper.NewDefaultCustomMsgHandler(&app.MeshSecProvKeeper), + ) + }) + wasmOpts = append(wasmOpts, meshMessageHandler, meshProvMessageHandler, // add support for the mesh-security queries wasmkeeper.WithQueryHandlerDecorator(meshseckeeper.NewQueryDecorator(app.MeshSecKeeper, app.SlashingKeeper)), ) @@ -694,6 +712,7 @@ func NewMeshApp( ibcfee.NewAppModule(app.IBCFeeKeeper), ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper), meshsecurity.NewAppModule(appCodec, app.MeshSecKeeper), + meshsecprov.NewAppModule(app.MeshSecProvKeeper), crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)), // always be last to make sure that it checks for all invariants and not only part of them ) diff --git a/docs/proto/proto-docs.md b/docs/proto/proto-docs.md index d046f471..02b9a01b 100644 --- a/docs/proto/proto-docs.md +++ b/docs/proto/proto-docs.md @@ -15,8 +15,6 @@ - [Query](#osmosis.meshsecurityprovider.Query) - [osmosis/meshsecurityprovider/tx.proto](#osmosis/meshsecurityprovider/tx.proto) - - [MsgBond](#osmosis.meshsecurityprovider.MsgBond) - - [MsgBondResponse](#osmosis.meshsecurityprovider.MsgBondResponse) - [MsgTest](#osmosis.meshsecurityprovider.MsgTest) - [MsgTestResponse](#osmosis.meshsecurityprovider.MsgTestResponse) - [MsgUpdateParams](#osmosis.meshsecurityprovider.MsgUpdateParams) @@ -132,32 +130,6 @@ GenesisState defines the meshsecurityprovider module's genesis state. - - -### MsgBond -MsgBond defines a message for bonding to vault contract. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `delegator_address` | [string](#string) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - -### MsgBondResponse -MsgBondResponse defines the Msg/Bond response type. - - - - - - ### MsgTest @@ -231,7 +203,6 @@ Since: cosmos-sdk 0.47 | ----------- | ------------ | ------------- | ------------| ------- | -------- | | `Test` | [MsgTest](#osmosis.meshsecurityprovider.MsgTest) | [MsgTestResponse](#osmosis.meshsecurityprovider.MsgTestResponse) | | | | `UpdateParams` | [MsgUpdateParams](#osmosis.meshsecurityprovider.MsgUpdateParams) | [MsgUpdateParamsResponse](#osmosis.meshsecurityprovider.MsgUpdateParamsResponse) | UpdateParams defines an operation for updating the module's parameters. Since: cosmos-sdk 0.47 | | -| `Bond` | [MsgBond](#osmosis.meshsecurityprovider.MsgBond) | [MsgBondResponse](#osmosis.meshsecurityprovider.MsgBondResponse) | Bond defines an operation for bonding to vault contract. | | diff --git a/x/meshsecurityprovider/types/tx.pb.go b/x/meshsecurityprovider/types/tx.pb.go index 74a54380..230b8108 100644 --- a/x/meshsecurityprovider/types/tx.pb.go +++ b/x/meshsecurityprovider/types/tx.pb.go @@ -7,7 +7,7 @@ import ( context "context" fmt "fmt" _ "github.com/cosmos/cosmos-proto" - types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" @@ -213,89 +213,11 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo -// MsgBond defines a message for bonding to vault contract. -type MsgBond struct { - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - Amount types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"` -} - -func (m *MsgBond) Reset() { *m = MsgBond{} } -func (m *MsgBond) String() string { return proto.CompactTextString(m) } -func (*MsgBond) ProtoMessage() {} -func (*MsgBond) Descriptor() ([]byte, []int) { - return fileDescriptor_2777f63b77ca86c2, []int{4} -} -func (m *MsgBond) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgBond) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgBond.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 *MsgBond) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgBond.Merge(m, src) -} -func (m *MsgBond) XXX_Size() int { - return m.Size() -} -func (m *MsgBond) XXX_DiscardUnknown() { - xxx_messageInfo_MsgBond.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgBond proto.InternalMessageInfo - -// MsgBondResponse defines the Msg/Bond response type. -type MsgBondResponse struct { -} - -func (m *MsgBondResponse) Reset() { *m = MsgBondResponse{} } -func (m *MsgBondResponse) String() string { return proto.CompactTextString(m) } -func (*MsgBondResponse) ProtoMessage() {} -func (*MsgBondResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2777f63b77ca86c2, []int{5} -} -func (m *MsgBondResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgBondResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgBondResponse.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 *MsgBondResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgBondResponse.Merge(m, src) -} -func (m *MsgBondResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgBondResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgBondResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgBondResponse proto.InternalMessageInfo - func init() { proto.RegisterType((*MsgTest)(nil), "osmosis.meshsecurityprovider.MsgTest") proto.RegisterType((*MsgTestResponse)(nil), "osmosis.meshsecurityprovider.MsgTestResponse") proto.RegisterType((*MsgUpdateParams)(nil), "osmosis.meshsecurityprovider.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "osmosis.meshsecurityprovider.MsgUpdateParamsResponse") - proto.RegisterType((*MsgBond)(nil), "osmosis.meshsecurityprovider.MsgBond") - proto.RegisterType((*MsgBondResponse)(nil), "osmosis.meshsecurityprovider.MsgBondResponse") } func init() { @@ -303,41 +225,33 @@ func init() { } var fileDescriptor_2777f63b77ca86c2 = []byte{ - // 531 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0xb6, 0x4b, 0x08, 0xca, 0xf1, 0x33, 0x56, 0xa5, 0x26, 0x56, 0xe5, 0x54, 0x16, 0x95, 0x4a, - 0x24, 0xfb, 0x94, 0x02, 0x4b, 0xc4, 0x82, 0x11, 0x6c, 0x95, 0x90, 0x81, 0x05, 0x55, 0x2a, 0xe7, - 0xf8, 0xe4, 0x58, 0xc4, 0x3e, 0xcb, 0x77, 0x89, 0x9a, 0x0d, 0xc1, 0xc2, 0xc8, 0x9f, 0xd0, 0x91, - 0x09, 0x75, 0x60, 0x66, 0xee, 0x58, 0x31, 0x31, 0x55, 0x28, 0x19, 0xca, 0xcc, 0x5f, 0x80, 0xee, - 0xee, 0x25, 0x2d, 0xbf, 0xd2, 0x76, 0x49, 0xec, 0xf7, 0xbe, 0xef, 0xdd, 0xf7, 0xbd, 0x4f, 0x67, - 0xb4, 0xce, 0x78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f3, - 0x70, 0xe2, 0x98, 0xdf, 0x27, 0x8e, 0xf9, 0x61, 0xea, 0x18, 0x87, 0x53, 0xc7, 0xf8, 0x36, 0x75, - 0x8c, 0x97, 0x4f, 0x92, 0x54, 0xf4, 0x87, 0x91, 0xdf, 0x63, 0x19, 0x86, 0xc9, 0xde, 0x80, 0x44, - 0xfa, 0xca, 0x79, 0xb3, 0xf9, 0x1e, 0x8f, 0x5f, 0xe3, 0xdd, 0xff, 0x7c, 0x1a, 0xc6, 0x05, 0xe5, - 0x51, 0x55, 0xdd, 0xab, 0xbb, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x88, 0xfd, 0xcd, 0x15, 0x47, - 0x04, 0x00, 0x00, + // 411 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xcf, 0xaa, 0xd3, 0x40, + 0x14, 0xc6, 0x33, 0x7a, 0xad, 0xdc, 0xf1, 0x1f, 0x0d, 0x42, 0xdb, 0x50, 0xd2, 0x12, 0x2c, 0xd4, + 0x42, 0x32, 0xb4, 0xea, 0xa6, 0xcb, 0x2c, 0xdc, 0x15, 0x24, 0xe8, 0x46, 0x04, 0x9d, 0x24, 0x43, + 0x1a, 0x6c, 0x32, 0x21, 0x67, 0x5a, 0xda, 0x9d, 0xe8, 0x0b, 0xf8, 0x28, 0x7d, 0x8c, 0x2e, 0xbb, + 0x74, 0x55, 0x4a, 0xbb, 0xe8, 0xde, 0x27, 0x90, 0x64, 0x26, 0x54, 0x45, 0xab, 0x77, 0x93, 0x3f, + 0xe7, 0xfc, 0xbe, 0xf3, 0x7d, 0x33, 0x1c, 0xdc, 0xe3, 0x90, 0x70, 0x88, 0x81, 0x24, 0x0c, 0xa6, + 0xc0, 0x82, 0x79, 0x1e, 0x8b, 0x55, 0x96, 0xf3, 0x45, 0x1c, 0xb2, 0x9c, 0x88, 0xa5, 0x93, 0xe5, + 0x5c,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a, 0x80, 0xa3, 0x3d, 0xc2, 0xb7, 0x27, 0x10, 0xe9, 0xef, + 0xf0, 0x55, 0x79, 0xdc, 0xde, 0x65, 0x3b, 0x75, 0x3e, 0xc3, 0xfe, 0x2f, 0xac, 0x72, 0xd1, 0x05, + 0xbe, 0xff, 0xcb, 0x15, 0xfc, 0x5b, 0xfe, 0x33, 0x6e, 0xbc, 0xb8, 0x11, 0x5e, 0xb9, 0x1a, 0x77, + 0x3e, 0x9d, 0xd6, 0x03, 0xe4, 0x7e, 0xd8, 0x1c, 0x4c, 0xb4, 0x3d, 0x98, 0x68, 0x7f, 0x30, 0xd1, + 0xd7, 0xa3, 0xa9, 0x6d, 0x8f, 0xa6, 0xf6, 0xed, 0x68, 0x6a, 0x6f, 0x5f, 0x46, 0xb1, 0x98, 0xce, + 0x7d, 0x27, 0xe0, 0x09, 0x51, 0x0e, 0xf6, 0x8c, 0xfa, 0x72, 0xa1, 0xec, 0xca, 0xc7, 0x86, 0xf0, + 0x23, 0x59, 0xfe, 0x65, 0xf1, 0x57, 0x19, 0x03, 0xbf, 0x56, 0x6e, 0xcd, 0xb3, 0x1f, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x3b, 0x91, 0xc7, 0xa0, 0x25, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -357,8 +271,6 @@ type MsgClient interface { // parameters. // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) - // Bond defines an operation for bonding to vault contract. - Bond(ctx context.Context, in *MsgBond, opts ...grpc.CallOption) (*MsgBondResponse, error) } type msgClient struct { @@ -387,15 +299,6 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } -func (c *msgClient) Bond(ctx context.Context, in *MsgBond, opts ...grpc.CallOption) (*MsgBondResponse, error) { - out := new(MsgBondResponse) - err := c.cc.Invoke(ctx, "/osmosis.meshsecurityprovider.Msg/Bond", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // MsgServer is the server API for Msg service. type MsgServer interface { Test(context.Context, *MsgTest) (*MsgTestResponse, error) @@ -403,8 +306,6 @@ type MsgServer interface { // parameters. // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) - // Bond defines an operation for bonding to vault contract. - Bond(context.Context, *MsgBond) (*MsgBondResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -417,9 +318,6 @@ func (*UnimplementedMsgServer) Test(ctx context.Context, req *MsgTest) (*MsgTest func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } -func (*UnimplementedMsgServer) Bond(ctx context.Context, req *MsgBond) (*MsgBondResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Bond not implemented") -} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -461,24 +359,6 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -func _Msg_Bond_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgBond) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Bond(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/osmosis.meshsecurityprovider.Msg/Bond", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Bond(ctx, req.(*MsgBond)) - } - return interceptor(ctx, in, info, handler) -} - var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "osmosis.meshsecurityprovider.Msg", HandlerType: (*MsgServer)(nil), @@ -491,10 +371,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, - { - MethodName: "Bond", - Handler: _Msg_Bond_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "osmosis/meshsecurityprovider/tx.proto", @@ -616,69 +492,6 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgBond) 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 *MsgBond) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgBond) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.DelegatorAddress) > 0 { - i -= len(m.DelegatorAddress) - copy(dAtA[i:], m.DelegatorAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.DelegatorAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgBondResponse) 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 *MsgBondResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgBondResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -736,30 +549,6 @@ func (m *MsgUpdateParamsResponse) Size() (n int) { return n } -func (m *MsgBond) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DelegatorAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.Amount.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgBondResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1063,171 +852,6 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgBond) 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 ErrIntOverflowTx - } - 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: MsgBond: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgBond: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - 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 := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgBondResponse) 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 ErrIntOverflowTx - } - 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: MsgBondResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgBondResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0