From a711a7b35a5de53680cca1ceb881b2515a641a07 Mon Sep 17 00:00:00 2001 From: happycoder9345 Date: Mon, 23 Sep 2024 18:18:15 +0800 Subject: [PATCH] refactor code --- proto/lorenzo/btcstaking/v1/event.proto | 5 +- proto/lorenzo/btcstaking/v1/query.proto | 10 +- .../btcstaking/v1/staking_record.proto | 6 +- x/btcstaking/client/cli/query.go | 10 +- x/btcstaking/keeper/event_handler.go | 8 +- x/btcstaking/keeper/grpc_query.go | 12 +- x/btcstaking/keeper/staking.go | 20 +- x/btcstaking/types/event.pb.go | 237 +++++++++++++++--- x/btcstaking/types/events.go | 8 +- x/btcstaking/types/keys.go | 4 +- x/btcstaking/types/query.pb.go | 208 +++++++-------- x/btcstaking/types/query.pb.gw.go | 34 +-- x/btcstaking/types/staking_record.pb.go | 120 +++++---- 13 files changed, 433 insertions(+), 249 deletions(-) diff --git a/proto/lorenzo/btcstaking/v1/event.proto b/proto/lorenzo/btcstaking/v1/event.proto index 170236c..cf5deb2 100644 --- a/proto/lorenzo/btcstaking/v1/event.proto +++ b/proto/lorenzo/btcstaking/v1/event.proto @@ -11,7 +11,10 @@ option go_package = "github.com/Lorenzo-Protocol/lorenzo/v3/x/btcstaking/types"; message EventBTCStakingCreated { BTCStakingRecord record = 1; } // BTCB staking creation event -message EventBTCBStakingCreated { BTCBStakingRecord record = 1; } +message EventBTCBStakingCreated { XBTCStakingRecord record = 1; } + +// xBTC staking creation event +message EventxBTCStakingCreated { XBTCStakingRecord record = 1; } message EventBurnCreated { string signer = 1; diff --git a/proto/lorenzo/btcstaking/v1/query.proto b/proto/lorenzo/btcstaking/v1/query.proto index 04dd1d7..540aee4 100644 --- a/proto/lorenzo/btcstaking/v1/query.proto +++ b/proto/lorenzo/btcstaking/v1/query.proto @@ -18,9 +18,9 @@ service Query { option (google.api.http).get = "/lorenzo/btcstaking/v1/stakingRecord"; } - rpc BTCBStakingRecord(QueryBTCBStakingRecordRequest) - returns (QueryBTCBStakingRecordResponse) { - option (google.api.http).get = "/lorenzo/btcstaking/v1/btcb-staking-record"; + rpc XBTCStakingRecord(QueryxBTCStakingRecordRequest) + returns (QueryxBTCStakingRecordResponse) { + option (google.api.http).get = "/lorenzo/btcstaking/v1/xbtc-staking-record"; } } message QueryParamsRequest {} @@ -38,9 +38,9 @@ message StakingRecordDisplay { message QueryStakingRecordRequest { bytes txHash = 1; } message QueryStakingRecordResponse { BTCStakingRecord record = 1; } -message QueryBTCBStakingRecordRequest { +message QueryxBTCStakingRecordRequest { uint32 chain_id = 1; string contract = 2; uint64 staking_idx = 3; } -message QueryBTCBStakingRecordResponse { BTCBStakingRecord record = 1; } +message QueryxBTCStakingRecordResponse { XBTCStakingRecord record = 1; } diff --git a/proto/lorenzo/btcstaking/v1/staking_record.proto b/proto/lorenzo/btcstaking/v1/staking_record.proto index eb998fb..59ebd60 100644 --- a/proto/lorenzo/btcstaking/v1/staking_record.proto +++ b/proto/lorenzo/btcstaking/v1/staking_record.proto @@ -1,8 +1,6 @@ syntax = "proto3"; package lorenzo.btcstaking.v1; -import "cosmos/msg/v1/msg.proto"; -import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; // import "cosmos/staking/v1beta1/staking.proto"; @@ -19,8 +17,8 @@ message BTCStakingRecord { uint64 plan_id = 8; } -// BTCBStakingRecord defines the message for btcb staking record -message BTCBStakingRecord { +// XBTCStakingRecord defines the message for btc staking record +message XBTCStakingRecord { // staking_idx defines the staking index uint64 staking_idx = 1; // contract defines the contract diff --git a/x/btcstaking/client/cli/query.go b/x/btcstaking/client/cli/query.go index b9f9432..7bc99f6 100644 --- a/x/btcstaking/client/cli/query.go +++ b/x/btcstaking/client/cli/query.go @@ -25,7 +25,7 @@ func GetQueryCmd(queryRoute string) *cobra.Command { btcstakingQueryCmd.AddCommand( CmdGetParams(), CmdGetBTCStakingRecord(), - CmdGetBTCBStakingRecord(), + CmdGetxBTCStakingRecord(), ) return btcstakingQueryCmd @@ -92,9 +92,9 @@ func CmdGetBTCStakingRecord() *cobra.Command { return cmd } -func CmdGetBTCBStakingRecord() *cobra.Command { +func CmdGetxBTCStakingRecord() *cobra.Command { cmd := &cobra.Command{ - Use: "btcb-staking-record [chain-id] [contract] [staking-idx]", + Use: "xbtc-staking-record [chain-id] [contract] [staking-idx]", Short: "get the btcb staking record", Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { @@ -110,8 +110,8 @@ func CmdGetBTCBStakingRecord() *cobra.Command { return fmt.Errorf("invalid staking idx: %s", args[0]) } - res, err := queryClient.BTCBStakingRecord(cmd.Context(), - &types.QueryBTCBStakingRecordRequest{ + res, err := queryClient.XBTCStakingRecord(cmd.Context(), + &types.QueryxBTCStakingRecordRequest{ ChainId: uint32(chainID), Contract: args[1], StakingIdx: stakingIdx, diff --git a/x/btcstaking/keeper/event_handler.go b/x/btcstaking/keeper/event_handler.go index 15274b7..ebaa15a 100644 --- a/x/btcstaking/keeper/event_handler.go +++ b/x/btcstaking/keeper/event_handler.go @@ -40,7 +40,7 @@ func (e *eventHandler) Execute(ctx sdk.Context, chainID uint32, events []*ccevty return err } - if e.keeper.hasBTCBStakingRecord(ctx, chainID, event.Contract.Bytes(), event.Identifier) { + if e.keeper.hasxBTCStakingRecord(ctx, chainID, event.Contract.Bytes(), event.Identifier) { return types.ErrDuplicateStakingEvent.Wrapf("duplicate event,planID %d,stakingIdx %d,contract %s", event.PlanID, event.Identifier, @@ -52,7 +52,7 @@ func (e *eventHandler) Execute(ctx sdk.Context, chainID uint32, events []*ccevty result := "" totalStBTCAmt = totalStBTCAmt.Add(totalStBTCAmt, amount) - btcbStakingRecord := &types.BTCBStakingRecord{ + xbtcStakingRecord := &types.XBTCStakingRecord{ StakingIdx: event.Identifier, Contract: event.Contract.Bytes(), ReceiverAddr: event.Sender.String(), @@ -62,9 +62,9 @@ func (e *eventHandler) Execute(ctx sdk.Context, chainID uint32, events []*ccevty PlanId: event.PlanID, } - e.keeper.addBTCBStakingRecord(ctx, btcbStakingRecord) + e.keeper.addxBTCStakingRecord(ctx, xbtcStakingRecord) // emit an event - ctx.EventManager().EmitTypedEvent(types.NewEventBTCBStakingCreated(btcbStakingRecord)) //nolint:errcheck,gosec + ctx.EventManager().EmitTypedEvent(types.NewEventXBTCStakingCreated(xbtcStakingRecord)) //nolint:errcheck,gosec } // mint stBTC to the bridgeAddr diff --git a/x/btcstaking/keeper/grpc_query.go b/x/btcstaking/keeper/grpc_query.go index 6460360..d0f8613 100644 --- a/x/btcstaking/keeper/grpc_query.go +++ b/x/btcstaking/keeper/grpc_query.go @@ -42,25 +42,25 @@ func (k Keeper) StakingRecord(c context.Context, req *types.QueryStakingRecordRe return &types.QueryStakingRecordResponse{Record: stakingRecord}, nil } -// BTCBStakingRecord retrieves the BTCB staking record for the given contract and staking index. +// XBTCStakingRecord retrieves the xBTC staking record for the given contract and staking index. // // Parameters: // - c: The context.Context object for the request. -// - req: The QueryBTCBStakingRecordRequest object containing the contract address and staking index. +// - req: The QueryxBTCStakingRecordRequest object containing the contract address and staking index. // // Returns: -// - *types.QueryBTCBStakingRecordResponse: The BTCB staking record response. +// - *types.QueryxBTCStakingRecordResponse: The BTCB staking record response. // - error: An error if the staking record retrieval fails. -func (k Keeper) BTCBStakingRecord(c context.Context, req *types.QueryBTCBStakingRecordRequest) (*types.QueryBTCBStakingRecordResponse, error) { +func (k Keeper) XBTCStakingRecord(c context.Context, req *types.QueryxBTCStakingRecordRequest) (*types.QueryxBTCStakingRecordResponse, error) { ctx := sdk.UnwrapSDKContext(c) contract := common.HexToAddress(req.Contract) // get the staking record - stakingRecord, err := k.getBTCBStakingRecord(ctx, req.ChainId, contract[:], req.StakingIdx) + stakingRecord, err := k.getxBTCBtakingRecord(ctx, req.ChainId, contract[:], req.StakingIdx) if err != nil { return nil, err } - return &types.QueryBTCBStakingRecordResponse{Record: stakingRecord}, nil + return &types.QueryxBTCStakingRecordResponse{Record: stakingRecord}, nil } // NewQuerierImpl returns an implementation of the captains QueryServer interface. diff --git a/x/btcstaking/keeper/staking.go b/x/btcstaking/keeper/staking.go index da75f84..f0630e1 100644 --- a/x/btcstaking/keeper/staking.go +++ b/x/btcstaking/keeper/staking.go @@ -44,7 +44,7 @@ func (k Keeper) DepositBTCB( totalStBTCAmt := new(big.Int) for i := range events { event := events[i] - if k.hasBTCBStakingRecord(ctx, event.ChainID, event.Contract.Bytes(), event.Identifier) { + if k.hasxBTCStakingRecord(ctx, event.ChainID, event.Contract.Bytes(), event.Identifier) { return types.ErrDuplicateStakingEvent.Wrapf("duplicate event,planID %d,stakingIdx %d,contract %s", event.PlanID, event.Identifier, @@ -72,7 +72,7 @@ func (k Keeper) DepositBTCB( totalStBTCAmt = totalStBTCAmt.Add(totalStBTCAmt, amount) - btcbStakingRecord := &types.BTCBStakingRecord{ + btcbStakingRecord := &types.XBTCStakingRecord{ StakingIdx: event.Identifier, Contract: event.Contract.Bytes(), ReceiverAddr: event.Sender.String(), @@ -82,7 +82,7 @@ func (k Keeper) DepositBTCB( PlanId: event.PlanID, } - k.addBTCBStakingRecord(ctx, btcbStakingRecord) + k.addxBTCStakingRecord(ctx, btcbStakingRecord) // emit an event ctx.EventManager().EmitTypedEvent(types.NewEventBTCBStakingCreated(btcbStakingRecord)) //nolint:errcheck,gosec @@ -126,26 +126,26 @@ func (k Keeper) DepositxBTC( return k.ccevKeeper.VerifyAndCallback(ctx, chainID, number, receiptBz, proofBz, &eventHandler{k}) } -func (k Keeper) addBTCBStakingRecord(ctx sdk.Context, record *types.BTCBStakingRecord) { +func (k Keeper) addxBTCStakingRecord(ctx sdk.Context, record *types.XBTCStakingRecord) { store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshal(record) - store.Set(types.KeyBTCBStakingRecord(record.ChainId, record.Contract, record.StakingIdx), bz) + store.Set(types.KeyxBTCStakingRecord(record.ChainId, record.Contract, record.StakingIdx), bz) } -func (k Keeper) hasBTCBStakingRecord(ctx sdk.Context, chainID uint32, contract []byte, stakingIdx uint64) bool { +func (k Keeper) hasxBTCStakingRecord(ctx sdk.Context, chainID uint32, contract []byte, stakingIdx uint64) bool { store := ctx.KVStore(k.storeKey) - key := types.KeyBTCBStakingRecord(chainID, contract, stakingIdx) + key := types.KeyxBTCStakingRecord(chainID, contract, stakingIdx) return store.Has(key) } -func (k Keeper) getBTCBStakingRecord(ctx sdk.Context, chainID uint32, contract []byte, stakingIdx uint64) (*types.BTCBStakingRecord, error) { +func (k Keeper) getxBTCBtakingRecord(ctx sdk.Context, chainID uint32, contract []byte, stakingIdx uint64) (*types.XBTCStakingRecord, error) { store := ctx.KVStore(k.storeKey) - key := types.KeyBTCBStakingRecord(chainID, contract, stakingIdx) + key := types.KeyxBTCStakingRecord(chainID, contract, stakingIdx) bz := store.Get(key) if len(bz) == 0 { return nil, types.ErrStakingRecordNotFound } - var record types.BTCBStakingRecord + var record types.XBTCStakingRecord k.cdc.MustUnmarshal(bz, &record) return &record, nil } \ No newline at end of file diff --git a/x/btcstaking/types/event.pb.go b/x/btcstaking/types/event.pb.go index 8bceb8a..2663849 100644 --- a/x/btcstaking/types/event.pb.go +++ b/x/btcstaking/types/event.pb.go @@ -71,7 +71,7 @@ func (m *EventBTCStakingCreated) GetRecord() *BTCStakingRecord { // BTCB staking creation event type EventBTCBStakingCreated struct { - Record *BTCBStakingRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` + Record *XBTCStakingRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` } func (m *EventBTCBStakingCreated) Reset() { *m = EventBTCBStakingCreated{} } @@ -107,7 +107,52 @@ func (m *EventBTCBStakingCreated) XXX_DiscardUnknown() { var xxx_messageInfo_EventBTCBStakingCreated proto.InternalMessageInfo -func (m *EventBTCBStakingCreated) GetRecord() *BTCBStakingRecord { +func (m *EventBTCBStakingCreated) GetRecord() *XBTCStakingRecord { + if m != nil { + return m.Record + } + return nil +} + +// xBTC staking creation event +type EventxBTCStakingCreated struct { + Record *XBTCStakingRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` +} + +func (m *EventxBTCStakingCreated) Reset() { *m = EventxBTCStakingCreated{} } +func (m *EventxBTCStakingCreated) String() string { return proto.CompactTextString(m) } +func (*EventxBTCStakingCreated) ProtoMessage() {} +func (*EventxBTCStakingCreated) Descriptor() ([]byte, []int) { + return fileDescriptor_3a42123e8d61ab98, []int{2} +} +func (m *EventxBTCStakingCreated) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventxBTCStakingCreated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventxBTCStakingCreated.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 *EventxBTCStakingCreated) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventxBTCStakingCreated.Merge(m, src) +} +func (m *EventxBTCStakingCreated) XXX_Size() int { + return m.Size() +} +func (m *EventxBTCStakingCreated) XXX_DiscardUnknown() { + xxx_messageInfo_EventxBTCStakingCreated.DiscardUnknown(m) +} + +var xxx_messageInfo_EventxBTCStakingCreated proto.InternalMessageInfo + +func (m *EventxBTCStakingCreated) GetRecord() *XBTCStakingRecord { if m != nil { return m.Record } @@ -124,7 +169,7 @@ func (m *EventBurnCreated) Reset() { *m = EventBurnCreated{} } func (m *EventBurnCreated) String() string { return proto.CompactTextString(m) } func (*EventBurnCreated) ProtoMessage() {} func (*EventBurnCreated) Descriptor() ([]byte, []int) { - return fileDescriptor_3a42123e8d61ab98, []int{2} + return fileDescriptor_3a42123e8d61ab98, []int{3} } func (m *EventBurnCreated) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -177,36 +222,38 @@ func (m *EventBurnCreated) GetAmount() types.Coin { func init() { proto.RegisterType((*EventBTCStakingCreated)(nil), "lorenzo.btcstaking.v1.EventBTCStakingCreated") proto.RegisterType((*EventBTCBStakingCreated)(nil), "lorenzo.btcstaking.v1.EventBTCBStakingCreated") + proto.RegisterType((*EventxBTCStakingCreated)(nil), "lorenzo.btcstaking.v1.EventxBTCStakingCreated") proto.RegisterType((*EventBurnCreated)(nil), "lorenzo.btcstaking.v1.EventBurnCreated") } func init() { proto.RegisterFile("lorenzo/btcstaking/v1/event.proto", fileDescriptor_3a42123e8d61ab98) } var fileDescriptor_3a42123e8d61ab98 = []byte{ - // 369 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xc1, 0x4e, 0xc2, 0x30, - 0x18, 0xc7, 0x37, 0x4d, 0x96, 0x58, 0x2f, 0x64, 0x51, 0x44, 0x0e, 0x43, 0xb9, 0x48, 0x8c, 0xb4, - 0x4e, 0x4e, 0x9e, 0xd4, 0x11, 0x6f, 0x1e, 0xcc, 0xe0, 0xa2, 0x1e, 0xc8, 0xd6, 0x35, 0x73, 0x01, - 0x5a, 0xd2, 0x96, 0x45, 0x7d, 0x0a, 0x9f, 0xc3, 0x77, 0xf0, 0xce, 0x91, 0xa3, 0x27, 0x35, 0xf0, - 0x22, 0x66, 0x6d, 0x09, 0x84, 0xe0, 0x69, 0xdf, 0xda, 0xff, 0xf7, 0xfb, 0xbe, 0xf4, 0x07, 0x8e, - 0x07, 0x8c, 0x13, 0xfa, 0xc6, 0x50, 0x2c, 0xb1, 0x90, 0x51, 0x3f, 0xa3, 0x29, 0xca, 0x7d, 0x44, - 0x72, 0x42, 0x25, 0x1c, 0x71, 0x26, 0x99, 0xbb, 0x6f, 0x22, 0x70, 0x19, 0x81, 0xb9, 0x5f, 0xf5, - 0x30, 0x13, 0x43, 0x26, 0x50, 0x1c, 0x09, 0x82, 0x72, 0x3f, 0x26, 0x32, 0xf2, 0x11, 0x66, 0x19, - 0xd5, 0x6d, 0xd5, 0xbd, 0x94, 0xa5, 0x4c, 0x95, 0xa8, 0xa8, 0xcc, 0xe9, 0xe9, 0xe6, 0x79, 0xa6, - 0xec, 0x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d, 0xeb, 0xf1, 0x72, 0x85, 0x75, 0xa7, 0x5f, 0xa5, - 0x79, 0x5f, 0xb8, 0xc2, 0x6c, 0x80, 0x16, 0x66, 0xf3, 0x16, 0x7a, 0x59, 0xd5, 0xab, 0x46, 0xc4, - 0x8e, 0x72, 0xda, 0xfa, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x8d, 0x54, 0x23, 0x7f, 0x71, 0x02, 0x00, + // 385 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0x3f, 0x4f, 0xe3, 0x30, + 0x18, 0xc6, 0x93, 0x3b, 0x29, 0xd2, 0xf9, 0x96, 0x2a, 0xba, 0xeb, 0xf5, 0x3a, 0xa4, 0x77, 0x5d, + 0xa8, 0x10, 0xb5, 0x09, 0x9d, 0x98, 0x80, 0x54, 0x6c, 0x0c, 0x28, 0xed, 0xc0, 0x9f, 0xa1, 0x4a, + 0x1c, 0x2b, 0x44, 0x6d, 0xed, 0xca, 0x76, 0xa3, 0xc2, 0xa7, 0xe0, 0x73, 0xf0, 0x1d, 0xd8, 0x3b, + 0x76, 0x64, 0x02, 0xd4, 0x7e, 0x11, 0x14, 0xdb, 0x55, 0xab, 0x52, 0xc4, 0xc0, 0x94, 0x37, 0xf6, + 0xf3, 0xfe, 0xde, 0x47, 0x7e, 0x1f, 0xf0, 0x7f, 0xc0, 0x38, 0xa1, 0x77, 0x0c, 0xc5, 0x12, 0x0b, + 0x19, 0xf5, 0x33, 0x9a, 0xa2, 0xdc, 0x47, 0x24, 0x27, 0x54, 0xc2, 0x11, 0x67, 0x92, 0xb9, 0xbf, + 0x8d, 0x04, 0xae, 0x24, 0x30, 0xf7, 0xab, 0x1e, 0x66, 0x62, 0xc8, 0x04, 0x8a, 0x23, 0x41, 0x50, + 0xee, 0xc7, 0x44, 0x46, 0x3e, 0xc2, 0x2c, 0xa3, 0xba, 0xad, 0xfa, 0x2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, 0x3a, 0xd3, 0xb9, 0x67, 0xcf, 0xe6, 0x9e, 0xfd, 0x3a, 0xf7, 0xec, 0xfb, 0x85, + 0x67, 0xcd, 0x16, 0x9e, 0xf5, 0xb4, 0xf0, 0xac, 0xab, 0xc3, 0x35, 0xd6, 0x99, 0x7e, 0x95, 0xe6, + 0x79, 0x11, 0x04, 0xcc, 0x06, 0x68, 0x19, 0x9b, 0xbc, 0x85, 0x26, 0xeb, 0xd9, 0x51, 0x23, 0x62, + 0x47, 0x05, 0xa6, 0xf5, 0x16, 0x00, 0x00, 0xff, 0xff, 0x10, 0xe4, 0x55, 0x91, 0xce, 0x02, 0x00, 0x00, } @@ -280,6 +327,41 @@ func (m *EventBTCBStakingCreated) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *EventxBTCStakingCreated) 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 *EventxBTCStakingCreated) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventxBTCStakingCreated) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Record != nil { + { + size, err := m.Record.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *EventBurnCreated) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -364,6 +446,19 @@ func (m *EventBTCBStakingCreated) Size() (n int) { return n } +func (m *EventxBTCStakingCreated) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Record != nil { + l = m.Record.Size() + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + func (m *EventBurnCreated) Size() (n int) { if m == nil { return 0 @@ -534,7 +629,93 @@ func (m *EventBTCBStakingCreated) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Record == nil { - m.Record = &BTCBStakingRecord{} + m.Record = &XBTCStakingRecord{} + } + if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventxBTCStakingCreated) 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 ErrIntOverflowEvent + } + 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: EventxBTCStakingCreated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventxBTCStakingCreated: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Record == nil { + m.Record = &XBTCStakingRecord{} } if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/btcstaking/types/events.go b/x/btcstaking/types/events.go index 0132474..8eacb33 100644 --- a/x/btcstaking/types/events.go +++ b/x/btcstaking/types/events.go @@ -11,7 +11,13 @@ func NewEventBTCStakingCreated(record *BTCStakingRecord) *EventBTCStakingCreated } } -func NewEventBTCBStakingCreated(record *BTCBStakingRecord) *EventBTCBStakingCreated { +func NewEventBTCBStakingCreated(record *XBTCStakingRecord) *EventBTCBStakingCreated { + return &EventBTCBStakingCreated{ + Record: record, + } +} + +func NewEventXBTCStakingCreated(record *XBTCStakingRecord) *EventBTCBStakingCreated { return &EventBTCBStakingCreated{ Record: record, } diff --git a/x/btcstaking/types/keys.go b/x/btcstaking/types/keys.go index e56b9c5..476a8e2 100644 --- a/x/btcstaking/types/keys.go +++ b/x/btcstaking/types/keys.go @@ -37,8 +37,8 @@ func KeyPrefix(p string) []byte { return []byte(p) } -// KeyBTCBStakingRecord returns the key for the BTCB staking record -func KeyBTCBStakingRecord(chainID uint32, contract []byte, stakingIdx uint64) []byte { +// KeyxBTCStakingRecord returns the key for the BTCB staking record +func KeyxBTCStakingRecord(chainID uint32, contract []byte, stakingIdx uint64) []byte { key := append([]byte{}, BTCBStakingRecordKey...) chainIDBz := sdk.Uint64ToBigEndian(uint64(chainID)) diff --git a/x/btcstaking/types/query.pb.go b/x/btcstaking/types/query.pb.go index bd1c755..8b0ace1 100644 --- a/x/btcstaking/types/query.pb.go +++ b/x/btcstaking/types/query.pb.go @@ -282,24 +282,24 @@ func (m *QueryStakingRecordResponse) GetRecord() *BTCStakingRecord { return nil } -type QueryBTCBStakingRecordRequest struct { +type QueryxBTCStakingRecordRequest struct { ChainId uint32 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` Contract string `protobuf:"bytes,2,opt,name=contract,proto3" json:"contract,omitempty"` StakingIdx uint64 `protobuf:"varint,3,opt,name=staking_idx,json=stakingIdx,proto3" json:"staking_idx,omitempty"` } -func (m *QueryBTCBStakingRecordRequest) Reset() { *m = QueryBTCBStakingRecordRequest{} } -func (m *QueryBTCBStakingRecordRequest) String() string { return proto.CompactTextString(m) } -func (*QueryBTCBStakingRecordRequest) ProtoMessage() {} -func (*QueryBTCBStakingRecordRequest) Descriptor() ([]byte, []int) { +func (m *QueryxBTCStakingRecordRequest) Reset() { *m = QueryxBTCStakingRecordRequest{} } +func (m *QueryxBTCStakingRecordRequest) String() string { return proto.CompactTextString(m) } +func (*QueryxBTCStakingRecordRequest) ProtoMessage() {} +func (*QueryxBTCStakingRecordRequest) Descriptor() ([]byte, []int) { return fileDescriptor_d9c98ee28fc92429, []int{5} } -func (m *QueryBTCBStakingRecordRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryxBTCStakingRecordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryBTCBStakingRecordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryxBTCStakingRecordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryBTCBStakingRecordRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryxBTCStakingRecordRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -309,55 +309,55 @@ func (m *QueryBTCBStakingRecordRequest) XXX_Marshal(b []byte, deterministic bool return b[:n], nil } } -func (m *QueryBTCBStakingRecordRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBTCBStakingRecordRequest.Merge(m, src) +func (m *QueryxBTCStakingRecordRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryxBTCStakingRecordRequest.Merge(m, src) } -func (m *QueryBTCBStakingRecordRequest) XXX_Size() int { +func (m *QueryxBTCStakingRecordRequest) XXX_Size() int { return m.Size() } -func (m *QueryBTCBStakingRecordRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBTCBStakingRecordRequest.DiscardUnknown(m) +func (m *QueryxBTCStakingRecordRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryxBTCStakingRecordRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryBTCBStakingRecordRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryxBTCStakingRecordRequest proto.InternalMessageInfo -func (m *QueryBTCBStakingRecordRequest) GetChainId() uint32 { +func (m *QueryxBTCStakingRecordRequest) GetChainId() uint32 { if m != nil { return m.ChainId } return 0 } -func (m *QueryBTCBStakingRecordRequest) GetContract() string { +func (m *QueryxBTCStakingRecordRequest) GetContract() string { if m != nil { return m.Contract } return "" } -func (m *QueryBTCBStakingRecordRequest) GetStakingIdx() uint64 { +func (m *QueryxBTCStakingRecordRequest) GetStakingIdx() uint64 { if m != nil { return m.StakingIdx } return 0 } -type QueryBTCBStakingRecordResponse struct { - Record *BTCBStakingRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` +type QueryxBTCStakingRecordResponse struct { + Record *XBTCStakingRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` } -func (m *QueryBTCBStakingRecordResponse) Reset() { *m = QueryBTCBStakingRecordResponse{} } -func (m *QueryBTCBStakingRecordResponse) String() string { return proto.CompactTextString(m) } -func (*QueryBTCBStakingRecordResponse) ProtoMessage() {} -func (*QueryBTCBStakingRecordResponse) Descriptor() ([]byte, []int) { +func (m *QueryxBTCStakingRecordResponse) Reset() { *m = QueryxBTCStakingRecordResponse{} } +func (m *QueryxBTCStakingRecordResponse) String() string { return proto.CompactTextString(m) } +func (*QueryxBTCStakingRecordResponse) ProtoMessage() {} +func (*QueryxBTCStakingRecordResponse) Descriptor() ([]byte, []int) { return fileDescriptor_d9c98ee28fc92429, []int{6} } -func (m *QueryBTCBStakingRecordResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryxBTCStakingRecordResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryBTCBStakingRecordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryxBTCStakingRecordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryBTCBStakingRecordResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryxBTCStakingRecordResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -367,19 +367,19 @@ func (m *QueryBTCBStakingRecordResponse) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } -func (m *QueryBTCBStakingRecordResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBTCBStakingRecordResponse.Merge(m, src) +func (m *QueryxBTCStakingRecordResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryxBTCStakingRecordResponse.Merge(m, src) } -func (m *QueryBTCBStakingRecordResponse) XXX_Size() int { +func (m *QueryxBTCStakingRecordResponse) XXX_Size() int { return m.Size() } -func (m *QueryBTCBStakingRecordResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBTCBStakingRecordResponse.DiscardUnknown(m) +func (m *QueryxBTCStakingRecordResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryxBTCStakingRecordResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryBTCBStakingRecordResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryxBTCStakingRecordResponse proto.InternalMessageInfo -func (m *QueryBTCBStakingRecordResponse) GetRecord() *BTCBStakingRecord { +func (m *QueryxBTCStakingRecordResponse) GetRecord() *XBTCStakingRecord { if m != nil { return m.Record } @@ -392,54 +392,54 @@ func init() { proto.RegisterType((*StakingRecordDisplay)(nil), "lorenzo.btcstaking.v1.StakingRecordDisplay") proto.RegisterType((*QueryStakingRecordRequest)(nil), "lorenzo.btcstaking.v1.QueryStakingRecordRequest") proto.RegisterType((*QueryStakingRecordResponse)(nil), "lorenzo.btcstaking.v1.QueryStakingRecordResponse") - proto.RegisterType((*QueryBTCBStakingRecordRequest)(nil), "lorenzo.btcstaking.v1.QueryBTCBStakingRecordRequest") - proto.RegisterType((*QueryBTCBStakingRecordResponse)(nil), "lorenzo.btcstaking.v1.QueryBTCBStakingRecordResponse") + proto.RegisterType((*QueryxBTCStakingRecordRequest)(nil), "lorenzo.btcstaking.v1.QueryxBTCStakingRecordRequest") + proto.RegisterType((*QueryxBTCStakingRecordResponse)(nil), "lorenzo.btcstaking.v1.QueryxBTCStakingRecordResponse") } func init() { proto.RegisterFile("lorenzo/btcstaking/v1/query.proto", fileDescriptor_d9c98ee28fc92429) } var fileDescriptor_d9c98ee28fc92429 = []byte{ // 641 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4f, 0x4f, 0x13, 0x41, - 0x14, 0x67, 0xf9, 0x53, 0xe1, 0x01, 0xfe, 0x19, 0xd0, 0x94, 0x8d, 0x5d, 0x70, 0x83, 0x0a, 0x0d, - 0x74, 0x2c, 0xc8, 0xc1, 0x93, 0x5a, 0x3c, 0x48, 0x42, 0x0c, 0x16, 0x4e, 0x26, 0xa6, 0x99, 0x9d, - 0x9d, 0x2c, 0x1b, 0xdb, 0x99, 0xb2, 0x33, 0xad, 0xc5, 0xa3, 0x07, 0xcf, 0x26, 0x7e, 0x03, 0x3f, - 0x83, 0x1f, 0xc2, 0x93, 0x21, 0xf1, 0xe2, 0xd1, 0x80, 0x47, 0x3f, 0x84, 0xd9, 0x99, 0x01, 0xa9, - 0xec, 0x36, 0x72, 0x9b, 0xf7, 0xe6, 0xf7, 0xde, 0xfb, 0xfd, 0x7e, 0xfb, 0x76, 0xe0, 0x4e, 0x53, - 0x24, 0x8c, 0xbf, 0x13, 0x38, 0x50, 0x54, 0x2a, 0xf2, 0x26, 0xe6, 0x11, 0xee, 0x56, 0xf1, 0x41, - 0x87, 0x25, 0x87, 0x95, 0x76, 0x22, 0x94, 0x40, 0x37, 0x2d, 0xa4, 0xf2, 0x17, 0x52, 0xe9, 0x56, - 0xdd, 0x72, 0x76, 0xa5, 0x3d, 0x36, 0x12, 0x46, 0x45, 0x12, 0x9a, 0x16, 0xae, 0x9f, 0x8d, 0x6d, - 0x93, 0x84, 0xb4, 0xa4, 0xc5, 0xcc, 0x46, 0x22, 0x12, 0xfa, 0x88, 0xd3, 0x93, 0xcd, 0xde, 0x8e, - 0x84, 0x88, 0x9a, 0x0c, 0x93, 0x76, 0x8c, 0x09, 0xe7, 0x42, 0x11, 0x15, 0x0b, 0x7e, 0x5a, 0x53, - 0xa6, 0x42, 0xb6, 0x84, 0xc4, 0x01, 0x91, 0xcc, 0x70, 0xc6, 0xdd, 0x6a, 0xc0, 0x14, 0x49, 0x7b, - 0x47, 0x31, 0xd7, 0x60, 0x83, 0xf5, 0x67, 0x01, 0xbd, 0x4c, 0x11, 0x3b, 0x7a, 0x68, 0x9d, 0x1d, - 0x74, 0x98, 0x54, 0xfe, 0x36, 0xcc, 0xf4, 0x65, 0x65, 0x5b, 0x70, 0xc9, 0xd0, 0x06, 0x14, 0x0c, - 0xb9, 0xa2, 0xb3, 0xe0, 0x2c, 0x4d, 0xae, 0x95, 0x2a, 0x99, 0x26, 0x54, 0x6c, 0x99, 0x05, 0xfb, - 0xdf, 0x1c, 0x98, 0xdd, 0x35, 0xb7, 0x75, 0xad, 0xff, 0x59, 0x2c, 0xdb, 0x4d, 0x72, 0x88, 0x66, - 0x60, 0x4c, 0xf5, 0x1a, 0x71, 0xa8, 0xdb, 0x4d, 0xd4, 0x47, 0x55, 0x6f, 0x2b, 0x44, 0xcb, 0x70, - 0x3d, 0x61, 0x94, 0xc5, 0x5d, 0x96, 0x34, 0x48, 0x18, 0x26, 0x4c, 0xca, 0xe2, 0xb0, 0xbe, 0xbf, - 0x76, 0x9a, 0x7f, 0x6a, 0xd2, 0xe8, 0x16, 0x14, 0x48, 0x4b, 0x74, 0xb8, 0x2a, 0x8e, 0x68, 0x80, - 0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xe4, 0x39, + 0x3f, 0x8e, 0x3c, 0xe7, 0xc3, 0xb1, 0x37, 0x74, 0x78, 0xec, 0x0d, 0x7d, 0x3f, 0xf6, 0x86, 0x5e, + 0xde, 0x8b, 0x62, 0xb5, 0xd7, 0x09, 0x6a, 0x54, 0xb4, 0xf1, 0xb6, 0xe9, 0xb7, 0xba, 0x93, 0x3f, + 0x64, 0x54, 0xb4, 0x4e, 0x07, 0x74, 0xd7, 0x71, 0x76, 0x76, 0x8a, 0x3a, 0x48, 0x98, 0x0c, 0x4a, + 0xfa, 0xc1, 0x5b, 0xff, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x50, 0x67, 0x8d, 0xdc, 0x05, 0x00, 0x00, } @@ -457,7 +457,7 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) StakingRecord(ctx context.Context, in *QueryStakingRecordRequest, opts ...grpc.CallOption) (*QueryStakingRecordResponse, error) - BTCBStakingRecord(ctx context.Context, in *QueryBTCBStakingRecordRequest, opts ...grpc.CallOption) (*QueryBTCBStakingRecordResponse, error) + XBTCStakingRecord(ctx context.Context, in *QueryxBTCStakingRecordRequest, opts ...grpc.CallOption) (*QueryxBTCStakingRecordResponse, error) } type queryClient struct { @@ -486,9 +486,9 @@ func (c *queryClient) StakingRecord(ctx context.Context, in *QueryStakingRecordR return out, nil } -func (c *queryClient) BTCBStakingRecord(ctx context.Context, in *QueryBTCBStakingRecordRequest, opts ...grpc.CallOption) (*QueryBTCBStakingRecordResponse, error) { - out := new(QueryBTCBStakingRecordResponse) - err := c.cc.Invoke(ctx, "/lorenzo.btcstaking.v1.Query/BTCBStakingRecord", in, out, opts...) +func (c *queryClient) XBTCStakingRecord(ctx context.Context, in *QueryxBTCStakingRecordRequest, opts ...grpc.CallOption) (*QueryxBTCStakingRecordResponse, error) { + out := new(QueryxBTCStakingRecordResponse) + err := c.cc.Invoke(ctx, "/lorenzo.btcstaking.v1.Query/XBTCStakingRecord", in, out, opts...) if err != nil { return nil, err } @@ -499,7 +499,7 @@ func (c *queryClient) BTCBStakingRecord(ctx context.Context, in *QueryBTCBStakin type QueryServer interface { Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) StakingRecord(context.Context, *QueryStakingRecordRequest) (*QueryStakingRecordResponse, error) - BTCBStakingRecord(context.Context, *QueryBTCBStakingRecordRequest) (*QueryBTCBStakingRecordResponse, error) + XBTCStakingRecord(context.Context, *QueryxBTCStakingRecordRequest) (*QueryxBTCStakingRecordResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -512,8 +512,8 @@ func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsReq func (*UnimplementedQueryServer) StakingRecord(ctx context.Context, req *QueryStakingRecordRequest) (*QueryStakingRecordResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StakingRecord not implemented") } -func (*UnimplementedQueryServer) BTCBStakingRecord(ctx context.Context, req *QueryBTCBStakingRecordRequest) (*QueryBTCBStakingRecordResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BTCBStakingRecord not implemented") +func (*UnimplementedQueryServer) XBTCStakingRecord(ctx context.Context, req *QueryxBTCStakingRecordRequest) (*QueryxBTCStakingRecordResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method XBTCStakingRecord not implemented") } func RegisterQueryServer(s grpc1.Server, srv QueryServer) { @@ -556,20 +556,20 @@ func _Query_StakingRecord_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -func _Query_BTCBStakingRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryBTCBStakingRecordRequest) +func _Query_XBTCStakingRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryxBTCStakingRecordRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).BTCBStakingRecord(ctx, in) + return srv.(QueryServer).XBTCStakingRecord(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/lorenzo.btcstaking.v1.Query/BTCBStakingRecord", + FullMethod: "/lorenzo.btcstaking.v1.Query/XBTCStakingRecord", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BTCBStakingRecord(ctx, req.(*QueryBTCBStakingRecordRequest)) + return srv.(QueryServer).XBTCStakingRecord(ctx, req.(*QueryxBTCStakingRecordRequest)) } return interceptor(ctx, in, info, handler) } @@ -587,8 +587,8 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_StakingRecord_Handler, }, { - MethodName: "BTCBStakingRecord", - Handler: _Query_BTCBStakingRecord_Handler, + MethodName: "XBTCStakingRecord", + Handler: _Query_XBTCStakingRecord_Handler, }, }, Streams: []grpc.StreamDesc{}, @@ -781,7 +781,7 @@ func (m *QueryStakingRecordResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *QueryBTCBStakingRecordRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryxBTCStakingRecordRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -791,12 +791,12 @@ func (m *QueryBTCBStakingRecordRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryBTCBStakingRecordRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryxBTCStakingRecordRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryBTCBStakingRecordRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryxBTCStakingRecordRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -821,7 +821,7 @@ func (m *QueryBTCBStakingRecordRequest) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *QueryBTCBStakingRecordResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryxBTCStakingRecordResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -831,12 +831,12 @@ func (m *QueryBTCBStakingRecordResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryBTCBStakingRecordResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryxBTCStakingRecordResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryBTCBStakingRecordResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryxBTCStakingRecordResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -947,7 +947,7 @@ func (m *QueryStakingRecordResponse) Size() (n int) { return n } -func (m *QueryBTCBStakingRecordRequest) Size() (n int) { +func (m *QueryxBTCStakingRecordRequest) Size() (n int) { if m == nil { return 0 } @@ -966,7 +966,7 @@ func (m *QueryBTCBStakingRecordRequest) Size() (n int) { return n } -func (m *QueryBTCBStakingRecordResponse) Size() (n int) { +func (m *QueryxBTCStakingRecordResponse) Size() (n int) { if m == nil { return 0 } @@ -1520,7 +1520,7 @@ func (m *QueryStakingRecordResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBTCBStakingRecordRequest) Unmarshal(dAtA []byte) error { +func (m *QueryxBTCStakingRecordRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1543,10 +1543,10 @@ func (m *QueryBTCBStakingRecordRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBTCBStakingRecordRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryxBTCStakingRecordRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBTCBStakingRecordRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryxBTCStakingRecordRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1640,7 +1640,7 @@ func (m *QueryBTCBStakingRecordRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBTCBStakingRecordResponse) Unmarshal(dAtA []byte) error { +func (m *QueryxBTCStakingRecordResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1663,10 +1663,10 @@ func (m *QueryBTCBStakingRecordResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBTCBStakingRecordResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryxBTCStakingRecordResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBTCBStakingRecordResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryxBTCStakingRecordResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1699,7 +1699,7 @@ func (m *QueryBTCBStakingRecordResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Record == nil { - m.Record = &BTCBStakingRecord{} + m.Record = &XBTCStakingRecord{} } if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/btcstaking/types/query.pb.gw.go b/x/btcstaking/types/query.pb.gw.go index 42207d9..0ff27ca 100644 --- a/x/btcstaking/types/query.pb.gw.go +++ b/x/btcstaking/types/query.pb.gw.go @@ -88,37 +88,37 @@ func local_request_Query_StakingRecord_0(ctx context.Context, marshaler runtime. } var ( - filter_Query_BTCBStakingRecord_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_Query_XBTCStakingRecord_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_Query_BTCBStakingRecord_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBTCBStakingRecordRequest +func request_Query_XBTCStakingRecord_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryxBTCStakingRecordRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_BTCBStakingRecord_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_XBTCStakingRecord_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.BTCBStakingRecord(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.XBTCStakingRecord(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_BTCBStakingRecord_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBTCBStakingRecordRequest +func local_request_Query_XBTCStakingRecord_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryxBTCStakingRecordRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_BTCBStakingRecord_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_XBTCStakingRecord_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.BTCBStakingRecord(ctx, &protoReq) + msg, err := server.XBTCStakingRecord(ctx, &protoReq) return msg, metadata, err } @@ -175,7 +175,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_BTCBStakingRecord_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_XBTCStakingRecord_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -186,7 +186,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_BTCBStakingRecord_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_XBTCStakingRecord_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -194,7 +194,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_BTCBStakingRecord_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_XBTCStakingRecord_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -279,7 +279,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_BTCBStakingRecord_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_XBTCStakingRecord_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -288,14 +288,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_BTCBStakingRecord_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_XBTCStakingRecord_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_BTCBStakingRecord_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_XBTCStakingRecord_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -307,7 +307,7 @@ var ( pattern_Query_StakingRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"lorenzo", "btcstaking", "v1", "stakingRecord"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_BTCBStakingRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"lorenzo", "btcstaking", "v1", "btcb-staking-record"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_XBTCStakingRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"lorenzo", "btcstaking", "v1", "xbtc-staking-record"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -315,5 +315,5 @@ var ( forward_Query_StakingRecord_0 = runtime.ForwardResponseMessage - forward_Query_BTCBStakingRecord_0 = runtime.ForwardResponseMessage + forward_Query_XBTCStakingRecord_0 = runtime.ForwardResponseMessage ) diff --git a/x/btcstaking/types/staking_record.pb.go b/x/btcstaking/types/staking_record.pb.go index f4f13d7..5a4ad0f 100644 --- a/x/btcstaking/types/staking_record.pb.go +++ b/x/btcstaking/types/staking_record.pb.go @@ -6,8 +6,6 @@ package types import ( cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -126,8 +124,8 @@ func (m *BTCStakingRecord) GetPlanId() uint64 { return 0 } -// BTCBStakingRecord defines the message for btcb staking record -type BTCBStakingRecord struct { +// XBTCStakingRecord defines the message for btc staking record +type XBTCStakingRecord struct { // staking_idx defines the staking index StakingIdx uint64 `protobuf:"varint,1,opt,name=staking_idx,json=stakingIdx,proto3" json:"staking_idx,omitempty"` // contract defines the contract @@ -143,18 +141,18 @@ type BTCBStakingRecord struct { PlanId uint64 `protobuf:"varint,7,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty"` } -func (m *BTCBStakingRecord) Reset() { *m = BTCBStakingRecord{} } -func (m *BTCBStakingRecord) String() string { return proto.CompactTextString(m) } -func (*BTCBStakingRecord) ProtoMessage() {} -func (*BTCBStakingRecord) Descriptor() ([]byte, []int) { +func (m *XBTCStakingRecord) Reset() { *m = XBTCStakingRecord{} } +func (m *XBTCStakingRecord) String() string { return proto.CompactTextString(m) } +func (*XBTCStakingRecord) ProtoMessage() {} +func (*XBTCStakingRecord) Descriptor() ([]byte, []int) { return fileDescriptor_8fe1ffedd1828bb5, []int{1} } -func (m *BTCBStakingRecord) XXX_Unmarshal(b []byte) error { +func (m *XBTCStakingRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *BTCBStakingRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *XBTCStakingRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_BTCBStakingRecord.Marshal(b, m, deterministic) + return xxx_messageInfo_XBTCStakingRecord.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -164,54 +162,54 @@ func (m *BTCBStakingRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *BTCBStakingRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_BTCBStakingRecord.Merge(m, src) +func (m *XBTCStakingRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_XBTCStakingRecord.Merge(m, src) } -func (m *BTCBStakingRecord) XXX_Size() int { +func (m *XBTCStakingRecord) XXX_Size() int { return m.Size() } -func (m *BTCBStakingRecord) XXX_DiscardUnknown() { - xxx_messageInfo_BTCBStakingRecord.DiscardUnknown(m) +func (m *XBTCStakingRecord) XXX_DiscardUnknown() { + xxx_messageInfo_XBTCStakingRecord.DiscardUnknown(m) } -var xxx_messageInfo_BTCBStakingRecord proto.InternalMessageInfo +var xxx_messageInfo_XBTCStakingRecord proto.InternalMessageInfo -func (m *BTCBStakingRecord) GetStakingIdx() uint64 { +func (m *XBTCStakingRecord) GetStakingIdx() uint64 { if m != nil { return m.StakingIdx } return 0 } -func (m *BTCBStakingRecord) GetContract() []byte { +func (m *XBTCStakingRecord) GetContract() []byte { if m != nil { return m.Contract } return nil } -func (m *BTCBStakingRecord) GetReceiverAddr() string { +func (m *XBTCStakingRecord) GetReceiverAddr() string { if m != nil { return m.ReceiverAddr } return "" } -func (m *BTCBStakingRecord) GetChainId() uint32 { +func (m *XBTCStakingRecord) GetChainId() uint32 { if m != nil { return m.ChainId } return 0 } -func (m *BTCBStakingRecord) GetMintYatResult() string { +func (m *XBTCStakingRecord) GetMintYatResult() string { if m != nil { return m.MintYatResult } return "" } -func (m *BTCBStakingRecord) GetPlanId() uint64 { +func (m *XBTCStakingRecord) GetPlanId() uint64 { if m != nil { return m.PlanId } @@ -220,7 +218,7 @@ func (m *BTCBStakingRecord) GetPlanId() uint64 { func init() { proto.RegisterType((*BTCStakingRecord)(nil), "lorenzo.btcstaking.v1.BTCStakingRecord") - proto.RegisterType((*BTCBStakingRecord)(nil), "lorenzo.btcstaking.v1.BTCBStakingRecord") + proto.RegisterType((*XBTCStakingRecord)(nil), "lorenzo.btcstaking.v1.XBTCStakingRecord") } func init() { @@ -228,37 +226,35 @@ func init() { } var fileDescriptor_8fe1ffedd1828bb5 = []byte{ - // 468 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x4f, 0x6f, 0xd3, 0x30, - 0x18, 0xc6, 0x9b, 0xd2, 0xa5, 0xad, 0x69, 0xf9, 0x13, 0x31, 0x96, 0x55, 0x5a, 0x5a, 0x0d, 0x84, - 0x2a, 0x24, 0x12, 0x4d, 0x13, 0x07, 0x8e, 0x64, 0x17, 0x2a, 0x21, 0x84, 0xb2, 0x5d, 0xe0, 0x12, - 0xb9, 0xb6, 0x95, 0x44, 0xab, 0xed, 0xca, 0x7e, 0x5b, 0x65, 0x7c, 0x02, 0xb8, 0xf1, 0xb1, 0x76, - 0xdc, 0x11, 0x71, 0x98, 0x50, 0xfb, 0x45, 0x50, 0xec, 0xb4, 0x14, 0x84, 0xb4, 0x5b, 0x9e, 0xe7, - 0x7d, 0xfd, 0x44, 0xfe, 0xf9, 0x41, 0x2f, 0x67, 0x52, 0x31, 0xf1, 0x45, 0x46, 0x53, 0x20, 0x1a, - 0xf0, 0x65, 0x21, 0xb2, 0x68, 0x79, 0x12, 0xd5, 0x9f, 0xa9, 0x62, 0x44, 0x2a, 0x1a, 0xce, 0x95, - 0x04, 0xe9, 0xed, 0xd7, 0xbb, 0xe1, 0x9f, 0xdd, 0x70, 0x79, 0x32, 0x38, 0x20, 0x52, 0x73, 0xa9, - 0x23, 0xae, 0xcd, 0x51, 0xae, 0x33, 0xbb, 0x3f, 0x38, 0xb4, 0x83, 0xd4, 0xa8, 0xc8, 0x8a, 0x7a, - 0xf4, 0x24, 0x93, 0x99, 0xb4, 0x7e, 0xf5, 0x65, 0xdd, 0xe3, 0x6f, 0x4d, 0xf4, 0x28, 0xbe, 0x38, - 0x3b, 0xb7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 0xbd, 0x64, 0xab, 0xff, 0x0f, 0xa6, 0xfb, - 0x0f, 0x98, 0xd7, 0x5b, 0xaa, 0x06, 0x4a, 0x7c, 0x74, 0x7d, 0x3b, 0x6c, 0xfc, 0xbc, 0x1d, 0xee, - 0xdb, 0xf7, 0xd3, 0xf4, 0x32, 0x2c, 0x64, 0xc4, 0x31, 0xe4, 0xe1, 0x44, 0xc0, 0x16, 0xfa, 0x2e, - 0x8a, 0xbd, 0x3b, 0x51, 0xb8, 0x77, 0xa0, 0x68, 0xef, 0xa2, 0x88, 0xcf, 0xaf, 0x57, 0x81, 0x73, - 0xb3, 0x0a, 0x9c, 0x5f, 0xab, 0xc0, 0xf9, 0xbe, 0x0e, 0x1a, 0x37, 0xeb, 0xa0, 0xf1, 0x63, 0x1d, - 0x34, 0x3e, 0xbf, 0xc9, 0x0a, 0xc8, 0x17, 0xd3, 0x90, 0x48, 0x1e, 0xbd, 0xb7, 0xe5, 0x7c, 0xf5, - 0xb1, 0xaa, 0x12, 0x91, 0xb3, 0x68, 0xd3, 0xec, 0xe5, 0x69, 0x54, 0xee, 0xd6, 0x1b, 0xae, 0xe6, - 0x4c, 0x4f, 0x5d, 0x53, 0xb9, 0xd3, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf4, 0xa1, 0x01, 0x65, - 0x01, 0x03, 0x00, 0x00, + // 445 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcf, 0x8b, 0xd3, 0x40, + 0x1c, 0xc5, 0x9b, 0xda, 0x4d, 0xdb, 0xb1, 0xf5, 0x47, 0x70, 0x35, 0x2e, 0x6c, 0x5a, 0x56, 0x91, + 0x22, 0x98, 0x61, 0x59, 0x3c, 0x78, 0xb4, 0x5e, 0x2c, 0x88, 0xc8, 0xac, 0x07, 0xf5, 0x12, 0xa6, + 0x33, 0x43, 0x32, 0x6c, 0x33, 0x53, 0x66,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cd, + 0x4a, 0x97, 0x27, 0xb8, 0xd8, 0x9d, 0x2a, 0x9c, 0xcf, 0x85, 0x9d, 0xfa, 0x6e, 0x72, 0x27, 0x7f, + 0x02, 0x00, 0x00, 0xff, 0xff, 0xeb, 0xa0, 0x9a, 0x72, 0xcd, 0x02, 0x00, 0x00, } func (m *BTCStakingRecord) Marshal() (dAtA []byte, err error) { @@ -334,7 +330,7 @@ func (m *BTCStakingRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *BTCBStakingRecord) Marshal() (dAtA []byte, err error) { +func (m *XBTCStakingRecord) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -344,12 +340,12 @@ func (m *BTCBStakingRecord) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *BTCBStakingRecord) MarshalTo(dAtA []byte) (int, error) { +func (m *XBTCStakingRecord) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *BTCBStakingRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *XBTCStakingRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -452,7 +448,7 @@ func (m *BTCStakingRecord) Size() (n int) { return n } -func (m *BTCBStakingRecord) Size() (n int) { +func (m *XBTCStakingRecord) Size() (n int) { if m == nil { return 0 } @@ -761,7 +757,7 @@ func (m *BTCStakingRecord) Unmarshal(dAtA []byte) error { } return nil } -func (m *BTCBStakingRecord) Unmarshal(dAtA []byte) error { +func (m *XBTCStakingRecord) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -784,10 +780,10 @@ func (m *BTCBStakingRecord) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BTCBStakingRecord: wiretype end group for non-group") + return fmt.Errorf("proto: XBTCStakingRecord: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BTCBStakingRecord: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: XBTCStakingRecord: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: