From fb2990922e78cede16858c964b09a4a74b4fa8ae Mon Sep 17 00:00:00 2001 From: Sean King Date: Tue, 20 Jul 2021 13:31:26 +0200 Subject: [PATCH 01/26] feat: adding proto files for fee payment middleware --- ibc/applications/middleware/fee/v1/fee.pb.go | 356 +++ .../middleware/fee/v1/genesis.pb.go | 267 +++ .../middleware/fee/v1/query.pb.go | 1860 ++++++++++++++++ .../middleware/fee/v1/query.pb.gw.go | 326 +++ ibc/applications/middleware/fee/v1/tx.pb.go | 1984 +++++++++++++++++ .../applications/middleware/fee/v1/fee.proto | 13 + .../middleware/fee/v1/genesis.proto | 8 + .../middleware/fee/v1/query.proto | 77 + .../applications/middleware/fee/v1/tx.proto | 69 + 9 files changed, 4960 insertions(+) create mode 100644 ibc/applications/middleware/fee/v1/fee.pb.go create mode 100644 ibc/applications/middleware/fee/v1/genesis.pb.go create mode 100644 ibc/applications/middleware/fee/v1/query.pb.go create mode 100644 ibc/applications/middleware/fee/v1/query.pb.gw.go create mode 100644 ibc/applications/middleware/fee/v1/tx.pb.go create mode 100644 proto/ibc/applications/middleware/fee/v1/fee.proto create mode 100644 proto/ibc/applications/middleware/fee/v1/genesis.proto create mode 100644 proto/ibc/applications/middleware/fee/v1/query.proto create mode 100644 proto/ibc/applications/middleware/fee/v1/tx.proto diff --git a/ibc/applications/middleware/fee/v1/fee.pb.go b/ibc/applications/middleware/fee/v1/fee.pb.go new file mode 100644 index 00000000000..a20c76f30db --- /dev/null +++ b/ibc/applications/middleware/fee/v1/fee.pb.go @@ -0,0 +1,356 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/applications/middleware/fee/v1/fee.proto + +package ibc_applications_middleware_fee_v1 + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Fee interface +// See Fee Payment Middleware spec: +// https://github.com/cosmos/ibc/tree/master/spec/app/ics-029-fee-payment#fee-middleware-contract +type Fee struct { + // the token denomination the fee will be paid in + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // the token amount to be transferred + Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (m *Fee) Reset() { *m = Fee{} } +func (m *Fee) String() string { return proto.CompactTextString(m) } +func (*Fee) ProtoMessage() {} +func (*Fee) Descriptor() ([]byte, []int) { + return fileDescriptor_9a4c0273395d2c1a, []int{0} +} +func (m *Fee) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Fee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Fee.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Fee) XXX_Merge(src proto.Message) { + xxx_messageInfo_Fee.Merge(m, src) +} +func (m *Fee) XXX_Size() int { + return m.Size() +} +func (m *Fee) XXX_DiscardUnknown() { + xxx_messageInfo_Fee.DiscardUnknown(m) +} + +var xxx_messageInfo_Fee proto.InternalMessageInfo + +func (m *Fee) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *Fee) GetAmount() uint64 { + if m != nil { + return m.Amount + } + return 0 +} + +func init() { + proto.RegisterType((*Fee)(nil), "ibc.applications.middleware.fee.v1.Fee") +} + +func init() { + proto.RegisterFile("ibc/applications/middleware/fee/v1/fee.proto", fileDescriptor_9a4c0273395d2c1a) +} + +var fileDescriptor_9a4c0273395d2c1a = []byte{ + // 160 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xc9, 0x4c, 0x4a, 0xd6, + 0x4f, 0x2c, 0x28, 0xc8, 0xc9, 0x4c, 0x4e, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0xd6, 0xcf, 0xcd, 0x4c, + 0x49, 0xc9, 0x49, 0x2d, 0x4f, 0x2c, 0x4a, 0xd5, 0x4f, 0x4b, 0x4d, 0xd5, 0x2f, 0x33, 0x04, 0x51, + 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x4a, 0x99, 0x49, 0xc9, 0x7a, 0xc8, 0xaa, 0xf5, 0x10, + 0xaa, 0xf5, 0x40, 0xca, 0xca, 0x0c, 0x95, 0x8c, 0xb9, 0x98, 0xdd, 0x52, 0x53, 0x85, 0x44, 0xb8, + 0x58, 0x53, 0x52, 0xf3, 0xf2, 0x73, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0x20, 0x1c, 0x21, + 0x31, 0x2e, 0xb6, 0xc4, 0xdc, 0xfc, 0xd2, 0xbc, 0x12, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x96, 0x20, + 0x28, 0xcf, 0x49, 0xe2, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, + 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0x92, 0xd8, 0xc0, + 0x36, 0x1b, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xbc, 0xc5, 0x3e, 0x9e, 0xa9, 0x00, 0x00, 0x00, +} + +func (m *Fee) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Fee) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Fee) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Amount != 0 { + i = encodeVarintFee(dAtA, i, uint64(m.Amount)) + i-- + dAtA[i] = 0x10 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintFee(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintFee(dAtA []byte, offset int, v uint64) int { + offset -= sovFee(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Fee) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovFee(uint64(l)) + } + if m.Amount != 0 { + n += 1 + sovFee(uint64(m.Amount)) + } + return n +} + +func sovFee(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozFee(x uint64) (n int) { + return sovFee(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Fee) 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 ErrIntOverflowFee + } + 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: Fee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Fee: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFee + } + 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 ErrInvalidLengthFee + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFee + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + m.Amount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFee + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Amount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipFee(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFee + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipFee(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFee + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFee + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFee + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthFee + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupFee + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthFee + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthFee = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFee = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupFee = fmt.Errorf("proto: unexpected end of group") +) diff --git a/ibc/applications/middleware/fee/v1/genesis.pb.go b/ibc/applications/middleware/fee/v1/genesis.pb.go new file mode 100644 index 00000000000..b3663704347 --- /dev/null +++ b/ibc/applications/middleware/fee/v1/genesis.pb.go @@ -0,0 +1,267 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/applications/middleware/fee/v1/genesis.proto + +package ibc_applications_middleware_fee_v1 + +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the ibc-transfer genesis state +type GenesisState struct { +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_6a4f6c8d78b5dfbf, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func init() { + proto.RegisterType((*GenesisState)(nil), "ibc.applications.middleware.fee.v1.GenesisState") +} + +func init() { + proto.RegisterFile("ibc/applications/middleware/fee/v1/genesis.proto", fileDescriptor_6a4f6c8d78b5dfbf) +} + +var fileDescriptor_6a4f6c8d78b5dfbf = []byte{ + // 150 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0xc8, 0x4c, 0x4a, 0xd6, + 0x4f, 0x2c, 0x28, 0xc8, 0xc9, 0x4c, 0x4e, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0xd6, 0xcf, 0xcd, 0x4c, + 0x49, 0xc9, 0x49, 0x2d, 0x4f, 0x2c, 0x4a, 0xd5, 0x4f, 0x4b, 0x4d, 0xd5, 0x2f, 0x33, 0xd4, 0x4f, + 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, 0xca, 0x4c, + 0x4a, 0xd6, 0x43, 0xd6, 0xa1, 0x87, 0xd0, 0xa1, 0x97, 0x96, 0x9a, 0xaa, 0x57, 0x66, 0x28, 0x25, + 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x56, 0xae, 0x0f, 0x62, 0x41, 0x74, 0x2a, 0xf1, 0x71, 0xf1, 0xb8, + 0x43, 0x8c, 0x0a, 0x2e, 0x49, 0x2c, 0x49, 0x75, 0x92, 0x38, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, + 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, + 0x63, 0x39, 0x86, 0x24, 0x36, 0xb0, 0x06, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x71, 0xf6, + 0x90, 0xcf, 0x9e, 0x00, 0x00, 0x00, +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/ibc/applications/middleware/fee/v1/query.pb.go b/ibc/applications/middleware/fee/v1/query.pb.go new file mode 100644 index 00000000000..65f2c489b34 --- /dev/null +++ b/ibc/applications/middleware/fee/v1/query.pb.go @@ -0,0 +1,1860 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/applications/middleware/fee/v1/query.proto + +package ibc_applications_middleware_fee_v1 + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryReceiveRequestFee is the request type for quering the receieve fee +type QueryReceiveFeeRequest struct { + // Source Port ID + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + // Source Channel ID + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + // Packet sequence + Sequence string `protobuf:"bytes,3,opt,name=sequence,proto3" json:"sequence,omitempty" yaml:"sequence"` + // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). + RelayerAddress string `protobuf:"bytes,4,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` +} + +func (m *QueryReceiveFeeRequest) Reset() { *m = QueryReceiveFeeRequest{} } +func (m *QueryReceiveFeeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryReceiveFeeRequest) ProtoMessage() {} +func (*QueryReceiveFeeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9cafe0e1bd8b928c, []int{0} +} +func (m *QueryReceiveFeeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryReceiveFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryReceiveFeeRequest.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 *QueryReceiveFeeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryReceiveFeeRequest.Merge(m, src) +} +func (m *QueryReceiveFeeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryReceiveFeeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryReceiveFeeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryReceiveFeeRequest proto.InternalMessageInfo + +func (m *QueryReceiveFeeRequest) GetPortId() string { + if m != nil { + return m.PortId + } + return "" +} + +func (m *QueryReceiveFeeRequest) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +func (m *QueryReceiveFeeRequest) GetSequence() string { + if m != nil { + return m.Sequence + } + return "" +} + +func (m *QueryReceiveFeeRequest) GetRelayerAddress() string { + if m != nil { + return m.RelayerAddress + } + return "" +} + +// QueryRequestFeeResponse is the response type for the ReceiveFee RPC +type QueryReceiveFeeResponse struct { + Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty" yaml:"fee"` +} + +func (m *QueryReceiveFeeResponse) Reset() { *m = QueryReceiveFeeResponse{} } +func (m *QueryReceiveFeeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryReceiveFeeResponse) ProtoMessage() {} +func (*QueryReceiveFeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9cafe0e1bd8b928c, []int{1} +} +func (m *QueryReceiveFeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryReceiveFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryReceiveFeeResponse.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 *QueryReceiveFeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryReceiveFeeResponse.Merge(m, src) +} +func (m *QueryReceiveFeeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryReceiveFeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryReceiveFeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryReceiveFeeResponse proto.InternalMessageInfo + +func (m *QueryReceiveFeeResponse) GetFee() *Fee { + if m != nil { + return m.Fee + } + return nil +} + +// QueryAckRequestFee is the request type for quering the acknowledgement fee +type QueryAckFeeRequest struct { + // Source Port ID + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + // Source Channel ID + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + // Packet sequence + Sequence string `protobuf:"bytes,3,opt,name=sequence,proto3" json:"sequence,omitempty" yaml:"sequence"` + // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). + RelayerAddress string `protobuf:"bytes,4,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` +} + +func (m *QueryAckFeeRequest) Reset() { *m = QueryAckFeeRequest{} } +func (m *QueryAckFeeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAckFeeRequest) ProtoMessage() {} +func (*QueryAckFeeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9cafe0e1bd8b928c, []int{2} +} +func (m *QueryAckFeeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAckFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAckFeeRequest.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 *QueryAckFeeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAckFeeRequest.Merge(m, src) +} +func (m *QueryAckFeeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAckFeeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAckFeeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAckFeeRequest proto.InternalMessageInfo + +func (m *QueryAckFeeRequest) GetPortId() string { + if m != nil { + return m.PortId + } + return "" +} + +func (m *QueryAckFeeRequest) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +func (m *QueryAckFeeRequest) GetSequence() string { + if m != nil { + return m.Sequence + } + return "" +} + +func (m *QueryAckFeeRequest) GetRelayerAddress() string { + if m != nil { + return m.RelayerAddress + } + return "" +} + +// QueryAckFeeResponse is the response type for the AckFee RPC +type QueryAckFeeResponse struct { + Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty" yaml:"fee"` +} + +func (m *QueryAckFeeResponse) Reset() { *m = QueryAckFeeResponse{} } +func (m *QueryAckFeeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAckFeeResponse) ProtoMessage() {} +func (*QueryAckFeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9cafe0e1bd8b928c, []int{3} +} +func (m *QueryAckFeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAckFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAckFeeResponse.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 *QueryAckFeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAckFeeResponse.Merge(m, src) +} +func (m *QueryAckFeeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAckFeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAckFeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAckFeeResponse proto.InternalMessageInfo + +func (m *QueryAckFeeResponse) GetFee() *Fee { + if m != nil { + return m.Fee + } + return nil +} + +// QueryTimeoutFee is the request type for quering the timeout fee +type QueryTimeoutFeeRequest struct { + // Source Port ID + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + // Source Channel ID + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + // Packet sequence + Sequence string `protobuf:"bytes,3,opt,name=sequence,proto3" json:"sequence,omitempty" yaml:"sequence"` + // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). + RelayerAddress string `protobuf:"bytes,4,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` +} + +func (m *QueryTimeoutFeeRequest) Reset() { *m = QueryTimeoutFeeRequest{} } +func (m *QueryTimeoutFeeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTimeoutFeeRequest) ProtoMessage() {} +func (*QueryTimeoutFeeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9cafe0e1bd8b928c, []int{4} +} +func (m *QueryTimeoutFeeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTimeoutFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTimeoutFeeRequest.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 *QueryTimeoutFeeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTimeoutFeeRequest.Merge(m, src) +} +func (m *QueryTimeoutFeeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTimeoutFeeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTimeoutFeeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTimeoutFeeRequest proto.InternalMessageInfo + +func (m *QueryTimeoutFeeRequest) GetPortId() string { + if m != nil { + return m.PortId + } + return "" +} + +func (m *QueryTimeoutFeeRequest) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +func (m *QueryTimeoutFeeRequest) GetSequence() string { + if m != nil { + return m.Sequence + } + return "" +} + +func (m *QueryTimeoutFeeRequest) GetRelayerAddress() string { + if m != nil { + return m.RelayerAddress + } + return "" +} + +// QueryTimeoutFeeResponse is the response type for the timeout RPC +type QueryTimeoutFeeResponse struct { + Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty" yaml:"fee"` +} + +func (m *QueryTimeoutFeeResponse) Reset() { *m = QueryTimeoutFeeResponse{} } +func (m *QueryTimeoutFeeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTimeoutFeeResponse) ProtoMessage() {} +func (*QueryTimeoutFeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9cafe0e1bd8b928c, []int{5} +} +func (m *QueryTimeoutFeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTimeoutFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTimeoutFeeResponse.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 *QueryTimeoutFeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTimeoutFeeResponse.Merge(m, src) +} +func (m *QueryTimeoutFeeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTimeoutFeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTimeoutFeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTimeoutFeeResponse proto.InternalMessageInfo + +func (m *QueryTimeoutFeeResponse) GetFee() *Fee { + if m != nil { + return m.Fee + } + return nil +} + +func init() { + proto.RegisterType((*QueryReceiveFeeRequest)(nil), "ibc.applications.middleware.fee.v1.QueryReceiveFeeRequest") + proto.RegisterType((*QueryReceiveFeeResponse)(nil), "ibc.applications.middleware.fee.v1.QueryReceiveFeeResponse") + proto.RegisterType((*QueryAckFeeRequest)(nil), "ibc.applications.middleware.fee.v1.QueryAckFeeRequest") + proto.RegisterType((*QueryAckFeeResponse)(nil), "ibc.applications.middleware.fee.v1.QueryAckFeeResponse") + proto.RegisterType((*QueryTimeoutFeeRequest)(nil), "ibc.applications.middleware.fee.v1.QueryTimeoutFeeRequest") + proto.RegisterType((*QueryTimeoutFeeResponse)(nil), "ibc.applications.middleware.fee.v1.QueryTimeoutFeeResponse") +} + +func init() { + proto.RegisterFile("ibc/applications/middleware/fee/v1/query.proto", fileDescriptor_9cafe0e1bd8b928c) +} + +var fileDescriptor_9cafe0e1bd8b928c = []byte{ + // 539 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x55, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0x5e, 0xb6, 0x51, 0x98, 0x91, 0x3a, 0xe1, 0xc1, 0xa8, 0x22, 0x94, 0x20, 0x23, 0x34, 0x60, + 0x28, 0x56, 0x07, 0x02, 0x69, 0x9c, 0x56, 0xa4, 0x49, 0x3d, 0x12, 0x71, 0x2f, 0x4e, 0xf2, 0x12, + 0xac, 0xa5, 0x71, 0x16, 0xa7, 0x45, 0xbd, 0xf2, 0x0b, 0x90, 0xf8, 0x07, 0x1c, 0xf8, 0x09, 0xfc, + 0x06, 0x8e, 0x93, 0xb8, 0x70, 0x8a, 0x50, 0xcb, 0x95, 0x03, 0xf9, 0x05, 0x28, 0x76, 0x58, 0x37, + 0x3a, 0x41, 0x8b, 0x76, 0xdb, 0xcd, 0xf1, 0xfb, 0xbe, 0xf7, 0xbe, 0xf7, 0xf9, 0xd9, 0x41, 0x0e, + 0xf7, 0x7c, 0xca, 0xd2, 0x34, 0xe6, 0x3e, 0xcb, 0xb9, 0x48, 0x24, 0xed, 0xf3, 0x20, 0x88, 0xe1, + 0x0d, 0xcb, 0x80, 0x86, 0x00, 0x74, 0xd8, 0xa6, 0x87, 0x03, 0xc8, 0x46, 0x4e, 0x9a, 0x89, 0x5c, + 0x60, 0xc2, 0x3d, 0xdf, 0x39, 0x89, 0x77, 0xa6, 0x78, 0x27, 0x04, 0x70, 0x86, 0x6d, 0xf3, 0x7a, + 0x24, 0x22, 0xa1, 0xe0, 0xb4, 0x5a, 0x69, 0xa6, 0xf9, 0xc0, 0x17, 0xb2, 0x2f, 0x24, 0xf5, 0x98, + 0x04, 0x9d, 0x92, 0x0e, 0xdb, 0x1e, 0xe4, 0xac, 0x4d, 0x53, 0x16, 0xf1, 0x44, 0xa5, 0xab, 0xb1, + 0x0f, 0xe7, 0x50, 0x55, 0x15, 0xd3, 0xe8, 0x5b, 0x91, 0x10, 0x51, 0x0c, 0x94, 0xa5, 0x9c, 0xb2, + 0x24, 0x11, 0x79, 0xad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bb, 0xe7, 0xef, 0xe8, 0xf1, 0xac, + 0xbe, 0xe4, 0x7d, 0x10, 0x83, 0xfc, 0x22, 0xcd, 0xea, 0xc9, 0x96, 0xcf, 0xdd, 0xd9, 0x9d, 0x0f, + 0xab, 0xe8, 0x92, 0x2a, 0x83, 0x3f, 0x19, 0x08, 0x4d, 0xef, 0x05, 0xde, 0x9d, 0x27, 0xed, 0xd9, + 0xef, 0x87, 0xf9, 0xec, 0xbf, 0xb8, 0xba, 0x39, 0x42, 0xdf, 0x7e, 0xf9, 0xfe, 0x7e, 0xf9, 0x3e, + 0xde, 0xa2, 0xf5, 0x63, 0x77, 0xd6, 0x23, 0x97, 0x69, 0x5e, 0x2f, 0x04, 0xc0, 0x1f, 0x0d, 0xd4, + 0xd0, 0xa3, 0x87, 0x9f, 0xcc, 0x5d, 0xf8, 0xd4, 0xd5, 0x34, 0x9f, 0x2e, 0xcc, 0xab, 0xc5, 0x6e, + 0x2b, 0xb1, 0x77, 0xf1, 0x9d, 0xbf, 0x89, 0x65, 0xfe, 0x81, 0x12, 0x5a, 0x39, 0x3c, 0x3d, 0xcd, + 0x05, 0x1c, 0x9e, 0x99, 0xfa, 0x05, 0x1c, 0x9e, 0x1d, 0x9f, 0xf9, 0x1c, 0xce, 0x35, 0xaf, 0x12, + 0xde, 0x69, 0x7d, 0x1e, 0x5b, 0xc6, 0xd1, 0xd8, 0x32, 0xbe, 0x8d, 0x2d, 0xe3, 0xdd, 0xc4, 0x5a, + 0x3a, 0x9a, 0x58, 0x4b, 0x5f, 0x27, 0xd6, 0x92, 0xd7, 0x50, 0xff, 0x92, 0x47, 0xbf, 0x02, 0x00, + 0x00, 0xff, 0xff, 0xf4, 0xef, 0xe3, 0xfd, 0x2f, 0x07, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Gets the fee expected for submitting ReceivePacket msg for the given packet + ReceiveFee(ctx context.Context, in *QueryReceiveFeeRequest, opts ...grpc.CallOption) (*QueryReceiveFeeResponse, error) + // Gets the fee expected for submitting AcknowledgePacket msg for the given packet + AckFee(ctx context.Context, in *QueryAckFeeRequest, opts ...grpc.CallOption) (*QueryAckFeeResponse, error) + // Gets the fee expected for submitting TimeoutPacket msg for the given packet + TimeoutFee(ctx context.Context, in *QueryTimeoutFeeRequest, opts ...grpc.CallOption) (*QueryTimeoutFeeResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) ReceiveFee(ctx context.Context, in *QueryReceiveFeeRequest, opts ...grpc.CallOption) (*QueryReceiveFeeResponse, error) { + out := new(QueryReceiveFeeResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Query/ReceiveFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AckFee(ctx context.Context, in *QueryAckFeeRequest, opts ...grpc.CallOption) (*QueryAckFeeResponse, error) { + out := new(QueryAckFeeResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Query/AckFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) TimeoutFee(ctx context.Context, in *QueryTimeoutFeeRequest, opts ...grpc.CallOption) (*QueryTimeoutFeeResponse, error) { + out := new(QueryTimeoutFeeResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Query/TimeoutFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Gets the fee expected for submitting ReceivePacket msg for the given packet + ReceiveFee(context.Context, *QueryReceiveFeeRequest) (*QueryReceiveFeeResponse, error) + // Gets the fee expected for submitting AcknowledgePacket msg for the given packet + AckFee(context.Context, *QueryAckFeeRequest) (*QueryAckFeeResponse, error) + // Gets the fee expected for submitting TimeoutPacket msg for the given packet + TimeoutFee(context.Context, *QueryTimeoutFeeRequest) (*QueryTimeoutFeeResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) ReceiveFee(ctx context.Context, req *QueryReceiveFeeRequest) (*QueryReceiveFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReceiveFee not implemented") +} +func (*UnimplementedQueryServer) AckFee(ctx context.Context, req *QueryAckFeeRequest) (*QueryAckFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AckFee not implemented") +} +func (*UnimplementedQueryServer) TimeoutFee(ctx context.Context, req *QueryTimeoutFeeRequest) (*QueryTimeoutFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TimeoutFee not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_ReceiveFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryReceiveFeeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ReceiveFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.middleware.fee.v1.Query/ReceiveFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ReceiveFee(ctx, req.(*QueryReceiveFeeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AckFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAckFeeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AckFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.middleware.fee.v1.Query/AckFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AckFee(ctx, req.(*QueryAckFeeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TimeoutFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTimeoutFeeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TimeoutFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.middleware.fee.v1.Query/TimeoutFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TimeoutFee(ctx, req.(*QueryTimeoutFeeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ibc.applications.middleware.fee.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ReceiveFee", + Handler: _Query_ReceiveFee_Handler, + }, + { + MethodName: "AckFee", + Handler: _Query_AckFee_Handler, + }, + { + MethodName: "TimeoutFee", + Handler: _Query_TimeoutFee_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ibc/applications/middleware/fee/v1/query.proto", +} + +func (m *QueryReceiveFeeRequest) 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 *QueryReceiveFeeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryReceiveFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RelayerAddress) > 0 { + i -= len(m.RelayerAddress) + copy(dAtA[i:], m.RelayerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) + i-- + dAtA[i] = 0x22 + } + if len(m.Sequence) > 0 { + i -= len(m.Sequence) + copy(dAtA[i:], m.Sequence) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Sequence))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0x12 + } + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryReceiveFeeResponse) 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 *QueryReceiveFeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryReceiveFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Fee != nil { + { + size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAckFeeRequest) 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 *QueryAckFeeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAckFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RelayerAddress) > 0 { + i -= len(m.RelayerAddress) + copy(dAtA[i:], m.RelayerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) + i-- + dAtA[i] = 0x22 + } + if len(m.Sequence) > 0 { + i -= len(m.Sequence) + copy(dAtA[i:], m.Sequence) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Sequence))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0x12 + } + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAckFeeResponse) 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 *QueryAckFeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAckFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Fee != nil { + { + size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTimeoutFeeRequest) 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 *QueryTimeoutFeeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTimeoutFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RelayerAddress) > 0 { + i -= len(m.RelayerAddress) + copy(dAtA[i:], m.RelayerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) + i-- + dAtA[i] = 0x22 + } + if len(m.Sequence) > 0 { + i -= len(m.Sequence) + copy(dAtA[i:], m.Sequence) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Sequence))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0x12 + } + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTimeoutFeeResponse) 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 *QueryTimeoutFeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTimeoutFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Fee != nil { + { + size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryReceiveFeeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Sequence) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.RelayerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryReceiveFeeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Fee != nil { + l = m.Fee.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAckFeeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Sequence) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.RelayerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAckFeeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Fee != nil { + l = m.Fee.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTimeoutFeeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Sequence) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.RelayerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTimeoutFeeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Fee != nil { + l = m.Fee.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryReceiveFeeRequest) 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 ErrIntOverflowQuery + } + 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: QueryReceiveFeeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryReceiveFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sequence = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RelayerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryReceiveFeeResponse) 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 ErrIntOverflowQuery + } + 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: QueryReceiveFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryReceiveFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fee == nil { + m.Fee = &Fee{} + } + if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAckFeeRequest) 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 ErrIntOverflowQuery + } + 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: QueryAckFeeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAckFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sequence = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RelayerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAckFeeResponse) 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 ErrIntOverflowQuery + } + 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: QueryAckFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAckFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fee == nil { + m.Fee = &Fee{} + } + if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTimeoutFeeRequest) 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 ErrIntOverflowQuery + } + 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: QueryTimeoutFeeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTimeoutFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sequence = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RelayerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTimeoutFeeResponse) 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 ErrIntOverflowQuery + } + 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: QueryTimeoutFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTimeoutFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fee == nil { + m.Fee = &Fee{} + } + if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/ibc/applications/middleware/fee/v1/query.pb.gw.go b/ibc/applications/middleware/fee/v1/query.pb.gw.go new file mode 100644 index 00000000000..58b701c17ab --- /dev/null +++ b/ibc/applications/middleware/fee/v1/query.pb.gw.go @@ -0,0 +1,326 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: ibc/applications/middleware/fee/v1/query.proto + +/* +Package ibc_applications_middleware_fee_v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package ibc_applications_middleware_fee_v1 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage + +var ( + filter_Query_ReceiveFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_ReceiveFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryReceiveFeeRequest + 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_ReceiveFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ReceiveFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ReceiveFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryReceiveFeeRequest + 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_ReceiveFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ReceiveFee(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_AckFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_AckFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAckFeeRequest + 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_AckFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AckFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AckFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAckFeeRequest + 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_AckFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AckFee(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_TimeoutFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_TimeoutFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTimeoutFeeRequest + 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_TimeoutFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.TimeoutFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TimeoutFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTimeoutFeeRequest + 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_TimeoutFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.TimeoutFee(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_ReceiveFee_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) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ReceiveFee_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ReceiveFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AckFee_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) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AckFee_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AckFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TimeoutFee_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) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_TimeoutFee_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TimeoutFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_ReceiveFee_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ReceiveFee_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_ReceiveFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AckFee_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AckFee_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_AckFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TimeoutFee_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_TimeoutFee_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_TimeoutFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_ReceiveFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "receive_fee"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_AckFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "ack_fee"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_TimeoutFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "timeout_fee"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_Query_ReceiveFee_0 = runtime.ForwardResponseMessage + + forward_Query_AckFee_0 = runtime.ForwardResponseMessage + + forward_Query_TimeoutFee_0 = runtime.ForwardResponseMessage +) diff --git a/ibc/applications/middleware/fee/v1/tx.pb.go b/ibc/applications/middleware/fee/v1/tx.pb.go new file mode 100644 index 00000000000..d26368ba083 --- /dev/null +++ b/ibc/applications/middleware/fee/v1/tx.pb.go @@ -0,0 +1,1984 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/applications/middleware/fee/v1/tx.proto + +package ibc_applications_middleware_fee_v1 + +import ( + context "context" + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgRegisterCounterPartyAddress is the request type for registering the counter party address +type MsgRegisterCounterPartyAddress struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + CounterpartyAddress string `protobuf:"bytes,2,opt,name=counterparty_address,json=counterpartyAddress,proto3" json:"counterparty_address,omitempty" yaml:"address"` +} + +func (m *MsgRegisterCounterPartyAddress) Reset() { *m = MsgRegisterCounterPartyAddress{} } +func (m *MsgRegisterCounterPartyAddress) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterCounterPartyAddress) ProtoMessage() {} +func (*MsgRegisterCounterPartyAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_faf7cf2f6149e2c8, []int{0} +} +func (m *MsgRegisterCounterPartyAddress) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterCounterPartyAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterCounterPartyAddress.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 *MsgRegisterCounterPartyAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterCounterPartyAddress.Merge(m, src) +} +func (m *MsgRegisterCounterPartyAddress) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterCounterPartyAddress) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterCounterPartyAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterCounterPartyAddress proto.InternalMessageInfo + +// MsgRegisterCounterPartyAddressResponse defines the Msg/RegisterCounteryPartyAddress response type +type MsgRegisterCounterPartyAddressResponse struct { +} + +func (m *MsgRegisterCounterPartyAddressResponse) Reset() { + *m = MsgRegisterCounterPartyAddressResponse{} +} +func (m *MsgRegisterCounterPartyAddressResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterCounterPartyAddressResponse) ProtoMessage() {} +func (*MsgRegisterCounterPartyAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_faf7cf2f6149e2c8, []int{1} +} +func (m *MsgRegisterCounterPartyAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterCounterPartyAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterCounterPartyAddressResponse.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 *MsgRegisterCounterPartyAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterCounterPartyAddressResponse.Merge(m, src) +} +func (m *MsgRegisterCounterPartyAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterCounterPartyAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterCounterPartyAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterCounterPartyAddressResponse proto.InternalMessageInfo + +// MsgEscrowPacketFee defines the request type EscrowPacketFee RPC +type MsgEscrowPacketFee struct { + PacketId string `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"packet_id"` + ReceiveFee *Fee `protobuf:"bytes,2,opt,name=receive_fee,json=receiveFee,proto3" json:"receive_fee,omitempty" yaml:"receive_fee"` + AckFee *Fee `protobuf:"bytes,3,opt,name=ack_fee,json=ackFee,proto3" json:"ack_fee,omitempty" yaml:"ack_fee"` + TimeoutFee *Fee `protobuf:"bytes,4,opt,name=timeout_fee,json=timeoutFee,proto3" json:"timeout_fee,omitempty" yaml:"timeout_fee"` + Relayers []string `protobuf:"bytes,5,rep,name=relayers,proto3" json:"relayers,omitempty" yaml:"relayers"` +} + +func (m *MsgEscrowPacketFee) Reset() { *m = MsgEscrowPacketFee{} } +func (m *MsgEscrowPacketFee) String() string { return proto.CompactTextString(m) } +func (*MsgEscrowPacketFee) ProtoMessage() {} +func (*MsgEscrowPacketFee) Descriptor() ([]byte, []int) { + return fileDescriptor_faf7cf2f6149e2c8, []int{2} +} +func (m *MsgEscrowPacketFee) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEscrowPacketFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEscrowPacketFee.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 *MsgEscrowPacketFee) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEscrowPacketFee.Merge(m, src) +} +func (m *MsgEscrowPacketFee) XXX_Size() int { + return m.Size() +} +func (m *MsgEscrowPacketFee) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEscrowPacketFee.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEscrowPacketFee proto.InternalMessageInfo + +func (m *MsgEscrowPacketFee) GetPacketId() string { + if m != nil { + return m.PacketId + } + return "" +} + +func (m *MsgEscrowPacketFee) GetReceiveFee() *Fee { + if m != nil { + return m.ReceiveFee + } + return nil +} + +func (m *MsgEscrowPacketFee) GetAckFee() *Fee { + if m != nil { + return m.AckFee + } + return nil +} + +func (m *MsgEscrowPacketFee) GetTimeoutFee() *Fee { + if m != nil { + return m.TimeoutFee + } + return nil +} + +func (m *MsgEscrowPacketFee) GetRelayers() []string { + if m != nil { + return m.Relayers + } + return nil +} + +// MsgEscrowPacketFeeResponse defines the response type for Msg/EscrowPacketFee +type MsgEscrowPacketFeeResponse struct { +} + +func (m *MsgEscrowPacketFeeResponse) Reset() { *m = MsgEscrowPacketFeeResponse{} } +func (m *MsgEscrowPacketFeeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgEscrowPacketFeeResponse) ProtoMessage() {} +func (*MsgEscrowPacketFeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_faf7cf2f6149e2c8, []int{3} +} +func (m *MsgEscrowPacketFeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEscrowPacketFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEscrowPacketFeeResponse.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 *MsgEscrowPacketFeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEscrowPacketFeeResponse.Merge(m, src) +} +func (m *MsgEscrowPacketFeeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgEscrowPacketFeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEscrowPacketFeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEscrowPacketFeeResponse proto.InternalMessageInfo + +// MsgPayFee defines the request type for PayFee the RPC +type MsgPayFee struct { + PacketId string `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"packet_id"` + ForwardRelayer string `protobuf:"bytes,2,opt,name=forward_relayer,json=forwardRelayer,proto3" json:"forward_relayer,omitempty" yaml:"forward_relayer"` + ReverseRelayer string `protobuf:"bytes,3,opt,name=reverse_relayer,json=reverseRelayer,proto3" json:"reverse_relayer,omitempty" yaml:"reverse_relayer"` +} + +func (m *MsgPayFee) Reset() { *m = MsgPayFee{} } +func (m *MsgPayFee) String() string { return proto.CompactTextString(m) } +func (*MsgPayFee) ProtoMessage() {} +func (*MsgPayFee) Descriptor() ([]byte, []int) { + return fileDescriptor_faf7cf2f6149e2c8, []int{4} +} +func (m *MsgPayFee) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgPayFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgPayFee.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 *MsgPayFee) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgPayFee.Merge(m, src) +} +func (m *MsgPayFee) XXX_Size() int { + return m.Size() +} +func (m *MsgPayFee) XXX_DiscardUnknown() { + xxx_messageInfo_MsgPayFee.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgPayFee proto.InternalMessageInfo + +func (m *MsgPayFee) GetPacketId() string { + if m != nil { + return m.PacketId + } + return "" +} + +func (m *MsgPayFee) GetForwardRelayer() string { + if m != nil { + return m.ForwardRelayer + } + return "" +} + +func (m *MsgPayFee) GetReverseRelayer() string { + if m != nil { + return m.ReverseRelayer + } + return "" +} + +// MsgPayFeeResponse defines the response type for Msg/PayFee +type MsgPayFeeResponse struct { +} + +func (m *MsgPayFeeResponse) Reset() { *m = MsgPayFeeResponse{} } +func (m *MsgPayFeeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgPayFeeResponse) ProtoMessage() {} +func (*MsgPayFeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_faf7cf2f6149e2c8, []int{5} +} +func (m *MsgPayFeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgPayFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgPayFeeResponse.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 *MsgPayFeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgPayFeeResponse.Merge(m, src) +} +func (m *MsgPayFeeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgPayFeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgPayFeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgPayFeeResponse proto.InternalMessageInfo + +// MsgPayTimmeout defines the request type for the PayTimeoutFee RPC +type MsgPayTimeoutFee struct { + PacketId string `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"packet_id"` + TimeoutRelayer string `protobuf:"bytes,2,opt,name=timeout_relayer,json=timeoutRelayer,proto3" json:"timeout_relayer,omitempty" yaml:"timeout_relayer"` +} + +func (m *MsgPayTimeoutFee) Reset() { *m = MsgPayTimeoutFee{} } +func (m *MsgPayTimeoutFee) String() string { return proto.CompactTextString(m) } +func (*MsgPayTimeoutFee) ProtoMessage() {} +func (*MsgPayTimeoutFee) Descriptor() ([]byte, []int) { + return fileDescriptor_faf7cf2f6149e2c8, []int{6} +} +func (m *MsgPayTimeoutFee) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgPayTimeoutFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgPayTimeoutFee.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 *MsgPayTimeoutFee) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgPayTimeoutFee.Merge(m, src) +} +func (m *MsgPayTimeoutFee) XXX_Size() int { + return m.Size() +} +func (m *MsgPayTimeoutFee) XXX_DiscardUnknown() { + xxx_messageInfo_MsgPayTimeoutFee.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgPayTimeoutFee proto.InternalMessageInfo + +func (m *MsgPayTimeoutFee) GetPacketId() string { + if m != nil { + return m.PacketId + } + return "" +} + +func (m *MsgPayTimeoutFee) GetTimeoutRelayer() string { + if m != nil { + return m.TimeoutRelayer + } + return "" +} + +// MsgPayTimeoutFeeResponse defines the response type for Msg/PayTimeoutFee +type MsgPayTimeoutFeeResponse struct { +} + +func (m *MsgPayTimeoutFeeResponse) Reset() { *m = MsgPayTimeoutFeeResponse{} } +func (m *MsgPayTimeoutFeeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgPayTimeoutFeeResponse) ProtoMessage() {} +func (*MsgPayTimeoutFeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_faf7cf2f6149e2c8, []int{7} +} +func (m *MsgPayTimeoutFeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgPayTimeoutFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgPayTimeoutFeeResponse.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 *MsgPayTimeoutFeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgPayTimeoutFeeResponse.Merge(m, src) +} +func (m *MsgPayTimeoutFeeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgPayTimeoutFeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgPayTimeoutFeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgPayTimeoutFeeResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgRegisterCounterPartyAddress)(nil), "ibc.applications.middleware.fee.v1.MsgRegisterCounterPartyAddress") + proto.RegisterType((*MsgRegisterCounterPartyAddressResponse)(nil), "ibc.applications.middleware.fee.v1.MsgRegisterCounterPartyAddressResponse") + proto.RegisterType((*MsgEscrowPacketFee)(nil), "ibc.applications.middleware.fee.v1.MsgEscrowPacketFee") + proto.RegisterType((*MsgEscrowPacketFeeResponse)(nil), "ibc.applications.middleware.fee.v1.MsgEscrowPacketFeeResponse") + proto.RegisterType((*MsgPayFee)(nil), "ibc.applications.middleware.fee.v1.MsgPayFee") + proto.RegisterType((*MsgPayFeeResponse)(nil), "ibc.applications.middleware.fee.v1.MsgPayFeeResponse") + proto.RegisterType((*MsgPayTimeoutFee)(nil), "ibc.applications.middleware.fee.v1.MsgPayTimeoutFee") + proto.RegisterType((*MsgPayTimeoutFeeResponse)(nil), "ibc.applications.middleware.fee.v1.MsgPayTimeoutFeeResponse") +} + +func init() { + proto.RegisterFile("ibc/applications/middleware/fee/v1/tx.proto", fileDescriptor_faf7cf2f6149e2c8) +} + +var fileDescriptor_faf7cf2f6149e2c8 = []byte{ + // 613 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xcf, 0x4e, 0xdb, 0x4e, + 0x10, 0xc7, 0xe3, 0x5f, 0xf8, 0x01, 0x19, 0xd4, 0x40, 0x0d, 0x42, 0x91, 0x5b, 0xd9, 0x68, 0x0f, + 0x2d, 0x52, 0xa9, 0x2d, 0xe8, 0x9f, 0x03, 0xaa, 0x2a, 0x35, 0x08, 0xa4, 0x56, 0x8a, 0x84, 0x56, + 0xdc, 0xc3, 0x62, 0x4f, 0x2c, 0x8b, 0x10, 0x5b, 0xbb, 0x26, 0x34, 0xe7, 0x5e, 0xda, 0x9e, 0xaa, + 0xbe, 0x40, 0x79, 0x81, 0x9e, 0xfb, 0x0a, 0x1c, 0x39, 0xf6, 0x14, 0x55, 0x70, 0xe9, 0x39, 0x4f, + 0x50, 0xd9, 0xbb, 0x76, 0x52, 0x57, 0xa4, 0x21, 0xbd, 0xed, 0xce, 0x7e, 0xe7, 0x33, 0xdf, 0xf1, + 0xec, 0x26, 0xf0, 0x28, 0x38, 0x72, 0x1d, 0x16, 0x45, 0xed, 0xc0, 0x65, 0x71, 0x10, 0x76, 0x84, + 0x73, 0x12, 0x78, 0x5e, 0x1b, 0xcf, 0x18, 0x47, 0xa7, 0x85, 0xe8, 0x74, 0x37, 0x9d, 0xf8, 0xad, + 0x1d, 0xf1, 0x30, 0x0e, 0x75, 0x12, 0x1c, 0xb9, 0xf6, 0xa8, 0xd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, 0x50, 0x9f, 0xe4, 0x32, 0x8d, 0x7f, + 0xaf, 0xc6, 0x9b, 0x7f, 0x67, 0x64, 0xbe, 0xf5, 0x0f, 0x1a, 0x2c, 0x16, 0x1f, 0xfc, 0xf3, 0x09, + 0xf9, 0x85, 0x3c, 0xe3, 0xe5, 0x74, 0x79, 0xb9, 0x97, 0x0e, 0xcc, 0xaa, 0x8b, 0xfc, 0x78, 0x42, + 0x92, 0x94, 0x1b, 0xcf, 0x6e, 0x25, 0xcf, 0xeb, 0xbd, 0xd3, 0xe0, 0xce, 0xef, 0x37, 0xeb, 0xe9, + 0xe4, 0xa0, 0x61, 0x96, 0xf1, 0x62, 0x9a, 0xac, 0xcc, 0x45, 0xbd, 0x76, 0x71, 0x65, 0x6a, 0x97, + 0x57, 0xa6, 0xf6, 0xe3, 0xca, 0xd4, 0x3e, 0x5d, 0x9b, 0xa5, 0xcb, 0x6b, 0xb3, 0xf4, 0xfd, 0xda, + 0x2c, 0x1d, 0xcd, 0xa6, 0x7f, 0x31, 0x4f, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0x83, 0x10, 0xe5, + 0xa2, 0xf9, 0x06, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // RegisterCounterPartyAddress defines a rpc handler method for MsgRegisterCounterPartyAddress + // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their + // counterparty address before relaying This ensures they will be properly compensated for forward relaying since + // destination chain must send back relayer's source address (counterparty address) in acknowledgement This function + // may be called more than once by a relayer, in which case, latest counterparty address is always used. + RegisterCounterPartyAddress(ctx context.Context, in *MsgRegisterCounterPartyAddress, opts ...grpc.CallOption) (*MsgRegisterCounterPartyAddressResponse, error) + // EscrowPacketFee defines a rpc handler method for MsgEscrowPacketFee + // EscrowPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to + // incentivize the relaying of the given packet. + EscrowPacketFee(ctx context.Context, in *MsgEscrowPacketFee, opts ...grpc.CallOption) (*MsgEscrowPacketFeeResponse, error) + // PayFee defines a rpc handler method for MsgPayFee + // PayFee is a callback implemented by fee module called by the ICS-4 AcknowledgePacket handler. + PayFee(ctx context.Context, in *MsgPayFee, opts ...grpc.CallOption) (*MsgPayFeeResponse, error) + // PayTimeoutFee defines a rpc handler method for MsgPayTimeoutFee + // PayFee is a callback implemented by fee module called by the ICS-4 TimeoutPacket handler. + PayTimeoutFee(ctx context.Context, in *MsgPayTimeoutFee, opts ...grpc.CallOption) (*MsgPayTimeoutFeeResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) RegisterCounterPartyAddress(ctx context.Context, in *MsgRegisterCounterPartyAddress, opts ...grpc.CallOption) (*MsgRegisterCounterPartyAddressResponse, error) { + out := new(MsgRegisterCounterPartyAddressResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Msg/RegisterCounterPartyAddress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) EscrowPacketFee(ctx context.Context, in *MsgEscrowPacketFee, opts ...grpc.CallOption) (*MsgEscrowPacketFeeResponse, error) { + out := new(MsgEscrowPacketFeeResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Msg/EscrowPacketFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) PayFee(ctx context.Context, in *MsgPayFee, opts ...grpc.CallOption) (*MsgPayFeeResponse, error) { + out := new(MsgPayFeeResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Msg/PayFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) PayTimeoutFee(ctx context.Context, in *MsgPayTimeoutFee, opts ...grpc.CallOption) (*MsgPayTimeoutFeeResponse, error) { + out := new(MsgPayTimeoutFeeResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Msg/PayTimeoutFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // RegisterCounterPartyAddress defines a rpc handler method for MsgRegisterCounterPartyAddress + // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their + // counterparty address before relaying This ensures they will be properly compensated for forward relaying since + // destination chain must send back relayer's source address (counterparty address) in acknowledgement This function + // may be called more than once by a relayer, in which case, latest counterparty address is always used. + RegisterCounterPartyAddress(context.Context, *MsgRegisterCounterPartyAddress) (*MsgRegisterCounterPartyAddressResponse, error) + // EscrowPacketFee defines a rpc handler method for MsgEscrowPacketFee + // EscrowPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to + // incentivize the relaying of the given packet. + EscrowPacketFee(context.Context, *MsgEscrowPacketFee) (*MsgEscrowPacketFeeResponse, error) + // PayFee defines a rpc handler method for MsgPayFee + // PayFee is a callback implemented by fee module called by the ICS-4 AcknowledgePacket handler. + PayFee(context.Context, *MsgPayFee) (*MsgPayFeeResponse, error) + // PayTimeoutFee defines a rpc handler method for MsgPayTimeoutFee + // PayFee is a callback implemented by fee module called by the ICS-4 TimeoutPacket handler. + PayTimeoutFee(context.Context, *MsgPayTimeoutFee) (*MsgPayTimeoutFeeResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) RegisterCounterPartyAddress(ctx context.Context, req *MsgRegisterCounterPartyAddress) (*MsgRegisterCounterPartyAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterCounterPartyAddress not implemented") +} +func (*UnimplementedMsgServer) EscrowPacketFee(ctx context.Context, req *MsgEscrowPacketFee) (*MsgEscrowPacketFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EscrowPacketFee not implemented") +} +func (*UnimplementedMsgServer) PayFee(ctx context.Context, req *MsgPayFee) (*MsgPayFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PayFee not implemented") +} +func (*UnimplementedMsgServer) PayTimeoutFee(ctx context.Context, req *MsgPayTimeoutFee) (*MsgPayTimeoutFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PayTimeoutFee not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_RegisterCounterPartyAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterCounterPartyAddress) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RegisterCounterPartyAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.middleware.fee.v1.Msg/RegisterCounterPartyAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RegisterCounterPartyAddress(ctx, req.(*MsgRegisterCounterPartyAddress)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_EscrowPacketFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgEscrowPacketFee) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).EscrowPacketFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.middleware.fee.v1.Msg/EscrowPacketFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).EscrowPacketFee(ctx, req.(*MsgEscrowPacketFee)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_PayFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgPayFee) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).PayFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.middleware.fee.v1.Msg/PayFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).PayFee(ctx, req.(*MsgPayFee)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_PayTimeoutFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgPayTimeoutFee) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).PayTimeoutFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.middleware.fee.v1.Msg/PayTimeoutFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).PayTimeoutFee(ctx, req.(*MsgPayTimeoutFee)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ibc.applications.middleware.fee.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RegisterCounterPartyAddress", + Handler: _Msg_RegisterCounterPartyAddress_Handler, + }, + { + MethodName: "EscrowPacketFee", + Handler: _Msg_EscrowPacketFee_Handler, + }, + { + MethodName: "PayFee", + Handler: _Msg_PayFee_Handler, + }, + { + MethodName: "PayTimeoutFee", + Handler: _Msg_PayTimeoutFee_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ibc/applications/middleware/fee/v1/tx.proto", +} + +func (m *MsgRegisterCounterPartyAddress) 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 *MsgRegisterCounterPartyAddress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterCounterPartyAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CounterpartyAddress) > 0 { + i -= len(m.CounterpartyAddress) + copy(dAtA[i:], m.CounterpartyAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.CounterpartyAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRegisterCounterPartyAddressResponse) 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 *MsgRegisterCounterPartyAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterCounterPartyAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgEscrowPacketFee) 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 *MsgEscrowPacketFee) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEscrowPacketFee) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Relayers) > 0 { + for iNdEx := len(m.Relayers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Relayers[iNdEx]) + copy(dAtA[i:], m.Relayers[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Relayers[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if m.TimeoutFee != nil { + { + size, err := m.TimeoutFee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.AckFee != nil { + { + size, err := m.AckFee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.ReceiveFee != nil { + { + size, err := m.ReceiveFee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.PacketId) > 0 { + i -= len(m.PacketId) + copy(dAtA[i:], m.PacketId) + i = encodeVarintTx(dAtA, i, uint64(len(m.PacketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgEscrowPacketFeeResponse) 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 *MsgEscrowPacketFeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEscrowPacketFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgPayFee) 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 *MsgPayFee) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgPayFee) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ReverseRelayer) > 0 { + i -= len(m.ReverseRelayer) + copy(dAtA[i:], m.ReverseRelayer) + i = encodeVarintTx(dAtA, i, uint64(len(m.ReverseRelayer))) + i-- + dAtA[i] = 0x1a + } + if len(m.ForwardRelayer) > 0 { + i -= len(m.ForwardRelayer) + copy(dAtA[i:], m.ForwardRelayer) + i = encodeVarintTx(dAtA, i, uint64(len(m.ForwardRelayer))) + i-- + dAtA[i] = 0x12 + } + if len(m.PacketId) > 0 { + i -= len(m.PacketId) + copy(dAtA[i:], m.PacketId) + i = encodeVarintTx(dAtA, i, uint64(len(m.PacketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgPayFeeResponse) 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 *MsgPayFeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgPayFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgPayTimeoutFee) 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 *MsgPayTimeoutFee) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgPayTimeoutFee) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TimeoutRelayer) > 0 { + i -= len(m.TimeoutRelayer) + copy(dAtA[i:], m.TimeoutRelayer) + i = encodeVarintTx(dAtA, i, uint64(len(m.TimeoutRelayer))) + i-- + dAtA[i] = 0x12 + } + if len(m.PacketId) > 0 { + i -= len(m.PacketId) + copy(dAtA[i:], m.PacketId) + i = encodeVarintTx(dAtA, i, uint64(len(m.PacketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgPayTimeoutFeeResponse) 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 *MsgPayTimeoutFeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgPayTimeoutFeeResponse) 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 + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgRegisterCounterPartyAddress) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.CounterpartyAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRegisterCounterPartyAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgEscrowPacketFee) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PacketId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.ReceiveFee != nil { + l = m.ReceiveFee.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.AckFee != nil { + l = m.AckFee.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.TimeoutFee != nil { + l = m.TimeoutFee.Size() + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Relayers) > 0 { + for _, s := range m.Relayers { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgEscrowPacketFeeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgPayFee) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PacketId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ForwardRelayer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ReverseRelayer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgPayFeeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgPayTimeoutFee) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PacketId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.TimeoutRelayer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgPayTimeoutFeeResponse) 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 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgRegisterCounterPartyAddress) 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: MsgRegisterCounterPartyAddress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterCounterPartyAddress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var 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.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyAddress", 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.CounterpartyAddress = string(dAtA[iNdEx:postIndex]) + 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 *MsgRegisterCounterPartyAddressResponse) 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: MsgRegisterCounterPartyAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterCounterPartyAddressResponse: 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 (m *MsgEscrowPacketFee) 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: MsgEscrowPacketFee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEscrowPacketFee: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PacketId", 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.PacketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReceiveFee", 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 m.ReceiveFee == nil { + m.ReceiveFee = &Fee{} + } + if err := m.ReceiveFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AckFee", 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 m.AckFee == nil { + m.AckFee = &Fee{} + } + if err := m.AckFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutFee", 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 m.TimeoutFee == nil { + m.TimeoutFee = &Fee{} + } + if err := m.TimeoutFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Relayers", 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.Relayers = append(m.Relayers, string(dAtA[iNdEx:postIndex])) + 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 *MsgEscrowPacketFeeResponse) 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: MsgEscrowPacketFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEscrowPacketFeeResponse: 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 (m *MsgPayFee) 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: MsgPayFee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgPayFee: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PacketId", 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.PacketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwardRelayer", 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.ForwardRelayer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReverseRelayer", 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.ReverseRelayer = string(dAtA[iNdEx:postIndex]) + 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 *MsgPayFeeResponse) 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: MsgPayFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgPayFeeResponse: 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 (m *MsgPayTimeoutFee) 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: MsgPayTimeoutFee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgPayTimeoutFee: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PacketId", 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.PacketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutRelayer", 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.TimeoutRelayer = string(dAtA[iNdEx:postIndex]) + 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 *MsgPayTimeoutFeeResponse) 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: MsgPayTimeoutFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgPayTimeoutFeeResponse: 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 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/proto/ibc/applications/middleware/fee/v1/fee.proto b/proto/ibc/applications/middleware/fee/v1/fee.proto new file mode 100644 index 00000000000..b6da885bcde --- /dev/null +++ b/proto/ibc/applications/middleware/fee/v1/fee.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +package ibc.applications.middleware.fee.v1; + +// Fee interface +// See Fee Payment Middleware spec: +// https://github.com/cosmos/ibc/tree/master/spec/app/ics-029-fee-payment#fee-middleware-contract +message Fee { + // the token denomination the fee will be paid in + string denom = 1; + // the token amount to be transferred + uint64 amount = 2; +} diff --git a/proto/ibc/applications/middleware/fee/v1/genesis.proto b/proto/ibc/applications/middleware/fee/v1/genesis.proto new file mode 100644 index 00000000000..0c87a094181 --- /dev/null +++ b/proto/ibc/applications/middleware/fee/v1/genesis.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + +package ibc.applications.middleware.fee.v1; + +import "gogoproto/gogo.proto"; + +// GenesisState defines the ibc-transfer genesis state +message GenesisState {} diff --git a/proto/ibc/applications/middleware/fee/v1/query.proto b/proto/ibc/applications/middleware/fee/v1/query.proto new file mode 100644 index 00000000000..d67a121a267 --- /dev/null +++ b/proto/ibc/applications/middleware/fee/v1/query.proto @@ -0,0 +1,77 @@ +syntax = "proto3"; + +package ibc.applications.middleware.fee.v1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "ibc/applications/middleware/fee/v1/fee.proto"; +import "google/api/annotations.proto"; + +// Query provides defines the gRPC querier service. +service Query { + // Gets the fee expected for submitting ReceivePacket msg for the given packet + rpc ReceiveFee(QueryReceiveFeeRequest) returns (QueryReceiveFeeResponse) { + option (google.api.http).get = "/ibc/apps/middleware/fee/v1/receive_fee"; + } + + // Gets the fee expected for submitting AcknowledgePacket msg for the given packet + rpc AckFee(QueryAckFeeRequest) returns (QueryAckFeeResponse) { + option (google.api.http).get = "/ibc/apps/middleware/fee/v1/ack_fee"; + } + + // Gets the fee expected for submitting TimeoutPacket msg for the given packet + rpc TimeoutFee(QueryTimeoutFeeRequest) returns (QueryTimeoutFeeResponse) { + option (google.api.http).get = "/ibc/apps/middleware/fee/v1/timeout_fee"; + } +} + +// QueryReceiveRequestFee is the request type for quering the receieve fee +message QueryReceiveFeeRequest { + // Source Port ID + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + // Source Channel ID + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // Packet sequence + string sequence = 3 [(gogoproto.moretags) = "yaml:\"sequence\""]; + // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). + string relayer_address = 4 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; +} + +// QueryRequestFeeResponse is the response type for the ReceiveFee RPC +message QueryReceiveFeeResponse { + ibc.applications.middleware.fee.v1.Fee fee = 1 [(gogoproto.moretags) = "yaml:\"fee\""]; +} + +// QueryAckRequestFee is the request type for quering the acknowledgement fee +message QueryAckFeeRequest { + // Source Port ID + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + // Source Channel ID + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // Packet sequence + string sequence = 3 [(gogoproto.moretags) = "yaml:\"sequence\""]; + // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). + string relayer_address = 4 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; +} + +// QueryAckFeeResponse is the response type for the AckFee RPC +message QueryAckFeeResponse { + ibc.applications.middleware.fee.v1.Fee fee = 1 [(gogoproto.moretags) = "yaml:\"fee\""]; +} + +// QueryTimeoutFee is the request type for quering the timeout fee +message QueryTimeoutFeeRequest { + // Source Port ID + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + // Source Channel ID + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // Packet sequence + string sequence = 3 [(gogoproto.moretags) = "yaml:\"sequence\""]; + // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). + string relayer_address = 4 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; +} + +// QueryTimeoutFeeResponse is the response type for the timeout RPC +message QueryTimeoutFeeResponse { + ibc.applications.middleware.fee.v1.Fee fee = 1 [(gogoproto.moretags) = "yaml:\"fee\""]; +} diff --git a/proto/ibc/applications/middleware/fee/v1/tx.proto b/proto/ibc/applications/middleware/fee/v1/tx.proto new file mode 100644 index 00000000000..00ef82b9c73 --- /dev/null +++ b/proto/ibc/applications/middleware/fee/v1/tx.proto @@ -0,0 +1,69 @@ +syntax = "proto3"; + +package ibc.applications.middleware.fee.v1; + +import "gogoproto/gogo.proto"; +import "ibc/applications/middleware/fee/v1/fee.proto"; + +// Msg defines the ibc/fee Msg service. +service Msg { + // RegisterCounterPartyAddress defines a rpc handler method for MsgRegisterCounterPartyAddress + // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their + // counterparty address before relaying This ensures they will be properly compensated for forward relaying since + // destination chain must send back relayer's source address (counterparty address) in acknowledgement This function + // may be called more than once by a relayer, in which case, latest counterparty address is always used. + rpc RegisterCounterPartyAddress(MsgRegisterCounterPartyAddress) returns (MsgRegisterCounterPartyAddressResponse); + // EscrowPacketFee defines a rpc handler method for MsgEscrowPacketFee + // EscrowPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to + // incentivize the relaying of the given packet. + rpc EscrowPacketFee(MsgEscrowPacketFee) returns (MsgEscrowPacketFeeResponse); + // PayFee defines a rpc handler method for MsgPayFee + // PayFee is a callback implemented by fee module called by the ICS-4 AcknowledgePacket handler. + rpc PayFee(MsgPayFee) returns (MsgPayFeeResponse); + // PayTimeoutFee defines a rpc handler method for MsgPayTimeoutFee + // PayFee is a callback implemented by fee module called by the ICS-4 TimeoutPacket handler. + rpc PayTimeoutFee(MsgPayTimeoutFee) returns (MsgPayTimeoutFeeResponse); +} + +// MsgRegisterCounterPartyAddress is the request type for registering the counter party address +message MsgRegisterCounterPartyAddress { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; + string counterparty_address = 2 [(gogoproto.moretags) = "yaml:\"address\""]; +} + +// MsgRegisterCounterPartyAddressResponse defines the Msg/RegisterCounteryPartyAddress response type +message MsgRegisterCounterPartyAddressResponse {} + +// MsgEscrowPacketFee defines the request type EscrowPacketFee RPC +message MsgEscrowPacketFee { + string packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; + ibc.applications.middleware.fee.v1.Fee receive_fee = 2 [(gogoproto.moretags) = "yaml:\"receive_fee\""]; + ibc.applications.middleware.fee.v1.Fee ack_fee = 3 [(gogoproto.moretags) = "yaml:\"ack_fee\""]; + ibc.applications.middleware.fee.v1.Fee timeout_fee = 4 [(gogoproto.moretags) = "yaml:\"timeout_fee\""]; + repeated string relayers = 5 [(gogoproto.moretags) = "yaml:\"relayers\""]; +} + +// MsgEscrowPacketFeeResponse defines the response type for Msg/EscrowPacketFee +message MsgEscrowPacketFeeResponse {} + +// MsgPayFee defines the request type for PayFee the RPC +message MsgPayFee { + string packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; + string forward_relayer = 2 [(gogoproto.moretags) = "yaml:\"forward_relayer\""]; + string reverse_relayer = 3 [(gogoproto.moretags) = "yaml:\"reverse_relayer\""]; +} + +// MsgPayFeeResponse defines the response type for Msg/PayFee +message MsgPayFeeResponse {} + +// MsgPayTimmeout defines the request type for the PayTimeoutFee RPC +message MsgPayTimeoutFee { + string packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; + string timeout_relayer = 2 [(gogoproto.moretags) = "yaml:\"timeout_relayer\""]; +} + +// MsgPayTimeoutFeeResponse defines the response type for Msg/PayTimeoutFee +message MsgPayTimeoutFeeResponse {} From c0c88e984db857fcd7bb79552f679a233f7edd58 Mon Sep 17 00:00:00 2001 From: Sean King Date: Tue, 20 Jul 2021 14:18:09 +0200 Subject: [PATCH 02/26] grammar --- proto/ibc/applications/middleware/fee/v1/query.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/ibc/applications/middleware/fee/v1/query.proto b/proto/ibc/applications/middleware/fee/v1/query.proto index d67a121a267..f4b26ef37d2 100644 --- a/proto/ibc/applications/middleware/fee/v1/query.proto +++ b/proto/ibc/applications/middleware/fee/v1/query.proto @@ -25,7 +25,7 @@ service Query { } } -// QueryReceiveRequestFee is the request type for quering the receieve fee +// QueryReceiveRequestFee is the request type for quering the receive fee message QueryReceiveFeeRequest { // Source Port ID string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; From 4d4a8b97efcbf731a1b208e7ee0de52543b86007 Mon Sep 17 00:00:00 2001 From: Sean King Date: Tue, 20 Jul 2021 14:36:59 +0200 Subject: [PATCH 03/26] fix: remove generated .pb files --- ibc/applications/middleware/fee/v1/fee.pb.go | 356 --- .../middleware/fee/v1/genesis.pb.go | 267 --- .../middleware/fee/v1/query.pb.go | 1860 ---------------- .../middleware/fee/v1/query.pb.gw.go | 326 --- ibc/applications/middleware/fee/v1/tx.pb.go | 1984 ----------------- 5 files changed, 4793 deletions(-) delete mode 100644 ibc/applications/middleware/fee/v1/fee.pb.go delete mode 100644 ibc/applications/middleware/fee/v1/genesis.pb.go delete mode 100644 ibc/applications/middleware/fee/v1/query.pb.go delete mode 100644 ibc/applications/middleware/fee/v1/query.pb.gw.go delete mode 100644 ibc/applications/middleware/fee/v1/tx.pb.go diff --git a/ibc/applications/middleware/fee/v1/fee.pb.go b/ibc/applications/middleware/fee/v1/fee.pb.go deleted file mode 100644 index a20c76f30db..00000000000 --- a/ibc/applications/middleware/fee/v1/fee.pb.go +++ /dev/null @@ -1,356 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/applications/middleware/fee/v1/fee.proto - -package ibc_applications_middleware_fee_v1 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Fee interface -// See Fee Payment Middleware spec: -// https://github.com/cosmos/ibc/tree/master/spec/app/ics-029-fee-payment#fee-middleware-contract -type Fee struct { - // the token denomination the fee will be paid in - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - // the token amount to be transferred - Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (m *Fee) Reset() { *m = Fee{} } -func (m *Fee) String() string { return proto.CompactTextString(m) } -func (*Fee) ProtoMessage() {} -func (*Fee) Descriptor() ([]byte, []int) { - return fileDescriptor_9a4c0273395d2c1a, []int{0} -} -func (m *Fee) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Fee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Fee.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Fee) XXX_Merge(src proto.Message) { - xxx_messageInfo_Fee.Merge(m, src) -} -func (m *Fee) XXX_Size() int { - return m.Size() -} -func (m *Fee) XXX_DiscardUnknown() { - xxx_messageInfo_Fee.DiscardUnknown(m) -} - -var xxx_messageInfo_Fee proto.InternalMessageInfo - -func (m *Fee) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *Fee) GetAmount() uint64 { - if m != nil { - return m.Amount - } - return 0 -} - -func init() { - proto.RegisterType((*Fee)(nil), "ibc.applications.middleware.fee.v1.Fee") -} - -func init() { - proto.RegisterFile("ibc/applications/middleware/fee/v1/fee.proto", fileDescriptor_9a4c0273395d2c1a) -} - -var fileDescriptor_9a4c0273395d2c1a = []byte{ - // 160 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xc9, 0x4c, 0x4a, 0xd6, - 0x4f, 0x2c, 0x28, 0xc8, 0xc9, 0x4c, 0x4e, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0xd6, 0xcf, 0xcd, 0x4c, - 0x49, 0xc9, 0x49, 0x2d, 0x4f, 0x2c, 0x4a, 0xd5, 0x4f, 0x4b, 0x4d, 0xd5, 0x2f, 0x33, 0x04, 0x51, - 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x4a, 0x99, 0x49, 0xc9, 0x7a, 0xc8, 0xaa, 0xf5, 0x10, - 0xaa, 0xf5, 0x40, 0xca, 0xca, 0x0c, 0x95, 0x8c, 0xb9, 0x98, 0xdd, 0x52, 0x53, 0x85, 0x44, 0xb8, - 0x58, 0x53, 0x52, 0xf3, 0xf2, 0x73, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0x20, 0x1c, 0x21, - 0x31, 0x2e, 0xb6, 0xc4, 0xdc, 0xfc, 0xd2, 0xbc, 0x12, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x96, 0x20, - 0x28, 0xcf, 0x49, 0xe2, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, - 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0x92, 0xd8, 0xc0, - 0x36, 0x1b, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xbc, 0xc5, 0x3e, 0x9e, 0xa9, 0x00, 0x00, 0x00, -} - -func (m *Fee) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Fee) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Fee) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Amount != 0 { - i = encodeVarintFee(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x10 - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintFee(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintFee(dAtA []byte, offset int, v uint64) int { - offset -= sovFee(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Fee) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovFee(uint64(l)) - } - if m.Amount != 0 { - n += 1 + sovFee(uint64(m.Amount)) - } - return n -} - -func sovFee(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozFee(x uint64) (n int) { - return sovFee(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Fee) 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 ErrIntOverflowFee - } - 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: Fee: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Fee: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFee - } - 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 ErrInvalidLengthFee - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFee - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - m.Amount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFee - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Amount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipFee(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFee - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipFee(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFee - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFee - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFee - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthFee - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupFee - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthFee - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthFee = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowFee = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupFee = fmt.Errorf("proto: unexpected end of group") -) diff --git a/ibc/applications/middleware/fee/v1/genesis.pb.go b/ibc/applications/middleware/fee/v1/genesis.pb.go deleted file mode 100644 index b3663704347..00000000000 --- a/ibc/applications/middleware/fee/v1/genesis.pb.go +++ /dev/null @@ -1,267 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/applications/middleware/fee/v1/genesis.proto - -package ibc_applications_middleware_fee_v1 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// GenesisState defines the ibc-transfer genesis state -type GenesisState struct { -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_6a4f6c8d78b5dfbf, []int{0} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func init() { - proto.RegisterType((*GenesisState)(nil), "ibc.applications.middleware.fee.v1.GenesisState") -} - -func init() { - proto.RegisterFile("ibc/applications/middleware/fee/v1/genesis.proto", fileDescriptor_6a4f6c8d78b5dfbf) -} - -var fileDescriptor_6a4f6c8d78b5dfbf = []byte{ - // 150 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0xc8, 0x4c, 0x4a, 0xd6, - 0x4f, 0x2c, 0x28, 0xc8, 0xc9, 0x4c, 0x4e, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0xd6, 0xcf, 0xcd, 0x4c, - 0x49, 0xc9, 0x49, 0x2d, 0x4f, 0x2c, 0x4a, 0xd5, 0x4f, 0x4b, 0x4d, 0xd5, 0x2f, 0x33, 0xd4, 0x4f, - 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, 0xca, 0x4c, - 0x4a, 0xd6, 0x43, 0xd6, 0xa1, 0x87, 0xd0, 0xa1, 0x97, 0x96, 0x9a, 0xaa, 0x57, 0x66, 0x28, 0x25, - 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x56, 0xae, 0x0f, 0x62, 0x41, 0x74, 0x2a, 0xf1, 0x71, 0xf1, 0xb8, - 0x43, 0x8c, 0x0a, 0x2e, 0x49, 0x2c, 0x49, 0x75, 0x92, 0x38, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, - 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, - 0x63, 0x39, 0x86, 0x24, 0x36, 0xb0, 0x06, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x71, 0xf6, - 0x90, 0xcf, 0x9e, 0x00, 0x00, 0x00, -} - -func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GenesisState) 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 ErrIntOverflowGenesis - } - 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: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenesis(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/ibc/applications/middleware/fee/v1/query.pb.go b/ibc/applications/middleware/fee/v1/query.pb.go deleted file mode 100644 index 65f2c489b34..00000000000 --- a/ibc/applications/middleware/fee/v1/query.pb.go +++ /dev/null @@ -1,1860 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/applications/middleware/fee/v1/query.proto - -package ibc_applications_middleware_fee_v1 - -import ( - context "context" - fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryReceiveRequestFee is the request type for quering the receieve fee -type QueryReceiveFeeRequest struct { - // Source Port ID - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - // Source Channel ID - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - // Packet sequence - Sequence string `protobuf:"bytes,3,opt,name=sequence,proto3" json:"sequence,omitempty" yaml:"sequence"` - // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - RelayerAddress string `protobuf:"bytes,4,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` -} - -func (m *QueryReceiveFeeRequest) Reset() { *m = QueryReceiveFeeRequest{} } -func (m *QueryReceiveFeeRequest) String() string { return proto.CompactTextString(m) } -func (*QueryReceiveFeeRequest) ProtoMessage() {} -func (*QueryReceiveFeeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9cafe0e1bd8b928c, []int{0} -} -func (m *QueryReceiveFeeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryReceiveFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryReceiveFeeRequest.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 *QueryReceiveFeeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryReceiveFeeRequest.Merge(m, src) -} -func (m *QueryReceiveFeeRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryReceiveFeeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryReceiveFeeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryReceiveFeeRequest proto.InternalMessageInfo - -func (m *QueryReceiveFeeRequest) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -func (m *QueryReceiveFeeRequest) GetChannelId() string { - if m != nil { - return m.ChannelId - } - return "" -} - -func (m *QueryReceiveFeeRequest) GetSequence() string { - if m != nil { - return m.Sequence - } - return "" -} - -func (m *QueryReceiveFeeRequest) GetRelayerAddress() string { - if m != nil { - return m.RelayerAddress - } - return "" -} - -// QueryRequestFeeResponse is the response type for the ReceiveFee RPC -type QueryReceiveFeeResponse struct { - Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty" yaml:"fee"` -} - -func (m *QueryReceiveFeeResponse) Reset() { *m = QueryReceiveFeeResponse{} } -func (m *QueryReceiveFeeResponse) String() string { return proto.CompactTextString(m) } -func (*QueryReceiveFeeResponse) ProtoMessage() {} -func (*QueryReceiveFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9cafe0e1bd8b928c, []int{1} -} -func (m *QueryReceiveFeeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryReceiveFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryReceiveFeeResponse.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 *QueryReceiveFeeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryReceiveFeeResponse.Merge(m, src) -} -func (m *QueryReceiveFeeResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryReceiveFeeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryReceiveFeeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryReceiveFeeResponse proto.InternalMessageInfo - -func (m *QueryReceiveFeeResponse) GetFee() *Fee { - if m != nil { - return m.Fee - } - return nil -} - -// QueryAckRequestFee is the request type for quering the acknowledgement fee -type QueryAckFeeRequest struct { - // Source Port ID - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - // Source Channel ID - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - // Packet sequence - Sequence string `protobuf:"bytes,3,opt,name=sequence,proto3" json:"sequence,omitempty" yaml:"sequence"` - // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - RelayerAddress string `protobuf:"bytes,4,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` -} - -func (m *QueryAckFeeRequest) Reset() { *m = QueryAckFeeRequest{} } -func (m *QueryAckFeeRequest) String() string { return proto.CompactTextString(m) } -func (*QueryAckFeeRequest) ProtoMessage() {} -func (*QueryAckFeeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9cafe0e1bd8b928c, []int{2} -} -func (m *QueryAckFeeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAckFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAckFeeRequest.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 *QueryAckFeeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAckFeeRequest.Merge(m, src) -} -func (m *QueryAckFeeRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryAckFeeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAckFeeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAckFeeRequest proto.InternalMessageInfo - -func (m *QueryAckFeeRequest) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -func (m *QueryAckFeeRequest) GetChannelId() string { - if m != nil { - return m.ChannelId - } - return "" -} - -func (m *QueryAckFeeRequest) GetSequence() string { - if m != nil { - return m.Sequence - } - return "" -} - -func (m *QueryAckFeeRequest) GetRelayerAddress() string { - if m != nil { - return m.RelayerAddress - } - return "" -} - -// QueryAckFeeResponse is the response type for the AckFee RPC -type QueryAckFeeResponse struct { - Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty" yaml:"fee"` -} - -func (m *QueryAckFeeResponse) Reset() { *m = QueryAckFeeResponse{} } -func (m *QueryAckFeeResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAckFeeResponse) ProtoMessage() {} -func (*QueryAckFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9cafe0e1bd8b928c, []int{3} -} -func (m *QueryAckFeeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAckFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAckFeeResponse.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 *QueryAckFeeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAckFeeResponse.Merge(m, src) -} -func (m *QueryAckFeeResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryAckFeeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAckFeeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAckFeeResponse proto.InternalMessageInfo - -func (m *QueryAckFeeResponse) GetFee() *Fee { - if m != nil { - return m.Fee - } - return nil -} - -// QueryTimeoutFee is the request type for quering the timeout fee -type QueryTimeoutFeeRequest struct { - // Source Port ID - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - // Source Channel ID - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - // Packet sequence - Sequence string `protobuf:"bytes,3,opt,name=sequence,proto3" json:"sequence,omitempty" yaml:"sequence"` - // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - RelayerAddress string `protobuf:"bytes,4,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` -} - -func (m *QueryTimeoutFeeRequest) Reset() { *m = QueryTimeoutFeeRequest{} } -func (m *QueryTimeoutFeeRequest) String() string { return proto.CompactTextString(m) } -func (*QueryTimeoutFeeRequest) ProtoMessage() {} -func (*QueryTimeoutFeeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9cafe0e1bd8b928c, []int{4} -} -func (m *QueryTimeoutFeeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryTimeoutFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTimeoutFeeRequest.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 *QueryTimeoutFeeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTimeoutFeeRequest.Merge(m, src) -} -func (m *QueryTimeoutFeeRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryTimeoutFeeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTimeoutFeeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTimeoutFeeRequest proto.InternalMessageInfo - -func (m *QueryTimeoutFeeRequest) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -func (m *QueryTimeoutFeeRequest) GetChannelId() string { - if m != nil { - return m.ChannelId - } - return "" -} - -func (m *QueryTimeoutFeeRequest) GetSequence() string { - if m != nil { - return m.Sequence - } - return "" -} - -func (m *QueryTimeoutFeeRequest) GetRelayerAddress() string { - if m != nil { - return m.RelayerAddress - } - return "" -} - -// QueryTimeoutFeeResponse is the response type for the timeout RPC -type QueryTimeoutFeeResponse struct { - Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty" yaml:"fee"` -} - -func (m *QueryTimeoutFeeResponse) Reset() { *m = QueryTimeoutFeeResponse{} } -func (m *QueryTimeoutFeeResponse) String() string { return proto.CompactTextString(m) } -func (*QueryTimeoutFeeResponse) ProtoMessage() {} -func (*QueryTimeoutFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9cafe0e1bd8b928c, []int{5} -} -func (m *QueryTimeoutFeeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryTimeoutFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTimeoutFeeResponse.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 *QueryTimeoutFeeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTimeoutFeeResponse.Merge(m, src) -} -func (m *QueryTimeoutFeeResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryTimeoutFeeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTimeoutFeeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTimeoutFeeResponse proto.InternalMessageInfo - -func (m *QueryTimeoutFeeResponse) GetFee() *Fee { - if m != nil { - return m.Fee - } - return nil -} - -func init() { - proto.RegisterType((*QueryReceiveFeeRequest)(nil), "ibc.applications.middleware.fee.v1.QueryReceiveFeeRequest") - proto.RegisterType((*QueryReceiveFeeResponse)(nil), "ibc.applications.middleware.fee.v1.QueryReceiveFeeResponse") - proto.RegisterType((*QueryAckFeeRequest)(nil), "ibc.applications.middleware.fee.v1.QueryAckFeeRequest") - proto.RegisterType((*QueryAckFeeResponse)(nil), "ibc.applications.middleware.fee.v1.QueryAckFeeResponse") - proto.RegisterType((*QueryTimeoutFeeRequest)(nil), "ibc.applications.middleware.fee.v1.QueryTimeoutFeeRequest") - proto.RegisterType((*QueryTimeoutFeeResponse)(nil), "ibc.applications.middleware.fee.v1.QueryTimeoutFeeResponse") -} - -func init() { - proto.RegisterFile("ibc/applications/middleware/fee/v1/query.proto", fileDescriptor_9cafe0e1bd8b928c) -} - -var fileDescriptor_9cafe0e1bd8b928c = []byte{ - // 539 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x55, 0x41, 0x6f, 0xd3, 0x30, - 0x14, 0x5e, 0xb6, 0x51, 0x98, 0x91, 0x3a, 0xe1, 0xc1, 0xa8, 0x22, 0x94, 0x20, 0x23, 0x34, 0x60, - 0x28, 0x56, 0x07, 0x02, 0x69, 0x9c, 0x56, 0xa4, 0x49, 0x3d, 0x12, 0x71, 0x2f, 0x4e, 0xf2, 0x12, - 0xac, 0xa5, 0x71, 0x16, 0xa7, 0x45, 0xbd, 0xf2, 0x0b, 0x90, 0xf8, 0x07, 0x1c, 0xf8, 0x09, 0xfc, - 0x06, 0x8e, 0x93, 0xb8, 0x70, 0x8a, 0x50, 0xcb, 0x95, 0x03, 0xf9, 0x05, 0x28, 0x76, 0x58, 0x37, - 0x3a, 0x41, 0x8b, 0x76, 0xdb, 0xcd, 0xf1, 0xfb, 0xbe, 0xf7, 0xbe, 0xf7, 0xf9, 0xd9, 0x41, 0x0e, - 0xf7, 0x7c, 0xca, 0xd2, 0x34, 0xe6, 0x3e, 0xcb, 0xb9, 0x48, 0x24, 0xed, 0xf3, 0x20, 0x88, 0xe1, - 0x0d, 0xcb, 0x80, 0x86, 0x00, 0x74, 0xd8, 0xa6, 0x87, 0x03, 0xc8, 0x46, 0x4e, 0x9a, 0x89, 0x5c, - 0x60, 0xc2, 0x3d, 0xdf, 0x39, 0x89, 0x77, 0xa6, 0x78, 0x27, 0x04, 0x70, 0x86, 0x6d, 0xf3, 0x7a, - 0x24, 0x22, 0xa1, 0xe0, 0xb4, 0x5a, 0x69, 0xa6, 0xf9, 0xc0, 0x17, 0xb2, 0x2f, 0x24, 0xf5, 0x98, - 0x04, 0x9d, 0x92, 0x0e, 0xdb, 0x1e, 0xe4, 0xac, 0x4d, 0x53, 0x16, 0xf1, 0x44, 0xa5, 0xab, 0xb1, - 0x0f, 0xe7, 0x50, 0x55, 0x15, 0xd3, 0xe8, 0x5b, 0x91, 0x10, 0x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0xf9, 0x07, 0x17, 0xc1, 0xd5, 0x57, 0x68, 0xe3, 0x54, 0xbb, 0xe7, 0xef, 0xe8, 0xf1, 0xac, - 0xbe, 0xe4, 0x7d, 0x10, 0x83, 0xfc, 0x22, 0xcd, 0xea, 0xc9, 0x96, 0xcf, 0xdd, 0xd9, 0x9d, 0x0f, - 0xab, 0xe8, 0x92, 0x2a, 0x83, 0x3f, 0x19, 0x08, 0x4d, 0xef, 0x05, 0xde, 0x9d, 0x27, 0xed, 0xd9, - 0xef, 0x87, 0xf9, 0xec, 0xbf, 0xb8, 0xba, 0x39, 0x42, 0xdf, 0x7e, 0xf9, 0xfe, 0x7e, 0xf9, 0x3e, - 0xde, 0xa2, 0xf5, 0x63, 0x77, 0xd6, 0x23, 0x97, 0x69, 0x5e, 0x2f, 0x04, 0xc0, 0x1f, 0x0d, 0xd4, - 0xd0, 0xa3, 0x87, 0x9f, 0xcc, 0x5d, 0xf8, 0xd4, 0xd5, 0x34, 0x9f, 0x2e, 0xcc, 0xab, 0xc5, 0x6e, - 0x2b, 0xb1, 0x77, 0xf1, 0x9d, 0xbf, 0x89, 0x65, 0xfe, 0x81, 0x12, 0x5a, 0x39, 0x3c, 0x3d, 0xcd, - 0x05, 0x1c, 0x9e, 0x99, 0xfa, 0x05, 0x1c, 0x9e, 0x1d, 0x9f, 0xf9, 0x1c, 0xce, 0x35, 0xaf, 0x12, - 0xde, 0x69, 0x7d, 0x1e, 0x5b, 0xc6, 0xd1, 0xd8, 0x32, 0xbe, 0x8d, 0x2d, 0xe3, 0xdd, 0xc4, 0x5a, - 0x3a, 0x9a, 0x58, 0x4b, 0x5f, 0x27, 0xd6, 0x92, 0xd7, 0x50, 0xff, 0x92, 0x47, 0xbf, 0x02, 0x00, - 0x00, 0xff, 0xff, 0xf4, 0xef, 0xe3, 0xfd, 0x2f, 0x07, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // Gets the fee expected for submitting ReceivePacket msg for the given packet - ReceiveFee(ctx context.Context, in *QueryReceiveFeeRequest, opts ...grpc.CallOption) (*QueryReceiveFeeResponse, error) - // Gets the fee expected for submitting AcknowledgePacket msg for the given packet - AckFee(ctx context.Context, in *QueryAckFeeRequest, opts ...grpc.CallOption) (*QueryAckFeeResponse, error) - // Gets the fee expected for submitting TimeoutPacket msg for the given packet - TimeoutFee(ctx context.Context, in *QueryTimeoutFeeRequest, opts ...grpc.CallOption) (*QueryTimeoutFeeResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) ReceiveFee(ctx context.Context, in *QueryReceiveFeeRequest, opts ...grpc.CallOption) (*QueryReceiveFeeResponse, error) { - out := new(QueryReceiveFeeResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Query/ReceiveFee", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) AckFee(ctx context.Context, in *QueryAckFeeRequest, opts ...grpc.CallOption) (*QueryAckFeeResponse, error) { - out := new(QueryAckFeeResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Query/AckFee", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) TimeoutFee(ctx context.Context, in *QueryTimeoutFeeRequest, opts ...grpc.CallOption) (*QueryTimeoutFeeResponse, error) { - out := new(QueryTimeoutFeeResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Query/TimeoutFee", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - // Gets the fee expected for submitting ReceivePacket msg for the given packet - ReceiveFee(context.Context, *QueryReceiveFeeRequest) (*QueryReceiveFeeResponse, error) - // Gets the fee expected for submitting AcknowledgePacket msg for the given packet - AckFee(context.Context, *QueryAckFeeRequest) (*QueryAckFeeResponse, error) - // Gets the fee expected for submitting TimeoutPacket msg for the given packet - TimeoutFee(context.Context, *QueryTimeoutFeeRequest) (*QueryTimeoutFeeResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) ReceiveFee(ctx context.Context, req *QueryReceiveFeeRequest) (*QueryReceiveFeeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReceiveFee not implemented") -} -func (*UnimplementedQueryServer) AckFee(ctx context.Context, req *QueryAckFeeRequest) (*QueryAckFeeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AckFee not implemented") -} -func (*UnimplementedQueryServer) TimeoutFee(ctx context.Context, req *QueryTimeoutFeeRequest) (*QueryTimeoutFeeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TimeoutFee not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_ReceiveFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryReceiveFeeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ReceiveFee(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.applications.middleware.fee.v1.Query/ReceiveFee", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ReceiveFee(ctx, req.(*QueryReceiveFeeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AckFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAckFeeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AckFee(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.applications.middleware.fee.v1.Query/AckFee", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AckFee(ctx, req.(*QueryAckFeeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_TimeoutFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryTimeoutFeeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).TimeoutFee(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.applications.middleware.fee.v1.Query/TimeoutFee", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).TimeoutFee(ctx, req.(*QueryTimeoutFeeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ibc.applications.middleware.fee.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ReceiveFee", - Handler: _Query_ReceiveFee_Handler, - }, - { - MethodName: "AckFee", - Handler: _Query_AckFee_Handler, - }, - { - MethodName: "TimeoutFee", - Handler: _Query_TimeoutFee_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "ibc/applications/middleware/fee/v1/query.proto", -} - -func (m *QueryReceiveFeeRequest) 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 *QueryReceiveFeeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryReceiveFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RelayerAddress) > 0 { - i -= len(m.RelayerAddress) - copy(dAtA[i:], m.RelayerAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) - i-- - dAtA[i] = 0x22 - } - if len(m.Sequence) > 0 { - i -= len(m.Sequence) - copy(dAtA[i:], m.Sequence) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Sequence))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChannelId) > 0 { - i -= len(m.ChannelId) - copy(dAtA[i:], m.ChannelId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) - i-- - dAtA[i] = 0x12 - } - if len(m.PortId) > 0 { - i -= len(m.PortId) - copy(dAtA[i:], m.PortId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryReceiveFeeResponse) 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 *QueryReceiveFeeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryReceiveFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Fee != nil { - { - size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAckFeeRequest) 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 *QueryAckFeeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAckFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RelayerAddress) > 0 { - i -= len(m.RelayerAddress) - copy(dAtA[i:], m.RelayerAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) - i-- - dAtA[i] = 0x22 - } - if len(m.Sequence) > 0 { - i -= len(m.Sequence) - copy(dAtA[i:], m.Sequence) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Sequence))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChannelId) > 0 { - i -= len(m.ChannelId) - copy(dAtA[i:], m.ChannelId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) - i-- - dAtA[i] = 0x12 - } - if len(m.PortId) > 0 { - i -= len(m.PortId) - copy(dAtA[i:], m.PortId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAckFeeResponse) 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 *QueryAckFeeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAckFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Fee != nil { - { - size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryTimeoutFeeRequest) 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 *QueryTimeoutFeeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTimeoutFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RelayerAddress) > 0 { - i -= len(m.RelayerAddress) - copy(dAtA[i:], m.RelayerAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) - i-- - dAtA[i] = 0x22 - } - if len(m.Sequence) > 0 { - i -= len(m.Sequence) - copy(dAtA[i:], m.Sequence) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Sequence))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChannelId) > 0 { - i -= len(m.ChannelId) - copy(dAtA[i:], m.ChannelId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) - i-- - dAtA[i] = 0x12 - } - if len(m.PortId) > 0 { - i -= len(m.PortId) - copy(dAtA[i:], m.PortId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryTimeoutFeeResponse) 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 *QueryTimeoutFeeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTimeoutFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Fee != nil { - { - size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryReceiveFeeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PortId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.ChannelId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Sequence) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.RelayerAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryReceiveFeeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Fee != nil { - l = m.Fee.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAckFeeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PortId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.ChannelId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Sequence) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.RelayerAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAckFeeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Fee != nil { - l = m.Fee.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryTimeoutFeeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PortId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.ChannelId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Sequence) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.RelayerAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryTimeoutFeeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Fee != nil { - l = m.Fee.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryReceiveFeeRequest) 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 ErrIntOverflowQuery - } - 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: QueryReceiveFeeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryReceiveFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sequence = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RelayerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryReceiveFeeResponse) 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 ErrIntOverflowQuery - } - 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: QueryReceiveFeeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryReceiveFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Fee == nil { - m.Fee = &Fee{} - } - if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAckFeeRequest) 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 ErrIntOverflowQuery - } - 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: QueryAckFeeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAckFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sequence = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RelayerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAckFeeResponse) 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 ErrIntOverflowQuery - } - 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: QueryAckFeeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAckFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Fee == nil { - m.Fee = &Fee{} - } - if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryTimeoutFeeRequest) 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 ErrIntOverflowQuery - } - 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: QueryTimeoutFeeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTimeoutFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sequence = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RelayerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryTimeoutFeeResponse) 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 ErrIntOverflowQuery - } - 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: QueryTimeoutFeeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTimeoutFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Fee == nil { - m.Fee = &Fee{} - } - if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/ibc/applications/middleware/fee/v1/query.pb.gw.go b/ibc/applications/middleware/fee/v1/query.pb.gw.go deleted file mode 100644 index 58b701c17ab..00000000000 --- a/ibc/applications/middleware/fee/v1/query.pb.gw.go +++ /dev/null @@ -1,326 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: ibc/applications/middleware/fee/v1/query.proto - -/* -Package ibc_applications_middleware_fee_v1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package ibc_applications_middleware_fee_v1 - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -var ( - filter_Query_ReceiveFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_ReceiveFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryReceiveFeeRequest - 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_ReceiveFee_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ReceiveFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_ReceiveFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryReceiveFeeRequest - 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_ReceiveFee_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ReceiveFee(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_AckFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_AckFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAckFeeRequest - 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_AckFee_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.AckFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_AckFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAckFeeRequest - 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_AckFee_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.AckFee(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_TimeoutFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_TimeoutFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryTimeoutFeeRequest - 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_TimeoutFee_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.TimeoutFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_TimeoutFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryTimeoutFeeRequest - 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_TimeoutFee_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.TimeoutFee(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". -// UnaryRPC :call QueryServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. -func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - - mux.Handle("GET", pattern_Query_ReceiveFee_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) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_ReceiveFee_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_ReceiveFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_AckFee_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) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_AckFee_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_AckFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_TimeoutFee_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) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_TimeoutFee_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_TimeoutFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterQueryHandler(ctx, mux, conn) -} - -// RegisterQueryHandler registers the http handlers for service Query to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) -} - -// RegisterQueryHandlerClient registers the http handlers for service Query -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "QueryClient" to call the correct interceptors. -func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - - mux.Handle("GET", pattern_Query_ReceiveFee_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) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_ReceiveFee_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_ReceiveFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_AckFee_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) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_AckFee_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_AckFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_TimeoutFee_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) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_TimeoutFee_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_TimeoutFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Query_ReceiveFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "receive_fee"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_Query_AckFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "ack_fee"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_Query_TimeoutFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "timeout_fee"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_Query_ReceiveFee_0 = runtime.ForwardResponseMessage - - forward_Query_AckFee_0 = runtime.ForwardResponseMessage - - forward_Query_TimeoutFee_0 = runtime.ForwardResponseMessage -) diff --git a/ibc/applications/middleware/fee/v1/tx.pb.go b/ibc/applications/middleware/fee/v1/tx.pb.go deleted file mode 100644 index d26368ba083..00000000000 --- a/ibc/applications/middleware/fee/v1/tx.pb.go +++ /dev/null @@ -1,1984 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/applications/middleware/fee/v1/tx.proto - -package ibc_applications_middleware_fee_v1 - -import ( - context "context" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// MsgRegisterCounterPartyAddress is the request type for registering the counter party address -type MsgRegisterCounterPartyAddress struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` - CounterpartyAddress string `protobuf:"bytes,2,opt,name=counterparty_address,json=counterpartyAddress,proto3" json:"counterparty_address,omitempty" yaml:"address"` -} - -func (m *MsgRegisterCounterPartyAddress) Reset() { *m = MsgRegisterCounterPartyAddress{} } -func (m *MsgRegisterCounterPartyAddress) String() string { return proto.CompactTextString(m) } -func (*MsgRegisterCounterPartyAddress) ProtoMessage() {} -func (*MsgRegisterCounterPartyAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_faf7cf2f6149e2c8, []int{0} -} -func (m *MsgRegisterCounterPartyAddress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRegisterCounterPartyAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRegisterCounterPartyAddress.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 *MsgRegisterCounterPartyAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRegisterCounterPartyAddress.Merge(m, src) -} -func (m *MsgRegisterCounterPartyAddress) XXX_Size() int { - return m.Size() -} -func (m *MsgRegisterCounterPartyAddress) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRegisterCounterPartyAddress.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRegisterCounterPartyAddress proto.InternalMessageInfo - -// MsgRegisterCounterPartyAddressResponse defines the Msg/RegisterCounteryPartyAddress response type -type MsgRegisterCounterPartyAddressResponse struct { -} - -func (m *MsgRegisterCounterPartyAddressResponse) Reset() { - *m = MsgRegisterCounterPartyAddressResponse{} -} -func (m *MsgRegisterCounterPartyAddressResponse) String() string { return proto.CompactTextString(m) } -func (*MsgRegisterCounterPartyAddressResponse) ProtoMessage() {} -func (*MsgRegisterCounterPartyAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_faf7cf2f6149e2c8, []int{1} -} -func (m *MsgRegisterCounterPartyAddressResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRegisterCounterPartyAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRegisterCounterPartyAddressResponse.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 *MsgRegisterCounterPartyAddressResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRegisterCounterPartyAddressResponse.Merge(m, src) -} -func (m *MsgRegisterCounterPartyAddressResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgRegisterCounterPartyAddressResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRegisterCounterPartyAddressResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRegisterCounterPartyAddressResponse proto.InternalMessageInfo - -// MsgEscrowPacketFee defines the request type EscrowPacketFee RPC -type MsgEscrowPacketFee struct { - PacketId string `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"packet_id"` - ReceiveFee *Fee `protobuf:"bytes,2,opt,name=receive_fee,json=receiveFee,proto3" json:"receive_fee,omitempty" yaml:"receive_fee"` - AckFee *Fee `protobuf:"bytes,3,opt,name=ack_fee,json=ackFee,proto3" json:"ack_fee,omitempty" yaml:"ack_fee"` - TimeoutFee *Fee `protobuf:"bytes,4,opt,name=timeout_fee,json=timeoutFee,proto3" json:"timeout_fee,omitempty" yaml:"timeout_fee"` - Relayers []string `protobuf:"bytes,5,rep,name=relayers,proto3" json:"relayers,omitempty" yaml:"relayers"` -} - -func (m *MsgEscrowPacketFee) Reset() { *m = MsgEscrowPacketFee{} } -func (m *MsgEscrowPacketFee) String() string { return proto.CompactTextString(m) } -func (*MsgEscrowPacketFee) ProtoMessage() {} -func (*MsgEscrowPacketFee) Descriptor() ([]byte, []int) { - return fileDescriptor_faf7cf2f6149e2c8, []int{2} -} -func (m *MsgEscrowPacketFee) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgEscrowPacketFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgEscrowPacketFee.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 *MsgEscrowPacketFee) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgEscrowPacketFee.Merge(m, src) -} -func (m *MsgEscrowPacketFee) XXX_Size() int { - return m.Size() -} -func (m *MsgEscrowPacketFee) XXX_DiscardUnknown() { - xxx_messageInfo_MsgEscrowPacketFee.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgEscrowPacketFee proto.InternalMessageInfo - -func (m *MsgEscrowPacketFee) GetPacketId() string { - if m != nil { - return m.PacketId - } - return "" -} - -func (m *MsgEscrowPacketFee) GetReceiveFee() *Fee { - if m != nil { - return m.ReceiveFee - } - return nil -} - -func (m *MsgEscrowPacketFee) GetAckFee() *Fee { - if m != nil { - return m.AckFee - } - return nil -} - -func (m *MsgEscrowPacketFee) GetTimeoutFee() *Fee { - if m != nil { - return m.TimeoutFee - } - return nil -} - -func (m *MsgEscrowPacketFee) GetRelayers() []string { - if m != nil { - return m.Relayers - } - return nil -} - -// MsgEscrowPacketFeeResponse defines the response type for Msg/EscrowPacketFee -type MsgEscrowPacketFeeResponse struct { -} - -func (m *MsgEscrowPacketFeeResponse) Reset() { *m = MsgEscrowPacketFeeResponse{} } -func (m *MsgEscrowPacketFeeResponse) String() string { return proto.CompactTextString(m) } -func (*MsgEscrowPacketFeeResponse) ProtoMessage() {} -func (*MsgEscrowPacketFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_faf7cf2f6149e2c8, []int{3} -} -func (m *MsgEscrowPacketFeeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgEscrowPacketFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgEscrowPacketFeeResponse.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 *MsgEscrowPacketFeeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgEscrowPacketFeeResponse.Merge(m, src) -} -func (m *MsgEscrowPacketFeeResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgEscrowPacketFeeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgEscrowPacketFeeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgEscrowPacketFeeResponse proto.InternalMessageInfo - -// MsgPayFee defines the request type for PayFee the RPC -type MsgPayFee struct { - PacketId string `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"packet_id"` - ForwardRelayer string `protobuf:"bytes,2,opt,name=forward_relayer,json=forwardRelayer,proto3" json:"forward_relayer,omitempty" yaml:"forward_relayer"` - ReverseRelayer string `protobuf:"bytes,3,opt,name=reverse_relayer,json=reverseRelayer,proto3" json:"reverse_relayer,omitempty" yaml:"reverse_relayer"` -} - -func (m *MsgPayFee) Reset() { *m = MsgPayFee{} } -func (m *MsgPayFee) String() string { return proto.CompactTextString(m) } -func (*MsgPayFee) ProtoMessage() {} -func (*MsgPayFee) Descriptor() ([]byte, []int) { - return fileDescriptor_faf7cf2f6149e2c8, []int{4} -} -func (m *MsgPayFee) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgPayFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgPayFee.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 *MsgPayFee) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgPayFee.Merge(m, src) -} -func (m *MsgPayFee) XXX_Size() int { - return m.Size() -} -func (m *MsgPayFee) XXX_DiscardUnknown() { - xxx_messageInfo_MsgPayFee.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgPayFee proto.InternalMessageInfo - -func (m *MsgPayFee) GetPacketId() string { - if m != nil { - return m.PacketId - } - return "" -} - -func (m *MsgPayFee) GetForwardRelayer() string { - if m != nil { - return m.ForwardRelayer - } - return "" -} - -func (m *MsgPayFee) GetReverseRelayer() string { - if m != nil { - return m.ReverseRelayer - } - return "" -} - -// MsgPayFeeResponse defines the response type for Msg/PayFee -type MsgPayFeeResponse struct { -} - -func (m *MsgPayFeeResponse) Reset() { *m = MsgPayFeeResponse{} } -func (m *MsgPayFeeResponse) String() string { return proto.CompactTextString(m) } -func (*MsgPayFeeResponse) ProtoMessage() {} -func (*MsgPayFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_faf7cf2f6149e2c8, []int{5} -} -func (m *MsgPayFeeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgPayFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgPayFeeResponse.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 *MsgPayFeeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgPayFeeResponse.Merge(m, src) -} -func (m *MsgPayFeeResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgPayFeeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgPayFeeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgPayFeeResponse proto.InternalMessageInfo - -// MsgPayTimmeout defines the request type for the PayTimeoutFee RPC -type MsgPayTimeoutFee struct { - PacketId string `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"packet_id"` - TimeoutRelayer string `protobuf:"bytes,2,opt,name=timeout_relayer,json=timeoutRelayer,proto3" json:"timeout_relayer,omitempty" yaml:"timeout_relayer"` -} - -func (m *MsgPayTimeoutFee) Reset() { *m = MsgPayTimeoutFee{} } -func (m *MsgPayTimeoutFee) String() string { return proto.CompactTextString(m) } -func (*MsgPayTimeoutFee) ProtoMessage() {} -func (*MsgPayTimeoutFee) Descriptor() ([]byte, []int) { - return fileDescriptor_faf7cf2f6149e2c8, []int{6} -} -func (m *MsgPayTimeoutFee) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgPayTimeoutFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgPayTimeoutFee.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 *MsgPayTimeoutFee) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgPayTimeoutFee.Merge(m, src) -} -func (m *MsgPayTimeoutFee) XXX_Size() int { - return m.Size() -} -func (m *MsgPayTimeoutFee) XXX_DiscardUnknown() { - xxx_messageInfo_MsgPayTimeoutFee.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgPayTimeoutFee proto.InternalMessageInfo - -func (m *MsgPayTimeoutFee) GetPacketId() string { - if m != nil { - return m.PacketId - } - return "" -} - -func (m *MsgPayTimeoutFee) GetTimeoutRelayer() string { - if m != nil { - return m.TimeoutRelayer - } - return "" -} - -// MsgPayTimeoutFeeResponse defines the response type for Msg/PayTimeoutFee -type MsgPayTimeoutFeeResponse struct { -} - -func (m *MsgPayTimeoutFeeResponse) Reset() { *m = MsgPayTimeoutFeeResponse{} } -func (m *MsgPayTimeoutFeeResponse) String() string { return proto.CompactTextString(m) } -func (*MsgPayTimeoutFeeResponse) ProtoMessage() {} -func (*MsgPayTimeoutFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_faf7cf2f6149e2c8, []int{7} -} -func (m *MsgPayTimeoutFeeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgPayTimeoutFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgPayTimeoutFeeResponse.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 *MsgPayTimeoutFeeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgPayTimeoutFeeResponse.Merge(m, src) -} -func (m *MsgPayTimeoutFeeResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgPayTimeoutFeeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgPayTimeoutFeeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgPayTimeoutFeeResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*MsgRegisterCounterPartyAddress)(nil), "ibc.applications.middleware.fee.v1.MsgRegisterCounterPartyAddress") - proto.RegisterType((*MsgRegisterCounterPartyAddressResponse)(nil), "ibc.applications.middleware.fee.v1.MsgRegisterCounterPartyAddressResponse") - proto.RegisterType((*MsgEscrowPacketFee)(nil), "ibc.applications.middleware.fee.v1.MsgEscrowPacketFee") - proto.RegisterType((*MsgEscrowPacketFeeResponse)(nil), "ibc.applications.middleware.fee.v1.MsgEscrowPacketFeeResponse") - proto.RegisterType((*MsgPayFee)(nil), "ibc.applications.middleware.fee.v1.MsgPayFee") - proto.RegisterType((*MsgPayFeeResponse)(nil), "ibc.applications.middleware.fee.v1.MsgPayFeeResponse") - proto.RegisterType((*MsgPayTimeoutFee)(nil), "ibc.applications.middleware.fee.v1.MsgPayTimeoutFee") - proto.RegisterType((*MsgPayTimeoutFeeResponse)(nil), "ibc.applications.middleware.fee.v1.MsgPayTimeoutFeeResponse") -} - -func init() { - proto.RegisterFile("ibc/applications/middleware/fee/v1/tx.proto", fileDescriptor_faf7cf2f6149e2c8) -} - -var fileDescriptor_faf7cf2f6149e2c8 = []byte{ - // 613 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xcf, 0x4e, 0xdb, 0x4e, - 0x10, 0xc7, 0xe3, 0x5f, 0xf8, 0x01, 0x19, 0xd4, 0x40, 0x0d, 0x42, 0x91, 0x5b, 0xd9, 0x68, 0x0f, - 0x2d, 0x52, 0xa9, 0x2d, 0xe8, 0x9f, 0x03, 0xaa, 0x2a, 0x35, 0x08, 0xa4, 0x56, 0x8a, 0x84, 0x56, - 0xdc, 0xc3, 0x62, 0x4f, 0x2c, 0x8b, 0x10, 0x5b, 0xbb, 0x26, 0x34, 0xe7, 0x5e, 0xda, 0x9e, 0xaa, - 0xbe, 0x40, 0x79, 0x81, 0x9e, 0xfb, 0x0a, 0x1c, 0x39, 0xf6, 0x14, 0x55, 0x70, 0xe9, 0x39, 0x4f, - 0x50, 0xd9, 0xbb, 0x76, 0x52, 0x57, 0xa4, 0x21, 0xbd, 0xed, 0xce, 0x7e, 0xe7, 0x33, 0xdf, 0xf1, - 0xec, 0x26, 0xf0, 0x28, 0x38, 0x72, 0x1d, 0x16, 0x45, 0xed, 0xc0, 0x65, 0x71, 0x10, 0x76, 0x84, - 0x73, 0x12, 0x78, 0x5e, 0x1b, 0xcf, 0x18, 0x47, 0xa7, 0x85, 0xe8, 0x74, 0x37, 0x9d, 0xf8, 0xad, - 0x1d,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, 0x67, 0x62, 0xef, 0x21, 0xd6, 0x57, 0x07, 0x7d, - 0x4b, 0x97, 0xf4, 0x11, 0x0a, 0xa1, 0xa0, 0x76, 0x89, 0xa9, 0x03, 0x98, 0x63, 0xee, 0x71, 0x4a, - 0x2f, 0xdf, 0x8e, 0x3e, 0xfa, 0x09, 0x25, 0x81, 0xd0, 0x59, 0xe6, 0x1e, 0x27, 0xd4, 0x43, 0x58, - 0x88, 0x83, 0x13, 0x0c, 0x4f, 0xe3, 0x94, 0x3c, 0x33, 0xb5, 0xef, 0x11, 0x0a, 0xa1, 0xa0, 0x76, - 0x49, 0x05, 0x07, 0xe6, 0x39, 0xb6, 0x59, 0x0f, 0xb9, 0xa8, 0xfd, 0xbf, 0x56, 0x5e, 0xaf, 0xd4, - 0x97, 0x07, 0x7d, 0x6b, 0x31, 0xeb, 0x56, 0x9e, 0x10, 0x9a, 0x8b, 0xc8, 0x7d, 0x30, 0xfe, 0x9c, - 0x49, 0x3e, 0xb2, 0x0b, 0x0d, 0x2a, 0x0d, 0xe1, 0xef, 0xb3, 0xde, 0x94, 0x93, 0xda, 0x81, 0xc5, - 0x56, 0xc8, 0xcf, 0x18, 0xf7, 0x9a, 0xaa, 0xa4, 0xba, 0x69, 0xc6, 0xa0, 0x6f, 0xad, 0xca, 0xc4, - 0x82, 0x80, 0xd0, 0xaa, 0x8a, 0x50, 0x19, 0x48, 0x20, 0x1c, 0xbb, 0xc8, 0x05, 0xe6, 0x90, 0x72, - 0x11, 0x52, 0x10, 0x10, 0x5a, 0x55, 0x11, 0x05, 0x21, 0xcb, 0x70, 0x37, 0xef, 0x24, 0xef, 0xef, - 0xa3, 0x06, 0x4b, 0x32, 0x7a, 0x30, 0xfc, 0x86, 0xd3, 0xb5, 0x99, 0x8d, 0xe4, 0xc6, 0x36, 0x0b, - 0x02, 0x42, 0xab, 0x2a, 0x92, 0x39, 0x34, 0xa0, 0x56, 0xf4, 0x92, 0x19, 0xdd, 0xfa, 0x36, 0x03, - 0xe5, 0x86, 0xf0, 0xf5, 0xaf, 0x1a, 0xdc, 0x1b, 0xf7, 0x63, 0x50, 0x9f, 0xe4, 0x32, 0x8d, 0x7f, - 0xaf, 0xc6, 0x9b, 0x7f, 0x67, 0x64, 0xbe, 0xf5, 0x0f, 0x1a, 0x2c, 0x16, 0x1f, 0xfc, 0xf3, 0x09, - 0xf9, 0x85, 0x3c, 0xe3, 0xe5, 0x74, 0x79, 0xb9, 0x97, 0x0e, 0xcc, 0xaa, 0x8b, 0xfc, 0x78, 0x42, - 0x92, 0x94, 0x1b, 0xcf, 0x6e, 0x25, 0xcf, 0xeb, 0xbd, 0xd3, 0xe0, 0xce, 0xef, 0x37, 0xeb, 0xe9, - 0xe4, 0xa0, 0x61, 0x96, 0xf1, 0x62, 0x9a, 0xac, 0xcc, 0x45, 0xbd, 0x76, 0x71, 0x65, 0x6a, 0x97, - 0x57, 0xa6, 0xf6, 0xe3, 0xca, 0xd4, 0x3e, 0x5d, 0x9b, 0xa5, 0xcb, 0x6b, 0xb3, 0xf4, 0xfd, 0xda, - 0x2c, 0x1d, 0xcd, 0xa6, 0x7f, 0x31, 0x4f, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0x83, 0x10, 0xe5, - 0xa2, 0xf9, 0x06, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MsgClient interface { - // RegisterCounterPartyAddress defines a rpc handler method for MsgRegisterCounterPartyAddress - // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their - // counterparty address before relaying This ensures they will be properly compensated for forward relaying since - // destination chain must send back relayer's source address (counterparty address) in acknowledgement This function - // may be called more than once by a relayer, in which case, latest counterparty address is always used. - RegisterCounterPartyAddress(ctx context.Context, in *MsgRegisterCounterPartyAddress, opts ...grpc.CallOption) (*MsgRegisterCounterPartyAddressResponse, error) - // EscrowPacketFee defines a rpc handler method for MsgEscrowPacketFee - // EscrowPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to - // incentivize the relaying of the given packet. - EscrowPacketFee(ctx context.Context, in *MsgEscrowPacketFee, opts ...grpc.CallOption) (*MsgEscrowPacketFeeResponse, error) - // PayFee defines a rpc handler method for MsgPayFee - // PayFee is a callback implemented by fee module called by the ICS-4 AcknowledgePacket handler. - PayFee(ctx context.Context, in *MsgPayFee, opts ...grpc.CallOption) (*MsgPayFeeResponse, error) - // PayTimeoutFee defines a rpc handler method for MsgPayTimeoutFee - // PayFee is a callback implemented by fee module called by the ICS-4 TimeoutPacket handler. - PayTimeoutFee(ctx context.Context, in *MsgPayTimeoutFee, opts ...grpc.CallOption) (*MsgPayTimeoutFeeResponse, error) -} - -type msgClient struct { - cc grpc1.ClientConn -} - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) RegisterCounterPartyAddress(ctx context.Context, in *MsgRegisterCounterPartyAddress, opts ...grpc.CallOption) (*MsgRegisterCounterPartyAddressResponse, error) { - out := new(MsgRegisterCounterPartyAddressResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Msg/RegisterCounterPartyAddress", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) EscrowPacketFee(ctx context.Context, in *MsgEscrowPacketFee, opts ...grpc.CallOption) (*MsgEscrowPacketFeeResponse, error) { - out := new(MsgEscrowPacketFeeResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Msg/EscrowPacketFee", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) PayFee(ctx context.Context, in *MsgPayFee, opts ...grpc.CallOption) (*MsgPayFeeResponse, error) { - out := new(MsgPayFeeResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Msg/PayFee", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) PayTimeoutFee(ctx context.Context, in *MsgPayTimeoutFee, opts ...grpc.CallOption) (*MsgPayTimeoutFeeResponse, error) { - out := new(MsgPayTimeoutFeeResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Msg/PayTimeoutFee", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { - // RegisterCounterPartyAddress defines a rpc handler method for MsgRegisterCounterPartyAddress - // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their - // counterparty address before relaying This ensures they will be properly compensated for forward relaying since - // destination chain must send back relayer's source address (counterparty address) in acknowledgement This function - // may be called more than once by a relayer, in which case, latest counterparty address is always used. - RegisterCounterPartyAddress(context.Context, *MsgRegisterCounterPartyAddress) (*MsgRegisterCounterPartyAddressResponse, error) - // EscrowPacketFee defines a rpc handler method for MsgEscrowPacketFee - // EscrowPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to - // incentivize the relaying of the given packet. - EscrowPacketFee(context.Context, *MsgEscrowPacketFee) (*MsgEscrowPacketFeeResponse, error) - // PayFee defines a rpc handler method for MsgPayFee - // PayFee is a callback implemented by fee module called by the ICS-4 AcknowledgePacket handler. - PayFee(context.Context, *MsgPayFee) (*MsgPayFeeResponse, error) - // PayTimeoutFee defines a rpc handler method for MsgPayTimeoutFee - // PayFee is a callback implemented by fee module called by the ICS-4 TimeoutPacket handler. - PayTimeoutFee(context.Context, *MsgPayTimeoutFee) (*MsgPayTimeoutFeeResponse, error) -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (*UnimplementedMsgServer) RegisterCounterPartyAddress(ctx context.Context, req *MsgRegisterCounterPartyAddress) (*MsgRegisterCounterPartyAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterCounterPartyAddress not implemented") -} -func (*UnimplementedMsgServer) EscrowPacketFee(ctx context.Context, req *MsgEscrowPacketFee) (*MsgEscrowPacketFeeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EscrowPacketFee not implemented") -} -func (*UnimplementedMsgServer) PayFee(ctx context.Context, req *MsgPayFee) (*MsgPayFeeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PayFee not implemented") -} -func (*UnimplementedMsgServer) PayTimeoutFee(ctx context.Context, req *MsgPayTimeoutFee) (*MsgPayTimeoutFeeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PayTimeoutFee not implemented") -} - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -func _Msg_RegisterCounterPartyAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRegisterCounterPartyAddress) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RegisterCounterPartyAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.applications.middleware.fee.v1.Msg/RegisterCounterPartyAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RegisterCounterPartyAddress(ctx, req.(*MsgRegisterCounterPartyAddress)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_EscrowPacketFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgEscrowPacketFee) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).EscrowPacketFee(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.applications.middleware.fee.v1.Msg/EscrowPacketFee", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).EscrowPacketFee(ctx, req.(*MsgEscrowPacketFee)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_PayFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgPayFee) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).PayFee(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.applications.middleware.fee.v1.Msg/PayFee", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).PayFee(ctx, req.(*MsgPayFee)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_PayTimeoutFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgPayTimeoutFee) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).PayTimeoutFee(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.applications.middleware.fee.v1.Msg/PayTimeoutFee", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).PayTimeoutFee(ctx, req.(*MsgPayTimeoutFee)) - } - return interceptor(ctx, in, info, handler) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ibc.applications.middleware.fee.v1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "RegisterCounterPartyAddress", - Handler: _Msg_RegisterCounterPartyAddress_Handler, - }, - { - MethodName: "EscrowPacketFee", - Handler: _Msg_EscrowPacketFee_Handler, - }, - { - MethodName: "PayFee", - Handler: _Msg_PayFee_Handler, - }, - { - MethodName: "PayTimeoutFee", - Handler: _Msg_PayTimeoutFee_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "ibc/applications/middleware/fee/v1/tx.proto", -} - -func (m *MsgRegisterCounterPartyAddress) 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 *MsgRegisterCounterPartyAddress) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRegisterCounterPartyAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.CounterpartyAddress) > 0 { - i -= len(m.CounterpartyAddress) - copy(dAtA[i:], m.CounterpartyAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.CounterpartyAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgRegisterCounterPartyAddressResponse) 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 *MsgRegisterCounterPartyAddressResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRegisterCounterPartyAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgEscrowPacketFee) 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 *MsgEscrowPacketFee) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgEscrowPacketFee) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Relayers) > 0 { - for iNdEx := len(m.Relayers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Relayers[iNdEx]) - copy(dAtA[i:], m.Relayers[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.Relayers[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if m.TimeoutFee != nil { - { - size, err := m.TimeoutFee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.AckFee != nil { - { - size, err := m.AckFee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.ReceiveFee != nil { - { - size, err := m.ReceiveFee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.PacketId) > 0 { - i -= len(m.PacketId) - copy(dAtA[i:], m.PacketId) - i = encodeVarintTx(dAtA, i, uint64(len(m.PacketId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgEscrowPacketFeeResponse) 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 *MsgEscrowPacketFeeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgEscrowPacketFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgPayFee) 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 *MsgPayFee) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgPayFee) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ReverseRelayer) > 0 { - i -= len(m.ReverseRelayer) - copy(dAtA[i:], m.ReverseRelayer) - i = encodeVarintTx(dAtA, i, uint64(len(m.ReverseRelayer))) - i-- - dAtA[i] = 0x1a - } - if len(m.ForwardRelayer) > 0 { - i -= len(m.ForwardRelayer) - copy(dAtA[i:], m.ForwardRelayer) - i = encodeVarintTx(dAtA, i, uint64(len(m.ForwardRelayer))) - i-- - dAtA[i] = 0x12 - } - if len(m.PacketId) > 0 { - i -= len(m.PacketId) - copy(dAtA[i:], m.PacketId) - i = encodeVarintTx(dAtA, i, uint64(len(m.PacketId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgPayFeeResponse) 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 *MsgPayFeeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgPayFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgPayTimeoutFee) 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 *MsgPayTimeoutFee) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgPayTimeoutFee) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TimeoutRelayer) > 0 { - i -= len(m.TimeoutRelayer) - copy(dAtA[i:], m.TimeoutRelayer) - i = encodeVarintTx(dAtA, i, uint64(len(m.TimeoutRelayer))) - i-- - dAtA[i] = 0x12 - } - if len(m.PacketId) > 0 { - i -= len(m.PacketId) - copy(dAtA[i:], m.PacketId) - i = encodeVarintTx(dAtA, i, uint64(len(m.PacketId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgPayTimeoutFeeResponse) 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 *MsgPayTimeoutFeeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgPayTimeoutFeeResponse) 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 - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgRegisterCounterPartyAddress) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.CounterpartyAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgRegisterCounterPartyAddressResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgEscrowPacketFee) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PacketId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.ReceiveFee != nil { - l = m.ReceiveFee.Size() - n += 1 + l + sovTx(uint64(l)) - } - if m.AckFee != nil { - l = m.AckFee.Size() - n += 1 + l + sovTx(uint64(l)) - } - if m.TimeoutFee != nil { - l = m.TimeoutFee.Size() - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Relayers) > 0 { - for _, s := range m.Relayers { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func (m *MsgEscrowPacketFeeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgPayFee) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PacketId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ForwardRelayer) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ReverseRelayer) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgPayFeeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgPayTimeoutFee) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PacketId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.TimeoutRelayer) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgPayTimeoutFeeResponse) 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 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgRegisterCounterPartyAddress) 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: MsgRegisterCounterPartyAddress: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterCounterPartyAddress: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var 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.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyAddress", 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.CounterpartyAddress = string(dAtA[iNdEx:postIndex]) - 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 *MsgRegisterCounterPartyAddressResponse) 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: MsgRegisterCounterPartyAddressResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterCounterPartyAddressResponse: 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 (m *MsgEscrowPacketFee) 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: MsgEscrowPacketFee: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgEscrowPacketFee: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PacketId", 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.PacketId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReceiveFee", 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 m.ReceiveFee == nil { - m.ReceiveFee = &Fee{} - } - if err := m.ReceiveFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AckFee", 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 m.AckFee == nil { - m.AckFee = &Fee{} - } - if err := m.AckFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutFee", 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 m.TimeoutFee == nil { - m.TimeoutFee = &Fee{} - } - if err := m.TimeoutFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Relayers", 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.Relayers = append(m.Relayers, string(dAtA[iNdEx:postIndex])) - 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 *MsgEscrowPacketFeeResponse) 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: MsgEscrowPacketFeeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgEscrowPacketFeeResponse: 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 (m *MsgPayFee) 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: MsgPayFee: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgPayFee: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PacketId", 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.PacketId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ForwardRelayer", 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.ForwardRelayer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReverseRelayer", 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.ReverseRelayer = string(dAtA[iNdEx:postIndex]) - 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 *MsgPayFeeResponse) 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: MsgPayFeeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgPayFeeResponse: 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 (m *MsgPayTimeoutFee) 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: MsgPayTimeoutFee: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgPayTimeoutFee: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PacketId", 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.PacketId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutRelayer", 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.TimeoutRelayer = string(dAtA[iNdEx:postIndex]) - 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 *MsgPayTimeoutFeeResponse) 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: MsgPayTimeoutFeeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgPayTimeoutFeeResponse: 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 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTx - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTx - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTx - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") -) From 65be512c907192d5ccf3992f90a0ae731c442e9a Mon Sep 17 00:00:00 2001 From: Sean King Date: Tue, 20 Jul 2021 14:43:51 +0200 Subject: [PATCH 04/26] fix: comment --- proto/ibc/applications/middleware/fee/v1/genesis.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/ibc/applications/middleware/fee/v1/genesis.proto b/proto/ibc/applications/middleware/fee/v1/genesis.proto index 0c87a094181..d3ba2f10480 100644 --- a/proto/ibc/applications/middleware/fee/v1/genesis.proto +++ b/proto/ibc/applications/middleware/fee/v1/genesis.proto @@ -4,5 +4,5 @@ package ibc.applications.middleware.fee.v1; import "gogoproto/gogo.proto"; -// GenesisState defines the ibc-transfer genesis state +// GenesisState defines the fee middleware genesis state message GenesisState {} From 092f9e9f9653d6a2594bc6f5ddc225f601cea85c Mon Sep 17 00:00:00 2001 From: Sean King Date: Tue, 20 Jul 2021 15:41:49 +0200 Subject: [PATCH 05/26] feat: adding PacketId type --- docs/ibc/proto-docs.md | 18 + modules/core/04-channel/types/channel.pb.go | 358 +++++++++++++++--- .../applications/middleware/fee/v1/tx.proto | 13 +- proto/ibc/core/channel/v1/channel.proto | 12 + 4 files changed, 336 insertions(+), 65 deletions(-) diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md index cae068cf68c..3ad1a06f3fe 100644 --- a/docs/ibc/proto-docs.md +++ b/docs/ibc/proto-docs.md @@ -43,6 +43,7 @@ - [Counterparty](#ibc.core.channel.v1.Counterparty) - [IdentifiedChannel](#ibc.core.channel.v1.IdentifiedChannel) - [Packet](#ibc.core.channel.v1.Packet) + - [PacketId](#ibc.core.channel.v1.PacketId) - [PacketState](#ibc.core.channel.v1.PacketState) - [Order](#ibc.core.channel.v1.Order) @@ -785,6 +786,23 @@ Packet defines a type that carries data across different chains through IBC + + +### PacketId +PacketId is an identifer for a unique Packet + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `port_id` | [string](#string) | | channel port identifier. | +| `channel_id` | [string](#string) | | channel unique identifier. | +| `sequence` | [uint64](#uint64) | | packet sequence. | + + + + + + ### PacketState diff --git a/modules/core/04-channel/types/channel.pb.go b/modules/core/04-channel/types/channel.pb.go index 166d836c5ab..d2abd98075b 100644 --- a/modules/core/04-channel/types/channel.pb.go +++ b/modules/core/04-channel/types/channel.pb.go @@ -347,6 +347,49 @@ func (m *PacketState) XXX_DiscardUnknown() { var xxx_messageInfo_PacketState proto.InternalMessageInfo +// PacketId is an identifer for a unique Packet +type PacketId struct { + // channel port identifier. + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + // channel unique identifier. + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + // packet sequence. + Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` +} + +func (m *PacketId) Reset() { *m = PacketId{} } +func (m *PacketId) String() string { return proto.CompactTextString(m) } +func (*PacketId) ProtoMessage() {} +func (*PacketId) Descriptor() ([]byte, []int) { + return fileDescriptor_c3a07336710636a0, []int{5} +} +func (m *PacketId) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PacketId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PacketId.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 *PacketId) XXX_Merge(src proto.Message) { + xxx_messageInfo_PacketId.Merge(m, src) +} +func (m *PacketId) XXX_Size() int { + return m.Size() +} +func (m *PacketId) XXX_DiscardUnknown() { + xxx_messageInfo_PacketId.DiscardUnknown(m) +} + +var xxx_messageInfo_PacketId proto.InternalMessageInfo + // Acknowledgement is the recommended acknowledgement format to be used by // app-specific protocols. // NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental @@ -367,7 +410,7 @@ func (m *Acknowledgement) Reset() { *m = Acknowledgement{} } func (m *Acknowledgement) String() string { return proto.CompactTextString(m) } func (*Acknowledgement) ProtoMessage() {} func (*Acknowledgement) Descriptor() ([]byte, []int) { - return fileDescriptor_c3a07336710636a0, []int{5} + return fileDescriptor_c3a07336710636a0, []int{6} } func (m *Acknowledgement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -449,70 +492,72 @@ func init() { proto.RegisterType((*Counterparty)(nil), "ibc.core.channel.v1.Counterparty") proto.RegisterType((*Packet)(nil), "ibc.core.channel.v1.Packet") proto.RegisterType((*PacketState)(nil), "ibc.core.channel.v1.PacketState") + proto.RegisterType((*PacketId)(nil), "ibc.core.channel.v1.PacketId") proto.RegisterType((*Acknowledgement)(nil), "ibc.core.channel.v1.Acknowledgement") } func init() { proto.RegisterFile("ibc/core/channel/v1/channel.proto", fileDescriptor_c3a07336710636a0) } var fileDescriptor_c3a07336710636a0 = []byte{ - // 908 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xcd, 0x8e, 0xda, 0x56, - 0x14, 0xc6, 0x60, 0xfe, 0x0e, 0x03, 0xc3, 0xdc, 0x34, 0xc4, 0x75, 0x13, 0x4c, 0xac, 0x2e, 0x46, - 0xa9, 0x02, 0x99, 0x34, 0x4a, 0xa5, 0xac, 0x3a, 0xfc, 0x44, 0x63, 0x35, 0x02, 0x64, 0x98, 0x45, - 0xb3, 0xa1, 0x60, 0xdf, 0x82, 0x15, 0xf0, 0xa5, 0xf6, 0x65, 0x46, 0xf3, 0x06, 0x11, 0xab, 0xbe, - 0x00, 0x52, 0xa5, 0xaa, 0x7d, 0x85, 0xbe, 0x42, 0x96, 0x59, 0x76, 0x65, 0x55, 0x33, 0x8b, 0xee, - 0x79, 0x81, 0x56, 0xbe, 0xf7, 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, - 0x9a, 0x48, 0x21, 0x0a, 0x16, 0x26, 0x4f, 0x5c, 0xef, 0xbe, 0xbb, 0x2e, 0x4b, 0xef, 0xaf, 0xcb, - 0xd2, 0x5f, 0xd7, 0x65, 0xe9, 0xe7, 0x9b, 0x72, 0xec, 0xfd, 0x4d, 0x39, 0xf6, 0xe7, 0x4d, 0x39, - 0xf6, 0xfa, 0xf9, 0xd8, 0xa1, 0x93, 0xc5, 0xa8, 0x6a, 0x91, 0x59, 0xcd, 0x22, 0xfe, 0x8c, 0xf8, - 0x35, 0x67, 0x64, 0x3d, 0x1e, 0x93, 0xda, 0x8c, 0xd8, 0x8b, 0x29, 0xf6, 0xf9, 0x8b, 0xfc, 0xe4, - 0xd9, 0xe3, 0xe8, 0x89, 0xa7, 0x57, 0x73, 0xec, 0x8f, 0x52, 0xec, 0x49, 0xfe, 0xfa, 0xdf, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xf8, 0x7f, 0x8d, 0x61, 0x03, 0x08, 0x00, 0x00, + // 922 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcd, 0x6e, 0xdb, 0x46, + 0x10, 0x16, 0x2d, 0xea, 0x6f, 0x64, 0xc9, 0xf2, 0xa6, 0x56, 0x58, 0x36, 0x11, 0x15, 0xa2, 0x07, + 0x23, 0x45, 0xa4, 0x38, 0x0d, 0x52, 0x20, 0xa7, 0x5a, 0x3f, 0x81, 0x89, 0x06, 0x92, 0x40, 0xc9, + 0x87, 0xe6, 0xa2, 0x4a, 0xe4, 0x56, 0x22, 0x22, 0x71, 0x55, 0x72, 0x65, 0xc3, 0x6f, 0x10, 0xe8, + 0xd2, 0xbe, 0x80, 0x80, 0x02, 0x45, 0xfb, 0x0a, 0x7d, 0x85, 0x1c, 0x73, 0xec, 0x89, 0x28, 0xec, + 0x43, 0xef, 0x7a, 0x81, 0x16, 0xdc, 0x5d, 0xea, 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7, + 0xd8, 0x6f, 0xb3, 0x51, 0x90, 0xd4, 0xdc, 0x62, 0x59, 0xce, 0xac, 0x1d, 0xa1, 0x60, 0xce, 0x89, + 0x18, 0x42, 0xb0, 0x30, 0x79, 0xe1, 0x5a, 0xe7, 0xed, 0x75, 0x49, 0x7a, 0x77, 0x5d, 0x92, 0xfe, + 0xbc, 0x2e, 0x49, 0x3f, 0xdd, 0x94, 0x62, 0xef, 0x6e, 0x4a, 0xb1, 0x3f, 0x6e, 0x4a, 0xb1, 0x57, + 0xcf, 0x46, 0x0e, 0x1d, 0xcf, 0x87, 0x15, 0x8b, 0x4c, 0xab, 0x16, 0xf1, 0xa7, 0xc4, 0xaf, 0x3a, + 0x43, 0xeb, 0xd1, 0x88, 0x54, 0xa7, 0xc4, 0x9e, 0x4f, 0xb0, 0xcf, 0xdf, 0x08, 0x8f, 0x9f, 0x3e, + 0x8a, 0x1e, 0x1d, 0xf4, 0x6a, 0x86, 0xfd, 0x61, 0x92, 0x3d, 0x12, 0xbe, 0xfc, 0x27, 0x00, 0x00, + 0xff, 0xff, 0x98, 0x4c, 0x54, 0xee, 0x95, 0x08, 0x00, 0x00, } func (m *Channel) Marshal() (dAtA []byte, err error) { @@ -811,6 +856,48 @@ func (m *PacketState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *PacketId) 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 *PacketId) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PacketId) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Sequence != 0 { + i = encodeVarintChannel(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x18 + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintChannel(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0x12 + } + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintChannel(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *Acknowledgement) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1028,6 +1115,26 @@ func (m *PacketState) Size() (n int) { return n } +func (m *PacketId) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovChannel(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovChannel(uint64(l)) + } + if m.Sequence != 0 { + n += 1 + sovChannel(uint64(m.Sequence)) + } + return n +} + func (m *Acknowledgement) Size() (n int) { if m == nil { return 0 @@ -2067,6 +2174,139 @@ func (m *PacketState) Unmarshal(dAtA []byte) error { } return nil } +func (m *PacketId) 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 ErrIntOverflowChannel + } + 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: PacketId: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PacketId: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChannel + } + 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 ErrInvalidLengthChannel + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChannel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChannel + } + 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 ErrInvalidLengthChannel + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChannel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + m.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChannel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipChannel(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthChannel + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Acknowledgement) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/proto/ibc/applications/middleware/fee/v1/tx.proto b/proto/ibc/applications/middleware/fee/v1/tx.proto index 00ef82b9c73..3a5619c69f0 100644 --- a/proto/ibc/applications/middleware/fee/v1/tx.proto +++ b/proto/ibc/applications/middleware/fee/v1/tx.proto @@ -4,6 +4,7 @@ package ibc.applications.middleware.fee.v1; import "gogoproto/gogo.proto"; import "ibc/applications/middleware/fee/v1/fee.proto"; +import "ibc/core/channel/v1/channel.proto"; // Msg defines the ibc/fee Msg service. service Msg { @@ -39,7 +40,7 @@ message MsgRegisterCounterPartyAddressResponse {} // MsgEscrowPacketFee defines the request type EscrowPacketFee RPC message MsgEscrowPacketFee { - string packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; ibc.applications.middleware.fee.v1.Fee receive_fee = 2 [(gogoproto.moretags) = "yaml:\"receive_fee\""]; ibc.applications.middleware.fee.v1.Fee ack_fee = 3 [(gogoproto.moretags) = "yaml:\"ack_fee\""]; ibc.applications.middleware.fee.v1.Fee timeout_fee = 4 [(gogoproto.moretags) = "yaml:\"timeout_fee\""]; @@ -51,9 +52,9 @@ message MsgEscrowPacketFeeResponse {} // MsgPayFee defines the request type for PayFee the RPC message MsgPayFee { - string packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; - string forward_relayer = 2 [(gogoproto.moretags) = "yaml:\"forward_relayer\""]; - string reverse_relayer = 3 [(gogoproto.moretags) = "yaml:\"reverse_relayer\""]; + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; + string forward_relayer = 2 [(gogoproto.moretags) = "yaml:\"forward_relayer\""]; + string reverse_relayer = 3 [(gogoproto.moretags) = "yaml:\"reverse_relayer\""]; } // MsgPayFeeResponse defines the response type for Msg/PayFee @@ -61,8 +62,8 @@ message MsgPayFeeResponse {} // MsgPayTimmeout defines the request type for the PayTimeoutFee RPC message MsgPayTimeoutFee { - string packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; - string timeout_relayer = 2 [(gogoproto.moretags) = "yaml:\"timeout_relayer\""]; + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; + string timeout_relayer = 2 [(gogoproto.moretags) = "yaml:\"timeout_relayer\""]; } // MsgPayTimeoutFeeResponse defines the response type for Msg/PayTimeoutFee diff --git a/proto/ibc/core/channel/v1/channel.proto b/proto/ibc/core/channel/v1/channel.proto index edb39d04b59..ee739a9475a 100644 --- a/proto/ibc/core/channel/v1/channel.proto +++ b/proto/ibc/core/channel/v1/channel.proto @@ -132,6 +132,18 @@ message PacketState { bytes data = 4; } +// PacketId is an identifer for a unique Packet +message PacketId { + option (gogoproto.goproto_getters) = false; + + // channel port identifier. + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + // channel unique identifier. + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // packet sequence. + uint64 sequence = 3; +} + // Acknowledgement is the recommended acknowledgement format to be used by // app-specific protocols. // NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental From ddc641046f81f67000774f3a6e5e2b3becc1e485 Mon Sep 17 00:00:00 2001 From: Sean King Date: Wed, 21 Jul 2021 12:03:56 +0200 Subject: [PATCH 06/26] refactor: fee / genesis --- docs/ibc/proto-docs.md | 6 +- ibc/applications/middleware/fee/v1/fee.pb.go | 331 +++ .../middleware/fee/v1/genesis.pb.go | 453 ++++ .../middleware/fee/v1/query.pb.go | 1860 ++++++++++++++++ .../middleware/fee/v1/query.pb.gw.go | 326 +++ ibc/applications/middleware/fee/v1/tx.pb.go | 1173 +++++++++++ modules/apps/29-fee/types/fee.pb.go | 333 +++ modules/apps/29-fee/types/genesis.pb.go | 455 ++++ modules/apps/29-fee/types/query.pb.go | 1862 +++++++++++++++++ modules/apps/29-fee/types/query.pb.gw.go | 326 +++ modules/apps/29-fee/types/tx.pb.go | 1175 +++++++++++ modules/core/04-channel/types/channel.pb.go | 6 +- .../applications/middleware/fee/v1/fee.proto | 7 +- .../middleware/fee/v1/genesis.proto | 8 +- .../middleware/fee/v1/query.proto | 1 + .../applications/middleware/fee/v1/tx.proto | 26 +- proto/ibc/core/channel/v1/channel.proto | 6 +- 17 files changed, 8318 insertions(+), 36 deletions(-) create mode 100644 ibc/applications/middleware/fee/v1/fee.pb.go create mode 100644 ibc/applications/middleware/fee/v1/genesis.pb.go create mode 100644 ibc/applications/middleware/fee/v1/query.pb.go create mode 100644 ibc/applications/middleware/fee/v1/query.pb.gw.go create mode 100644 ibc/applications/middleware/fee/v1/tx.pb.go create mode 100644 modules/apps/29-fee/types/fee.pb.go create mode 100644 modules/apps/29-fee/types/genesis.pb.go create mode 100644 modules/apps/29-fee/types/query.pb.go create mode 100644 modules/apps/29-fee/types/query.pb.gw.go create mode 100644 modules/apps/29-fee/types/tx.pb.go diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md index 3ad1a06f3fe..4b66a1e8a76 100644 --- a/docs/ibc/proto-docs.md +++ b/docs/ibc/proto-docs.md @@ -790,12 +790,14 @@ Packet defines a type that carries data across different chains through IBC ### PacketId PacketId is an identifer for a unique Packet +Source chains refer to packets by source port/channel +Destination chains refer to packets by destination port/channel | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | channel port identifier. | -| `channel_id` | [string](#string) | | channel unique identifier. | +| `port_id` | [string](#string) | | channel port identifier | +| `channel_id` | [string](#string) | | channel unique identifier | | `sequence` | [uint64](#uint64) | | packet sequence. | diff --git a/ibc/applications/middleware/fee/v1/fee.pb.go b/ibc/applications/middleware/fee/v1/fee.pb.go new file mode 100644 index 00000000000..2e26baba05e --- /dev/null +++ b/ibc/applications/middleware/fee/v1/fee.pb.go @@ -0,0 +1,331 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/applications/middleware/fee/v1/fee.proto + +package ibc_applications_middleware_fee_v1 + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Fee interface +// See Fee Payment Middleware spec: +// https://github.com/cosmos/ibc/tree/master/spec/app/ics-029-fee-payment#fee-middleware-contract +type Fee struct { + Amount *types.Coin `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (m *Fee) Reset() { *m = Fee{} } +func (m *Fee) String() string { return proto.CompactTextString(m) } +func (*Fee) ProtoMessage() {} +func (*Fee) Descriptor() ([]byte, []int) { + return fileDescriptor_9a4c0273395d2c1a, []int{0} +} +func (m *Fee) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Fee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Fee.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Fee) XXX_Merge(src proto.Message) { + xxx_messageInfo_Fee.Merge(m, src) +} +func (m *Fee) XXX_Size() int { + return m.Size() +} +func (m *Fee) XXX_DiscardUnknown() { + xxx_messageInfo_Fee.DiscardUnknown(m) +} + +var xxx_messageInfo_Fee proto.InternalMessageInfo + +func (m *Fee) GetAmount() *types.Coin { + if m != nil { + return m.Amount + } + return nil +} + +func init() { + proto.RegisterType((*Fee)(nil), "ibc.applications.middleware.fee.v1.Fee") +} + +func init() { + proto.RegisterFile("ibc/applications/middleware/fee/v1/fee.proto", fileDescriptor_9a4c0273395d2c1a) +} + +var fileDescriptor_9a4c0273395d2c1a = []byte{ + // 185 bytes of a gzipped FileDescriptorProto + 0x1f, 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00, +} + +func (m *Fee) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Fee) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Fee) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Amount != nil { + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFee(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintFee(dAtA []byte, offset int, v uint64) int { + offset -= sovFee(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Fee) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Amount != nil { + l = m.Amount.Size() + n += 1 + l + sovFee(uint64(l)) + } + return n +} + +func sovFee(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozFee(x uint64) (n int) { + return sovFee(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Fee) 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 ErrIntOverflowFee + } + 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: Fee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Fee: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFee + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFee + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFee + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Amount == nil { + m.Amount = &types.Coin{} + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFee(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFee + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipFee(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFee + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFee + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFee + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthFee + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupFee + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthFee + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthFee = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFee = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupFee = fmt.Errorf("proto: unexpected end of group") +) diff --git a/ibc/applications/middleware/fee/v1/genesis.pb.go b/ibc/applications/middleware/fee/v1/genesis.pb.go new file mode 100644 index 00000000000..9f9cbbcb650 --- /dev/null +++ b/ibc/applications/middleware/fee/v1/genesis.pb.go @@ -0,0 +1,453 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/applications/middleware/fee/v1/genesis.proto + +package ibc_applications_middleware_fee_v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/ibc-go/modules/core/04-channel/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the fee middleware genesis state +type GenesisState struct { + PacketFees map[string]*Fee `protobuf:"bytes,1,rep,name=packet_fees,json=packetFees,proto3" json:"packet_fees,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_6a4f6c8d78b5dfbf, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetPacketFees() map[string]*Fee { + if m != nil { + return m.PacketFees + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "ibc.applications.middleware.fee.v1.GenesisState") + proto.RegisterMapType((map[string]*Fee)(nil), "ibc.applications.middleware.fee.v1.GenesisState.PacketFeesEntry") +} + +func init() { + proto.RegisterFile("ibc/applications/middleware/fee/v1/genesis.proto", fileDescriptor_6a4f6c8d78b5dfbf) +} + +var fileDescriptor_6a4f6c8d78b5dfbf = []byte{ + // 279 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x8f, 0xc1, 0x4a, 0xf4, 0x30, + 0x1c, 0xc4, 0x9b, 0x5d, 0xbe, 0x0f, 0x4c, 0x05, 0xa5, 0x78, 0x28, 0x3d, 0x84, 0xba, 0x17, 0x7b, + 0x90, 0xc4, 0x5d, 0x2f, 0x22, 0x08, 0x22, 0xb8, 0x5e, 0xa5, 0x3e, 0x80, 0xa4, 0xd9, 0x7f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e, 0xec, 0x68, 0x9b, 0x05, 0x73, 0x80, 0xd4, 0x51, 0xe7, 0xa3, 0x33, + 0x74, 0x15, 0xbe, 0x76, 0x04, 0xad, 0x3b, 0x82, 0x3e, 0x3a, 0x82, 0x5e, 0x7a, 0xe2, 0xad, 0x7b, + 0xe2, 0xbd, 0xf5, 0xc4, 0xcb, 0xfe, 0x0f, 0xc7, 0x9f, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, 0x34, + 0x9b, 0x26, 0xa7, 0xbb, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PacketFees) > 0 { + for k := range m.PacketFees { + v := m.PacketFees[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintGenesis(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenesis(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.PacketFees) > 0 { + for k, v := range m.PacketFees { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovGenesis(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovGenesis(uint64(len(k))) + l + n += mapEntrySize + 1 + sovGenesis(uint64(mapEntrySize)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PacketFees", 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 + } + if m.PacketFees == nil { + m.PacketFees = make(map[string]*Fee) + } + var mapkey string + var mapvalue *Fee + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenesis + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenesis + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthGenesis + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthGenesis + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Fee{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.PacketFees[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/ibc/applications/middleware/fee/v1/query.pb.go b/ibc/applications/middleware/fee/v1/query.pb.go new file mode 100644 index 00000000000..e82d8dd7ef9 --- /dev/null +++ b/ibc/applications/middleware/fee/v1/query.pb.go @@ -0,0 +1,1860 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/applications/middleware/fee/v1/query.proto + +package ibc_applications_middleware_fee_v1 + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryReceiveRequestFee is the request type for quering the receive fee +type QueryReceiveFeeRequest struct { + // Source Port ID + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + // Source Channel ID + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + // Packet sequence + Sequence string `protobuf:"bytes,3,opt,name=sequence,proto3" json:"sequence,omitempty" yaml:"sequence"` + // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). + RelayerAddress string `protobuf:"bytes,4,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` +} + +func (m *QueryReceiveFeeRequest) Reset() { *m = QueryReceiveFeeRequest{} } +func (m *QueryReceiveFeeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryReceiveFeeRequest) ProtoMessage() {} +func (*QueryReceiveFeeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9cafe0e1bd8b928c, []int{0} +} +func (m *QueryReceiveFeeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryReceiveFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryReceiveFeeRequest.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 *QueryReceiveFeeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryReceiveFeeRequest.Merge(m, src) +} +func (m *QueryReceiveFeeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryReceiveFeeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryReceiveFeeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryReceiveFeeRequest proto.InternalMessageInfo + +func (m *QueryReceiveFeeRequest) GetPortId() string { + if m != nil { + return m.PortId + } + return "" +} + +func (m *QueryReceiveFeeRequest) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +func (m *QueryReceiveFeeRequest) GetSequence() string { + if m != nil { + return m.Sequence + } + return "" +} + +func (m *QueryReceiveFeeRequest) GetRelayerAddress() string { + if m != nil { + return m.RelayerAddress + } + return "" +} + +// QueryRequestFeeResponse is the response type for the ReceiveFee RPC +type QueryReceiveFeeResponse struct { + Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty" yaml:"fee"` +} + +func (m *QueryReceiveFeeResponse) Reset() { *m = QueryReceiveFeeResponse{} } +func (m *QueryReceiveFeeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryReceiveFeeResponse) ProtoMessage() {} +func (*QueryReceiveFeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9cafe0e1bd8b928c, []int{1} +} +func (m *QueryReceiveFeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryReceiveFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryReceiveFeeResponse.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 *QueryReceiveFeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryReceiveFeeResponse.Merge(m, src) +} +func (m *QueryReceiveFeeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryReceiveFeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryReceiveFeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryReceiveFeeResponse proto.InternalMessageInfo + +func (m *QueryReceiveFeeResponse) GetFee() *Fee { + if m != nil { + return m.Fee + } + return nil +} + +// QueryAckRequestFee is the request type for quering the acknowledgement fee +type QueryAckFeeRequest struct { + // Source Port ID + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + // Source Channel ID + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + // Packet sequence + Sequence string `protobuf:"bytes,3,opt,name=sequence,proto3" json:"sequence,omitempty" yaml:"sequence"` + // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). + RelayerAddress string `protobuf:"bytes,4,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` +} + +func (m *QueryAckFeeRequest) Reset() { *m = QueryAckFeeRequest{} } +func (m *QueryAckFeeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAckFeeRequest) ProtoMessage() {} +func (*QueryAckFeeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9cafe0e1bd8b928c, []int{2} +} +func (m *QueryAckFeeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAckFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAckFeeRequest.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 *QueryAckFeeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAckFeeRequest.Merge(m, src) +} +func (m *QueryAckFeeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAckFeeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAckFeeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAckFeeRequest proto.InternalMessageInfo + +func (m *QueryAckFeeRequest) GetPortId() string { + if m != nil { + return m.PortId + } + return "" +} + +func (m *QueryAckFeeRequest) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +func (m *QueryAckFeeRequest) GetSequence() string { + if m != nil { + return m.Sequence + } + return "" +} + +func (m *QueryAckFeeRequest) GetRelayerAddress() string { + if m != nil { + return m.RelayerAddress + } + return "" +} + +// QueryAckFeeResponse is the response type for the AckFee RPC +type QueryAckFeeResponse struct { + Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty" yaml:"fee"` +} + +func (m *QueryAckFeeResponse) Reset() { *m = QueryAckFeeResponse{} } +func (m *QueryAckFeeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAckFeeResponse) ProtoMessage() {} +func (*QueryAckFeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9cafe0e1bd8b928c, []int{3} +} +func (m *QueryAckFeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAckFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAckFeeResponse.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 *QueryAckFeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAckFeeResponse.Merge(m, src) +} +func (m *QueryAckFeeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAckFeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAckFeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAckFeeResponse proto.InternalMessageInfo + +func (m *QueryAckFeeResponse) GetFee() *Fee { + if m != nil { + return m.Fee + } + return nil +} + +// QueryTimeoutFee is the request type for quering the timeout fee +type QueryTimeoutFeeRequest struct { + // Source Port ID + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + // Source Channel ID + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + // Packet sequence + Sequence string `protobuf:"bytes,3,opt,name=sequence,proto3" json:"sequence,omitempty" yaml:"sequence"` + // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). + RelayerAddress string `protobuf:"bytes,4,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` +} + +func (m *QueryTimeoutFeeRequest) Reset() { *m = QueryTimeoutFeeRequest{} } +func (m *QueryTimeoutFeeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTimeoutFeeRequest) ProtoMessage() {} +func (*QueryTimeoutFeeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9cafe0e1bd8b928c, []int{4} +} +func (m *QueryTimeoutFeeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTimeoutFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTimeoutFeeRequest.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 *QueryTimeoutFeeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTimeoutFeeRequest.Merge(m, src) +} +func (m *QueryTimeoutFeeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTimeoutFeeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTimeoutFeeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTimeoutFeeRequest proto.InternalMessageInfo + +func (m *QueryTimeoutFeeRequest) GetPortId() string { + if m != nil { + return m.PortId + } + return "" +} + +func (m *QueryTimeoutFeeRequest) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +func (m *QueryTimeoutFeeRequest) GetSequence() string { + if m != nil { + return m.Sequence + } + return "" +} + +func (m *QueryTimeoutFeeRequest) GetRelayerAddress() string { + if m != nil { + return m.RelayerAddress + } + return "" +} + +// QueryTimeoutFeeResponse is the response type for the timeout RPC +type QueryTimeoutFeeResponse struct { + Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty" yaml:"fee"` +} + +func (m *QueryTimeoutFeeResponse) Reset() { *m = QueryTimeoutFeeResponse{} } +func (m *QueryTimeoutFeeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTimeoutFeeResponse) ProtoMessage() {} +func (*QueryTimeoutFeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9cafe0e1bd8b928c, []int{5} +} +func (m *QueryTimeoutFeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTimeoutFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTimeoutFeeResponse.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 *QueryTimeoutFeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTimeoutFeeResponse.Merge(m, src) +} +func (m *QueryTimeoutFeeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTimeoutFeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTimeoutFeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTimeoutFeeResponse proto.InternalMessageInfo + +func (m *QueryTimeoutFeeResponse) GetFee() *Fee { + if m != nil { + return m.Fee + } + return nil +} + +func init() { + proto.RegisterType((*QueryReceiveFeeRequest)(nil), "ibc.applications.middleware.fee.v1.QueryReceiveFeeRequest") + proto.RegisterType((*QueryReceiveFeeResponse)(nil), "ibc.applications.middleware.fee.v1.QueryReceiveFeeResponse") + proto.RegisterType((*QueryAckFeeRequest)(nil), "ibc.applications.middleware.fee.v1.QueryAckFeeRequest") + proto.RegisterType((*QueryAckFeeResponse)(nil), "ibc.applications.middleware.fee.v1.QueryAckFeeResponse") + proto.RegisterType((*QueryTimeoutFeeRequest)(nil), "ibc.applications.middleware.fee.v1.QueryTimeoutFeeRequest") + proto.RegisterType((*QueryTimeoutFeeResponse)(nil), "ibc.applications.middleware.fee.v1.QueryTimeoutFeeResponse") +} + +func init() { + proto.RegisterFile("ibc/applications/middleware/fee/v1/query.proto", fileDescriptor_9cafe0e1bd8b928c) +} + +var fileDescriptor_9cafe0e1bd8b928c = []byte{ + // 539 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x55, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0x5e, 0xb6, 0x51, 0x98, 0x91, 0x3a, 0xe1, 0xc1, 0xa8, 0x22, 0x94, 0x20, 0x23, 0x34, 0x60, + 0x28, 0x56, 0x07, 0x02, 0x69, 0x9c, 0x56, 0xa4, 0x49, 0x3d, 0x12, 0x71, 0x2f, 0x4e, 0xf2, 0x12, + 0xac, 0xa5, 0x71, 0x16, 0xa7, 0x45, 0xbd, 0xf2, 0x0b, 0x90, 0xf8, 0x07, 0x1c, 0xf8, 0x09, 0xfc, + 0x06, 0x8e, 0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, + 0xde, 0xa2, 0xf5, 0x63, 0x77, 0xd6, 0x23, 0x97, 0x69, 0x5e, 0x2f, 0x04, 0xc0, 0x1f, 0x0d, 0xd4, + 0xd0, 0xa3, 0x87, 0x9f, 0xcc, 0x5d, 0xf8, 0xd4, 0xd5, 0x34, 0x9f, 0x2e, 0xcc, 0xab, 0xc5, 0x6e, + 0x2b, 0xb1, 0x77, 0xf1, 0x9d, 0xbf, 0x89, 0x65, 0xfe, 0x81, 0x12, 0x5a, 0x39, 0x3c, 0x3d, 0xcd, + 0x05, 0x1c, 0x9e, 0x99, 0xfa, 0x05, 0x1c, 0x9e, 0x1d, 0x9f, 0xf9, 0x1c, 0xce, 0x35, 0xaf, 0x12, + 0xde, 0x69, 0x7d, 0x1e, 0x5b, 0xc6, 0xd1, 0xd8, 0x32, 0xbe, 0x8d, 0x2d, 0xe3, 0xdd, 0xc4, 0x5a, + 0x3a, 0x9a, 0x58, 0x4b, 0x5f, 0x27, 0xd6, 0x92, 0xd7, 0x50, 0xff, 0x92, 0x47, 0xbf, 0x02, 0x00, + 0x00, 0xff, 0xff, 0xf4, 0xef, 0xe3, 0xfd, 0x2f, 0x07, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Gets the fee expected for submitting ReceivePacket msg for the given packet + ReceiveFee(ctx context.Context, in *QueryReceiveFeeRequest, opts ...grpc.CallOption) (*QueryReceiveFeeResponse, error) + // Gets the fee expected for submitting AcknowledgePacket msg for the given packet + AckFee(ctx context.Context, in *QueryAckFeeRequest, opts ...grpc.CallOption) (*QueryAckFeeResponse, error) + // Gets the fee expected for submitting TimeoutPacket msg for the given packet + TimeoutFee(ctx context.Context, in *QueryTimeoutFeeRequest, opts ...grpc.CallOption) (*QueryTimeoutFeeResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) ReceiveFee(ctx context.Context, in *QueryReceiveFeeRequest, opts ...grpc.CallOption) (*QueryReceiveFeeResponse, error) { + out := new(QueryReceiveFeeResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Query/ReceiveFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AckFee(ctx context.Context, in *QueryAckFeeRequest, opts ...grpc.CallOption) (*QueryAckFeeResponse, error) { + out := new(QueryAckFeeResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Query/AckFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) TimeoutFee(ctx context.Context, in *QueryTimeoutFeeRequest, opts ...grpc.CallOption) (*QueryTimeoutFeeResponse, error) { + out := new(QueryTimeoutFeeResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Query/TimeoutFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Gets the fee expected for submitting ReceivePacket msg for the given packet + ReceiveFee(context.Context, *QueryReceiveFeeRequest) (*QueryReceiveFeeResponse, error) + // Gets the fee expected for submitting AcknowledgePacket msg for the given packet + AckFee(context.Context, *QueryAckFeeRequest) (*QueryAckFeeResponse, error) + // Gets the fee expected for submitting TimeoutPacket msg for the given packet + TimeoutFee(context.Context, *QueryTimeoutFeeRequest) (*QueryTimeoutFeeResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) ReceiveFee(ctx context.Context, req *QueryReceiveFeeRequest) (*QueryReceiveFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReceiveFee not implemented") +} +func (*UnimplementedQueryServer) AckFee(ctx context.Context, req *QueryAckFeeRequest) (*QueryAckFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AckFee not implemented") +} +func (*UnimplementedQueryServer) TimeoutFee(ctx context.Context, req *QueryTimeoutFeeRequest) (*QueryTimeoutFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TimeoutFee not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_ReceiveFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryReceiveFeeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ReceiveFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.middleware.fee.v1.Query/ReceiveFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ReceiveFee(ctx, req.(*QueryReceiveFeeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AckFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAckFeeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AckFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.middleware.fee.v1.Query/AckFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AckFee(ctx, req.(*QueryAckFeeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TimeoutFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTimeoutFeeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TimeoutFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.middleware.fee.v1.Query/TimeoutFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TimeoutFee(ctx, req.(*QueryTimeoutFeeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ibc.applications.middleware.fee.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ReceiveFee", + Handler: _Query_ReceiveFee_Handler, + }, + { + MethodName: "AckFee", + Handler: _Query_AckFee_Handler, + }, + { + MethodName: "TimeoutFee", + Handler: _Query_TimeoutFee_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ibc/applications/middleware/fee/v1/query.proto", +} + +func (m *QueryReceiveFeeRequest) 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 *QueryReceiveFeeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryReceiveFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RelayerAddress) > 0 { + i -= len(m.RelayerAddress) + copy(dAtA[i:], m.RelayerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) + i-- + dAtA[i] = 0x22 + } + if len(m.Sequence) > 0 { + i -= len(m.Sequence) + copy(dAtA[i:], m.Sequence) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Sequence))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0x12 + } + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryReceiveFeeResponse) 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 *QueryReceiveFeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryReceiveFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Fee != nil { + { + size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAckFeeRequest) 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 *QueryAckFeeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAckFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RelayerAddress) > 0 { + i -= len(m.RelayerAddress) + copy(dAtA[i:], m.RelayerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) + i-- + dAtA[i] = 0x22 + } + if len(m.Sequence) > 0 { + i -= len(m.Sequence) + copy(dAtA[i:], m.Sequence) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Sequence))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0x12 + } + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAckFeeResponse) 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 *QueryAckFeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAckFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Fee != nil { + { + size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTimeoutFeeRequest) 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 *QueryTimeoutFeeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTimeoutFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RelayerAddress) > 0 { + i -= len(m.RelayerAddress) + copy(dAtA[i:], m.RelayerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) + i-- + dAtA[i] = 0x22 + } + if len(m.Sequence) > 0 { + i -= len(m.Sequence) + copy(dAtA[i:], m.Sequence) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Sequence))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0x12 + } + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTimeoutFeeResponse) 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 *QueryTimeoutFeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTimeoutFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Fee != nil { + { + size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryReceiveFeeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Sequence) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.RelayerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryReceiveFeeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Fee != nil { + l = m.Fee.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAckFeeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Sequence) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.RelayerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAckFeeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Fee != nil { + l = m.Fee.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTimeoutFeeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Sequence) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.RelayerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTimeoutFeeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Fee != nil { + l = m.Fee.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryReceiveFeeRequest) 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 ErrIntOverflowQuery + } + 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: QueryReceiveFeeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryReceiveFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sequence = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RelayerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryReceiveFeeResponse) 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 ErrIntOverflowQuery + } + 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: QueryReceiveFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryReceiveFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fee == nil { + m.Fee = &Fee{} + } + if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAckFeeRequest) 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 ErrIntOverflowQuery + } + 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: QueryAckFeeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAckFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sequence = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RelayerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAckFeeResponse) 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 ErrIntOverflowQuery + } + 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: QueryAckFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAckFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fee == nil { + m.Fee = &Fee{} + } + if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTimeoutFeeRequest) 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 ErrIntOverflowQuery + } + 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: QueryTimeoutFeeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTimeoutFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sequence = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RelayerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTimeoutFeeResponse) 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 ErrIntOverflowQuery + } + 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: QueryTimeoutFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTimeoutFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fee == nil { + m.Fee = &Fee{} + } + if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/ibc/applications/middleware/fee/v1/query.pb.gw.go b/ibc/applications/middleware/fee/v1/query.pb.gw.go new file mode 100644 index 00000000000..58b701c17ab --- /dev/null +++ b/ibc/applications/middleware/fee/v1/query.pb.gw.go @@ -0,0 +1,326 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: ibc/applications/middleware/fee/v1/query.proto + +/* +Package ibc_applications_middleware_fee_v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package ibc_applications_middleware_fee_v1 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage + +var ( + filter_Query_ReceiveFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_ReceiveFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryReceiveFeeRequest + 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_ReceiveFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ReceiveFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ReceiveFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryReceiveFeeRequest + 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_ReceiveFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ReceiveFee(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_AckFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_AckFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAckFeeRequest + 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_AckFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AckFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AckFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAckFeeRequest + 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_AckFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AckFee(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_TimeoutFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_TimeoutFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTimeoutFeeRequest + 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_TimeoutFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.TimeoutFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TimeoutFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTimeoutFeeRequest + 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_TimeoutFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.TimeoutFee(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_ReceiveFee_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) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ReceiveFee_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ReceiveFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AckFee_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) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AckFee_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AckFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TimeoutFee_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) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_TimeoutFee_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TimeoutFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_ReceiveFee_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ReceiveFee_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_ReceiveFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AckFee_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AckFee_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_AckFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TimeoutFee_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_TimeoutFee_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_TimeoutFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_ReceiveFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "receive_fee"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_AckFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "ack_fee"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_TimeoutFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "timeout_fee"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_Query_ReceiveFee_0 = runtime.ForwardResponseMessage + + forward_Query_AckFee_0 = runtime.ForwardResponseMessage + + forward_Query_TimeoutFee_0 = runtime.ForwardResponseMessage +) diff --git a/ibc/applications/middleware/fee/v1/tx.pb.go b/ibc/applications/middleware/fee/v1/tx.pb.go new file mode 100644 index 00000000000..d37008a0709 --- /dev/null +++ b/ibc/applications/middleware/fee/v1/tx.pb.go @@ -0,0 +1,1173 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/applications/middleware/fee/v1/tx.proto + +package ibc_applications_middleware_fee_v1 + +import ( + context "context" + fmt "fmt" + types "github.com/cosmos/ibc-go/modules/core/04-channel/types" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgRegisterCounterPartyAddress is the request type for registering the counter party address +type MsgRegisterCounterPartyAddress struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + CounterpartyAddress string `protobuf:"bytes,2,opt,name=counterparty_address,json=counterpartyAddress,proto3" json:"counterparty_address,omitempty" yaml:"address"` +} + +func (m *MsgRegisterCounterPartyAddress) Reset() { *m = MsgRegisterCounterPartyAddress{} } +func (m *MsgRegisterCounterPartyAddress) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterCounterPartyAddress) ProtoMessage() {} +func (*MsgRegisterCounterPartyAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_faf7cf2f6149e2c8, []int{0} +} +func (m *MsgRegisterCounterPartyAddress) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterCounterPartyAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterCounterPartyAddress.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 *MsgRegisterCounterPartyAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterCounterPartyAddress.Merge(m, src) +} +func (m *MsgRegisterCounterPartyAddress) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterCounterPartyAddress) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterCounterPartyAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterCounterPartyAddress proto.InternalMessageInfo + +// MsgRegisterCounterPartyAddressResponse defines the Msg/RegisterCounteryPartyAddress response type +type MsgRegisterCounterPartyAddressResponse struct { +} + +func (m *MsgRegisterCounterPartyAddressResponse) Reset() { + *m = MsgRegisterCounterPartyAddressResponse{} +} +func (m *MsgRegisterCounterPartyAddressResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterCounterPartyAddressResponse) ProtoMessage() {} +func (*MsgRegisterCounterPartyAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_faf7cf2f6149e2c8, []int{1} +} +func (m *MsgRegisterCounterPartyAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterCounterPartyAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterCounterPartyAddressResponse.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 *MsgRegisterCounterPartyAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterCounterPartyAddressResponse.Merge(m, src) +} +func (m *MsgRegisterCounterPartyAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterCounterPartyAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterCounterPartyAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterCounterPartyAddressResponse proto.InternalMessageInfo + +// MsgEscrowPacketFee defines the request type EscrowPacketFee RPC +type MsgEscrowPacketFee struct { + PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"packet_id"` + ReceiveFee *Fee `protobuf:"bytes,2,opt,name=receive_fee,json=receiveFee,proto3" json:"receive_fee,omitempty" yaml:"receive_fee"` + AckFee *Fee `protobuf:"bytes,3,opt,name=ack_fee,json=ackFee,proto3" json:"ack_fee,omitempty" yaml:"ack_fee"` + TimeoutFee *Fee `protobuf:"bytes,4,opt,name=timeout_fee,json=timeoutFee,proto3" json:"timeout_fee,omitempty" yaml:"timeout_fee"` + Relayers []string `protobuf:"bytes,5,rep,name=relayers,proto3" json:"relayers,omitempty" yaml:"relayers"` +} + +func (m *MsgEscrowPacketFee) Reset() { *m = MsgEscrowPacketFee{} } +func (m *MsgEscrowPacketFee) String() string { return proto.CompactTextString(m) } +func (*MsgEscrowPacketFee) ProtoMessage() {} +func (*MsgEscrowPacketFee) Descriptor() ([]byte, []int) { + return fileDescriptor_faf7cf2f6149e2c8, []int{2} +} +func (m *MsgEscrowPacketFee) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEscrowPacketFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEscrowPacketFee.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 *MsgEscrowPacketFee) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEscrowPacketFee.Merge(m, src) +} +func (m *MsgEscrowPacketFee) XXX_Size() int { + return m.Size() +} +func (m *MsgEscrowPacketFee) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEscrowPacketFee.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEscrowPacketFee proto.InternalMessageInfo + +func (m *MsgEscrowPacketFee) GetPacketId() *types.PacketId { + if m != nil { + return m.PacketId + } + return nil +} + +func (m *MsgEscrowPacketFee) GetReceiveFee() *Fee { + if m != nil { + return m.ReceiveFee + } + return nil +} + +func (m *MsgEscrowPacketFee) GetAckFee() *Fee { + if m != nil { + return m.AckFee + } + return nil +} + +func (m *MsgEscrowPacketFee) GetTimeoutFee() *Fee { + if m != nil { + return m.TimeoutFee + } + return nil +} + +func (m *MsgEscrowPacketFee) GetRelayers() []string { + if m != nil { + return m.Relayers + } + return nil +} + +// MsgEscrowPacketFeeResponse defines the response type for Msg/EscrowPacketFee +type MsgEscrowPacketFeeResponse struct { +} + +func (m *MsgEscrowPacketFeeResponse) Reset() { *m = MsgEscrowPacketFeeResponse{} } +func (m *MsgEscrowPacketFeeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgEscrowPacketFeeResponse) ProtoMessage() {} +func (*MsgEscrowPacketFeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_faf7cf2f6149e2c8, []int{3} +} +func (m *MsgEscrowPacketFeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEscrowPacketFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEscrowPacketFeeResponse.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 *MsgEscrowPacketFeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEscrowPacketFeeResponse.Merge(m, src) +} +func (m *MsgEscrowPacketFeeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgEscrowPacketFeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEscrowPacketFeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEscrowPacketFeeResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgRegisterCounterPartyAddress)(nil), "ibc.applications.middleware.fee.v1.MsgRegisterCounterPartyAddress") + proto.RegisterType((*MsgRegisterCounterPartyAddressResponse)(nil), "ibc.applications.middleware.fee.v1.MsgRegisterCounterPartyAddressResponse") + proto.RegisterType((*MsgEscrowPacketFee)(nil), "ibc.applications.middleware.fee.v1.MsgEscrowPacketFee") + proto.RegisterType((*MsgEscrowPacketFeeResponse)(nil), "ibc.applications.middleware.fee.v1.MsgEscrowPacketFeeResponse") +} + +func init() { + proto.RegisterFile("ibc/applications/middleware/fee/v1/tx.proto", fileDescriptor_faf7cf2f6149e2c8) +} + +var fileDescriptor_faf7cf2f6149e2c8 = []byte{ + // 514 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x4f, 0x6b, 0x13, 0x41, + 0x18, 0xc6, 0xb3, 0x8d, 0xb6, 0xc9, 0x04, 0xac, 0x4c, 0x83, 0x84, 0xa8, 0xbb, 0x75, 0x0e, 0x1a, + 0xb0, 0xcc, 0x92, 0x08, 0x1e, 0x7a, 0x10, 0x5c, 0x69, 0x41, 0x21, 0x10, 0x16, 0xef, 0xe9, 0x64, + 0xf6, 0xcd, 0xba, 0xe4, 0xcf, 0x2c, 0x33, 0xdb, 0xd4, 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0xaa, 0xff, 0x3e, 0xb2, 0x7c, 0xa2, 0xad, 0x2f, 0x5b, 0xa8, + 0xd8, 0x56, 0x21, 0xfe, 0x64, 0xa1, 0xbb, 0xeb, 0x9e, 0xa8, 0xb7, 0x49, 0x0f, 0xeb, 0x5f, 0x51, + 0xfd, 0xd5, 0xff, 0x33, 0xf2, 0xdc, 0xf8, 0xbd, 0x85, 0x76, 0xaf, 0x3e, 0xc3, 0xa7, 0x1b, 0xf2, + 0xaf, 0xf8, 0xea, 0xcf, 0xae, 0xe7, 0xcb, 0xb3, 0x78, 0xb5, 0xaf, 0x73, 0xdb, 0xba, 0x98, 0xdb, + 0xd6, 0xf7, 0xb9, 0x6d, 0x7d, 0x58, 0xd8, 0x85, 0x8b, 0x85, 0x5d, 0xf8, 0xb6, 0xb0, 0x0b, 0xbd, + 0xed, 0xf4, 0x0b, 0x78, 0xf2, 0x33, 0x00, 0x00, 0xff, 0xff, 0xcb, 0x2a, 0xc8, 0x67, 0xbc, 0x04, + 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // RegisterCounterPartyAddress defines a rpc handler method for MsgRegisterCounterPartyAddress + // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their + // counterparty address before relaying This ensures they will be properly compensated for forward relaying since + // destination chain must send back relayer's source address (counterparty address) in acknowledgement This function + // may be called more than once by a relayer, in which case, latest counterparty address is always used. + RegisterCounterPartyAddress(ctx context.Context, in *MsgRegisterCounterPartyAddress, opts ...grpc.CallOption) (*MsgRegisterCounterPartyAddressResponse, error) + // EscrowPacketFee defines a rpc handler method for MsgEscrowPacketFee + // EscrowPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to + // incentivize the relaying of the given packet. + EscrowPacketFee(ctx context.Context, in *MsgEscrowPacketFee, opts ...grpc.CallOption) (*MsgEscrowPacketFeeResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) RegisterCounterPartyAddress(ctx context.Context, in *MsgRegisterCounterPartyAddress, opts ...grpc.CallOption) (*MsgRegisterCounterPartyAddressResponse, error) { + out := new(MsgRegisterCounterPartyAddressResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Msg/RegisterCounterPartyAddress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) EscrowPacketFee(ctx context.Context, in *MsgEscrowPacketFee, opts ...grpc.CallOption) (*MsgEscrowPacketFeeResponse, error) { + out := new(MsgEscrowPacketFeeResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Msg/EscrowPacketFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // RegisterCounterPartyAddress defines a rpc handler method for MsgRegisterCounterPartyAddress + // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their + // counterparty address before relaying This ensures they will be properly compensated for forward relaying since + // destination chain must send back relayer's source address (counterparty address) in acknowledgement This function + // may be called more than once by a relayer, in which case, latest counterparty address is always used. + RegisterCounterPartyAddress(context.Context, *MsgRegisterCounterPartyAddress) (*MsgRegisterCounterPartyAddressResponse, error) + // EscrowPacketFee defines a rpc handler method for MsgEscrowPacketFee + // EscrowPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to + // incentivize the relaying of the given packet. + EscrowPacketFee(context.Context, *MsgEscrowPacketFee) (*MsgEscrowPacketFeeResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) RegisterCounterPartyAddress(ctx context.Context, req *MsgRegisterCounterPartyAddress) (*MsgRegisterCounterPartyAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterCounterPartyAddress not implemented") +} +func (*UnimplementedMsgServer) EscrowPacketFee(ctx context.Context, req *MsgEscrowPacketFee) (*MsgEscrowPacketFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EscrowPacketFee not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_RegisterCounterPartyAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterCounterPartyAddress) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RegisterCounterPartyAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.middleware.fee.v1.Msg/RegisterCounterPartyAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RegisterCounterPartyAddress(ctx, req.(*MsgRegisterCounterPartyAddress)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_EscrowPacketFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgEscrowPacketFee) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).EscrowPacketFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.middleware.fee.v1.Msg/EscrowPacketFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).EscrowPacketFee(ctx, req.(*MsgEscrowPacketFee)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ibc.applications.middleware.fee.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RegisterCounterPartyAddress", + Handler: _Msg_RegisterCounterPartyAddress_Handler, + }, + { + MethodName: "EscrowPacketFee", + Handler: _Msg_EscrowPacketFee_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ibc/applications/middleware/fee/v1/tx.proto", +} + +func (m *MsgRegisterCounterPartyAddress) 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 *MsgRegisterCounterPartyAddress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterCounterPartyAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CounterpartyAddress) > 0 { + i -= len(m.CounterpartyAddress) + copy(dAtA[i:], m.CounterpartyAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.CounterpartyAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRegisterCounterPartyAddressResponse) 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 *MsgRegisterCounterPartyAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterCounterPartyAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgEscrowPacketFee) 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 *MsgEscrowPacketFee) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEscrowPacketFee) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Relayers) > 0 { + for iNdEx := len(m.Relayers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Relayers[iNdEx]) + copy(dAtA[i:], m.Relayers[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Relayers[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if m.TimeoutFee != nil { + { + size, err := m.TimeoutFee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.AckFee != nil { + { + size, err := m.AckFee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.ReceiveFee != nil { + { + size, err := m.ReceiveFee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.PacketId != nil { + { + size, err := m.PacketId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgEscrowPacketFeeResponse) 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 *MsgEscrowPacketFeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEscrowPacketFeeResponse) 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 + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgRegisterCounterPartyAddress) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.CounterpartyAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRegisterCounterPartyAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgEscrowPacketFee) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PacketId != nil { + l = m.PacketId.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.ReceiveFee != nil { + l = m.ReceiveFee.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.AckFee != nil { + l = m.AckFee.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.TimeoutFee != nil { + l = m.TimeoutFee.Size() + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Relayers) > 0 { + for _, s := range m.Relayers { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgEscrowPacketFeeResponse) 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 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgRegisterCounterPartyAddress) 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: MsgRegisterCounterPartyAddress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterCounterPartyAddress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var 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.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyAddress", 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.CounterpartyAddress = string(dAtA[iNdEx:postIndex]) + 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 *MsgRegisterCounterPartyAddressResponse) 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: MsgRegisterCounterPartyAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterCounterPartyAddressResponse: 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 (m *MsgEscrowPacketFee) 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: MsgEscrowPacketFee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEscrowPacketFee: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PacketId", 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 m.PacketId == nil { + m.PacketId = &types.PacketId{} + } + if err := m.PacketId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReceiveFee", 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 m.ReceiveFee == nil { + m.ReceiveFee = &Fee{} + } + if err := m.ReceiveFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AckFee", 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 m.AckFee == nil { + m.AckFee = &Fee{} + } + if err := m.AckFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutFee", 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 m.TimeoutFee == nil { + m.TimeoutFee = &Fee{} + } + if err := m.TimeoutFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Relayers", 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.Relayers = append(m.Relayers, string(dAtA[iNdEx:postIndex])) + 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 *MsgEscrowPacketFeeResponse) 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: MsgEscrowPacketFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEscrowPacketFeeResponse: 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 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/modules/apps/29-fee/types/fee.pb.go b/modules/apps/29-fee/types/fee.pb.go new file mode 100644 index 00000000000..5027ee0a105 --- /dev/null +++ b/modules/apps/29-fee/types/fee.pb.go @@ -0,0 +1,333 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/applications/middleware/fee/v1/fee.proto + +package types + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Fee interface +// See Fee Payment Middleware spec: +// https://github.com/cosmos/ibc/tree/master/spec/app/ics-029-fee-payment#fee-middleware-contract +type Fee struct { + Amount *types.Coin `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (m *Fee) Reset() { *m = Fee{} } +func (m *Fee) String() string { return proto.CompactTextString(m) } +func (*Fee) ProtoMessage() {} +func (*Fee) Descriptor() ([]byte, []int) { + return fileDescriptor_9a4c0273395d2c1a, []int{0} +} +func (m *Fee) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Fee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Fee.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Fee) XXX_Merge(src proto.Message) { + xxx_messageInfo_Fee.Merge(m, src) +} +func (m *Fee) XXX_Size() int { + return m.Size() +} +func (m *Fee) XXX_DiscardUnknown() { + xxx_messageInfo_Fee.DiscardUnknown(m) +} + +var xxx_messageInfo_Fee proto.InternalMessageInfo + +func (m *Fee) GetAmount() *types.Coin { + if m != nil { + return m.Amount + } + return nil +} + +func init() { + proto.RegisterType((*Fee)(nil), "ibc.applications.middleware.fee.v1.Fee") +} + +func init() { + proto.RegisterFile("ibc/applications/middleware/fee/v1/fee.proto", fileDescriptor_9a4c0273395d2c1a) +} + +var fileDescriptor_9a4c0273395d2c1a = []byte{ + // 223 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x8f, 0xb1, 0x4e, 0xc3, 0x30, + 0x10, 0x40, 0x63, 0x21, 0x75, 0x08, 0x5b, 0x27, 0x60, 0xb0, 0x50, 0x27, 0x06, 0x7a, 0xa7, 0x84, + 0x05, 0x56, 0x90, 0x98, 0x98, 0x18, 0xd9, 0x6c, 0xe7, 0x28, 0x27, 0xc5, 0x3e, 0xab, 0x76, 0x8a, + 0xf8, 0x0b, 0x3e, 0x8b, 0xb1, 0x23, 0x23, 0x4a, 0x7e, 0x04, 0x99, 0x46, 0xa2, 0xd3, 0x2d, 0xef, + 0xdd, 0xdd, 0xab, 0xaf, 0xd9, 0x3a, 0x34, 0x31, 0xf6, 0xec, 0x4c, 0x66, 0x09, 0x09, 0x3d, 0x77, + 0x5d, 0x4f, 0xef, 0x66, 0x4b, 0xf8, 0x4a, 0x84, 0xbb, 0xa6, 0x0c, 0x88, 0x5b, 0xc9, 0xb2, 0x5c, + 0xb1, 0x75, 0x70, 0x4c, 0xc3, 0x3f, 0x0d, 0x05, 0xdb, 0x35, 0x17, 0xda, 0x49, 0xf2, 0x92, 0xd0, + 0x9a, 0x54, 0x6c, 0x4b, 0xd9, 0x34, 0xe8, 0x84, 0xc3, 0x61, 0xc7, 0xea, 0xb6, 0x3e, 0x79, 0x24, + 0x5a, 0x36, 0xf5, 0xc2, 0x78, 0x19, 0x42, 0x3e, 0x53, 0x97, 0xea, 0xea, 0xb4, 0x3d, 0x87, 0x83, + 0x07, 0xc5, 0x83, 0xd9, 0x83, 0x07, 0xe1, 0xf0, 0x3c, 0x83, 0xf7, 0x4f, 0x5f, 0xa3, 0x56, 0xfb, + 0x51, 0xab, 0x9f, 0x51, 0xab, 0xcf, 0x49, 0x57, 0xfb, 0x49, 0x57, 0xdf, 0x93, 0xae, 0x5e, 0xda, + 0x0d, 0xe7, 0xb7, 0xc1, 0x82, 0x13, 0x8f, 0xf3, 0x79, 0xb6, 0x6e, 0xbd, 0x11, 0xf4, 0xd2, 0x0d, + 0x3d, 0xa5, 0x92, 0x98, 0xb0, 0xbd, 0x5b, 0x97, 0xa4, 0xfc, 0x11, 0x29, 0xd9, 0xc5, 0xdf, 0x3b, + 0x37, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0e, 0xfa, 0xc0, 0x98, 0x02, 0x01, 0x00, 0x00, +} + +func (m *Fee) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Fee) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Fee) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Amount != nil { + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFee(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintFee(dAtA []byte, offset int, v uint64) int { + offset -= sovFee(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Fee) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Amount != nil { + l = m.Amount.Size() + n += 1 + l + sovFee(uint64(l)) + } + return n +} + +func sovFee(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozFee(x uint64) (n int) { + return sovFee(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Fee) 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 ErrIntOverflowFee + } + 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: Fee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Fee: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFee + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFee + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFee + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Amount == nil { + m.Amount = &types.Coin{} + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFee(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFee + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipFee(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFee + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFee + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFee + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthFee + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupFee + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthFee + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthFee = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFee = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupFee = fmt.Errorf("proto: unexpected end of group") +) diff --git a/modules/apps/29-fee/types/genesis.pb.go b/modules/apps/29-fee/types/genesis.pb.go new file mode 100644 index 00000000000..7fe57dba0b3 --- /dev/null +++ b/modules/apps/29-fee/types/genesis.pb.go @@ -0,0 +1,455 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/applications/middleware/fee/v1/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/ibc-go/modules/core/04-channel/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the fee middleware genesis state +type GenesisState struct { + PacketFees map[string]*Fee `protobuf:"bytes,1,rep,name=packet_fees,json=packetFees,proto3" json:"packet_fees,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_6a4f6c8d78b5dfbf, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetPacketFees() map[string]*Fee { + if m != nil { + return m.PacketFees + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "ibc.applications.middleware.fee.v1.GenesisState") + proto.RegisterMapType((map[string]*Fee)(nil), "ibc.applications.middleware.fee.v1.GenesisState.PacketFeesEntry") +} + +func init() { + proto.RegisterFile("ibc/applications/middleware/fee/v1/genesis.proto", fileDescriptor_6a4f6c8d78b5dfbf) +} + +var fileDescriptor_6a4f6c8d78b5dfbf = []byte{ + // 318 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xc1, 0x4b, 0xfb, 0x30, + 0x1c, 0xc5, 0x97, 0x8d, 0xdf, 0x0f, 0xcc, 0x04, 0xa5, 0x78, 0x18, 0x3b, 0x84, 0xb9, 0x8b, 0x3b, + 0xb8, 0xc4, 0xd5, 0x8b, 0x0a, 0x82, 0x08, 0xce, 0x8b, 0x07, 0x99, 0x37, 0x2f, 0x92, 0x66, 0xdf, + 0x76, 0x61, 0x6d, 0x13, 0x9a, 0xac, 0xd2, 0xff, 0xc2, 0x3f, 0xcb, 0xe3, 0x8e, 0x7a, 0x93, 0xf6, + 0x1f, 0x91, 0xb4, 0xa2, 0xc3, 0x8b, 0xbb, 0x3d, 0xf2, 0x7d, 0x9f, 0x97, 0xc7, 0xc3, 0x27, 0x32, + 0x10, 0x8c, 0x6b, 0x1d, 0x4b, 0xc1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x62, 0x15, 0x50, + 0xa1, 0x12, 0x26, 0x94, 0x49, 0x94, 0x61, 0x32, 0x10, 0xe3, 0x48, 0xb1, 0x44, 0xcd, 0x57, 0x31, + 0x18, 0xb7, 0xb1, 0x61, 0xfe, 0xf9, 0xd8, 0x6d, 0x6a, 0x0b, 0x0d, 0x26, 0xf8, 0x5f, 0x0f, 0x76, + 0xfa, 0x19, 0x00, 0x00, 0xff, 0xff, 0x9b, 0xa6, 0xc3, 0xbe, 0xef, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PacketFees) > 0 { + for k := range m.PacketFees { + v := m.PacketFees[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintGenesis(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenesis(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.PacketFees) > 0 { + for k, v := range m.PacketFees { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovGenesis(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovGenesis(uint64(len(k))) + l + n += mapEntrySize + 1 + sovGenesis(uint64(mapEntrySize)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PacketFees", 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 + } + if m.PacketFees == nil { + m.PacketFees = make(map[string]*Fee) + } + var mapkey string + var mapvalue *Fee + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenesis + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenesis + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthGenesis + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthGenesis + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Fee{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.PacketFees[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/modules/apps/29-fee/types/query.pb.go b/modules/apps/29-fee/types/query.pb.go new file mode 100644 index 00000000000..7d875ae9619 --- /dev/null +++ b/modules/apps/29-fee/types/query.pb.go @@ -0,0 +1,1862 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/applications/middleware/fee/v1/query.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryReceiveRequestFee is the request type for quering the receive fee +type QueryReceiveFeeRequest struct { + // Source Port ID + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + // Source Channel ID + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + // Packet sequence + Sequence string `protobuf:"bytes,3,opt,name=sequence,proto3" json:"sequence,omitempty" yaml:"sequence"` + // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). + RelayerAddress string `protobuf:"bytes,4,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` +} + +func (m *QueryReceiveFeeRequest) Reset() { *m = QueryReceiveFeeRequest{} } +func (m *QueryReceiveFeeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryReceiveFeeRequest) ProtoMessage() {} +func (*QueryReceiveFeeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9cafe0e1bd8b928c, []int{0} +} +func (m *QueryReceiveFeeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryReceiveFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryReceiveFeeRequest.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 *QueryReceiveFeeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryReceiveFeeRequest.Merge(m, src) +} +func (m *QueryReceiveFeeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryReceiveFeeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryReceiveFeeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryReceiveFeeRequest proto.InternalMessageInfo + +func (m *QueryReceiveFeeRequest) GetPortId() string { + if m != nil { + return m.PortId + } + return "" +} + +func (m *QueryReceiveFeeRequest) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +func (m *QueryReceiveFeeRequest) GetSequence() string { + if m != nil { + return m.Sequence + } + return "" +} + +func (m *QueryReceiveFeeRequest) GetRelayerAddress() string { + if m != nil { + return m.RelayerAddress + } + return "" +} + +// QueryRequestFeeResponse is the response type for the ReceiveFee RPC +type QueryReceiveFeeResponse struct { + Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty" yaml:"fee"` +} + +func (m *QueryReceiveFeeResponse) Reset() { *m = QueryReceiveFeeResponse{} } +func (m *QueryReceiveFeeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryReceiveFeeResponse) ProtoMessage() {} +func (*QueryReceiveFeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9cafe0e1bd8b928c, []int{1} +} +func (m *QueryReceiveFeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryReceiveFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryReceiveFeeResponse.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 *QueryReceiveFeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryReceiveFeeResponse.Merge(m, src) +} +func (m *QueryReceiveFeeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryReceiveFeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryReceiveFeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryReceiveFeeResponse proto.InternalMessageInfo + +func (m *QueryReceiveFeeResponse) GetFee() *Fee { + if m != nil { + return m.Fee + } + return nil +} + +// QueryAckRequestFee is the request type for quering the acknowledgement fee +type QueryAckFeeRequest struct { + // Source Port ID + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + // Source Channel ID + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + // Packet sequence + Sequence string `protobuf:"bytes,3,opt,name=sequence,proto3" json:"sequence,omitempty" yaml:"sequence"` + // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). + RelayerAddress string `protobuf:"bytes,4,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` +} + +func (m *QueryAckFeeRequest) Reset() { *m = QueryAckFeeRequest{} } +func (m *QueryAckFeeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAckFeeRequest) ProtoMessage() {} +func (*QueryAckFeeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9cafe0e1bd8b928c, []int{2} +} +func (m *QueryAckFeeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAckFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAckFeeRequest.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 *QueryAckFeeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAckFeeRequest.Merge(m, src) +} +func (m *QueryAckFeeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAckFeeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAckFeeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAckFeeRequest proto.InternalMessageInfo + +func (m *QueryAckFeeRequest) GetPortId() string { + if m != nil { + return m.PortId + } + return "" +} + +func (m *QueryAckFeeRequest) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +func (m *QueryAckFeeRequest) GetSequence() string { + if m != nil { + return m.Sequence + } + return "" +} + +func (m *QueryAckFeeRequest) GetRelayerAddress() string { + if m != nil { + return m.RelayerAddress + } + return "" +} + +// QueryAckFeeResponse is the response type for the AckFee RPC +type QueryAckFeeResponse struct { + Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty" yaml:"fee"` +} + +func (m *QueryAckFeeResponse) Reset() { *m = QueryAckFeeResponse{} } +func (m *QueryAckFeeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAckFeeResponse) ProtoMessage() {} +func (*QueryAckFeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9cafe0e1bd8b928c, []int{3} +} +func (m *QueryAckFeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAckFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAckFeeResponse.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 *QueryAckFeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAckFeeResponse.Merge(m, src) +} +func (m *QueryAckFeeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAckFeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAckFeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAckFeeResponse proto.InternalMessageInfo + +func (m *QueryAckFeeResponse) GetFee() *Fee { + if m != nil { + return m.Fee + } + return nil +} + +// QueryTimeoutFee is the request type for quering the timeout fee +type QueryTimeoutFeeRequest struct { + // Source Port ID + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + // Source Channel ID + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + // Packet sequence + Sequence string `protobuf:"bytes,3,opt,name=sequence,proto3" json:"sequence,omitempty" yaml:"sequence"` + // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). + RelayerAddress string `protobuf:"bytes,4,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` +} + +func (m *QueryTimeoutFeeRequest) Reset() { *m = QueryTimeoutFeeRequest{} } +func (m *QueryTimeoutFeeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTimeoutFeeRequest) ProtoMessage() {} +func (*QueryTimeoutFeeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9cafe0e1bd8b928c, []int{4} +} +func (m *QueryTimeoutFeeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTimeoutFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTimeoutFeeRequest.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 *QueryTimeoutFeeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTimeoutFeeRequest.Merge(m, src) +} +func (m *QueryTimeoutFeeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTimeoutFeeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTimeoutFeeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTimeoutFeeRequest proto.InternalMessageInfo + +func (m *QueryTimeoutFeeRequest) GetPortId() string { + if m != nil { + return m.PortId + } + return "" +} + +func (m *QueryTimeoutFeeRequest) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +func (m *QueryTimeoutFeeRequest) GetSequence() string { + if m != nil { + return m.Sequence + } + return "" +} + +func (m *QueryTimeoutFeeRequest) GetRelayerAddress() string { + if m != nil { + return m.RelayerAddress + } + return "" +} + +// QueryTimeoutFeeResponse is the response type for the timeout RPC +type QueryTimeoutFeeResponse struct { + Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty" yaml:"fee"` +} + +func (m *QueryTimeoutFeeResponse) Reset() { *m = QueryTimeoutFeeResponse{} } +func (m *QueryTimeoutFeeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTimeoutFeeResponse) ProtoMessage() {} +func (*QueryTimeoutFeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9cafe0e1bd8b928c, []int{5} +} +func (m *QueryTimeoutFeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTimeoutFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTimeoutFeeResponse.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 *QueryTimeoutFeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTimeoutFeeResponse.Merge(m, src) +} +func (m *QueryTimeoutFeeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTimeoutFeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTimeoutFeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTimeoutFeeResponse proto.InternalMessageInfo + +func (m *QueryTimeoutFeeResponse) GetFee() *Fee { + if m != nil { + return m.Fee + } + return nil +} + +func init() { + proto.RegisterType((*QueryReceiveFeeRequest)(nil), "ibc.applications.middleware.fee.v1.QueryReceiveFeeRequest") + proto.RegisterType((*QueryReceiveFeeResponse)(nil), "ibc.applications.middleware.fee.v1.QueryReceiveFeeResponse") + proto.RegisterType((*QueryAckFeeRequest)(nil), "ibc.applications.middleware.fee.v1.QueryAckFeeRequest") + proto.RegisterType((*QueryAckFeeResponse)(nil), "ibc.applications.middleware.fee.v1.QueryAckFeeResponse") + proto.RegisterType((*QueryTimeoutFeeRequest)(nil), "ibc.applications.middleware.fee.v1.QueryTimeoutFeeRequest") + proto.RegisterType((*QueryTimeoutFeeResponse)(nil), "ibc.applications.middleware.fee.v1.QueryTimeoutFeeResponse") +} + +func init() { + proto.RegisterFile("ibc/applications/middleware/fee/v1/query.proto", fileDescriptor_9cafe0e1bd8b928c) +} + +var fileDescriptor_9cafe0e1bd8b928c = []byte{ + // 575 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x55, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0x5e, 0xb6, 0x51, 0x98, 0x91, 0x3a, 0xe1, 0xc1, 0xa8, 0x2a, 0x94, 0xa2, 0x20, 0x34, 0x60, + 0x2c, 0x56, 0x0b, 0x02, 0x31, 0x4e, 0x2b, 0xd2, 0xa4, 0x4a, 0x5c, 0x88, 0x38, 0x71, 0x29, 0x8e, + 0xf3, 0x9a, 0x59, 0x4b, 0xe2, 0x2c, 0x4e, 0x8b, 0x7a, 0xe5, 0x17, 0x20, 0xf1, 0x0f, 0x38, 0xf0, + 0x13, 0xf8, 0x0d, 0x1c, 0x27, 0x71, 0xe1, 0x54, 0xa1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, 0xd9, 0x9d, 0x76, 0xc9, 0x65, 0x86, 0xd7, 0xee, 0x00, + 0xe0, 0x8f, 0x16, 0x2a, 0x99, 0xd1, 0xc3, 0x8f, 0x66, 0x2e, 0x7c, 0xe2, 0x68, 0x56, 0x1f, 0xcf, + 0xcd, 0x2b, 0xc4, 0x6e, 0x6a, 0xb1, 0xb7, 0xf1, 0xad, 0xbf, 0x89, 0xa5, 0x6c, 0x5f, 0x0b, 0x55, + 0x0e, 0x4f, 0x76, 0x73, 0x0e, 0x87, 0xa7, 0xa6, 0x7e, 0x0e, 0x87, 0xa7, 0xc7, 0x67, 0x36, 0x87, + 0x73, 0xc3, 0x53, 0xc2, 0x9b, 0xcf, 0x3f, 0x0f, 0x6d, 0xeb, 0x70, 0x68, 0x5b, 0xdf, 0x86, 0xb6, + 0xf5, 0x6e, 0x64, 0x2f, 0x1c, 0x8e, 0xec, 0x85, 0xaf, 0x23, 0x7b, 0xe1, 0x55, 0x23, 0xe4, 0xf9, + 0x5e, 0xd7, 0x77, 0x99, 0x88, 0x49, 0xf1, 0x8e, 0x71, 0x9f, 0x6d, 0x85, 0x82, 0xc4, 0x22, 0xe8, + 0x46, 0x20, 0x4d, 0xfa, 0xc6, 0x93, 0x2d, 0x95, 0x36, 0xef, 0xa7, 0x20, 0xfd, 0x92, 0x7e, 0x7f, + 0x1e, 0xfc, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x11, 0x5e, 0x6f, 0x70, 0x63, 0x07, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Gets the fee expected for submitting ReceivePacket msg for the given packet + ReceiveFee(ctx context.Context, in *QueryReceiveFeeRequest, opts ...grpc.CallOption) (*QueryReceiveFeeResponse, error) + // Gets the fee expected for submitting AcknowledgePacket msg for the given packet + AckFee(ctx context.Context, in *QueryAckFeeRequest, opts ...grpc.CallOption) (*QueryAckFeeResponse, error) + // Gets the fee expected for submitting TimeoutPacket msg for the given packet + TimeoutFee(ctx context.Context, in *QueryTimeoutFeeRequest, opts ...grpc.CallOption) (*QueryTimeoutFeeResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) ReceiveFee(ctx context.Context, in *QueryReceiveFeeRequest, opts ...grpc.CallOption) (*QueryReceiveFeeResponse, error) { + out := new(QueryReceiveFeeResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Query/ReceiveFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AckFee(ctx context.Context, in *QueryAckFeeRequest, opts ...grpc.CallOption) (*QueryAckFeeResponse, error) { + out := new(QueryAckFeeResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Query/AckFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) TimeoutFee(ctx context.Context, in *QueryTimeoutFeeRequest, opts ...grpc.CallOption) (*QueryTimeoutFeeResponse, error) { + out := new(QueryTimeoutFeeResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Query/TimeoutFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Gets the fee expected for submitting ReceivePacket msg for the given packet + ReceiveFee(context.Context, *QueryReceiveFeeRequest) (*QueryReceiveFeeResponse, error) + // Gets the fee expected for submitting AcknowledgePacket msg for the given packet + AckFee(context.Context, *QueryAckFeeRequest) (*QueryAckFeeResponse, error) + // Gets the fee expected for submitting TimeoutPacket msg for the given packet + TimeoutFee(context.Context, *QueryTimeoutFeeRequest) (*QueryTimeoutFeeResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) ReceiveFee(ctx context.Context, req *QueryReceiveFeeRequest) (*QueryReceiveFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReceiveFee not implemented") +} +func (*UnimplementedQueryServer) AckFee(ctx context.Context, req *QueryAckFeeRequest) (*QueryAckFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AckFee not implemented") +} +func (*UnimplementedQueryServer) TimeoutFee(ctx context.Context, req *QueryTimeoutFeeRequest) (*QueryTimeoutFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TimeoutFee not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_ReceiveFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryReceiveFeeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ReceiveFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.middleware.fee.v1.Query/ReceiveFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ReceiveFee(ctx, req.(*QueryReceiveFeeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AckFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAckFeeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AckFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.middleware.fee.v1.Query/AckFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AckFee(ctx, req.(*QueryAckFeeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TimeoutFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTimeoutFeeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TimeoutFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.middleware.fee.v1.Query/TimeoutFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TimeoutFee(ctx, req.(*QueryTimeoutFeeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ibc.applications.middleware.fee.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ReceiveFee", + Handler: _Query_ReceiveFee_Handler, + }, + { + MethodName: "AckFee", + Handler: _Query_AckFee_Handler, + }, + { + MethodName: "TimeoutFee", + Handler: _Query_TimeoutFee_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ibc/applications/middleware/fee/v1/query.proto", +} + +func (m *QueryReceiveFeeRequest) 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 *QueryReceiveFeeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryReceiveFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RelayerAddress) > 0 { + i -= len(m.RelayerAddress) + copy(dAtA[i:], m.RelayerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) + i-- + dAtA[i] = 0x22 + } + if len(m.Sequence) > 0 { + i -= len(m.Sequence) + copy(dAtA[i:], m.Sequence) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Sequence))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0x12 + } + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryReceiveFeeResponse) 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 *QueryReceiveFeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryReceiveFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Fee != nil { + { + size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAckFeeRequest) 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 *QueryAckFeeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAckFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RelayerAddress) > 0 { + i -= len(m.RelayerAddress) + copy(dAtA[i:], m.RelayerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) + i-- + dAtA[i] = 0x22 + } + if len(m.Sequence) > 0 { + i -= len(m.Sequence) + copy(dAtA[i:], m.Sequence) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Sequence))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0x12 + } + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAckFeeResponse) 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 *QueryAckFeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAckFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Fee != nil { + { + size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTimeoutFeeRequest) 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 *QueryTimeoutFeeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTimeoutFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RelayerAddress) > 0 { + i -= len(m.RelayerAddress) + copy(dAtA[i:], m.RelayerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) + i-- + dAtA[i] = 0x22 + } + if len(m.Sequence) > 0 { + i -= len(m.Sequence) + copy(dAtA[i:], m.Sequence) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Sequence))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0x12 + } + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTimeoutFeeResponse) 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 *QueryTimeoutFeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTimeoutFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Fee != nil { + { + size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryReceiveFeeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Sequence) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.RelayerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryReceiveFeeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Fee != nil { + l = m.Fee.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAckFeeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Sequence) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.RelayerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAckFeeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Fee != nil { + l = m.Fee.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTimeoutFeeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Sequence) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.RelayerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTimeoutFeeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Fee != nil { + l = m.Fee.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryReceiveFeeRequest) 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 ErrIntOverflowQuery + } + 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: QueryReceiveFeeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryReceiveFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sequence = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RelayerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryReceiveFeeResponse) 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 ErrIntOverflowQuery + } + 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: QueryReceiveFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryReceiveFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fee == nil { + m.Fee = &Fee{} + } + if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAckFeeRequest) 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 ErrIntOverflowQuery + } + 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: QueryAckFeeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAckFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sequence = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RelayerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAckFeeResponse) 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 ErrIntOverflowQuery + } + 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: QueryAckFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAckFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fee == nil { + m.Fee = &Fee{} + } + if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTimeoutFeeRequest) 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 ErrIntOverflowQuery + } + 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: QueryTimeoutFeeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTimeoutFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sequence = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RelayerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTimeoutFeeResponse) 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 ErrIntOverflowQuery + } + 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: QueryTimeoutFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTimeoutFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fee == nil { + m.Fee = &Fee{} + } + if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/modules/apps/29-fee/types/query.pb.gw.go b/modules/apps/29-fee/types/query.pb.gw.go new file mode 100644 index 00000000000..417bc16088e --- /dev/null +++ b/modules/apps/29-fee/types/query.pb.gw.go @@ -0,0 +1,326 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: ibc/applications/middleware/fee/v1/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage + +var ( + filter_Query_ReceiveFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_ReceiveFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryReceiveFeeRequest + 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_ReceiveFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ReceiveFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ReceiveFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryReceiveFeeRequest + 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_ReceiveFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ReceiveFee(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_AckFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_AckFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAckFeeRequest + 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_AckFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AckFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AckFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAckFeeRequest + 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_AckFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AckFee(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_TimeoutFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_TimeoutFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTimeoutFeeRequest + 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_TimeoutFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.TimeoutFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TimeoutFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTimeoutFeeRequest + 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_TimeoutFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.TimeoutFee(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_ReceiveFee_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) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ReceiveFee_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ReceiveFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AckFee_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) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AckFee_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AckFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TimeoutFee_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) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_TimeoutFee_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TimeoutFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_ReceiveFee_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ReceiveFee_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_ReceiveFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AckFee_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AckFee_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_AckFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TimeoutFee_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_TimeoutFee_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_TimeoutFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_ReceiveFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "receive_fee"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_AckFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "ack_fee"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_TimeoutFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "timeout_fee"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_Query_ReceiveFee_0 = runtime.ForwardResponseMessage + + forward_Query_AckFee_0 = runtime.ForwardResponseMessage + + forward_Query_TimeoutFee_0 = runtime.ForwardResponseMessage +) diff --git a/modules/apps/29-fee/types/tx.pb.go b/modules/apps/29-fee/types/tx.pb.go new file mode 100644 index 00000000000..19b66bd4e5b --- /dev/null +++ b/modules/apps/29-fee/types/tx.pb.go @@ -0,0 +1,1175 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/applications/middleware/fee/v1/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + types "github.com/cosmos/ibc-go/modules/core/04-channel/types" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgRegisterCounterPartyAddress is the request type for registering the counter party address +type MsgRegisterCounterPartyAddress struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + CounterpartyAddress string `protobuf:"bytes,2,opt,name=counterparty_address,json=counterpartyAddress,proto3" json:"counterparty_address,omitempty" yaml:"address"` +} + +func (m *MsgRegisterCounterPartyAddress) Reset() { *m = MsgRegisterCounterPartyAddress{} } +func (m *MsgRegisterCounterPartyAddress) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterCounterPartyAddress) ProtoMessage() {} +func (*MsgRegisterCounterPartyAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_faf7cf2f6149e2c8, []int{0} +} +func (m *MsgRegisterCounterPartyAddress) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterCounterPartyAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterCounterPartyAddress.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 *MsgRegisterCounterPartyAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterCounterPartyAddress.Merge(m, src) +} +func (m *MsgRegisterCounterPartyAddress) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterCounterPartyAddress) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterCounterPartyAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterCounterPartyAddress proto.InternalMessageInfo + +// MsgRegisterCounterPartyAddressResponse defines the Msg/RegisterCounteryPartyAddress response type +type MsgRegisterCounterPartyAddressResponse struct { +} + +func (m *MsgRegisterCounterPartyAddressResponse) Reset() { + *m = MsgRegisterCounterPartyAddressResponse{} +} +func (m *MsgRegisterCounterPartyAddressResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterCounterPartyAddressResponse) ProtoMessage() {} +func (*MsgRegisterCounterPartyAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_faf7cf2f6149e2c8, []int{1} +} +func (m *MsgRegisterCounterPartyAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterCounterPartyAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterCounterPartyAddressResponse.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 *MsgRegisterCounterPartyAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterCounterPartyAddressResponse.Merge(m, src) +} +func (m *MsgRegisterCounterPartyAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterCounterPartyAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterCounterPartyAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterCounterPartyAddressResponse proto.InternalMessageInfo + +// MsgEscrowPacketFee defines the request type EscrowPacketFee RPC +type MsgEscrowPacketFee struct { + PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"packet_id"` + ReceiveFee *Fee `protobuf:"bytes,2,opt,name=receive_fee,json=receiveFee,proto3" json:"receive_fee,omitempty" yaml:"receive_fee"` + AckFee *Fee `protobuf:"bytes,3,opt,name=ack_fee,json=ackFee,proto3" json:"ack_fee,omitempty" yaml:"ack_fee"` + TimeoutFee *Fee `protobuf:"bytes,4,opt,name=timeout_fee,json=timeoutFee,proto3" json:"timeout_fee,omitempty" yaml:"timeout_fee"` + Relayers []string `protobuf:"bytes,5,rep,name=relayers,proto3" json:"relayers,omitempty" yaml:"relayers"` +} + +func (m *MsgEscrowPacketFee) Reset() { *m = MsgEscrowPacketFee{} } +func (m *MsgEscrowPacketFee) String() string { return proto.CompactTextString(m) } +func (*MsgEscrowPacketFee) ProtoMessage() {} +func (*MsgEscrowPacketFee) Descriptor() ([]byte, []int) { + return fileDescriptor_faf7cf2f6149e2c8, []int{2} +} +func (m *MsgEscrowPacketFee) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEscrowPacketFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEscrowPacketFee.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 *MsgEscrowPacketFee) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEscrowPacketFee.Merge(m, src) +} +func (m *MsgEscrowPacketFee) XXX_Size() int { + return m.Size() +} +func (m *MsgEscrowPacketFee) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEscrowPacketFee.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEscrowPacketFee proto.InternalMessageInfo + +func (m *MsgEscrowPacketFee) GetPacketId() *types.PacketId { + if m != nil { + return m.PacketId + } + return nil +} + +func (m *MsgEscrowPacketFee) GetReceiveFee() *Fee { + if m != nil { + return m.ReceiveFee + } + return nil +} + +func (m *MsgEscrowPacketFee) GetAckFee() *Fee { + if m != nil { + return m.AckFee + } + return nil +} + +func (m *MsgEscrowPacketFee) GetTimeoutFee() *Fee { + if m != nil { + return m.TimeoutFee + } + return nil +} + +func (m *MsgEscrowPacketFee) GetRelayers() []string { + if m != nil { + return m.Relayers + } + return nil +} + +// MsgEscrowPacketFeeResponse defines the response type for Msg/EscrowPacketFee +type MsgEscrowPacketFeeResponse struct { +} + +func (m *MsgEscrowPacketFeeResponse) Reset() { *m = MsgEscrowPacketFeeResponse{} } +func (m *MsgEscrowPacketFeeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgEscrowPacketFeeResponse) ProtoMessage() {} +func (*MsgEscrowPacketFeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_faf7cf2f6149e2c8, []int{3} +} +func (m *MsgEscrowPacketFeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEscrowPacketFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEscrowPacketFeeResponse.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 *MsgEscrowPacketFeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEscrowPacketFeeResponse.Merge(m, src) +} +func (m *MsgEscrowPacketFeeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgEscrowPacketFeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEscrowPacketFeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEscrowPacketFeeResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgRegisterCounterPartyAddress)(nil), "ibc.applications.middleware.fee.v1.MsgRegisterCounterPartyAddress") + proto.RegisterType((*MsgRegisterCounterPartyAddressResponse)(nil), "ibc.applications.middleware.fee.v1.MsgRegisterCounterPartyAddressResponse") + proto.RegisterType((*MsgEscrowPacketFee)(nil), "ibc.applications.middleware.fee.v1.MsgEscrowPacketFee") + proto.RegisterType((*MsgEscrowPacketFeeResponse)(nil), "ibc.applications.middleware.fee.v1.MsgEscrowPacketFeeResponse") +} + +func init() { + proto.RegisterFile("ibc/applications/middleware/fee/v1/tx.proto", fileDescriptor_faf7cf2f6149e2c8) +} + +var fileDescriptor_faf7cf2f6149e2c8 = []byte{ + // 555 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x4f, 0x6b, 0x13, 0x41, + 0x18, 0xc6, 0xb3, 0x8d, 0xf6, 0xcf, 0x04, 0xac, 0x6c, 0x8b, 0x94, 0xa8, 0xbb, 0x75, 0x0e, 0x1a, + 0xb0, 0xdd, 0x21, 0x11, 0x04, 0x7b, 0x10, 0x5c, 0x69, 0x41, 0x31, 0x10, 0x16, 0x4f, 0x5e, 0xd2, + 0xcd, 0xec, 0x9b, 0xed, 0x90, 0xdd, 0xcc, 0x32, 0x33, 0x49, 0xcd, 0x37, 0xd0, 0x9b, 0xdf, 0xc0, + 0x7e, 0x01, 0x0f, 0x7e, 0x04, 0x6f, 0x1e, 0x7b, 0xf4, 0x14, 0x24, 0xb9, 0x78, 0xce, 0x27, 0x90, + 0xd9, 0x3f, 0x35, 0x54, 0x8c, 0xb1, 0xde, 0x66, 0x78, 0x9f, 0xe7, 0x37, 0xcf, 0x3b, 0xef, 0x30, + 0xe8, 0x21, 0xeb, 0x50, 0xe2, 0x27, 0x49, 0xc4, 0xa8, 0xaf, 0x18, 0xef, 0x4b, 0x12, 0xb3, 0x20, + 0x88, 0xe0, 0xd4, 0x17, 0x40, 0xba, 0x00, 0x64, 0x58, 0x27, 0xea, 0xad, 0x93, 0x08, 0xae, 0xb8, + 0x89, 0x59, 0x87, 0x3a, 0xf3, 0x62, 0xe7, 0x97, 0xd8, 0xe9, 0x02, 0x38, 0xc3, 0x7a, 0x75, 0x3b, + 0xe4, 0x21, 0x4f, 0xe5, 0x44, 0xaf, 0x32, 0x67, 0x75, 0x6f, 0x89, 0x63, 0x34, 0x20, 0x53, 0xdf, + 0xd3, 0x6a, 0xca, 0x05, 0x10, 0x7a, 0xe2, 0xf7, 0xfb, 0x10, 0xe9, 0x72, 0xbe, 0xcc, 0x24, 0xf8, + 0xa3, 0x81, 0xac, 0xa6, 0x0c, 0x3d, 0x08, 0x99, 0x54, 0x20, 0x9e, 0xf3, 0x41, 0x5f, 0x81, 0x68, + 0xf9, 0x42, 0x8d, 0x9e, 0x05, 0x81, 0x00, 0x29, 0xcd, 0x3d, 0xb4, 0xe6, 0x67, 0xcb, 0x1d, 0x63, + 0xd7, 0xa8, 0x6d, 0xb8, 0xe6, 0x6c, 0x6c, 0xdf, 0x18, 0xf9, 0x71, 0x74, 0x80, 0xf3, 0x02, 0xf6, + 0x0a, 0x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0xdd, 0x72, 0x6d, 0xc3, 0xdd, 0x9a, 0x8d, 0xed, 0xcd, + 0xa2, 0xdb, 0xac, 0x82, 0xbd, 0x0b, 0x11, 0xbe, 0x83, 0xaa, 0xbf, 0x8f, 0xac, 0x98, 0x68, 0xe3, + 0xcb, 0x0a, 0x2a, 0x37, 0x65, 0x68, 0x7e, 0x32, 0xd0, 0xed, 0x45, 0x4f, 0xd4, 0x5d, 0xa6, 0x87, + 0xc5, 0xaf, 0xa8, 0xfa, 0xf2, 0xff, 0x19, 0x45, 0x6e, 0xf3, 0xbd, 0x81, 0x36, 0x2f, 0x3f, 0xc3, + 0xc7, 0x4b, 0xf2, 0x2f, 0xf9, 0xaa, 0x4f, 0xaf, 0xe6, 0x2b, 0xb2, 0xb8, 0xaf, 0xbe, 0x4e, 0x2c, + 0xe3, 0x7c, 0x62, 0x19, 0xdf, 0x27, 0x96, 0xf1, 0x61, 0x6a, 0x95, 0xce, 0xa7, 0x56, 0xe9, 0xdb, + 0xd4, 0x2a, 0xbd, 0x69, 0x84, 0x4c, 0x9d, 0x0c, 0x3a, 0x0e, 0xe5, 0x31, 0xa1, 0x5c, 0xc6, 0x5c, + 0x12, 0xd6, 0xa1, 0xfb, 0x21, 0x27, 0x31, 0x0f, 0x06, 0x11, 0x48, 0xfd, 0xd3, 0x48, 0xd2, 0x78, + 0xb2, 0xaf, 0x7f, 0x16, 0x35, 0x4a, 0x40, 0x76, 0x56, 0xd3, 0x6f, 0xe3, 0xd1, 0xcf, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xc3, 0x94, 0xb1, 0x8f, 0xf0, 0x04, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // RegisterCounterPartyAddress defines a rpc handler method for MsgRegisterCounterPartyAddress + // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their + // counterparty address before relaying This ensures they will be properly compensated for forward relaying since + // destination chain must send back relayer's source address (counterparty address) in acknowledgement This function + // may be called more than once by a relayer, in which case, latest counterparty address is always used. + RegisterCounterPartyAddress(ctx context.Context, in *MsgRegisterCounterPartyAddress, opts ...grpc.CallOption) (*MsgRegisterCounterPartyAddressResponse, error) + // EscrowPacketFee defines a rpc handler method for MsgEscrowPacketFee + // EscrowPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to + // incentivize the relaying of the given packet. + EscrowPacketFee(ctx context.Context, in *MsgEscrowPacketFee, opts ...grpc.CallOption) (*MsgEscrowPacketFeeResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) RegisterCounterPartyAddress(ctx context.Context, in *MsgRegisterCounterPartyAddress, opts ...grpc.CallOption) (*MsgRegisterCounterPartyAddressResponse, error) { + out := new(MsgRegisterCounterPartyAddressResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Msg/RegisterCounterPartyAddress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) EscrowPacketFee(ctx context.Context, in *MsgEscrowPacketFee, opts ...grpc.CallOption) (*MsgEscrowPacketFeeResponse, error) { + out := new(MsgEscrowPacketFeeResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Msg/EscrowPacketFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // RegisterCounterPartyAddress defines a rpc handler method for MsgRegisterCounterPartyAddress + // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their + // counterparty address before relaying This ensures they will be properly compensated for forward relaying since + // destination chain must send back relayer's source address (counterparty address) in acknowledgement This function + // may be called more than once by a relayer, in which case, latest counterparty address is always used. + RegisterCounterPartyAddress(context.Context, *MsgRegisterCounterPartyAddress) (*MsgRegisterCounterPartyAddressResponse, error) + // EscrowPacketFee defines a rpc handler method for MsgEscrowPacketFee + // EscrowPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to + // incentivize the relaying of the given packet. + EscrowPacketFee(context.Context, *MsgEscrowPacketFee) (*MsgEscrowPacketFeeResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) RegisterCounterPartyAddress(ctx context.Context, req *MsgRegisterCounterPartyAddress) (*MsgRegisterCounterPartyAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterCounterPartyAddress not implemented") +} +func (*UnimplementedMsgServer) EscrowPacketFee(ctx context.Context, req *MsgEscrowPacketFee) (*MsgEscrowPacketFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EscrowPacketFee not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_RegisterCounterPartyAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterCounterPartyAddress) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RegisterCounterPartyAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.middleware.fee.v1.Msg/RegisterCounterPartyAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RegisterCounterPartyAddress(ctx, req.(*MsgRegisterCounterPartyAddress)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_EscrowPacketFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgEscrowPacketFee) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).EscrowPacketFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.middleware.fee.v1.Msg/EscrowPacketFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).EscrowPacketFee(ctx, req.(*MsgEscrowPacketFee)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ibc.applications.middleware.fee.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RegisterCounterPartyAddress", + Handler: _Msg_RegisterCounterPartyAddress_Handler, + }, + { + MethodName: "EscrowPacketFee", + Handler: _Msg_EscrowPacketFee_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ibc/applications/middleware/fee/v1/tx.proto", +} + +func (m *MsgRegisterCounterPartyAddress) 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 *MsgRegisterCounterPartyAddress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterCounterPartyAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CounterpartyAddress) > 0 { + i -= len(m.CounterpartyAddress) + copy(dAtA[i:], m.CounterpartyAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.CounterpartyAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRegisterCounterPartyAddressResponse) 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 *MsgRegisterCounterPartyAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterCounterPartyAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgEscrowPacketFee) 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 *MsgEscrowPacketFee) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEscrowPacketFee) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Relayers) > 0 { + for iNdEx := len(m.Relayers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Relayers[iNdEx]) + copy(dAtA[i:], m.Relayers[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Relayers[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if m.TimeoutFee != nil { + { + size, err := m.TimeoutFee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.AckFee != nil { + { + size, err := m.AckFee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.ReceiveFee != nil { + { + size, err := m.ReceiveFee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.PacketId != nil { + { + size, err := m.PacketId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgEscrowPacketFeeResponse) 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 *MsgEscrowPacketFeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEscrowPacketFeeResponse) 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 + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgRegisterCounterPartyAddress) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.CounterpartyAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRegisterCounterPartyAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgEscrowPacketFee) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PacketId != nil { + l = m.PacketId.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.ReceiveFee != nil { + l = m.ReceiveFee.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.AckFee != nil { + l = m.AckFee.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.TimeoutFee != nil { + l = m.TimeoutFee.Size() + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Relayers) > 0 { + for _, s := range m.Relayers { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgEscrowPacketFeeResponse) 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 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgRegisterCounterPartyAddress) 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: MsgRegisterCounterPartyAddress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterCounterPartyAddress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var 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.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyAddress", 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.CounterpartyAddress = string(dAtA[iNdEx:postIndex]) + 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 *MsgRegisterCounterPartyAddressResponse) 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: MsgRegisterCounterPartyAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterCounterPartyAddressResponse: 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 (m *MsgEscrowPacketFee) 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: MsgEscrowPacketFee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEscrowPacketFee: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PacketId", 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 m.PacketId == nil { + m.PacketId = &types.PacketId{} + } + if err := m.PacketId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReceiveFee", 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 m.ReceiveFee == nil { + m.ReceiveFee = &Fee{} + } + if err := m.ReceiveFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AckFee", 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 m.AckFee == nil { + m.AckFee = &Fee{} + } + if err := m.AckFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutFee", 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 m.TimeoutFee == nil { + m.TimeoutFee = &Fee{} + } + if err := m.TimeoutFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Relayers", 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.Relayers = append(m.Relayers, string(dAtA[iNdEx:postIndex])) + 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 *MsgEscrowPacketFeeResponse) 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: MsgEscrowPacketFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEscrowPacketFeeResponse: 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 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/modules/core/04-channel/types/channel.pb.go b/modules/core/04-channel/types/channel.pb.go index d2abd98075b..0b20d7272b9 100644 --- a/modules/core/04-channel/types/channel.pb.go +++ b/modules/core/04-channel/types/channel.pb.go @@ -348,10 +348,12 @@ func (m *PacketState) XXX_DiscardUnknown() { var xxx_messageInfo_PacketState proto.InternalMessageInfo // PacketId is an identifer for a unique Packet +// Source chains refer to packets by source port/channel +// Destination chains refer to packets by destination port/channel type PacketId struct { - // channel port identifier. + // channel port identifier PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - // channel unique identifier. + // channel unique identifier ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` // packet sequence. Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` diff --git a/proto/ibc/applications/middleware/fee/v1/fee.proto b/proto/ibc/applications/middleware/fee/v1/fee.proto index b6da885bcde..caa1e02efa4 100644 --- a/proto/ibc/applications/middleware/fee/v1/fee.proto +++ b/proto/ibc/applications/middleware/fee/v1/fee.proto @@ -1,13 +1,12 @@ syntax = "proto3"; package ibc.applications.middleware.fee.v1; +import "cosmos/base/v1beta1/coin.proto"; +option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; // Fee interface // See Fee Payment Middleware spec: // https://github.com/cosmos/ibc/tree/master/spec/app/ics-029-fee-payment#fee-middleware-contract message Fee { - // the token denomination the fee will be paid in - string denom = 1; - // the token amount to be transferred - uint64 amount = 2; + cosmos.base.v1beta1.Coin amount = 1; } diff --git a/proto/ibc/applications/middleware/fee/v1/genesis.proto b/proto/ibc/applications/middleware/fee/v1/genesis.proto index d3ba2f10480..dd0361e03ae 100644 --- a/proto/ibc/applications/middleware/fee/v1/genesis.proto +++ b/proto/ibc/applications/middleware/fee/v1/genesis.proto @@ -3,6 +3,12 @@ syntax = "proto3"; package ibc.applications.middleware.fee.v1; import "gogoproto/gogo.proto"; +import "ibc/applications/middleware/fee/v1/fee.proto"; +import "ibc/core/channel/v1/channel.proto"; +option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; + // GenesisState defines the fee middleware genesis state -message GenesisState {} +message GenesisState { + map packet_fees = 1; +} diff --git a/proto/ibc/applications/middleware/fee/v1/query.proto b/proto/ibc/applications/middleware/fee/v1/query.proto index f4b26ef37d2..8131f583c31 100644 --- a/proto/ibc/applications/middleware/fee/v1/query.proto +++ b/proto/ibc/applications/middleware/fee/v1/query.proto @@ -6,6 +6,7 @@ import "gogoproto/gogo.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "ibc/applications/middleware/fee/v1/fee.proto"; import "google/api/annotations.proto"; +option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; // Query provides defines the gRPC querier service. service Query { diff --git a/proto/ibc/applications/middleware/fee/v1/tx.proto b/proto/ibc/applications/middleware/fee/v1/tx.proto index 3a5619c69f0..cd446a80e31 100644 --- a/proto/ibc/applications/middleware/fee/v1/tx.proto +++ b/proto/ibc/applications/middleware/fee/v1/tx.proto @@ -5,6 +5,7 @@ package ibc.applications.middleware.fee.v1; import "gogoproto/gogo.proto"; import "ibc/applications/middleware/fee/v1/fee.proto"; import "ibc/core/channel/v1/channel.proto"; +option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; // Msg defines the ibc/fee Msg service. service Msg { @@ -18,12 +19,6 @@ service Msg { // EscrowPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to // incentivize the relaying of the given packet. rpc EscrowPacketFee(MsgEscrowPacketFee) returns (MsgEscrowPacketFeeResponse); - // PayFee defines a rpc handler method for MsgPayFee - // PayFee is a callback implemented by fee module called by the ICS-4 AcknowledgePacket handler. - rpc PayFee(MsgPayFee) returns (MsgPayFeeResponse); - // PayTimeoutFee defines a rpc handler method for MsgPayTimeoutFee - // PayFee is a callback implemented by fee module called by the ICS-4 TimeoutPacket handler. - rpc PayTimeoutFee(MsgPayTimeoutFee) returns (MsgPayTimeoutFeeResponse); } // MsgRegisterCounterPartyAddress is the request type for registering the counter party address @@ -49,22 +44,3 @@ message MsgEscrowPacketFee { // MsgEscrowPacketFeeResponse defines the response type for Msg/EscrowPacketFee message MsgEscrowPacketFeeResponse {} - -// MsgPayFee defines the request type for PayFee the RPC -message MsgPayFee { - ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; - string forward_relayer = 2 [(gogoproto.moretags) = "yaml:\"forward_relayer\""]; - string reverse_relayer = 3 [(gogoproto.moretags) = "yaml:\"reverse_relayer\""]; -} - -// MsgPayFeeResponse defines the response type for Msg/PayFee -message MsgPayFeeResponse {} - -// MsgPayTimmeout defines the request type for the PayTimeoutFee RPC -message MsgPayTimeoutFee { - ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; - string timeout_relayer = 2 [(gogoproto.moretags) = "yaml:\"timeout_relayer\""]; -} - -// MsgPayTimeoutFeeResponse defines the response type for Msg/PayTimeoutFee -message MsgPayTimeoutFeeResponse {} diff --git a/proto/ibc/core/channel/v1/channel.proto b/proto/ibc/core/channel/v1/channel.proto index ee739a9475a..a3c9545cc0d 100644 --- a/proto/ibc/core/channel/v1/channel.proto +++ b/proto/ibc/core/channel/v1/channel.proto @@ -133,12 +133,14 @@ message PacketState { } // PacketId is an identifer for a unique Packet +// Source chains refer to packets by source port/channel +// Destination chains refer to packets by destination port/channel message PacketId { option (gogoproto.goproto_getters) = false; - // channel port identifier. + // channel port identifier string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // channel unique identifier. + // channel unique identifier string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; // packet sequence. uint64 sequence = 3; From 456565724b59c73f3a374cbff9cc4ca661d54c55 Mon Sep 17 00:00:00 2001 From: Sean King Date: Wed, 21 Jul 2021 12:37:29 +0200 Subject: [PATCH 07/26] refactor: escrowed fees map --- modules/apps/29-fee/types/genesis.pb.go | 436 +++++++++++------- .../middleware/fee/v1/genesis.proto | 9 +- 2 files changed, 289 insertions(+), 156 deletions(-) diff --git a/modules/apps/29-fee/types/genesis.pb.go b/modules/apps/29-fee/types/genesis.pb.go index 7fe57dba0b3..5d3454d0895 100644 --- a/modules/apps/29-fee/types/genesis.pb.go +++ b/modules/apps/29-fee/types/genesis.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/ibc-go/modules/core/04-channel/types" + types "github.com/cosmos/ibc-go/modules/core/04-channel/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" @@ -26,7 +26,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the fee middleware genesis state type GenesisState struct { - PacketFees map[string]*Fee `protobuf:"bytes,1,rep,name=packet_fees,json=packetFees,proto3" json:"packet_fees,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // A mapping of packets -> escrowed fees + PacketsFeesMap []*GenesisState_PacketsFeesMapEntry `protobuf:"bytes,1,rep,name=packets_fees_map,json=packetsFeesMap,proto3" json:"packets_fees_map,omitempty"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -62,16 +63,69 @@ func (m *GenesisState) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisState proto.InternalMessageInfo -func (m *GenesisState) GetPacketFees() map[string]*Fee { +func (m *GenesisState) GetPacketsFeesMap() []*GenesisState_PacketsFeesMapEntry { if m != nil { - return m.PacketFees + return m.PacketsFeesMap + } + return nil +} + +// An entry for the PacketsFees map +type GenesisState_PacketsFeesMapEntry struct { + PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty"` + Fee *Fee `protobuf:"bytes,2,opt,name=fee,proto3" json:"fee,omitempty"` +} + +func (m *GenesisState_PacketsFeesMapEntry) Reset() { *m = GenesisState_PacketsFeesMapEntry{} } +func (m *GenesisState_PacketsFeesMapEntry) String() string { return proto.CompactTextString(m) } +func (*GenesisState_PacketsFeesMapEntry) ProtoMessage() {} +func (*GenesisState_PacketsFeesMapEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_6a4f6c8d78b5dfbf, []int{0, 0} +} +func (m *GenesisState_PacketsFeesMapEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState_PacketsFeesMapEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState_PacketsFeesMapEntry.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 *GenesisState_PacketsFeesMapEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState_PacketsFeesMapEntry.Merge(m, src) +} +func (m *GenesisState_PacketsFeesMapEntry) XXX_Size() int { + return m.Size() +} +func (m *GenesisState_PacketsFeesMapEntry) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState_PacketsFeesMapEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState_PacketsFeesMapEntry proto.InternalMessageInfo + +func (m *GenesisState_PacketsFeesMapEntry) GetPacketId() *types.PacketId { + if m != nil { + return m.PacketId + } + return nil +} + +func (m *GenesisState_PacketsFeesMapEntry) GetFee() *Fee { + if m != nil { + return m.Fee } return nil } func init() { proto.RegisterType((*GenesisState)(nil), "ibc.applications.middleware.fee.v1.GenesisState") - proto.RegisterMapType((map[string]*Fee)(nil), "ibc.applications.middleware.fee.v1.GenesisState.PacketFeesEntry") + proto.RegisterType((*GenesisState_PacketsFeesMapEntry)(nil), "ibc.applications.middleware.fee.v1.GenesisState.PacketsFeesMapEntry") } func init() { @@ -79,27 +133,29 @@ func init() { } var fileDescriptor_6a4f6c8d78b5dfbf = []byte{ - // 318 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xc1, 0x4b, 0xfb, 0x30, - 0x1c, 0xc5, 0x97, 0x8d, 0xdf, 0x0f, 0xcc, 0x04, 0xa5, 0x78, 0x18, 0x3b, 0x84, 0xb9, 0x8b, 0x3b, - 0xb8, 0xc4, 0xd5, 0x8b, 0x0a, 0x82, 0x08, 0xce, 0x8b, 0x07, 0x99, 0x37, 0x2f, 0x92, 0x66, 0xdf, - 0x76, 0x61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 0xd7, 0x3f, 0xda, 0xa6, 0xc1, 0x14, 0x60, 0xd6, - 0x50, 0x17, 0xed, 0x33, 0x74, 0x7d, 0xf7, 0x5a, 0x12, 0xb4, 0x2e, 0x09, 0xfa, 0x28, 0x09, 0x7a, - 0xa9, 0x48, 0x6b, 0x5d, 0x91, 0xd6, 0x5b, 0x45, 0x5a, 0x8f, 0x7e, 0x24, 0xed, 0x62, 0x15, 0x50, - 0xa1, 0x12, 0x26, 0x94, 0x49, 0x94, 0x61, 0x32, 0x10, 0xe3, 0x48, 0xb1, 0x44, 0xcd, 0x57, 0x31, - 0x18, 0xb7, 0xb1, 0x61, 0xfe, 0xf9, 0xd8, 0x6d, 0x6a, 0x0b, 0x0d, 0x26, 0xf8, 0x5f, 0x0f, 0x76, - 0xfa, 0x19, 0x00, 0x00, 0xff, 0xff, 0x9b, 0xa6, 0xc3, 0xbe, 0xef, 0x01, 0x00, 0x00, + // 337 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x41, 0x4b, 0xfb, 0x30, + 0x18, 0xc6, 0x97, 0x0d, 0xfe, 0xfc, 0xed, 0x44, 0xa4, 0x7a, 0x18, 0x03, 0xcb, 0xdc, 0xc5, 0x1d, + 0x5c, 0xe2, 0xea, 0x69, 0x1e, 0x45, 0x27, 0x82, 0x82, 0xcc, 0x9b, 0x97, 0x91, 0xa6, 0x6f, 0xbb, + 0x60, 0x9b, 0x84, 0x26, 0x9b, 0xec, 0x3b, 0x28, 0xf8, 0xb1, 0x3c, 0xee, 0xe8, 0x51, 0xb6, 0x2f, + 0x22, 0x69, 0x26, 0x4e, 0x10, 0xdc, 0xed, 0xa1, 0xfd, 0x3d, 0xcf, 0xfb, 0xbc, 0x79, 0xbd, 0x13, + 0x1e, 0x31, 0x42, 0x95, 0xca, 0x38, 0xa3, 0x86, 0x4b, 0xa1, 0x49, 0xce, 0xe3, 0x38, 0x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06, 0x95, 0xf9, 0x32, 0xa8, 0xbc, 0x2f, 0x83, 0xca, 0x43, 0x98, 0x72, 0x33, + 0x9e, 0x44, 0x98, 0xc9, 0x9c, 0x30, 0xa9, 0x73, 0xa9, 0x09, 0x8f, 0x58, 0x37, 0x95, 0x24, 0x97, + 0xf1, 0x24, 0x03, 0x6d, 0xef, 0xa2, 0x49, 0xd8, 0xef, 0xda, 0x3b, 0x98, 0x99, 0x02, 0x1d, 0xfd, + 0x2b, 0x1f, 0xf9, 0xf4, 0x33, 0x00, 0x00, 0xff, 0xff, 0x88, 0x29, 0xef, 0x17, 0x23, 0x02, 0x00, + 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -122,28 +178,16 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.PacketFees) > 0 { - for k := range m.PacketFees { - v := m.PacketFees[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) + if len(m.PacketsFeesMap) > 0 { + for iNdEx := len(m.PacketsFeesMap) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PacketsFeesMap[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintGenesis(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenesis(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0xa } @@ -151,6 +195,53 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *GenesisState_PacketsFeesMapEntry) 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 *GenesisState_PacketsFeesMapEntry) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState_PacketsFeesMapEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Fee != nil { + { + size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.PacketId != nil { + { + size, err := m.PacketId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { offset -= sovGenesis(v) base := offset @@ -168,22 +259,32 @@ func (m *GenesisState) Size() (n int) { } var l int _ = l - if len(m.PacketFees) > 0 { - for k, v := range m.PacketFees { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovGenesis(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovGenesis(uint64(len(k))) + l - n += mapEntrySize + 1 + sovGenesis(uint64(mapEntrySize)) + if len(m.PacketsFeesMap) > 0 { + for _, e := range m.PacketsFeesMap { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) } } return n } +func (m *GenesisState_PacketsFeesMapEntry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PacketId != nil { + l = m.PacketId.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + if m.Fee != nil { + l = m.Fee.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + return n +} + func sovGenesis(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -221,7 +322,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PacketFees", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PacketsFeesMap", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -248,105 +349,132 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.PacketFees == nil { - m.PacketFees = make(map[string]*Fee) - } - var mapkey string - var mapvalue *Fee - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + m.PacketsFeesMap = append(m.PacketsFeesMap, &GenesisState_PacketsFeesMapEntry{}) + if err := m.PacketsFeesMap[len(m.PacketsFeesMap)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GenesisState_PacketsFeesMapEntry) 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 ErrIntOverflowGenesis + } + 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: PacketsFeesMapEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PacketsFeesMapEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PacketId", 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 } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenesis - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenesis - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenesis - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthGenesis - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &Fee{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PacketId == nil { + m.PacketId = &types.PacketId{} + } + if err := m.PacketId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", 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 + } + if m.Fee == nil { + m.Fee = &Fee{} + } + if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.PacketFees[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex diff --git a/proto/ibc/applications/middleware/fee/v1/genesis.proto b/proto/ibc/applications/middleware/fee/v1/genesis.proto index dd0361e03ae..588480c1d19 100644 --- a/proto/ibc/applications/middleware/fee/v1/genesis.proto +++ b/proto/ibc/applications/middleware/fee/v1/genesis.proto @@ -7,8 +7,13 @@ import "ibc/applications/middleware/fee/v1/fee.proto"; import "ibc/core/channel/v1/channel.proto"; option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; - // GenesisState defines the fee middleware genesis state message GenesisState { - map packet_fees = 1; + // An entry for the PacketsFees map + message PacketsFeesMapEntry { + ibc.core.channel.v1.PacketId packet_id = 1; + ibc.applications.middleware.fee.v1.Fee fee = 2; + } + // A mapping of packets -> escrowed fees + repeated PacketsFeesMapEntry packets_fees_map = 1; } From ba0e3dc7452eec1f1a30518b261142abf7639337 Mon Sep 17 00:00:00 2001 From: Sean King Date: Wed, 21 Jul 2021 12:43:51 +0200 Subject: [PATCH 08/26] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> --- proto/ibc/applications/middleware/fee/v1/query.proto | 6 +++--- proto/ibc/core/channel/v1/channel.proto | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/proto/ibc/applications/middleware/fee/v1/query.proto b/proto/ibc/applications/middleware/fee/v1/query.proto index 8131f583c31..8dc9061d814 100644 --- a/proto/ibc/applications/middleware/fee/v1/query.proto +++ b/proto/ibc/applications/middleware/fee/v1/query.proto @@ -38,12 +38,12 @@ message QueryReceiveFeeRequest { string relayer_address = 4 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; } -// QueryRequestFeeResponse is the response type for the ReceiveFee RPC +// QueryReceiveFeeResponse is the response type for the ReceiveFee RPC message QueryReceiveFeeResponse { ibc.applications.middleware.fee.v1.Fee fee = 1 [(gogoproto.moretags) = "yaml:\"fee\""]; } -// QueryAckRequestFee is the request type for quering the acknowledgement fee +// QueryAckFeeRequest is the request type for querying the acknowledgement fee message QueryAckFeeRequest { // Source Port ID string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; @@ -60,7 +60,7 @@ message QueryAckFeeResponse { ibc.applications.middleware.fee.v1.Fee fee = 1 [(gogoproto.moretags) = "yaml:\"fee\""]; } -// QueryTimeoutFee is the request type for quering the timeout fee +// QueryTimeoutFeeRequest is the request type for querying the timeout fee message QueryTimeoutFeeRequest { // Source Port ID string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; diff --git a/proto/ibc/core/channel/v1/channel.proto b/proto/ibc/core/channel/v1/channel.proto index a3c9545cc0d..b0ac3f9997c 100644 --- a/proto/ibc/core/channel/v1/channel.proto +++ b/proto/ibc/core/channel/v1/channel.proto @@ -142,7 +142,7 @@ message PacketId { string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; // channel unique identifier string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - // packet sequence. + // packet sequence uint64 sequence = 3; } From 0bfa303e90f6671a676d8f2911d09faaf44a97e2 Mon Sep 17 00:00:00 2001 From: Sean King Date: Wed, 21 Jul 2021 12:54:53 +0200 Subject: [PATCH 09/26] Update proto/ibc/applications/middleware/fee/v1/tx.proto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> --- proto/ibc/applications/middleware/fee/v1/tx.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/ibc/applications/middleware/fee/v1/tx.proto b/proto/ibc/applications/middleware/fee/v1/tx.proto index cd446a80e31..08b8e535bf0 100644 --- a/proto/ibc/applications/middleware/fee/v1/tx.proto +++ b/proto/ibc/applications/middleware/fee/v1/tx.proto @@ -22,7 +22,7 @@ service Msg { } // MsgRegisterCounterPartyAddress is the request type for registering the counter party address -message MsgRegisterCounterPartyAddress { +message MsgRegisterCounterpartyAddress { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; From 7cc97fa0a18750b62f7ffb75385652743df9a37b Mon Sep 17 00:00:00 2001 From: Sean King Date: Wed, 21 Jul 2021 12:55:09 +0200 Subject: [PATCH 10/26] Update proto/ibc/applications/middleware/fee/v1/tx.proto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> --- proto/ibc/applications/middleware/fee/v1/tx.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/ibc/applications/middleware/fee/v1/tx.proto b/proto/ibc/applications/middleware/fee/v1/tx.proto index 08b8e535bf0..76506c32f01 100644 --- a/proto/ibc/applications/middleware/fee/v1/tx.proto +++ b/proto/ibc/applications/middleware/fee/v1/tx.proto @@ -9,7 +9,7 @@ option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; // Msg defines the ibc/fee Msg service. service Msg { - // RegisterCounterPartyAddress defines a rpc handler method for MsgRegisterCounterPartyAddress + // RegisterCounterpartyAddress defines a rpc handler method for MsgRegisterCounterpartyAddress // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their // counterparty address before relaying This ensures they will be properly compensated for forward relaying since // destination chain must send back relayer's source address (counterparty address) in acknowledgement This function From 85032f96c4fd30994a0ee03dd9b76830cb4cae1b Mon Sep 17 00:00:00 2001 From: Sean King Date: Wed, 21 Jul 2021 12:55:20 +0200 Subject: [PATCH 11/26] Update proto/ibc/applications/middleware/fee/v1/tx.proto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> --- proto/ibc/applications/middleware/fee/v1/tx.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/ibc/applications/middleware/fee/v1/tx.proto b/proto/ibc/applications/middleware/fee/v1/tx.proto index 76506c32f01..cfbedc37e16 100644 --- a/proto/ibc/applications/middleware/fee/v1/tx.proto +++ b/proto/ibc/applications/middleware/fee/v1/tx.proto @@ -21,7 +21,7 @@ service Msg { rpc EscrowPacketFee(MsgEscrowPacketFee) returns (MsgEscrowPacketFeeResponse); } -// MsgRegisterCounterPartyAddress is the request type for registering the counter party address +// MsgRegisterCounterpartyAddress is the request type for registering the counter party address message MsgRegisterCounterpartyAddress { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; From 3e48f9247dbd91845a2ea8bbb3ecc60f7ee2e52a Mon Sep 17 00:00:00 2001 From: Sean King Date: Thu, 22 Jul 2021 12:09:10 +0200 Subject: [PATCH 12/26] refactor: use packetID + minor changes --- docs/ibc/proto-docs.md | 2 +- modules/apps/29-fee/types/fee.pb.go | 277 +++++++++- modules/apps/29-fee/types/genesis.pb.go | 290 +--------- modules/apps/29-fee/types/query.pb.go | 515 ++++-------------- modules/apps/29-fee/types/tx.pb.go | 136 ++--- modules/core/04-channel/types/channel.pb.go | 2 +- .../applications/middleware/fee/v1/fee.proto | 7 + .../middleware/fee/v1/genesis.proto | 7 +- .../middleware/fee/v1/genesis.proto~ | 19 + .../middleware/fee/v1/query.proto | 26 +- .../applications/middleware/fee/v1/tx.proto | 6 +- 11 files changed, 508 insertions(+), 779 deletions(-) create mode 100644 proto/ibc/applications/middleware/fee/v1/genesis.proto~ diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md index 4b66a1e8a76..5622278cfae 100644 --- a/docs/ibc/proto-docs.md +++ b/docs/ibc/proto-docs.md @@ -798,7 +798,7 @@ Destination chains refer to packets by destination port/channel | ----- | ---- | ----- | ----------- | | `port_id` | [string](#string) | | channel port identifier | | `channel_id` | [string](#string) | | channel unique identifier | -| `sequence` | [uint64](#uint64) | | packet sequence. | +| `sequence` | [uint64](#uint64) | | packet sequence | diff --git a/modules/apps/29-fee/types/fee.pb.go b/modules/apps/29-fee/types/fee.pb.go index 5027ee0a105..dc66eddb9cc 100644 --- a/modules/apps/29-fee/types/fee.pb.go +++ b/modules/apps/29-fee/types/fee.pb.go @@ -6,6 +6,7 @@ package types import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/types" + types1 "github.com/cosmos/ibc-go/modules/core/04-channel/types" proto "github.com/gogo/protobuf/proto" io "io" math "math" @@ -70,8 +71,62 @@ func (m *Fee) GetAmount() *types.Coin { return nil } +// Fee associated with a packet_id +type IdentifiedPacketFee struct { + PacketId *types1.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty"` + Fee *Fee `protobuf:"bytes,2,opt,name=fee,proto3" json:"fee,omitempty"` +} + +func (m *IdentifiedPacketFee) Reset() { *m = IdentifiedPacketFee{} } +func (m *IdentifiedPacketFee) String() string { return proto.CompactTextString(m) } +func (*IdentifiedPacketFee) ProtoMessage() {} +func (*IdentifiedPacketFee) Descriptor() ([]byte, []int) { + return fileDescriptor_9a4c0273395d2c1a, []int{1} +} +func (m *IdentifiedPacketFee) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IdentifiedPacketFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IdentifiedPacketFee.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 *IdentifiedPacketFee) XXX_Merge(src proto.Message) { + xxx_messageInfo_IdentifiedPacketFee.Merge(m, src) +} +func (m *IdentifiedPacketFee) XXX_Size() int { + return m.Size() +} +func (m *IdentifiedPacketFee) XXX_DiscardUnknown() { + xxx_messageInfo_IdentifiedPacketFee.DiscardUnknown(m) +} + +var xxx_messageInfo_IdentifiedPacketFee proto.InternalMessageInfo + +func (m *IdentifiedPacketFee) GetPacketId() *types1.PacketId { + if m != nil { + return m.PacketId + } + return nil +} + +func (m *IdentifiedPacketFee) GetFee() *Fee { + if m != nil { + return m.Fee + } + return nil +} + func init() { proto.RegisterType((*Fee)(nil), "ibc.applications.middleware.fee.v1.Fee") + proto.RegisterType((*IdentifiedPacketFee)(nil), "ibc.applications.middleware.fee.v1.IdentifiedPacketFee") } func init() { @@ -79,21 +134,27 @@ func init() { } var fileDescriptor_9a4c0273395d2c1a = []byte{ - // 223 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x8f, 0xb1, 0x4e, 0xc3, 0x30, - 0x10, 0x40, 0x63, 0x21, 0x75, 0x08, 0x5b, 0x27, 0x60, 0xb0, 0x50, 0x27, 0x06, 0x7a, 0xa7, 0x84, - 0x05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e, 0xfa, 0xc0, 0x98, 0x02, 0x01, 0x00, 0x00, + // 312 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0x3f, 0x4f, 0x02, 0x41, + 0x10, 0xc5, 0x39, 0x49, 0x88, 0x9e, 0x1d, 0x36, 0x48, 0xe2, 0x46, 0x69, 0xb4, 0x90, 0xd9, 0x1c, + 0x36, 0x62, 0xa9, 0x09, 0x09, 0x89, 0x85, 0xa1, 0xb4, 0x31, 0xfb, 0x67, 0x80, 0x8d, 0x77, 0x3b, + 0x17, 0x76, 0xc1, 0xf8, 0x1d, 0x2c, 0xfc, 0x58, 0x96, 0x94, 0x96, 0x06, 0xbe, 0x88, 0x19, 0xee, + 0x8c, 0x76, 0x56, 0x3b, 0x9b, 0xbc, 0xf7, 0x7b, 0xbb, 0x6f, 0xd2, 0x4b, 0xa7, 0x8d, 0x54, 0x65, + 0x99, 0x3b, 0xa3, 0xa2, 0x23, 0x1f, 0x64, 0xe1, 0xac, 0xcd, 0xf1, 0x45, 0x2d, 0x50, 0x4e, 0x11, + 0xe5, 0x2a, 0xe3, 0x03, 0xca, 0x05, 0x45, 0x6a, 0xf7, 0x9c, 0x36, 0xf0, 0x57, 0x0d, 0xbf, 0x6a, + 0x60, 0xd9, 0x2a, 0xeb, 0x0a, 0x43, 0xa1, 0xa0, 0x20, 0xb5, 0x0a, 0xec, 0xd6, 0x18, 0x55, 0x26, + 0x0d, 0x39, 0x5f, 0x31, 0xba, 0x67, 0x9c, 0x68, 0x68, 0x81, 0xd2, 0xcc, 0x95, 0xf7, 0x98, 0x73, + 0x44, 0x3d, 0x56, 0x92, 0xde, 0x75, 0xda, 0x1c, 0x21, 0xb6, 0xb3, 0xb4, 0xa5, 0x0a, 0x5a, 0xfa, + 0xd8, 0x49, 0x4e, 0x93, 0x8b, 0xc3, 0xc1, 0x31, 0x54, 0x68, 0x60, 0x34, 0xd4, 0x68, 0xb8, 0x23, + 0xe7, 0x27, 0xb5, 0xb0, 0xf7, 0x96, 0xa4, 0x47, 0x63, 0x8b, 0x3e, 0xba, 0xa9, 0x43, 0xfb, 0xa0, + 0xcc, 0x33, 0x46, 0x46, 0xdd, 0xa4, 0x07, 0xe5, 0xee, 0xf2, 0xe4, 0x6c, 0x4d, 0x3b, 0x01, 0xfe, + 0x0c, 0x3f, 0x04, 0x7e, 0xd2, 0x57, 0x19, 0x54, 0x96, 0xb1, 0x9d, 0xec, 0x97, 0xf5, 0xd4, 0x1e, + 0xa6, 0xcd, 0x29, 0x62, 0x67, 0x6f, 0xe7, 0x3a, 0x87, 0xff, 0x2b, 0x80, 0x11, 0xe2, 0x84, 0x3d, + 0xb7, 0xf7, 0x1f, 0x1b, 0x91, 0xac, 0x37, 0x22, 0xf9, 0xda, 0x88, 0xe4, 0x7d, 0x2b, 0x1a, 0xeb, + 0xad, 0x68, 0x7c, 0x6e, 0x45, 0xe3, 0x71, 0x30, 0x73, 0x71, 0xbe, 0xd4, 0x60, 0xa8, 0x90, 0x75, + 0x61, 0x4e, 0x9b, 0xfe, 0x8c, 0x64, 0x41, 0x76, 0x99, 0x63, 0xe0, 0xa5, 0x04, 0x39, 0x18, 0xf6, + 0x79, 0x09, 0xf1, 0xb5, 0xc4, 0xa0, 0x5b, 0xbb, 0x76, 0xae, 0xbe, 0x03, 0x00, 0x00, 0xff, 0xff, + 0x5b, 0x66, 0x0f, 0xf0, 0xb4, 0x01, 0x00, 0x00, } func (m *Fee) Marshal() (dAtA []byte, err error) { @@ -131,6 +192,53 @@ func (m *Fee) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *IdentifiedPacketFee) 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 *IdentifiedPacketFee) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IdentifiedPacketFee) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Fee != nil { + { + size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFee(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.PacketId != nil { + { + size, err := m.PacketId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFee(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintFee(dAtA []byte, offset int, v uint64) int { offset -= sovFee(v) base := offset @@ -155,6 +263,23 @@ func (m *Fee) Size() (n int) { return n } +func (m *IdentifiedPacketFee) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PacketId != nil { + l = m.PacketId.Size() + n += 1 + l + sovFee(uint64(l)) + } + if m.Fee != nil { + l = m.Fee.Size() + n += 1 + l + sovFee(uint64(l)) + } + return n +} + func sovFee(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -247,6 +372,128 @@ func (m *Fee) Unmarshal(dAtA []byte) error { } return nil } +func (m *IdentifiedPacketFee) 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 ErrIntOverflowFee + } + 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: IdentifiedPacketFee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IdentifiedPacketFee: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PacketId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFee + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFee + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFee + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PacketId == nil { + m.PacketId = &types1.PacketId{} + } + if err := m.PacketId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFee + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFee + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFee + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fee == nil { + m.Fee = &Fee{} + } + if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFee(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFee + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipFee(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/modules/apps/29-fee/types/genesis.pb.go b/modules/apps/29-fee/types/genesis.pb.go index 5d3454d0895..416c9b81cc3 100644 --- a/modules/apps/29-fee/types/genesis.pb.go +++ b/modules/apps/29-fee/types/genesis.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - types "github.com/cosmos/ibc-go/modules/core/04-channel/types" + _ "github.com/cosmos/ibc-go/modules/core/04-channel/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" @@ -27,7 +27,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the fee middleware genesis state type GenesisState struct { // A mapping of packets -> escrowed fees - PacketsFeesMap []*GenesisState_PacketsFeesMapEntry `protobuf:"bytes,1,rep,name=packets_fees_map,json=packetsFeesMap,proto3" json:"packets_fees_map,omitempty"` + PacketsFeesMap []*IdentifiedPacketFee `protobuf:"bytes,1,rep,name=packets_fees_map,json=packetsFeesMap,proto3" json:"packets_fees_map,omitempty"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -63,69 +63,15 @@ func (m *GenesisState) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisState proto.InternalMessageInfo -func (m *GenesisState) GetPacketsFeesMap() []*GenesisState_PacketsFeesMapEntry { +func (m *GenesisState) GetPacketsFeesMap() []*IdentifiedPacketFee { if m != nil { return m.PacketsFeesMap } return nil } -// An entry for the PacketsFees map -type GenesisState_PacketsFeesMapEntry struct { - PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty"` - Fee *Fee `protobuf:"bytes,2,opt,name=fee,proto3" json:"fee,omitempty"` -} - -func (m *GenesisState_PacketsFeesMapEntry) Reset() { *m = GenesisState_PacketsFeesMapEntry{} } -func (m *GenesisState_PacketsFeesMapEntry) String() string { return proto.CompactTextString(m) } -func (*GenesisState_PacketsFeesMapEntry) ProtoMessage() {} -func (*GenesisState_PacketsFeesMapEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_6a4f6c8d78b5dfbf, []int{0, 0} -} -func (m *GenesisState_PacketsFeesMapEntry) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState_PacketsFeesMapEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState_PacketsFeesMapEntry.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 *GenesisState_PacketsFeesMapEntry) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState_PacketsFeesMapEntry.Merge(m, src) -} -func (m *GenesisState_PacketsFeesMapEntry) XXX_Size() int { - return m.Size() -} -func (m *GenesisState_PacketsFeesMapEntry) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState_PacketsFeesMapEntry.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState_PacketsFeesMapEntry proto.InternalMessageInfo - -func (m *GenesisState_PacketsFeesMapEntry) GetPacketId() *types.PacketId { - if m != nil { - return m.PacketId - } - return nil -} - -func (m *GenesisState_PacketsFeesMapEntry) GetFee() *Fee { - if m != nil { - return m.Fee - } - return nil -} - func init() { proto.RegisterType((*GenesisState)(nil), "ibc.applications.middleware.fee.v1.GenesisState") - proto.RegisterType((*GenesisState_PacketsFeesMapEntry)(nil), "ibc.applications.middleware.fee.v1.GenesisState.PacketsFeesMapEntry") } func init() { @@ -133,29 +79,25 @@ func init() { } var fileDescriptor_6a4f6c8d78b5dfbf = []byte{ - // 337 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x41, 0x4b, 0xfb, 0x30, - 0x18, 0xc6, 0x97, 0x0d, 0xfe, 0xfc, 0xed, 0x44, 0xa4, 0x7a, 0x18, 0x03, 0xcb, 0xdc, 0xc5, 0x1d, - 0x5c, 0xe2, 0xea, 0x69, 0x1e, 0x45, 0x27, 0x82, 0x82, 0xcc, 0x9b, 0x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0x42, 0x9d, 0x7a, 0x78, 0x50, 0x16, 0xb0, 0xfb, 0xe0, 0xaf, 0x25, 0xa6, 0xbd, 0xd5, 0x90, - 0xeb, 0x78, 0xf8, 0x5f, 0xad, 0x94, 0xdf, 0xf7, 0x6a, 0x09, 0x40, 0xa3, 0x5a, 0xba, 0x8e, 0x36, - 0xa9, 0x3d, 0x00, 0x18, 0x5a, 0xcf, 0xf9, 0xcd, 0xdb, 0x22, 0x40, 0xf3, 0x45, 0x80, 0x3e, 0x16, - 0x01, 0x7a, 0x5d, 0x06, 0x95, 0xf9, 0x32, 0xa8, 0xbc, 0x2f, 0x83, 0xca, 0x43, 0x98, 0x72, 0x33, - 0x9e, 0x44, 0x98, 0xc9, 0x9c, 0x30, 0xa9, 0x73, 0xa9, 0x09, 0x8f, 0x58, 0x37, 0x95, 0x24, 0x97, - 0xf1, 0x24, 0x03, 0x6d, 0xef, 0xa2, 0x49, 0xd8, 0xef, 0xda, 0x3b, 0x98, 0x99, 0x02, 0x1d, 0xfd, - 0x2b, 0x1f, 0xf9, 0xf4, 0x33, 0x00, 0x00, 0xff, 0xff, 0x88, 0x29, 0xef, 0x17, 0x23, 0x02, 0x00, - 0x00, + // 276 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x8f, 0x31, 0x4b, 0x03, 0x41, + 0x14, 0x84, 0x73, 0x08, 0x16, 0x51, 0x44, 0x82, 0x85, 0xa4, 0x58, 0x34, 0x95, 0x85, 0xd9, 0x35, + 0xb1, 0x10, 0x5b, 0x8b, 0x88, 0xa0, 0x20, 0xda, 0xd9, 0x84, 0xbd, 0xbd, 0xb9, 0xcb, 0xe2, 0xdd, + 0xbd, 0xf5, 0xde, 0x26, 0xe2, 0xbf, 0xf0, 0x67, 0x59, 0xa6, 0xb4, 0x94, 0xbb, 0x3f, 0x22, 0x7b, + 0x17, 0xd0, 0x4e, 0xbb, 0x81, 0xf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, 0x71, 0x98, 0xea, 0xdf, + 0x1c, 0x38, 0xde, 0x6e, 0x77, 0x9c, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x04, 0xcb, 0x23, 0xd5, + 0x86, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -195,53 +137,6 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *GenesisState_PacketsFeesMapEntry) 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 *GenesisState_PacketsFeesMapEntry) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState_PacketsFeesMapEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Fee != nil { - { - size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.PacketId != nil { - { - size, err := m.PacketId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { offset -= sovGenesis(v) base := offset @@ -268,23 +163,6 @@ func (m *GenesisState) Size() (n int) { return n } -func (m *GenesisState_PacketsFeesMapEntry) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PacketId != nil { - l = m.PacketId.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - if m.Fee != nil { - l = m.Fee.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - return n -} - func sovGenesis(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -349,7 +227,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PacketsFeesMap = append(m.PacketsFeesMap, &GenesisState_PacketsFeesMapEntry{}) + m.PacketsFeesMap = append(m.PacketsFeesMap, &IdentifiedPacketFee{}) if err := m.PacketsFeesMap[len(m.PacketsFeesMap)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -375,128 +253,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } return nil } -func (m *GenesisState_PacketsFeesMapEntry) 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 ErrIntOverflowGenesis - } - 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: PacketsFeesMapEntry: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PacketsFeesMapEntry: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PacketId", 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 - } - if m.PacketId == nil { - m.PacketId = &types.PacketId{} - } - if err := m.PacketId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", 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 - } - if m.Fee == nil { - m.Fee = &Fee{} - } - if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipGenesis(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/modules/apps/29-fee/types/query.pb.go b/modules/apps/29-fee/types/query.pb.go index 7d875ae9619..df4cedb4274 100644 --- a/modules/apps/29-fee/types/query.pb.go +++ b/modules/apps/29-fee/types/query.pb.go @@ -7,6 +7,7 @@ import ( context "context" fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/query" + types "github.com/cosmos/ibc-go/modules/core/04-channel/types" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" @@ -32,12 +33,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // QueryReceiveRequestFee is the request type for quering the receive fee type QueryReceiveFeeRequest struct { - // Source Port ID - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - // Source Channel ID - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - // Packet sequence - Sequence string `protobuf:"bytes,3,opt,name=sequence,proto3" json:"sequence,omitempty" yaml:"sequence"` + // PacketID + PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"relayer_address"` // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). RelayerAddress string `protobuf:"bytes,4,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` } @@ -75,25 +72,11 @@ func (m *QueryReceiveFeeRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryReceiveFeeRequest proto.InternalMessageInfo -func (m *QueryReceiveFeeRequest) GetPortId() string { +func (m *QueryReceiveFeeRequest) GetPacketId() *types.PacketId { if m != nil { - return m.PortId + return m.PacketId } - return "" -} - -func (m *QueryReceiveFeeRequest) GetChannelId() string { - if m != nil { - return m.ChannelId - } - return "" -} - -func (m *QueryReceiveFeeRequest) GetSequence() string { - if m != nil { - return m.Sequence - } - return "" + return nil } func (m *QueryReceiveFeeRequest) GetRelayerAddress() string { @@ -103,7 +86,7 @@ func (m *QueryReceiveFeeRequest) GetRelayerAddress() string { return "" } -// QueryRequestFeeResponse is the response type for the ReceiveFee RPC +// QueryReceiveFeeResponse is the response type for the ReceiveFee RPC type QueryReceiveFeeResponse struct { Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty" yaml:"fee"` } @@ -148,14 +131,10 @@ func (m *QueryReceiveFeeResponse) GetFee() *Fee { return nil } -// QueryAckRequestFee is the request type for quering the acknowledgement fee +// QueryAckFeeRequest is the request type for querying the acknowledgement fee type QueryAckFeeRequest struct { - // Source Port ID - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - // Source Channel ID - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - // Packet sequence - Sequence string `protobuf:"bytes,3,opt,name=sequence,proto3" json:"sequence,omitempty" yaml:"sequence"` + // PacketID + PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"relayer_address"` // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). RelayerAddress string `protobuf:"bytes,4,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` } @@ -193,25 +172,11 @@ func (m *QueryAckFeeRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAckFeeRequest proto.InternalMessageInfo -func (m *QueryAckFeeRequest) GetPortId() string { +func (m *QueryAckFeeRequest) GetPacketId() *types.PacketId { if m != nil { - return m.PortId + return m.PacketId } - return "" -} - -func (m *QueryAckFeeRequest) GetChannelId() string { - if m != nil { - return m.ChannelId - } - return "" -} - -func (m *QueryAckFeeRequest) GetSequence() string { - if m != nil { - return m.Sequence - } - return "" + return nil } func (m *QueryAckFeeRequest) GetRelayerAddress() string { @@ -266,14 +231,10 @@ func (m *QueryAckFeeResponse) GetFee() *Fee { return nil } -// QueryTimeoutFee is the request type for quering the timeout fee +// QueryTimeoutFeeRequest is the request type for querying the timeout fee type QueryTimeoutFeeRequest struct { - // Source Port ID - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - // Source Channel ID - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - // Packet sequence - Sequence string `protobuf:"bytes,3,opt,name=sequence,proto3" json:"sequence,omitempty" yaml:"sequence"` + // PacketID + PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"relayer_address"` // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). RelayerAddress string `protobuf:"bytes,4,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` } @@ -311,25 +272,11 @@ func (m *QueryTimeoutFeeRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryTimeoutFeeRequest proto.InternalMessageInfo -func (m *QueryTimeoutFeeRequest) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -func (m *QueryTimeoutFeeRequest) GetChannelId() string { +func (m *QueryTimeoutFeeRequest) GetPacketId() *types.PacketId { if m != nil { - return m.ChannelId + return m.PacketId } - return "" -} - -func (m *QueryTimeoutFeeRequest) GetSequence() string { - if m != nil { - return m.Sequence - } - return "" + return nil } func (m *QueryTimeoutFeeRequest) GetRelayerAddress() string { @@ -398,43 +345,42 @@ func init() { } var fileDescriptor_9cafe0e1bd8b928c = []byte{ - // 575 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x55, 0x41, 0x6f, 0xd3, 0x30, - 0x14, 0x5e, 0xb6, 0x51, 0x98, 0x91, 0x3a, 0xe1, 0xc1, 0xa8, 0x2a, 0x94, 0xa2, 0x20, 0x34, 0x60, - 0x2c, 0x56, 0x0b, 0x02, 0x31, 0x4e, 0x2b, 0xd2, 0xa4, 0x4a, 0x5c, 0x88, 0x38, 0x71, 0x29, 0x8e, - 0xf3, 0x9a, 0x59, 0x4b, 0xe2, 0x2c, 0x4e, 0x8b, 0x7a, 0xe5, 0x17, 0x20, 0xf1, 0x0f, 0x38, 0xf0, - 0x13, 0xf8, 0x0d, 0x1c, 0x27, 0x71, 0xe1, 0x54, 0xa1, 0x96, 0x2b, 0x07, 0xfa, 0x0b, 0x90, 0xed, - 0xb0, 0x6e, 0x74, 0x82, 0x16, 0xed, 0xb6, 0x5b, 0xe2, 0xf7, 0x7d, 0xef, 0x7d, 0xef, 0xf3, 0xb3, - 0x8d, 0x5c, 0xee, 0x33, 0x42, 0xd3, 0x34, 0xe2, 0x8c, 0xe6, 0x5c, 0x24, 0x92, 0xc4, 0x3c, 0x08, - 0x22, 0x78, 0x43, 0x33, 0x20, 0x1d, 0x00, 0xd2, 0xab, 0x93, 0x83, 0x2e, 0x64, 0x7d, 0x37, 0xcd, - 0x44, 0x2e, 0xb0, 0xc3, 0x7d, 0xe6, 0x1e, 0xc7, 0xbb, 0x13, 0xbc, 0xdb, 0x01, 0x70, 0x7b, 0xf5, - 0xea, 0xd5, 0x50, 0x84, 0x42, 0xc3, 0x89, 0xfa, 0x32, 0xcc, 0xea, 0x3d, 0x26, 0x64, 0x2c, 0x24, - 0xf1, 0xa9, 0x04, 0x93, 0x92, 0xf4, 0xea, 0x3e, 0xe4, 0xb4, 0x4e, 0x52, 0x1a, 0xf2, 0x44, 0xa7, - 0x2b, 0xb0, 0xf7, 0x67, 0x50, 0xa5, 0x8a, 0x19, 0xf4, 0x8d, 0x50, 0x88, 0x30, 0x02, 0x42, 0x53, - 0x4e, 0x68, 0x92, 0x88, 0xbc, 0x50, 0xa6, 0xa3, 0xce, 0x4f, 0x0b, 0xad, 0xbf, 0x50, 0xe5, 0x3c, - 0x60, 0xc0, 0x7b, 0xb0, 0x0b, 0xe0, 0xc1, 0x41, 0x17, 0x64, 0x8e, 0x37, 0xd1, 0xc5, 0x54, 0x64, - 0x79, 0x9b, 0x07, 0x15, 0xeb, 0xa6, 0x75, 0x67, 0xa5, 0x89, 0xc7, 0x83, 0x5a, 0xb9, 0x4f, 0xe3, - 0x68, 0xdb, 0x29, 0x02, 0x8e, 0x57, 0x52, 0x5f, 0xad, 0x00, 0x3f, 0x44, 0x88, 0xed, 0xd1, 0x24, - 0x81, 0x48, 0xe1, 0x17, 0x35, 0xfe, 0xda, 0x78, 0x50, 0xbb, 0x62, 0xf0, 0x93, 0x98, 0xe3, 0xad, - 0x14, 0x3f, 0xad, 0x00, 0x13, 0x74, 0x49, 0xaa, 0x6a, 0x09, 0x83, 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 0xcd, 0x2b, 0xc4, 0x6e, 0x6a, 0xb1, 0xb7, 0xf1, 0xad, 0xbf, 0x89, 0xa5, 0x6c, 0x5f, 0x0b, 0x55, - 0x0e, 0x4f, 0x76, 0x73, 0x0e, 0x87, 0xa7, 0xa6, 0x7e, 0x0e, 0x87, 0xa7, 0xc7, 0x67, 0x36, 0x87, - 0x73, 0xc3, 0x53, 0xc2, 0x9b, 0xcf, 0x3f, 0x0f, 0x6d, 0xeb, 0x70, 0x68, 0x5b, 0xdf, 0x86, 0xb6, - 0xf5, 0x6e, 0x64, 0x2f, 0x1c, 0x8e, 0xec, 0x85, 0xaf, 0x23, 0x7b, 0xe1, 0x55, 0x23, 0xe4, 0xf9, - 0x5e, 0xd7, 0x77, 0x99, 0x88, 0x49, 0xf1, 0x8e, 0x71, 0x9f, 0x6d, 0x85, 0x82, 0xc4, 0x22, 0xe8, - 0x46, 0x20, 0x4d, 0xfa, 0xc6, 0x93, 0x2d, 0x95, 0x36, 0xef, 0xa7, 0x20, 0xfd, 0x92, 0x7e, 0x7f, - 0x1e, 0xfc, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x11, 0x5e, 0x6f, 0x70, 0x63, 0x07, 0x00, 0x00, + // 552 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x55, 0xcf, 0x6a, 0x13, 0x41, + 0x1c, 0xce, 0x6a, 0x2d, 0x76, 0x84, 0x0a, 0xa3, 0xd4, 0x12, 0x74, 0x5b, 0x57, 0xa4, 0xf5, 0x4f, + 0x67, 0x48, 0x04, 0xc5, 0x7a, 0x6a, 0x84, 0x42, 0xc1, 0x83, 0x06, 0xf1, 0xe0, 0x25, 0xce, 0xce, + 0xfe, 0xb2, 0x1d, 0xb2, 0xbb, 0xb3, 0xdd, 0x99, 0x44, 0x72, 0xf5, 0x09, 0x04, 0xdf, 0xc0, 0x83, + 0x77, 0x0f, 0xfa, 0x0c, 0x1e, 0x0b, 0x5e, 0x3c, 0x15, 0x49, 0x7c, 0x82, 0x3e, 0x81, 0xcc, 0xce, + 0x68, 0x5a, 0x53, 0x6a, 0x52, 0x7a, 0xe9, 0x6d, 0x98, 0xf9, 0xbe, 0xef, 0xf7, 0xed, 0x37, 0xbf, + 0xf9, 0x2d, 0x22, 0x22, 0xe4, 0x94, 0xe5, 0x79, 0x22, 0x38, 0xd3, 0x42, 0x66, 0x8a, 0xa6, 0x22, + 0x8a, 0x12, 0x78, 0xcb, 0x0a, 0xa0, 0x6d, 0x00, 0xda, 0xab, 0xd1, 0x9d, 0x2e, 0x14, 0x7d, 0x92, + 0x17, 0x52, 0x4b, 0x1c, 0x88, 0x90, 0x93, 0x83, 0x78, 0x32, 0xc2, 0x93, 0x36, 0x00, 0xe9, 0xd5, + 0xaa, 0x57, 0x63, 0x19, 0xcb, 0x12, 0x4e, 0xcd, 0xca, 0x32, 0xab, 0x77, 0xb9, 0x54, 0xa9, 0x54, + 0x34, 0x64, 0x0a, 0xac, 0x24, 0xed, 0xd5, 0x42, 0xd0, 0xac, 0x46, 0x73, 0x16, 0x8b, 0xac, 0x94, + 0x73, 0xd8, 0xfb, 0x13, 0xb8, 0x32, 0xc5, 0x2c, 0xfa, 0x7a, 0x2c, 0x65, 0x9c, 0x00, 0x65, 0xb9, + 0xa0, 0x2c, 0xcb, 0xa4, 0x76, 0xce, 0xec, 0xe9, 0x4d, 0xa3, 0xc5, 0x65, 0x01, 0x94, 0x6f, 0xb3, + 0x2c, 0x83, 0xc4, 0x90, 0xdd, 0xd2, 0x42, 0x82, 0x2f, 0x1e, 0x5a, 0x78, 0x61, 0x1c, 0x35, 0x81, + 0x83, 0xe8, 0xc1, 0x26, 0x40, 0x13, 0x76, 0xba, 0xa0, 0x34, 0x7e, 0x85, 0xe6, 0x72, 0xc6, 0x3b, + 0xa0, 0x5b, 0x22, 0x5a, 0xf4, 0x96, 0xbd, 0xd5, 0x4b, 0xf5, 0x1b, 0x26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x70, 0xe2, 0xc2, 0x87, 0x9e, 0x48, 0xf5, 0xd1, 0xd4, 0x3c, 0x67, 0xf6, 0x5e, 0x69, 0xf6, + 0x36, 0xbe, 0x75, 0x9c, 0x59, 0xc6, 0x3b, 0xa5, 0x51, 0x93, 0xf0, 0xe8, 0x36, 0xa7, 0x48, 0x78, + 0xac, 0x73, 0xa7, 0x48, 0x78, 0xbc, 0x7d, 0x26, 0x4b, 0x58, 0x5b, 0x9e, 0x31, 0xde, 0x78, 0xf6, + 0x6d, 0xe0, 0x7b, 0xbb, 0x03, 0xdf, 0xfb, 0x39, 0xf0, 0xbd, 0xf7, 0x43, 0xbf, 0xb2, 0x3b, 0xf4, + 0x2b, 0x3f, 0x86, 0x7e, 0xe5, 0x75, 0x3d, 0x16, 0x7a, 0xbb, 0x1b, 0x12, 0x2e, 0x53, 0xea, 0x7e, + 0x1b, 0x22, 0xe4, 0x6b, 0xb1, 0xa4, 0xa9, 0x8c, 0xba, 0x09, 0x28, 0x2b, 0x5f, 0x7f, 0xbc, 0x66, + 0x64, 0x75, 0x3f, 0x07, 0x15, 0xce, 0x96, 0xb3, 0xfc, 0xc1, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x03, 0x73, 0xbc, 0x1c, 0xd2, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -622,24 +568,15 @@ func (m *QueryReceiveFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x22 } - if len(m.Sequence) > 0 { - i -= len(m.Sequence) - copy(dAtA[i:], m.Sequence) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Sequence))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChannelId) > 0 { - i -= len(m.ChannelId) - copy(dAtA[i:], m.ChannelId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) - i-- - dAtA[i] = 0x12 - } - if len(m.PortId) > 0 { - i -= len(m.PortId) - copy(dAtA[i:], m.PortId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) + if m.PacketId != nil { + { + size, err := m.PacketId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0xa } @@ -708,24 +645,15 @@ func (m *QueryAckFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - if len(m.Sequence) > 0 { - i -= len(m.Sequence) - copy(dAtA[i:], m.Sequence) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Sequence))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChannelId) > 0 { - i -= len(m.ChannelId) - copy(dAtA[i:], m.ChannelId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) - i-- - dAtA[i] = 0x12 - } - if len(m.PortId) > 0 { - i -= len(m.PortId) - copy(dAtA[i:], m.PortId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) + if m.PacketId != nil { + { + size, err := m.PacketId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0xa } @@ -794,24 +722,15 @@ func (m *QueryTimeoutFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x22 } - if len(m.Sequence) > 0 { - i -= len(m.Sequence) - copy(dAtA[i:], m.Sequence) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Sequence))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChannelId) > 0 { - i -= len(m.ChannelId) - copy(dAtA[i:], m.ChannelId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) - i-- - dAtA[i] = 0x12 - } - if len(m.PortId) > 0 { - i -= len(m.PortId) - copy(dAtA[i:], m.PortId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) + if m.PacketId != nil { + { + size, err := m.PacketId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0xa } @@ -870,16 +789,8 @@ func (m *QueryReceiveFeeRequest) Size() (n int) { } var l int _ = l - l = len(m.PortId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.ChannelId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Sequence) - if l > 0 { + if m.PacketId != nil { + l = m.PacketId.Size() n += 1 + l + sovQuery(uint64(l)) } l = len(m.RelayerAddress) @@ -908,16 +819,8 @@ func (m *QueryAckFeeRequest) Size() (n int) { } var l int _ = l - l = len(m.PortId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.ChannelId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Sequence) - if l > 0 { + if m.PacketId != nil { + l = m.PacketId.Size() n += 1 + l + sovQuery(uint64(l)) } l = len(m.RelayerAddress) @@ -946,16 +849,8 @@ func (m *QueryTimeoutFeeRequest) Size() (n int) { } var l int _ = l - l = len(m.PortId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.ChannelId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Sequence) - if l > 0 { + if m.PacketId != nil { + l = m.PacketId.Size() n += 1 + l + sovQuery(uint64(l)) } l = len(m.RelayerAddress) @@ -1015,41 +910,9 @@ func (m *QueryReceiveFeeRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PacketId", wireType) } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) - } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1059,55 +922,27 @@ func (m *QueryReceiveFeeRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery + if m.PacketId == nil { + m.PacketId = &types.PacketId{} } - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.PacketId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Sequence = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { @@ -1279,41 +1114,9 @@ func (m *QueryAckFeeRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PacketId", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1323,55 +1126,27 @@ func (m *QueryAckFeeRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + if m.PacketId == nil { + m.PacketId = &types.PacketId{} } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.PacketId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Sequence = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { @@ -1543,41 +1318,9 @@ func (m *QueryTimeoutFeeRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PacketId", wireType) } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) - } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1587,55 +1330,27 @@ func (m *QueryTimeoutFeeRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery + if m.PacketId == nil { + m.PacketId = &types.PacketId{} } - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.PacketId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Sequence = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { diff --git a/modules/apps/29-fee/types/tx.pb.go b/modules/apps/29-fee/types/tx.pb.go index 19b66bd4e5b..6d9c9322477 100644 --- a/modules/apps/29-fee/types/tx.pb.go +++ b/modules/apps/29-fee/types/tx.pb.go @@ -29,24 +29,24 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// MsgRegisterCounterPartyAddress is the request type for registering the counter party address -type MsgRegisterCounterPartyAddress struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` - CounterpartyAddress string `protobuf:"bytes,2,opt,name=counterparty_address,json=counterpartyAddress,proto3" json:"counterparty_address,omitempty" yaml:"address"` +// MsgRegisterCounterpartyAddress is the request type for registering the counter party address +type MsgRegisterCounterpartyAddress struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + CounterpartyAddress string `protobuf:"bytes,2,opt,name=counterparty_address,json=counterpartyAddress,proto3" json:"counterparty_address,omitempty" yaml:"counterparty_address"` } -func (m *MsgRegisterCounterPartyAddress) Reset() { *m = MsgRegisterCounterPartyAddress{} } -func (m *MsgRegisterCounterPartyAddress) String() string { return proto.CompactTextString(m) } -func (*MsgRegisterCounterPartyAddress) ProtoMessage() {} -func (*MsgRegisterCounterPartyAddress) Descriptor() ([]byte, []int) { +func (m *MsgRegisterCounterpartyAddress) Reset() { *m = MsgRegisterCounterpartyAddress{} } +func (m *MsgRegisterCounterpartyAddress) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterCounterpartyAddress) ProtoMessage() {} +func (*MsgRegisterCounterpartyAddress) Descriptor() ([]byte, []int) { return fileDescriptor_faf7cf2f6149e2c8, []int{0} } -func (m *MsgRegisterCounterPartyAddress) XXX_Unmarshal(b []byte) error { +func (m *MsgRegisterCounterpartyAddress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgRegisterCounterPartyAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgRegisterCounterpartyAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgRegisterCounterPartyAddress.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgRegisterCounterpartyAddress.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -56,17 +56,17 @@ func (m *MsgRegisterCounterPartyAddress) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } -func (m *MsgRegisterCounterPartyAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRegisterCounterPartyAddress.Merge(m, src) +func (m *MsgRegisterCounterpartyAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterCounterpartyAddress.Merge(m, src) } -func (m *MsgRegisterCounterPartyAddress) XXX_Size() int { +func (m *MsgRegisterCounterpartyAddress) XXX_Size() int { return m.Size() } -func (m *MsgRegisterCounterPartyAddress) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRegisterCounterPartyAddress.DiscardUnknown(m) +func (m *MsgRegisterCounterpartyAddress) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterCounterpartyAddress.DiscardUnknown(m) } -var xxx_messageInfo_MsgRegisterCounterPartyAddress proto.InternalMessageInfo +var xxx_messageInfo_MsgRegisterCounterpartyAddress proto.InternalMessageInfo // MsgRegisterCounterPartyAddressResponse defines the Msg/RegisterCounteryPartyAddress response type type MsgRegisterCounterPartyAddressResponse struct { @@ -222,7 +222,7 @@ func (m *MsgEscrowPacketFeeResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgEscrowPacketFeeResponse proto.InternalMessageInfo func init() { - proto.RegisterType((*MsgRegisterCounterPartyAddress)(nil), "ibc.applications.middleware.fee.v1.MsgRegisterCounterPartyAddress") + proto.RegisterType((*MsgRegisterCounterpartyAddress)(nil), "ibc.applications.middleware.fee.v1.MsgRegisterCounterpartyAddress") proto.RegisterType((*MsgRegisterCounterPartyAddressResponse)(nil), "ibc.applications.middleware.fee.v1.MsgRegisterCounterPartyAddressResponse") proto.RegisterType((*MsgEscrowPacketFee)(nil), "ibc.applications.middleware.fee.v1.MsgEscrowPacketFee") proto.RegisterType((*MsgEscrowPacketFeeResponse)(nil), "ibc.applications.middleware.fee.v1.MsgEscrowPacketFeeResponse") @@ -233,42 +233,42 @@ func init() { } var fileDescriptor_faf7cf2f6149e2c8 = []byte{ - // 555 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x4f, 0x6b, 0x13, 0x41, - 0x18, 0xc6, 0xb3, 0x8d, 0xf6, 0xcf, 0x04, 0xac, 0x6c, 0x8b, 0x94, 0xa8, 0xbb, 0x75, 0x0e, 0x1a, - 0xb0, 0xdd, 0x21, 0x11, 0x04, 0x7b, 0x10, 0x5c, 0x69, 0x41, 0x31, 0x10, 0x16, 0x4f, 0x5e, 0xd2, - 0xcd, 0xec, 0x9b, 0xed, 0x90, 0xdd, 0xcc, 0x32, 0x33, 0x49, 0xcd, 0x37, 0xd0, 0x9b, 0xdf, 0xc0, + // 559 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x4f, 0x6b, 0x13, 0x41, + 0x18, 0xc6, 0xb3, 0x8d, 0xf6, 0xcf, 0x04, 0xac, 0x6c, 0x8b, 0x84, 0x54, 0x77, 0xeb, 0x1c, 0x34, + 0xa0, 0xdd, 0x21, 0x11, 0x04, 0x7b, 0x10, 0x5c, 0xb1, 0xa0, 0x18, 0x08, 0x8b, 0x27, 0x2f, 0xe9, + 0x66, 0xf6, 0xcd, 0x76, 0xc8, 0x6e, 0x66, 0x99, 0x99, 0xa4, 0xe6, 0x1b, 0xe8, 0xcd, 0xa3, 0xc7, 0x7e, 0x01, 0x0f, 0x7e, 0x04, 0x6f, 0x1e, 0x7b, 0xf4, 0x14, 0x24, 0xb9, 0x78, 0xce, 0x27, 0x90, - 0xd9, 0x3f, 0x35, 0x54, 0x8c, 0xb1, 0xde, 0x66, 0x78, 0x9f, 0xe7, 0x37, 0xcf, 0x3b, 0xef, 0x30, - 0xe8, 0x21, 0xeb, 0x50, 0xe2, 0x27, 0x49, 0xc4, 0xa8, 0xaf, 0x18, 0xef, 0x4b, 0x12, 0xb3, 0x20, - 0x88, 0xe0, 0xd4, 0x17, 0x40, 0xba, 0x00, 0x64, 0x58, 0x27, 0xea, 0xad, 0x93, 0x08, 0xae, 0xb8, - 0x89, 0x59, 0x87, 0x3a, 0xf3, 0x62, 0xe7, 0x97, 0xd8, 0xe9, 0x02, 0x38, 0xc3, 0x7a, 0x75, 0x3b, - 0xe4, 0x21, 0x4f, 0xe5, 0x44, 0xaf, 0x32, 0x67, 0x75, 0x6f, 0x89, 0x63, 0x34, 0x20, 0x53, 0xdf, - 0xd3, 0x6a, 0xca, 0x05, 0x10, 0x7a, 0xe2, 0xf7, 0xfb, 0x10, 0xe9, 0x72, 0xbe, 0xcc, 0x24, 0xf8, - 0xa3, 0x81, 0xac, 0xa6, 0x0c, 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x5f, + 0x96, 0xff, 0x68, 0xfd, 0xfb, 0x1a, 0x2a, 0x36, 0x64, 0x68, 0x7e, 0x35, 0xd0, 0xde, 0x35, 0x1d, + 0x60, 0xba, 0xcb, 0xdc, 0xe1, 0xfa, 0xfe, 0xae, 0xbc, 0x59, 0x8d, 0x71, 0x55, 0x27, 0x9a, 0x9f, + 0x0c, 0xb4, 0x7d, 0xb9, 0x0d, 0x9f, 0x2e, 0xc9, 0xbf, 0xe4, 0xab, 0x3c, 0x5f, 0xcd, 0x97, 0x67, + 0x71, 0xdf, 0xfe, 0x18, 0x5b, 0xc6, 0xf9, 0xd8, 0x32, 0x7e, 0x8d, 0x2d, 0xe3, 0xf3, 0xc4, 0x2a, + 0x9c, 0x4f, 0xac, 0xc2, 0xcf, 0x89, 0x55, 0x78, 0x5f, 0x0f, 0x99, 0x3a, 0xe9, 0xb7, 0x1d, 0xca, + 0x63, 0x42, 0xb9, 0x8c, 0xb9, 0x24, 0xac, 0x4d, 0x0f, 0x42, 0x4e, 0x62, 0x1e, 0xf4, 0x23, 0x90, + 0x7a, 0xc4, 0x48, 0x52, 0x7f, 0x76, 0xa0, 0x47, 0x8a, 0x1a, 0x26, 0x20, 0xdb, 0xeb, 0xe9, 0xbc, + 0x78, 0xf2, 0x27, 0x00, 0x00, 0xff, 0xff, 0xe8, 0x00, 0x7a, 0x5b, 0xe9, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -283,12 +283,12 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { - // RegisterCounterPartyAddress defines a rpc handler method for MsgRegisterCounterPartyAddress + // RegisterCounterpartyAddress defines a rpc handler method for MsgRegisterCounterpartyAddress // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their // counterparty address before relaying This ensures they will be properly compensated for forward relaying since // destination chain must send back relayer's source address (counterparty address) in acknowledgement This function // may be called more than once by a relayer, in which case, latest counterparty address is always used. - RegisterCounterPartyAddress(ctx context.Context, in *MsgRegisterCounterPartyAddress, opts ...grpc.CallOption) (*MsgRegisterCounterPartyAddressResponse, error) + RegisterCounterPartyAddress(ctx context.Context, in *MsgRegisterCounterpartyAddress, opts ...grpc.CallOption) (*MsgRegisterCounterPartyAddressResponse, error) // EscrowPacketFee defines a rpc handler method for MsgEscrowPacketFee // EscrowPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to // incentivize the relaying of the given packet. @@ -303,7 +303,7 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { return &msgClient{cc} } -func (c *msgClient) RegisterCounterPartyAddress(ctx context.Context, in *MsgRegisterCounterPartyAddress, opts ...grpc.CallOption) (*MsgRegisterCounterPartyAddressResponse, error) { +func (c *msgClient) RegisterCounterPartyAddress(ctx context.Context, in *MsgRegisterCounterpartyAddress, opts ...grpc.CallOption) (*MsgRegisterCounterPartyAddressResponse, error) { out := new(MsgRegisterCounterPartyAddressResponse) err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Msg/RegisterCounterPartyAddress", in, out, opts...) if err != nil { @@ -323,12 +323,12 @@ func (c *msgClient) EscrowPacketFee(ctx context.Context, in *MsgEscrowPacketFee, // MsgServer is the server API for Msg service. type MsgServer interface { - // RegisterCounterPartyAddress defines a rpc handler method for MsgRegisterCounterPartyAddress + // RegisterCounterpartyAddress defines a rpc handler method for MsgRegisterCounterpartyAddress // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their // counterparty address before relaying This ensures they will be properly compensated for forward relaying since // destination chain must send back relayer's source address (counterparty address) in acknowledgement This function // may be called more than once by a relayer, in which case, latest counterparty address is always used. - RegisterCounterPartyAddress(context.Context, *MsgRegisterCounterPartyAddress) (*MsgRegisterCounterPartyAddressResponse, error) + RegisterCounterPartyAddress(context.Context, *MsgRegisterCounterpartyAddress) (*MsgRegisterCounterPartyAddressResponse, error) // EscrowPacketFee defines a rpc handler method for MsgEscrowPacketFee // EscrowPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to // incentivize the relaying of the given packet. @@ -339,7 +339,7 @@ type MsgServer interface { type UnimplementedMsgServer struct { } -func (*UnimplementedMsgServer) RegisterCounterPartyAddress(ctx context.Context, req *MsgRegisterCounterPartyAddress) (*MsgRegisterCounterPartyAddressResponse, error) { +func (*UnimplementedMsgServer) RegisterCounterPartyAddress(ctx context.Context, req *MsgRegisterCounterpartyAddress) (*MsgRegisterCounterPartyAddressResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterCounterPartyAddress not implemented") } func (*UnimplementedMsgServer) EscrowPacketFee(ctx context.Context, req *MsgEscrowPacketFee) (*MsgEscrowPacketFeeResponse, error) { @@ -351,7 +351,7 @@ func RegisterMsgServer(s grpc1.Server, srv MsgServer) { } func _Msg_RegisterCounterPartyAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRegisterCounterPartyAddress) + in := new(MsgRegisterCounterpartyAddress) if err := dec(in); err != nil { return nil, err } @@ -363,7 +363,7 @@ func _Msg_RegisterCounterPartyAddress_Handler(srv interface{}, ctx context.Conte FullMethod: "/ibc.applications.middleware.fee.v1.Msg/RegisterCounterPartyAddress", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RegisterCounterPartyAddress(ctx, req.(*MsgRegisterCounterPartyAddress)) + return srv.(MsgServer).RegisterCounterPartyAddress(ctx, req.(*MsgRegisterCounterpartyAddress)) } return interceptor(ctx, in, info, handler) } @@ -403,7 +403,7 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Metadata: "ibc/applications/middleware/fee/v1/tx.proto", } -func (m *MsgRegisterCounterPartyAddress) Marshal() (dAtA []byte, err error) { +func (m *MsgRegisterCounterpartyAddress) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -413,12 +413,12 @@ func (m *MsgRegisterCounterPartyAddress) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgRegisterCounterPartyAddress) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgRegisterCounterpartyAddress) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgRegisterCounterPartyAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgRegisterCounterpartyAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -577,7 +577,7 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *MsgRegisterCounterPartyAddress) Size() (n int) { +func (m *MsgRegisterCounterpartyAddress) Size() (n int) { if m == nil { return 0 } @@ -649,7 +649,7 @@ func sovTx(x uint64) (n int) { func sozTx(x uint64) (n int) { return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *MsgRegisterCounterPartyAddress) Unmarshal(dAtA []byte) error { +func (m *MsgRegisterCounterpartyAddress) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -672,10 +672,10 @@ func (m *MsgRegisterCounterPartyAddress) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgRegisterCounterPartyAddress: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRegisterCounterpartyAddress: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterCounterPartyAddress: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRegisterCounterpartyAddress: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/modules/core/04-channel/types/channel.pb.go b/modules/core/04-channel/types/channel.pb.go index 0b20d7272b9..2d68308fb85 100644 --- a/modules/core/04-channel/types/channel.pb.go +++ b/modules/core/04-channel/types/channel.pb.go @@ -355,7 +355,7 @@ type PacketId struct { PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` // channel unique identifier ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - // packet sequence. + // packet sequence Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` } diff --git a/proto/ibc/applications/middleware/fee/v1/fee.proto b/proto/ibc/applications/middleware/fee/v1/fee.proto index caa1e02efa4..2749ed5dfa5 100644 --- a/proto/ibc/applications/middleware/fee/v1/fee.proto +++ b/proto/ibc/applications/middleware/fee/v1/fee.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package ibc.applications.middleware.fee.v1; import "cosmos/base/v1beta1/coin.proto"; +import "ibc/core/channel/v1/channel.proto"; option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; // Fee interface @@ -10,3 +11,9 @@ option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; message Fee { cosmos.base.v1beta1.Coin amount = 1; } + +// Fee associated with a packet_id +message IdentifiedPacketFee { + ibc.core.channel.v1.PacketId packet_id = 1; + ibc.applications.middleware.fee.v1.Fee fee = 2; +} diff --git a/proto/ibc/applications/middleware/fee/v1/genesis.proto b/proto/ibc/applications/middleware/fee/v1/genesis.proto index 588480c1d19..5028a67a4e6 100644 --- a/proto/ibc/applications/middleware/fee/v1/genesis.proto +++ b/proto/ibc/applications/middleware/fee/v1/genesis.proto @@ -9,11 +9,6 @@ option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; // GenesisState defines the fee middleware genesis state message GenesisState { - // An entry for the PacketsFees map - message PacketsFeesMapEntry { - ibc.core.channel.v1.PacketId packet_id = 1; - ibc.applications.middleware.fee.v1.Fee fee = 2; - } // A mapping of packets -> escrowed fees - repeated PacketsFeesMapEntry packets_fees_map = 1; + repeated ibc.applications.middleware.fee.v1.IdentifiedPacketFee packets_fees_map = 1; } diff --git a/proto/ibc/applications/middleware/fee/v1/genesis.proto~ b/proto/ibc/applications/middleware/fee/v1/genesis.proto~ new file mode 100644 index 00000000000..588480c1d19 --- /dev/null +++ b/proto/ibc/applications/middleware/fee/v1/genesis.proto~ @@ -0,0 +1,19 @@ +syntax = "proto3"; + +package ibc.applications.middleware.fee.v1; + +import "gogoproto/gogo.proto"; +import "ibc/applications/middleware/fee/v1/fee.proto"; +import "ibc/core/channel/v1/channel.proto"; +option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; + +// GenesisState defines the fee middleware genesis state +message GenesisState { + // An entry for the PacketsFees map + message PacketsFeesMapEntry { + ibc.core.channel.v1.PacketId packet_id = 1; + ibc.applications.middleware.fee.v1.Fee fee = 2; + } + // A mapping of packets -> escrowed fees + repeated PacketsFeesMapEntry packets_fees_map = 1; +} diff --git a/proto/ibc/applications/middleware/fee/v1/query.proto b/proto/ibc/applications/middleware/fee/v1/query.proto index 8dc9061d814..77af4340785 100644 --- a/proto/ibc/applications/middleware/fee/v1/query.proto +++ b/proto/ibc/applications/middleware/fee/v1/query.proto @@ -6,6 +6,8 @@ import "gogoproto/gogo.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "ibc/applications/middleware/fee/v1/fee.proto"; import "google/api/annotations.proto"; +import "ibc/core/channel/v1/channel.proto"; + option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; // Query provides defines the gRPC querier service. @@ -28,12 +30,8 @@ service Query { // QueryReceiveRequestFee is the request type for quering the receive fee message QueryReceiveFeeRequest { - // Source Port ID - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // Source Channel ID - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - // Packet sequence - string sequence = 3 [(gogoproto.moretags) = "yaml:\"sequence\""]; + // PacketID + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). string relayer_address = 4 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; } @@ -45,12 +43,8 @@ message QueryReceiveFeeResponse { // QueryAckFeeRequest is the request type for querying the acknowledgement fee message QueryAckFeeRequest { - // Source Port ID - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // Source Channel ID - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - // Packet sequence - string sequence = 3 [(gogoproto.moretags) = "yaml:\"sequence\""]; + // PacketID + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). string relayer_address = 4 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; } @@ -62,12 +56,8 @@ message QueryAckFeeResponse { // QueryTimeoutFeeRequest is the request type for querying the timeout fee message QueryTimeoutFeeRequest { - // Source Port ID - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // Source Channel ID - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - // Packet sequence - string sequence = 3 [(gogoproto.moretags) = "yaml:\"sequence\""]; + // PacketID + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). string relayer_address = 4 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; } diff --git a/proto/ibc/applications/middleware/fee/v1/tx.proto b/proto/ibc/applications/middleware/fee/v1/tx.proto index cfbedc37e16..c1c97260ec6 100644 --- a/proto/ibc/applications/middleware/fee/v1/tx.proto +++ b/proto/ibc/applications/middleware/fee/v1/tx.proto @@ -14,7 +14,7 @@ service Msg { // counterparty address before relaying This ensures they will be properly compensated for forward relaying since // destination chain must send back relayer's source address (counterparty address) in acknowledgement This function // may be called more than once by a relayer, in which case, latest counterparty address is always used. - rpc RegisterCounterPartyAddress(MsgRegisterCounterPartyAddress) returns (MsgRegisterCounterPartyAddressResponse); + rpc RegisterCounterPartyAddress(MsgRegisterCounterpartyAddress) returns (MsgRegisterCounterPartyAddressResponse); // EscrowPacketFee defines a rpc handler method for MsgEscrowPacketFee // EscrowPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to // incentivize the relaying of the given packet. @@ -26,8 +26,8 @@ message MsgRegisterCounterpartyAddress { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; - string counterparty_address = 2 [(gogoproto.moretags) = "yaml:\"address\""]; + string address = 1; + string counterparty_address = 2 [(gogoproto.moretags) = "yaml:\"counterparty_address\""]; } // MsgRegisterCounterPartyAddressResponse defines the Msg/RegisterCounteryPartyAddress response type From 66716115b706938774fe35e88ef4226f6bf54e77 Mon Sep 17 00:00:00 2001 From: Sean King Date: Thu, 22 Jul 2021 12:29:22 +0200 Subject: [PATCH 13/26] feat: adding query for all incentivized packets + some fixes --- modules/apps/29-fee/types/genesis.pb.go | 41 +- modules/apps/29-fee/types/query.pb.go | 596 ++++++++++++++++-- modules/apps/29-fee/types/query.pb.gw.go | 62 ++ modules/apps/29-fee/types/tx.pb.go | 74 +-- .../applications/middleware/fee/v1/fee.proto | 2 +- .../middleware/fee/v1/genesis.proto | 3 +- .../middleware/fee/v1/query.proto | 41 +- .../applications/middleware/fee/v1/tx.proto | 2 +- 8 files changed, 701 insertions(+), 120 deletions(-) diff --git a/modules/apps/29-fee/types/genesis.pb.go b/modules/apps/29-fee/types/genesis.pb.go index 416c9b81cc3..0d01033da92 100644 --- a/modules/apps/29-fee/types/genesis.pb.go +++ b/modules/apps/29-fee/types/genesis.pb.go @@ -27,7 +27,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the fee middleware genesis state type GenesisState struct { // A mapping of packets -> escrowed fees - PacketsFeesMap []*IdentifiedPacketFee `protobuf:"bytes,1,rep,name=packets_fees_map,json=packetsFeesMap,proto3" json:"packets_fees_map,omitempty"` + PacketsFeesMap []*IdentifiedPacketFee `protobuf:"bytes,1,rep,name=packets_fees_map,json=packetsFeesMap,proto3" json:"packets_fees_map,omitempty" yaml:"packets_fees_map"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -79,25 +79,26 @@ func init() { } var fileDescriptor_6a4f6c8d78b5dfbf = []byte{ - // 276 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x8f, 0x31, 0x4b, 0x03, 0x41, - 0x14, 0x84, 0x73, 0x08, 0x16, 0x51, 0x44, 0x82, 0x85, 0xa4, 0x58, 0x34, 0x95, 0x85, 0xd9, 0x35, - 0xb1, 0x10, 0x5b, 0x8b, 0x88, 0xa0, 0x20, 0xda, 0xd9, 0x84, 0xbd, 0xbd, 0xb9, 0xcb, 0xe2, 0xdd, - 0xbd, 0xf5, 0xde, 0x26, 0xe2, 0xbf, 0xf0, 0x67, 0x59, 0xa6, 0xb4, 0x94, 0xbb, 0x3f, 0x22, 0x7b, - 0x17, 0xd0, 0x4e, 0xbb, 0x81, 0xf7, 0xcd, 0xbc, 0x99, 0xfe, 0x99, 0x8d, 0x8d, 0xd2, 0xce, 0xe5, - 0xd6, 0x68, 0x6f, 0xa9, 0x64, 0x55, 0xd8, 0x24, 0xc9, 0xf1, 0xaa, 0x2b, 0xa8, 0x14, 0x50, 0xab, - 0x89, 0xca, 0x50, 0x82, 0x2d, 0x4b, 0x57, 0x91, 0xa7, 0xc1, 0xc8, 0xc6, 0x46, 0xfe, 0x76, 0xc8, - 0x1f, 0x87, 0x4c, 0x01, 0xb9, 0x9a, 0x0c, 0x0f, 0x32, 0xca, 0xa8, 0xc5, 0x55, 0x50, 0x9d, 0x73, - 0x78, 0xfa, 0x8f, 0x5f, 0x21, 0xa0, 0xa3, 0x8f, 0x03, 0x6d, 0xa8, 0x82, 0x32, 0x0b, 0x5d, 0x96, - 0xc8, 0xc3, 0x79, 0x23, 0x3b, 0x64, 0xf4, 0xd2, 0xdf, 0xbd, 0xee, 0xba, 0x3d, 0x7a, 0xed, 0x31, - 0xd0, 0xfd, 0x7d, 0xa7, 0xcd, 0x33, 0x3c, 0xcf, 0x53, 0x80, 0xe7, 0x85, 0x76, 0x87, 0xd1, 0xd1, - 0xd6, 0xc9, 0xce, 0xf4, 0x42, 0xfe, 0xdd, 0x5a, 0xde, 0x24, 0x28, 0xbd, 0x4d, 0x2d, 0x92, 0xfb, - 0x36, 0x65, 0x06, 0x3c, 0xec, 0x6d, 0x02, 0x67, 0x00, 0xdf, 0x69, 0x77, 0x75, 0xfb, 0x51, 0x8b, - 0x68, 0x5d, 0x8b, 0xe8, 0xab, 0x16, 0xd1, 0x7b, 0x23, 0x7a, 0xeb, 0x46, 0xf4, 0x3e, 0x1b, 0xd1, - 0x7b, 0x9a, 0x66, 0xd6, 0x2f, 0x96, 0xb1, 0x34, 0x54, 0x28, 0x43, 0x5c, 0x10, 0x2b, 0x1b, 0x9b, - 0x71, 0x46, 0xaa, 0xa0, 0x64, 0x99, 0x83, 0xc3, 0x74, 0x56, 0xd3, 0xcb, 0x71, 0x98, 0xea, 0xdf, - 0x1c, 0x38, 0xde, 0x6e, 0x77, 0x9c, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x04, 0xcb, 0x23, 0xd5, - 0x86, 0x01, 0x00, 0x00, + // 297 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x31, 0x4b, 0x03, 0x31, + 0x00, 0x85, 0x7b, 0x08, 0x0e, 0x55, 0x44, 0x8a, 0xa0, 0x54, 0x88, 0x7a, 0x93, 0x83, 0x4d, 0x6c, + 0x1d, 0x44, 0xc7, 0x0e, 0x15, 0x41, 0x41, 0x74, 0x73, 0x29, 0xb9, 0xdc,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0x4b, 0x12, 0x2c, 0x4a, 0x12, 0x7c, 0x94, 0x24, 0x78, 0xa9, 0x48, 0x6b, 0x51, 0x91, + 0xd6, 0x5b, 0x45, 0x5a, 0xf7, 0x83, 0x54, 0xba, 0xc9, 0x34, 0xa2, 0x42, 0x2b, 0x26, 0xb4, 0x55, + 0xda, 0x32, 0x19, 0x89, 0x5e, 0xaa, 0x99, 0xd2, 0xf1, 0x34, 0x83, 0xf5, 0xc3, 0x58, 0x36, 0x38, + 0xeb, 0xf9, 0x21, 0xdc, 0xdc, 0xc0, 0x46, 0xab, 0xf5, 0x2f, 0x4f, 0xbe, 0x02, 0x00, 0x00, 0xff, + 0xff, 0xd7, 0x1d, 0xc7, 0xed, 0xa4, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/modules/apps/29-fee/types/query.pb.go b/modules/apps/29-fee/types/query.pb.go index df4cedb4274..46cc122b774 100644 --- a/modules/apps/29-fee/types/query.pb.go +++ b/modules/apps/29-fee/types/query.pb.go @@ -34,9 +34,11 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // QueryReceiveRequestFee is the request type for quering the receive fee type QueryReceiveFeeRequest struct { // PacketID - PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"relayer_address"` + PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"packet_id"` // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - RelayerAddress string `protobuf:"bytes,4,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` + RelayerAddress string `protobuf:"bytes,2,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` + // Height to query at + QueryHeight uint64 `protobuf:"varint,3,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty" yaml:"query_height"` } func (m *QueryReceiveFeeRequest) Reset() { *m = QueryReceiveFeeRequest{} } @@ -86,9 +88,16 @@ func (m *QueryReceiveFeeRequest) GetRelayerAddress() string { return "" } +func (m *QueryReceiveFeeRequest) GetQueryHeight() uint64 { + if m != nil { + return m.QueryHeight + } + return 0 +} + // QueryReceiveFeeResponse is the response type for the ReceiveFee RPC type QueryReceiveFeeResponse struct { - Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty" yaml:"fee"` + Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty"` } func (m *QueryReceiveFeeResponse) Reset() { *m = QueryReceiveFeeResponse{} } @@ -134,9 +143,11 @@ func (m *QueryReceiveFeeResponse) GetFee() *Fee { // QueryAckFeeRequest is the request type for querying the acknowledgement fee type QueryAckFeeRequest struct { // PacketID - PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"relayer_address"` + PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"packet_id"` // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - RelayerAddress string `protobuf:"bytes,4,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` + RelayerAddress string `protobuf:"bytes,2,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` + // Height to query at + QueryHeight uint64 `protobuf:"varint,3,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty" yaml:"query_height"` } func (m *QueryAckFeeRequest) Reset() { *m = QueryAckFeeRequest{} } @@ -186,9 +197,16 @@ func (m *QueryAckFeeRequest) GetRelayerAddress() string { return "" } +func (m *QueryAckFeeRequest) GetQueryHeight() uint64 { + if m != nil { + return m.QueryHeight + } + return 0 +} + // QueryAckFeeResponse is the response type for the AckFee RPC type QueryAckFeeResponse struct { - Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty" yaml:"fee"` + Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty"` } func (m *QueryAckFeeResponse) Reset() { *m = QueryAckFeeResponse{} } @@ -234,9 +252,11 @@ func (m *QueryAckFeeResponse) GetFee() *Fee { // QueryTimeoutFeeRequest is the request type for querying the timeout fee type QueryTimeoutFeeRequest struct { // PacketID - PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"relayer_address"` + PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"packet_id"` // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - RelayerAddress string `protobuf:"bytes,4,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` + RelayerAddress string `protobuf:"bytes,2,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` + // Height to query at + QueryHeight uint64 `protobuf:"varint,3,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty" yaml:"query_height"` } func (m *QueryTimeoutFeeRequest) Reset() { *m = QueryTimeoutFeeRequest{} } @@ -286,9 +306,16 @@ func (m *QueryTimeoutFeeRequest) GetRelayerAddress() string { return "" } +func (m *QueryTimeoutFeeRequest) GetQueryHeight() uint64 { + if m != nil { + return m.QueryHeight + } + return 0 +} + // QueryTimeoutFeeResponse is the response type for the timeout RPC type QueryTimeoutFeeResponse struct { - Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty" yaml:"fee"` + Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty"` } func (m *QueryTimeoutFeeResponse) Reset() { *m = QueryTimeoutFeeResponse{} } @@ -331,6 +358,98 @@ func (m *QueryTimeoutFeeResponse) GetFee() *Fee { return nil } +// QueryIncentivizedPacketRequest is the request type for querying for all incentivized packets +type QueryIncentivizedPacketsRequest struct { +} + +func (m *QueryIncentivizedPacketsRequest) Reset() { *m = QueryIncentivizedPacketsRequest{} } +func (m *QueryIncentivizedPacketsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryIncentivizedPacketsRequest) ProtoMessage() {} +func (*QueryIncentivizedPacketsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9cafe0e1bd8b928c, []int{6} +} +func (m *QueryIncentivizedPacketsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryIncentivizedPacketsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryIncentivizedPacketsRequest.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 *QueryIncentivizedPacketsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryIncentivizedPacketsRequest.Merge(m, src) +} +func (m *QueryIncentivizedPacketsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryIncentivizedPacketsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryIncentivizedPacketsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryIncentivizedPacketsRequest proto.InternalMessageInfo + +// QueryTimeoutFeeResponse is the response type for the timeout RPC +type QueryIncentivizedPacketsResponse struct { + // Map of all incentivized_packets + IncentivizedPackets []*IdentifiedPacketFee `protobuf:"bytes,1,rep,name=incentivized_packets,json=incentivizedPackets,proto3" json:"incentivized_packets,omitempty" yaml:"incentivized_packets"` + // Height to query at + QueryHeight uint64 `protobuf:"varint,2,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty" yaml:"query_height"` +} + +func (m *QueryIncentivizedPacketsResponse) Reset() { *m = QueryIncentivizedPacketsResponse{} } +func (m *QueryIncentivizedPacketsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryIncentivizedPacketsResponse) ProtoMessage() {} +func (*QueryIncentivizedPacketsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9cafe0e1bd8b928c, []int{7} +} +func (m *QueryIncentivizedPacketsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryIncentivizedPacketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryIncentivizedPacketsResponse.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 *QueryIncentivizedPacketsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryIncentivizedPacketsResponse.Merge(m, src) +} +func (m *QueryIncentivizedPacketsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryIncentivizedPacketsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryIncentivizedPacketsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryIncentivizedPacketsResponse proto.InternalMessageInfo + +func (m *QueryIncentivizedPacketsResponse) GetIncentivizedPackets() []*IdentifiedPacketFee { + if m != nil { + return m.IncentivizedPackets + } + return nil +} + +func (m *QueryIncentivizedPacketsResponse) GetQueryHeight() uint64 { + if m != nil { + return m.QueryHeight + } + return 0 +} + func init() { proto.RegisterType((*QueryReceiveFeeRequest)(nil), "ibc.applications.middleware.fee.v1.QueryReceiveFeeRequest") proto.RegisterType((*QueryReceiveFeeResponse)(nil), "ibc.applications.middleware.fee.v1.QueryReceiveFeeResponse") @@ -338,6 +457,8 @@ func init() { proto.RegisterType((*QueryAckFeeResponse)(nil), "ibc.applications.middleware.fee.v1.QueryAckFeeResponse") proto.RegisterType((*QueryTimeoutFeeRequest)(nil), "ibc.applications.middleware.fee.v1.QueryTimeoutFeeRequest") proto.RegisterType((*QueryTimeoutFeeResponse)(nil), "ibc.applications.middleware.fee.v1.QueryTimeoutFeeResponse") + proto.RegisterType((*QueryIncentivizedPacketsRequest)(nil), "ibc.applications.middleware.fee.v1.QueryIncentivizedPacketsRequest") + proto.RegisterType((*QueryIncentivizedPacketsResponse)(nil), "ibc.applications.middleware.fee.v1.QueryIncentivizedPacketsResponse") } func init() { @@ -345,42 +466,51 @@ func init() { } var fileDescriptor_9cafe0e1bd8b928c = []byte{ - // 552 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x55, 0xcf, 0x6a, 0x13, 0x41, - 0x1c, 0xce, 0x6a, 0x2d, 0x76, 0x84, 0x0a, 0xa3, 0xd4, 0x12, 0x74, 0x5b, 0x57, 0xa4, 0xf5, 0x4f, - 0x67, 0x48, 0x04, 0xc5, 0x7a, 0x6a, 0x84, 0x42, 0xc1, 0x83, 0x06, 0xf1, 0xe0, 0x25, 0xce, 0xce, - 0xfe, 0xb2, 0x1d, 0xb2, 0xbb, 0xb3, 0xdd, 0x99, 0x44, 0x72, 0xf5, 0x09, 0x04, 0xdf, 0xc0, 0x83, - 0x77, 0x0f, 0xfa, 0x0c, 0x1e, 0x0b, 0x5e, 0x3c, 0x15, 0x49, 0x7c, 0x82, 0x3e, 0x81, 0xcc, 0xce, - 0x68, 0x5a, 0x53, 0x6a, 0x52, 0x7a, 0xe9, 0x6d, 0x98, 0xf9, 0xbe, 0xef, 0xf7, 0xed, 0x37, 0xbf, - 0xf9, 0x2d, 0x22, 0x22, 0xe4, 0x94, 0xe5, 0x79, 0x22, 0x38, 0xd3, 0x42, 0x66, 0x8a, 0xa6, 0x22, - 0x8a, 0x12, 0x78, 0xcb, 0x0a, 0xa0, 0x6d, 0x00, 0xda, 0xab, 0xd1, 0x9d, 0x2e, 0x14, 0x7d, 0x92, - 0x17, 0x52, 0x4b, 0x1c, 0x88, 0x90, 0x93, 0x83, 0x78, 0x32, 0xc2, 0x93, 0x36, 0x00, 0xe9, 0xd5, - 0xaa, 0x57, 0x63, 0x19, 0xcb, 0x12, 0x4e, 0xcd, 0xca, 0x32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a4, 0xa9, 0x8c, 0xba, 0x09, 0x28, 0x2b, 0x5f, 0x7f, 0xbc, 0x66, - 0x64, 0x75, 0x3f, 0x07, 0x15, 0xce, 0x96, 0xb3, 0xfc, 0xc1, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x03, 0x73, 0xbc, 0x1c, 0xd2, 0x06, 0x00, 0x00, + // 695 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0xcd, 0x6e, 0xd3, 0x4a, + 0x18, 0xed, 0xb4, 0xb7, 0xd5, 0xed, 0xf4, 0xea, 0xde, 0xab, 0x49, 0xd5, 0x46, 0x01, 0x92, 0xd4, + 0x08, 0x35, 0xfc, 0xd4, 0x43, 0x82, 0x44, 0x69, 0x59, 0x35, 0x45, 0x15, 0x95, 0x58, 0x94, 0xa8, + 0x2b, 0x36, 0xd1, 0xd8, 0xfe, 0xe2, 0x8c, 0xea, 0x78, 0x5c, 0x8f, 0x13, 0x14, 0x96, 0x6c, 0xd9, + 0x20, 0xf1, 0x0e, 0x3c, 0x02, 0xcf, 0xc0, 0xb2, 0x12, 0x1b, 0xc4, 0x22, 0x42, 0x2d, 0x12, 0x0b, + 0x58, 0xe5, 0x05, 0x40, 0x9e, 0x71, 0xdb, 0x94, 0xa4, 0xc5, 0xa5, 0x3b, 0xd8, 0xc5, 0x9e, 0x73, + 0xce, 0x9c, 0x73, 0x32, 0xdf, 0xc8, 0xd8, 0xe4, 0x96, 0x4d, 0x59, 0x10, 0x78, 0xdc, 0x66, 0x11, + 0x17, 0xbe, 0xa4, 0x2d, 0xee, 0x38, 0x1e, 0x3c, 0x65, 0x21, 0xd0, 0x06, 0x00, 0xed, 0x94, 0xe9, + 0x6e, 0x1b, 0xc2, 0xae, 0x19, 0x84, 0x22, 0x12, 0xc4, 0xe0, 0x96, 0x6d, 0x0e, 0xe2, 0xcd, 0x63, + 0xbc, 0xd9, 0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 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -401,6 +531,8 @@ type QueryClient interface { AckFee(ctx context.Context, in *QueryAckFeeRequest, opts ...grpc.CallOption) (*QueryAckFeeResponse, error) // Gets the fee expected for submitting TimeoutPacket msg for the given packet TimeoutFee(ctx context.Context, in *QueryTimeoutFeeRequest, opts ...grpc.CallOption) (*QueryTimeoutFeeResponse, error) + // Gets all incentivized packets + IncentivizedPackets(ctx context.Context, in *QueryIncentivizedPacketsRequest, opts ...grpc.CallOption) (*QueryIncentivizedPacketsResponse, error) } type queryClient struct { @@ -438,6 +570,15 @@ func (c *queryClient) TimeoutFee(ctx context.Context, in *QueryTimeoutFeeRequest return out, nil } +func (c *queryClient) IncentivizedPackets(ctx context.Context, in *QueryIncentivizedPacketsRequest, opts ...grpc.CallOption) (*QueryIncentivizedPacketsResponse, error) { + out := new(QueryIncentivizedPacketsResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Query/IncentivizedPackets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Gets the fee expected for submitting ReceivePacket msg for the given packet @@ -446,6 +587,8 @@ type QueryServer interface { AckFee(context.Context, *QueryAckFeeRequest) (*QueryAckFeeResponse, error) // Gets the fee expected for submitting TimeoutPacket msg for the given packet TimeoutFee(context.Context, *QueryTimeoutFeeRequest) (*QueryTimeoutFeeResponse, error) + // Gets all incentivized packets + IncentivizedPackets(context.Context, *QueryIncentivizedPacketsRequest) (*QueryIncentivizedPacketsResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -461,6 +604,9 @@ func (*UnimplementedQueryServer) AckFee(ctx context.Context, req *QueryAckFeeReq func (*UnimplementedQueryServer) TimeoutFee(ctx context.Context, req *QueryTimeoutFeeRequest) (*QueryTimeoutFeeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TimeoutFee not implemented") } +func (*UnimplementedQueryServer) IncentivizedPackets(ctx context.Context, req *QueryIncentivizedPacketsRequest) (*QueryIncentivizedPacketsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IncentivizedPackets not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -520,6 +666,24 @@ func _Query_TimeoutFee_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Query_IncentivizedPackets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryIncentivizedPacketsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).IncentivizedPackets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.middleware.fee.v1.Query/IncentivizedPackets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).IncentivizedPackets(ctx, req.(*QueryIncentivizedPacketsRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "ibc.applications.middleware.fee.v1.Query", HandlerType: (*QueryServer)(nil), @@ -536,6 +700,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "TimeoutFee", Handler: _Query_TimeoutFee_Handler, }, + { + MethodName: "IncentivizedPackets", + Handler: _Query_IncentivizedPackets_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "ibc/applications/middleware/fee/v1/query.proto", @@ -561,12 +729,17 @@ func (m *QueryReceiveFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if m.QueryHeight != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.QueryHeight)) + i-- + dAtA[i] = 0x18 + } if len(m.RelayerAddress) > 0 { i -= len(m.RelayerAddress) copy(dAtA[i:], m.RelayerAddress) i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x12 } if m.PacketId != nil { { @@ -638,12 +811,17 @@ func (m *QueryAckFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.QueryHeight != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.QueryHeight)) + i-- + dAtA[i] = 0x18 + } if len(m.RelayerAddress) > 0 { i -= len(m.RelayerAddress) copy(dAtA[i:], m.RelayerAddress) i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x12 } if m.PacketId != nil { { @@ -715,12 +893,17 @@ func (m *QueryTimeoutFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if m.QueryHeight != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.QueryHeight)) + i-- + dAtA[i] = 0x18 + } if len(m.RelayerAddress) > 0 { i -= len(m.RelayerAddress) copy(dAtA[i:], m.RelayerAddress) i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x12 } if m.PacketId != nil { { @@ -772,6 +955,71 @@ func (m *QueryTimeoutFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *QueryIncentivizedPacketsRequest) 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 *QueryIncentivizedPacketsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryIncentivizedPacketsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryIncentivizedPacketsResponse) 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 *QueryIncentivizedPacketsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryIncentivizedPacketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.QueryHeight != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.QueryHeight)) + i-- + dAtA[i] = 0x10 + } + if len(m.IncentivizedPackets) > 0 { + for iNdEx := len(m.IncentivizedPackets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.IncentivizedPackets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -797,6 +1045,9 @@ func (m *QueryReceiveFeeRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } + if m.QueryHeight != 0 { + n += 1 + sovQuery(uint64(m.QueryHeight)) + } return n } @@ -827,6 +1078,9 @@ func (m *QueryAckFeeRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } + if m.QueryHeight != 0 { + n += 1 + sovQuery(uint64(m.QueryHeight)) + } return n } @@ -857,6 +1111,9 @@ func (m *QueryTimeoutFeeRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } + if m.QueryHeight != 0 { + n += 1 + sovQuery(uint64(m.QueryHeight)) + } return n } @@ -873,6 +1130,33 @@ func (m *QueryTimeoutFeeResponse) Size() (n int) { return n } +func (m *QueryIncentivizedPacketsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryIncentivizedPacketsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.IncentivizedPackets) > 0 { + for _, e := range m.IncentivizedPackets { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.QueryHeight != 0 { + n += 1 + sovQuery(uint64(m.QueryHeight)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -944,7 +1228,7 @@ func (m *QueryReceiveFeeRequest) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) } @@ -976,6 +1260,25 @@ func (m *QueryReceiveFeeRequest) Unmarshal(dAtA []byte) error { } m.RelayerAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QueryHeight", wireType) + } + m.QueryHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.QueryHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -1148,7 +1451,7 @@ func (m *QueryAckFeeRequest) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) } @@ -1180,6 +1483,25 @@ func (m *QueryAckFeeRequest) Unmarshal(dAtA []byte) error { } m.RelayerAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QueryHeight", wireType) + } + m.QueryHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.QueryHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -1352,7 +1674,7 @@ func (m *QueryTimeoutFeeRequest) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) } @@ -1384,6 +1706,25 @@ func (m *QueryTimeoutFeeRequest) Unmarshal(dAtA []byte) error { } m.RelayerAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QueryHeight", wireType) + } + m.QueryHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.QueryHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -1491,6 +1832,159 @@ func (m *QueryTimeoutFeeResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryIncentivizedPacketsRequest) 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 ErrIntOverflowQuery + } + 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: QueryIncentivizedPacketsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryIncentivizedPacketsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryIncentivizedPacketsResponse) 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 ErrIntOverflowQuery + } + 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: QueryIncentivizedPacketsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryIncentivizedPacketsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IncentivizedPackets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IncentivizedPackets = append(m.IncentivizedPackets, &IdentifiedPacketFee{}) + if err := m.IncentivizedPackets[len(m.IncentivizedPackets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QueryHeight", wireType) + } + m.QueryHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.QueryHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/modules/apps/29-fee/types/query.pb.gw.go b/modules/apps/29-fee/types/query.pb.gw.go index 417bc16088e..b6c2096c732 100644 --- a/modules/apps/29-fee/types/query.pb.gw.go +++ b/modules/apps/29-fee/types/query.pb.gw.go @@ -139,6 +139,24 @@ func local_request_Query_TimeoutFee_0(ctx context.Context, marshaler runtime.Mar } +func request_Query_IncentivizedPackets_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryIncentivizedPacketsRequest + var metadata runtime.ServerMetadata + + msg, err := client.IncentivizedPackets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_IncentivizedPackets_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryIncentivizedPacketsRequest + var metadata runtime.ServerMetadata + + msg, err := server.IncentivizedPackets(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -205,6 +223,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_IncentivizedPackets_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) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_IncentivizedPackets_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_IncentivizedPackets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -306,6 +344,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_IncentivizedPackets_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_IncentivizedPackets_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_IncentivizedPackets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -315,6 +373,8 @@ var ( pattern_Query_AckFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "ack_fee"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_TimeoutFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "timeout_fee"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_IncentivizedPackets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "incentivized_packets"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -323,4 +383,6 @@ var ( forward_Query_AckFee_0 = runtime.ForwardResponseMessage forward_Query_TimeoutFee_0 = runtime.ForwardResponseMessage + + forward_Query_IncentivizedPackets_0 = runtime.ForwardResponseMessage ) diff --git a/modules/apps/29-fee/types/tx.pb.go b/modules/apps/29-fee/types/tx.pb.go index 6d9c9322477..514983fcefc 100644 --- a/modules/apps/29-fee/types/tx.pb.go +++ b/modules/apps/29-fee/types/tx.pb.go @@ -113,7 +113,7 @@ type MsgEscrowPacketFee struct { ReceiveFee *Fee `protobuf:"bytes,2,opt,name=receive_fee,json=receiveFee,proto3" json:"receive_fee,omitempty" yaml:"receive_fee"` AckFee *Fee `protobuf:"bytes,3,opt,name=ack_fee,json=ackFee,proto3" json:"ack_fee,omitempty" yaml:"ack_fee"` TimeoutFee *Fee `protobuf:"bytes,4,opt,name=timeout_fee,json=timeoutFee,proto3" json:"timeout_fee,omitempty" yaml:"timeout_fee"` - Relayers []string `protobuf:"bytes,5,rep,name=relayers,proto3" json:"relayers,omitempty" yaml:"relayers"` + Relayers []string `protobuf:"bytes,5,rep,name=relayers,proto3" json:"relayers,omitempty"` } func (m *MsgEscrowPacketFee) Reset() { *m = MsgEscrowPacketFee{} } @@ -233,42 +233,42 @@ func init() { } var fileDescriptor_faf7cf2f6149e2c8 = []byte{ - // 559 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x4f, 0x6b, 0x13, 0x41, - 0x18, 0xc6, 0xb3, 0x8d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x4a, - 0x8a, 0xc5, 0xc0, 0xfb, 0x2a, 0x25, 0xdf, 0x58, 0x39, 0xf7, 0x1c, 0x05, 0x7b, 0x68, 0x56, 0xe9, - 0x13, 0x08, 0xda, 0x14, 0x10, 0xf9, 0x43, 0x10, 0xb2, 0x7c, 0x73, 0xbf, 0x58, 0xdd, 0x72, 0x77, - 0xa6, 0x23, 0x7b, 0x3b, 0xbf, 0x6d, 0xb6, 0x83, 0xbd, 0x0b, 0x11, 0xbe, 0x8b, 0x2a, 0x8b, 0x5f, - 0x96, 0xff, 0x68, 0xfd, 0xfb, 0x1a, 0x2a, 0x36, 0x64, 0x68, 0x7e, 0x35, 0xd0, 0xde, 0x35, 0x1d, - 0x60, 0xba, 0xcb, 0xdc, 0xe1, 0xfa, 0xfe, 0xae, 0xbc, 0x59, 0x8d, 0x71, 0x55, 0x27, 0x9a, 0x9f, - 0x0c, 0xb4, 0x7d, 0xb9, 0x0d, 0x9f, 0x2e, 0xc9, 0xbf, 0xe4, 0xab, 0x3c, 0x5f, 0xcd, 0x97, 0x67, - 0x71, 0xdf, 0xfe, 0x18, 0x5b, 0xc6, 0xf9, 0xd8, 0x32, 0x7e, 0x8d, 0x2d, 0xe3, 0xf3, 0xc4, 0x2a, - 0x9c, 0x4f, 0xac, 0xc2, 0xcf, 0x89, 0x55, 0x78, 0x5f, 0x0f, 0x99, 0x3a, 0xe9, 0xb7, 0x1d, 0xca, - 0x63, 0x42, 0xb9, 0x8c, 0xb9, 0x24, 0xac, 0x4d, 0x0f, 0x42, 0x4e, 0x62, 0x1e, 0xf4, 0x23, 0x90, - 0x7a, 0xc4, 0x48, 0x52, 0x7f, 0x76, 0xa0, 0x47, 0x8a, 0x1a, 0x26, 0x20, 0xdb, 0xeb, 0xe9, 0xbc, - 0x78, 0xf2, 0x27, 0x00, 0x00, 0xff, 0xff, 0xe8, 0x00, 0x7a, 0x5b, 0xe9, 0x04, 0x00, 0x00, + // 549 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x41, 0x6b, 0x13, 0x41, + 0x14, 0xc7, 0xb3, 0x8d, 0xb6, 0xc9, 0x04, 0x54, 0xd6, 0x20, 0x61, 0xab, 0xbb, 0x75, 0x0f, 0x1a, + 0xd0, 0xee, 0x90, 0x08, 0x82, 0x3d, 0x08, 0x46, 0x2c, 0x28, 0x06, 0xc2, 0xe2, 0xc9, 0x4b, 0x3a, + 0x99, 0x7d, 0xd9, 0x0e, 0xd9, 0xcd, 0x2c, 0x33, 0x93, 0xd4, 0x7c, 0x03, 0xbd, 0x79, 0xf4, 0xe0, + 0xa1, 0x5f, 0xc0, 0x0f, 0xe1, 0xcd, 0x63, 0x8f, 0x9e, 0x82, 0x24, 0x17, 0xcf, 0xf9, 0x04, 0x32, + 0xbb, 0x49, 0x0d, 0x4d, 0xa9, 0x31, 0xb7, 0x79, 0xec, 0xff, 0xff, 0x9b, 0xff, 0xce, 0x7b, 0x3c, + 0xf4, 0x88, 0x75, 0x28, 0x26, 0x49, 0x12, 0x31, 0x4a, 0x14, 0xe3, 0x7d, 0x89, 0x63, 0x16, 0x04, + 0x11, 0x9c, 0x10, 0x01, 0xb8, 0x0b, 0x80, 0x87, 0x35, 0xac, 0x3e, 0x78, 0x89, 0xe0, 0x8a, 0x9b, + 0x2e, 0xeb, 0x50, 0x6f, 0x59, 0xec, 0xfd, 0x15, 0x7b, 0x5d, 0x00, 0x6f, 0x58, 0xb3, 0xca, 0x21, + 0x0f, 0x79, 0x2a, 0xc7, 0xfa, 0x94, 0x39, 0xad, 0xc7, 0x6b, 0x5c, 0xa3, 0x01, 0x99, 0xfa, 0xbe, + 0x56, 0x53, 0x2e, 0x00, 0xd3, 0x63, 0xd2, 0xef, 0x43, 0xa4, 0x3f, 0xcf, 0x8f, 0x99, 0xc4, 0xfd, + 0x62, 0x20, 0xbb, 0x29, 0x43, 0x1f, 0x42, 0x26, 0x15, 0x88,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} // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/ibc/applications/middleware/fee/v1/fee.proto b/proto/ibc/applications/middleware/fee/v1/fee.proto index 2749ed5dfa5..1d47f05c3b2 100644 --- a/proto/ibc/applications/middleware/fee/v1/fee.proto +++ b/proto/ibc/applications/middleware/fee/v1/fee.proto @@ -12,7 +12,7 @@ message Fee { cosmos.base.v1beta1.Coin amount = 1; } -// Fee associated with a packet_id +// Fee associated with a packet_id message IdentifiedPacketFee { ibc.core.channel.v1.PacketId packet_id = 1; ibc.applications.middleware.fee.v1.Fee fee = 2; diff --git a/proto/ibc/applications/middleware/fee/v1/genesis.proto b/proto/ibc/applications/middleware/fee/v1/genesis.proto index 5028a67a4e6..2e98da051d8 100644 --- a/proto/ibc/applications/middleware/fee/v1/genesis.proto +++ b/proto/ibc/applications/middleware/fee/v1/genesis.proto @@ -10,5 +10,6 @@ option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; // GenesisState defines the fee middleware genesis state message GenesisState { // A mapping of packets -> escrowed fees - repeated ibc.applications.middleware.fee.v1.IdentifiedPacketFee packets_fees_map = 1; + repeated ibc.applications.middleware.fee.v1.IdentifiedPacketFee packets_fees_map = 1 + [(gogoproto.moretags) = "yaml:\"packets_fees_map\""]; } diff --git a/proto/ibc/applications/middleware/fee/v1/query.proto b/proto/ibc/applications/middleware/fee/v1/query.proto index 77af4340785..d7dede4b9e7 100644 --- a/proto/ibc/applications/middleware/fee/v1/query.proto +++ b/proto/ibc/applications/middleware/fee/v1/query.proto @@ -26,43 +26,66 @@ service Query { rpc TimeoutFee(QueryTimeoutFeeRequest) returns (QueryTimeoutFeeResponse) { option (google.api.http).get = "/ibc/apps/middleware/fee/v1/timeout_fee"; } + + // Gets all incentivized packets + rpc IncentivizedPackets(QueryIncentivizedPacketsRequest) returns (QueryIncentivizedPacketsResponse) { + option (google.api.http).get = "/ibc/apps/middleware/fee/v1/incentivized_packets"; + } } // QueryReceiveRequestFee is the request type for quering the receive fee message QueryReceiveFeeRequest { // PacketID - ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - string relayer_address = 4 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; + string relayer_address = 2 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; + // Height to query at + uint64 query_height = 3 [(gogoproto.moretags) = "yaml:\"query_height\""]; } // QueryReceiveFeeResponse is the response type for the ReceiveFee RPC message QueryReceiveFeeResponse { - ibc.applications.middleware.fee.v1.Fee fee = 1 [(gogoproto.moretags) = "yaml:\"fee\""]; + ibc.applications.middleware.fee.v1.Fee fee = 1; } // QueryAckFeeRequest is the request type for querying the acknowledgement fee message QueryAckFeeRequest { // PacketID - ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - string relayer_address = 4 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; + string relayer_address = 2 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; + // Height to query at + uint64 query_height = 3 [(gogoproto.moretags) = "yaml:\"query_height\""]; } // QueryAckFeeResponse is the response type for the AckFee RPC message QueryAckFeeResponse { - ibc.applications.middleware.fee.v1.Fee fee = 1 [(gogoproto.moretags) = "yaml:\"fee\""]; + ibc.applications.middleware.fee.v1.Fee fee = 1; } // QueryTimeoutFeeRequest is the request type for querying the timeout fee message QueryTimeoutFeeRequest { // PacketID - ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - string relayer_address = 4 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; + string relayer_address = 2 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; + // Height to query at + uint64 query_height = 3 [(gogoproto.moretags) = "yaml:\"query_height\""]; } // QueryTimeoutFeeResponse is the response type for the timeout RPC message QueryTimeoutFeeResponse { - ibc.applications.middleware.fee.v1.Fee fee = 1 [(gogoproto.moretags) = "yaml:\"fee\""]; + ibc.applications.middleware.fee.v1.Fee fee = 1; +} + +// QueryIncentivizedPacketRequest is the request type for querying for all incentivized packets +message QueryIncentivizedPacketsRequest {} + +// QueryTimeoutFeeResponse is the response type for the timeout RPC +message QueryIncentivizedPacketsResponse { + // Map of all incentivized_packets + repeated ibc.applications.middleware.fee.v1.IdentifiedPacketFee incentivized_packets = 1 + [(gogoproto.moretags) = "yaml:\"incentivized_packets\""]; + // Height to query at + uint64 query_height = 2 [(gogoproto.moretags) = "yaml:\"query_height\""]; } diff --git a/proto/ibc/applications/middleware/fee/v1/tx.proto b/proto/ibc/applications/middleware/fee/v1/tx.proto index c1c97260ec6..0350ec7b923 100644 --- a/proto/ibc/applications/middleware/fee/v1/tx.proto +++ b/proto/ibc/applications/middleware/fee/v1/tx.proto @@ -39,7 +39,7 @@ message MsgEscrowPacketFee { ibc.applications.middleware.fee.v1.Fee receive_fee = 2 [(gogoproto.moretags) = "yaml:\"receive_fee\""]; ibc.applications.middleware.fee.v1.Fee ack_fee = 3 [(gogoproto.moretags) = "yaml:\"ack_fee\""]; ibc.applications.middleware.fee.v1.Fee timeout_fee = 4 [(gogoproto.moretags) = "yaml:\"timeout_fee\""]; - repeated string relayers = 5 [(gogoproto.moretags) = "yaml:\"relayers\""]; + repeated string relayers = 5; } // MsgEscrowPacketFeeResponse defines the response type for Msg/EscrowPacketFee From ac529894640ab450e4165b6f9ddb2abb36cb3cda Mon Sep 17 00:00:00 2001 From: Sean King Date: Thu, 22 Jul 2021 12:41:53 +0200 Subject: [PATCH 14/26] feat: adding pagination to incentivized query --- modules/apps/29-fee/types/query.pb.go | 153 ++++++++++++------ modules/apps/29-fee/types/query.pb.gw.go | 18 +++ .../middleware/fee/v1/query.proto | 6 +- 3 files changed, 131 insertions(+), 46 deletions(-) diff --git a/modules/apps/29-fee/types/query.pb.go b/modules/apps/29-fee/types/query.pb.go index 46cc122b774..a8b96a554a0 100644 --- a/modules/apps/29-fee/types/query.pb.go +++ b/modules/apps/29-fee/types/query.pb.go @@ -6,7 +6,7 @@ package types import ( context "context" fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/query" + query "github.com/cosmos/cosmos-sdk/types/query" types "github.com/cosmos/ibc-go/modules/core/04-channel/types" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" @@ -360,6 +360,8 @@ func (m *QueryTimeoutFeeResponse) GetFee() *Fee { // QueryIncentivizedPacketRequest is the request type for querying for all incentivized packets type QueryIncentivizedPacketsRequest struct { + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryIncentivizedPacketsRequest) Reset() { *m = QueryIncentivizedPacketsRequest{} } @@ -395,6 +397,13 @@ func (m *QueryIncentivizedPacketsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryIncentivizedPacketsRequest proto.InternalMessageInfo +func (m *QueryIncentivizedPacketsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + // QueryTimeoutFeeResponse is the response type for the timeout RPC type QueryIncentivizedPacketsResponse struct { // Map of all incentivized_packets @@ -466,51 +475,53 @@ func init() { } var fileDescriptor_9cafe0e1bd8b928c = []byte{ - // 695 bytes of a gzipped FileDescriptorProto + // 726 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0xcd, 0x6e, 0xd3, 0x4a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47, 0x1b, 0x31, 0x99, 0xc3, 0x81, 0xc2, 0x45, 0xc4, 0x3f, 0x20, 0x9c, 0x1a, 0xd3, + 0x0e, 0x64, 0x2b, 0x31, 0x8b, 0xd3, 0x1b, 0x37, 0xf3, 0xe0, 0x7c, 0x49, 0x62, 0x4d, 0xf7, 0x22, + 0x4d, 0x25, 0x72, 0xfb, 0x2c, 0x4d, 0xe3, 0x7a, 0xaa, 0xfc, 0xe8, 0xed, 0x61, 0x16, 0x1d, 0x1c, + 0x66, 0xd1, 0xc7, 0xc3, 0x2c, 0x7a, 0x79, 0x94, 0x9d, 0x3a, 0x38, 0xca, 0x4e, 0xbd, 0x3f, 0xca, + 0x4e, 0x3d, 0x29, 0x59, 0x22, 0x68, 0xb4, 0x74, 0x6a, 0xc8, 0x26, 0x8b, 0x2f, 0x1c, 0x42, 0x37, + 0x56, 0x2d, 0xc9, 0x9a, 0xd2, 0x6c, 0xd9, 0xe0, 0xab, 0x3a, 0xa5, 0xf5, 0xd5, 0x30, 0x7f, 0xd0, + 0x71, 0xc1, 0xd7, 0xe7, 0xa2, 0x4b, 0xc7, 0x9d, 0xef, 0x01, 0x00, 0x00, 0xff, 0xff, 0x82, 0xa9, + 0xdb, 0xf8, 0xa7, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -975,6 +986,18 @@ func (m *QueryIncentivizedPacketsRequest) MarshalToSizedBuffer(dAtA []byte) (int _ = i var l int _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -1136,6 +1159,10 @@ func (m *QueryIncentivizedPacketsRequest) Size() (n int) { } var l int _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -1861,6 +1888,42 @@ func (m *QueryIncentivizedPacketsRequest) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: QueryIncentivizedPacketsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) diff --git a/modules/apps/29-fee/types/query.pb.gw.go b/modules/apps/29-fee/types/query.pb.gw.go index b6c2096c732..449a244622a 100644 --- a/modules/apps/29-fee/types/query.pb.gw.go +++ b/modules/apps/29-fee/types/query.pb.gw.go @@ -139,10 +139,21 @@ func local_request_Query_TimeoutFee_0(ctx context.Context, marshaler runtime.Mar } +var ( + filter_Query_IncentivizedPackets_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + func request_Query_IncentivizedPackets_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryIncentivizedPacketsRequest 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_IncentivizedPackets_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.IncentivizedPackets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -152,6 +163,13 @@ func local_request_Query_IncentivizedPackets_0(ctx context.Context, marshaler ru var protoReq QueryIncentivizedPacketsRequest 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_IncentivizedPackets_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.IncentivizedPackets(ctx, &protoReq) return msg, metadata, err diff --git a/proto/ibc/applications/middleware/fee/v1/query.proto b/proto/ibc/applications/middleware/fee/v1/query.proto index d7dede4b9e7..0df68e4e656 100644 --- a/proto/ibc/applications/middleware/fee/v1/query.proto +++ b/proto/ibc/applications/middleware/fee/v1/query.proto @@ -7,6 +7,7 @@ import "cosmos/base/query/v1beta1/pagination.proto"; import "ibc/applications/middleware/fee/v1/fee.proto"; import "google/api/annotations.proto"; import "ibc/core/channel/v1/channel.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; @@ -79,7 +80,10 @@ message QueryTimeoutFeeResponse { } // QueryIncentivizedPacketRequest is the request type for querying for all incentivized packets -message QueryIncentivizedPacketsRequest {} +message QueryIncentivizedPacketsRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} // QueryTimeoutFeeResponse is the response type for the timeout RPC message QueryIncentivizedPacketsResponse { From 3e29dabf4c007ce052c43fcc44522838b710e66d Mon Sep 17 00:00:00 2001 From: Sean King Date: Thu, 22 Jul 2021 12:50:06 +0200 Subject: [PATCH 15/26] fix: removing generated ibc directory + adding import/yaml --- ibc/applications/middleware/fee/v1/fee.pb.go | 331 --- .../middleware/fee/v1/genesis.pb.go | 453 ---- .../middleware/fee/v1/query.pb.go | 1860 ----------------- .../middleware/fee/v1/query.pb.gw.go | 326 --- ibc/applications/middleware/fee/v1/tx.pb.go | 1173 ----------- modules/apps/29-fee/types/fee.pb.go | 85 +- .../applications/middleware/fee/v1/fee.proto | 4 +- 7 files changed, 49 insertions(+), 4183 deletions(-) delete mode 100644 ibc/applications/middleware/fee/v1/fee.pb.go delete mode 100644 ibc/applications/middleware/fee/v1/genesis.pb.go delete mode 100644 ibc/applications/middleware/fee/v1/query.pb.go delete mode 100644 ibc/applications/middleware/fee/v1/query.pb.gw.go delete mode 100644 ibc/applications/middleware/fee/v1/tx.pb.go diff --git a/ibc/applications/middleware/fee/v1/fee.pb.go b/ibc/applications/middleware/fee/v1/fee.pb.go deleted file mode 100644 index 2e26baba05e..00000000000 --- a/ibc/applications/middleware/fee/v1/fee.pb.go +++ /dev/null @@ -1,331 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/applications/middleware/fee/v1/fee.proto - -package ibc_applications_middleware_fee_v1 - -import ( - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/types" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Fee interface -// See Fee Payment Middleware spec: -// https://github.com/cosmos/ibc/tree/master/spec/app/ics-029-fee-payment#fee-middleware-contract -type Fee struct { - Amount *types.Coin `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (m *Fee) Reset() { *m = Fee{} } -func (m *Fee) String() string { return proto.CompactTextString(m) } -func (*Fee) ProtoMessage() {} -func (*Fee) Descriptor() ([]byte, []int) { - return fileDescriptor_9a4c0273395d2c1a, []int{0} -} -func (m *Fee) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Fee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Fee.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Fee) XXX_Merge(src proto.Message) { - xxx_messageInfo_Fee.Merge(m, src) -} -func (m *Fee) XXX_Size() int { - return m.Size() -} -func (m *Fee) XXX_DiscardUnknown() { - xxx_messageInfo_Fee.DiscardUnknown(m) -} - -var xxx_messageInfo_Fee proto.InternalMessageInfo - -func (m *Fee) GetAmount() *types.Coin { - if m != nil { - return m.Amount - } - return nil -} - -func init() { - proto.RegisterType((*Fee)(nil), "ibc.applications.middleware.fee.v1.Fee") -} - -func init() { - proto.RegisterFile("ibc/applications/middleware/fee/v1/fee.proto", fileDescriptor_9a4c0273395d2c1a) -} - -var fileDescriptor_9a4c0273395d2c1a = []byte{ - // 185 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xc9, 0x4c, 0x4a, 0xd6, - 0x4f, 0x2c, 0x28, 0xc8, 0xc9, 0x4c, 0x4e, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0xd6, 0xcf, 0xcd, 0x4c, - 0x49, 0xc9, 0x49, 0x2d, 0x4f, 0x2c, 0x4a, 0xd5, 0x4f, 0x4b, 0x4d, 0xd5, 0x2f, 0x33, 0x04, 0x51, - 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x4a, 0x99, 0x49, 0xc9, 0x7a, 0xc8, 0xaa, 0xf5, 0x10, - 0xaa, 0xf5, 0x40, 0xca, 0xca, 0x0c, 0xa5, 0xe4, 0x92, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, 0xf5, 0x93, - 0x12, 0x8b, 0x41, 0xba, 0x93, 0x52, 0x4b, 0x12, 0x0d, 0xf5, 0x93, 0xf3, 0x33, 0xf3, 0x20, 0x66, - 0x28, 0x59, 0x70, 0x31, 0xbb, 0xa5, 0xa6, 0x0a, 0x19, 0x72, 0xb1, 0x25, 0xe6, 0xe6, 0x97, 0xe6, - 0x95, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0x49, 0xea, 0x41, 0xf4, 0xe9, 0x81, 0xf4, 0xe9, - 0x41, 0xf5, 0xe9, 0x39, 0xe7, 0x67, 0xe6, 0x05, 0x41, 0x15, 0x3a, 0x49, 0x9c, 0x78, 0x24, 0xc7, - 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, - 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x12, 0x1b, 0xd8, 0x68, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x68, 0x5e, 0xad, 0x0a, 0xce, 0x00, 0x00, 0x00, -} - -func (m *Fee) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Fee) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Fee) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Amount != nil { - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintFee(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintFee(dAtA []byte, offset int, v uint64) int { - offset -= sovFee(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Fee) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Amount != nil { - l = m.Amount.Size() - n += 1 + l + sovFee(uint64(l)) - } - return n -} - -func sovFee(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozFee(x uint64) (n int) { - return sovFee(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Fee) 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 ErrIntOverflowFee - } - 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: Fee: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Fee: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFee - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFee - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthFee - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Amount == nil { - m.Amount = &types.Coin{} - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFee(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFee - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipFee(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFee - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFee - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFee - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthFee - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupFee - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthFee - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthFee = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowFee = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupFee = fmt.Errorf("proto: unexpected end of group") -) diff --git a/ibc/applications/middleware/fee/v1/genesis.pb.go b/ibc/applications/middleware/fee/v1/genesis.pb.go deleted file mode 100644 index 9f9cbbcb650..00000000000 --- a/ibc/applications/middleware/fee/v1/genesis.pb.go +++ /dev/null @@ -1,453 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/applications/middleware/fee/v1/genesis.proto - -package ibc_applications_middleware_fee_v1 - -import ( - fmt "fmt" - _ "github.com/cosmos/ibc-go/modules/core/04-channel/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// GenesisState defines the fee middleware genesis state -type GenesisState struct { - PacketFees map[string]*Fee `protobuf:"bytes,1,rep,name=packet_fees,json=packetFees,proto3" json:"packet_fees,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_6a4f6c8d78b5dfbf, []int{0} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func (m *GenesisState) GetPacketFees() map[string]*Fee { - if m != nil { - return m.PacketFees - } - return nil -} - -func init() { - proto.RegisterType((*GenesisState)(nil), "ibc.applications.middleware.fee.v1.GenesisState") - proto.RegisterMapType((map[string]*Fee)(nil), "ibc.applications.middleware.fee.v1.GenesisState.PacketFeesEntry") -} - -func init() { - proto.RegisterFile("ibc/applications/middleware/fee/v1/genesis.proto", fileDescriptor_6a4f6c8d78b5dfbf) -} - -var fileDescriptor_6a4f6c8d78b5dfbf = []byte{ - // 279 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x8f, 0xc1, 0x4a, 0xf4, 0x30, - 0x1c, 0xc4, 0x9b, 0x5d, 0xbe, 0x0f, 0x4c, 0x05, 0xa5, 0x78, 0x28, 0x3d, 0x84, 0xba, 0x17, 0x7b, - 0x90, 0xc4, 0x5d, 0x2f, 0x22, 0x08, 0x22, 0xb8, 0x5e, 0xa5, 0x3e, 0x80, 0xa4, 0xd9, 0x7f, 0x6b, - 0xd8, 0xda, 0x94, 0x26, 0x56, 0xf6, 0x2d, 0x7c, 0x2c, 0x8f, 0x7b, 0xd4, 0x9b, 0xb4, 0x2f, 0x22, - 0x69, 0x44, 0x17, 0x2f, 0xee, 0x6d, 0xc8, 0xcc, 0x6f, 0x32, 0x7f, 0x7c, 0x22, 0x33, 0xc1, 0x78, - 0x5d, 0x97, 0x52, 0x70, 0x23, 0x55, 0xa5, 0xd9, 0xa3, 0x5c, 0x2c, 0x4a, 0x78, 0xe6, 0x0d, 0xb0, - 0x1c, 0x80, 0xb5, 0x53, 0x56, 0x40, 0x05, 0x5a, 0x6a, 0x5a, 0x37, 0xca, 0xa8, 0x60, 0x22, 0x33, - 0x41, 0x37, 0x09, 0xfa, 0x43, 0xd0, 0x1c, 0x80, 0xb6, 0xd3, 0xe8, 0xa0, 0x50, 0x85, 0x1a, 0xe2, - 0xcc, 0x2a, 0x47, 0x46, 0xc7, 0x5b, 0xfc, 0x65, 0x0b, 0x5c, 0xfa, 0xd0, 0xa6, 0x85, 0x6a, 0x80, - 0x89, 0x07, 0x5e, 0x55, 0x50, 0x5a, 0xfb, 0x4b, 0xba, 0xc8, 0xe4, 0x1d, 0xe1, 0xdd, 0x1b, 0x37, - 0xee, 0xce, 0x70, 0x03, 0x01, 0xc7, 0x7e, 0xcd, 0xc5, 0x12, 0xcc, 0x7d, 0x0e, 0xa0, 0x43, 0x14, - 0x8f, 0x13, 0x7f, 0x76, 0x49, 0xff, 0x5e, 0x4c, 0x37, 0x6b, 0xe8, 0xed, 0xd0, 0x31, 0x07, 0xd0, - 0xd7, 0x95, 0x69, 0x56, 0x29, 0xae, 0xbf, 0x1f, 0xa2, 0x1c, 0xef, 0xfd, 0xb2, 0x83, 0x7d, 0x3c, - 0x5e, 0xc2, 0x2a, 0x44, 0x31, 0x4a, 0x76, 0x52, 0x2b, 0x83, 0x0b, 0xfc, 0xaf, 0xe5, 0xe5, 0x13, - 0x84, 0xa3, 0x18, 0x25, 0xfe, 0xec, 0x68, 0x9b, 0x05, 0x73, 0x80, 0xd4, 0x51, 0xe7, 0xa3, 0x33, - 0x74, 0x15, 0xbe, 0x76, 0x04, 0xad, 0x3b, 0x82, 0x3e, 0x3a, 0x82, 0x5e, 0x7a, 0xe2, 0xad, 0x7b, - 0xe2, 0xbd, 0xf5, 0xc4, 0xcb, 0xfe, 0x0f, 0xc7, 0x9f, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, 0x34, - 0x9b, 0x26, 0xa7, 0xbb, 0x01, 0x00, 0x00, -} - -func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PacketFees) > 0 { - for k := range m.PacketFees { - v := m.PacketFees[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintGenesis(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenesis(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.PacketFees) > 0 { - for k, v := range m.PacketFees { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovGenesis(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovGenesis(uint64(len(k))) + l - n += mapEntrySize + 1 + sovGenesis(uint64(mapEntrySize)) - } - } - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GenesisState) 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 ErrIntOverflowGenesis - } - 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: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PacketFees", 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 - } - if m.PacketFees == nil { - m.PacketFees = make(map[string]*Fee) - } - var mapkey string - var mapvalue *Fee - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenesis - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenesis - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenesis - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthGenesis - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &Fee{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.PacketFees[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenesis(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/ibc/applications/middleware/fee/v1/query.pb.go b/ibc/applications/middleware/fee/v1/query.pb.go deleted file mode 100644 index e82d8dd7ef9..00000000000 --- a/ibc/applications/middleware/fee/v1/query.pb.go +++ /dev/null @@ -1,1860 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/applications/middleware/fee/v1/query.proto - -package ibc_applications_middleware_fee_v1 - -import ( - context "context" - fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryReceiveRequestFee is the request type for quering the receive fee -type QueryReceiveFeeRequest struct { - // Source Port ID - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - // Source Channel ID - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - // Packet sequence - Sequence string `protobuf:"bytes,3,opt,name=sequence,proto3" json:"sequence,omitempty" yaml:"sequence"` - // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - RelayerAddress string `protobuf:"bytes,4,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` -} - -func (m *QueryReceiveFeeRequest) Reset() { *m = QueryReceiveFeeRequest{} } -func (m *QueryReceiveFeeRequest) String() string { return proto.CompactTextString(m) } -func (*QueryReceiveFeeRequest) ProtoMessage() {} -func (*QueryReceiveFeeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9cafe0e1bd8b928c, []int{0} -} -func (m *QueryReceiveFeeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryReceiveFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryReceiveFeeRequest.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 *QueryReceiveFeeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryReceiveFeeRequest.Merge(m, src) -} -func (m *QueryReceiveFeeRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryReceiveFeeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryReceiveFeeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryReceiveFeeRequest proto.InternalMessageInfo - -func (m *QueryReceiveFeeRequest) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -func (m *QueryReceiveFeeRequest) GetChannelId() string { - if m != nil { - return m.ChannelId - } - return "" -} - -func (m *QueryReceiveFeeRequest) GetSequence() string { - if m != nil { - return m.Sequence - } - return "" -} - -func (m *QueryReceiveFeeRequest) GetRelayerAddress() string { - if m != nil { - return m.RelayerAddress - } - return "" -} - -// QueryRequestFeeResponse is the response type for the ReceiveFee RPC -type QueryReceiveFeeResponse struct { - Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty" yaml:"fee"` -} - -func (m *QueryReceiveFeeResponse) Reset() { *m = QueryReceiveFeeResponse{} } -func (m *QueryReceiveFeeResponse) String() string { return proto.CompactTextString(m) } -func (*QueryReceiveFeeResponse) ProtoMessage() {} -func (*QueryReceiveFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9cafe0e1bd8b928c, []int{1} -} -func (m *QueryReceiveFeeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryReceiveFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryReceiveFeeResponse.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 *QueryReceiveFeeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryReceiveFeeResponse.Merge(m, src) -} -func (m *QueryReceiveFeeResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryReceiveFeeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryReceiveFeeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryReceiveFeeResponse proto.InternalMessageInfo - -func (m *QueryReceiveFeeResponse) GetFee() *Fee { - if m != nil { - return m.Fee - } - return nil -} - -// QueryAckRequestFee is the request type for quering the acknowledgement fee -type QueryAckFeeRequest struct { - // Source Port ID - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - // Source Channel ID - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - // Packet sequence - Sequence string `protobuf:"bytes,3,opt,name=sequence,proto3" json:"sequence,omitempty" yaml:"sequence"` - // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - RelayerAddress string `protobuf:"bytes,4,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` -} - -func (m *QueryAckFeeRequest) Reset() { *m = QueryAckFeeRequest{} } -func (m *QueryAckFeeRequest) String() string { return proto.CompactTextString(m) } -func (*QueryAckFeeRequest) ProtoMessage() {} -func (*QueryAckFeeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9cafe0e1bd8b928c, []int{2} -} -func (m *QueryAckFeeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAckFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAckFeeRequest.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 *QueryAckFeeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAckFeeRequest.Merge(m, src) -} -func (m *QueryAckFeeRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryAckFeeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAckFeeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAckFeeRequest proto.InternalMessageInfo - -func (m *QueryAckFeeRequest) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -func (m *QueryAckFeeRequest) GetChannelId() string { - if m != nil { - return m.ChannelId - } - return "" -} - -func (m *QueryAckFeeRequest) GetSequence() string { - if m != nil { - return m.Sequence - } - return "" -} - -func (m *QueryAckFeeRequest) GetRelayerAddress() string { - if m != nil { - return m.RelayerAddress - } - return "" -} - -// QueryAckFeeResponse is the response type for the AckFee RPC -type QueryAckFeeResponse struct { - Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty" yaml:"fee"` -} - -func (m *QueryAckFeeResponse) Reset() { *m = QueryAckFeeResponse{} } -func (m *QueryAckFeeResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAckFeeResponse) ProtoMessage() {} -func (*QueryAckFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9cafe0e1bd8b928c, []int{3} -} -func (m *QueryAckFeeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAckFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAckFeeResponse.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 *QueryAckFeeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAckFeeResponse.Merge(m, src) -} -func (m *QueryAckFeeResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryAckFeeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAckFeeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAckFeeResponse proto.InternalMessageInfo - -func (m *QueryAckFeeResponse) GetFee() *Fee { - if m != nil { - return m.Fee - } - return nil -} - -// QueryTimeoutFee is the request type for quering the timeout fee -type QueryTimeoutFeeRequest struct { - // Source Port ID - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - // Source Channel ID - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - // Packet sequence - Sequence string `protobuf:"bytes,3,opt,name=sequence,proto3" json:"sequence,omitempty" yaml:"sequence"` - // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - RelayerAddress string `protobuf:"bytes,4,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` -} - -func (m *QueryTimeoutFeeRequest) Reset() { *m = QueryTimeoutFeeRequest{} } -func (m *QueryTimeoutFeeRequest) String() string { return proto.CompactTextString(m) } -func (*QueryTimeoutFeeRequest) ProtoMessage() {} -func (*QueryTimeoutFeeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9cafe0e1bd8b928c, []int{4} -} -func (m *QueryTimeoutFeeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryTimeoutFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTimeoutFeeRequest.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 *QueryTimeoutFeeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTimeoutFeeRequest.Merge(m, src) -} -func (m *QueryTimeoutFeeRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryTimeoutFeeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTimeoutFeeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTimeoutFeeRequest proto.InternalMessageInfo - -func (m *QueryTimeoutFeeRequest) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -func (m *QueryTimeoutFeeRequest) GetChannelId() string { - if m != nil { - return m.ChannelId - } - return "" -} - -func (m *QueryTimeoutFeeRequest) GetSequence() string { - if m != nil { - return m.Sequence - } - return "" -} - -func (m *QueryTimeoutFeeRequest) GetRelayerAddress() string { - if m != nil { - return m.RelayerAddress - } - return "" -} - -// QueryTimeoutFeeResponse is the response type for the timeout RPC -type QueryTimeoutFeeResponse struct { - Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty" yaml:"fee"` -} - -func (m *QueryTimeoutFeeResponse) Reset() { *m = QueryTimeoutFeeResponse{} } -func (m *QueryTimeoutFeeResponse) String() string { return proto.CompactTextString(m) } -func (*QueryTimeoutFeeResponse) ProtoMessage() {} -func (*QueryTimeoutFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9cafe0e1bd8b928c, []int{5} -} -func (m *QueryTimeoutFeeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryTimeoutFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTimeoutFeeResponse.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 *QueryTimeoutFeeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTimeoutFeeResponse.Merge(m, src) -} -func (m *QueryTimeoutFeeResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryTimeoutFeeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTimeoutFeeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTimeoutFeeResponse proto.InternalMessageInfo - -func (m *QueryTimeoutFeeResponse) GetFee() *Fee { - if m != nil { - return m.Fee - } - return nil -} - -func init() { - proto.RegisterType((*QueryReceiveFeeRequest)(nil), "ibc.applications.middleware.fee.v1.QueryReceiveFeeRequest") - proto.RegisterType((*QueryReceiveFeeResponse)(nil), "ibc.applications.middleware.fee.v1.QueryReceiveFeeResponse") - proto.RegisterType((*QueryAckFeeRequest)(nil), "ibc.applications.middleware.fee.v1.QueryAckFeeRequest") - proto.RegisterType((*QueryAckFeeResponse)(nil), "ibc.applications.middleware.fee.v1.QueryAckFeeResponse") - proto.RegisterType((*QueryTimeoutFeeRequest)(nil), "ibc.applications.middleware.fee.v1.QueryTimeoutFeeRequest") - proto.RegisterType((*QueryTimeoutFeeResponse)(nil), "ibc.applications.middleware.fee.v1.QueryTimeoutFeeResponse") -} - -func init() { - proto.RegisterFile("ibc/applications/middleware/fee/v1/query.proto", fileDescriptor_9cafe0e1bd8b928c) -} - -var fileDescriptor_9cafe0e1bd8b928c = []byte{ - // 539 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x55, 0x41, 0x6f, 0xd3, 0x30, - 0x14, 0x5e, 0xb6, 0x51, 0x98, 0x91, 0x3a, 0xe1, 0xc1, 0xa8, 0x22, 0x94, 0x20, 0x23, 0x34, 0x60, - 0x28, 0x56, 0x07, 0x02, 0x69, 0x9c, 0x56, 0xa4, 0x49, 0x3d, 0x12, 0x71, 0x2f, 0x4e, 0xf2, 0x12, - 0xac, 0xa5, 0x71, 0x16, 0xa7, 0x45, 0xbd, 0xf2, 0x0b, 0x90, 0xf8, 0x07, 0x1c, 0xf8, 0x09, 0xfc, - 0x06, 0x8e, 0x93, 0xb8, 0x70, 0x8a, 0x50, 0xcb, 0x95, 0x03, 0xf9, 0x05, 0x28, 0x76, 0x58, 0x37, - 0x3a, 0x41, 0x8b, 0x76, 0xdb, 0xcd, 0xf1, 0xfb, 0xbe, 0xf7, 0xbe, 0xf7, 0xf9, 0xd9, 0x41, 0x0e, - 0xf7, 0x7c, 0xca, 0xd2, 0x34, 0xe6, 0x3e, 0xcb, 0xb9, 0x48, 0x24, 0xed, 0xf3, 0x20, 0x88, 0xe1, - 0x0d, 0xcb, 0x80, 0x86, 0x00, 0x74, 0xd8, 0xa6, 0x87, 0x03, 0xc8, 0x46, 0x4e, 0x9a, 0x89, 0x5c, - 0x60, 0xc2, 0x3d, 0xdf, 0x39, 0x89, 0x77, 0xa6, 0x78, 0x27, 0x04, 0x70, 0x86, 0x6d, 0xf3, 0x7a, - 0x24, 0x22, 0xa1, 0xe0, 0xb4, 0x5a, 0x69, 0xa6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, 0x4b, 0x5f, 0x27, 0xd6, 0x92, 0xd7, 0x50, 0xff, 0x92, 0x47, 0xbf, 0x02, 0x00, - 0x00, 0xff, 0xff, 0xf4, 0xef, 0xe3, 0xfd, 0x2f, 0x07, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // Gets the fee expected for submitting ReceivePacket msg for the given packet - ReceiveFee(ctx context.Context, in *QueryReceiveFeeRequest, opts ...grpc.CallOption) (*QueryReceiveFeeResponse, error) - // Gets the fee expected for submitting AcknowledgePacket msg for the given packet - AckFee(ctx context.Context, in *QueryAckFeeRequest, opts ...grpc.CallOption) (*QueryAckFeeResponse, error) - // Gets the fee expected for submitting TimeoutPacket msg for the given packet - TimeoutFee(ctx context.Context, in *QueryTimeoutFeeRequest, opts ...grpc.CallOption) (*QueryTimeoutFeeResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) ReceiveFee(ctx context.Context, in *QueryReceiveFeeRequest, opts ...grpc.CallOption) (*QueryReceiveFeeResponse, error) { - out := new(QueryReceiveFeeResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Query/ReceiveFee", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) AckFee(ctx context.Context, in *QueryAckFeeRequest, opts ...grpc.CallOption) (*QueryAckFeeResponse, error) { - out := new(QueryAckFeeResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Query/AckFee", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) TimeoutFee(ctx context.Context, in *QueryTimeoutFeeRequest, opts ...grpc.CallOption) (*QueryTimeoutFeeResponse, error) { - out := new(QueryTimeoutFeeResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Query/TimeoutFee", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - // Gets the fee expected for submitting ReceivePacket msg for the given packet - ReceiveFee(context.Context, *QueryReceiveFeeRequest) (*QueryReceiveFeeResponse, error) - // Gets the fee expected for submitting AcknowledgePacket msg for the given packet - AckFee(context.Context, *QueryAckFeeRequest) (*QueryAckFeeResponse, error) - // Gets the fee expected for submitting TimeoutPacket msg for the given packet - TimeoutFee(context.Context, *QueryTimeoutFeeRequest) (*QueryTimeoutFeeResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) ReceiveFee(ctx context.Context, req *QueryReceiveFeeRequest) (*QueryReceiveFeeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReceiveFee not implemented") -} -func (*UnimplementedQueryServer) AckFee(ctx context.Context, req *QueryAckFeeRequest) (*QueryAckFeeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AckFee not implemented") -} -func (*UnimplementedQueryServer) TimeoutFee(ctx context.Context, req *QueryTimeoutFeeRequest) (*QueryTimeoutFeeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TimeoutFee not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_ReceiveFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryReceiveFeeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ReceiveFee(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.applications.middleware.fee.v1.Query/ReceiveFee", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ReceiveFee(ctx, req.(*QueryReceiveFeeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AckFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAckFeeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AckFee(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.applications.middleware.fee.v1.Query/AckFee", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AckFee(ctx, req.(*QueryAckFeeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_TimeoutFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryTimeoutFeeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).TimeoutFee(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.applications.middleware.fee.v1.Query/TimeoutFee", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).TimeoutFee(ctx, req.(*QueryTimeoutFeeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ibc.applications.middleware.fee.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ReceiveFee", - Handler: _Query_ReceiveFee_Handler, - }, - { - MethodName: "AckFee", - Handler: _Query_AckFee_Handler, - }, - { - MethodName: "TimeoutFee", - Handler: _Query_TimeoutFee_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "ibc/applications/middleware/fee/v1/query.proto", -} - -func (m *QueryReceiveFeeRequest) 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 *QueryReceiveFeeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryReceiveFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RelayerAddress) > 0 { - i -= len(m.RelayerAddress) - copy(dAtA[i:], m.RelayerAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) - i-- - dAtA[i] = 0x22 - } - if len(m.Sequence) > 0 { - i -= len(m.Sequence) - copy(dAtA[i:], m.Sequence) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Sequence))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChannelId) > 0 { - i -= len(m.ChannelId) - copy(dAtA[i:], m.ChannelId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) - i-- - dAtA[i] = 0x12 - } - if len(m.PortId) > 0 { - i -= len(m.PortId) - copy(dAtA[i:], m.PortId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryReceiveFeeResponse) 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 *QueryReceiveFeeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryReceiveFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Fee != nil { - { - size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAckFeeRequest) 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 *QueryAckFeeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAckFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RelayerAddress) > 0 { - i -= len(m.RelayerAddress) - copy(dAtA[i:], m.RelayerAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) - i-- - dAtA[i] = 0x22 - } - if len(m.Sequence) > 0 { - i -= len(m.Sequence) - copy(dAtA[i:], m.Sequence) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Sequence))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChannelId) > 0 { - i -= len(m.ChannelId) - copy(dAtA[i:], m.ChannelId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) - i-- - dAtA[i] = 0x12 - } - if len(m.PortId) > 0 { - i -= len(m.PortId) - copy(dAtA[i:], m.PortId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAckFeeResponse) 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 *QueryAckFeeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAckFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Fee != nil { - { - size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryTimeoutFeeRequest) 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 *QueryTimeoutFeeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTimeoutFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RelayerAddress) > 0 { - i -= len(m.RelayerAddress) - copy(dAtA[i:], m.RelayerAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) - i-- - dAtA[i] = 0x22 - } - if len(m.Sequence) > 0 { - i -= len(m.Sequence) - copy(dAtA[i:], m.Sequence) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Sequence))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChannelId) > 0 { - i -= len(m.ChannelId) - copy(dAtA[i:], m.ChannelId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) - i-- - dAtA[i] = 0x12 - } - if len(m.PortId) > 0 { - i -= len(m.PortId) - copy(dAtA[i:], m.PortId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryTimeoutFeeResponse) 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 *QueryTimeoutFeeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTimeoutFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Fee != nil { - { - size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryReceiveFeeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PortId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.ChannelId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Sequence) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.RelayerAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryReceiveFeeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Fee != nil { - l = m.Fee.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAckFeeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PortId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.ChannelId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Sequence) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.RelayerAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAckFeeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Fee != nil { - l = m.Fee.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryTimeoutFeeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PortId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.ChannelId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Sequence) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.RelayerAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryTimeoutFeeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Fee != nil { - l = m.Fee.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryReceiveFeeRequest) 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 ErrIntOverflowQuery - } - 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: QueryReceiveFeeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryReceiveFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sequence = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RelayerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryReceiveFeeResponse) 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 ErrIntOverflowQuery - } - 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: QueryReceiveFeeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryReceiveFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Fee == nil { - m.Fee = &Fee{} - } - if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAckFeeRequest) 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 ErrIntOverflowQuery - } - 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: QueryAckFeeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAckFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sequence = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RelayerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAckFeeResponse) 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 ErrIntOverflowQuery - } - 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: QueryAckFeeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAckFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Fee == nil { - m.Fee = &Fee{} - } - if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryTimeoutFeeRequest) 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 ErrIntOverflowQuery - } - 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: QueryTimeoutFeeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTimeoutFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sequence = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RelayerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryTimeoutFeeResponse) 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 ErrIntOverflowQuery - } - 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: QueryTimeoutFeeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTimeoutFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Fee == nil { - m.Fee = &Fee{} - } - if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/ibc/applications/middleware/fee/v1/query.pb.gw.go b/ibc/applications/middleware/fee/v1/query.pb.gw.go deleted file mode 100644 index 58b701c17ab..00000000000 --- a/ibc/applications/middleware/fee/v1/query.pb.gw.go +++ /dev/null @@ -1,326 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: ibc/applications/middleware/fee/v1/query.proto - -/* -Package ibc_applications_middleware_fee_v1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package ibc_applications_middleware_fee_v1 - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -var ( - filter_Query_ReceiveFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_ReceiveFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryReceiveFeeRequest - 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_ReceiveFee_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ReceiveFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_ReceiveFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryReceiveFeeRequest - 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_ReceiveFee_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ReceiveFee(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_AckFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_AckFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAckFeeRequest - 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_AckFee_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.AckFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_AckFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAckFeeRequest - 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_AckFee_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.AckFee(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_TimeoutFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_TimeoutFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryTimeoutFeeRequest - 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_TimeoutFee_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.TimeoutFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_TimeoutFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryTimeoutFeeRequest - 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_TimeoutFee_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.TimeoutFee(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". -// UnaryRPC :call QueryServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. -func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - - mux.Handle("GET", pattern_Query_ReceiveFee_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) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_ReceiveFee_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_ReceiveFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_AckFee_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) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_AckFee_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_AckFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_TimeoutFee_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) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_TimeoutFee_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_TimeoutFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterQueryHandler(ctx, mux, conn) -} - -// RegisterQueryHandler registers the http handlers for service Query to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) -} - -// RegisterQueryHandlerClient registers the http handlers for service Query -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "QueryClient" to call the correct interceptors. -func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - - mux.Handle("GET", pattern_Query_ReceiveFee_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) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_ReceiveFee_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_ReceiveFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_AckFee_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) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_AckFee_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_AckFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_TimeoutFee_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) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_TimeoutFee_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_TimeoutFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Query_ReceiveFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "receive_fee"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_Query_AckFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "ack_fee"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_Query_TimeoutFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "timeout_fee"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_Query_ReceiveFee_0 = runtime.ForwardResponseMessage - - forward_Query_AckFee_0 = runtime.ForwardResponseMessage - - forward_Query_TimeoutFee_0 = runtime.ForwardResponseMessage -) diff --git a/ibc/applications/middleware/fee/v1/tx.pb.go b/ibc/applications/middleware/fee/v1/tx.pb.go deleted file mode 100644 index d37008a0709..00000000000 --- a/ibc/applications/middleware/fee/v1/tx.pb.go +++ /dev/null @@ -1,1173 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/applications/middleware/fee/v1/tx.proto - -package ibc_applications_middleware_fee_v1 - -import ( - context "context" - fmt "fmt" - types "github.com/cosmos/ibc-go/modules/core/04-channel/types" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// MsgRegisterCounterPartyAddress is the request type for registering the counter party address -type MsgRegisterCounterPartyAddress struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` - CounterpartyAddress string `protobuf:"bytes,2,opt,name=counterparty_address,json=counterpartyAddress,proto3" json:"counterparty_address,omitempty" yaml:"address"` -} - -func (m *MsgRegisterCounterPartyAddress) Reset() { *m = MsgRegisterCounterPartyAddress{} } -func (m *MsgRegisterCounterPartyAddress) String() string { return proto.CompactTextString(m) } -func (*MsgRegisterCounterPartyAddress) ProtoMessage() {} -func (*MsgRegisterCounterPartyAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_faf7cf2f6149e2c8, []int{0} -} -func (m *MsgRegisterCounterPartyAddress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRegisterCounterPartyAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRegisterCounterPartyAddress.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 *MsgRegisterCounterPartyAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRegisterCounterPartyAddress.Merge(m, src) -} -func (m *MsgRegisterCounterPartyAddress) XXX_Size() int { - return m.Size() -} -func (m *MsgRegisterCounterPartyAddress) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRegisterCounterPartyAddress.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRegisterCounterPartyAddress proto.InternalMessageInfo - -// MsgRegisterCounterPartyAddressResponse defines the Msg/RegisterCounteryPartyAddress response type -type MsgRegisterCounterPartyAddressResponse struct { -} - -func (m *MsgRegisterCounterPartyAddressResponse) Reset() { - *m = MsgRegisterCounterPartyAddressResponse{} -} -func (m *MsgRegisterCounterPartyAddressResponse) String() string { return proto.CompactTextString(m) } -func (*MsgRegisterCounterPartyAddressResponse) ProtoMessage() {} -func (*MsgRegisterCounterPartyAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_faf7cf2f6149e2c8, []int{1} -} -func (m *MsgRegisterCounterPartyAddressResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRegisterCounterPartyAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRegisterCounterPartyAddressResponse.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 *MsgRegisterCounterPartyAddressResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRegisterCounterPartyAddressResponse.Merge(m, src) -} -func (m *MsgRegisterCounterPartyAddressResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgRegisterCounterPartyAddressResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRegisterCounterPartyAddressResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRegisterCounterPartyAddressResponse proto.InternalMessageInfo - -// MsgEscrowPacketFee defines the request type EscrowPacketFee RPC -type MsgEscrowPacketFee struct { - PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"packet_id"` - ReceiveFee *Fee `protobuf:"bytes,2,opt,name=receive_fee,json=receiveFee,proto3" json:"receive_fee,omitempty" yaml:"receive_fee"` - AckFee *Fee `protobuf:"bytes,3,opt,name=ack_fee,json=ackFee,proto3" json:"ack_fee,omitempty" yaml:"ack_fee"` - TimeoutFee *Fee `protobuf:"bytes,4,opt,name=timeout_fee,json=timeoutFee,proto3" json:"timeout_fee,omitempty" yaml:"timeout_fee"` - Relayers []string `protobuf:"bytes,5,rep,name=relayers,proto3" json:"relayers,omitempty" yaml:"relayers"` -} - -func (m *MsgEscrowPacketFee) Reset() { *m = MsgEscrowPacketFee{} } -func (m *MsgEscrowPacketFee) String() string { return proto.CompactTextString(m) } -func (*MsgEscrowPacketFee) ProtoMessage() {} -func (*MsgEscrowPacketFee) Descriptor() ([]byte, []int) { - return fileDescriptor_faf7cf2f6149e2c8, []int{2} -} -func (m *MsgEscrowPacketFee) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgEscrowPacketFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgEscrowPacketFee.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 *MsgEscrowPacketFee) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgEscrowPacketFee.Merge(m, src) -} -func (m *MsgEscrowPacketFee) XXX_Size() int { - return m.Size() -} -func (m *MsgEscrowPacketFee) XXX_DiscardUnknown() { - xxx_messageInfo_MsgEscrowPacketFee.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgEscrowPacketFee proto.InternalMessageInfo - -func (m *MsgEscrowPacketFee) GetPacketId() *types.PacketId { - if m != nil { - return m.PacketId - } - return nil -} - -func (m *MsgEscrowPacketFee) GetReceiveFee() *Fee { - if m != nil { - return m.ReceiveFee - } - return nil -} - -func (m *MsgEscrowPacketFee) GetAckFee() *Fee { - if m != nil { - return m.AckFee - } - return nil -} - -func (m *MsgEscrowPacketFee) GetTimeoutFee() *Fee { - if m != nil { - return m.TimeoutFee - } - return nil -} - -func (m *MsgEscrowPacketFee) GetRelayers() []string { - if m != nil { - return m.Relayers - } - return nil -} - -// MsgEscrowPacketFeeResponse defines the response type for Msg/EscrowPacketFee -type MsgEscrowPacketFeeResponse struct { -} - -func (m *MsgEscrowPacketFeeResponse) Reset() { *m = MsgEscrowPacketFeeResponse{} } -func (m *MsgEscrowPacketFeeResponse) String() string { return proto.CompactTextString(m) } -func (*MsgEscrowPacketFeeResponse) ProtoMessage() {} -func (*MsgEscrowPacketFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_faf7cf2f6149e2c8, []int{3} -} -func (m *MsgEscrowPacketFeeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgEscrowPacketFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgEscrowPacketFeeResponse.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 *MsgEscrowPacketFeeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgEscrowPacketFeeResponse.Merge(m, src) -} -func (m *MsgEscrowPacketFeeResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgEscrowPacketFeeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgEscrowPacketFeeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgEscrowPacketFeeResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*MsgRegisterCounterPartyAddress)(nil), "ibc.applications.middleware.fee.v1.MsgRegisterCounterPartyAddress") - proto.RegisterType((*MsgRegisterCounterPartyAddressResponse)(nil), "ibc.applications.middleware.fee.v1.MsgRegisterCounterPartyAddressResponse") - proto.RegisterType((*MsgEscrowPacketFee)(nil), "ibc.applications.middleware.fee.v1.MsgEscrowPacketFee") - proto.RegisterType((*MsgEscrowPacketFeeResponse)(nil), "ibc.applications.middleware.fee.v1.MsgEscrowPacketFeeResponse") -} - -func init() { - proto.RegisterFile("ibc/applications/middleware/fee/v1/tx.proto", fileDescriptor_faf7cf2f6149e2c8) -} - -var fileDescriptor_faf7cf2f6149e2c8 = []byte{ - // 514 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x4f, 0x6b, 0x13, 0x41, - 0x18, 0xc6, 0xb3, 0x8d, 0xb6, 0xc9, 0x04, 0xac, 0x4c, 0x83, 0x84, 0xa8, 0xbb, 0x75, 0x0e, 0x1a, - 0xb0, 0xcc, 0x92, 0x08, 0x1e, 0x7a, 0x10, 0x5c, 0x69, 0x41, 0x21, 0x10, 0x16, 0xef, 0xe9, 0x64, - 0xf6, 0xcd, 0xba, 0xe4, 0xcf, 0x2c, 0x33, 0xdb, 0xd4, 0x7c, 0x03, 0xbd, 0xf9, 0x0d, 0xec, 0x17, - 0xf0, 0xe0, 0x47, 0xf0, 0xe6, 0xb1, 0x47, 0x4f, 0x41, 0x92, 0x8b, 0xe7, 0x7c, 0x02, 0x99, 0x9d, - 0xdd, 0x1a, 0x2a, 0xc6, 0x58, 0x6f, 0x33, 0xbc, 0xcf, 0xf3, 0x9b, 0xe7, 0x9d, 0x77, 0x18, 0xf4, - 0x38, 0xea, 0x71, 0x97, 0xc5, 0xf1, 0x30, 0xe2, 0x2c, 0x89, 0xc4, 0x58, 0xb9, 0xa3, 0x28, 0x08, - 0x86, 0x70, 0xc6, 0x24, 0xb8, 0x7d, 0x00, 0x77, 0xd2, 0x74, 0x93, 0xb7, 0x34, 0x96, 0x22, 0x11, - 0x98, 0x44, 0x3d, 0x4e, 0x57, 0xc5, 0xf4, 0x97, 0x98, 0xf6, 0x01, 0xe8, 0xa4, 0x59,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ff, 0xff, 0xcb, 0x2a, 0xc8, 0x67, 0xbc, 0x04, - 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MsgClient interface { - // RegisterCounterPartyAddress defines a rpc handler method for MsgRegisterCounterPartyAddress - // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their - // counterparty address before relaying This ensures they will be properly compensated for forward relaying since - // destination chain must send back relayer's source address (counterparty address) in acknowledgement This function - // may be called more than once by a relayer, in which case, latest counterparty address is always used. - RegisterCounterPartyAddress(ctx context.Context, in *MsgRegisterCounterPartyAddress, opts ...grpc.CallOption) (*MsgRegisterCounterPartyAddressResponse, error) - // EscrowPacketFee defines a rpc handler method for MsgEscrowPacketFee - // EscrowPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to - // incentivize the relaying of the given packet. - EscrowPacketFee(ctx context.Context, in *MsgEscrowPacketFee, opts ...grpc.CallOption) (*MsgEscrowPacketFeeResponse, error) -} - -type msgClient struct { - cc grpc1.ClientConn -} - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) RegisterCounterPartyAddress(ctx context.Context, in *MsgRegisterCounterPartyAddress, opts ...grpc.CallOption) (*MsgRegisterCounterPartyAddressResponse, error) { - out := new(MsgRegisterCounterPartyAddressResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Msg/RegisterCounterPartyAddress", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) EscrowPacketFee(ctx context.Context, in *MsgEscrowPacketFee, opts ...grpc.CallOption) (*MsgEscrowPacketFeeResponse, error) { - out := new(MsgEscrowPacketFeeResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Msg/EscrowPacketFee", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { - // RegisterCounterPartyAddress defines a rpc handler method for MsgRegisterCounterPartyAddress - // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their - // counterparty address before relaying This ensures they will be properly compensated for forward relaying since - // destination chain must send back relayer's source address (counterparty address) in acknowledgement This function - // may be called more than once by a relayer, in which case, latest counterparty address is always used. - RegisterCounterPartyAddress(context.Context, *MsgRegisterCounterPartyAddress) (*MsgRegisterCounterPartyAddressResponse, error) - // EscrowPacketFee defines a rpc handler method for MsgEscrowPacketFee - // EscrowPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to - // incentivize the relaying of the given packet. - EscrowPacketFee(context.Context, *MsgEscrowPacketFee) (*MsgEscrowPacketFeeResponse, error) -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (*UnimplementedMsgServer) RegisterCounterPartyAddress(ctx context.Context, req *MsgRegisterCounterPartyAddress) (*MsgRegisterCounterPartyAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterCounterPartyAddress not implemented") -} -func (*UnimplementedMsgServer) EscrowPacketFee(ctx context.Context, req *MsgEscrowPacketFee) (*MsgEscrowPacketFeeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EscrowPacketFee not implemented") -} - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -func _Msg_RegisterCounterPartyAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRegisterCounterPartyAddress) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RegisterCounterPartyAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.applications.middleware.fee.v1.Msg/RegisterCounterPartyAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RegisterCounterPartyAddress(ctx, req.(*MsgRegisterCounterPartyAddress)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_EscrowPacketFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgEscrowPacketFee) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).EscrowPacketFee(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.applications.middleware.fee.v1.Msg/EscrowPacketFee", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).EscrowPacketFee(ctx, req.(*MsgEscrowPacketFee)) - } - return interceptor(ctx, in, info, handler) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ibc.applications.middleware.fee.v1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "RegisterCounterPartyAddress", - Handler: _Msg_RegisterCounterPartyAddress_Handler, - }, - { - MethodName: "EscrowPacketFee", - Handler: _Msg_EscrowPacketFee_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "ibc/applications/middleware/fee/v1/tx.proto", -} - -func (m *MsgRegisterCounterPartyAddress) 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 *MsgRegisterCounterPartyAddress) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRegisterCounterPartyAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.CounterpartyAddress) > 0 { - i -= len(m.CounterpartyAddress) - copy(dAtA[i:], m.CounterpartyAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.CounterpartyAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgRegisterCounterPartyAddressResponse) 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 *MsgRegisterCounterPartyAddressResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRegisterCounterPartyAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgEscrowPacketFee) 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 *MsgEscrowPacketFee) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgEscrowPacketFee) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Relayers) > 0 { - for iNdEx := len(m.Relayers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Relayers[iNdEx]) - copy(dAtA[i:], m.Relayers[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.Relayers[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if m.TimeoutFee != nil { - { - size, err := m.TimeoutFee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.AckFee != nil { - { - size, err := m.AckFee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.ReceiveFee != nil { - { - size, err := m.ReceiveFee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.PacketId != nil { - { - size, err := m.PacketId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgEscrowPacketFeeResponse) 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 *MsgEscrowPacketFeeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgEscrowPacketFeeResponse) 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 - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgRegisterCounterPartyAddress) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.CounterpartyAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgRegisterCounterPartyAddressResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgEscrowPacketFee) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PacketId != nil { - l = m.PacketId.Size() - n += 1 + l + sovTx(uint64(l)) - } - if m.ReceiveFee != nil { - l = m.ReceiveFee.Size() - n += 1 + l + sovTx(uint64(l)) - } - if m.AckFee != nil { - l = m.AckFee.Size() - n += 1 + l + sovTx(uint64(l)) - } - if m.TimeoutFee != nil { - l = m.TimeoutFee.Size() - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Relayers) > 0 { - for _, s := range m.Relayers { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func (m *MsgEscrowPacketFeeResponse) 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 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgRegisterCounterPartyAddress) 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: MsgRegisterCounterPartyAddress: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterCounterPartyAddress: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var 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.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyAddress", 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.CounterpartyAddress = string(dAtA[iNdEx:postIndex]) - 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 *MsgRegisterCounterPartyAddressResponse) 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: MsgRegisterCounterPartyAddressResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterCounterPartyAddressResponse: 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 (m *MsgEscrowPacketFee) 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: MsgEscrowPacketFee: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgEscrowPacketFee: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PacketId", 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 m.PacketId == nil { - m.PacketId = &types.PacketId{} - } - if err := m.PacketId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReceiveFee", 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 m.ReceiveFee == nil { - m.ReceiveFee = &Fee{} - } - if err := m.ReceiveFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AckFee", 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 m.AckFee == nil { - m.AckFee = &Fee{} - } - if err := m.AckFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutFee", 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 m.TimeoutFee == nil { - m.TimeoutFee = &Fee{} - } - if err := m.TimeoutFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Relayers", 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.Relayers = append(m.Relayers, string(dAtA[iNdEx:postIndex])) - 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 *MsgEscrowPacketFeeResponse) 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: MsgEscrowPacketFeeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgEscrowPacketFeeResponse: 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 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTx - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTx - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTx - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") -) diff --git a/modules/apps/29-fee/types/fee.pb.go b/modules/apps/29-fee/types/fee.pb.go index dc66eddb9cc..55a5fd7beb3 100644 --- a/modules/apps/29-fee/types/fee.pb.go +++ b/modules/apps/29-fee/types/fee.pb.go @@ -5,8 +5,10 @@ package types import ( fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/ibc-go/modules/core/04-channel/types" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" @@ -28,7 +30,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // See Fee Payment Middleware spec: // https://github.com/cosmos/ibc/tree/master/spec/app/ics-029-fee-payment#fee-middleware-contract type Fee struct { - Amount *types.Coin `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` } func (m *Fee) Reset() { *m = Fee{} } @@ -64,7 +66,7 @@ func (m *Fee) XXX_DiscardUnknown() { var xxx_messageInfo_Fee proto.InternalMessageInfo -func (m *Fee) GetAmount() *types.Coin { +func (m *Fee) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.Amount } @@ -134,27 +136,30 @@ func init() { } var fileDescriptor_9a4c0273395d2c1a = []byte{ - // 312 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0x3f, 0x4f, 0x02, 0x41, - 0x10, 0xc5, 0x39, 0x49, 0x88, 0x9e, 0x1d, 0x36, 0x48, 0xe2, 0x46, 0x69, 0xb4, 0x90, 0xd9, 0x1c, - 0x36, 0x62, 0xa9, 0x09, 0x09, 0x89, 0x85, 0xa1, 0xb4, 0x31, 0xfb, 0x67, 0x80, 0x8d, 0x77, 0x3b, - 0x17, 0x76, 0xc1, 0xf8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x2b, 0x80, 0x11, 0xe2, 0x84, 0x3d, - 0xb7, 0xf7, 0x1f, 0x1b, 0x91, 0xac, 0x37, 0x22, 0xf9, 0xda, 0x88, 0xe4, 0x7d, 0x2b, 0x1a, 0xeb, - 0xad, 0x68, 0x7c, 0x6e, 0x45, 0xe3, 0x71, 0x30, 0x73, 0x71, 0xbe, 0xd4, 0x60, 0xa8, 0x90, 0x75, - 0x61, 0x4e, 0x9b, 0xfe, 0x8c, 0x64, 0x41, 0x76, 0x99, 0x63, 0xe0, 0xa5, 0x04, 0x39, 0x18, 0xf6, - 0x79, 0x09, 0xf1, 0xb5, 0xc4, 0xa0, 0x5b, 0xbb, 0x76, 0xae, 0xbe, 0x03, 0x00, 0x00, 0xff, 0xff, - 0x5b, 0x66, 0x0f, 0xf0, 0xb4, 0x01, 0x00, 0x00, + // 354 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x51, 0xb1, 0x4e, 0xeb, 0x40, + 0x10, 0xb4, 0x5f, 0xa4, 0xe8, 0x3d, 0xa7, 0xcb, 0xa3, 0x08, 0x91, 0x70, 0x42, 0x1a, 0x52, 0x90, + 0x3d, 0x6c, 0xaa, 0x50, 0x06, 0x29, 0x52, 0x24, 0x0a, 0x94, 0x92, 0x06, 0x9d, 0xef, 0x36, 0xce, + 0x11, 0xdb, 0x6b, 0xe5, 0x2e, 0x41, 0xfc, 0x03, 0x05, 0xdf, 0xc1, 0x97, 0xa4, 0x4c, 0x49, 0x05, + 0x28, 0xf9, 0x11, 0x74, 0xb6, 0x11, 0x48, 0x14, 0x54, 0x3b, 0x77, 0x9a, 0xd9, 0x99, 0xdd, 0xf5, + 0x4e, 0x55, 0x24, 0x18, 0xcf, 0xf3, 0x44, 0x09, 0x6e, 0x14, 0x65, 0x9a, 0xa5, 0x4a, 0xca, 0x04, + 0xef, 0xf9, 0x12, 0xd9, 0x0c, 0x91, 0xad, 0x03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x09, 0x63, 0xc4, + 0xa9, 0xd5, 0x8c, 0xae, 0x36, 0x3b, 0xdf, 0xdd, 0xee, 0x7c, 0xf7, 0x7d, 0xe7, 0xbb, 0x4f, 0x7b, + 0xdf, 0xd9, 0xee, 0x7d, 0xe7, 0x65, 0xef, 0x3b, 0x37, 0xe1, 0xcf, 0xd1, 0x54, 0x24, 0x06, 0x31, + 0xb1, 0x94, 0xe4, 0x2a, 0x41, 0x6d, 0x8f, 0xab, 0x59, 0x38, 0x1c, 0xd8, 0x63, 0x16, 0xa3, 0x46, + 0xf5, 0x62, 0x9f, 0xe7, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x07, 0x16, 0x98, 0xc3, 0xfc, 0x01, + 0x00, 0x00, } func (m *Fee) Marshal() (dAtA []byte, err error) { @@ -177,17 +182,19 @@ func (m *Fee) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Amount != nil { - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFee(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintFee(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - i-- - dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -256,9 +263,11 @@ func (m *Fee) Size() (n int) { } var l int _ = l - if m.Amount != nil { - l = m.Amount.Size() - n += 1 + l + sovFee(uint64(l)) + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovFee(uint64(l)) + } } return n } @@ -344,10 +353,8 @@ func (m *Fee) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Amount == nil { - m.Amount = &types.Coin{} - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Amount = append(m.Amount, types.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/proto/ibc/applications/middleware/fee/v1/fee.proto b/proto/ibc/applications/middleware/fee/v1/fee.proto index 1d47f05c3b2..dc1e8905d18 100644 --- a/proto/ibc/applications/middleware/fee/v1/fee.proto +++ b/proto/ibc/applications/middleware/fee/v1/fee.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package ibc.applications.middleware.fee.v1; import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; import "ibc/core/channel/v1/channel.proto"; option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; @@ -9,7 +10,8 @@ option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; // See Fee Payment Middleware spec: // https://github.com/cosmos/ibc/tree/master/spec/app/ics-029-fee-payment#fee-middleware-contract message Fee { - cosmos.base.v1beta1.Coin amount = 1; + repeated cosmos.base.v1beta1.Coin amount = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } // Fee associated with a packet_id From fd267d0f4cd7c6114d2b2f596049725339d44d94 Mon Sep 17 00:00:00 2001 From: Sean King Date: Thu, 22 Jul 2021 12:50:58 +0200 Subject: [PATCH 16/26] fix: naming --- modules/apps/29-fee/types/genesis.pb.go | 62 +++++++++---------- .../middleware/fee/v1/genesis.proto | 4 +- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/modules/apps/29-fee/types/genesis.pb.go b/modules/apps/29-fee/types/genesis.pb.go index 0d01033da92..c058269be21 100644 --- a/modules/apps/29-fee/types/genesis.pb.go +++ b/modules/apps/29-fee/types/genesis.pb.go @@ -27,7 +27,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the fee middleware genesis state type GenesisState struct { // A mapping of packets -> escrowed fees - PacketsFeesMap []*IdentifiedPacketFee `protobuf:"bytes,1,rep,name=packets_fees_map,json=packetsFeesMap,proto3" json:"packets_fees_map,omitempty" yaml:"packets_fees_map"` + PacketsFees []*IdentifiedPacketFee `protobuf:"bytes,1,rep,name=packets_fees,json=packetsFees,proto3" json:"packets_fees,omitempty" yaml:"packets_fees_map"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -63,9 +63,9 @@ func (m *GenesisState) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisState proto.InternalMessageInfo -func (m *GenesisState) GetPacketsFeesMap() []*IdentifiedPacketFee { +func (m *GenesisState) GetPacketsFees() []*IdentifiedPacketFee { if m != nil { - return m.PacketsFeesMap + return m.PacketsFees } return nil } @@ -79,26 +79,26 @@ func init() { } var fileDescriptor_6a4f6c8d78b5dfbf = []byte{ - // 297 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x31, 0x4b, 0x03, 0x31, - 0x00, 0x85, 0x7b, 0x08, 0x0e, 0x55, 0x44, 0x8a, 0xa0, 0x54, 0x88, 0x7a, 0x93, 0x83, 0x4d, 0x6c, - 0x1d, 0x44, 0xc7, 0x0e, 0x15, 0x41, 0x41, 0x74, 0x73, 0x29, 0xb9, 0xdc, 0xbb, 0x6b, 0xf0, 0x72, - 0x09, 0x97, 0xb4, 0xd2, 0xc5, 0x9f, 0x20, 0xfe, 0x2c, 0xc7, 0x8e, 0x4e, 0x22, 0x77, 0xff, 0xc0, - 0x5f, 0x20, 0xb9, 0x2b, 0x28, 0x2e, 0xba, 0x3d, 0x92, 0xef, 0xbd, 0xbc, 0xbc, 0xf6, 0xb1, 0x8c, - 0x04, 0xe3, 0xc6, 0x64, 0x52, 0x70, 0x27, 0x75, 0x6e, 0x99, 0x92, 0x71, 0x9c, 0xe1, 0x91, 0x17, - 0x60, 0x09, 0xc0, 0x66, 0x7d, 0x96, 0x22, 0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0x00, 0xff, - 0xff, 0xd7, 0x1d, 0xc7, 0xed, 0xa4, 0x01, 0x00, 0x00, + // 294 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xb1, 0x4e, 0xf3, 0x30, + 0x00, 0x84, 0x1b, 0xfd, 0xd2, 0x3f, 0xb4, 0x9d, 0x2a, 0x24, 0x50, 0x91, 0x0c, 0x64, 0x62, 0xa0, + 0x36, 0x0d, 0x03, 0x82, 0xb1, 0x43, 0x11, 0x12, 0x03, 0x82, 0x8d, 0xa5, 0x72, 0x9c, 0x4b, 0x6a, + 0x11, 0xc7, 0x56, 0xec, 0xb6, 0xea, 0x13, 0xb0, 0xf2, 0x58, 0x8c, 0x1d, 0x99, 0x10, 0x4a, 0xde, + 0x80, 0x27, 0x40, 0x4e, 0x2a, 0xd1, 0x0d, 0xb6, 0x93, 0xfd, 0xdd, 0xf9, 0x7c, 0xdd, 0x73, 0x19, + 0x0b, 0xc6, 0x8d, 0xc9, 0xa5, 0xe0, 0x4e, 0xea, 0xc2, 0x32, 0x25, 0x93, 0x24, 0xc7, 0x8a, 0x97, + 0x60, 0x29, 0xc0, 0x96, 0x63, 0x96, 0xa1, 0x80, 0x95, 0x96, 0x9a, 0x52, 0x3b, 0x3d, 0x08, 0x65, + 0x2c, 0xe8, 0xae, 0x83, 0xfe, 0x38, 0x68, 0x0a, 0xd0, 0xe5, 0x78, 0xb8, 0x97, 0xe9, 0x4c, 0x37, + 0x38, 0xf3, 0xaa, 0x75, 0x0e, 0xcf, 0xfe, 0xf0, 0x96, 0x0f, 0x68, 0xe9, 0x13, 0x4f, 0x0b, 0x5d, + 0x82, 0x89, 0x39, 0x2f, 0x0a, 0xe4, 0xfe, 0x7a, 0x2b, 0x5b, 0x24, 0x7c, 0x09, 0xba, 0xfd, 0x9b, + 0xb6, 0xdc, 0xa3, 0xe3, 0x0e, 0x83, 0x55, 0xb7, 0x6f, 0xb8, 0x78, 0x86, 0xb3, 0xb3, 0x14, 0xb0, + 0x07, 0xc1, 0xf1, 0xbf, 0xd3, 0x5e, 0x74, 0x49, 0x7f, 0xaf, 0x4c, 0x6f, 0x13, 0x14, 0x4e, 0xa6, + 0x12, 0xc9, 0x7d, 0x93, 0x30, 0x05, 0x26, 0x87, 0x5f, 0x1f, 0x47, 0xfb, 0x6b, 0xae, 0xf2, 0xeb, + 0x70, 0x37, 0x76, 0xa6, 0xb8, 0x09, 0x1f, 0x7a, 0xdb, 0xa3, 0x29, 0x60, 0x27, 0x77, 0x6f, 0x15, + 0x09, 0x36, 0x15, 0x09, 0x3e, 0x2b, 0x12, 0xbc, 0xd6, 0xa4, 0xb3, 0xa9, 0x49, 0xe7, 0xbd, 0x26, + 0x9d, 0xa7, 0x28, 0x93, 0x6e, 0xbe, 0x88, 0xa9, 0xd0, 0x8a, 0x09, 0x6d, 0x95, 0xb6, 0x4c, 0xc6, + 0x62, 0x94, 0x69, 0xa6, 0x74, 0xb2, 0xc8, 0x61, 0xfd, 0x22, 0x96, 0x45, 0x57, 0x23, 0xbf, 0x80, + 0x5b, 0x1b, 0xd8, 0xf8, 0x7f, 0xf3, 0xbd, 0x8b, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x19, + 0xaf, 0x82, 0x9d, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -121,10 +121,10 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.PacketsFeesMap) > 0 { - for iNdEx := len(m.PacketsFeesMap) - 1; iNdEx >= 0; iNdEx-- { + if len(m.PacketsFees) > 0 { + for iNdEx := len(m.PacketsFees) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.PacketsFeesMap[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.PacketsFees[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -155,8 +155,8 @@ func (m *GenesisState) Size() (n int) { } var l int _ = l - if len(m.PacketsFeesMap) > 0 { - for _, e := range m.PacketsFeesMap { + if len(m.PacketsFees) > 0 { + for _, e := range m.PacketsFees { l = e.Size() n += 1 + l + sovGenesis(uint64(l)) } @@ -201,7 +201,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PacketsFeesMap", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PacketsFees", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -228,8 +228,8 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PacketsFeesMap = append(m.PacketsFeesMap, &IdentifiedPacketFee{}) - if err := m.PacketsFeesMap[len(m.PacketsFeesMap)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.PacketsFees = append(m.PacketsFees, &IdentifiedPacketFee{}) + if err := m.PacketsFees[len(m.PacketsFees)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/proto/ibc/applications/middleware/fee/v1/genesis.proto b/proto/ibc/applications/middleware/fee/v1/genesis.proto index 2e98da051d8..e464abd4405 100644 --- a/proto/ibc/applications/middleware/fee/v1/genesis.proto +++ b/proto/ibc/applications/middleware/fee/v1/genesis.proto @@ -10,6 +10,6 @@ option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; // GenesisState defines the fee middleware genesis state message GenesisState { // A mapping of packets -> escrowed fees - repeated ibc.applications.middleware.fee.v1.IdentifiedPacketFee packets_fees_map = 1 - [(gogoproto.moretags) = "yaml:\"packets_fees_map\""]; + repeated ibc.applications.middleware.fee.v1.IdentifiedPacketFee packets_fees = 1 + [(gogoproto.moretags) = "yaml:\"packets_fees\""]; } From 44c4cdb957e270900eca10864456b32469c02c9a Mon Sep 17 00:00:00 2001 From: Aditya Sripal Date: Thu, 22 Jul 2021 13:15:05 +0200 Subject: [PATCH 17/26] increase max depth for proto file searching and make proto all --- docs/ibc/proto-docs.md | 927 ++++++++++++++++-------- modules/apps/29-fee/types/genesis.pb.go | 40 +- scripts/protocgen.sh | 2 +- 3 files changed, 657 insertions(+), 312 deletions(-) diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md index 5622278cfae..3e8b1220281 100644 --- a/docs/ibc/proto-docs.md +++ b/docs/ibc/proto-docs.md @@ -4,6 +4,54 @@ ## Table of Contents +- [ibc/core/client/v1/client.proto](#ibc/core/client/v1/client.proto) + - [ClientConsensusStates](#ibc.core.client.v1.ClientConsensusStates) + - [ClientUpdateProposal](#ibc.core.client.v1.ClientUpdateProposal) + - [ConsensusStateWithHeight](#ibc.core.client.v1.ConsensusStateWithHeight) + - [Height](#ibc.core.client.v1.Height) + - [IdentifiedClientState](#ibc.core.client.v1.IdentifiedClientState) + - [Params](#ibc.core.client.v1.Params) + - [UpgradeProposal](#ibc.core.client.v1.UpgradeProposal) + +- [ibc/core/channel/v1/channel.proto](#ibc/core/channel/v1/channel.proto) + - [Acknowledgement](#ibc.core.channel.v1.Acknowledgement) + - [Channel](#ibc.core.channel.v1.Channel) + - [Counterparty](#ibc.core.channel.v1.Counterparty) + - [IdentifiedChannel](#ibc.core.channel.v1.IdentifiedChannel) + - [Packet](#ibc.core.channel.v1.Packet) + - [PacketId](#ibc.core.channel.v1.PacketId) + - [PacketState](#ibc.core.channel.v1.PacketState) + + - [Order](#ibc.core.channel.v1.Order) + - [State](#ibc.core.channel.v1.State) + +- [ibc/applications/middleware/fee/v1/fee.proto](#ibc/applications/middleware/fee/v1/fee.proto) + - [Fee](#ibc.applications.middleware.fee.v1.Fee) + - [IdentifiedPacketFee](#ibc.applications.middleware.fee.v1.IdentifiedPacketFee) + +- [ibc/applications/middleware/fee/v1/genesis.proto](#ibc/applications/middleware/fee/v1/genesis.proto) + - [GenesisState](#ibc.applications.middleware.fee.v1.GenesisState) + +- [ibc/applications/middleware/fee/v1/query.proto](#ibc/applications/middleware/fee/v1/query.proto) + - [QueryAckFeeRequest](#ibc.applications.middleware.fee.v1.QueryAckFeeRequest) + - [QueryAckFeeResponse](#ibc.applications.middleware.fee.v1.QueryAckFeeResponse) + - [QueryIncentivizedPacketsRequest](#ibc.applications.middleware.fee.v1.QueryIncentivizedPacketsRequest) + - [QueryIncentivizedPacketsResponse](#ibc.applications.middleware.fee.v1.QueryIncentivizedPacketsResponse) + - [QueryReceiveFeeRequest](#ibc.applications.middleware.fee.v1.QueryReceiveFeeRequest) + - [QueryReceiveFeeResponse](#ibc.applications.middleware.fee.v1.QueryReceiveFeeResponse) + - [QueryTimeoutFeeRequest](#ibc.applications.middleware.fee.v1.QueryTimeoutFeeRequest) + - [QueryTimeoutFeeResponse](#ibc.applications.middleware.fee.v1.QueryTimeoutFeeResponse) + + - [Query](#ibc.applications.middleware.fee.v1.Query) + +- [ibc/applications/middleware/fee/v1/tx.proto](#ibc/applications/middleware/fee/v1/tx.proto) + - [MsgEscrowPacketFee](#ibc.applications.middleware.fee.v1.MsgEscrowPacketFee) + - [MsgEscrowPacketFeeResponse](#ibc.applications.middleware.fee.v1.MsgEscrowPacketFeeResponse) + - [MsgRegisterCounterPartyAddressResponse](#ibc.applications.middleware.fee.v1.MsgRegisterCounterPartyAddressResponse) + - [MsgRegisterCounterpartyAddress](#ibc.applications.middleware.fee.v1.MsgRegisterCounterpartyAddress) + + - [Msg](#ibc.applications.middleware.fee.v1.Msg) + - [ibc/applications/transfer/v1/transfer.proto](#ibc/applications/transfer/v1/transfer.proto) - [DenomTrace](#ibc.applications.transfer.v1.DenomTrace) - [FungibleTokenPacketData](#ibc.applications.transfer.v1.FungibleTokenPacketData) @@ -22,33 +70,12 @@ - [Query](#ibc.applications.transfer.v1.Query) -- [ibc/core/client/v1/client.proto](#ibc/core/client/v1/client.proto) - - [ClientConsensusStates](#ibc.core.client.v1.ClientConsensusStates) - - [ClientUpdateProposal](#ibc.core.client.v1.ClientUpdateProposal) - - [ConsensusStateWithHeight](#ibc.core.client.v1.ConsensusStateWithHeight) - - [Height](#ibc.core.client.v1.Height) - - [IdentifiedClientState](#ibc.core.client.v1.IdentifiedClientState) - - [Params](#ibc.core.client.v1.Params) - - [UpgradeProposal](#ibc.core.client.v1.UpgradeProposal) - - [ibc/applications/transfer/v1/tx.proto](#ibc/applications/transfer/v1/tx.proto) - [MsgTransfer](#ibc.applications.transfer.v1.MsgTransfer) - [MsgTransferResponse](#ibc.applications.transfer.v1.MsgTransferResponse) - [Msg](#ibc.applications.transfer.v1.Msg) -- [ibc/core/channel/v1/channel.proto](#ibc/core/channel/v1/channel.proto) - - [Acknowledgement](#ibc.core.channel.v1.Acknowledgement) - - [Channel](#ibc.core.channel.v1.Channel) - - [Counterparty](#ibc.core.channel.v1.Counterparty) - - [IdentifiedChannel](#ibc.core.channel.v1.IdentifiedChannel) - - [Packet](#ibc.core.channel.v1.Packet) - - [PacketId](#ibc.core.channel.v1.PacketId) - - [PacketState](#ibc.core.channel.v1.PacketState) - - - [Order](#ibc.core.channel.v1.Order) - - [State](#ibc.core.channel.v1.State) - - [ibc/core/channel/v1/genesis.proto](#ibc/core/channel/v1/genesis.proto) - [GenesisState](#ibc.core.channel.v1.GenesisState) - [PacketSequence](#ibc.core.channel.v1.PacketSequence) @@ -247,361 +274,406 @@ - +

Top

-## ibc/applications/transfer/v1/transfer.proto +## ibc/core/client/v1/client.proto - + -### DenomTrace -DenomTrace contains the base denomination for ICS20 fungible tokens and the -source tracing information path. +### ClientConsensusStates +ClientConsensusStates defines all the stored consensus states for a given +client. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `path` | [string](#string) | | path defines the chain of port/channel identifiers used for tracing the source of the fungible token. | -| `base_denom` | [string](#string) | | base denomination of the relayed fungible token. | +| `client_id` | [string](#string) | | client identifier | +| `consensus_states` | [ConsensusStateWithHeight](#ibc.core.client.v1.ConsensusStateWithHeight) | repeated | consensus states and their heights associated with the client | - + -### FungibleTokenPacketData -FungibleTokenPacketData defines a struct for the packet payload -See FungibleTokenPacketData spec: -https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures +### ClientUpdateProposal +ClientUpdateProposal is a governance proposal. If it passes, the substitute +client's latest consensus state is copied over to the subject client. The proposal +handler may fail if the subject and the substitute do not match in client and +chain parameters (with exception to latest height, frozen height, and chain-id). | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | the token denomination to be transferred | -| `amount` | [uint64](#uint64) | | the token amount to be transferred | -| `sender` | [string](#string) | | the sender address | -| `receiver` | [string](#string) | | the recipient address on the destination chain | +| `title` | [string](#string) | | the title of the update proposal | +| `description` | [string](#string) | | the description of the proposal | +| `subject_client_id` | [string](#string) | | the client identifier for the client to be updated if the proposal passes | +| `substitute_client_id` | [string](#string) | | the substitute client identifier for the client standing in for the subject client | - + -### Params -Params defines the set of IBC transfer parameters. -NOTE: To prevent a single token from being transferred, set the -TransfersEnabled parameter to true and then set the bank module's SendEnabled -parameter for the denomination to false. +### ConsensusStateWithHeight +ConsensusStateWithHeight defines a consensus state with an additional height +field. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `send_enabled` | [bool](#bool) | | send_enabled enables or disables all cross-chain token transfers from this chain. | -| `receive_enabled` | [bool](#bool) | | receive_enabled enables or disables all cross-chain token transfers to this chain. | +| `height` | [Height](#ibc.core.client.v1.Height) | | consensus state height | +| `consensus_state` | [google.protobuf.Any](#google.protobuf.Any) | | consensus state | - - + - +### Height +Height is a monotonically increasing data type +that can be compared against another Height for the purposes of updating and +freezing clients - +Normally the RevisionHeight is incremented at each height while keeping +RevisionNumber the same. However some consensus algorithms may choose to +reset the height in certain conditions e.g. hard forks, state-machine +breaking changes In these cases, the RevisionNumber is incremented so that +height continues to be monitonically increasing even as the RevisionHeight +gets reset +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `revision_number` | [uint64](#uint64) | | the revision that the client is currently on | +| `revision_height` | [uint64](#uint64) | | the height within the given revision | - -

Top

-## ibc/applications/transfer/v1/genesis.proto - -### GenesisState -GenesisState defines the ibc-transfer genesis state + + +### IdentifiedClientState +IdentifiedClientState defines a client state with an additional client +identifier field. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | | -| `denom_traces` | [DenomTrace](#ibc.applications.transfer.v1.DenomTrace) | repeated | | -| `params` | [Params](#ibc.applications.transfer.v1.Params) | | | +| `client_id` | [string](#string) | | client identifier | +| `client_state` | [google.protobuf.Any](#google.protobuf.Any) | | client state | - - + - +### Params +Params defines the set of IBC light client parameters. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `allowed_clients` | [string](#string) | repeated | allowed_clients defines the list of allowed client state types. | - -

Top

-## ibc/applications/transfer/v1/query.proto - + -### QueryDenomTraceRequest -QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC -method +### UpgradeProposal +UpgradeProposal is a gov Content type for initiating an IBC breaking +upgrade. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `hash` | [string](#string) | | hash (in hex format) of the denomination trace information. | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `plan` | [cosmos.upgrade.v1beta1.Plan](#cosmos.upgrade.v1beta1.Plan) | | | +| `upgraded_client_state` | [google.protobuf.Any](#google.protobuf.Any) | | An UpgradedClientState must be provided to perform an IBC breaking upgrade. This will make the chain commit to the correct upgraded (self) client state before the upgrade occurs, so that connecting chains can verify that the new upgraded client is valid by verifying a proof on the previous version of the chain. This will allow IBC connections to persist smoothly across planned chain upgrades | + - + -### QueryDenomTraceResponse -QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC -method. + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `denom_trace` | [DenomTrace](#ibc.applications.transfer.v1.DenomTrace) | | denom_trace returns the requested denomination trace information. | + +

Top

+## ibc/core/channel/v1/channel.proto - + -### QueryDenomTracesRequest -QueryConnectionsRequest is the request type for the Query/DenomTraces RPC -method +### Acknowledgement +Acknowledgement is the recommended acknowledgement format to be used by +app-specific protocols. +NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental +conflicts with other protobuf message formats used for acknowledgements. +The first byte of any message with this format will be the non-ASCII values +`0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: +https://github.com/cosmos/ics/tree/master/spec/ics-004-channel-and-packet-semantics#acknowledgement-envelope | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | +| `result` | [bytes](#bytes) | | | +| `error` | [string](#string) | | | - + -### QueryDenomTracesResponse -QueryConnectionsResponse is the response type for the Query/DenomTraces RPC -method. +### Channel +Channel defines pipeline for exactly-once packet delivery between specific +modules on separate blockchains, which has at least one end capable of +sending packets and one end capable of receiving packets. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `denom_traces` | [DenomTrace](#ibc.applications.transfer.v1.DenomTrace) | repeated | denom_traces returns all denominations trace information. | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | +| `state` | [State](#ibc.core.channel.v1.State) | | current state of the channel end | +| `ordering` | [Order](#ibc.core.channel.v1.Order) | | whether the channel is ordered or unordered | +| `counterparty` | [Counterparty](#ibc.core.channel.v1.Counterparty) | | counterparty channel end | +| `connection_hops` | [string](#string) | repeated | list of connection identifiers, in order, along which packets sent on this channel will travel | +| `version` | [string](#string) | | opaque channel version, which is agreed upon during the handshake | - + -### QueryParamsRequest -QueryParamsRequest is the request type for the Query/Params RPC method. +### Counterparty +Counterparty defines a channel end counterparty +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `port_id` | [string](#string) | | port on the counterparty chain which owns the other end of the channel. | +| `channel_id` | [string](#string) | | channel end on the counterparty chain | - -### QueryParamsResponse -QueryParamsResponse is the response type for the Query/Params RPC method. + + + +### IdentifiedChannel +IdentifiedChannel defines a channel with additional port and channel +identifier fields. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#ibc.applications.transfer.v1.Params) | | params defines the parameters of the module. | +| `state` | [State](#ibc.core.channel.v1.State) | | current state of the channel end | +| `ordering` | [Order](#ibc.core.channel.v1.Order) | | whether the channel is ordered or unordered | +| `counterparty` | [Counterparty](#ibc.core.channel.v1.Counterparty) | | counterparty channel end | +| `connection_hops` | [string](#string) | repeated | list of connection identifiers, in order, along which packets sent on this channel will travel | +| `version` | [string](#string) | | opaque channel version, which is agreed upon during the handshake | +| `port_id` | [string](#string) | | port identifier | +| `channel_id` | [string](#string) | | channel identifier | - - + - +### Packet +Packet defines a type that carries data across different chains through IBC - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `sequence` | [uint64](#uint64) | | number corresponds to the order of sends and receives, where a Packet with an earlier sequence number must be sent and received before a Packet with a later sequence number. | +| `source_port` | [string](#string) | | identifies the port on the sending chain. | +| `source_channel` | [string](#string) | | identifies the channel end on the sending chain. | +| `destination_port` | [string](#string) | | identifies the port on the receiving chain. | +| `destination_channel` | [string](#string) | | identifies the channel end on the receiving chain. | +| `data` | [bytes](#bytes) | | actual opaque bytes transferred directly to the application module | +| `timeout_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | block height after which the packet times out | +| `timeout_timestamp` | [uint64](#uint64) | | block timestamp (in nanoseconds) after which the packet times out | -### Query -Query provides defines the gRPC querier service. -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `DenomTrace` | [QueryDenomTraceRequest](#ibc.applications.transfer.v1.QueryDenomTraceRequest) | [QueryDenomTraceResponse](#ibc.applications.transfer.v1.QueryDenomTraceResponse) | DenomTrace queries a denomination trace information. | GET|/ibc/apps/transfer/v1/denom_traces/{hash}| -| `DenomTraces` | [QueryDenomTracesRequest](#ibc.applications.transfer.v1.QueryDenomTracesRequest) | [QueryDenomTracesResponse](#ibc.applications.transfer.v1.QueryDenomTracesResponse) | DenomTraces queries all denomination traces. | GET|/ibc/apps/transfer/v1/denom_traces| -| `Params` | [QueryParamsRequest](#ibc.applications.transfer.v1.QueryParamsRequest) | [QueryParamsResponse](#ibc.applications.transfer.v1.QueryParamsResponse) | Params queries all parameters of the ibc-transfer module. | GET|/ibc/apps/transfer/v1/params| - - -

Top

+ -## ibc/core/client/v1/client.proto +### PacketId +PacketId is an identifer for a unique Packet +Source chains refer to packets by source port/channel +Destination chains refer to packets by destination port/channel +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `port_id` | [string](#string) | | channel port identifier | +| `channel_id` | [string](#string) | | channel unique identifier | +| `sequence` | [uint64](#uint64) | | packet sequence | - -### ClientConsensusStates -ClientConsensusStates defines all the stored consensus states for a given -client. + + + + + + +### PacketState +PacketState defines the generic type necessary to retrieve and store +packet commitments, acknowledgements, and receipts. +Caller is responsible for knowing the context necessary to interpret this +state as a commitment, acknowledgement, or a receipt. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | client identifier | -| `consensus_states` | [ConsensusStateWithHeight](#ibc.core.client.v1.ConsensusStateWithHeight) | repeated | consensus states and their heights associated with the client | +| `port_id` | [string](#string) | | channel port identifier. | +| `channel_id` | [string](#string) | | channel unique identifier. | +| `sequence` | [uint64](#uint64) | | packet sequence. | +| `data` | [bytes](#bytes) | | embedded data that represents packet state. | + - -### ClientUpdateProposal -ClientUpdateProposal is a governance proposal. If it passes, the substitute -client's latest consensus state is copied over to the subject client. The proposal -handler may fail if the subject and the substitute do not match in client and -chain parameters (with exception to latest height, frozen height, and chain-id). + +### Order +Order defines if a channel is ORDERED or UNORDERED -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | the title of the update proposal | -| `description` | [string](#string) | | the description of the proposal | -| `subject_client_id` | [string](#string) | | the client identifier for the client to be updated if the proposal passes | -| `substitute_client_id` | [string](#string) | | the substitute client identifier for the client standing in for the subject client | +| Name | Number | Description | +| ---- | ------ | ----------- | +| ORDER_NONE_UNSPECIFIED | 0 | zero-value for channel ordering | +| ORDER_UNORDERED | 1 | packets can be delivered in any order, which may differ from the order in which they were sent. | +| ORDER_ORDERED | 2 | packets are delivered exactly in the order which they were sent | + +### State +State defines if a channel is in one of the following states: +CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. +| Name | Number | Description | +| ---- | ------ | ----------- | +| STATE_UNINITIALIZED_UNSPECIFIED | 0 | Default State | +| STATE_INIT | 1 | A channel has just started the opening handshake. | +| STATE_TRYOPEN | 2 | A channel has acknowledged the handshake step on the counterparty chain. | +| STATE_OPEN | 3 | A channel has completed the handshake. Open channels are ready to send and receive packets. | +| STATE_CLOSED | 4 | A channel has been closed and can no longer be used to send or receive packets. | - -### ConsensusStateWithHeight -ConsensusStateWithHeight defines a consensus state with an additional height -field. + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `height` | [Height](#ibc.core.client.v1.Height) | | consensus state height | -| `consensus_state` | [google.protobuf.Any](#google.protobuf.Any) | | consensus state | + + +

Top

+## ibc/applications/middleware/fee/v1/fee.proto - -### Height -Height is a monotonically increasing data type -that can be compared against another Height for the purposes of updating and -freezing clients + -Normally the RevisionHeight is incremented at each height while keeping -RevisionNumber the same. However some consensus algorithms may choose to -reset the height in certain conditions e.g. hard forks, state-machine -breaking changes In these cases, the RevisionNumber is incremented so that -height continues to be monitonically increasing even as the RevisionHeight -gets reset +### Fee +Fee interface +See Fee Payment Middleware spec: +https://github.com/cosmos/ibc/tree/master/spec/app/ics-029-fee-payment#fee-middleware-contract | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `revision_number` | [uint64](#uint64) | | the revision that the client is currently on | -| `revision_height` | [uint64](#uint64) | | the height within the given revision | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - + -### IdentifiedClientState -IdentifiedClientState defines a client state with an additional client -identifier field. +### IdentifiedPacketFee +Fee associated with a packet_id | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | client identifier | -| `client_state` | [google.protobuf.Any](#google.protobuf.Any) | | client state | +| `packet_id` | [ibc.core.channel.v1.PacketId](#ibc.core.channel.v1.PacketId) | | | +| `fee` | [Fee](#ibc.applications.middleware.fee.v1.Fee) | | | + - + -### Params -Params defines the set of IBC light client parameters. + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `allowed_clients` | [string](#string) | repeated | allowed_clients defines the list of allowed client state types. | + +

Top

+## ibc/applications/middleware/fee/v1/genesis.proto - + -### UpgradeProposal -UpgradeProposal is a gov Content type for initiating an IBC breaking -upgrade. +### GenesisState +GenesisState defines the fee middleware genesis state | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `plan` | [cosmos.upgrade.v1beta1.Plan](#cosmos.upgrade.v1beta1.Plan) | | | -| `upgraded_client_state` | [google.protobuf.Any](#google.protobuf.Any) | | An UpgradedClientState must be provided to perform an IBC breaking upgrade. This will make the chain commit to the correct upgraded (self) client state before the upgrade occurs, so that connecting chains can verify that the new upgraded client is valid by verifying a proof on the previous version of the chain. This will allow IBC connections to persist smoothly across planned chain upgrades | +| `packets_fees` | [IdentifiedPacketFee](#ibc.applications.middleware.fee.v1.IdentifiedPacketFee) | repeated | A mapping of packets -> escrowed fees | @@ -617,249 +689,522 @@ upgrade. - +

Top

-## ibc/applications/transfer/v1/tx.proto +## ibc/applications/middleware/fee/v1/query.proto - + -### MsgTransfer -MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between -ICS20 enabled chains. See ICS Spec here: -https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures +### QueryAckFeeRequest +QueryAckFeeRequest is the request type for querying the acknowledgement fee | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `source_port` | [string](#string) | | the port on which the packet will be sent | -| `source_channel` | [string](#string) | | the channel by which the packet will be sent | -| `token` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | the tokens to be transferred | -| `sender` | [string](#string) | | the sender address | -| `receiver` | [string](#string) | | the recipient address on the destination chain | -| `timeout_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | Timeout height relative to the current block height. The timeout is disabled when set to 0. | -| `timeout_timestamp` | [uint64](#uint64) | | Timeout timestamp (in nanoseconds) relative to the current block timestamp. The timeout is disabled when set to 0. | - +| `packet_id` | [ibc.core.channel.v1.PacketId](#ibc.core.channel.v1.PacketId) | | PacketID | +| `relayer_address` | [string](#string) | | Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). | +| `query_height` | [uint64](#uint64) | | Height to query at | - - -### MsgTransferResponse -MsgTransferResponse defines the Msg/Transfer response type. + +### QueryAckFeeResponse +QueryAckFeeResponse is the response type for the AckFee RPC +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `fee` | [Fee](#ibc.applications.middleware.fee.v1.Fee) | | | - - - - -### Msg -Msg defines the ibc/transfer Msg service. + -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Transfer` | [MsgTransfer](#ibc.applications.transfer.v1.MsgTransfer) | [MsgTransferResponse](#ibc.applications.transfer.v1.MsgTransferResponse) | Transfer defines a rpc handler method for MsgTransfer. | | +### QueryIncentivizedPacketsRequest +QueryIncentivizedPacketRequest is the request type for querying for all incentivized packets - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - -

Top

-## ibc/core/channel/v1/channel.proto - + -### Acknowledgement -Acknowledgement is the recommended acknowledgement format to be used by -app-specific protocols. -NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental -conflicts with other protobuf message formats used for acknowledgements. -The first byte of any message with this format will be the non-ASCII values -`0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: -https://github.com/cosmos/ics/tree/master/spec/ics-004-channel-and-packet-semantics#acknowledgement-envelope +### QueryIncentivizedPacketsResponse +QueryTimeoutFeeResponse is the response type for the timeout RPC | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `result` | [bytes](#bytes) | | | -| `error` | [string](#string) | | | +| `incentivized_packets` | [IdentifiedPacketFee](#ibc.applications.middleware.fee.v1.IdentifiedPacketFee) | repeated | Map of all incentivized_packets | +| `query_height` | [uint64](#uint64) | | Height to query at | - + -### Channel -Channel defines pipeline for exactly-once packet delivery between specific -modules on separate blockchains, which has at least one end capable of -sending packets and one end capable of receiving packets. +### QueryReceiveFeeRequest +QueryReceiveRequestFee is the request type for quering the receive fee | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `state` | [State](#ibc.core.channel.v1.State) | | current state of the channel end | -| `ordering` | [Order](#ibc.core.channel.v1.Order) | | whether the channel is ordered or unordered | -| `counterparty` | [Counterparty](#ibc.core.channel.v1.Counterparty) | | counterparty channel end | -| `connection_hops` | [string](#string) | repeated | list of connection identifiers, in order, along which packets sent on this channel will travel | -| `version` | [string](#string) | | opaque channel version, which is agreed upon during the handshake | +| `packet_id` | [ibc.core.channel.v1.PacketId](#ibc.core.channel.v1.PacketId) | | PacketID | +| `relayer_address` | [string](#string) | | Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). | +| `query_height` | [uint64](#uint64) | | Height to query at | - + -### Counterparty -Counterparty defines a channel end counterparty +### QueryReceiveFeeResponse +QueryReceiveFeeResponse is the response type for the ReceiveFee RPC | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | port on the counterparty chain which owns the other end of the channel. | -| `channel_id` | [string](#string) | | channel end on the counterparty chain | +| `fee` | [Fee](#ibc.applications.middleware.fee.v1.Fee) | | | - + -### IdentifiedChannel -IdentifiedChannel defines a channel with additional port and channel -identifier fields. +### QueryTimeoutFeeRequest +QueryTimeoutFeeRequest is the request type for querying the timeout fee | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `state` | [State](#ibc.core.channel.v1.State) | | current state of the channel end | -| `ordering` | [Order](#ibc.core.channel.v1.Order) | | whether the channel is ordered or unordered | -| `counterparty` | [Counterparty](#ibc.core.channel.v1.Counterparty) | | counterparty channel end | -| `connection_hops` | [string](#string) | repeated | list of connection identifiers, in order, along which packets sent on this channel will travel | -| `version` | [string](#string) | | opaque channel version, which is agreed upon during the handshake | -| `port_id` | [string](#string) | | port identifier | -| `channel_id` | [string](#string) | | channel identifier | +| `packet_id` | [ibc.core.channel.v1.PacketId](#ibc.core.channel.v1.PacketId) | | PacketID | +| `relayer_address` | [string](#string) | | Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). | +| `query_height` | [uint64](#uint64) | | Height to query at | - + -### Packet -Packet defines a type that carries data across different chains through IBC +### QueryTimeoutFeeResponse +QueryTimeoutFeeResponse is the response type for the timeout RPC | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `sequence` | [uint64](#uint64) | | number corresponds to the order of sends and receives, where a Packet with an earlier sequence number must be sent and received before a Packet with a later sequence number. | -| `source_port` | [string](#string) | | identifies the port on the sending chain. | -| `source_channel` | [string](#string) | | identifies the channel end on the sending chain. | -| `destination_port` | [string](#string) | | identifies the port on the receiving chain. | -| `destination_channel` | [string](#string) | | identifies the channel end on the receiving chain. | -| `data` | [bytes](#bytes) | | actual opaque bytes transferred directly to the application module | -| `timeout_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | block height after which the packet times out | -| `timeout_timestamp` | [uint64](#uint64) | | block timestamp (in nanoseconds) after which the packet times out | +| `fee` | [Fee](#ibc.applications.middleware.fee.v1.Fee) | | | + - + -### PacketId -PacketId is an identifer for a unique Packet -Source chains refer to packets by source port/channel -Destination chains refer to packets by destination port/channel + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | channel port identifier | -| `channel_id` | [string](#string) | | channel unique identifier | -| `sequence` | [uint64](#uint64) | | packet sequence | + +### Query +Query provides defines the gRPC querier service. +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `ReceiveFee` | [QueryReceiveFeeRequest](#ibc.applications.middleware.fee.v1.QueryReceiveFeeRequest) | [QueryReceiveFeeResponse](#ibc.applications.middleware.fee.v1.QueryReceiveFeeResponse) | Gets the fee expected for submitting ReceivePacket msg for the given packet | GET|/ibc/apps/middleware/fee/v1/receive_fee| +| `AckFee` | [QueryAckFeeRequest](#ibc.applications.middleware.fee.v1.QueryAckFeeRequest) | [QueryAckFeeResponse](#ibc.applications.middleware.fee.v1.QueryAckFeeResponse) | Gets the fee expected for submitting AcknowledgePacket msg for the given packet | GET|/ibc/apps/middleware/fee/v1/ack_fee| +| `TimeoutFee` | [QueryTimeoutFeeRequest](#ibc.applications.middleware.fee.v1.QueryTimeoutFeeRequest) | [QueryTimeoutFeeResponse](#ibc.applications.middleware.fee.v1.QueryTimeoutFeeResponse) | Gets the fee expected for submitting TimeoutPacket msg for the given packet | GET|/ibc/apps/middleware/fee/v1/timeout_fee| +| `IncentivizedPackets` | [QueryIncentivizedPacketsRequest](#ibc.applications.middleware.fee.v1.QueryIncentivizedPacketsRequest) | [QueryIncentivizedPacketsResponse](#ibc.applications.middleware.fee.v1.QueryIncentivizedPacketsResponse) | Gets all incentivized packets | GET|/ibc/apps/middleware/fee/v1/incentivized_packets| + - + +

Top

+ +## ibc/applications/middleware/fee/v1/tx.proto -### PacketState -PacketState defines the generic type necessary to retrieve and store -packet commitments, acknowledgements, and receipts. -Caller is responsible for knowing the context necessary to interpret this -state as a commitment, acknowledgement, or a receipt. + + + + +### MsgEscrowPacketFee +MsgEscrowPacketFee defines the request type EscrowPacketFee RPC | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | channel port identifier. | -| `channel_id` | [string](#string) | | channel unique identifier. | -| `sequence` | [uint64](#uint64) | | packet sequence. | -| `data` | [bytes](#bytes) | | embedded data that represents packet state. | +| `packet_id` | [ibc.core.channel.v1.PacketId](#ibc.core.channel.v1.PacketId) | | | +| `receive_fee` | [Fee](#ibc.applications.middleware.fee.v1.Fee) | | | +| `ack_fee` | [Fee](#ibc.applications.middleware.fee.v1.Fee) | | | +| `timeout_fee` | [Fee](#ibc.applications.middleware.fee.v1.Fee) | | | +| `relayers` | [string](#string) | repeated | | - + - +### MsgEscrowPacketFeeResponse +MsgEscrowPacketFeeResponse defines the response type for Msg/EscrowPacketFee -### Order -Order defines if a channel is ORDERED or UNORDERED -| Name | Number | Description | -| ---- | ------ | ----------- | -| ORDER_NONE_UNSPECIFIED | 0 | zero-value for channel ordering | -| ORDER_UNORDERED | 1 | packets can be delivered in any order, which may differ from the order in which they were sent. | -| ORDER_ORDERED | 2 | packets are delivered exactly in the order which they were sent | - -### State -State defines if a channel is in one of the following states: -CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + -| Name | Number | Description | -| ---- | ------ | ----------- | -| STATE_UNINITIALIZED_UNSPECIFIED | 0 | Default State | -| STATE_INIT | 1 | A channel has just started the opening handshake. | -| STATE_TRYOPEN | 2 | A channel has acknowledged the handshake step on the counterparty chain. | -| STATE_OPEN | 3 | A channel has completed the handshake. Open channels are ready to send and receive packets. | -| STATE_CLOSED | 4 | A channel has been closed and can no longer be used to send or receive packets. | +### MsgRegisterCounterPartyAddressResponse +MsgRegisterCounterPartyAddressResponse defines the Msg/RegisterCounteryPartyAddress response type - + + + + + + +### MsgRegisterCounterpartyAddress +MsgRegisterCounterpartyAddress is the request type for registering the counter party address + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | | +| `counterparty_address` | [string](#string) | | | + + + + + + + + + + + + + + +### Msg +Msg defines the ibc/fee Msg service. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `RegisterCounterPartyAddress` | [MsgRegisterCounterpartyAddress](#ibc.applications.middleware.fee.v1.MsgRegisterCounterpartyAddress) | [MsgRegisterCounterPartyAddressResponse](#ibc.applications.middleware.fee.v1.MsgRegisterCounterPartyAddressResponse) | RegisterCounterpartyAddress defines a rpc handler method for MsgRegisterCounterpartyAddress RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their counterparty address before relaying This ensures they will be properly compensated for forward relaying since destination chain must send back relayer's source address (counterparty address) in acknowledgement This function may be called more than once by a relayer, in which case, latest counterparty address is always used. | | +| `EscrowPacketFee` | [MsgEscrowPacketFee](#ibc.applications.middleware.fee.v1.MsgEscrowPacketFee) | [MsgEscrowPacketFeeResponse](#ibc.applications.middleware.fee.v1.MsgEscrowPacketFeeResponse) | EscrowPacketFee defines a rpc handler method for MsgEscrowPacketFee EscrowPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to incentivize the relaying of the given packet. | | + + + + + + +

Top

+ +## ibc/applications/transfer/v1/transfer.proto + + + + + +### DenomTrace +DenomTrace contains the base denomination for ICS20 fungible tokens and the +source tracing information path. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `path` | [string](#string) | | path defines the chain of port/channel identifiers used for tracing the source of the fungible token. | +| `base_denom` | [string](#string) | | base denomination of the relayed fungible token. | + + + + + + + + +### FungibleTokenPacketData +FungibleTokenPacketData defines a struct for the packet payload +See FungibleTokenPacketData spec: +https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `denom` | [string](#string) | | the token denomination to be transferred | +| `amount` | [uint64](#uint64) | | the token amount to be transferred | +| `sender` | [string](#string) | | the sender address | +| `receiver` | [string](#string) | | the recipient address on the destination chain | + + + + + + + + +### Params +Params defines the set of IBC transfer parameters. +NOTE: To prevent a single token from being transferred, set the +TransfersEnabled parameter to true and then set the bank module's SendEnabled +parameter for the denomination to false. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `send_enabled` | [bool](#bool) | | send_enabled enables or disables all cross-chain token transfers from this chain. | +| `receive_enabled` | [bool](#bool) | | receive_enabled enables or disables all cross-chain token transfers to this chain. | + + + + + + + + + + + + + + + + +

Top

+ +## ibc/applications/transfer/v1/genesis.proto + + + + + +### GenesisState +GenesisState defines the ibc-transfer genesis state + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `port_id` | [string](#string) | | | +| `denom_traces` | [DenomTrace](#ibc.applications.transfer.v1.DenomTrace) | repeated | | +| `params` | [Params](#ibc.applications.transfer.v1.Params) | | | + + + + + + + + + + + + + + + + +

Top

+ +## ibc/applications/transfer/v1/query.proto + + + + + +### QueryDenomTraceRequest +QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC +method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `hash` | [string](#string) | | hash (in hex format) of the denomination trace information. | + + + + + + + + +### QueryDenomTraceResponse +QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC +method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `denom_trace` | [DenomTrace](#ibc.applications.transfer.v1.DenomTrace) | | denom_trace returns the requested denomination trace information. | + + + + + + + + +### QueryDenomTracesRequest +QueryConnectionsRequest is the request type for the Query/DenomTraces RPC +method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + + + + + + + + +### QueryDenomTracesResponse +QueryConnectionsResponse is the response type for the Query/DenomTraces RPC +method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `denom_traces` | [DenomTrace](#ibc.applications.transfer.v1.DenomTrace) | repeated | denom_traces returns all denominations trace information. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | + + + + + + + + +### QueryParamsRequest +QueryParamsRequest is the request type for the Query/Params RPC method. + + + + + + + + +### QueryParamsResponse +QueryParamsResponse is the response type for the Query/Params RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#ibc.applications.transfer.v1.Params) | | params defines the parameters of the module. | + + + + + + + + + + + + + + +### Query +Query provides defines the gRPC querier service. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `DenomTrace` | [QueryDenomTraceRequest](#ibc.applications.transfer.v1.QueryDenomTraceRequest) | [QueryDenomTraceResponse](#ibc.applications.transfer.v1.QueryDenomTraceResponse) | DenomTrace queries a denomination trace information. | GET|/ibc/apps/transfer/v1/denom_traces/{hash}| +| `DenomTraces` | [QueryDenomTracesRequest](#ibc.applications.transfer.v1.QueryDenomTracesRequest) | [QueryDenomTracesResponse](#ibc.applications.transfer.v1.QueryDenomTracesResponse) | DenomTraces queries all denomination traces. | GET|/ibc/apps/transfer/v1/denom_traces| +| `Params` | [QueryParamsRequest](#ibc.applications.transfer.v1.QueryParamsRequest) | [QueryParamsResponse](#ibc.applications.transfer.v1.QueryParamsResponse) | Params queries all parameters of the ibc-transfer module. | GET|/ibc/apps/transfer/v1/params| + + + + + + +

Top

+ +## ibc/applications/transfer/v1/tx.proto + + + + + +### MsgTransfer +MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between +ICS20 enabled chains. See ICS Spec here: +https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `source_port` | [string](#string) | | the port on which the packet will be sent | +| `source_channel` | [string](#string) | | the channel by which the packet will be sent | +| `token` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | the tokens to be transferred | +| `sender` | [string](#string) | | the sender address | +| `receiver` | [string](#string) | | the recipient address on the destination chain | +| `timeout_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | Timeout height relative to the current block height. The timeout is disabled when set to 0. | +| `timeout_timestamp` | [uint64](#uint64) | | Timeout timestamp (in nanoseconds) relative to the current block timestamp. The timeout is disabled when set to 0. | + + + + + + + + +### MsgTransferResponse +MsgTransferResponse defines the Msg/Transfer response type. + + + + + + + + + + + +### Msg +Msg defines the ibc/transfer Msg service. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Transfer` | [MsgTransfer](#ibc.applications.transfer.v1.MsgTransfer) | [MsgTransferResponse](#ibc.applications.transfer.v1.MsgTransferResponse) | Transfer defines a rpc handler method for MsgTransfer. | | + diff --git a/modules/apps/29-fee/types/genesis.pb.go b/modules/apps/29-fee/types/genesis.pb.go index c058269be21..a13365d1fdb 100644 --- a/modules/apps/29-fee/types/genesis.pb.go +++ b/modules/apps/29-fee/types/genesis.pb.go @@ -27,7 +27,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the fee middleware genesis state type GenesisState struct { // A mapping of packets -> escrowed fees - PacketsFees []*IdentifiedPacketFee `protobuf:"bytes,1,rep,name=packets_fees,json=packetsFees,proto3" json:"packets_fees,omitempty" yaml:"packets_fees_map"` + PacketsFees []*IdentifiedPacketFee `protobuf:"bytes,1,rep,name=packets_fees,json=packetsFees,proto3" json:"packets_fees,omitempty" yaml:"packets_fees"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -79,26 +79,26 @@ func init() { } var fileDescriptor_6a4f6c8d78b5dfbf = []byte{ - // 294 bytes of a gzipped FileDescriptorProto + // 290 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xb1, 0x4e, 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 0x30, 0x05, 0x26, 0x87, 0x5f, 0x1f, 0x47, 0xfb, 0x6b, 0xae, 0xf2, 0xeb, - 0x70, 0x37, 0x76, 0xa6, 0xb8, 0x09, 0x1f, 0x7a, 0xdb, 0xa3, 0x29, 0x60, 0x27, 0x77, 0x6f, 0x15, - 0x09, 0x36, 0x15, 0x09, 0x3e, 0x2b, 0x12, 0xbc, 0xd6, 0xa4, 0xb3, 0xa9, 0x49, 0xe7, 0xbd, 0x26, - 0x9d, 0xa7, 0x28, 0x93, 0x6e, 0xbe, 0x88, 0xa9, 0xd0, 0x8a, 0x09, 0x6d, 0x95, 0xb6, 0x4c, 0xc6, - 0x62, 0x94, 0x69, 0xa6, 0x74, 0xb2, 0xc8, 0x61, 0xfd, 0x22, 0x96, 0x45, 0x57, 0x23, 0xbf, 0x80, - 0x5b, 0x1b, 0xd8, 0xf8, 0x7f, 0xf3, 0xbd, 0x8b, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x19, - 0xaf, 0x82, 0x9d, 0x01, 0x00, 0x00, + 0x1c, 0xc4, 0x1b, 0x7d, 0xd2, 0x37, 0xa4, 0x9d, 0x0a, 0x12, 0xa8, 0x83, 0x81, 0x4c, 0x0c, 0xd4, + 0xa6, 0x61, 0x40, 0x30, 0x76, 0x28, 0x42, 0x62, 0x40, 0xb0, 0xb1, 0x20, 0xc7, 0xb9, 0xa4, 0x16, + 0x49, 0x1c, 0xe5, 0xef, 0x16, 0x75, 0xe6, 0x05, 0x78, 0x2c, 0xc6, 0x8e, 0x4c, 0x08, 0x25, 0x6f, + 0xc0, 0x13, 0x20, 0x27, 0x95, 0xe8, 0x06, 0xdb, 0x59, 0xfe, 0xdd, 0xf9, 0xce, 0xfe, 0xa9, 0x8e, + 0x94, 0x90, 0x65, 0x99, 0x69, 0x25, 0xad, 0x36, 0x05, 0x89, 0x5c, 0xc7, 0x71, 0x86, 0x67, 0x59, + 0x41, 0x24, 0x80, 0x58, 0x4e, 0x44, 0x8a, 0x02, 0xa4, 0x89, 0x97, 0x95, 0xb1, 0x66, 0x18, 0xe8, + 0x48, 0xf1, 0x6d, 0x07, 0xff, 0x71, 0xf0, 0x04, 0xe0, 0xcb, 0xc9, 0x68, 0x37, 0x35, 0xa9, 0x69, + 0x71, 0xe1, 0x54, 0xe7, 0x1c, 0x9d, 0xfc, 0xe1, 0x2d, 0x17, 0xd0, 0xd1, 0x47, 0x8e, 0x56, 0xa6, + 0x82, 0x50, 0x73, 0x59, 0x14, 0xc8, 0xdc, 0xf5, 0x46, 0x76, 0x48, 0xf0, 0xe2, 0xf9, 0x83, 0xab, + 0xae, 0xdc, 0xbd, 0x95, 0x16, 0x43, 0xf2, 0x07, 0xa5, 0x54, 0x4f, 0xb0, 0xf4, 0x98, 0x00, 0xb4, + 0xef, 0x1d, 0xfe, 0x3b, 0xee, 0x87, 0xe7, 0xfc, 0xf7, 0xca, 0xfc, 0x3a, 0x46, 0x61, 0x75, 0xa2, + 0x11, 0xdf, 0xb6, 0x09, 0x33, 0x60, 0xba, 0xf7, 0xf5, 0x71, 0xb0, 0xb3, 0x92, 0x79, 0x76, 0x19, + 0x6c, 0xc7, 0x06, 0x77, 0xfd, 0xcd, 0x71, 0x06, 0xd0, 0xf4, 0xe6, 0xad, 0x66, 0xde, 0xba, 0x66, + 0xde, 0x67, 0xcd, 0xbc, 0xd7, 0x86, 0xf5, 0xd6, 0x0d, 0xeb, 0xbd, 0x37, 0xac, 0xf7, 0x10, 0xa6, + 0xda, 0xce, 0x17, 0x11, 0x57, 0x26, 0x17, 0xca, 0x50, 0x6e, 0x48, 0xe8, 0x48, 0x8d, 0x53, 0x23, + 0x72, 0x13, 0x2f, 0x32, 0x90, 0xfb, 0x0d, 0x12, 0xe1, 0xc5, 0xd8, 0xad, 0xb7, 0xab, 0x12, 0x14, + 0xfd, 0x6f, 0xa7, 0x9d, 0x7d, 0x07, 0x00, 0x00, 0xff, 0xff, 0x27, 0xbb, 0x9c, 0x19, 0x99, 0x01, + 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 1c22cdda784..603f307e805 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -31,7 +31,7 @@ buf protoc \ -I "third_party/proto" \ --doc_out=./docs/ibc \ --doc_opt=./docs/protodoc-markdown.tmpl,proto-docs.md \ - $(find "$(pwd)/proto" -maxdepth 5 -name '*.proto') + $(find "$(pwd)/proto" -maxdepth 7 -name '*.proto') go mod tidy From 488244ae30f12ace3e3a2d360728ee4331a287c1 Mon Sep 17 00:00:00 2001 From: Sean King Date: Thu, 22 Jul 2021 16:41:45 +0200 Subject: [PATCH 18/26] Update proto/ibc/applications/middleware/fee/v1/fee.proto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> --- proto/ibc/applications/middleware/fee/v1/fee.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/ibc/applications/middleware/fee/v1/fee.proto b/proto/ibc/applications/middleware/fee/v1/fee.proto index dc1e8905d18..fde1a4dc439 100644 --- a/proto/ibc/applications/middleware/fee/v1/fee.proto +++ b/proto/ibc/applications/middleware/fee/v1/fee.proto @@ -17,5 +17,5 @@ message Fee { // Fee associated with a packet_id message IdentifiedPacketFee { ibc.core.channel.v1.PacketId packet_id = 1; - ibc.applications.middleware.fee.v1.Fee fee = 2; + Fee fee = 2; } From 0cedbe55b04446852a5c18f8811fa53b3dd519bc Mon Sep 17 00:00:00 2001 From: Sean King Date: Thu, 22 Jul 2021 19:02:27 +0200 Subject: [PATCH 19/26] refactor: remove file imports/add yaml/add argument for requests --- docs/ibc/proto-docs.md | 6 +- modules/apps/29-fee/types/fee.pb.go | 51 +-- modules/apps/29-fee/types/query.pb.go | 98 ++--- modules/apps/29-fee/types/query.pb.gw.go | 384 +++++++++++++++++- .../applications/middleware/fee/v1/fee.proto | 4 +- .../middleware/fee/v1/genesis.proto | 3 - .../middleware/fee/v1/query.proto | 12 +- .../middleware/fee/v1/query.proto~ | 98 +++++ 8 files changed, 567 insertions(+), 89 deletions(-) create mode 100644 proto/ibc/applications/middleware/fee/v1/query.proto~ diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md index 3e8b1220281..8cddb6e94f9 100644 --- a/docs/ibc/proto-docs.md +++ b/docs/ibc/proto-docs.md @@ -836,9 +836,9 @@ Query provides defines the gRPC querier service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `ReceiveFee` | [QueryReceiveFeeRequest](#ibc.applications.middleware.fee.v1.QueryReceiveFeeRequest) | [QueryReceiveFeeResponse](#ibc.applications.middleware.fee.v1.QueryReceiveFeeResponse) | Gets the fee expected for submitting ReceivePacket msg for the given packet | GET|/ibc/apps/middleware/fee/v1/receive_fee| -| `AckFee` | [QueryAckFeeRequest](#ibc.applications.middleware.fee.v1.QueryAckFeeRequest) | [QueryAckFeeResponse](#ibc.applications.middleware.fee.v1.QueryAckFeeResponse) | Gets the fee expected for submitting AcknowledgePacket msg for the given packet | GET|/ibc/apps/middleware/fee/v1/ack_fee| -| `TimeoutFee` | [QueryTimeoutFeeRequest](#ibc.applications.middleware.fee.v1.QueryTimeoutFeeRequest) | [QueryTimeoutFeeResponse](#ibc.applications.middleware.fee.v1.QueryTimeoutFeeResponse) | Gets the fee expected for submitting TimeoutPacket msg for the given packet | GET|/ibc/apps/middleware/fee/v1/timeout_fee| +| `ReceiveFee` | [QueryReceiveFeeRequest](#ibc.applications.middleware.fee.v1.QueryReceiveFeeRequest) | [QueryReceiveFeeResponse](#ibc.applications.middleware.fee.v1.QueryReceiveFeeResponse) | Gets the fee expected for submitting ReceivePacket msg for the given packet | GET|/ibc/apps/middleware/fee/v1/receive_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}/relayer/{relayer_address}/height/{query_height}| +| `AckFee` | [QueryAckFeeRequest](#ibc.applications.middleware.fee.v1.QueryAckFeeRequest) | [QueryAckFeeResponse](#ibc.applications.middleware.fee.v1.QueryAckFeeResponse) | Gets the fee expected for submitting AcknowledgePacket msg for the given packet | GET|/ibc/apps/middleware/fee/v1/ack_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}/relayer/{relayer_address}/height/{query_height}| +| `TimeoutFee` | [QueryTimeoutFeeRequest](#ibc.applications.middleware.fee.v1.QueryTimeoutFeeRequest) | [QueryTimeoutFeeResponse](#ibc.applications.middleware.fee.v1.QueryTimeoutFeeResponse) | Gets the fee expected for submitting TimeoutPacket msg for the given packet | GET|/ibc/apps/middleware/fee/v1/timeout_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}/{relayer_address}/height/{query_height}| | `IncentivizedPackets` | [QueryIncentivizedPacketsRequest](#ibc.applications.middleware.fee.v1.QueryIncentivizedPacketsRequest) | [QueryIncentivizedPacketsResponse](#ibc.applications.middleware.fee.v1.QueryIncentivizedPacketsResponse) | Gets all incentivized packets | GET|/ibc/apps/middleware/fee/v1/incentivized_packets| diff --git a/modules/apps/29-fee/types/fee.pb.go b/modules/apps/29-fee/types/fee.pb.go index 55a5fd7beb3..36f386fbcd4 100644 --- a/modules/apps/29-fee/types/fee.pb.go +++ b/modules/apps/29-fee/types/fee.pb.go @@ -75,7 +75,7 @@ func (m *Fee) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { // Fee associated with a packet_id type IdentifiedPacketFee struct { - PacketId *types1.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty"` + PacketId *types1.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"packet_id"` Fee *Fee `protobuf:"bytes,2,opt,name=fee,proto3" json:"fee,omitempty"` } @@ -136,30 +136,31 @@ func init() { } var fileDescriptor_9a4c0273395d2c1a = []byte{ - // 354 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x51, 0xb1, 0x4e, 0xeb, 0x40, - 0x10, 0xb4, 0x5f, 0xa4, 0xe8, 0x3d, 0xa7, 0xcb, 0xa3, 0x08, 0x91, 0x70, 0x42, 0x1a, 0x52, 0x90, - 0x3d, 0x6c, 0xaa, 0x50, 0x06, 0x29, 0x52, 0x24, 0x0a, 0x94, 0x92, 0x06, 0x9d, 0xef, 0x36, 0xce, - 0x11, 0xdb, 0x6b, 0xe5, 0x2e, 0x41, 0xfc, 0x03, 0x05, 0xdf, 0xc1, 0x97, 0xa4, 0x4c, 0x49, 0x05, - 0x28, 0xf9, 0x11, 0x74, 0xb6, 0x11, 0x48, 0x14, 0x54, 0x3b, 0x77, 0x9a, 0xd9, 0x99, 0xdd, 0xf5, - 0x4e, 0x55, 0x24, 0x18, 0xcf, 0xf3, 0x44, 0x09, 0x6e, 0x14, 0x65, 0x9a, 0xa5, 0x4a, 0xca, 0x04, - 0xef, 0xf9, 0x12, 0xd9, 0x0c, 0x91, 0xad, 0x03, 0x5b, 0x20, 0x5f, 0x92, 0xa1, 0x66, 0x4f, 0x45, - 0x02, 0xbe, 0xb3, 0xe1, 0x8b, 0x0d, 0x96, 0xb6, 0x0e, 0xda, 0xbe, 0x20, 0x9d, 0x92, 0x66, 0x11, - 0xd7, 0x56, 0x1d, 0xa1, 0xe1, 0x01, 0x13, 0xa4, 0xb2, 0xb2, 0x47, 0xfb, 0x20, 0xa6, 0x98, 0x0a, - 0xc8, 0x2c, 0xaa, 0x7e, 0x8f, 0x6d, 0x0e, 0x41, 0x4b, 0x64, 0x62, 0xce, 0xb3, 0x0c, 0x13, 0x6b, - 0x5c, 0xc1, 0x92, 0xd2, 0xbb, 0xf3, 0x6a, 0x63, 0xc4, 0xa6, 0xf0, 0xea, 0x3c, 0xa5, 0x55, 0x66, - 0x5a, 0x6e, 0xb7, 0xd6, 0x6f, 0x84, 0x87, 0x50, 0x1a, 0x82, 0x35, 0x84, 0xca, 0x10, 0x2e, 0x49, - 0x65, 0xa3, 0xb3, 0xcd, 0x6b, 0xc7, 0x79, 0x7e, 0xeb, 0xf4, 0x63, 0x65, 0xe6, 0xab, 0x08, 0x04, - 0xa5, 0xac, 0x4a, 0x57, 0x96, 0x81, 0x96, 0x0b, 0x66, 0x1e, 0x72, 0xd4, 0x85, 0x40, 0x4f, 0xab, - 0xd6, 0xbd, 0x47, 0xd7, 0xfb, 0x3f, 0x91, 0x98, 0x19, 0x35, 0x53, 0x28, 0xaf, 0xb9, 0x58, 0xa0, - 0xb1, 0xe6, 0x17, 0xde, 0xbf, 0xbc, 0x78, 0xdc, 0x2a, 0xd9, 0x72, 0xbb, 0x6e, 0xbf, 0x11, 0x1e, - 0x81, 0x5d, 0x8a, 0x8d, 0x0e, 0x9f, 0x79, 0xd7, 0x01, 0x94, 0x92, 0x89, 0x9c, 0xfe, 0xcd, 0x2b, - 0xd4, 0x1c, 0x7a, 0xb5, 0x19, 0x62, 0xeb, 0x4f, 0xa1, 0x3a, 0x81, 0xdf, 0x57, 0x09, 0x63, 0xc4, - 0xa9, 0xd5, 0x8c, 0xae, 0x36, 0x3b, 0xdf, 0xdd, 0xee, 0x7c, 0xf7, 0x7d, 0xe7, 0xbb, 0x4f, 0x7b, - 0xdf, 0xd9, 0xee, 0x7d, 0xe7, 0x65, 0xef, 0x3b, 0x37, 0xe1, 0xcf, 0xd1, 0x54, 0x24, 0x06, 0x31, - 0xb1, 0x94, 0xe4, 0x2a, 0x41, 0x6d, 0x8f, 0xab, 0x59, 0x38, 0x1c, 0xd8, 0x63, 0x16, 0xa3, 0x46, - 0xf5, 0x62, 0x9f, 0xe7, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x07, 0x16, 0x98, 0xc3, 0xfc, 0x01, - 0x00, 0x00, + // 372 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x51, 0xbd, 0x6e, 0xea, 0x30, + 0x14, 0x4e, 0x2e, 0x12, 0xba, 0x37, 0x2c, 0x57, 0x5c, 0x06, 0x2e, 0x52, 0x03, 0xcd, 0x52, 0x86, + 0x62, 0x37, 0xe9, 0x44, 0x47, 0x2a, 0x21, 0x21, 0x75, 0x40, 0x8c, 0x5d, 0x2a, 0xc7, 0x3e, 0x04, + 0x97, 0x24, 0x27, 0xc2, 0x86, 0x8a, 0xb7, 0xe8, 0x33, 0x74, 0xec, 0x93, 0x30, 0x32, 0x76, 0xa2, + 0x15, 0xbc, 0x41, 0x9f, 0xa0, 0x72, 0x92, 0xfe, 0x48, 0x1d, 0x3a, 0x9d, 0x63, 0xfb, 0xfb, 0xce, + 0xf7, 0xf9, 0x3b, 0xce, 0xa9, 0x0c, 0x39, 0x65, 0x59, 0x16, 0x4b, 0xce, 0xb4, 0xc4, 0x54, 0xd1, + 0x44, 0x0a, 0x11, 0xc3, 0x1d, 0x5b, 0x00, 0x9d, 0x02, 0xd0, 0x95, 0x6f, 0x0a, 0xc9, 0x16, 0xa8, + 0xb1, 0xee, 0xc9, 0x90, 0x93, 0xaf, 0x68, 0xf2, 0x89, 0x26, 0x06, 0xb6, 0xf2, 0x5b, 0x2e, 0x47, + 0x95, 0xa0, 0xa2, 0x21, 0x53, 0x86, 0x1d, 0x82, 0x66, 0x3e, 0xe5, 0x28, 0xd3, 0x62, 0x46, 0xab, + 0x11, 0x61, 0x84, 0x79, 0x4b, 0x4d, 0x57, 0xde, 0x1e, 0x1b, 0x1f, 0x1c, 0x17, 0x40, 0xf9, 0x8c, + 0xa5, 0x29, 0xc4, 0x46, 0xb8, 0x6c, 0x0b, 0x88, 0x77, 0xeb, 0x54, 0x86, 0x00, 0x75, 0xee, 0x54, + 0x59, 0x82, 0xcb, 0x54, 0x37, 0xed, 0x4e, 0xa5, 0x5b, 0x0b, 0xfe, 0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 0x00, } func (m *Fee) Marshal() (dAtA []byte, err error) { diff --git a/modules/apps/29-fee/types/query.pb.go b/modules/apps/29-fee/types/query.pb.go index a8b96a554a0..a605548e010 100644 --- a/modules/apps/29-fee/types/query.pb.go +++ b/modules/apps/29-fee/types/query.pb.go @@ -475,53 +475,57 @@ func init() { } var fileDescriptor_9cafe0e1bd8b928c = []byte{ - // 726 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0xcd, 0x6e, 0xd3, 0x4a, - 0x14, 0xee, 0xb4, 0xb7, 0xd5, 0xed, 0xf4, 0xea, 0xde, 0xab, 0x49, 0xd5, 0x46, 0x01, 0x92, 0x60, - 0x04, 0x0d, 0x3f, 0x9d, 0x21, 0x41, 0xa2, 0xb4, 0xac, 0x9a, 0xa2, 0x8a, 0x4a, 0x2c, 0x42, 0xd4, - 0x15, 0x9b, 0x68, 0x6c, 0x9f, 0x38, 0xa3, 0x3a, 0x1e, 0xd7, 0x76, 0x82, 0xc2, 0x92, 0x2d, 0x1b, - 0x24, 0xde, 0x81, 0x47, 0xe0, 0x19, 0x58, 0x56, 0x62, 0x83, 0x58, 0x44, 0xa8, 0x45, 0x62, 0x01, - 0xab, 0xbc, 0x00, 0xc8, 0x1e, 0xa7, 0x49, 0x49, 0x5a, 0x1c, 0xba, 0x83, 0x9d, 0xed, 0x39, 0xdf, - 0x39, 0xdf, 0xf7, 0xcd, 0x9c, 0xe3, 0xc1, 0x54, 0xe8, 0x06, 0xe3, 0xae, 0x6b, 0x0b, 0x83, 0x07, - 0x42, 0x3a, 0x3e, 0x6b, 0x0a, 0xd3, 0xb4, 0xe1, 0x29, 0xf7, 0x80, 0xd5, 0x01, 0x58, 0xbb, 0xc8, - 0xf6, 0x5b, 0xe0, 0x75, 0xa8, 0xeb, 0xc9, 0x40, 0x12, 0x4d, 0xe8, 0x06, 0x1d, 0x8e, 0xa7, 0x83, - 0x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, - 0x56, 0x2d, 0xc9, 0x9a, 0xd2, 0x6c, 0xd9, 0xe0, 0xab, 0x3a, 0xa5, 0xf5, 0xd5, 0x30, 0x7f, 0xd0, - 0x71, 0xc1, 0xd7, 0xe7, 0xa2, 0x4b, 0xc7, 0x9d, 0xef, 0x01, 0x00, 0x00, 0xff, 0xff, 0x82, 0xa9, - 0xdb, 0xf8, 0xa7, 0x09, 0x00, 0x00, + // 796 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x96, 0xcf, 0x6b, 0x13, 0x4d, + 0x18, 0xc7, 0x3b, 0xe9, 0xfb, 0x96, 0xb7, 0xd3, 0x97, 0xf7, 0x7d, 0xd9, 0x94, 0x36, 0xe4, 0xd5, + 0x24, 0xee, 0x41, 0x83, 0xd8, 0x19, 0x13, 0xc1, 0xda, 0x7a, 0x6a, 0x2a, 0xc5, 0x82, 0x87, 0x18, + 0x7a, 0xf2, 0x12, 0x36, 0xbb, 0x4f, 0x36, 0x43, 0x93, 0x9d, 0xed, 0xee, 0x26, 0x12, 0x4b, 0x2e, + 0x5e, 0xbd, 0x88, 0xfe, 0x0d, 0x82, 0x82, 0x52, 0xc1, 0x43, 0x8f, 0x5e, 0x3d, 0x16, 0xbc, 0x88, + 0x87, 0x20, 0xad, 0xe0, 0x41, 0x4f, 0xf9, 0x0b, 0x64, 0x77, 0x26, 0xc9, 0xb6, 0x49, 0x6b, 0x62, + 0x11, 0x44, 0x6f, 0x3b, 0xf3, 0xfc, 0x9a, 0xe7, 0x33, 0x33, 0xdf, 0x59, 0x4c, 0x58, 0x49, 0xa7, + 0x9a, 0x6d, 0x57, 0x99, 0xae, 0x79, 0x8c, 0x5b, 0x2e, 0xad, 0x31, 0xc3, 0xa8, 0xc2, 0x5d, 0xcd, + 0x01, 0x5a, 0x06, 0xa0, 0x8d, 0x0c, 0xdd, 0xaa, 0x83, 0xd3, 0x24, 0xb6, 0xc3, 0x3d, 0xae, 0xa8, + 0xac, 0xa4, 0x93, 0xb0, 0x3f, 0xe9, 0xfb, 0x93, 0x32, 0x00, 0x69, 0x64, 0xe2, 0xb3, 0x26, 0x37, + 0x79, 0xe0, 0x4e, 0xfd, 0x2f, 0x11, 0x19, 0xbf, 0xa8, 0x73, 0xb7, 0xc6, 0x5d, 0x5a, 0xd2, 0x5c, + 0x10, 0x29, 0x69, 0x23, 0x53, 0x02, 0x4f, 0xcb, 0x50, 0x5b, 0x33, 0x99, 0x15, 0xa4, 0x93, 0xbe, + 0x97, 0x46, 0x58, 0x95, 0x5f, 0x4c, 0x78, 0x9f, 0x31, 0x39, 0x37, 0xab, 0x40, 0x35, 0x9b, 0x51, + 0xcd, 0xb2, 0xb8, 0x27, 0x57, 0x26, 0xac, 0xe7, 0xfc, 0x5c, 0x3a, 0x77, 0x80, 0xea, 0x15, 0xcd, + 0xb2, 0xa0, 0xea, 0x07, 0xcb, 0xcf, 0xf1, 0x97, 0xa6, 0x7e, 0x46, 0x78, 0xee, 0xb6, 0xef, 0x52, + 0x00, 0x1d, 0x58, 0x03, 0xd6, 0x00, 0x0a, 0xb0, 0x55, 0x07, 0xd7, 0x53, 0xf2, 0x78, 0xda, 0xd6, + 0xf4, 0x4d, 0xf0, 0x8a, 0xcc, 0x88, 0xa1, 0x14, 0x4a, 0xcf, 0x64, 0xcf, 0xfa, 0x7c, 0x89, 0x5f, + 0x9d, 0x74, 0x4b, 0x36, 0x32, 0x24, 0x1f, 0x78, 0xad, 0x1b, 0xb9, 0xd9, 0x4e, 0x3b, 0xf9, 0x5f, + 0x53, 0xab, 0x55, 0x97, 0xd5, 0x5e, 0xa4, 0x5a, 0xf8, 0xcb, 0x96, 0x76, 0x65, 0x15, 0xff, 0xeb, + 0x40, 0x55, 0x6b, 0x82, 0x53, 0xd4, 0x0c, 0xc3, 0x01, 0xd7, 0x8d, 0x45, 0x52, 0x28, 0x3d, 0x9d, + 0x8b, 0x77, 0xda, 0xc9,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 0x7b, 0x84, 0xa3, 0x43, 0x14, 0x4a, 0x59, 0x1d, 0x19, 0xc3, 0xf1, 0x5a, 0x1a, 0xbf, 0x71, + 0xba, 0x24, 0x12, 0xea, 0xb5, 0x80, 0x69, 0x56, 0xb9, 0x7c, 0x12, 0xd1, 0x61, 0x32, 0x97, 0xbb, + 0xf5, 0x66, 0x3f, 0x81, 0xf6, 0xf6, 0x13, 0xe8, 0xc3, 0x7e, 0x02, 0x3d, 0x3c, 0x48, 0x4c, 0xec, + 0x1d, 0x24, 0x26, 0xde, 0x1d, 0x24, 0x26, 0xee, 0x64, 0x4d, 0xe6, 0x55, 0xea, 0x25, 0xa2, 0xf3, + 0x1a, 0x95, 0xff, 0x80, 0xac, 0xa4, 0x2f, 0x98, 0x9c, 0xd6, 0xb8, 0x51, 0xaf, 0x82, 0x2b, 0xea, + 0x64, 0x97, 0x16, 0xfc, 0xfc, 0x5e, 0xd3, 0x06, 0xb7, 0x34, 0x15, 0xfc, 0x07, 0x5e, 0xf9, 0x1a, + 0x00, 0x00, 0xff, 0xff, 0x39, 0x46, 0x37, 0xbe, 0x3a, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/apps/29-fee/types/query.pb.gw.go b/modules/apps/29-fee/types/query.pb.gw.go index 449a244622a..2857a5bc609 100644 --- a/modules/apps/29-fee/types/query.pb.gw.go +++ b/modules/apps/29-fee/types/query.pb.gw.go @@ -32,13 +32,75 @@ var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage var ( - filter_Query_ReceiveFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_Query_ReceiveFee_0 = &utilities.DoubleArray{Encoding: map[string]int{"packet_id": 0, "port_id": 1, "channel_id": 2, "sequence": 3, "relayer_address": 4, "query_height": 5}, Base: []int{1, 1, 1, 2, 3, 4, 5, 0, 0, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 1, 1, 3, 4, 5, 6, 7}} ) func request_Query_ReceiveFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryReceiveFeeRequest var metadata runtime.ServerMetadata + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["packet_id.port_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + } + + val, ok = pathParams["packet_id.channel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + } + + val, ok = pathParams["packet_id.sequence"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.sequence") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.sequence", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.sequence", err) + } + + val, ok = pathParams["relayer_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "relayer_address") + } + + protoReq.RelayerAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "relayer_address", err) + } + + val, ok = pathParams["query_height"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_height") + } + + protoReq.QueryHeight, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_height", err) + } + if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -55,6 +117,68 @@ func local_request_Query_ReceiveFee_0(ctx context.Context, marshaler runtime.Mar var protoReq QueryReceiveFeeRequest var metadata runtime.ServerMetadata + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["packet_id.port_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + } + + val, ok = pathParams["packet_id.channel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + } + + val, ok = pathParams["packet_id.sequence"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.sequence") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.sequence", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.sequence", err) + } + + val, ok = pathParams["relayer_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "relayer_address") + } + + protoReq.RelayerAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "relayer_address", err) + } + + val, ok = pathParams["query_height"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_height") + } + + protoReq.QueryHeight, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_height", err) + } + if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -68,13 +192,75 @@ func local_request_Query_ReceiveFee_0(ctx context.Context, marshaler runtime.Mar } var ( - filter_Query_AckFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_Query_AckFee_0 = &utilities.DoubleArray{Encoding: map[string]int{"packet_id": 0, "port_id": 1, "channel_id": 2, "sequence": 3, "relayer_address": 4, "query_height": 5}, Base: []int{1, 1, 1, 2, 3, 4, 5, 0, 0, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 1, 1, 3, 4, 5, 6, 7}} ) func request_Query_AckFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryAckFeeRequest var metadata runtime.ServerMetadata + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["packet_id.port_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + } + + val, ok = pathParams["packet_id.channel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + } + + val, ok = pathParams["packet_id.sequence"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.sequence") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.sequence", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.sequence", err) + } + + val, ok = pathParams["relayer_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "relayer_address") + } + + protoReq.RelayerAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "relayer_address", err) + } + + val, ok = pathParams["query_height"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_height") + } + + protoReq.QueryHeight, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_height", err) + } + if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -91,6 +277,68 @@ func local_request_Query_AckFee_0(ctx context.Context, marshaler runtime.Marshal var protoReq QueryAckFeeRequest var metadata runtime.ServerMetadata + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["packet_id.port_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + } + + val, ok = pathParams["packet_id.channel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + } + + val, ok = pathParams["packet_id.sequence"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.sequence") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.sequence", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.sequence", err) + } + + val, ok = pathParams["relayer_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "relayer_address") + } + + protoReq.RelayerAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "relayer_address", err) + } + + val, ok = pathParams["query_height"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_height") + } + + protoReq.QueryHeight, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_height", err) + } + if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -104,13 +352,75 @@ func local_request_Query_AckFee_0(ctx context.Context, marshaler runtime.Marshal } var ( - filter_Query_TimeoutFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_Query_TimeoutFee_0 = &utilities.DoubleArray{Encoding: map[string]int{"packet_id": 0, "port_id": 1, "channel_id": 2, "sequence": 3, "relayer_address": 4, "query_height": 5}, Base: []int{1, 1, 1, 2, 3, 4, 5, 0, 0, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 1, 1, 3, 4, 5, 6, 7}} ) func request_Query_TimeoutFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryTimeoutFeeRequest var metadata runtime.ServerMetadata + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["packet_id.port_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + } + + val, ok = pathParams["packet_id.channel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + } + + val, ok = pathParams["packet_id.sequence"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.sequence") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.sequence", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.sequence", err) + } + + val, ok = pathParams["relayer_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "relayer_address") + } + + protoReq.RelayerAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "relayer_address", err) + } + + val, ok = pathParams["query_height"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_height") + } + + protoReq.QueryHeight, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_height", err) + } + if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -127,6 +437,68 @@ func local_request_Query_TimeoutFee_0(ctx context.Context, marshaler runtime.Mar var protoReq QueryTimeoutFeeRequest var metadata runtime.ServerMetadata + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["packet_id.port_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + } + + val, ok = pathParams["packet_id.channel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + } + + val, ok = pathParams["packet_id.sequence"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.sequence") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.sequence", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.sequence", err) + } + + val, ok = pathParams["relayer_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "relayer_address") + } + + protoReq.RelayerAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "relayer_address", err) + } + + val, ok = pathParams["query_height"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_height") + } + + protoReq.QueryHeight, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_height", err) + } + if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -386,11 +758,11 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_ReceiveFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "receive_fee"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ReceiveFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9, 2, 10, 1, 0, 4, 1, 5, 11, 2, 12, 1, 0, 4, 1, 5, 13, 2, 14, 1, 0, 4, 1, 5, 15}, []string{"ibc", "apps", "middleware", "fee", "v1", "receive_fee", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence", "relayer", "relayer_address", "height", "query_height"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_AckFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "ack_fee"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_AckFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9, 2, 10, 1, 0, 4, 1, 5, 11, 2, 12, 1, 0, 4, 1, 5, 13, 2, 14, 1, 0, 4, 1, 5, 15}, []string{"ibc", "apps", "middleware", "fee", "v1", "ack_fee", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence", "relayer", "relayer_address", "height", "query_height"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_TimeoutFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "timeout_fee"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_TimeoutFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9, 2, 10, 1, 0, 4, 1, 5, 11, 1, 0, 4, 1, 5, 12, 2, 13, 1, 0, 4, 1, 5, 14}, []string{"ibc", "apps", "middleware", "fee", "v1", "timeout_fee", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence", "relayer_address", "height", "query_height"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_IncentivizedPackets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "incentivized_packets"}, "", runtime.AssumeColonVerbOpt(true))) ) diff --git a/proto/ibc/applications/middleware/fee/v1/fee.proto b/proto/ibc/applications/middleware/fee/v1/fee.proto index fde1a4dc439..0d284c09d06 100644 --- a/proto/ibc/applications/middleware/fee/v1/fee.proto +++ b/proto/ibc/applications/middleware/fee/v1/fee.proto @@ -16,6 +16,6 @@ message Fee { // Fee associated with a packet_id message IdentifiedPacketFee { - ibc.core.channel.v1.PacketId packet_id = 1; - Fee fee = 2; + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; + Fee fee = 2; } diff --git a/proto/ibc/applications/middleware/fee/v1/genesis.proto b/proto/ibc/applications/middleware/fee/v1/genesis.proto index e464abd4405..1143a0f367f 100644 --- a/proto/ibc/applications/middleware/fee/v1/genesis.proto +++ b/proto/ibc/applications/middleware/fee/v1/genesis.proto @@ -1,10 +1,7 @@ syntax = "proto3"; -package ibc.applications.middleware.fee.v1; - import "gogoproto/gogo.proto"; import "ibc/applications/middleware/fee/v1/fee.proto"; -import "ibc/core/channel/v1/channel.proto"; option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; // GenesisState defines the fee middleware genesis state diff --git a/proto/ibc/applications/middleware/fee/v1/query.proto b/proto/ibc/applications/middleware/fee/v1/query.proto index 0df68e4e656..70fcd458044 100644 --- a/proto/ibc/applications/middleware/fee/v1/query.proto +++ b/proto/ibc/applications/middleware/fee/v1/query.proto @@ -15,17 +15,23 @@ option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; service Query { // Gets the fee expected for submitting ReceivePacket msg for the given packet rpc ReceiveFee(QueryReceiveFeeRequest) returns (QueryReceiveFeeResponse) { - option (google.api.http).get = "/ibc/apps/middleware/fee/v1/receive_fee"; + option (google.api.http).get = + "/ibc/apps/middleware/fee/v1/receive_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/" + "{packet_id.sequence}/relayer/{relayer_address}/height/{query_height}"; } // Gets the fee expected for submitting AcknowledgePacket msg for the given packet rpc AckFee(QueryAckFeeRequest) returns (QueryAckFeeResponse) { - option (google.api.http).get = "/ibc/apps/middleware/fee/v1/ack_fee"; + option (google.api.http).get = + "/ibc/apps/middleware/fee/v1/ack_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/" + "{packet_id.sequence}/relayer/{relayer_address}/height/{query_height}"; } // Gets the fee expected for submitting TimeoutPacket msg for the given packet rpc TimeoutFee(QueryTimeoutFeeRequest) returns (QueryTimeoutFeeResponse) { - option (google.api.http).get = "/ibc/apps/middleware/fee/v1/timeout_fee"; + option (google.api.http).get = + "/ibc/apps/middleware/fee/v1/timeout_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/" + "{packet_id.sequence}/{relayer_address}/height/{query_height}"; } // Gets all incentivized packets diff --git a/proto/ibc/applications/middleware/fee/v1/query.proto~ b/proto/ibc/applications/middleware/fee/v1/query.proto~ new file mode 100644 index 00000000000..86fca24ab91 --- /dev/null +++ b/proto/ibc/applications/middleware/fee/v1/query.proto~ @@ -0,0 +1,98 @@ +syntax = "proto3"; + +package ibc.applications.middleware.fee.v1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "ibc/applications/middleware/fee/v1/fee.proto"; +import "google/api/annotations.proto"; +import "ibc/core/channel/v1/channel.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; + +option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; + +// Query provides defines the gRPC querier service. +service Query { + // Gets the fee expected for submitting ReceivePacket msg for the given packet + rpc ReceiveFee(QueryReceiveFeeRequest) returns (QueryReceiveFeeResponse) { + option (google.api.http).get = "/ibc/apps/middleware/fee/v1/receive_fee/packet/{packet_id.channel_id}/relayer/" + "{relayer_address}/height/{query_height}"; + } + + // Gets the fee expected for submitting AcknowledgePacket msg for the given packet + rpc AckFee(QueryAckFeeRequest) returns (QueryAckFeeResponse) { + option (google.api.http).get = "/ibc/apps/middleware/fee/v1/ack_fee/packet/{packet_id.sequence}/relayer/" + "{relayer_address}/height/{query_height}"; + } + + // Gets the fee expected for submitting TimeoutPacket msg for the given packet + rpc TimeoutFee(QueryTimeoutFeeRequest) returns (QueryTimeoutFeeResponse) { + option (google.api.http).get = "/ibc/apps/middleware/fee/v1/timeout_fee/packet/{packet_id.channel_id}/relayer/" + "{relayer_address}/height/{query_height}"; + } + + // Gets all incentivized packets + rpc IncentivizedPackets(QueryIncentivizedPacketsRequest) returns (QueryIncentivizedPacketsResponse) { + option (google.api.http).get = "/ibc/apps/middleware/fee/v1/incentivized_packets"; + } +} + +// QueryReceiveRequestFee is the request type for quering the receive fee +message QueryReceiveFeeRequest { + // PacketID + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; + // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). + string relayer_address = 2 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; + // Height to query at + uint64 query_height = 3 [(gogoproto.moretags) = "yaml:\"query_height\""]; +} + +// QueryReceiveFeeResponse is the response type for the ReceiveFee RPC +message QueryReceiveFeeResponse { + ibc.applications.middleware.fee.v1.Fee fee = 1; +} + +// QueryAckFeeRequest is the request type for querying the acknowledgement fee +message QueryAckFeeRequest { + // PacketID + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; + // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). + string relayer_address = 2 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; + // Height to query at + uint64 query_height = 3 [(gogoproto.moretags) = "yaml:\"query_height\""]; +} + +// QueryAckFeeResponse is the response type for the AckFee RPC +message QueryAckFeeResponse { + ibc.applications.middleware.fee.v1.Fee fee = 1; +} + +// QueryTimeoutFeeRequest is the request type for querying the timeout fee +message QueryTimeoutFeeRequest { + // PacketID + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; + // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). + string relayer_address = 2 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; + // Height to query at + uint64 query_height = 3 [(gogoproto.moretags) = "yaml:\"query_height\""]; +} + +// QueryTimeoutFeeResponse is the response type for the timeout RPC +message QueryTimeoutFeeResponse { + ibc.applications.middleware.fee.v1.Fee fee = 1; +} + +// QueryIncentivizedPacketRequest is the request type for querying for all incentivized packets +message QueryIncentivizedPacketsRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryTimeoutFeeResponse is the response type for the timeout RPC +message QueryIncentivizedPacketsResponse { + // Map of all incentivized_packets + repeated ibc.applications.middleware.fee.v1.IdentifiedPacketFee incentivized_packets = 1 + [(gogoproto.moretags) = "yaml:\"incentivized_packets\""]; + // Height to query at + uint64 query_height = 2 [(gogoproto.moretags) = "yaml:\"query_height\""]; +} From 42cd7d1b00b8c4f689ba3d7c88b99ea867e00aa4 Mon Sep 17 00:00:00 2001 From: Sean King Date: Thu, 22 Jul 2021 19:16:10 +0200 Subject: [PATCH 20/26] refactor: updating IdentifiedPacketFee --- docs/ibc/proto-docs.md | 5 +- modules/apps/29-fee/types/fee.pb.go | 254 +++++++++++++++--- modules/apps/29-fee/types/genesis.pb.go | 40 ++- .../applications/middleware/fee/v1/fee.proto | 7 +- .../middleware/fee/v1/genesis.proto | 1 + 5 files changed, 246 insertions(+), 61 deletions(-) diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md index 8cddb6e94f9..4ab514dd7e1 100644 --- a/docs/ibc/proto-docs.md +++ b/docs/ibc/proto-docs.md @@ -642,7 +642,10 @@ Fee associated with a packet_id | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `packet_id` | [ibc.core.channel.v1.PacketId](#ibc.core.channel.v1.PacketId) | | | -| `fee` | [Fee](#ibc.applications.middleware.fee.v1.Fee) | | | +| `receive_fee` | [Fee](#ibc.applications.middleware.fee.v1.Fee) | | | +| `ack_fee` | [Fee](#ibc.applications.middleware.fee.v1.Fee) | | | +| `timeout_fee` | [Fee](#ibc.applications.middleware.fee.v1.Fee) | | | +| `relayers` | [string](#string) | repeated | | diff --git a/modules/apps/29-fee/types/fee.pb.go b/modules/apps/29-fee/types/fee.pb.go index 36f386fbcd4..437ad490373 100644 --- a/modules/apps/29-fee/types/fee.pb.go +++ b/modules/apps/29-fee/types/fee.pb.go @@ -75,8 +75,11 @@ func (m *Fee) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { // Fee associated with a packet_id type IdentifiedPacketFee struct { - PacketId *types1.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"packet_id"` - Fee *Fee `protobuf:"bytes,2,opt,name=fee,proto3" json:"fee,omitempty"` + PacketId *types1.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"packet_id"` + ReceiveFee *Fee `protobuf:"bytes,2,opt,name=receive_fee,json=receiveFee,proto3" json:"receive_fee,omitempty" yaml:"receive_fee"` + AckFee *Fee `protobuf:"bytes,3,opt,name=ack_fee,json=ackFee,proto3" json:"ack_fee,omitempty" yaml:"ack_fee"` + TimeoutFee *Fee `protobuf:"bytes,4,opt,name=timeout_fee,json=timeoutFee,proto3" json:"timeout_fee,omitempty" yaml:"timeout_fee"` + Relayers []string `protobuf:"bytes,5,rep,name=relayers,proto3" json:"relayers,omitempty"` } func (m *IdentifiedPacketFee) Reset() { *m = IdentifiedPacketFee{} } @@ -119,9 +122,30 @@ func (m *IdentifiedPacketFee) GetPacketId() *types1.PacketId { return nil } -func (m *IdentifiedPacketFee) GetFee() *Fee { +func (m *IdentifiedPacketFee) GetReceiveFee() *Fee { if m != nil { - return m.Fee + return m.ReceiveFee + } + return nil +} + +func (m *IdentifiedPacketFee) GetAckFee() *Fee { + if m != nil { + return m.AckFee + } + return nil +} + +func (m *IdentifiedPacketFee) GetTimeoutFee() *Fee { + if m != nil { + return m.TimeoutFee + } + return nil +} + +func (m *IdentifiedPacketFee) GetRelayers() []string { + if m != nil { + return m.Relayers } return nil } @@ -136,31 +160,36 @@ func init() { } var fileDescriptor_9a4c0273395d2c1a = []byte{ - // 372 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x51, 0xbd, 0x6e, 0xea, 0x30, - 0x14, 0x4e, 0x2e, 0x12, 0xba, 0x37, 0x2c, 0x57, 0x5c, 0x06, 0x2e, 0x52, 0x03, 0xcd, 0x52, 0x86, - 0x62, 0x37, 0xe9, 0x44, 0x47, 0x2a, 0x21, 0x21, 0x75, 0x40, 0x8c, 0x5d, 0x2a, 0xc7, 0x3e, 0x04, - 0x97, 0x24, 0x27, 0xc2, 0x86, 0x8a, 0xb7, 0xe8, 0x33, 0x74, 0xec, 0x93, 0x30, 0x32, 0x76, 0xa2, - 0x15, 0xbc, 0x41, 0x9f, 0xa0, 0x72, 0x92, 0xfe, 0x48, 0x1d, 0x3a, 0x9d, 0x63, 0xfb, 0xfb, 0xce, - 0xf7, 0xf9, 0x3b, 0xce, 0xa9, 0x0c, 0x39, 0x65, 0x59, 0x16, 0x4b, 0xce, 0xb4, 0xc4, 0x54, 0xd1, - 0x44, 0x0a, 0x11, 0xc3, 0x1d, 0x5b, 0x00, 0x9d, 0x02, 0xd0, 0x95, 0x6f, 0x0a, 0xc9, 0x16, 0xa8, - 0xb1, 0xee, 0xc9, 0x90, 0x93, 0xaf, 0x68, 0xf2, 0x89, 0x26, 0x06, 0xb6, 0xf2, 0x5b, 0x2e, 0x47, - 0x95, 0xa0, 0xa2, 0x21, 0x53, 0x86, 0x1d, 0x82, 0x66, 0x3e, 0xe5, 0x28, 0xd3, 0x62, 0x46, 0xab, - 0x11, 0x61, 0x84, 0x79, 0x4b, 0x4d, 0x57, 0xde, 0x1e, 0x1b, 0x1f, 0x1c, 0x17, 0x40, 0xf9, 0x8c, - 0xa5, 0x29, 0xc4, 0x46, 0xb8, 0x6c, 0x0b, 0x88, 0x77, 0xeb, 0x54, 0x86, 0x00, 0x75, 0xee, 0x54, - 0x59, 0x82, 0xcb, 0x54, 0x37, 0xed, 0x4e, 0xa5, 0x5b, 0x0b, 0xfe, 0x93, 0x42, 0x90, 0x18, 0x41, - 0x52, 0x0a, 0x92, 0x4b, 0x94, 0xe9, 0xe0, 0x6c, 0xb3, 0x6b, 0x5b, 0x8f, 0xcf, 0xed, 0x6e, 0x24, - 0xf5, 0x6c, 0x19, 0x12, 0x8e, 0x09, 0x2d, 0xdd, 0x15, 0xa5, 0xa7, 0xc4, 0x9c, 0xea, 0x75, 0x06, - 0x2a, 0x27, 0xa8, 0x49, 0x39, 0xda, 0x7b, 0xb0, 0x9d, 0x7f, 0x23, 0x01, 0xa9, 0x96, 0x53, 0x09, - 0x62, 0xcc, 0xf8, 0x1c, 0xb4, 0x11, 0x1f, 0x3b, 0x7f, 0xb2, 0xfc, 0x70, 0x23, 0x45, 0xd3, 0xee, - 0xd8, 0xdd, 0x5a, 0x70, 0x44, 0x4c, 0x28, 0xc6, 0x3a, 0x79, 0xf7, 0xbb, 0xf2, 0x49, 0x41, 0x19, - 0x89, 0x41, 0xe3, 0x75, 0xd7, 0xfe, 0xbb, 0x66, 0x49, 0x7c, 0xe1, 0x7d, 0x30, 0xbd, 0xc9, 0xef, - 0xac, 0x7c, 0xaf, 0xf7, 0x9d, 0xca, 0x14, 0xa0, 0xf9, 0x2b, 0x9f, 0x75, 0x42, 0x7e, 0x0e, 0x98, - 0x0c, 0x01, 0x26, 0x86, 0x33, 0xb8, 0xda, 0xec, 0x5d, 0x7b, 0xbb, 0x77, 0xed, 0x97, 0xbd, 0x6b, - 0xdf, 0x1f, 0x5c, 0x6b, 0x7b, 0x70, 0xad, 0xa7, 0x83, 0x6b, 0x5d, 0x07, 0xdf, 0x3f, 0x2c, 0x43, - 0xde, 0x8b, 0x90, 0x26, 0x28, 0x96, 0x31, 0x28, 0xb3, 0x72, 0x45, 0x83, 0x7e, 0xcf, 0xac, 0x38, - 0x0f, 0x20, 0xac, 0xe6, 0x29, 0x9f, 0xbf, 0x05, 0x00, 0x00, 0xff, 0xff, 0xb6, 0xbd, 0x34, 0xb3, - 0x12, 0x02, 0x00, 0x00, + // 456 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x41, 0x8e, 0xd3, 0x30, + 0x14, 0x86, 0x1b, 0x02, 0x65, 0xc6, 0x95, 0x10, 0x0a, 0x23, 0x54, 0x2a, 0x91, 0x14, 0x6f, 0xe8, + 0x82, 0xda, 0xb4, 0xac, 0x60, 0x59, 0xa4, 0x91, 0x46, 0x62, 0x31, 0x8a, 0x58, 0xb1, 0x99, 0x71, + 0xec, 0xd7, 0x8e, 0x69, 0x12, 0x47, 0xb1, 0x5b, 0xd4, 0x5b, 0x70, 0x01, 0x2e, 0xc0, 0x49, 0x66, + 0x39, 0x4b, 0x56, 0x01, 0xb5, 0x37, 0xe8, 0x09, 0x90, 0x1d, 0x33, 0x54, 0x62, 0x81, 0x60, 0xe5, + 0xf7, 0x92, 0xf7, 0x7f, 0xff, 0x2f, 0xfb, 0xa1, 0x17, 0x32, 0xe3, 0x94, 0x55, 0x55, 0x2e, 0x39, + 0x33, 0x52, 0x95, 0x9a, 0x16, 0x52, 0x88, 0x1c, 0x3e, 0xb1, 0x1a, 0xe8, 0x1c, 0x80, 0xae, 0x27, + 0xf6, 0x20, 0x55, 0xad, 0x8c, 0x8a, 0xb0, 0xcc, 0x38, 0x39, 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 0x39, 0x40, 0xff, 0x8e, 0x63, 0x3e, 0x27, 0x7f, 0xbf, 0x68, 0x72, 0x0a, 0x30, 0x7b, 0xbc, + 0x6f, 0x92, 0xa8, 0xa5, 0x1f, 0x50, 0x70, 0x8a, 0x7c, 0x67, 0x33, 0xbf, 0x47, 0xf7, 0x19, 0x5f, + 0x3a, 0x7a, 0xf8, 0x6f, 0xf4, 0x68, 0xdf, 0x24, 0x0f, 0x5a, 0xba, 0x27, 0xe0, 0xb4, 0xcb, 0xf8, + 0xd2, 0x52, 0x2f, 0x51, 0xcf, 0xc8, 0x02, 0xd4, 0xca, 0x38, 0xf2, 0xdd, 0xff, 0xce, 0x7d, 0x40, + 0xc1, 0x29, 0xf2, 0x9d, 0x75, 0x18, 0xa0, 0xa3, 0x1a, 0x72, 0xb6, 0x81, 0x5a, 0xf7, 0xef, 0x0d, + 0xc3, 0xd1, 0x71, 0x7a, 0xdb, 0xcf, 0xde, 0x5d, 0x6f, 0xe3, 0xe0, 0x66, 0x1b, 0x07, 0x3f, 0xb6, + 0x71, 0xf0, 0x79, 0x17, 0x77, 0x6e, 0x76, 0x71, 0xe7, 0xdb, 0x2e, 0xee, 0x7c, 0x98, 0xfe, 0xf9, + 0xd6, 0x32, 0xe3, 0xe3, 0x85, 0xa2, 0x85, 0x12, 0xab, 0x1c, 0xb4, 0xdd, 0x76, 0x4d, 0xa7, 0xaf, + 0xc7, 0x76, 0xbb, 0xdd, 0xdb, 0x67, 0x5d, 0xb7, 0x60, 0xaf, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, + 0x0c, 0xf6, 0x8d, 0xd8, 0x0d, 0x03, 0x00, 0x00, } func (m *Fee) Marshal() (dAtA []byte, err error) { @@ -220,9 +249,42 @@ func (m *IdentifiedPacketFee) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Fee != nil { + if len(m.Relayers) > 0 { + for iNdEx := len(m.Relayers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Relayers[iNdEx]) + copy(dAtA[i:], m.Relayers[iNdEx]) + i = encodeVarintFee(dAtA, i, uint64(len(m.Relayers[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if m.TimeoutFee != nil { + { + size, err := m.TimeoutFee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFee(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.AckFee != nil { + { + size, err := m.AckFee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFee(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.ReceiveFee != nil { { - size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ReceiveFee.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -283,10 +345,24 @@ func (m *IdentifiedPacketFee) Size() (n int) { l = m.PacketId.Size() n += 1 + l + sovFee(uint64(l)) } - if m.Fee != nil { - l = m.Fee.Size() + if m.ReceiveFee != nil { + l = m.ReceiveFee.Size() + n += 1 + l + sovFee(uint64(l)) + } + if m.AckFee != nil { + l = m.AckFee.Size() n += 1 + l + sovFee(uint64(l)) } + if m.TimeoutFee != nil { + l = m.TimeoutFee.Size() + n += 1 + l + sovFee(uint64(l)) + } + if len(m.Relayers) > 0 { + for _, s := range m.Relayers { + l = len(s) + n += 1 + l + sovFee(uint64(l)) + } + } return n } @@ -447,7 +523,79 @@ func (m *IdentifiedPacketFee) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ReceiveFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFee + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFee + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFee + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ReceiveFee == nil { + m.ReceiveFee = &Fee{} + } + if err := m.ReceiveFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AckFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFee + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFee + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFee + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AckFee == nil { + m.AckFee = &Fee{} + } + if err := m.AckFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutFee", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -474,13 +622,45 @@ func (m *IdentifiedPacketFee) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Fee == nil { - m.Fee = &Fee{} + if m.TimeoutFee == nil { + m.TimeoutFee = &Fee{} } - if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.TimeoutFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Relayers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFee + } + 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 ErrInvalidLengthFee + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFee + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Relayers = append(m.Relayers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipFee(dAtA[iNdEx:]) diff --git a/modules/apps/29-fee/types/genesis.pb.go b/modules/apps/29-fee/types/genesis.pb.go index a13365d1fdb..1b4dca09ab5 100644 --- a/modules/apps/29-fee/types/genesis.pb.go +++ b/modules/apps/29-fee/types/genesis.pb.go @@ -5,7 +5,6 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/ibc-go/modules/core/04-channel/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" @@ -79,26 +78,25 @@ func init() { } var fileDescriptor_6a4f6c8d78b5dfbf = []byte{ - // 290 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xb1, 0x4e, 0xf3, 0x30, - 0x1c, 0xc4, 0x1b, 0x7d, 0xd2, 0x37, 0xa4, 0x9d, 0x0a, 0x12, 0xa8, 0x83, 0x81, 0x4c, 0x0c, 0xd4, - 0xa6, 0x61, 0x40, 0x30, 0x76, 0x28, 0x42, 0x62, 0x40, 0xb0, 0xb1, 0x20, 0xc7, 0xb9, 0xa4, 0x16, - 0x49, 0x1c, 0xe5, 0xef, 0x16, 0x75, 0xe6, 0x05, 0x78, 0x2c, 0xc6, 0x8e, 0x4c, 0x08, 0x25, 0x6f, - 0xc0, 0x13, 0x20, 0x27, 0x95, 0xe8, 0x06, 0xdb, 0x59, 0xfe, 0xdd, 0xf9, 0xce, 0xfe, 0xa9, 0x8e, - 0x94, 0x90, 0x65, 0x99, 0x69, 0x25, 0xad, 0x36, 0x05, 0x89, 0x5c, 0xc7, 0x71, 0x86, 0x67, 0x59, - 0x41, 0x24, 0x80, 0x58, 0x4e, 0x44, 0x8a, 0x02, 0xa4, 0x89, 0x97, 0x95, 0xb1, 0x66, 0x18, 0xe8, - 0x48, 0xf1, 0x6d, 0x07, 0xff, 0x71, 0xf0, 0x04, 0xe0, 0xcb, 0xc9, 0x68, 0x37, 0x35, 0xa9, 0x69, - 0x71, 0xe1, 0x54, 0xe7, 0x1c, 0x9d, 0xfc, 0xe1, 0x2d, 0x17, 0xd0, 0xd1, 0x47, 0x8e, 0x56, 0xa6, - 0x82, 0x50, 0x73, 0x59, 0x14, 0xc8, 0xdc, 0xf5, 0x46, 0x76, 0x48, 0xf0, 0xe2, 0xf9, 0x83, 0xab, - 0xae, 0xdc, 0xbd, 0x95, 0x16, 0x43, 0xf2, 0x07, 0xa5, 0x54, 0x4f, 0xb0, 0xf4, 0x98, 0x00, 0xb4, - 0xef, 0x1d, 0xfe, 0x3b, 0xee, 0x87, 0xe7, 0xfc, 0xf7, 0xca, 0xfc, 0x3a, 0x46, 0x61, 0x75, 0xa2, - 0x11, 0xdf, 0xb6, 0x09, 0x33, 0x60, 0xba, 0xf7, 0xf5, 0x71, 0xb0, 0xb3, 0x92, 0x79, 0x76, 0x19, - 0x6c, 0xc7, 0x06, 0x77, 0xfd, 0xcd, 0x71, 0x06, 0xd0, 0xf4, 0xe6, 0xad, 0x66, 0xde, 0xba, 0x66, - 0xde, 0x67, 0xcd, 0xbc, 0xd7, 0x86, 0xf5, 0xd6, 0x0d, 0xeb, 0xbd, 0x37, 0xac, 0xf7, 0x10, 0xa6, - 0xda, 0xce, 0x17, 0x11, 0x57, 0x26, 0x17, 0xca, 0x50, 0x6e, 0x48, 0xe8, 0x48, 0x8d, 0x53, 0x23, - 0x72, 0x13, 0x2f, 0x32, 0x90, 0xfb, 0x0d, 0x12, 0xe1, 0xc5, 0xd8, 0xad, 0xb7, 0xab, 0x12, 0x14, - 0xfd, 0x6f, 0xa7, 0x9d, 0x7d, 0x07, 0x00, 0x00, 0xff, 0xff, 0x27, 0xbb, 0x9c, 0x19, 0x99, 0x01, - 0x00, 0x00, + // 273 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x8f, 0x31, 0x4b, 0xc3, 0x40, + 0x18, 0x86, 0x13, 0x04, 0x87, 0xb4, 0x53, 0x15, 0x94, 0x0e, 0xa7, 0x64, 0x72, 0xb0, 0x77, 0x36, + 0x0e, 0xa2, 0x63, 0x87, 0x8a, 0xe0, 0x20, 0xba, 0xb9, 0xc8, 0xe5, 0xf2, 0x26, 0x1e, 0x26, 0xf9, + 0x42, 0xbf, 0x6b, 0xa5, 0xb3, 0x7f, 0xc0, 0x9f, 0xe5, 0xd8, 0xd1, 0x49, 0x24, 0xf9, 0x07, 0xfe, + 0x02, 0x49, 0x2a, 0xd8, 0x4d, 0xb7, 0x3b, 0x78, 0xdf, 0xe7, 0xfd, 0x9e, 0xe0, 0xc4, 0xc6, 0x46, + 0xe9, 0xaa, 0xca, 0xad, 0xd1, 0xce, 0x52, 0xc9, 0xaa, 0xb0, 0x49, 0x92, 0xe3, 0x59, 0xcf, 0xa0, + 0x52, 0x40, 0x2d, 0xc6, 0x2a, 0x43, 0x09, 0xb6, 0x2c, 0xab, 0x19, 0x39, 0x1a, 0x84, 0x36, 0x36, + 0x72, 0xb3, 0x21, 0x7f, 0x1b, 0x32, 0x05, 0xe4, 0x62, 0x3c, 0xdc, 0xcd, 0x28, 0xa3, 0x2e, 0xae, + 0xda, 0xd7, 0xba, 0x39, 0x3c, 0xfe, 0xc7, 0x56, 0x0b, 0xe8, 0xd2, 0xe1, 0x8b, 0x1f, 0xf4, 0x2f, + 0xd7, 0xcb, 0x77, 0x4e, 0x3b, 0x0c, 0x38, 0xe8, 0x57, 0xda, 0x3c, 0xc1, 0xf1, 0x43, 0x0a, 0xf0, + 0xbe, 0x7f, 0xb8, 0x75, 0xd4, 0x8b, 0xce, 0xe4, 0xdf, 0xf7, 0xc8, 0xab, 0x04, 0xa5, 0xb3, 0xa9, + 0x45, 0x72, 0xd3, 0x11, 0xa6, 0xc0, 0x64, 0xef, 0xeb, 0xe3, 0x60, 0x67, 0xa9, 0x8b, 0xfc, 0x22, + 0xdc, 0xc4, 0x86, 0xb7, 0xbd, 0x9f, 0xef, 0x14, 0xe0, 0xc9, 0xf5, 0x5b, 0x2d, 0xfc, 0x55, 0x2d, + 0xfc, 0xcf, 0x5a, 0xf8, 0xaf, 0x8d, 0xf0, 0x56, 0x8d, 0xf0, 0xde, 0x1b, 0xe1, 0xdd, 0x47, 0x99, + 0x75, 0x8f, 0xf3, 0x58, 0x1a, 0x2a, 0x94, 0x21, 0x2e, 0x88, 0x95, 0x8d, 0xcd, 0x28, 0x23, 0x55, + 0x50, 0x32, 0xcf, 0xc1, 0xad, 0x2a, 0xab, 0xe8, 0x7c, 0xd4, 0xaa, 0xb9, 0x65, 0x05, 0x8e, 0xb7, + 0x3b, 0xb5, 0xd3, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa8, 0x8f, 0xe8, 0x3b, 0x76, 0x01, 0x00, + 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/proto/ibc/applications/middleware/fee/v1/fee.proto b/proto/ibc/applications/middleware/fee/v1/fee.proto index 0d284c09d06..d8261baf4e5 100644 --- a/proto/ibc/applications/middleware/fee/v1/fee.proto +++ b/proto/ibc/applications/middleware/fee/v1/fee.proto @@ -16,6 +16,9 @@ message Fee { // Fee associated with a packet_id message IdentifiedPacketFee { - ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; - Fee fee = 2; + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; + Fee receive_fee = 2 [(gogoproto.moretags) = "yaml:\"receive_fee\""]; + Fee ack_fee = 3 [(gogoproto.moretags) = "yaml:\"ack_fee\""]; + Fee timeout_fee = 4 [(gogoproto.moretags) = "yaml:\"timeout_fee\""]; + repeated string relayers = 5; } diff --git a/proto/ibc/applications/middleware/fee/v1/genesis.proto b/proto/ibc/applications/middleware/fee/v1/genesis.proto index 1143a0f367f..3cc4ae6f07b 100644 --- a/proto/ibc/applications/middleware/fee/v1/genesis.proto +++ b/proto/ibc/applications/middleware/fee/v1/genesis.proto @@ -1,5 +1,6 @@ syntax = "proto3"; +package ibc.applications.middleware.fee.v1; import "gogoproto/gogo.proto"; import "ibc/applications/middleware/fee/v1/fee.proto"; option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; From 0b936453cbda2c6292b5dfb03c20fd6f6a05f44f Mon Sep 17 00:00:00 2001 From: Sean King Date: Thu, 22 Jul 2021 19:20:10 +0200 Subject: [PATCH 21/26] fix: remove hidden file --- .../middleware/fee/v1/genesis.proto~ | 19 ---- .../middleware/fee/v1/query.proto~ | 98 ------------------- 2 files changed, 117 deletions(-) delete mode 100644 proto/ibc/applications/middleware/fee/v1/genesis.proto~ delete mode 100644 proto/ibc/applications/middleware/fee/v1/query.proto~ diff --git a/proto/ibc/applications/middleware/fee/v1/genesis.proto~ b/proto/ibc/applications/middleware/fee/v1/genesis.proto~ deleted file mode 100644 index 588480c1d19..00000000000 --- a/proto/ibc/applications/middleware/fee/v1/genesis.proto~ +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.middleware.fee.v1; - -import "gogoproto/gogo.proto"; -import "ibc/applications/middleware/fee/v1/fee.proto"; -import "ibc/core/channel/v1/channel.proto"; -option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; - -// GenesisState defines the fee middleware genesis state -message GenesisState { - // An entry for the PacketsFees map - message PacketsFeesMapEntry { - ibc.core.channel.v1.PacketId packet_id = 1; - ibc.applications.middleware.fee.v1.Fee fee = 2; - } - // A mapping of packets -> escrowed fees - repeated PacketsFeesMapEntry packets_fees_map = 1; -} diff --git a/proto/ibc/applications/middleware/fee/v1/query.proto~ b/proto/ibc/applications/middleware/fee/v1/query.proto~ deleted file mode 100644 index 86fca24ab91..00000000000 --- a/proto/ibc/applications/middleware/fee/v1/query.proto~ +++ /dev/null @@ -1,98 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.middleware.fee.v1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "ibc/applications/middleware/fee/v1/fee.proto"; -import "google/api/annotations.proto"; -import "ibc/core/channel/v1/channel.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; - -option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; - -// Query provides defines the gRPC querier service. -service Query { - // Gets the fee expected for submitting ReceivePacket msg for the given packet - rpc ReceiveFee(QueryReceiveFeeRequest) returns (QueryReceiveFeeResponse) { - option (google.api.http).get = "/ibc/apps/middleware/fee/v1/receive_fee/packet/{packet_id.channel_id}/relayer/" - "{relayer_address}/height/{query_height}"; - } - - // Gets the fee expected for submitting AcknowledgePacket msg for the given packet - rpc AckFee(QueryAckFeeRequest) returns (QueryAckFeeResponse) { - option (google.api.http).get = "/ibc/apps/middleware/fee/v1/ack_fee/packet/{packet_id.sequence}/relayer/" - "{relayer_address}/height/{query_height}"; - } - - // Gets the fee expected for submitting TimeoutPacket msg for the given packet - rpc TimeoutFee(QueryTimeoutFeeRequest) returns (QueryTimeoutFeeResponse) { - option (google.api.http).get = "/ibc/apps/middleware/fee/v1/timeout_fee/packet/{packet_id.channel_id}/relayer/" - "{relayer_address}/height/{query_height}"; - } - - // Gets all incentivized packets - rpc IncentivizedPackets(QueryIncentivizedPacketsRequest) returns (QueryIncentivizedPacketsResponse) { - option (google.api.http).get = "/ibc/apps/middleware/fee/v1/incentivized_packets"; - } -} - -// QueryReceiveRequestFee is the request type for quering the receive fee -message QueryReceiveFeeRequest { - // PacketID - ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; - // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - string relayer_address = 2 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; - // Height to query at - uint64 query_height = 3 [(gogoproto.moretags) = "yaml:\"query_height\""]; -} - -// QueryReceiveFeeResponse is the response type for the ReceiveFee RPC -message QueryReceiveFeeResponse { - ibc.applications.middleware.fee.v1.Fee fee = 1; -} - -// QueryAckFeeRequest is the request type for querying the acknowledgement fee -message QueryAckFeeRequest { - // PacketID - ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; - // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - string relayer_address = 2 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; - // Height to query at - uint64 query_height = 3 [(gogoproto.moretags) = "yaml:\"query_height\""]; -} - -// QueryAckFeeResponse is the response type for the AckFee RPC -message QueryAckFeeResponse { - ibc.applications.middleware.fee.v1.Fee fee = 1; -} - -// QueryTimeoutFeeRequest is the request type for querying the timeout fee -message QueryTimeoutFeeRequest { - // PacketID - ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; - // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - string relayer_address = 2 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; - // Height to query at - uint64 query_height = 3 [(gogoproto.moretags) = "yaml:\"query_height\""]; -} - -// QueryTimeoutFeeResponse is the response type for the timeout RPC -message QueryTimeoutFeeResponse { - ibc.applications.middleware.fee.v1.Fee fee = 1; -} - -// QueryIncentivizedPacketRequest is the request type for querying for all incentivized packets -message QueryIncentivizedPacketsRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryTimeoutFeeResponse is the response type for the timeout RPC -message QueryIncentivizedPacketsResponse { - // Map of all incentivized_packets - repeated ibc.applications.middleware.fee.v1.IdentifiedPacketFee incentivized_packets = 1 - [(gogoproto.moretags) = "yaml:\"incentivized_packets\""]; - // Height to query at - uint64 query_height = 2 [(gogoproto.moretags) = "yaml:\"query_height\""]; -} From 985a801281ab7a551d6baf5fe81ce0934ab342e3 Mon Sep 17 00:00:00 2001 From: Sean King Date: Mon, 26 Jul 2021 09:46:27 +0200 Subject: [PATCH 22/26] removing middleware dir & adding query --- docs/ibc/proto-docs.md | 162 +++-- modules/apps/29-fee/types/fee.pb.go | 75 +-- modules/apps/29-fee/types/genesis.pb.go | 47 +- modules/apps/29-fee/types/query.pb.go | 620 +++++++++++++++--- modules/apps/29-fee/types/query.pb.gw.go | 90 ++- modules/apps/29-fee/types/tx.pb.go | 107 ++- .../{middleware => }/fee/v1/fee.proto | 2 +- .../{middleware => }/fee/v1/genesis.proto | 6 +- proto/ibc/applications/fee/v1/query.proto | 121 ++++ .../v1/query.proto => fee/v1/query.proto~} | 0 .../{middleware => }/fee/v1/tx.proto | 14 +- 11 files changed, 956 insertions(+), 288 deletions(-) rename proto/ibc/applications/{middleware => }/fee/v1/fee.proto (95%) rename proto/ibc/applications/{middleware => }/fee/v1/genesis.proto (62%) create mode 100644 proto/ibc/applications/fee/v1/query.proto rename proto/ibc/applications/{middleware/fee/v1/query.proto => fee/v1/query.proto~} (100%) rename proto/ibc/applications/{middleware => }/fee/v1/tx.proto (77%) diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md index 4ab514dd7e1..2100bb5bb73 100644 --- a/docs/ibc/proto-docs.md +++ b/docs/ibc/proto-docs.md @@ -25,32 +25,34 @@ - [Order](#ibc.core.channel.v1.Order) - [State](#ibc.core.channel.v1.State) -- [ibc/applications/middleware/fee/v1/fee.proto](#ibc/applications/middleware/fee/v1/fee.proto) - - [Fee](#ibc.applications.middleware.fee.v1.Fee) - - [IdentifiedPacketFee](#ibc.applications.middleware.fee.v1.IdentifiedPacketFee) +- [ibc/applications/fee/v1/fee.proto](#ibc/applications/fee/v1/fee.proto) + - [Fee](#ibc.applications.fee.v1.Fee) + - [IdentifiedPacketFee](#ibc.applications.fee.v1.IdentifiedPacketFee) -- [ibc/applications/middleware/fee/v1/genesis.proto](#ibc/applications/middleware/fee/v1/genesis.proto) - - [GenesisState](#ibc.applications.middleware.fee.v1.GenesisState) +- [ibc/applications/fee/v1/genesis.proto](#ibc/applications/fee/v1/genesis.proto) + - [GenesisState](#ibc.applications.fee.v1.GenesisState) -- [ibc/applications/middleware/fee/v1/query.proto](#ibc/applications/middleware/fee/v1/query.proto) - - [QueryAckFeeRequest](#ibc.applications.middleware.fee.v1.QueryAckFeeRequest) - - [QueryAckFeeResponse](#ibc.applications.middleware.fee.v1.QueryAckFeeResponse) - - [QueryIncentivizedPacketsRequest](#ibc.applications.middleware.fee.v1.QueryIncentivizedPacketsRequest) - - [QueryIncentivizedPacketsResponse](#ibc.applications.middleware.fee.v1.QueryIncentivizedPacketsResponse) - - [QueryReceiveFeeRequest](#ibc.applications.middleware.fee.v1.QueryReceiveFeeRequest) - - [QueryReceiveFeeResponse](#ibc.applications.middleware.fee.v1.QueryReceiveFeeResponse) - - [QueryTimeoutFeeRequest](#ibc.applications.middleware.fee.v1.QueryTimeoutFeeRequest) - - [QueryTimeoutFeeResponse](#ibc.applications.middleware.fee.v1.QueryTimeoutFeeResponse) +- [ibc/applications/fee/v1/query.proto](#ibc/applications/fee/v1/query.proto) + - [QueryAckFeeRequest](#ibc.applications.fee.v1.QueryAckFeeRequest) + - [QueryAckFeeResponse](#ibc.applications.fee.v1.QueryAckFeeResponse) + - [QueryIncentivizedPacketRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketRequest) + - [QueryIncentivizedPacketResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketResponse) + - [QueryIncentivizedPacketsRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketsRequest) + - [QueryIncentivizedPacketsResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketsResponse) + - [QueryReceiveFeeRequest](#ibc.applications.fee.v1.QueryReceiveFeeRequest) + - [QueryReceiveFeeResponse](#ibc.applications.fee.v1.QueryReceiveFeeResponse) + - [QueryTimeoutFeeRequest](#ibc.applications.fee.v1.QueryTimeoutFeeRequest) + - [QueryTimeoutFeeResponse](#ibc.applications.fee.v1.QueryTimeoutFeeResponse) - - [Query](#ibc.applications.middleware.fee.v1.Query) + - [Query](#ibc.applications.fee.v1.Query) -- [ibc/applications/middleware/fee/v1/tx.proto](#ibc/applications/middleware/fee/v1/tx.proto) - - [MsgEscrowPacketFee](#ibc.applications.middleware.fee.v1.MsgEscrowPacketFee) - - [MsgEscrowPacketFeeResponse](#ibc.applications.middleware.fee.v1.MsgEscrowPacketFeeResponse) - - [MsgRegisterCounterPartyAddressResponse](#ibc.applications.middleware.fee.v1.MsgRegisterCounterPartyAddressResponse) - - [MsgRegisterCounterpartyAddress](#ibc.applications.middleware.fee.v1.MsgRegisterCounterpartyAddress) +- [ibc/applications/fee/v1/tx.proto](#ibc/applications/fee/v1/tx.proto) + - [MsgEscrowPacketFee](#ibc.applications.fee.v1.MsgEscrowPacketFee) + - [MsgEscrowPacketFeeResponse](#ibc.applications.fee.v1.MsgEscrowPacketFeeResponse) + - [MsgRegisterCounterPartyAddressResponse](#ibc.applications.fee.v1.MsgRegisterCounterPartyAddressResponse) + - [MsgRegisterCounterpartyAddress](#ibc.applications.fee.v1.MsgRegisterCounterpartyAddress) - - [Msg](#ibc.applications.middleware.fee.v1.Msg) + - [Msg](#ibc.applications.fee.v1.Msg) - [ibc/applications/transfer/v1/transfer.proto](#ibc/applications/transfer/v1/transfer.proto) - [DenomTrace](#ibc.applications.transfer.v1.DenomTrace) @@ -609,14 +611,14 @@ CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - +

Top

-## ibc/applications/middleware/fee/v1/fee.proto +## ibc/applications/fee/v1/fee.proto - + ### Fee Fee interface @@ -633,7 +635,7 @@ https://github.com/cosmos/ibc/tree/master/spec/app/ics-029-fee-payment#fee-middl - + ### IdentifiedPacketFee Fee associated with a packet_id @@ -642,9 +644,9 @@ Fee associated with a packet_id | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `packet_id` | [ibc.core.channel.v1.PacketId](#ibc.core.channel.v1.PacketId) | | | -| `receive_fee` | [Fee](#ibc.applications.middleware.fee.v1.Fee) | | | -| `ack_fee` | [Fee](#ibc.applications.middleware.fee.v1.Fee) | | | -| `timeout_fee` | [Fee](#ibc.applications.middleware.fee.v1.Fee) | | | +| `receive_fee` | [Fee](#ibc.applications.fee.v1.Fee) | | | +| `ack_fee` | [Fee](#ibc.applications.fee.v1.Fee) | | | +| `timeout_fee` | [Fee](#ibc.applications.fee.v1.Fee) | | | | `relayers` | [string](#string) | repeated | | @@ -661,14 +663,14 @@ Fee associated with a packet_id - +

Top

-## ibc/applications/middleware/fee/v1/genesis.proto +## ibc/applications/fee/v1/genesis.proto - + ### GenesisState GenesisState defines the fee middleware genesis state @@ -676,7 +678,7 @@ GenesisState defines the fee middleware genesis state | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `packets_fees` | [IdentifiedPacketFee](#ibc.applications.middleware.fee.v1.IdentifiedPacketFee) | repeated | A mapping of packets -> escrowed fees | +| `packets_fees` | [IdentifiedPacketFee](#ibc.applications.fee.v1.IdentifiedPacketFee) | repeated | A mapping of packets -> escrowed fees | @@ -692,14 +694,14 @@ GenesisState defines the fee middleware genesis state - +

Top

-## ibc/applications/middleware/fee/v1/query.proto +## ibc/applications/fee/v1/query.proto - + ### QueryAckFeeRequest QueryAckFeeRequest is the request type for querying the acknowledgement fee @@ -716,7 +718,7 @@ QueryAckFeeRequest is the request type for querying the acknowledgement fee - + ### QueryAckFeeResponse QueryAckFeeResponse is the response type for the AckFee RPC @@ -724,14 +726,45 @@ QueryAckFeeResponse is the response type for the AckFee RPC | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `fee` | [Fee](#ibc.applications.middleware.fee.v1.Fee) | | | +| `fee` | [Fee](#ibc.applications.fee.v1.Fee) | | | - + + +### QueryIncentivizedPacketRequest +QueryIncentivizedPacketRequest is the request type for querying for all incentivized packets + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `packet_id` | [ibc.core.channel.v1.PacketId](#ibc.core.channel.v1.PacketId) | | PacketID | +| `query_height` | [uint64](#uint64) | | Height to query at | + + + + + + + + +### QueryIncentivizedPacketResponse +QueryTimeoutFeeResponse is the response type for the timeout RPC + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `incentivized_packet` | [IdentifiedPacketFee](#ibc.applications.fee.v1.IdentifiedPacketFee) | | Incentivized_packet | + + + + + + + ### QueryIncentivizedPacketsRequest QueryIncentivizedPacketRequest is the request type for querying for all incentivized packets @@ -740,13 +773,14 @@ QueryIncentivizedPacketRequest is the request type for querying for all incentiv | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | +| `query_height` | [uint64](#uint64) | | Height to query at | - + ### QueryIncentivizedPacketsResponse QueryTimeoutFeeResponse is the response type for the timeout RPC @@ -754,15 +788,14 @@ QueryTimeoutFeeResponse is the response type for the timeout RPC | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `incentivized_packets` | [IdentifiedPacketFee](#ibc.applications.middleware.fee.v1.IdentifiedPacketFee) | repeated | Map of all incentivized_packets | -| `query_height` | [uint64](#uint64) | | Height to query at | +| `incentivized_packets` | [IdentifiedPacketFee](#ibc.applications.fee.v1.IdentifiedPacketFee) | repeated | Map of all incentivized_packets | - + ### QueryReceiveFeeRequest QueryReceiveRequestFee is the request type for quering the receive fee @@ -779,7 +812,7 @@ QueryReceiveRequestFee is the request type for quering the receive fee - + ### QueryReceiveFeeResponse QueryReceiveFeeResponse is the response type for the ReceiveFee RPC @@ -787,14 +820,14 @@ QueryReceiveFeeResponse is the response type for the ReceiveFee RPC | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `fee` | [Fee](#ibc.applications.middleware.fee.v1.Fee) | | | +| `fee` | [Fee](#ibc.applications.fee.v1.Fee) | | | - + ### QueryTimeoutFeeRequest QueryTimeoutFeeRequest is the request type for querying the timeout fee @@ -811,7 +844,7 @@ QueryTimeoutFeeRequest is the request type for querying the timeout fee - + ### QueryTimeoutFeeResponse QueryTimeoutFeeResponse is the response type for the timeout RPC @@ -819,7 +852,7 @@ QueryTimeoutFeeResponse is the response type for the timeout RPC | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `fee` | [Fee](#ibc.applications.middleware.fee.v1.Fee) | | | +| `fee` | [Fee](#ibc.applications.fee.v1.Fee) | | | @@ -832,30 +865,31 @@ QueryTimeoutFeeResponse is the response type for the timeout RPC - + ### Query Query provides defines the gRPC querier service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `ReceiveFee` | [QueryReceiveFeeRequest](#ibc.applications.middleware.fee.v1.QueryReceiveFeeRequest) | [QueryReceiveFeeResponse](#ibc.applications.middleware.fee.v1.QueryReceiveFeeResponse) | Gets the fee expected for submitting ReceivePacket msg for the given packet | GET|/ibc/apps/middleware/fee/v1/receive_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}/relayer/{relayer_address}/height/{query_height}| -| `AckFee` | [QueryAckFeeRequest](#ibc.applications.middleware.fee.v1.QueryAckFeeRequest) | [QueryAckFeeResponse](#ibc.applications.middleware.fee.v1.QueryAckFeeResponse) | Gets the fee expected for submitting AcknowledgePacket msg for the given packet | GET|/ibc/apps/middleware/fee/v1/ack_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}/relayer/{relayer_address}/height/{query_height}| -| `TimeoutFee` | [QueryTimeoutFeeRequest](#ibc.applications.middleware.fee.v1.QueryTimeoutFeeRequest) | [QueryTimeoutFeeResponse](#ibc.applications.middleware.fee.v1.QueryTimeoutFeeResponse) | Gets the fee expected for submitting TimeoutPacket msg for the given packet | GET|/ibc/apps/middleware/fee/v1/timeout_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}/{relayer_address}/height/{query_height}| -| `IncentivizedPackets` | [QueryIncentivizedPacketsRequest](#ibc.applications.middleware.fee.v1.QueryIncentivizedPacketsRequest) | [QueryIncentivizedPacketsResponse](#ibc.applications.middleware.fee.v1.QueryIncentivizedPacketsResponse) | Gets all incentivized packets | GET|/ibc/apps/middleware/fee/v1/incentivized_packets| +| `ReceiveFee` | [QueryReceiveFeeRequest](#ibc.applications.fee.v1.QueryReceiveFeeRequest) | [QueryReceiveFeeResponse](#ibc.applications.fee.v1.QueryReceiveFeeResponse) | Gets the fee expected for submitting ReceivePacket msg for the given packet | GET|/ibc/apps/fee/v1/receive_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}/relayer/{relayer_address}/height/{query_height}| +| `AckFee` | [QueryAckFeeRequest](#ibc.applications.fee.v1.QueryAckFeeRequest) | [QueryAckFeeResponse](#ibc.applications.fee.v1.QueryAckFeeResponse) | Gets the fee expected for submitting AcknowledgePacket msg for the given packet | GET|/ibc/apps/fee/v1/ack_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}/relayer/{relayer_address}/height/{query_height}| +| `TimeoutFee` | [QueryTimeoutFeeRequest](#ibc.applications.fee.v1.QueryTimeoutFeeRequest) | [QueryTimeoutFeeResponse](#ibc.applications.fee.v1.QueryTimeoutFeeResponse) | Gets the fee expected for submitting TimeoutPacket msg for the given packet | GET|/ibc/apps/fee/v1/timeout_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}/{relayer_address}/height/{query_height}| +| `IncentivizedPackets` | [QueryIncentivizedPacketsRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketsRequest) | [QueryIncentivizedPacketsResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketsResponse) | Gets all incentivized packets | GET|/ibc/apps/fee/v1/incentivized_packets| +| `IncentivizedPacket` | [QueryIncentivizedPacketRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketRequest) | [QueryIncentivizedPacketResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketResponse) | Gets all incentivized packets | GET|/ibc/apps/fee/v1/incentivized_packet| - +

Top

-## ibc/applications/middleware/fee/v1/tx.proto +## ibc/applications/fee/v1/tx.proto - + ### MsgEscrowPacketFee MsgEscrowPacketFee defines the request type EscrowPacketFee RPC @@ -864,9 +898,9 @@ MsgEscrowPacketFee defines the request type EscrowPacketFee RPC | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `packet_id` | [ibc.core.channel.v1.PacketId](#ibc.core.channel.v1.PacketId) | | | -| `receive_fee` | [Fee](#ibc.applications.middleware.fee.v1.Fee) | | | -| `ack_fee` | [Fee](#ibc.applications.middleware.fee.v1.Fee) | | | -| `timeout_fee` | [Fee](#ibc.applications.middleware.fee.v1.Fee) | | | +| `receive_fee` | [Fee](#ibc.applications.fee.v1.Fee) | | | +| `ack_fee` | [Fee](#ibc.applications.fee.v1.Fee) | | | +| `timeout_fee` | [Fee](#ibc.applications.fee.v1.Fee) | | | | `relayers` | [string](#string) | repeated | | @@ -874,7 +908,7 @@ MsgEscrowPacketFee defines the request type EscrowPacketFee RPC - + ### MsgEscrowPacketFeeResponse MsgEscrowPacketFeeResponse defines the response type for Msg/EscrowPacketFee @@ -884,7 +918,7 @@ MsgEscrowPacketFeeResponse defines the response type for Msg/EscrowPacketFee - + ### MsgRegisterCounterPartyAddressResponse MsgRegisterCounterPartyAddressResponse defines the Msg/RegisterCounteryPartyAddress response type @@ -894,7 +928,7 @@ MsgRegisterCounterPartyAddressResponse defines the Msg/RegisterCounteryPartyAddr - + ### MsgRegisterCounterpartyAddress MsgRegisterCounterpartyAddress is the request type for registering the counter party address @@ -916,15 +950,15 @@ MsgRegisterCounterpartyAddress is the request type for registering the counter p - + ### Msg Msg defines the ibc/fee Msg service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `RegisterCounterPartyAddress` | [MsgRegisterCounterpartyAddress](#ibc.applications.middleware.fee.v1.MsgRegisterCounterpartyAddress) | [MsgRegisterCounterPartyAddressResponse](#ibc.applications.middleware.fee.v1.MsgRegisterCounterPartyAddressResponse) | RegisterCounterpartyAddress defines a rpc handler method for MsgRegisterCounterpartyAddress RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their counterparty address before relaying This ensures they will be properly compensated for forward relaying since destination chain must send back relayer's source address (counterparty address) in acknowledgement This function may be called more than once by a relayer, in which case, latest counterparty address is always used. | | -| `EscrowPacketFee` | [MsgEscrowPacketFee](#ibc.applications.middleware.fee.v1.MsgEscrowPacketFee) | [MsgEscrowPacketFeeResponse](#ibc.applications.middleware.fee.v1.MsgEscrowPacketFeeResponse) | EscrowPacketFee defines a rpc handler method for MsgEscrowPacketFee EscrowPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to incentivize the relaying of the given packet. | | +| `RegisterCounterPartyAddress` | [MsgRegisterCounterpartyAddress](#ibc.applications.fee.v1.MsgRegisterCounterpartyAddress) | [MsgRegisterCounterPartyAddressResponse](#ibc.applications.fee.v1.MsgRegisterCounterPartyAddressResponse) | RegisterCounterpartyAddress defines a rpc handler method for MsgRegisterCounterpartyAddress RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their counterparty address before relaying This ensures they will be properly compensated for forward relaying since destination chain must send back relayer's source address (counterparty address) in acknowledgement This function may be called more than once by a relayer, in which case, latest counterparty address is always used. | | +| `EscrowPacketFee` | [MsgEscrowPacketFee](#ibc.applications.fee.v1.MsgEscrowPacketFee) | [MsgEscrowPacketFeeResponse](#ibc.applications.fee.v1.MsgEscrowPacketFeeResponse) | EscrowPacketFee defines a rpc handler method for MsgEscrowPacketFee EscrowPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to incentivize the relaying of the given packet. | | diff --git a/modules/apps/29-fee/types/fee.pb.go b/modules/apps/29-fee/types/fee.pb.go index 437ad490373..d6597e1c0f8 100644 --- a/modules/apps/29-fee/types/fee.pb.go +++ b/modules/apps/29-fee/types/fee.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/applications/middleware/fee/v1/fee.proto +// source: ibc/applications/fee/v1/fee.proto package types @@ -37,7 +37,7 @@ func (m *Fee) Reset() { *m = Fee{} } func (m *Fee) String() string { return proto.CompactTextString(m) } func (*Fee) ProtoMessage() {} func (*Fee) Descriptor() ([]byte, []int) { - return fileDescriptor_9a4c0273395d2c1a, []int{0} + return fileDescriptor_cb3319f1af2a53e5, []int{0} } func (m *Fee) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -86,7 +86,7 @@ func (m *IdentifiedPacketFee) Reset() { *m = IdentifiedPacketFee{} } func (m *IdentifiedPacketFee) String() string { return proto.CompactTextString(m) } func (*IdentifiedPacketFee) ProtoMessage() {} func (*IdentifiedPacketFee) Descriptor() ([]byte, []int) { - return fileDescriptor_9a4c0273395d2c1a, []int{1} + return fileDescriptor_cb3319f1af2a53e5, []int{1} } func (m *IdentifiedPacketFee) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -151,45 +151,42 @@ func (m *IdentifiedPacketFee) GetRelayers() []string { } func init() { - proto.RegisterType((*Fee)(nil), "ibc.applications.middleware.fee.v1.Fee") - proto.RegisterType((*IdentifiedPacketFee)(nil), "ibc.applications.middleware.fee.v1.IdentifiedPacketFee") + proto.RegisterType((*Fee)(nil), "ibc.applications.fee.v1.Fee") + proto.RegisterType((*IdentifiedPacketFee)(nil), "ibc.applications.fee.v1.IdentifiedPacketFee") } -func init() { - proto.RegisterFile("ibc/applications/middleware/fee/v1/fee.proto", fileDescriptor_9a4c0273395d2c1a) -} +func init() { proto.RegisterFile("ibc/applications/fee/v1/fee.proto", fileDescriptor_cb3319f1af2a53e5) } -var fileDescriptor_9a4c0273395d2c1a = []byte{ - // 456 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x41, 0x8e, 0xd3, 0x30, - 0x14, 0x86, 0x1b, 0x02, 0x65, 0xc6, 0x95, 0x10, 0x0a, 0x23, 0x54, 0x2a, 0x91, 0x14, 0x6f, 0xe8, - 0x82, 0xda, 0xb4, 0xac, 0x60, 0x59, 0xa4, 0x91, 0x46, 0x62, 0x31, 0x8a, 0x58, 0xb1, 0x99, 0x71, - 0xec, 0xd7, 0x8e, 0x69, 0x12, 0x47, 0xb1, 0x5b, 0xd4, 0x5b, 0x70, 0x01, 0x2e, 0xc0, 0x49, 0x66, - 0x39, 0x4b, 0x56, 0x01, 0xb5, 0x37, 0xe8, 0x09, 0x90, 0x1d, 0x33, 0x54, 0x62, 0x81, 0x60, 0xe5, - 0xf7, 0x92, 0xf7, 0x7f, 0xff, 0x2f, 0xfb, 0xa1, 0x17, 0x32, 0xe3, 0x94, 0x55, 0x55, 0x2e, 0x39, - 0x33, 0x52, 0x95, 0x9a, 0x16, 0x52, 0x88, 0x1c, 0x3e, 0xb1, 0x1a, 0xe8, 0x1c, 0x80, 0xae, 0x27, - 0xf6, 0x20, 0x55, 0xad, 0x8c, 0x8a, 0xb0, 0xcc, 0x38, 0x39, 0x9c, 0x26, 0xbf, 0xa7, 0x89, 0x1d, - 0x5b, 0x4f, 0x06, 0x31, 0x57, 0xba, 0x50, 0x9a, 0x66, 0x4c, 0x5b, 0x75, 0x06, 0x86, 0x4d, 0x28, - 0x57, 0xb2, 0x6c, 0x19, 0x83, 0x93, 0x85, 0x5a, 0x28, 0x57, 0x52, 0x5b, 0xf9, 0xaf, 0xcf, 0x6c, - 0x0e, 0xae, 0x6a, 0xa0, 0xfc, 0x8a, 0x95, 0x25, 0xe4, 0xd6, 0xd8, 0x97, 0xed, 0x08, 0xfe, 0x88, - 0xc2, 0x53, 0x80, 0x88, 0xa3, 0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xdd, 0xff, 0xce, 0x7d, 0x40, - 0xc1, 0x29, 0xf2, 0x9d, 0x75, 0x18, 0xa0, 0xa3, 0x1a, 0x72, 0xb6, 0x81, 0x5a, 0xf7, 0xef, 0x0d, - 0xc3, 0xd1, 0x71, 0x7a, 0xdb, 0xcf, 0xde, 0x5d, 0x6f, 0xe3, 0xe0, 0x66, 0x1b, 0x07, 0x3f, 0xb6, - 0x71, 0xf0, 0x79, 0x17, 0x77, 0x6e, 0x76, 0x71, 0xe7, 0xdb, 0x2e, 0xee, 0x7c, 0x98, 0xfe, 0xf9, - 0xd6, 0x32, 0xe3, 0xe3, 0x85, 0xa2, 0x85, 0x12, 0xab, 0x1c, 0xb4, 0xdd, 0x76, 0x4d, 0xa7, 0xaf, - 0xc7, 0x76, 0xbb, 0xdd, 0xdb, 0x67, 0x5d, 0xb7, 0x60, 0xaf, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, - 0x0c, 0xf6, 0x8d, 0xd8, 0x0d, 0x03, 0x00, 0x00, +var fileDescriptor_cb3319f1af2a53e5 = []byte{ + // 443 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x3f, 0x8f, 0xd3, 0x30, + 0x18, 0xc6, 0x9b, 0x2b, 0x94, 0x3b, 0x57, 0x42, 0x28, 0x9c, 0xa0, 0x54, 0x90, 0x94, 0x4c, 0x5d, + 0x6a, 0xd3, 0x32, 0xc1, 0x18, 0xa4, 0x93, 0x2a, 0x31, 0x9c, 0x22, 0xdd, 0xc2, 0x72, 0x72, 0x9c, + 0xb7, 0x39, 0x93, 0x3f, 0x8e, 0x62, 0x27, 0x52, 0xbf, 0x05, 0x9f, 0x83, 0x4f, 0x72, 0xe3, 0x8d, + 0x4c, 0x01, 0xb5, 0xdf, 0xa0, 0x33, 0x03, 0xb2, 0x63, 0x4e, 0x95, 0x10, 0x12, 0x4c, 0x7e, 0x5f, + 0xdb, 0xcf, 0xef, 0x79, 0x64, 0xbf, 0xe8, 0x35, 0x8f, 0x19, 0xa1, 0x55, 0x95, 0x73, 0x46, 0x15, + 0x17, 0xa5, 0x24, 0x1b, 0x00, 0xd2, 0x2e, 0xf5, 0x82, 0xab, 0x5a, 0x28, 0xe1, 0x3e, 0xe7, 0x31, + 0xc3, 0xc7, 0x57, 0xb0, 0x3e, 0x6b, 0x97, 0x53, 0x8f, 0x09, 0x59, 0x08, 0x49, 0x62, 0x2a, 0xb5, + 0x24, 0x06, 0x45, 0x97, 0x84, 0x09, 0x5e, 0xf6, 0xc2, 0xe9, 0x79, 0x2a, 0x52, 0x61, 0x4a, 0xa2, + 0x2b, 0xbb, 0x6b, 0x1c, 0x99, 0xa8, 0x81, 0xb0, 0x1b, 0x5a, 0x96, 0x90, 0x6b, 0x37, 0x5b, 0xf6, + 0x57, 0x82, 0xcf, 0x68, 0x78, 0x01, 0xe0, 0x32, 0x34, 0xa2, 0x85, 0x68, 0x4a, 0x35, 0x71, 0x66, + 0xc3, 0xf9, 0x78, 0xf5, 0x02, 0xf7, 0x86, 0x58, 0x1b, 0x62, 0x6b, 0x88, 0x3f, 0x08, 0x5e, 0x86, + 0x6f, 0x6e, 0x3b, 0x7f, 0xf0, 0xf5, 0xbb, 0x3f, 0x4f, 0xb9, 0xba, 0x69, 0x62, 0xcc, 0x44, 0x41, + 0x6c, 0xba, 0x7e, 0x59, 0xc8, 0x24, 0x23, 0x6a, 0x5b, 0x81, 0x34, 0x02, 0x19, 0x59, 0x74, 0xf0, + 0xf3, 0x04, 0x3d, 0x5d, 0x27, 0x50, 0x2a, 0xbe, 0xe1, 0x90, 0x5c, 0x52, 0x96, 0x81, 0xd2, 0xe6, + 0x97, 0xe8, 0xac, 0x32, 0xcd, 0x35, 0x4f, 0x26, 0xce, 0xcc, 0x99, 0x8f, 0x57, 0xaf, 0xb0, 0x7e, + 0x09, 0x1d, 0x1d, 0xff, 0xce, 0xdb, 0x2e, 0x71, 0x2f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byte, err error) { diff --git a/modules/apps/29-fee/types/genesis.pb.go b/modules/apps/29-fee/types/genesis.pb.go index 1b4dca09ab5..e108131adfc 100644 --- a/modules/apps/29-fee/types/genesis.pb.go +++ b/modules/apps/29-fee/types/genesis.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/applications/middleware/fee/v1/genesis.proto +// source: ibc/applications/fee/v1/genesis.proto package types @@ -33,7 +33,7 @@ func (m *GenesisState) Reset() { *m = GenesisState{} } func (m *GenesisState) String() string { return proto.CompactTextString(m) } func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_6a4f6c8d78b5dfbf, []int{0} + return fileDescriptor_7191992e856dff95, []int{0} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -70,33 +70,32 @@ func (m *GenesisState) GetPacketsFees() []*IdentifiedPacketFee { } func init() { - proto.RegisterType((*GenesisState)(nil), "ibc.applications.middleware.fee.v1.GenesisState") + proto.RegisterType((*GenesisState)(nil), "ibc.applications.fee.v1.GenesisState") } func init() { - proto.RegisterFile("ibc/applications/middleware/fee/v1/genesis.proto", fileDescriptor_6a4f6c8d78b5dfbf) + proto.RegisterFile("ibc/applications/fee/v1/genesis.proto", fileDescriptor_7191992e856dff95) } -var fileDescriptor_6a4f6c8d78b5dfbf = []byte{ - // 273 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x8f, 0x31, 0x4b, 0xc3, 0x40, - 0x18, 0x86, 0x13, 0x04, 0x87, 0xb4, 0x53, 0x15, 0x94, 0x0e, 0xa7, 0x64, 0x72, 0xb0, 0x77, 0x36, - 0x0e, 0xa2, 0x63, 0x87, 0x8a, 0xe0, 0x20, 0xba, 0xb9, 0xc8, 0xe5, 0xf2, 0x26, 0x1e, 0x26, 0xf9, - 0x42, 0xbf, 0x6b, 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x94, 0x21, 0x2e, 0x88, 0x95, 0x8d, 0xcd, 0x28, 0x23, 0x55, - 0x50, 0x32, 0xcf, 0xc1, 0xad, 0x2a, 0xab, 0xe8, 0x7c, 0xd4, 0xaa, 0xb9, 0x65, 0x05, 0x8e, 0xb7, - 0x3b, 0xb5, 0xd3, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa8, 0x8f, 0xe8, 0x3b, 0x76, 0x01, 0x00, - 0x00, +var fileDescriptor_7191992e856dff95 = []byte{ + // 260 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x8f, 0xb1, 0x4a, 0xc3, 0x50, + 0x14, 0x86, 0x13, 0x04, 0x87, 0xb4, 0x53, 0x15, 0x2a, 0x1d, 0xae, 0x1a, 0x10, 0x1c, 0xec, 0xbd, + 0x34, 0x4e, 0x3a, 0x76, 0xa8, 0x08, 0x0e, 0xa2, 0x9b, 0x8b, 0xe4, 0xde, 0x9c, 0xdc, 0x1e, 0x4c, + 0x72, 0x2e, 0x9e, 0xdb, 0x62, 0xdf, 0xc2, 0xc7, 0x72, 0xec, 0xe8, 0x24, 0x92, 0xbc, 0x81, 0x4f, + 0x20, 0x49, 0x3b, 0x74, 0xe9, 0x76, 0x0e, 0x7c, 0xff, 0xff, 0xf3, 0x45, 0x17, 0xa8, 0x8d, 0x4a, + 0x9d, 0x2b, 0xd0, 0xa4, 0x1e, 0xa9, 0x62, 0x95, 0x03, 0xa8, 0xe5, 0x44, 0x59, 0xa8, 0x80, 0x91, + 0xa5, 0x7b, 0x27, 0x4f, 0x83, 0x21, 0x6a, 0x23, 0x77, 0x31, 0x99, 0x03, 0xc8, 0xe5, 0x64, 0x74, + 0x6c, 0xc9, 0x52, 0xc7, 0xa8, 0xf6, 0xda, 0xe0, 0xa3, 0xf3, 0x7d, 0xad, 0x6d, 0xaa, 0x43, 0xe2, + 0x8f, 0xa8, 0x7f, 0xb7, 0x99, 0x78, 0xf6, 0xa9, 0x87, 0xc1, 0x3c, 0xea, 0xbb, 0xd4, 0xbc, 0x81, + 0xe7, 0xd7, 0x1c, 0x80, 0x4f, 0xc2, 0xb3, 0x83, 0xcb, 0x5e, 0x72, 0x25, 0xf7, 0x0c, 0xcb, 0xfb, + 0x0c, 0x2a, 0x8f, 0x39, 0x42, 0xf6, 0xd8, 0xc5, 0x66, 0x00, 0xd3, 0xe1, 0xdf, 0xcf, 0xe9, 0xd1, + 0x2a, 0x2d, 0x8b, 0xdb, 0x78, 0xb7, 0x2b, 0x7e, 0xea, 0x6d, 0xdf, 0x19, 0x00, 0x4f, 0x1f, 0xbe, + 0x6a, 0x11, 0xae, 0x6b, 0x11, 0xfe, 0xd6, 0x22, 0xfc, 0x6c, 0x44, 0xb0, 0x6e, 0x44, 0xf0, 0xdd, + 0x88, 0xe0, 0x25, 0xb1, 0xe8, 0xe7, 0x0b, 0x2d, 0x0d, 0x95, 0xca, 0x10, 0x97, 0xc4, 0x0a, 0xb5, + 0x19, 0x5b, 0x52, 0x25, 0x65, 0x8b, 0x02, 0xb8, 0x75, 0x62, 0x95, 0xdc, 0x8c, 0x5b, 0x1d, 0xbf, + 0x72, 0xc0, 0xfa, 0xb0, 0xd3, 0xb9, 0xfe, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x42, 0xac, 0xef, 0xaa, + 0x49, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/modules/apps/29-fee/types/query.pb.go b/modules/apps/29-fee/types/query.pb.go index a605548e010..b296b0a8ace 100644 --- a/modules/apps/29-fee/types/query.pb.go +++ b/modules/apps/29-fee/types/query.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/applications/middleware/fee/v1/query.proto +// source: ibc/applications/fee/v1/query.proto package types @@ -45,7 +45,7 @@ func (m *QueryReceiveFeeRequest) Reset() { *m = QueryReceiveFeeRequest{} func (m *QueryReceiveFeeRequest) String() string { return proto.CompactTextString(m) } func (*QueryReceiveFeeRequest) ProtoMessage() {} func (*QueryReceiveFeeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9cafe0e1bd8b928c, []int{0} + return fileDescriptor_0638a8a78ca2503c, []int{0} } func (m *QueryReceiveFeeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -104,7 +104,7 @@ func (m *QueryReceiveFeeResponse) Reset() { *m = QueryReceiveFeeResponse func (m *QueryReceiveFeeResponse) String() string { return proto.CompactTextString(m) } func (*QueryReceiveFeeResponse) ProtoMessage() {} func (*QueryReceiveFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9cafe0e1bd8b928c, []int{1} + return fileDescriptor_0638a8a78ca2503c, []int{1} } func (m *QueryReceiveFeeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -154,7 +154,7 @@ func (m *QueryAckFeeRequest) Reset() { *m = QueryAckFeeRequest{} } func (m *QueryAckFeeRequest) String() string { return proto.CompactTextString(m) } func (*QueryAckFeeRequest) ProtoMessage() {} func (*QueryAckFeeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9cafe0e1bd8b928c, []int{2} + return fileDescriptor_0638a8a78ca2503c, []int{2} } func (m *QueryAckFeeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -213,7 +213,7 @@ func (m *QueryAckFeeResponse) Reset() { *m = QueryAckFeeResponse{} } func (m *QueryAckFeeResponse) String() string { return proto.CompactTextString(m) } func (*QueryAckFeeResponse) ProtoMessage() {} func (*QueryAckFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9cafe0e1bd8b928c, []int{3} + return fileDescriptor_0638a8a78ca2503c, []int{3} } func (m *QueryAckFeeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -263,7 +263,7 @@ func (m *QueryTimeoutFeeRequest) Reset() { *m = QueryTimeoutFeeRequest{} func (m *QueryTimeoutFeeRequest) String() string { return proto.CompactTextString(m) } func (*QueryTimeoutFeeRequest) ProtoMessage() {} func (*QueryTimeoutFeeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9cafe0e1bd8b928c, []int{4} + return fileDescriptor_0638a8a78ca2503c, []int{4} } func (m *QueryTimeoutFeeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -322,7 +322,7 @@ func (m *QueryTimeoutFeeResponse) Reset() { *m = QueryTimeoutFeeResponse func (m *QueryTimeoutFeeResponse) String() string { return proto.CompactTextString(m) } func (*QueryTimeoutFeeResponse) ProtoMessage() {} func (*QueryTimeoutFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9cafe0e1bd8b928c, []int{5} + return fileDescriptor_0638a8a78ca2503c, []int{5} } func (m *QueryTimeoutFeeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -362,13 +362,15 @@ func (m *QueryTimeoutFeeResponse) GetFee() *Fee { type QueryIncentivizedPacketsRequest struct { // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` + // Height to query at + QueryHeight uint64 `protobuf:"varint,2,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty" yaml:"query_height"` } func (m *QueryIncentivizedPacketsRequest) Reset() { *m = QueryIncentivizedPacketsRequest{} } func (m *QueryIncentivizedPacketsRequest) String() string { return proto.CompactTextString(m) } func (*QueryIncentivizedPacketsRequest) ProtoMessage() {} func (*QueryIncentivizedPacketsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9cafe0e1bd8b928c, []int{6} + return fileDescriptor_0638a8a78ca2503c, []int{6} } func (m *QueryIncentivizedPacketsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -404,19 +406,24 @@ func (m *QueryIncentivizedPacketsRequest) GetPagination() *query.PageRequest { return nil } +func (m *QueryIncentivizedPacketsRequest) GetQueryHeight() uint64 { + if m != nil { + return m.QueryHeight + } + return 0 +} + // QueryTimeoutFeeResponse is the response type for the timeout RPC type QueryIncentivizedPacketsResponse struct { // Map of all incentivized_packets IncentivizedPackets []*IdentifiedPacketFee `protobuf:"bytes,1,rep,name=incentivized_packets,json=incentivizedPackets,proto3" json:"incentivized_packets,omitempty" yaml:"incentivized_packets"` - // Height to query at - QueryHeight uint64 `protobuf:"varint,2,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty" yaml:"query_height"` } func (m *QueryIncentivizedPacketsResponse) Reset() { *m = QueryIncentivizedPacketsResponse{} } func (m *QueryIncentivizedPacketsResponse) String() string { return proto.CompactTextString(m) } func (*QueryIncentivizedPacketsResponse) ProtoMessage() {} func (*QueryIncentivizedPacketsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9cafe0e1bd8b928c, []int{7} + return fileDescriptor_0638a8a78ca2503c, []int{7} } func (m *QueryIncentivizedPacketsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -452,80 +459,180 @@ func (m *QueryIncentivizedPacketsResponse) GetIncentivizedPackets() []*Identifie return nil } -func (m *QueryIncentivizedPacketsResponse) GetQueryHeight() uint64 { +// QueryIncentivizedPacketRequest is the request type for querying for all incentivized packets +type QueryIncentivizedPacketRequest struct { + // PacketID + PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"packet_id"` + // Height to query at + QueryHeight uint64 `protobuf:"varint,2,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty" yaml:"query_height"` +} + +func (m *QueryIncentivizedPacketRequest) Reset() { *m = QueryIncentivizedPacketRequest{} } +func (m *QueryIncentivizedPacketRequest) String() string { return proto.CompactTextString(m) } +func (*QueryIncentivizedPacketRequest) ProtoMessage() {} +func (*QueryIncentivizedPacketRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0638a8a78ca2503c, []int{8} +} +func (m *QueryIncentivizedPacketRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryIncentivizedPacketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryIncentivizedPacketRequest.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 *QueryIncentivizedPacketRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryIncentivizedPacketRequest.Merge(m, src) +} +func (m *QueryIncentivizedPacketRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryIncentivizedPacketRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryIncentivizedPacketRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryIncentivizedPacketRequest proto.InternalMessageInfo + +func (m *QueryIncentivizedPacketRequest) GetPacketId() *types.PacketId { + if m != nil { + return m.PacketId + } + return nil +} + +func (m *QueryIncentivizedPacketRequest) GetQueryHeight() uint64 { if m != nil { return m.QueryHeight } return 0 } +// QueryTimeoutFeeResponse is the response type for the timeout RPC +type QueryIncentivizedPacketResponse struct { + // Incentivized_packet + IncentivizedPacket *IdentifiedPacketFee `protobuf:"bytes,1,opt,name=incentivized_packet,json=incentivizedPacket,proto3" json:"incentivized_packet,omitempty" yaml:"incentivized_packet"` +} + +func (m *QueryIncentivizedPacketResponse) Reset() { *m = QueryIncentivizedPacketResponse{} } +func (m *QueryIncentivizedPacketResponse) String() string { return proto.CompactTextString(m) } +func (*QueryIncentivizedPacketResponse) ProtoMessage() {} +func (*QueryIncentivizedPacketResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0638a8a78ca2503c, []int{9} +} +func (m *QueryIncentivizedPacketResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryIncentivizedPacketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryIncentivizedPacketResponse.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 *QueryIncentivizedPacketResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryIncentivizedPacketResponse.Merge(m, src) +} +func (m *QueryIncentivizedPacketResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryIncentivizedPacketResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryIncentivizedPacketResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryIncentivizedPacketResponse proto.InternalMessageInfo + +func (m *QueryIncentivizedPacketResponse) GetIncentivizedPacket() *IdentifiedPacketFee { + if m != nil { + return m.IncentivizedPacket + } + return nil +} + func init() { - proto.RegisterType((*QueryReceiveFeeRequest)(nil), "ibc.applications.middleware.fee.v1.QueryReceiveFeeRequest") - proto.RegisterType((*QueryReceiveFeeResponse)(nil), "ibc.applications.middleware.fee.v1.QueryReceiveFeeResponse") - proto.RegisterType((*QueryAckFeeRequest)(nil), "ibc.applications.middleware.fee.v1.QueryAckFeeRequest") - proto.RegisterType((*QueryAckFeeResponse)(nil), "ibc.applications.middleware.fee.v1.QueryAckFeeResponse") - proto.RegisterType((*QueryTimeoutFeeRequest)(nil), "ibc.applications.middleware.fee.v1.QueryTimeoutFeeRequest") - proto.RegisterType((*QueryTimeoutFeeResponse)(nil), "ibc.applications.middleware.fee.v1.QueryTimeoutFeeResponse") - proto.RegisterType((*QueryIncentivizedPacketsRequest)(nil), "ibc.applications.middleware.fee.v1.QueryIncentivizedPacketsRequest") - proto.RegisterType((*QueryIncentivizedPacketsResponse)(nil), "ibc.applications.middleware.fee.v1.QueryIncentivizedPacketsResponse") + proto.RegisterType((*QueryReceiveFeeRequest)(nil), "ibc.applications.fee.v1.QueryReceiveFeeRequest") + proto.RegisterType((*QueryReceiveFeeResponse)(nil), "ibc.applications.fee.v1.QueryReceiveFeeResponse") + proto.RegisterType((*QueryAckFeeRequest)(nil), "ibc.applications.fee.v1.QueryAckFeeRequest") + proto.RegisterType((*QueryAckFeeResponse)(nil), "ibc.applications.fee.v1.QueryAckFeeResponse") + proto.RegisterType((*QueryTimeoutFeeRequest)(nil), "ibc.applications.fee.v1.QueryTimeoutFeeRequest") + proto.RegisterType((*QueryTimeoutFeeResponse)(nil), "ibc.applications.fee.v1.QueryTimeoutFeeResponse") + proto.RegisterType((*QueryIncentivizedPacketsRequest)(nil), "ibc.applications.fee.v1.QueryIncentivizedPacketsRequest") + proto.RegisterType((*QueryIncentivizedPacketsResponse)(nil), "ibc.applications.fee.v1.QueryIncentivizedPacketsResponse") + proto.RegisterType((*QueryIncentivizedPacketRequest)(nil), "ibc.applications.fee.v1.QueryIncentivizedPacketRequest") + proto.RegisterType((*QueryIncentivizedPacketResponse)(nil), "ibc.applications.fee.v1.QueryIncentivizedPacketResponse") } func init() { - proto.RegisterFile("ibc/applications/middleware/fee/v1/query.proto", fileDescriptor_9cafe0e1bd8b928c) -} - -var fileDescriptor_9cafe0e1bd8b928c = []byte{ - // 796 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x96, 0xcf, 0x6b, 0x13, 0x4d, - 0x18, 0xc7, 0x3b, 0xe9, 0xfb, 0x96, 0xb7, 0xd3, 0x97, 0xf7, 0x7d, 0xd9, 0x94, 0x36, 0xe4, 0xd5, - 0x24, 0xee, 0x41, 0x83, 0xd8, 0x19, 0x13, 0xc1, 0xda, 0x7a, 0x6a, 0x2a, 0xc5, 0x82, 0x87, 0x18, - 0x7a, 0xf2, 0x12, 0x36, 0xbb, 0x4f, 0x36, 0x43, 0x93, 0x9d, 0xed, 0xee, 0x26, 0x12, 0x4b, 0x2e, - 0x5e, 0xbd, 0x88, 0xfe, 0x0d, 0x82, 0x82, 0x52, 0xc1, 0x43, 0x8f, 0x5e, 0x3d, 0x16, 0xbc, 0x88, - 0x87, 0x20, 0xad, 0xe0, 0x41, 0x4f, 0xf9, 0x0b, 0x64, 0x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x1d, 0x27, - 0xa9, 0xbd, 0x12, 0xd4, 0x9e, 0x23, 0xe5, 0xd9, 0x89, 0xd4, 0x34, 0x7d, 0xf3, 0x27, 0x22, 0xb6, - 0x1b, 0xc1, 0xb8, 0xaf, 0x14, 0x63, 0x9c, 0xb9, 0x01, 0x2d, 0x1d, 0xe3, 0xcc, 0x0d, 0x4a, 0x93, - 0xba, 0x23, 0xe8, 0x3d, 0x45, 0xca, 0x93, 0x13, 0xe9, 0x79, 0x22, 0xf4, 0x07, 0x12, 0x1c, 0x95, - 0xdc, 0x7b, 0x84, 0xa3, 0x43, 0x14, 0x4a, 0x59, 0x1d, 0x19, 0xc3, 0xf1, 0x5a, 0x1a, 0xbf, 0x71, - 0xba, 0x24, 0x12, 0xea, 0xb5, 0x80, 0x69, 0x56, 0xb9, 0x7c, 0x12, 0xd1, 0x61, 0x32, 0x97, 0xbb, - 0xf5, 0x66, 0x3f, 0x81, 0xf6, 0xf6, 0x13, 0xe8, 0xc3, 0x7e, 0x02, 0x3d, 0x3c, 0x48, 0x4c, 0xec, - 0x1d, 0x24, 0x26, 0xde, 0x1d, 0x24, 0x26, 0xee, 0x64, 0x4d, 0xe6, 0x55, 0xea, 0x25, 0xa2, 0xf3, - 0x1a, 0x95, 0xff, 0x80, 0xac, 0xa4, 0x2f, 0x98, 0x9c, 0xd6, 0xb8, 0x51, 0xaf, 0x82, 0x2b, 0xea, - 0x64, 0x97, 0x16, 0xfc, 0xfc, 0x5e, 0xd3, 0x06, 0xb7, 0x34, 0x15, 0xfc, 0x07, 0x5e, 0xf9, 0x1a, - 0x00, 0x00, 0xff, 0xff, 0x39, 0x46, 0x37, 0xbe, 0x3a, 0x0b, 0x00, 0x00, + proto.RegisterFile("ibc/applications/fee/v1/query.proto", fileDescriptor_0638a8a78ca2503c) +} + +var fileDescriptor_0638a8a78ca2503c = []byte{ + // 850 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0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0x4a, 0x5e, 0x49, 0x01, 0x9b, 0xd7, 0x7a, 0xc9, 0x4f, 0x08, 0x93, 0x74, 0x38, + 0xf2, 0xd6, 0xb2, 0x02, 0xa6, 0xca, 0x1f, 0x2c, 0xef, 0xa8, 0x84, 0x6f, 0xc5, 0xc2, 0xef, 0x93, + 0x97, 0x17, 0x11, 0x5e, 0x7f, 0xef, 0xd7, 0x53, 0x0d, 0x9d, 0x9c, 0x6a, 0xe8, 0x8f, 0x53, 0x0d, + 0x7d, 0x76, 0xa6, 0xad, 0x9c, 0x9c, 0x69, 0x2b, 0xbf, 0x9f, 0x69, 0x2b, 0x1f, 0xd6, 0x1c, 0x1e, + 0x76, 0xfa, 0x2d, 0x6a, 0x89, 0x1e, 0x53, 0x1f, 0xd8, 0xbc, 0x65, 0x6d, 0x3b, 0x82, 0xf5, 0x84, + 0xdd, 0xef, 0x42, 0x20, 0x63, 0xd7, 0x1e, 0x6e, 0x47, 0xe1, 0xc3, 0xa1, 0x07, 0x41, 0xeb, 0x4e, + 0xfc, 0x91, 0xfd, 0xe6, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6d, 0x89, 0x8a, 0x4a, 0x76, 0x0c, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -548,6 +655,8 @@ type QueryClient interface { TimeoutFee(ctx context.Context, in *QueryTimeoutFeeRequest, opts ...grpc.CallOption) (*QueryTimeoutFeeResponse, error) // Gets all incentivized packets IncentivizedPackets(ctx context.Context, in *QueryIncentivizedPacketsRequest, opts ...grpc.CallOption) (*QueryIncentivizedPacketsResponse, error) + // Gets all incentivized packets + IncentivizedPacket(ctx context.Context, in *QueryIncentivizedPacketRequest, opts ...grpc.CallOption) (*QueryIncentivizedPacketResponse, error) } type queryClient struct { @@ -560,7 +669,7 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { func (c *queryClient) ReceiveFee(ctx context.Context, in *QueryReceiveFeeRequest, opts ...grpc.CallOption) (*QueryReceiveFeeResponse, error) { out := new(QueryReceiveFeeResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Query/ReceiveFee", in, out, opts...) + err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Query/ReceiveFee", in, out, opts...) if err != nil { return nil, err } @@ -569,7 +678,7 @@ func (c *queryClient) ReceiveFee(ctx context.Context, in *QueryReceiveFeeRequest func (c *queryClient) AckFee(ctx context.Context, in *QueryAckFeeRequest, opts ...grpc.CallOption) (*QueryAckFeeResponse, error) { out := new(QueryAckFeeResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Query/AckFee", in, out, opts...) + err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Query/AckFee", in, out, opts...) if err != nil { return nil, err } @@ -578,7 +687,7 @@ func (c *queryClient) AckFee(ctx context.Context, in *QueryAckFeeRequest, opts . func (c *queryClient) TimeoutFee(ctx context.Context, in *QueryTimeoutFeeRequest, opts ...grpc.CallOption) (*QueryTimeoutFeeResponse, error) { out := new(QueryTimeoutFeeResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Query/TimeoutFee", in, out, opts...) + err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Query/TimeoutFee", in, out, opts...) if err != nil { return nil, err } @@ -587,7 +696,16 @@ func (c *queryClient) TimeoutFee(ctx context.Context, in *QueryTimeoutFeeRequest func (c *queryClient) IncentivizedPackets(ctx context.Context, in *QueryIncentivizedPacketsRequest, opts ...grpc.CallOption) (*QueryIncentivizedPacketsResponse, error) { out := new(QueryIncentivizedPacketsResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Query/IncentivizedPackets", in, out, opts...) + err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Query/IncentivizedPackets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) IncentivizedPacket(ctx context.Context, in *QueryIncentivizedPacketRequest, opts ...grpc.CallOption) (*QueryIncentivizedPacketResponse, error) { + out := new(QueryIncentivizedPacketResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Query/IncentivizedPacket", in, out, opts...) if err != nil { return nil, err } @@ -604,6 +722,8 @@ type QueryServer interface { TimeoutFee(context.Context, *QueryTimeoutFeeRequest) (*QueryTimeoutFeeResponse, error) // Gets all incentivized packets IncentivizedPackets(context.Context, *QueryIncentivizedPacketsRequest) (*QueryIncentivizedPacketsResponse, error) + // Gets all incentivized packets + IncentivizedPacket(context.Context, *QueryIncentivizedPacketRequest) (*QueryIncentivizedPacketResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -622,6 +742,9 @@ func (*UnimplementedQueryServer) TimeoutFee(ctx context.Context, req *QueryTimeo func (*UnimplementedQueryServer) IncentivizedPackets(ctx context.Context, req *QueryIncentivizedPacketsRequest) (*QueryIncentivizedPacketsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method IncentivizedPackets not implemented") } +func (*UnimplementedQueryServer) IncentivizedPacket(ctx context.Context, req *QueryIncentivizedPacketRequest) (*QueryIncentivizedPacketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IncentivizedPacket not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -637,7 +760,7 @@ func _Query_ReceiveFee_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ibc.applications.middleware.fee.v1.Query/ReceiveFee", + FullMethod: "/ibc.applications.fee.v1.Query/ReceiveFee", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ReceiveFee(ctx, req.(*QueryReceiveFeeRequest)) @@ -655,7 +778,7 @@ func _Query_AckFee_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ibc.applications.middleware.fee.v1.Query/AckFee", + FullMethod: "/ibc.applications.fee.v1.Query/AckFee", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).AckFee(ctx, req.(*QueryAckFeeRequest)) @@ -673,7 +796,7 @@ func _Query_TimeoutFee_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ibc.applications.middleware.fee.v1.Query/TimeoutFee", + FullMethod: "/ibc.applications.fee.v1.Query/TimeoutFee", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).TimeoutFee(ctx, req.(*QueryTimeoutFeeRequest)) @@ -691,7 +814,7 @@ func _Query_IncentivizedPackets_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ibc.applications.middleware.fee.v1.Query/IncentivizedPackets", + FullMethod: "/ibc.applications.fee.v1.Query/IncentivizedPackets", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).IncentivizedPackets(ctx, req.(*QueryIncentivizedPacketsRequest)) @@ -699,8 +822,26 @@ func _Query_IncentivizedPackets_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } +func _Query_IncentivizedPacket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryIncentivizedPacketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).IncentivizedPacket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.fee.v1.Query/IncentivizedPacket", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).IncentivizedPacket(ctx, req.(*QueryIncentivizedPacketRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ibc.applications.middleware.fee.v1.Query", + ServiceName: "ibc.applications.fee.v1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { @@ -719,9 +860,13 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "IncentivizedPackets", Handler: _Query_IncentivizedPackets_Handler, }, + { + MethodName: "IncentivizedPacket", + Handler: _Query_IncentivizedPacket_Handler, + }, }, Streams: []grpc.StreamDesc{}, - Metadata: "ibc/applications/middleware/fee/v1/query.proto", + Metadata: "ibc/applications/fee/v1/query.proto", } func (m *QueryReceiveFeeRequest) Marshal() (dAtA []byte, err error) { @@ -990,6 +1135,11 @@ func (m *QueryIncentivizedPacketsRequest) MarshalToSizedBuffer(dAtA []byte) (int _ = i var l int _ = l + if m.QueryHeight != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.QueryHeight)) + i-- + dAtA[i] = 0x10 + } if m.Pagination != nil { { size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) @@ -1025,11 +1175,6 @@ func (m *QueryIncentivizedPacketsResponse) MarshalToSizedBuffer(dAtA []byte) (in _ = i var l int _ = l - if m.QueryHeight != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.QueryHeight)) - i-- - dAtA[i] = 0x10 - } if len(m.IncentivizedPackets) > 0 { for iNdEx := len(m.IncentivizedPackets) - 1; iNdEx >= 0; iNdEx-- { { @@ -1047,6 +1192,81 @@ func (m *QueryIncentivizedPacketsResponse) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } +func (m *QueryIncentivizedPacketRequest) 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 *QueryIncentivizedPacketRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryIncentivizedPacketRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.QueryHeight != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.QueryHeight)) + i-- + dAtA[i] = 0x10 + } + if m.PacketId != nil { + { + size, err := m.PacketId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryIncentivizedPacketResponse) 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 *QueryIncentivizedPacketResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryIncentivizedPacketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.IncentivizedPacket != nil { + { + size, err := m.IncentivizedPacket.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -1167,6 +1387,9 @@ func (m *QueryIncentivizedPacketsRequest) Size() (n int) { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) } + if m.QueryHeight != 0 { + n += 1 + sovQuery(uint64(m.QueryHeight)) + } return n } @@ -1182,12 +1405,38 @@ func (m *QueryIncentivizedPacketsResponse) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) } } + return n +} + +func (m *QueryIncentivizedPacketRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PacketId != nil { + l = m.PacketId.Size() + n += 1 + l + sovQuery(uint64(l)) + } if m.QueryHeight != 0 { n += 1 + sovQuery(uint64(m.QueryHeight)) } return n } +func (m *QueryIncentivizedPacketResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.IncentivizedPacket != nil { + l = m.IncentivizedPacket.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1928,6 +2177,25 @@ func (m *QueryIncentivizedPacketsRequest) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QueryHeight", wireType) + } + m.QueryHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.QueryHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -2012,6 +2280,92 @@ func (m *QueryIncentivizedPacketsResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryIncentivizedPacketRequest) 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 ErrIntOverflowQuery + } + 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: QueryIncentivizedPacketRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryIncentivizedPacketRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PacketId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PacketId == nil { + m.PacketId = &types.PacketId{} + } + if err := m.PacketId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field QueryHeight", wireType) @@ -2052,6 +2406,92 @@ func (m *QueryIncentivizedPacketsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryIncentivizedPacketResponse) 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 ErrIntOverflowQuery + } + 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: QueryIncentivizedPacketResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryIncentivizedPacketResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IncentivizedPacket", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.IncentivizedPacket == nil { + m.IncentivizedPacket = &IdentifiedPacketFee{} + } + if err := m.IncentivizedPacket.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/modules/apps/29-fee/types/query.pb.gw.go b/modules/apps/29-fee/types/query.pb.gw.go index 2857a5bc609..aba421c6478 100644 --- a/modules/apps/29-fee/types/query.pb.gw.go +++ b/modules/apps/29-fee/types/query.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: ibc/applications/middleware/fee/v1/query.proto +// source: ibc/applications/fee/v1/query.proto /* Package types is a reverse proxy. @@ -547,6 +547,42 @@ func local_request_Query_IncentivizedPackets_0(ctx context.Context, marshaler ru } +var ( + filter_Query_IncentivizedPacket_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_IncentivizedPacket_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryIncentivizedPacketRequest + 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_IncentivizedPacket_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.IncentivizedPacket(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_IncentivizedPacket_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryIncentivizedPacketRequest + 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_IncentivizedPacket_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.IncentivizedPacket(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -633,6 +669,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_IncentivizedPacket_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) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_IncentivizedPacket_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_IncentivizedPacket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -754,17 +810,39 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_IncentivizedPacket_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_IncentivizedPacket_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_IncentivizedPacket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } var ( - pattern_Query_ReceiveFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9, 2, 10, 1, 0, 4, 1, 5, 11, 2, 12, 1, 0, 4, 1, 5, 13, 2, 14, 1, 0, 4, 1, 5, 15}, []string{"ibc", "apps", "middleware", "fee", "v1", "receive_fee", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence", "relayer", "relayer_address", "height", "query_height"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ReceiveFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8, 2, 9, 1, 0, 4, 1, 5, 10, 2, 11, 1, 0, 4, 1, 5, 12, 2, 13, 1, 0, 4, 1, 5, 14}, []string{"ibc", "apps", "fee", "v1", "receive_fee", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence", "relayer", "relayer_address", "height", "query_height"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_AckFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8, 2, 9, 1, 0, 4, 1, 5, 10, 2, 11, 1, 0, 4, 1, 5, 12, 2, 13, 1, 0, 4, 1, 5, 14}, []string{"ibc", "apps", "fee", "v1", "ack_fee", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence", "relayer", "relayer_address", "height", "query_height"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_AckFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9, 2, 10, 1, 0, 4, 1, 5, 11, 2, 12, 1, 0, 4, 1, 5, 13, 2, 14, 1, 0, 4, 1, 5, 15}, []string{"ibc", "apps", "middleware", "fee", "v1", "ack_fee", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence", "relayer", "relayer_address", "height", "query_height"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_TimeoutFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8, 2, 9, 1, 0, 4, 1, 5, 10, 1, 0, 4, 1, 5, 11, 2, 12, 1, 0, 4, 1, 5, 13}, []string{"ibc", "apps", "fee", "v1", "timeout_fee", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence", "relayer_address", "height", "query_height"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_TimeoutFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9, 2, 10, 1, 0, 4, 1, 5, 11, 1, 0, 4, 1, 5, 12, 2, 13, 1, 0, 4, 1, 5, 14}, []string{"ibc", "apps", "middleware", "fee", "v1", "timeout_fee", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence", "relayer_address", "height", "query_height"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_IncentivizedPackets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ibc", "apps", "fee", "v1", "incentivized_packets"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_IncentivizedPackets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "middleware", "fee", "v1", "incentivized_packets"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_IncentivizedPacket_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ibc", "apps", "fee", "v1", "incentivized_packet"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -775,4 +853,6 @@ var ( forward_Query_TimeoutFee_0 = runtime.ForwardResponseMessage forward_Query_IncentivizedPackets_0 = runtime.ForwardResponseMessage + + forward_Query_IncentivizedPacket_0 = runtime.ForwardResponseMessage ) diff --git a/modules/apps/29-fee/types/tx.pb.go b/modules/apps/29-fee/types/tx.pb.go index 514983fcefc..158f20b6a46 100644 --- a/modules/apps/29-fee/types/tx.pb.go +++ b/modules/apps/29-fee/types/tx.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/applications/middleware/fee/v1/tx.proto +// source: ibc/applications/fee/v1/tx.proto package types @@ -39,7 +39,7 @@ func (m *MsgRegisterCounterpartyAddress) Reset() { *m = MsgRegisterCount func (m *MsgRegisterCounterpartyAddress) String() string { return proto.CompactTextString(m) } func (*MsgRegisterCounterpartyAddress) ProtoMessage() {} func (*MsgRegisterCounterpartyAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_faf7cf2f6149e2c8, []int{0} + return fileDescriptor_05c93128649f1b96, []int{0} } func (m *MsgRegisterCounterpartyAddress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ func (m *MsgRegisterCounterPartyAddressResponse) Reset() { func (m *MsgRegisterCounterPartyAddressResponse) String() string { return proto.CompactTextString(m) } func (*MsgRegisterCounterPartyAddressResponse) ProtoMessage() {} func (*MsgRegisterCounterPartyAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_faf7cf2f6149e2c8, []int{1} + return fileDescriptor_05c93128649f1b96, []int{1} } func (m *MsgRegisterCounterPartyAddressResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -120,7 +120,7 @@ func (m *MsgEscrowPacketFee) Reset() { *m = MsgEscrowPacketFee{} } func (m *MsgEscrowPacketFee) String() string { return proto.CompactTextString(m) } func (*MsgEscrowPacketFee) ProtoMessage() {} func (*MsgEscrowPacketFee) Descriptor() ([]byte, []int) { - return fileDescriptor_faf7cf2f6149e2c8, []int{2} + return fileDescriptor_05c93128649f1b96, []int{2} } func (m *MsgEscrowPacketFee) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -192,7 +192,7 @@ func (m *MsgEscrowPacketFeeResponse) Reset() { *m = MsgEscrowPacketFeeRe func (m *MsgEscrowPacketFeeResponse) String() string { return proto.CompactTextString(m) } func (*MsgEscrowPacketFeeResponse) ProtoMessage() {} func (*MsgEscrowPacketFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_faf7cf2f6149e2c8, []int{3} + return fileDescriptor_05c93128649f1b96, []int{3} } func (m *MsgEscrowPacketFeeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -222,53 +222,50 @@ func (m *MsgEscrowPacketFeeResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgEscrowPacketFeeResponse proto.InternalMessageInfo func init() { - proto.RegisterType((*MsgRegisterCounterpartyAddress)(nil), "ibc.applications.middleware.fee.v1.MsgRegisterCounterpartyAddress") - proto.RegisterType((*MsgRegisterCounterPartyAddressResponse)(nil), "ibc.applications.middleware.fee.v1.MsgRegisterCounterPartyAddressResponse") - proto.RegisterType((*MsgEscrowPacketFee)(nil), "ibc.applications.middleware.fee.v1.MsgEscrowPacketFee") - proto.RegisterType((*MsgEscrowPacketFeeResponse)(nil), "ibc.applications.middleware.fee.v1.MsgEscrowPacketFeeResponse") + proto.RegisterType((*MsgRegisterCounterpartyAddress)(nil), "ibc.applications.fee.v1.MsgRegisterCounterpartyAddress") + proto.RegisterType((*MsgRegisterCounterPartyAddressResponse)(nil), "ibc.applications.fee.v1.MsgRegisterCounterPartyAddressResponse") + proto.RegisterType((*MsgEscrowPacketFee)(nil), "ibc.applications.fee.v1.MsgEscrowPacketFee") + proto.RegisterType((*MsgEscrowPacketFeeResponse)(nil), "ibc.applications.fee.v1.MsgEscrowPacketFeeResponse") } -func init() { - proto.RegisterFile("ibc/applications/middleware/fee/v1/tx.proto", fileDescriptor_faf7cf2f6149e2c8) -} +func init() { proto.RegisterFile("ibc/applications/fee/v1/tx.proto", fileDescriptor_05c93128649f1b96) } -var fileDescriptor_faf7cf2f6149e2c8 = []byte{ - // 549 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x41, 0x6b, 0x13, 0x41, - 0x14, 0xc7, 0xb3, 0x8d, 0xb6, 0xc9, 0x04, 0x54, 0xd6, 0x20, 0x61, 0xab, 0xbb, 0x75, 0x0f, 0x1a, - 0xd0, 0xee, 0x90, 0x08, 0x82, 0x3d, 0x08, 0x46, 0x2c, 0x28, 0x06, 0xc2, 0xe2, 0xc9, 0x4b, 0x3a, - 0x99, 0x7d, 0xd9, 0x0e, 0xd9, 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x77, 0x91, 0xb5, 0xda, 0x9d, 0x45, 0xf3, 0xea, 0xdf, 0xb7, 0x50, 0xbe, 0x29, 0x43, 0xf3, - 0x9b, 0x81, 0x76, 0xaf, 0x68, 0xb6, 0xd9, 0x58, 0x27, 0xee, 0xd5, 0xa3, 0x6c, 0xbd, 0xd9, 0x8c, - 0x71, 0xd9, 0xd0, 0x99, 0x9f, 0x0c, 0x74, 0xf3, 0xe2, 0xc4, 0x3d, 0x5d, 0x93, 0x7f, 0xc1, 0x67, - 0x3d, 0xdf, 0xcc, 0xb7, 0xc8, 0xd2, 0x78, 0xfb, 0x63, 0x62, 0x1b, 0x67, 0x13, 0xdb, 0xf8, 0x35, - 0xb1, 0x8d, 0xcf, 0x53, 0x3b, 0x77, 0x36, 0xb5, 0x73, 0x3f, 0xa7, 0x76, 0xee, 0x7d, 0x3d, 0x64, - 0xea, 0x78, 0xd0, 0xf1, 0x28, 0x8f, 0x31, 0xe5, 0x32, 0xe6, 0x12, 0xb3, 0x0e, 0xdd, 0x0f, 0x39, - 0x8e, 0x79, 0x30, 0x88, 0x40, 0xea, 0x6d, 0x22, 0x71, 0xfd, 0xd9, 0xbe, 0xde, 0x1e, 0x6a, 0x94, - 0x80, 0xec, 0x6c, 0xa7, 0xab, 0xe1, 0xc9, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd3, 0x51, 0x81, - 0xa9, 0xd4, 0x04, 0x00, 0x00, +var fileDescriptor_05c93128649f1b96 = []byte{ + // 529 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0xcf, 0x6b, 0x13, 0x41, + 0x14, 0xc7, 0xb3, 0x8d, 0xb6, 0xc9, 0x04, 0x54, 0xc6, 0xa0, 0x61, 0x5b, 0x77, 0xe3, 0x1e, 0x24, + 0x20, 0xdd, 0x25, 0xe9, 0x41, 0xec, 0x45, 0x8c, 0x58, 0x28, 0x18, 0x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d, 0x0f, 0x65, 0x1b, 0x2a, 0xc4, 0xdf, 0x2d, 0x74, + 0xb8, 0xe5, 0x2d, 0xf1, 0xab, 0x8d, 0x19, 0xb7, 0x8f, 0xa7, 0xfd, 0x66, 0x07, 0xe1, 0x5d, 0xd3, + 0x83, 0x15, 0x7a, 0x78, 0x7b, 0x72, 0x5e, 0x6e, 0xf3, 0xbc, 0x05, 0xdb, 0x27, 0x3b, 0xc0, 0xab, + 0x4b, 0xeb, 0x1f, 0x7e, 0xce, 0x1c, 0xeb, 0x7a, 0xe6, 0x58, 0xbf, 0x67, 0x8e, 0xf5, 0x75, 0xee, + 0x64, 0xae, 0xe7, 0x4e, 0xe6, 0xd7, 0xdc, 0xc9, 0x7c, 0xac, 0x85, 0x5c, 0x5f, 0x8e, 0xda, 0x3e, + 0x13, 0x83, 0x80, 0x09, 0x35, 0x10, 0x2a, 0xe0, 0x6d, 0x76, 0x1c, 0x8a, 0x60, 0x20, 0x3a, 0xa3, + 0x3e, 0x28, 0xb3, 0xf4, 0x2a, 0xa8, 0xbd, 0x3e, 0x36, 0xfb, 0xae, 0x27, 0x11, 0xa8, 0xf6, 0x7e, + 0xbc, 0xcc, 0x27, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf9, 0x02, 0x96, 0x27, 0x65, 0x04, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -305,7 +302,7 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { func (c *msgClient) RegisterCounterPartyAddress(ctx context.Context, in *MsgRegisterCounterpartyAddress, opts ...grpc.CallOption) (*MsgRegisterCounterPartyAddressResponse, error) { out := new(MsgRegisterCounterPartyAddressResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Msg/RegisterCounterPartyAddress", in, out, opts...) + err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Msg/RegisterCounterPartyAddress", in, out, opts...) if err != nil { return nil, err } @@ -314,7 +311,7 @@ func (c *msgClient) RegisterCounterPartyAddress(ctx context.Context, in *MsgRegi func (c *msgClient) EscrowPacketFee(ctx context.Context, in *MsgEscrowPacketFee, opts ...grpc.CallOption) (*MsgEscrowPacketFeeResponse, error) { out := new(MsgEscrowPacketFeeResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.middleware.fee.v1.Msg/EscrowPacketFee", in, out, opts...) + err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Msg/EscrowPacketFee", in, out, opts...) if err != nil { return nil, err } @@ -360,7 +357,7 @@ func _Msg_RegisterCounterPartyAddress_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ibc.applications.middleware.fee.v1.Msg/RegisterCounterPartyAddress", + FullMethod: "/ibc.applications.fee.v1.Msg/RegisterCounterPartyAddress", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).RegisterCounterPartyAddress(ctx, req.(*MsgRegisterCounterpartyAddress)) @@ -378,7 +375,7 @@ func _Msg_EscrowPacketFee_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ibc.applications.middleware.fee.v1.Msg/EscrowPacketFee", + FullMethod: "/ibc.applications.fee.v1.Msg/EscrowPacketFee", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).EscrowPacketFee(ctx, req.(*MsgEscrowPacketFee)) @@ -387,7 +384,7 @@ func _Msg_EscrowPacketFee_Handler(srv interface{}, ctx context.Context, dec func } var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ibc.applications.middleware.fee.v1.Msg", + ServiceName: "ibc.applications.fee.v1.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { @@ -400,7 +397,7 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "ibc/applications/middleware/fee/v1/tx.proto", + Metadata: "ibc/applications/fee/v1/tx.proto", } func (m *MsgRegisterCounterpartyAddress) Marshal() (dAtA []byte, err error) { diff --git a/proto/ibc/applications/middleware/fee/v1/fee.proto b/proto/ibc/applications/fee/v1/fee.proto similarity index 95% rename from proto/ibc/applications/middleware/fee/v1/fee.proto rename to proto/ibc/applications/fee/v1/fee.proto index d8261baf4e5..888ade35acb 100644 --- a/proto/ibc/applications/middleware/fee/v1/fee.proto +++ b/proto/ibc/applications/fee/v1/fee.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package ibc.applications.middleware.fee.v1; +package ibc.applications.fee.v1; import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; import "ibc/core/channel/v1/channel.proto"; diff --git a/proto/ibc/applications/middleware/fee/v1/genesis.proto b/proto/ibc/applications/fee/v1/genesis.proto similarity index 62% rename from proto/ibc/applications/middleware/fee/v1/genesis.proto rename to proto/ibc/applications/fee/v1/genesis.proto index 3cc4ae6f07b..373fd7786c4 100644 --- a/proto/ibc/applications/middleware/fee/v1/genesis.proto +++ b/proto/ibc/applications/fee/v1/genesis.proto @@ -1,13 +1,13 @@ syntax = "proto3"; -package ibc.applications.middleware.fee.v1; +package ibc.applications.fee.v1; import "gogoproto/gogo.proto"; -import "ibc/applications/middleware/fee/v1/fee.proto"; +import "ibc/applications/fee/v1/fee.proto"; option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; // GenesisState defines the fee middleware genesis state message GenesisState { // A mapping of packets -> escrowed fees - repeated ibc.applications.middleware.fee.v1.IdentifiedPacketFee packets_fees = 1 + repeated ibc.applications.fee.v1.IdentifiedPacketFee packets_fees = 1 [(gogoproto.moretags) = "yaml:\"packets_fees\""]; } diff --git a/proto/ibc/applications/fee/v1/query.proto b/proto/ibc/applications/fee/v1/query.proto new file mode 100644 index 00000000000..01bb117522a --- /dev/null +++ b/proto/ibc/applications/fee/v1/query.proto @@ -0,0 +1,121 @@ +syntax = "proto3"; + +package ibc.applications.fee.v1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "ibc/applications/fee/v1/fee.proto"; +import "google/api/annotations.proto"; +import "ibc/core/channel/v1/channel.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; + +option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; + +// Query provides defines the gRPC querier service. +service Query { + // Gets the fee expected for submitting ReceivePacket msg for the given packet + rpc ReceiveFee(QueryReceiveFeeRequest) returns (QueryReceiveFeeResponse) { + option (google.api.http).get = + "/ibc/apps/fee/v1/receive_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/" + "{packet_id.sequence}/relayer/{relayer_address}/height/{query_height}"; + } + + // Gets the fee expected for submitting AcknowledgePacket msg for the given packet + rpc AckFee(QueryAckFeeRequest) returns (QueryAckFeeResponse) { + option (google.api.http).get = + "/ibc/apps/fee/v1/ack_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/" + "{packet_id.sequence}/relayer/{relayer_address}/height/{query_height}"; + } + + // Gets the fee expected for submitting TimeoutPacket msg for the given packet + rpc TimeoutFee(QueryTimeoutFeeRequest) returns (QueryTimeoutFeeResponse) { + option (google.api.http).get = + "/ibc/apps/fee/v1/timeout_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/" + "{packet_id.sequence}/{relayer_address}/height/{query_height}"; + } + + // Gets all incentivized packets + rpc IncentivizedPackets(QueryIncentivizedPacketsRequest) returns (QueryIncentivizedPacketsResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/incentivized_packets"; + } + + // Gets all incentivized packets + rpc IncentivizedPacket(QueryIncentivizedPacketRequest) returns (QueryIncentivizedPacketResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/incentivized_packet"; + } +} + +// QueryReceiveRequestFee is the request type for quering the receive fee +message QueryReceiveFeeRequest { + // PacketID + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; + // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). + string relayer_address = 2 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; + // Height to query at + uint64 query_height = 3 [(gogoproto.moretags) = "yaml:\"query_height\""]; +} + +// QueryReceiveFeeResponse is the response type for the ReceiveFee RPC +message QueryReceiveFeeResponse { + ibc.applications.fee.v1.Fee fee = 1; +} + +// QueryAckFeeRequest is the request type for querying the acknowledgement fee +message QueryAckFeeRequest { + // PacketID + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; + // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). + string relayer_address = 2 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; + // Height to query at + uint64 query_height = 3 [(gogoproto.moretags) = "yaml:\"query_height\""]; +} + +// QueryAckFeeResponse is the response type for the AckFee RPC +message QueryAckFeeResponse { + ibc.applications.fee.v1.Fee fee = 1; +} + +// QueryTimeoutFeeRequest is the request type for querying the timeout fee +message QueryTimeoutFeeRequest { + // PacketID + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; + // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). + string relayer_address = 2 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; + // Height to query at + uint64 query_height = 3 [(gogoproto.moretags) = "yaml:\"query_height\""]; +} + +// QueryTimeoutFeeResponse is the response type for the timeout RPC +message QueryTimeoutFeeResponse { + ibc.applications.fee.v1.Fee fee = 1; +} + +// QueryIncentivizedPacketRequest is the request type for querying for all incentivized packets +message QueryIncentivizedPacketsRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; + // Height to query at + uint64 query_height = 2 [(gogoproto.moretags) = "yaml:\"query_height\""]; +} + +// QueryTimeoutFeeResponse is the response type for the timeout RPC +message QueryIncentivizedPacketsResponse { + // Map of all incentivized_packets + repeated ibc.applications.fee.v1.IdentifiedPacketFee incentivized_packets = 1 + [(gogoproto.moretags) = "yaml:\"incentivized_packets\""]; +} + +// QueryIncentivizedPacketRequest is the request type for querying for all incentivized packets +message QueryIncentivizedPacketRequest { + // PacketID + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; + // Height to query at + uint64 query_height = 2 [(gogoproto.moretags) = "yaml:\"query_height\""]; +} + +// QueryTimeoutFeeResponse is the response type for the timeout RPC +message QueryIncentivizedPacketResponse { + // Incentivized_packet + ibc.applications.fee.v1.IdentifiedPacketFee incentivized_packet = 1 + [(gogoproto.moretags) = "yaml:\"incentivized_packet\""]; +} diff --git a/proto/ibc/applications/middleware/fee/v1/query.proto b/proto/ibc/applications/fee/v1/query.proto~ similarity index 100% rename from proto/ibc/applications/middleware/fee/v1/query.proto rename to proto/ibc/applications/fee/v1/query.proto~ diff --git a/proto/ibc/applications/middleware/fee/v1/tx.proto b/proto/ibc/applications/fee/v1/tx.proto similarity index 77% rename from proto/ibc/applications/middleware/fee/v1/tx.proto rename to proto/ibc/applications/fee/v1/tx.proto index 0350ec7b923..552cef69a83 100644 --- a/proto/ibc/applications/middleware/fee/v1/tx.proto +++ b/proto/ibc/applications/fee/v1/tx.proto @@ -1,9 +1,9 @@ syntax = "proto3"; -package ibc.applications.middleware.fee.v1; +package ibc.applications.fee.v1; import "gogoproto/gogo.proto"; -import "ibc/applications/middleware/fee/v1/fee.proto"; +import "ibc/applications/fee/v1/fee.proto"; import "ibc/core/channel/v1/channel.proto"; option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; @@ -35,11 +35,11 @@ message MsgRegisterCounterPartyAddressResponse {} // MsgEscrowPacketFee defines the request type EscrowPacketFee RPC message MsgEscrowPacketFee { - ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; - ibc.applications.middleware.fee.v1.Fee receive_fee = 2 [(gogoproto.moretags) = "yaml:\"receive_fee\""]; - ibc.applications.middleware.fee.v1.Fee ack_fee = 3 [(gogoproto.moretags) = "yaml:\"ack_fee\""]; - ibc.applications.middleware.fee.v1.Fee timeout_fee = 4 [(gogoproto.moretags) = "yaml:\"timeout_fee\""]; - repeated string relayers = 5; + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; + ibc.applications.fee.v1.Fee receive_fee = 2 [(gogoproto.moretags) = "yaml:\"receive_fee\""]; + ibc.applications.fee.v1.Fee ack_fee = 3 [(gogoproto.moretags) = "yaml:\"ack_fee\""]; + ibc.applications.fee.v1.Fee timeout_fee = 4 [(gogoproto.moretags) = "yaml:\"timeout_fee\""]; + repeated string relayers = 5; } // MsgEscrowPacketFeeResponse defines the response type for Msg/EscrowPacketFee From 1be683de6e48bdc9eeac31ed20787a135fd3cb06 Mon Sep 17 00:00:00 2001 From: Aditya Sripal Date: Mon, 26 Jul 2021 10:14:45 +0200 Subject: [PATCH 23/26] remove junk file and update query rpcs --- docs/ibc/proto-docs.md | 4 +- modules/apps/29-fee/types/query.pb.go | 110 ++++++++-------- modules/apps/29-fee/types/query.pb.gw.go | 146 ++++++++++++++++++++- modules/apps/29-fee/types/tx.pb.go | 103 +++++---------- proto/ibc/applications/fee/v1/query.proto | 6 +- proto/ibc/applications/fee/v1/query.proto~ | 101 -------------- proto/ibc/applications/fee/v1/tx.proto | 3 + 7 files changed, 240 insertions(+), 233 deletions(-) delete mode 100644 proto/ibc/applications/fee/v1/query.proto~ diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md index 2100bb5bb73..bb6b3bee520 100644 --- a/docs/ibc/proto-docs.md +++ b/docs/ibc/proto-docs.md @@ -875,8 +875,8 @@ Query provides defines the gRPC querier service. | `ReceiveFee` | [QueryReceiveFeeRequest](#ibc.applications.fee.v1.QueryReceiveFeeRequest) | [QueryReceiveFeeResponse](#ibc.applications.fee.v1.QueryReceiveFeeResponse) | Gets the fee expected for submitting ReceivePacket msg for the given packet | GET|/ibc/apps/fee/v1/receive_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}/relayer/{relayer_address}/height/{query_height}| | `AckFee` | [QueryAckFeeRequest](#ibc.applications.fee.v1.QueryAckFeeRequest) | [QueryAckFeeResponse](#ibc.applications.fee.v1.QueryAckFeeResponse) | Gets the fee expected for submitting AcknowledgePacket msg for the given packet | GET|/ibc/apps/fee/v1/ack_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}/relayer/{relayer_address}/height/{query_height}| | `TimeoutFee` | [QueryTimeoutFeeRequest](#ibc.applications.fee.v1.QueryTimeoutFeeRequest) | [QueryTimeoutFeeResponse](#ibc.applications.fee.v1.QueryTimeoutFeeResponse) | Gets the fee expected for submitting TimeoutPacket msg for the given packet | GET|/ibc/apps/fee/v1/timeout_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}/{relayer_address}/height/{query_height}| -| `IncentivizedPackets` | [QueryIncentivizedPacketsRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketsRequest) | [QueryIncentivizedPacketsResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketsResponse) | Gets all incentivized packets | GET|/ibc/apps/fee/v1/incentivized_packets| -| `IncentivizedPacket` | [QueryIncentivizedPacketRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketRequest) | [QueryIncentivizedPacketResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketResponse) | Gets all incentivized packets | GET|/ibc/apps/fee/v1/incentivized_packet| +| `IncentivizedPackets` | [QueryIncentivizedPacketsRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketsRequest) | [QueryIncentivizedPacketsResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketsResponse) | Gets all incentivized packets | GET|/ibc/apps/fee/v1/incentivized_packets/height/{query_height}| +| `IncentivizedPacket` | [QueryIncentivizedPacketRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketRequest) | [QueryIncentivizedPacketResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketResponse) | Gets all incentivized packets | GET|/ibc/apps/fee/v1/incentivized_packet/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}/height/{query_height}| diff --git a/modules/apps/29-fee/types/query.pb.go b/modules/apps/29-fee/types/query.pb.go index b296b0a8ace..93c4c393ac5 100644 --- a/modules/apps/29-fee/types/query.pb.go +++ b/modules/apps/29-fee/types/query.pb.go @@ -578,61 +578,61 @@ func init() { } var fileDescriptor_0638a8a78ca2503c = []byte{ - // 850 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x96, 0x41, 0x6b, 0x2b, 0x55, - 0x14, 0xc7, 0x7b, 0x53, 0x7d, 0xd8, 0x5b, 0x51, 0xb9, 0x29, 0xaf, 0x21, 0x3e, 0x27, 0x71, 0xd4, - 0x67, 0xd0, 0xf6, 0x5e, 0x13, 0x17, 0xbe, 0xf7, 0x76, 0x8d, 0x58, 0x0c, 0xb8, 0xa8, 0x83, 0x2b, - 0x37, 0x61, 0x32, 0x73, 0x32, 0xb9, 0x34, 0x99, 0x3b, 0x9d, 0x99, 0x04, 0x62, 0x09, 0x88, 0x1f, - 0x40, 0x04, 0xc1, 0x85, 0x60, 0x51, 0xb1, 0xe0, 0x42, 0xdc, 0xb9, 0xf0, 0x0b, 0x88, 0xcb, 0x82, - 0x1b, 0x57, 0x41, 0x5a, 0xc1, 0x85, 0xbb, 0x7c, 0x02, 0x99, 0xb9, 0x37, 0xe9, 0xb4, 0x93, 0x69, - 0x93, 0x4a, 0x41, 0x7c, 0xbb, 0xdc, 0x7b, 0xcf, 0x39, 0xf7, 0x7f, 0x7e, 0xf7, 0xe4, 0x9c, 0xc1, - 0x2f, 0xf1, 0x96, 0xc5, 0x4c, 0xcf, 0xeb, 0x72, 0xcb, 0x0c, 0xb9, 0x70, 0x03, 0xd6, 0x06, 0x60, - 0x83, 0x2a, 0x3b, 0xe8, 0x83, 0x3f, 0xa4, 0x9e, 0x2f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x18, 0x9f, 0xb7, - 0xc9, 0xeb, 0x2a, 0x26, 0x35, 0x3d, 0xae, 0xab, 0x98, 0x74, 0x07, 0xd6, 0xbf, 0x93, 0x70, 0xbe, - 0x42, 0xe4, 0xcb, 0x34, 0x9c, 0x50, 0xda, 0xdf, 0x22, 0xa0, 0x45, 0xc1, 0xfc, 0x8c, 0x70, 0x7e, - 0x4e, 0x2f, 0x25, 0x0f, 0xae, 0x4e, 0x38, 0x7b, 0x4c, 0x14, 0x1f, 0xde, 0xc0, 0x53, 0x31, 0xdb, - 0x8e, 0x91, 0xbd, 0x4a, 0x5e, 0x49, 0x01, 0x9b, 0xd7, 0x7a, 0xc9, 0x4f, 0x08, 0x93, 0x74, 0x38, - 0xf2, 0xd6, 0xb2, 0x02, 0xa6, 0xca, 0x1f, 0x2c, 0xef, 0xa8, 0x84, 0x6f, 0xc5, 0xc2, 0xef, 0x93, - 0x97, 0x17, 0x11, 0x5e, 0x7f, 0xef, 0xd7, 0x53, 0x0d, 0x9d, 0x9c, 0x6a, 0xe8, 0x8f, 0x53, 0x0d, - 0x7d, 0x76, 0xa6, 0xad, 0x9c, 0x9c, 0x69, 0x2b, 0xbf, 0x9f, 0x69, 0x2b, 0x1f, 0xd6, 0x1c, 0x1e, - 0x76, 0xfa, 0x2d, 0x6a, 0x89, 0x1e, 0x53, 0x1f, 0xd8, 0xbc, 0x65, 0x6d, 0x3b, 0x82, 0xf5, 0x84, - 0xdd, 0xef, 0x42, 0x20, 0x63, 0xd7, 0x1e, 0x6e, 0x47, 0xe1, 0xc3, 0xa1, 0x07, 0x41, 0xeb, 0x4e, - 0xfc, 0x91, 0xfd, 0xe6, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6d, 0x89, 0x8a, 0x4a, 0x76, 0x0c, - 0x00, 0x00, + // 858 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x96, 0x41, 0x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0xa3, 0x02, 0x68, 0xe4, 0x12, 0x19, + 0xea, 0x7f, 0x21, 0x4c, 0xe2, 0x58, 0x8f, 0xad, 0xed, 0xff, 0x37, 0xb4, 0x0f, 0x71, 0xfe, 0x9c, + 0xd0, 0x6b, 0x02, 0x9b, 0x55, 0xda, 0xa7, 0xbc, 0x07, 0xa2, 0x1f, 0x3e, 0x1b, 0x95, 0x96, 0x14, + 0x7b, 0x4d, 0x70, 0x47, 0x08, 0x97, 0xe2, 0x58, 0x0d, 0xd7, 0x02, 0x37, 0xe4, 0x03, 0xfe, 0x39, + 0xd8, 0x92, 0x44, 0x30, 0x25, 0xb8, 0x89, 0xf1, 0xd9, 0x5f, 0x5b, 0x85, 0x7e, 0x93, 0xca, 0x3e, + 0x40, 0xa3, 0x3e, 0x40, 0x65, 0x7f, 0x53, 0x7d, 0x80, 0x6e, 0x99, 0xce, 0x94, 0xbe, 0x91, 0xf0, + 0x4c, 0x49, 0xce, 0x2d, 0x21, 0xf9, 0x08, 0xe1, 0x72, 0x76, 0x9e, 0x4a, 0xfc, 0x17, 0x08, 0xaf, + 0xf3, 0xc4, 0x79, 0x53, 0x3e, 0x59, 0x50, 0x40, 0xe5, 0xd5, 0xca, 0x5a, 0xed, 0x5e, 0x26, 0x8e, + 0x86, 0x1d, 0xf9, 0xb4, 0xf9, 0x34, 0xe4, 0x26, 0x40, 0xbd, 0x34, 0x19, 0x97, 0x5e, 0x95, 0x79, + 0xcd, 0x8b, 0xa9, 0x1b, 0x79, 0x9e, 0x4e, 0x45, 0xff, 0x09, 0x61, 0x2d, 0x23, 0xcf, 0x9b, 0x2b, + 0xc8, 0x7f, 0x03, 0xf6, 0xdb, 0xec, 0x02, 0x98, 0x71, 0x1d, 0xe1, 0xfc, 0x1c, 0x04, 0x2a, 0xf7, + 0xe5, 0xa8, 0x6a, 0x93, 0x71, 0xa9, 0x98, 0x49, 0x55, 0x37, 0x48, 0x1a, 0x6a, 0xed, 0x17, 0x8c, + 0x9f, 0x8f,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5e, 0xeb, 0xcd, 0x50, 0x74, 0x98, 0xc3, 0x24, + 0x7d, 0x09, 0x79, 0x6f, 0xd9, 0xb4, 0xa6, 0x7a, 0x1e, 0x2c, 0xef, 0xa8, 0xe4, 0xec, 0xcb, 0x12, + 0xd8, 0x43, 0x64, 0x17, 0x2d, 0xa2, 0xe8, 0x86, 0x4a, 0x61, 0x2e, 0xa6, 0xfa, 0xc7, 0x3f, 0x9f, + 0x68, 0xe8, 0xf8, 0x44, 0x43, 0x7f, 0x9c, 0x68, 0x68, 0xf7, 0x54, 0x5b, 0x39, 0x3e, 0xd5, 0x56, + 0x7e, 0x3f, 0xd5, 0x56, 0x3e, 0xab, 0x39, 0x3c, 0xec, 0xf4, 0x5b, 0xd4, 0x12, 0x3d, 0xa6, 0xbe, + 0xf2, 0x79, 0xcb, 0xba, 0xef, 0x08, 0xd6, 0x13, 0x76, 0xbf, 0x0b, 0x81, 0xd4, 0x51, 0x7b, 0x78, + 0x3f, 0x92, 0x12, 0x0e, 0x3d, 0x08, 0x5a, 0xb7, 0xe2, 0x2f, 0xfd, 0x77, 0xff, 0x09, 0x00, 0x00, + 0xff, 0xff, 0xf6, 0x44, 0xcf, 0x76, 0xfb, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/apps/29-fee/types/query.pb.gw.go b/modules/apps/29-fee/types/query.pb.gw.go index aba421c6478..40df38d4bf9 100644 --- a/modules/apps/29-fee/types/query.pb.gw.go +++ b/modules/apps/29-fee/types/query.pb.gw.go @@ -512,13 +512,31 @@ func local_request_Query_TimeoutFee_0(ctx context.Context, marshaler runtime.Mar } var ( - filter_Query_IncentivizedPackets_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_Query_IncentivizedPackets_0 = &utilities.DoubleArray{Encoding: map[string]int{"query_height": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) func request_Query_IncentivizedPackets_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryIncentivizedPacketsRequest var metadata runtime.ServerMetadata + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["query_height"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_height") + } + + protoReq.QueryHeight, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_height", err) + } + if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -535,6 +553,24 @@ func local_request_Query_IncentivizedPackets_0(ctx context.Context, marshaler ru var protoReq QueryIncentivizedPacketsRequest var metadata runtime.ServerMetadata + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["query_height"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_height") + } + + protoReq.QueryHeight, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_height", err) + } + if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -548,13 +584,64 @@ func local_request_Query_IncentivizedPackets_0(ctx context.Context, marshaler ru } var ( - filter_Query_IncentivizedPacket_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_Query_IncentivizedPacket_0 = &utilities.DoubleArray{Encoding: map[string]int{"packet_id": 0, "port_id": 1, "channel_id": 2, "sequence": 3, "query_height": 4}, Base: []int{1, 1, 1, 2, 3, 4, 0, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 1, 3, 4, 5, 6}} ) func request_Query_IncentivizedPacket_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryIncentivizedPacketRequest var metadata runtime.ServerMetadata + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["packet_id.port_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + } + + val, ok = pathParams["packet_id.channel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + } + + val, ok = pathParams["packet_id.sequence"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.sequence") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.sequence", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.sequence", err) + } + + val, ok = pathParams["query_height"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_height") + } + + protoReq.QueryHeight, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_height", err) + } + if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -571,6 +658,57 @@ func local_request_Query_IncentivizedPacket_0(ctx context.Context, marshaler run var protoReq QueryIncentivizedPacketRequest var metadata runtime.ServerMetadata + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["packet_id.port_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + } + + val, ok = pathParams["packet_id.channel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + } + + val, ok = pathParams["packet_id.sequence"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.sequence") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.sequence", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.sequence", err) + } + + val, ok = pathParams["query_height"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_height") + } + + protoReq.QueryHeight, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_height", err) + } + if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -840,9 +978,9 @@ var ( pattern_Query_TimeoutFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8, 2, 9, 1, 0, 4, 1, 5, 10, 1, 0, 4, 1, 5, 11, 2, 12, 1, 0, 4, 1, 5, 13}, []string{"ibc", "apps", "fee", "v1", "timeout_fee", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence", "relayer_address", "height", "query_height"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_IncentivizedPackets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ibc", "apps", "fee", "v1", "incentivized_packets"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_IncentivizedPackets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"ibc", "apps", "fee", "v1", "incentivized_packets", "height", "query_height"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_IncentivizedPacket_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ibc", "apps", "fee", "v1", "incentivized_packet"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_IncentivizedPacket_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8, 2, 9, 1, 0, 4, 1, 5, 10, 2, 11, 1, 0, 4, 1, 5, 12}, []string{"ibc", "apps", "fee", "v1", "incentivized_packet", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence", "height", "query_height"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( diff --git a/modules/apps/29-fee/types/tx.pb.go b/modules/apps/29-fee/types/tx.pb.go index 158f20b6a46..2ba04e8573f 100644 --- a/modules/apps/29-fee/types/tx.pb.go +++ b/modules/apps/29-fee/types/tx.pb.go @@ -149,41 +149,6 @@ func (m *MsgEscrowPacketFee) XXX_DiscardUnknown() { var xxx_messageInfo_MsgEscrowPacketFee proto.InternalMessageInfo -func (m *MsgEscrowPacketFee) GetPacketId() *types.PacketId { - if m != nil { - return m.PacketId - } - return nil -} - -func (m *MsgEscrowPacketFee) GetReceiveFee() *Fee { - if m != nil { - return m.ReceiveFee - } - return nil -} - -func (m *MsgEscrowPacketFee) GetAckFee() *Fee { - if m != nil { - return m.AckFee - } - return nil -} - -func (m *MsgEscrowPacketFee) GetTimeoutFee() *Fee { - if m != nil { - return m.TimeoutFee - } - return nil -} - -func (m *MsgEscrowPacketFee) GetRelayers() []string { - if m != nil { - return m.Relayers - } - return nil -} - // MsgEscrowPacketFeeResponse defines the response type for Msg/EscrowPacketFee type MsgEscrowPacketFeeResponse struct { } @@ -231,41 +196,41 @@ func init() { func init() { proto.RegisterFile("ibc/applications/fee/v1/tx.proto", fileDescriptor_05c93128649f1b96) } var fileDescriptor_05c93128649f1b96 = []byte{ - // 529 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0xcf, 0x6b, 0x13, 0x41, - 0x14, 0xc7, 0xb3, 0x8d, 0xb6, 0xc9, 0x04, 0x54, 0xc6, 0xa0, 0x61, 0x5b, 0x77, 0xe3, 0x1e, 0x24, + // 531 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x6b, 0x13, 0x41, + 0x18, 0xc6, 0xb3, 0x8d, 0xb6, 0xc9, 0x04, 0x54, 0xc6, 0xa0, 0x61, 0x5b, 0x77, 0xe3, 0x1e, 0x24, 0x20, 0xdd, 0x25, 0xe9, 0x41, 0xec, 0x45, 0x8c, 0x58, 0x28, 0x18, 0x08, 0x03, 0xbd, 0x78, 0x09, - 0x93, 0xc9, 0xcb, 0x76, 0xc8, 0x8f, 0x59, 0x66, 0x26, 0xd1, 0xfc, 0x07, 0x1e, 0x3d, 0x08, 0x7a, - 0xec, 0x9f, 0xe3, 0xb1, 0x47, 0x4f, 0x41, 0x92, 0x8b, 0xe7, 0x5c, 0xbd, 0xc8, 0xec, 0x26, 0x65, - 0x69, 0x9a, 0x60, 0x6e, 0xf3, 0xd8, 0xcf, 0xf7, 0x3b, 0xdf, 0x7d, 0xf3, 0x1e, 0x2a, 0xf3, 0x36, - 0x0b, 0x68, 0x14, 0xf5, 0x39, 0xa3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 0x17, 0x53, + 0xf7, 0x41, 0x62, 0xb9, 0x94, 0x79, 0x64, 0x9f, 0xb2, 0x9e, 0xb1, 0xba, 0x40, 0x05, 0xcd, 0x07, + 0x20, 0x46, 0x3a, 0xb6, 0xbb, 0xb7, 0x5b, 0xc2, 0x94, 0xd4, 0x23, 0x68, 0x59, 0x19, 0x5b, 0x1b, + 0xe5, 0x24, 0xf4, 0xe9, 0x04, 0xa4, 0x2a, 0xdd, 0x2f, 0x67, 0x2b, 0x79, 0x72, 0x53, 0xa7, 0x3a, + 0x76, 0x84, 0xec, 0xf5, 0x36, 0xac, 0xba, 0x54, 0xfb, 0xbe, 0x87, 0xb2, 0x0d, 0x15, 0xe2, 0x1f, + 0x16, 0x3a, 0xdc, 0xd2, 0x55, 0xfc, 0x6a, 0x63, 0xda, 0xed, 0x83, 0x6a, 0xbf, 0xd9, 0x41, 0x78, + 0xd7, 0x1c, 0x61, 0x85, 0x1e, 0xde, 0x9e, 0xa1, 0x97, 0xdb, 0x3c, 0x6f, 0xc1, 0xf6, 0xc9, 0x0e, + 0xf0, 0xea, 0xd2, 0xfa, 0x87, 0x5f, 0x33, 0xc7, 0xba, 0x9e, 0x39, 0xd6, 0x9f, 0x99, 0x63, 0x7d, + 0x9b, 0x3b, 0x99, 0xeb, 0xb9, 0x93, 0xf9, 0x3d, 0x77, 0x32, 0x1f, 0x6b, 0x21, 0xd7, 0x97, 0xa3, + 0xb6, 0xcf, 0xc4, 0x20, 0x60, 0x42, 0x0d, 0x84, 0x0a, 0x78, 0x9b, 0x1d, 0x87, 0x22, 0x18, 0x88, + 0xce, 0xa8, 0x0f, 0xca, 0xac, 0xbf, 0x0a, 0x6a, 0xaf, 0x8f, 0xcd, 0xe6, 0xeb, 0x49, 0x04, 0xaa, + 0xbd, 0x1f, 0xaf, 0xf5, 0xc9, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe1, 0xc9, 0x06, 0xc0, 0x6f, + 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/ibc/applications/fee/v1/query.proto b/proto/ibc/applications/fee/v1/query.proto index 01bb117522a..7a83446646d 100644 --- a/proto/ibc/applications/fee/v1/query.proto +++ b/proto/ibc/applications/fee/v1/query.proto @@ -36,12 +36,14 @@ service Query { // Gets all incentivized packets rpc IncentivizedPackets(QueryIncentivizedPacketsRequest) returns (QueryIncentivizedPacketsResponse) { - option (google.api.http).get = "/ibc/apps/fee/v1/incentivized_packets"; + option (google.api.http).get = "/ibc/apps/fee/v1/incentivized_packets/height/{query_height}"; } // Gets all incentivized packets rpc IncentivizedPacket(QueryIncentivizedPacketRequest) returns (QueryIncentivizedPacketResponse) { - option (google.api.http).get = "/ibc/apps/fee/v1/incentivized_packet"; + option (google.api.http).get = + "/ibc/apps/fee/v1/incentivized_packet/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/" + "{packet_id.sequence}/height/{query_height}"; } } diff --git a/proto/ibc/applications/fee/v1/query.proto~ b/proto/ibc/applications/fee/v1/query.proto~ deleted file mode 100644 index 70fcd458044..00000000000 --- a/proto/ibc/applications/fee/v1/query.proto~ +++ /dev/null @@ -1,101 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.middleware.fee.v1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "ibc/applications/middleware/fee/v1/fee.proto"; -import "google/api/annotations.proto"; -import "ibc/core/channel/v1/channel.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; - -option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; - -// Query provides defines the gRPC querier service. -service Query { - // Gets the fee expected for submitting ReceivePacket msg for the given packet - rpc ReceiveFee(QueryReceiveFeeRequest) returns (QueryReceiveFeeResponse) { - option (google.api.http).get = - "/ibc/apps/middleware/fee/v1/receive_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/" - "{packet_id.sequence}/relayer/{relayer_address}/height/{query_height}"; - } - - // Gets the fee expected for submitting AcknowledgePacket msg for the given packet - rpc AckFee(QueryAckFeeRequest) returns (QueryAckFeeResponse) { - option (google.api.http).get = - "/ibc/apps/middleware/fee/v1/ack_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/" - "{packet_id.sequence}/relayer/{relayer_address}/height/{query_height}"; - } - - // Gets the fee expected for submitting TimeoutPacket msg for the given packet - rpc TimeoutFee(QueryTimeoutFeeRequest) returns (QueryTimeoutFeeResponse) { - option (google.api.http).get = - "/ibc/apps/middleware/fee/v1/timeout_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/" - "{packet_id.sequence}/{relayer_address}/height/{query_height}"; - } - - // Gets all incentivized packets - rpc IncentivizedPackets(QueryIncentivizedPacketsRequest) returns (QueryIncentivizedPacketsResponse) { - option (google.api.http).get = "/ibc/apps/middleware/fee/v1/incentivized_packets"; - } -} - -// QueryReceiveRequestFee is the request type for quering the receive fee -message QueryReceiveFeeRequest { - // PacketID - ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; - // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - string relayer_address = 2 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; - // Height to query at - uint64 query_height = 3 [(gogoproto.moretags) = "yaml:\"query_height\""]; -} - -// QueryReceiveFeeResponse is the response type for the ReceiveFee RPC -message QueryReceiveFeeResponse { - ibc.applications.middleware.fee.v1.Fee fee = 1; -} - -// QueryAckFeeRequest is the request type for querying the acknowledgement fee -message QueryAckFeeRequest { - // PacketID - ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; - // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - string relayer_address = 2 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; - // Height to query at - uint64 query_height = 3 [(gogoproto.moretags) = "yaml:\"query_height\""]; -} - -// QueryAckFeeResponse is the response type for the AckFee RPC -message QueryAckFeeResponse { - ibc.applications.middleware.fee.v1.Fee fee = 1; -} - -// QueryTimeoutFeeRequest is the request type for querying the timeout fee -message QueryTimeoutFeeRequest { - // PacketID - ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; - // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - string relayer_address = 2 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; - // Height to query at - uint64 query_height = 3 [(gogoproto.moretags) = "yaml:\"query_height\""]; -} - -// QueryTimeoutFeeResponse is the response type for the timeout RPC -message QueryTimeoutFeeResponse { - ibc.applications.middleware.fee.v1.Fee fee = 1; -} - -// QueryIncentivizedPacketRequest is the request type for querying for all incentivized packets -message QueryIncentivizedPacketsRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryTimeoutFeeResponse is the response type for the timeout RPC -message QueryIncentivizedPacketsResponse { - // Map of all incentivized_packets - repeated ibc.applications.middleware.fee.v1.IdentifiedPacketFee incentivized_packets = 1 - [(gogoproto.moretags) = "yaml:\"incentivized_packets\""]; - // Height to query at - uint64 query_height = 2 [(gogoproto.moretags) = "yaml:\"query_height\""]; -} diff --git a/proto/ibc/applications/fee/v1/tx.proto b/proto/ibc/applications/fee/v1/tx.proto index 552cef69a83..554bc0c0488 100644 --- a/proto/ibc/applications/fee/v1/tx.proto +++ b/proto/ibc/applications/fee/v1/tx.proto @@ -35,6 +35,9 @@ message MsgRegisterCounterPartyAddressResponse {} // MsgEscrowPacketFee defines the request type EscrowPacketFee RPC message MsgEscrowPacketFee { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; ibc.applications.fee.v1.Fee receive_fee = 2 [(gogoproto.moretags) = "yaml:\"receive_fee\""]; ibc.applications.fee.v1.Fee ack_fee = 3 [(gogoproto.moretags) = "yaml:\"ack_fee\""]; From b74ccd52580d9beaeb21ed3a9b4de98fe305a5b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Mon, 26 Jul 2021 12:50:37 +0200 Subject: [PATCH 24/26] Apply suggestions from code review --- proto/ibc/applications/fee/v1/query.proto | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/proto/ibc/applications/fee/v1/query.proto b/proto/ibc/applications/fee/v1/query.proto index 7a83446646d..e823def3813 100644 --- a/proto/ibc/applications/fee/v1/query.proto +++ b/proto/ibc/applications/fee/v1/query.proto @@ -39,7 +39,7 @@ service Query { option (google.api.http).get = "/ibc/apps/fee/v1/incentivized_packets/height/{query_height}"; } - // Gets all incentivized packets + // Gets the specified incentivized packet rpc IncentivizedPacket(QueryIncentivizedPacketRequest) returns (QueryIncentivizedPacketResponse) { option (google.api.http).get = "/ibc/apps/fee/v1/incentivized_packet/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/" @@ -47,7 +47,7 @@ service Query { } } -// QueryReceiveRequestFee is the request type for quering the receive fee +// QueryReceiveFeeRequest is the request type for querying the receive fee message QueryReceiveFeeRequest { // PacketID ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; @@ -92,7 +92,7 @@ message QueryTimeoutFeeResponse { ibc.applications.fee.v1.Fee fee = 1; } -// QueryIncentivizedPacketRequest is the request type for querying for all incentivized packets +// QueryIncentivizedPacketsRequest is the request type for querying for all incentivized packets message QueryIncentivizedPacketsRequest { // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 1; @@ -100,7 +100,7 @@ message QueryIncentivizedPacketsRequest { uint64 query_height = 2 [(gogoproto.moretags) = "yaml:\"query_height\""]; } -// QueryTimeoutFeeResponse is the response type for the timeout RPC +// QueryIncentivizedPacketsResponse is the response type for the incentivized packets RPC message QueryIncentivizedPacketsResponse { // Map of all incentivized_packets repeated ibc.applications.fee.v1.IdentifiedPacketFee incentivized_packets = 1 @@ -115,7 +115,7 @@ message QueryIncentivizedPacketRequest { uint64 query_height = 2 [(gogoproto.moretags) = "yaml:\"query_height\""]; } -// QueryTimeoutFeeResponse is the response type for the timeout RPC +// QueryIncentivizedPacketsResponse is the response type for the incentivized packet RPC message QueryIncentivizedPacketResponse { // Incentivized_packet ibc.applications.fee.v1.IdentifiedPacketFee incentivized_packet = 1 From a0b837e6ca024f098d189f3df7a27fc893fbaba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Mon, 26 Jul 2021 12:51:18 +0200 Subject: [PATCH 25/26] Apply suggestions from code review --- proto/ibc/applications/fee/v1/tx.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/ibc/applications/fee/v1/tx.proto b/proto/ibc/applications/fee/v1/tx.proto index 554bc0c0488..65bc727f0eb 100644 --- a/proto/ibc/applications/fee/v1/tx.proto +++ b/proto/ibc/applications/fee/v1/tx.proto @@ -11,8 +11,8 @@ option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; service Msg { // RegisterCounterpartyAddress defines a rpc handler method for MsgRegisterCounterpartyAddress // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their - // counterparty address before relaying This ensures they will be properly compensated for forward relaying since - // destination chain must send back relayer's source address (counterparty address) in acknowledgement This function + // counterparty address before relaying. This ensures they will be properly compensated for forward relaying since + // destination chain must send back relayer's source address (counterparty address) in acknowledgement. This function // may be called more than once by a relayer, in which case, latest counterparty address is always used. rpc RegisterCounterPartyAddress(MsgRegisterCounterpartyAddress) returns (MsgRegisterCounterPartyAddressResponse); // EscrowPacketFee defines a rpc handler method for MsgEscrowPacketFee From 11fba686dc9051abb00dd1931969f5246d2c80e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Colin=20Axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Mon, 26 Jul 2021 12:54:16 +0200 Subject: [PATCH 26/26] remove query yaml, make proto-all --- docs/ibc/proto-docs.md | 12 +- modules/apps/29-fee/types/query.pb.go | 146 +++++++++++----------- modules/apps/29-fee/types/tx.pb.go | 8 +- proto/ibc/applications/fee/v1/query.proto | 30 +++-- 4 files changed, 95 insertions(+), 101 deletions(-) diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md index bb6b3bee520..5e9a088d7bb 100644 --- a/docs/ibc/proto-docs.md +++ b/docs/ibc/proto-docs.md @@ -752,7 +752,7 @@ QueryIncentivizedPacketRequest is the request type for querying for all incentiv ### QueryIncentivizedPacketResponse -QueryTimeoutFeeResponse is the response type for the timeout RPC +QueryIncentivizedPacketsResponse is the response type for the incentivized packet RPC | Field | Type | Label | Description | @@ -767,7 +767,7 @@ QueryTimeoutFeeResponse is the response type for the timeout RPC ### QueryIncentivizedPacketsRequest -QueryIncentivizedPacketRequest is the request type for querying for all incentivized packets +QueryIncentivizedPacketsRequest is the request type for querying for all incentivized packets | Field | Type | Label | Description | @@ -783,7 +783,7 @@ QueryIncentivizedPacketRequest is the request type for querying for all incentiv ### QueryIncentivizedPacketsResponse -QueryTimeoutFeeResponse is the response type for the timeout RPC +QueryIncentivizedPacketsResponse is the response type for the incentivized packets RPC | Field | Type | Label | Description | @@ -798,7 +798,7 @@ QueryTimeoutFeeResponse is the response type for the timeout RPC ### QueryReceiveFeeRequest -QueryReceiveRequestFee is the request type for quering the receive fee +QueryReceiveFeeRequest is the request type for querying the receive fee | Field | Type | Label | Description | @@ -876,7 +876,7 @@ Query provides defines the gRPC querier service. | `AckFee` | [QueryAckFeeRequest](#ibc.applications.fee.v1.QueryAckFeeRequest) | [QueryAckFeeResponse](#ibc.applications.fee.v1.QueryAckFeeResponse) | Gets the fee expected for submitting AcknowledgePacket msg for the given packet | GET|/ibc/apps/fee/v1/ack_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}/relayer/{relayer_address}/height/{query_height}| | `TimeoutFee` | [QueryTimeoutFeeRequest](#ibc.applications.fee.v1.QueryTimeoutFeeRequest) | [QueryTimeoutFeeResponse](#ibc.applications.fee.v1.QueryTimeoutFeeResponse) | Gets the fee expected for submitting TimeoutPacket msg for the given packet | GET|/ibc/apps/fee/v1/timeout_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}/{relayer_address}/height/{query_height}| | `IncentivizedPackets` | [QueryIncentivizedPacketsRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketsRequest) | [QueryIncentivizedPacketsResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketsResponse) | Gets all incentivized packets | GET|/ibc/apps/fee/v1/incentivized_packets/height/{query_height}| -| `IncentivizedPacket` | [QueryIncentivizedPacketRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketRequest) | [QueryIncentivizedPacketResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketResponse) | Gets all incentivized packets | GET|/ibc/apps/fee/v1/incentivized_packet/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}/height/{query_height}| +| `IncentivizedPacket` | [QueryIncentivizedPacketRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketRequest) | [QueryIncentivizedPacketResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketResponse) | Gets the specified incentivized packet | GET|/ibc/apps/fee/v1/incentivized_packet/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}/height/{query_height}| @@ -957,7 +957,7 @@ Msg defines the ibc/fee Msg service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `RegisterCounterPartyAddress` | [MsgRegisterCounterpartyAddress](#ibc.applications.fee.v1.MsgRegisterCounterpartyAddress) | [MsgRegisterCounterPartyAddressResponse](#ibc.applications.fee.v1.MsgRegisterCounterPartyAddressResponse) | RegisterCounterpartyAddress defines a rpc handler method for MsgRegisterCounterpartyAddress RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their counterparty address before relaying This ensures they will be properly compensated for forward relaying since destination chain must send back relayer's source address (counterparty address) in acknowledgement This function may be called more than once by a relayer, in which case, latest counterparty address is always used. | | +| `RegisterCounterPartyAddress` | [MsgRegisterCounterpartyAddress](#ibc.applications.fee.v1.MsgRegisterCounterpartyAddress) | [MsgRegisterCounterPartyAddressResponse](#ibc.applications.fee.v1.MsgRegisterCounterPartyAddressResponse) | RegisterCounterpartyAddress defines a rpc handler method for MsgRegisterCounterpartyAddress RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their counterparty address before relaying. This ensures they will be properly compensated for forward relaying since destination chain must send back relayer's source address (counterparty address) in acknowledgement. This function may be called more than once by a relayer, in which case, latest counterparty address is always used. | | | `EscrowPacketFee` | [MsgEscrowPacketFee](#ibc.applications.fee.v1.MsgEscrowPacketFee) | [MsgEscrowPacketFeeResponse](#ibc.applications.fee.v1.MsgEscrowPacketFeeResponse) | EscrowPacketFee defines a rpc handler method for MsgEscrowPacketFee EscrowPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to incentivize the relaying of the given packet. | | diff --git a/modules/apps/29-fee/types/query.pb.go b/modules/apps/29-fee/types/query.pb.go index 93c4c393ac5..bfcae7cdd88 100644 --- a/modules/apps/29-fee/types/query.pb.go +++ b/modules/apps/29-fee/types/query.pb.go @@ -31,14 +31,14 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// QueryReceiveRequestFee is the request type for quering the receive fee +// QueryReceiveFeeRequest is the request type for querying the receive fee type QueryReceiveFeeRequest struct { // PacketID - PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"packet_id"` + PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty"` // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - RelayerAddress string `protobuf:"bytes,2,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` + RelayerAddress string `protobuf:"bytes,2,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty"` // Height to query at - QueryHeight uint64 `protobuf:"varint,3,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty" yaml:"query_height"` + QueryHeight uint64 `protobuf:"varint,3,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty"` } func (m *QueryReceiveFeeRequest) Reset() { *m = QueryReceiveFeeRequest{} } @@ -143,11 +143,11 @@ func (m *QueryReceiveFeeResponse) GetFee() *Fee { // QueryAckFeeRequest is the request type for querying the acknowledgement fee type QueryAckFeeRequest struct { // PacketID - PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"packet_id"` + PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty"` // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - RelayerAddress string `protobuf:"bytes,2,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` + RelayerAddress string `protobuf:"bytes,2,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty"` // Height to query at - QueryHeight uint64 `protobuf:"varint,3,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty" yaml:"query_height"` + QueryHeight uint64 `protobuf:"varint,3,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty"` } func (m *QueryAckFeeRequest) Reset() { *m = QueryAckFeeRequest{} } @@ -252,11 +252,11 @@ func (m *QueryAckFeeResponse) GetFee() *Fee { // QueryTimeoutFeeRequest is the request type for querying the timeout fee type QueryTimeoutFeeRequest struct { // PacketID - PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"packet_id"` + PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty"` // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - RelayerAddress string `protobuf:"bytes,2,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` + RelayerAddress string `protobuf:"bytes,2,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty"` // Height to query at - QueryHeight uint64 `protobuf:"varint,3,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty" yaml:"query_height"` + QueryHeight uint64 `protobuf:"varint,3,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty"` } func (m *QueryTimeoutFeeRequest) Reset() { *m = QueryTimeoutFeeRequest{} } @@ -358,12 +358,12 @@ func (m *QueryTimeoutFeeResponse) GetFee() *Fee { return nil } -// QueryIncentivizedPacketRequest is the request type for querying for all incentivized packets +// QueryIncentivizedPacketsRequest is the request type for querying for all incentivized packets type QueryIncentivizedPacketsRequest struct { // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` // Height to query at - QueryHeight uint64 `protobuf:"varint,2,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty" yaml:"query_height"` + QueryHeight uint64 `protobuf:"varint,2,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty"` } func (m *QueryIncentivizedPacketsRequest) Reset() { *m = QueryIncentivizedPacketsRequest{} } @@ -413,10 +413,10 @@ func (m *QueryIncentivizedPacketsRequest) GetQueryHeight() uint64 { return 0 } -// QueryTimeoutFeeResponse is the response type for the timeout RPC +// QueryIncentivizedPacketsResponse is the response type for the incentivized packets RPC type QueryIncentivizedPacketsResponse struct { // Map of all incentivized_packets - IncentivizedPackets []*IdentifiedPacketFee `protobuf:"bytes,1,rep,name=incentivized_packets,json=incentivizedPackets,proto3" json:"incentivized_packets,omitempty" yaml:"incentivized_packets"` + IncentivizedPackets []*IdentifiedPacketFee `protobuf:"bytes,1,rep,name=incentivized_packets,json=incentivizedPackets,proto3" json:"incentivized_packets,omitempty"` } func (m *QueryIncentivizedPacketsResponse) Reset() { *m = QueryIncentivizedPacketsResponse{} } @@ -462,9 +462,9 @@ func (m *QueryIncentivizedPacketsResponse) GetIncentivizedPackets() []*Identifie // QueryIncentivizedPacketRequest is the request type for querying for all incentivized packets type QueryIncentivizedPacketRequest struct { // PacketID - PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty" yaml:"packet_id"` + PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty"` // Height to query at - QueryHeight uint64 `protobuf:"varint,2,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty" yaml:"query_height"` + QueryHeight uint64 `protobuf:"varint,2,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty"` } func (m *QueryIncentivizedPacketRequest) Reset() { *m = QueryIncentivizedPacketRequest{} } @@ -514,10 +514,10 @@ func (m *QueryIncentivizedPacketRequest) GetQueryHeight() uint64 { return 0 } -// QueryTimeoutFeeResponse is the response type for the timeout RPC +// QueryIncentivizedPacketsResponse is the response type for the incentivized packet RPC type QueryIncentivizedPacketResponse struct { // Incentivized_packet - IncentivizedPacket *IdentifiedPacketFee `protobuf:"bytes,1,opt,name=incentivized_packet,json=incentivizedPacket,proto3" json:"incentivized_packet,omitempty" yaml:"incentivized_packet"` + IncentivizedPacket *IdentifiedPacketFee `protobuf:"bytes,1,opt,name=incentivized_packet,json=incentivizedPacket,proto3" json:"incentivized_packet,omitempty"` } func (m *QueryIncentivizedPacketResponse) Reset() { *m = QueryIncentivizedPacketResponse{} } @@ -578,61 +578,57 @@ func init() { } var fileDescriptor_0638a8a78ca2503c = []byte{ - // 858 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x96, 0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 0x34, 0xa3, 0x02, 0x68, 0xe4, 0x12, 0x19, - 0xea, 0x7f, 0x21, 0x4c, 0xe2, 0x58, 0x8f, 0xad, 0xed, 0xff, 0x37, 0xb4, 0x0f, 0x71, 0xfe, 0x9c, - 0xd0, 0x6b, 0x02, 0x9b, 0x55, 0xda, 0xa7, 0xbc, 0x07, 0xa2, 0x1f, 0x3e, 0x1b, 0x95, 0x96, 0x14, - 0x7b, 0x4d, 0x70, 0x47, 0x08, 0x97, 0xe2, 0x58, 0x0d, 0xd7, 0x02, 0x37, 0xe4, 0x03, 0xfe, 0x39, - 0xd8, 0x92, 0x44, 0x30, 0x25, 0xb8, 0x89, 0xf1, 0xd9, 0x5f, 0x5b, 0x85, 0x7e, 0x93, 0xca, 0x3e, - 0x40, 0xa3, 0x3e, 0x40, 0x65, 0x7f, 0x53, 0x7d, 0x80, 0x6e, 0x99, 0xce, 0x94, 0xbe, 0x91, 0xf0, - 0x4c, 0x49, 0xce, 0x2d, 0x21, 0xf9, 0x08, 0xe1, 0x72, 0x76, 0x9e, 0x4a, 0xfc, 0x17, 0x08, 0xaf, - 0xf3, 0xc4, 0x79, 0x53, 0x3e, 0x59, 0x50, 0x40, 0xe5, 0xd5, 0xca, 0x5a, 0xed, 0x5e, 0x26, 0x8e, - 0x86, 0x1d, 0xf9, 0xb4, 0xf9, 0x34, 0xe4, 0x26, 0x40, 0xbd, 0x34, 0x19, 0x97, 0x5e, 0x95, 0x79, - 0xcd, 0x8b, 0xa9, 0x1b, 0x79, 0x9e, 0x4e, 0x45, 0xff, 0x09, 0x61, 0x2d, 0x23, 0xcf, 0x9b, 0x2b, - 0xc8, 0x7f, 0x03, 0xf6, 0xdb, 0xec, 0x02, 0x98, 0x71, 0x1d, 0xe1, 0xfc, 0x1c, 0x04, 0x2a, 0xf7, - 0xe5, 0xa8, 0x6a, 0x93, 0x71, 0xa9, 0x98, 0x49, 0x55, 0x37, 0x48, 0x1a, 0x6a, 0xed, 0x17, 0x8c, - 0x9f,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6c, 0x5e, 0xeb, 0xcd, 0x50, 0x74, 0x98, 0xc3, 0x24, - 0x7d, 0x09, 0x79, 0x6f, 0xd9, 0xb4, 0xa6, 0x7a, 0x1e, 0x2c, 0xef, 0xa8, 0xe4, 0xec, 0xcb, 0x12, - 0xd8, 0x43, 0x64, 0x17, 0x2d, 0xa2, 0xe8, 0x86, 0x4a, 0x61, 0x2e, 0xa6, 0xfa, 0xc7, 0x3f, 0x9f, - 0x68, 0xe8, 0xf8, 0x44, 0x43, 0x7f, 0x9c, 0x68, 0x68, 0xf7, 0x54, 0x5b, 0x39, 0x3e, 0xd5, 0x56, - 0x7e, 0x3f, 0xd5, 0x56, 0x3e, 0xab, 0x39, 0x3c, 0xec, 0xf4, 0x5b, 0xd4, 0x12, 0x3d, 0xa6, 0xbe, - 0xf2, 0x79, 0xcb, 0xba, 0xef, 0x08, 0xd6, 0x13, 0x76, 0xbf, 0x0b, 0x81, 0xd4, 0x51, 0x7b, 0x78, - 0x3f, 0x92, 0x12, 0x0e, 0x3d, 0x08, 0x5a, 0xb7, 0xe2, 0x2f, 0xfd, 0x77, 0xff, 0x09, 0x00, 0x00, - 0xff, 0xff, 0xf6, 0x44, 0xcf, 0x76, 0xfb, 0x0c, 0x00, 0x00, + // 793 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x51, 0x6b, 0x13, 0x4b, + 0x14, 0xee, 0xa4, 0xf7, 0x96, 0xdb, 0xe9, 0xe5, 0x5e, 0x98, 0x94, 0xdb, 0x10, 0x7a, 0x73, 0xd3, + 0x5c, 0xd0, 0xa0, 0xed, 0x8c, 0x89, 0x0f, 0xb6, 0x8a, 0x0f, 0x55, 0x2c, 0x06, 0x7c, 0xa8, 0xc1, + 0x27, 0x41, 0xc2, 0x66, 0xf7, 0x64, 0x33, 0x34, 0xd9, 0xd9, 0xee, 0x6e, 0x02, 0xb5, 0x04, 0x45, +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, } // Reference imports to suppress errors if they are not otherwise used. @@ -655,7 +651,7 @@ type QueryClient interface { TimeoutFee(ctx context.Context, in *QueryTimeoutFeeRequest, opts ...grpc.CallOption) (*QueryTimeoutFeeResponse, error) // Gets all incentivized packets IncentivizedPackets(ctx context.Context, in *QueryIncentivizedPacketsRequest, opts ...grpc.CallOption) (*QueryIncentivizedPacketsResponse, error) - // Gets all incentivized packets + // Gets the specified incentivized packet IncentivizedPacket(ctx context.Context, in *QueryIncentivizedPacketRequest, opts ...grpc.CallOption) (*QueryIncentivizedPacketResponse, error) } @@ -722,7 +718,7 @@ type QueryServer interface { TimeoutFee(context.Context, *QueryTimeoutFeeRequest) (*QueryTimeoutFeeResponse, error) // Gets all incentivized packets IncentivizedPackets(context.Context, *QueryIncentivizedPacketsRequest) (*QueryIncentivizedPacketsResponse, error) - // Gets all incentivized packets + // Gets the specified incentivized packet IncentivizedPacket(context.Context, *QueryIncentivizedPacketRequest) (*QueryIncentivizedPacketResponse, error) } diff --git a/modules/apps/29-fee/types/tx.pb.go b/modules/apps/29-fee/types/tx.pb.go index 2ba04e8573f..be4b2c6eb8a 100644 --- a/modules/apps/29-fee/types/tx.pb.go +++ b/modules/apps/29-fee/types/tx.pb.go @@ -247,8 +247,8 @@ const _ = grpc.SupportPackageIsVersion4 type MsgClient interface { // RegisterCounterpartyAddress defines a rpc handler method for MsgRegisterCounterpartyAddress // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their - // counterparty address before relaying This ensures they will be properly compensated for forward relaying since - // destination chain must send back relayer's source address (counterparty address) in acknowledgement This function + // counterparty address before relaying. This ensures they will be properly compensated for forward relaying since + // destination chain must send back relayer's source address (counterparty address) in acknowledgement. This function // may be called more than once by a relayer, in which case, latest counterparty address is always used. RegisterCounterPartyAddress(ctx context.Context, in *MsgRegisterCounterpartyAddress, opts ...grpc.CallOption) (*MsgRegisterCounterPartyAddressResponse, error) // EscrowPacketFee defines a rpc handler method for MsgEscrowPacketFee @@ -287,8 +287,8 @@ func (c *msgClient) EscrowPacketFee(ctx context.Context, in *MsgEscrowPacketFee, type MsgServer interface { // RegisterCounterpartyAddress defines a rpc handler method for MsgRegisterCounterpartyAddress // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their - // counterparty address before relaying This ensures they will be properly compensated for forward relaying since - // destination chain must send back relayer's source address (counterparty address) in acknowledgement This function + // counterparty address before relaying. This ensures they will be properly compensated for forward relaying since + // destination chain must send back relayer's source address (counterparty address) in acknowledgement. This function // may be called more than once by a relayer, in which case, latest counterparty address is always used. RegisterCounterPartyAddress(context.Context, *MsgRegisterCounterpartyAddress) (*MsgRegisterCounterPartyAddressResponse, error) // EscrowPacketFee defines a rpc handler method for MsgEscrowPacketFee diff --git a/proto/ibc/applications/fee/v1/query.proto b/proto/ibc/applications/fee/v1/query.proto index e823def3813..c4411da5b0e 100644 --- a/proto/ibc/applications/fee/v1/query.proto +++ b/proto/ibc/applications/fee/v1/query.proto @@ -50,11 +50,11 @@ service Query { // QueryReceiveFeeRequest is the request type for querying the receive fee message QueryReceiveFeeRequest { // PacketID - ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; + ibc.core.channel.v1.PacketId packet_id = 1; // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - string relayer_address = 2 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; + string relayer_address = 2; // Height to query at - uint64 query_height = 3 [(gogoproto.moretags) = "yaml:\"query_height\""]; + uint64 query_height = 3; } // QueryReceiveFeeResponse is the response type for the ReceiveFee RPC @@ -65,11 +65,11 @@ message QueryReceiveFeeResponse { // QueryAckFeeRequest is the request type for querying the acknowledgement fee message QueryAckFeeRequest { // PacketID - ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; + ibc.core.channel.v1.PacketId packet_id = 1; // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - string relayer_address = 2 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; + string relayer_address = 2; // Height to query at - uint64 query_height = 3 [(gogoproto.moretags) = "yaml:\"query_height\""]; + uint64 query_height = 3; } // QueryAckFeeResponse is the response type for the AckFee RPC @@ -80,11 +80,11 @@ message QueryAckFeeResponse { // QueryTimeoutFeeRequest is the request type for querying the timeout fee message QueryTimeoutFeeRequest { // PacketID - ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; + ibc.core.channel.v1.PacketId packet_id = 1; // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - string relayer_address = 2 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; + string relayer_address = 2; // Height to query at - uint64 query_height = 3 [(gogoproto.moretags) = "yaml:\"query_height\""]; + uint64 query_height = 3; } // QueryTimeoutFeeResponse is the response type for the timeout RPC @@ -97,27 +97,25 @@ message QueryIncentivizedPacketsRequest { // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 1; // Height to query at - uint64 query_height = 2 [(gogoproto.moretags) = "yaml:\"query_height\""]; + uint64 query_height = 2; } // QueryIncentivizedPacketsResponse is the response type for the incentivized packets RPC message QueryIncentivizedPacketsResponse { // Map of all incentivized_packets - repeated ibc.applications.fee.v1.IdentifiedPacketFee incentivized_packets = 1 - [(gogoproto.moretags) = "yaml:\"incentivized_packets\""]; + repeated ibc.applications.fee.v1.IdentifiedPacketFee incentivized_packets = 1; } // QueryIncentivizedPacketRequest is the request type for querying for all incentivized packets message QueryIncentivizedPacketRequest { // PacketID - ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.moretags) = "yaml:\"packet_id\""]; + ibc.core.channel.v1.PacketId packet_id = 1; // Height to query at - uint64 query_height = 2 [(gogoproto.moretags) = "yaml:\"query_height\""]; + uint64 query_height = 2; } // QueryIncentivizedPacketsResponse is the response type for the incentivized packet RPC message QueryIncentivizedPacketResponse { // Incentivized_packet - ibc.applications.fee.v1.IdentifiedPacketFee incentivized_packet = 1 - [(gogoproto.moretags) = "yaml:\"incentivized_packet\""]; + ibc.applications.fee.v1.IdentifiedPacketFee incentivized_packet = 1; }