From 1dceeded6aafd3b158be5fa84ec27d3fc3d4dad9 Mon Sep 17 00:00:00 2001 From: rustdev Date: Thu, 25 Apr 2024 17:10:53 +0100 Subject: [PATCH] introduce priority fee config for channel and TakenFeeByIbcSequence list --- .../v1beta1/genesis.proto | 3 + .../v1beta1/ibctransfermiddleware.proto | 6 + x/ibctransfermiddleware/types/genesis.pb.go | 101 ++++- .../types/ibctransfermiddleware.pb.go | 351 ++++++++++++++++-- 4 files changed, 414 insertions(+), 47 deletions(-) diff --git a/proto/composable/ibctransfermiddleware/v1beta1/genesis.proto b/proto/composable/ibctransfermiddleware/v1beta1/genesis.proto index 20f491b2c..8ead9ed65 100644 --- a/proto/composable/ibctransfermiddleware/v1beta1/genesis.proto +++ b/proto/composable/ibctransfermiddleware/v1beta1/genesis.proto @@ -4,6 +4,7 @@ package composable.ibctransfermiddleware.v1beta1; import "gogoproto/gogo.proto"; import "composable/ibctransfermiddleware/v1beta1/ibctransfermiddleware.proto"; import "amino/amino.proto"; +import "cosmos/base/v1beta1/coin.proto"; option go_package = "x/ibctransfermiddleware/types"; @@ -11,4 +12,6 @@ option go_package = "x/ibctransfermiddleware/types"; // GenesisState defines the ibctransfermiddleware module's genesis state. message GenesisState { Params params = 1 [ (gogoproto.nullable) = false ]; + + repeated cosmos.base.v1beta1.Coin taken_fee_by_ibc_sequence = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } diff --git a/proto/composable/ibctransfermiddleware/v1beta1/ibctransfermiddleware.proto b/proto/composable/ibctransfermiddleware/v1beta1/ibctransfermiddleware.proto index f789dee2f..abbea4ef8 100644 --- a/proto/composable/ibctransfermiddleware/v1beta1/ibctransfermiddleware.proto +++ b/proto/composable/ibctransfermiddleware/v1beta1/ibctransfermiddleware.proto @@ -25,5 +25,11 @@ message ChannelFee{ message CoinItem{ cosmos.base.v1beta1.Coin min_fee = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; int64 percentage = 2; + repeated TxPriorityFee tx_priority_fee = 3; +} + +message TxPriorityFee{ + string priority = 1; + cosmos.base.v1beta1.Coin priority_fee = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } diff --git a/x/ibctransfermiddleware/types/genesis.pb.go b/x/ibctransfermiddleware/types/genesis.pb.go index d75c5c1bd..9b115b6e1 100644 --- a/x/ibctransfermiddleware/types/genesis.pb.go +++ b/x/ibctransfermiddleware/types/genesis.pb.go @@ -5,6 +5,7 @@ package types import ( fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" @@ -26,7 +27,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the ibctransfermiddleware module's genesis state. type GenesisState struct { - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + TakenFeeByIbcSequence []types.Coin `protobuf:"bytes,2,rep,name=taken_fee_by_ibc_sequence,json=takenFeeByIbcSequence,proto3" json:"taken_fee_by_ibc_sequence"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -69,6 +71,13 @@ func (m *GenesisState) GetParams() Params { return Params{} } +func (m *GenesisState) GetTakenFeeByIbcSequence() []types.Coin { + if m != nil { + return m.TakenFeeByIbcSequence + } + return nil +} + func init() { proto.RegisterType((*GenesisState)(nil), "composable.ibctransfermiddleware.v1beta1.GenesisState") } @@ -78,21 +87,27 @@ func init() { } var fileDescriptor_ab9a6edd8a683ba6 = []byte{ - // 213 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x4b, 0xce, 0xcf, 0x2d, - 0xc8, 0x2f, 0x4e, 0x4c, 0xca, 0x49, 0xd5, 0xcf, 0x4c, 0x4a, 0x2e, 0x29, 0x4a, 0xcc, 0x2b, 0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// 308 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x3d, 0x4b, 0x03, 0x31, + 0x18, 0xc7, 0x2f, 0x2a, 0x05, 0xaf, 0x2e, 0x16, 0x85, 0xb6, 0x60, 0x2c, 0x4e, 0x87, 0x43, 0x62, + 0x2b, 0xe8, 0x7e, 0x8a, 0xe2, 0x22, 0xd2, 0x6e, 0x0e, 0x1e, 0x49, 0xfa, 0xf4, 0x08, 0xf6, 0x92, + 0xf3, 0x12, 0x5f, 0xee, 0x5b, 0xf8, 0x31, 0x1c, 0xfd, 0x04, 0xce, 0x1d, 0x3b, 0x3a, 0x89, 0xdc, + 0x0d, 0x7e, 0x0d, 0xb9, 0x17, 0xec, 0x52, 0xa1, 0x4b, 0x08, 0x09, 0xbf, 0xdf, 0xf3, 0xfc, 0xff, + 0xee, 0x89, 0xd0, 0x51, 0xac, 0x0d, 0xe3, 0x53, 0xa0, 0x92, 0x0b, 0x9b, 0x30, 0x65, 0x26, 0x90, + 0x44, 0x72, 0x3c, 0x9e, 0xc2, 0x33, 0x4b, 0x80, 0x3e, 0xf5, 0x39, 0x58, 0xd6, 0xa7, 0x21, 0x28, + 0x30, 0xd2, 0x90, 0x38, 0xd1, 0x56, 0xb7, 0xbc, 0x05, 0x47, 0x96, 0x72, 0xa4, 0xe6, 0xba, 0x3b, + 0xa1, 0x0e, 0x75, 0x09, 0xd1, 0xe2, 0x56, 0xf1, 0xdd, 0xf3, 0x95, 0xe7, 0x2e, 0xb7, 0x57, 0x96, + 0x6d, 0x16, 0x49, 0xa5, 0x69, 0x79, 0xd6, 0x4f, 0x58, 0x68, 0x13, 0x69, 0x43, 0x39, 0x33, 0x0b, + 0x87, 0xd0, 0x52, 0x55, 0xff, 0x07, 0x1f, 0xc8, 0xdd, 0xba, 0xac, 0xa2, 0x8c, 0x2c, 0xb3, 0xd0, + 0xba, 0x76, 0x1b, 0x31, 0x4b, 0x58, 0x64, 0xda, 0xa8, 0x87, 0xbc, 0xe6, 0xe0, 0x88, 0xac, 0x1a, + 0x8d, 0xdc, 0x94, 0x9c, 0xbf, 0x31, 0xfb, 0xda, 0x77, 0x86, 0xb5, 0xa5, 0x75, 0xe7, 0x76, 0x2c, + 0xbb, 0x07, 0x15, 0x4c, 0x00, 0x02, 0x9e, 0x06, 0x92, 0x8b, 0xc0, 0xc0, 0xc3, 0x23, 0x28, 0x01, + 0xed, 0xb5, 0xde, 0xba, 0xd7, 0x1c, 0x74, 0x48, 0xb5, 0x24, 0x29, 0x96, 0xfc, 0xb3, 0x9d, 0x69, + 0xa9, 0xfc, 0xcd, 0xc2, 0xf5, 0xf6, 0xf3, 0x7e, 0x88, 0x86, 0xbb, 0xa5, 0xe6, 0x02, 0xc0, 0x4f, + 0xaf, 0xb8, 0x18, 0xd5, 0x0a, 0xff, 0x74, 0x96, 0x61, 0x34, 0xcf, 0x30, 0xfa, 0xce, 0x30, 0x7a, + 0xcd, 0xb1, 0x33, 0xcf, 0xb1, 0xf3, 0x99, 0x63, 0xe7, 0x76, 0xef, 0xe5, 0x9f, 0x2a, 0x6d, 0x1a, + 0x83, 0xe1, 0x8d, 0xb2, 0x80, 0xe3, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x71, 0x69, 0xde, 0x66, + 0xf3, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -115,6 +130,20 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.TakenFeeByIbcSequence) > 0 { + for iNdEx := len(m.TakenFeeByIbcSequence) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TakenFeeByIbcSequence[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } { size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -147,6 +176,12 @@ func (m *GenesisState) Size() (n int) { _ = l l = m.Params.Size() n += 1 + l + sovGenesis(uint64(l)) + if len(m.TakenFeeByIbcSequence) > 0 { + for _, e := range m.TakenFeeByIbcSequence { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } return n } @@ -218,6 +253,40 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TakenFeeByIbcSequence", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TakenFeeByIbcSequence = append(m.TakenFeeByIbcSequence, types.Coin{}) + if err := m.TakenFeeByIbcSequence[len(m.TakenFeeByIbcSequence)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/ibctransfermiddleware/types/ibctransfermiddleware.pb.go b/x/ibctransfermiddleware/types/ibctransfermiddleware.pb.go index e58115dcd..bc7299bc1 100644 --- a/x/ibctransfermiddleware/types/ibctransfermiddleware.pb.go +++ b/x/ibctransfermiddleware/types/ibctransfermiddleware.pb.go @@ -141,8 +141,9 @@ func (m *ChannelFee) GetMinTimeoutTimestamp() int64 { } type CoinItem struct { - MinFee types.Coin `protobuf:"bytes,1,opt,name=min_fee,json=minFee,proto3" json:"min_fee"` - Percentage int64 `protobuf:"varint,2,opt,name=percentage,proto3" json:"percentage,omitempty"` + MinFee types.Coin `protobuf:"bytes,1,opt,name=min_fee,json=minFee,proto3" json:"min_fee"` + Percentage int64 `protobuf:"varint,2,opt,name=percentage,proto3" json:"percentage,omitempty"` + TxPriorityFee []*TxPriorityFee `protobuf:"bytes,3,rep,name=tx_priority_fee,json=txPriorityFee,proto3" json:"tx_priority_fee,omitempty"` } func (m *CoinItem) Reset() { *m = CoinItem{} } @@ -192,10 +193,70 @@ func (m *CoinItem) GetPercentage() int64 { return 0 } +func (m *CoinItem) GetTxPriorityFee() []*TxPriorityFee { + if m != nil { + return m.TxPriorityFee + } + return nil +} + +type TxPriorityFee struct { + Priority string `protobuf:"bytes,1,opt,name=priority,proto3" json:"priority,omitempty"` + PriorityFee types.Coin `protobuf:"bytes,2,opt,name=priority_fee,json=priorityFee,proto3" json:"priority_fee"` +} + +func (m *TxPriorityFee) Reset() { *m = TxPriorityFee{} } +func (m *TxPriorityFee) String() string { return proto.CompactTextString(m) } +func (*TxPriorityFee) ProtoMessage() {} +func (*TxPriorityFee) Descriptor() ([]byte, []int) { + return fileDescriptor_1193893bc248bc1b, []int{3} +} +func (m *TxPriorityFee) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TxPriorityFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TxPriorityFee.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 *TxPriorityFee) XXX_Merge(src proto.Message) { + xxx_messageInfo_TxPriorityFee.Merge(m, src) +} +func (m *TxPriorityFee) XXX_Size() int { + return m.Size() +} +func (m *TxPriorityFee) XXX_DiscardUnknown() { + xxx_messageInfo_TxPriorityFee.DiscardUnknown(m) +} + +var xxx_messageInfo_TxPriorityFee proto.InternalMessageInfo + +func (m *TxPriorityFee) GetPriority() string { + if m != nil { + return m.Priority + } + return "" +} + +func (m *TxPriorityFee) GetPriorityFee() types.Coin { + if m != nil { + return m.PriorityFee + } + return types.Coin{} +} + func init() { proto.RegisterType((*Params)(nil), "composable.ibctransfermiddleware.v1beta1.Params") proto.RegisterType((*ChannelFee)(nil), "composable.ibctransfermiddleware.v1beta1.ChannelFee") proto.RegisterType((*CoinItem)(nil), "composable.ibctransfermiddleware.v1beta1.CoinItem") + proto.RegisterType((*TxPriorityFee)(nil), "composable.ibctransfermiddleware.v1beta1.TxPriorityFee") } func init() { @@ -203,35 +264,39 @@ func init() { } var fileDescriptor_1193893bc248bc1b = []byte{ - // 436 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x41, 0x8b, 0xd4, 0x30, - 0x14, 0xc7, 0x27, 0x3b, 0x32, 0xeb, 0x66, 0x54, 0xb0, 0xae, 0x98, 0x5d, 0x30, 0x0e, 0x73, 0x1a, - 0x04, 0x5b, 0xa6, 0x0a, 0xe2, 0xc1, 0x83, 0xa3, 0x08, 0xde, 0xa4, 0x0e, 0x88, 0x5e, 0x4a, 0xda, - 0xbe, 0xd6, 0x60, 0x93, 0x94, 0x24, 0xee, 0xea, 0xb7, 0xf0, 0x63, 0x78, 0xf4, 0xe0, 0x87, 0xd8, - 0xe3, 0xe2, 0xc9, 0x93, 0xc8, 0xcc, 0xc1, 0xab, 0x1f, 0x41, 0x9a, 0x64, 0x1c, 0x85, 0x15, 0xf4, - 0xd2, 0xe4, 0xbd, 0x5f, 0xff, 0xef, 0xfd, 0x93, 0x3c, 0xfc, 0xa8, 0x54, 0xa2, 0x53, 0x86, 0x15, - 0x2d, 0x24, 0xbc, 0x28, 0xad, 0x66, 0xd2, 0xd4, 0xa0, 0x05, 0xaf, 0xaa, 0x16, 0x8e, 0x99, 0x86, - 0xe4, 0x68, 0x5e, 0x80, 0x65, 0xf3, 0xb3, 0x69, 0xdc, 0x69, 0x65, 0x55, 0x34, 0xdb, 0x56, 0x89, - 0xcf, 0xfe, 0x2f, 0x54, 0x39, 0xd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 0x89, 0x8e, 0x9c, 0x9b, - 0xa0, 0xd9, 0x30, 0xbb, 0x22, 0xb8, 0x5c, 0x7a, 0xb6, 0xdc, 0xa0, 0x29, 0xc7, 0xe7, 0x37, 0x4e, - 0xa2, 0xfb, 0x78, 0xb7, 0xd7, 0xd7, 0x00, 0xee, 0xbc, 0xe3, 0xf4, 0x20, 0x0e, 0x3d, 0xfb, 0xf7, - 0xfb, 0xc3, 0xf9, 0x62, 0xef, 0xe4, 0xeb, 0x8d, 0xc1, 0x87, 0xef, 0x1f, 0x6f, 0xa2, 0x6c, 0x24, - 0xb8, 0xec, 0xaf, 0x8b, 0x62, 0xdc, 0x81, 0x2e, 0x41, 0x5a, 0xd6, 0x00, 0xd9, 0x71, 0x3d, 0x7f, - 0xcb, 0x2c, 0xee, 0x9e, 0xac, 0x28, 0x3a, 0x5d, 0x51, 0xf4, 0x6d, 0x45, 0xd1, 0xfb, 0x35, 0x1d, - 0x9c, 0xae, 0xe9, 0xe0, 0xcb, 0x9a, 0x0e, 0x5e, 0x5e, 0x7f, 0xfb, 0x97, 0xf1, 0xb5, 0xef, 0x3a, - 0x30, 0xc5, 0xc8, 0x0d, 0xc0, 0xed, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x69, 0x03, 0x6b, 0xef, - 0xef, 0x02, 0x00, 0x00, + // 499 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0xc1, 0x6f, 0xd3, 0x3e, + 0x14, 0xc7, 0xeb, 0xf6, 0xa7, 0x6e, 0x73, 0xd7, 0x1f, 0xc2, 0x0c, 0x91, 0x55, 0x22, 0x54, 0x3d, + 0x55, 0x48, 0x34, 0x6a, 0x41, 0x9a, 0x38, 0x70, 0xa0, 0x20, 0x10, 0xb7, 0x29, 0x54, 0x42, 0x70, + 0x89, 0x9c, 0xe4, 0x25, 0x58, 0xc4, 0x76, 0x64, 0x9b, 0x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b8, 0xbb, 0xc1, 0x49, 0x0f, 0x6f, 0xaf, 0xe4, 0xdc, + 0x08, 0xcf, 0x63, 0xf2, 0x12, 0xef, 0x6e, 0x58, 0x69, 0x5e, 0xe3, 0xc6, 0x9d, 0x72, 0x2d, 0x32, + 0x3d, 0x38, 0x5d, 0xf8, 0xe8, 0x6c, 0xe1, 0xa3, 0x5f, 0x0b, 0x1f, 0x7d, 0x5a, 0xfa, 0x8d, 0xb3, + 0xa5, 0xdf, 0xf8, 0xb1, 0xf4, 0x1b, 0xef, 0xee, 0xce, 0xff, 0xf1, 0x5b, 0x9a, 0x93, 0x12, 0x74, + 0xdc, 0xb6, 0x1f, 0xf6, 0xc3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe6, 0x03, 0x2b, 0x7f, 0xc7, + 0x03, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -347,6 +412,20 @@ func (m *CoinItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.TxPriorityFee) > 0 { + for iNdEx := len(m.TxPriorityFee) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TxPriorityFee[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintIbctransfermiddleware(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } if m.Percentage != 0 { i = encodeVarintIbctransfermiddleware(dAtA, i, uint64(m.Percentage)) i-- @@ -365,6 +444,46 @@ func (m *CoinItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *TxPriorityFee) 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 *TxPriorityFee) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxPriorityFee) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.PriorityFee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintIbctransfermiddleware(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Priority) > 0 { + i -= len(m.Priority) + copy(dAtA[i:], m.Priority) + i = encodeVarintIbctransfermiddleware(dAtA, i, uint64(len(m.Priority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintIbctransfermiddleware(dAtA []byte, offset int, v uint64) int { offset -= sovIbctransfermiddleware(v) base := offset @@ -428,6 +547,27 @@ func (m *CoinItem) Size() (n int) { if m.Percentage != 0 { n += 1 + sovIbctransfermiddleware(uint64(m.Percentage)) } + if len(m.TxPriorityFee) > 0 { + for _, e := range m.TxPriorityFee { + l = e.Size() + n += 1 + l + sovIbctransfermiddleware(uint64(l)) + } + } + return n +} + +func (m *TxPriorityFee) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Priority) + if l > 0 { + n += 1 + l + sovIbctransfermiddleware(uint64(l)) + } + l = m.PriorityFee.Size() + n += 1 + l + sovIbctransfermiddleware(uint64(l)) return n } @@ -769,6 +909,155 @@ func (m *CoinItem) Unmarshal(dAtA []byte) error { break } } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxPriorityFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIbctransfermiddleware + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthIbctransfermiddleware + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthIbctransfermiddleware + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxPriorityFee = append(m.TxPriorityFee, &TxPriorityFee{}) + if err := m.TxPriorityFee[len(m.TxPriorityFee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipIbctransfermiddleware(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthIbctransfermiddleware + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TxPriorityFee) 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 ErrIntOverflowIbctransfermiddleware + } + 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: TxPriorityFee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TxPriorityFee: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIbctransfermiddleware + } + 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 ErrInvalidLengthIbctransfermiddleware + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthIbctransfermiddleware + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Priority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PriorityFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIbctransfermiddleware + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthIbctransfermiddleware + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthIbctransfermiddleware + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PriorityFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipIbctransfermiddleware(dAtA[iNdEx:])