diff --git a/proto/feemarket/feemarket/module/v1/module.proto b/proto/feemarket/feemarket/module/v1/module.proto new file mode 100644 index 0000000..9bddd03 --- /dev/null +++ b/proto/feemarket/feemarket/module/v1/module.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +package feemarket.feemarket.module.v1; + +import "cosmos/app/v1alpha1/module.proto"; + +// Module is the config object of the builder module. +message Module { + option (cosmos.app.v1alpha1.module) = { + go_import : "github.com/skip-mev/feemarket/x/feemarket" + }; + + // Authority defines the custom module authority. If not set, defaults to the + // governance module. + string authority = 1; +} diff --git a/proto/feemarket/feemarket/v1/feemarket.proto b/proto/feemarket/feemarket/v1/feemarket.proto new file mode 100644 index 0000000..a00a805 --- /dev/null +++ b/proto/feemarket/feemarket/v1/feemarket.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package feemarket.feemarket.v1; + +option go_package = "github.com/skip-mev/feemarket/x/feemarket/types"; + +import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; + +// FeeMarket is the fee market implementation to be used by the x/feemarket +// module. +message FeeMarket { + // Implementation is a byte array that must implement + // x/feemarket/types/FeeMarketImplementation + bytes implementation = 1 + [ (cosmos_proto.accepts_interface) = + "feemarket.feemarket.v1.FeeMarketImplementation" ]; +} diff --git a/proto/feemarket/feemarket/v1/genesis.proto b/proto/feemarket/feemarket/v1/genesis.proto new file mode 100644 index 0000000..128b9e0 --- /dev/null +++ b/proto/feemarket/feemarket/v1/genesis.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; +package feemarket.feemarket.v1; + +option go_package = "github.com/skip-mev/feemarket/x/feemarket/types"; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "feemarket/feemarket/v1/feemarket.proto"; + +// GenesisState defines the feemarket module's genesis state. +message GenesisState { + // Plugin is the FeeMarket implementation plugged into the feemarket module. + FeeMarket plugin = 1 [ (gogoproto.nullable) = false ]; + + // Params are the parameters for the feemarket module. + Params params = 2 [ (gogoproto.nullable) = false ]; +} + +// Params defines the parameters for the feemarket module. +message Params { + // Enabled is a flag to enable or disable the feemarket module. + bool enabled = 1; +} diff --git a/proto/feemarket/feemarket/v1/mock.proto b/proto/feemarket/feemarket/v1/mock.proto new file mode 100644 index 0000000..442ae74 --- /dev/null +++ b/proto/feemarket/feemarket/v1/mock.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; +package feemarket.feemarket.v1; + +option go_package = "github.com/skip-mev/feemarket/x/feemarket/plugins/mock"; + +import "cosmos_proto/cosmos.proto"; + +// MockFeeMarket is a message that contains the information about a mock fee +// market implementation. +// +// NOTE: This is an example of a mock fee market. It is not used in production. +message MockFeeMarket { + option (cosmos_proto.implements_interface) = + "feemarket.feemarket.v1.FeeMarketImplementation"; +} diff --git a/proto/feemarket/feemarket/v1/query.proto b/proto/feemarket/feemarket/v1/query.proto new file mode 100644 index 0000000..5345884 --- /dev/null +++ b/proto/feemarket/feemarket/v1/query.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package feemarket.feemarket.v1; + +option go_package = "github.com/skip-mev/feemarket/x/feemarket/types"; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "feemarket/feemarket/v1/genesis.proto"; + +// Query Service for the feemarket module. +service Query { + // Params returns the current feemarket module parameters. + rpc Params(ParamsRequest) returns (ParamsResponse) { + option (google.api.http) = { + get : "/feemarket/feemarket/v1/params" + }; + }; +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message ParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message ParamsResponse { Params params = 1 [ (gogoproto.nullable) = false ]; } diff --git a/proto/feemarket/feemarket/v1/tx.proto b/proto/feemarket/feemarket/v1/tx.proto new file mode 100644 index 0000000..47ce6e4 --- /dev/null +++ b/proto/feemarket/feemarket/v1/tx.proto @@ -0,0 +1,33 @@ +syntax = "proto3"; +package feemarket.feemarket.v1; + +import "feemarket/feemarket/v1/genesis.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/msg/v1/msg.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/skip-mev/feemarket/x/feemarket/types"; + +// Message service defines the types of messages supported by the feemarket +// module. +service Msg { + option (cosmos.msg.v1.service) = true; + + // Params defines a method for updating the feemarket module parameters. + rpc Params(MsgParams) returns (MsgParamsResponse); +} + +// MsgParams defines the Msg/Params request type. It contains the +// new parameters for the feemarket module. +message MsgParams { + option (cosmos.msg.v1.signer) = "from_address"; + + // Params defines the new parameters for the feemarket module. + Params params = 1 [ (gogoproto.nullable) = false ]; + // Authority defines the authority that is updating the feemarket module + // parameters. + string authority = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; +} + +// MsgParamsResponse defines the Msg/Params response type. +message MsgParamsResponse {} diff --git a/x/feemarket/plugins/README.md b/x/feemarket/plugins/README.md index e69de29..0e7364d 100644 --- a/x/feemarket/plugins/README.md +++ b/x/feemarket/plugins/README.md @@ -0,0 +1,9 @@ +# FeeMarket Plugins + +This directory contains implementations of the `FeeMarket` interface to be +plugged into the `x/feemarket` module. + +Current implementations include: + +- [Mock:](mock/feemarket.go) fee market that can be used for basic testing. +DO NOT use in production. diff --git a/x/feemarket/plugins/mock/ante.go b/x/feemarket/plugins/mock/ante.go new file mode 100644 index 0000000..f33e02b --- /dev/null +++ b/x/feemarket/plugins/mock/ante.go @@ -0,0 +1 @@ +package mock diff --git a/x/feemarket/plugins/mock/feemarket.go b/x/feemarket/plugins/mock/feemarket.go index bf161e4..511fc4e 100644 --- a/x/feemarket/plugins/mock/feemarket.go +++ b/x/feemarket/plugins/mock/feemarket.go @@ -10,8 +10,6 @@ import ( var _ types.FeeMarketImplementation = &MockFeeMarket{} -type MockFeeMarket struct{} //nolint - // ValidateBasic is a no-op. func (fm *MockFeeMarket) ValidateBasic() error { return nil diff --git a/x/feemarket/plugins/mock/mock.pb.go b/x/feemarket/plugins/mock/mock.pb.go new file mode 100644 index 0000000..4d3b5fe --- /dev/null +++ b/x/feemarket/plugins/mock/mock.pb.go @@ -0,0 +1,272 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: feemarket/feemarket/v1/mock.proto + +package mock + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + proto "github.com/cosmos/gogoproto/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 + +// MockFeeMarket is a message that contains the information about a mock fee +// market implementation. +// +// NOTE: This is an example of a mock fee market. It is not used in production. +type MockFeeMarket struct { +} + +func (m *MockFeeMarket) Reset() { *m = MockFeeMarket{} } +func (m *MockFeeMarket) String() string { return proto.CompactTextString(m) } +func (*MockFeeMarket) ProtoMessage() {} +func (*MockFeeMarket) Descriptor() ([]byte, []int) { + return fileDescriptor_6b7e37c7950103c0, []int{0} +} +func (m *MockFeeMarket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MockFeeMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MockFeeMarket.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 *MockFeeMarket) XXX_Merge(src proto.Message) { + xxx_messageInfo_MockFeeMarket.Merge(m, src) +} +func (m *MockFeeMarket) XXX_Size() int { + return m.Size() +} +func (m *MockFeeMarket) XXX_DiscardUnknown() { + xxx_messageInfo_MockFeeMarket.DiscardUnknown(m) +} + +var xxx_messageInfo_MockFeeMarket proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MockFeeMarket)(nil), "feemarket.feemarket.v1.MockFeeMarket") +} + +func init() { proto.RegisterFile("feemarket/feemarket/v1/mock.proto", fileDescriptor_6b7e37c7950103c0) } + +var fileDescriptor_6b7e37c7950103c0 = []byte{ + // 203 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0x4b, 0x4d, 0xcd, + 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x47, 0xb0, 0xca, 0x0c, 0xf5, 0x73, 0xf3, 0x93, 0xb3, 0xf5, + 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0xc4, 0xe0, 0x12, 0x7a, 0x08, 0x56, 0x99, 0xa1, 0x94, 0x60, + 0x62, 0x6e, 0x66, 0x5e, 0xbe, 0x3e, 0x98, 0x84, 0x28, 0x95, 0x92, 0x4c, 0xce, 0x2f, 0xce, 0xcd, + 0x2f, 0x8e, 0x07, 0xf3, 0xf4, 0x21, 0x1c, 0x88, 0x94, 0x52, 0x26, 0x17, 0xaf, 0x6f, 0x7e, 0x72, + 0xb6, 0x5b, 0x6a, 0xaa, 0x2f, 0xd8, 0x04, 0xab, 0x88, 0x53, 0x5b, 0x74, 0xf5, 0xb0, 0x1b, 0xad, + 0x07, 0x57, 0xe5, 0x99, 0x5b, 0x90, 0x93, 0x9a, 0x9b, 0x9a, 0x57, 0x92, 0x58, 0x92, 0x99, 0x9f, + 0xd7, 0xf5, 0x7c, 0x83, 0x16, 0x56, 0x07, 0xa3, 0x98, 0xec, 0x14, 0x70, 0xe2, 0x91, 0x1c, 0xe3, + 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, + 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x66, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, + 0xb9, 0xfa, 0xc5, 0xd9, 0x99, 0x05, 0xba, 0xb9, 0xa9, 0x65, 0x48, 0xc6, 0x54, 0x20, 0xb1, 0x0b, + 0x72, 0x4a, 0xd3, 0x33, 0xf3, 0x8a, 0xc1, 0x01, 0x91, 0xc4, 0x06, 0xf6, 0x83, 0x31, 0x20, 0x00, + 0x00, 0xff, 0xff, 0xd7, 0x5e, 0xa8, 0x15, 0x2e, 0x01, 0x00, 0x00, +} + +func (m *MockFeeMarket) 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 *MockFeeMarket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MockFeeMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintMock(dAtA []byte, offset int, v uint64) int { + offset -= sovMock(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MockFeeMarket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovMock(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMock(x uint64) (n int) { + return sovMock(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MockFeeMarket) 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 ErrIntOverflowMock + } + 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: MockFeeMarket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MockFeeMarket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMock(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMock + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMock(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, ErrIntOverflowMock + } + 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, ErrIntOverflowMock + } + 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, ErrIntOverflowMock + } + 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, ErrInvalidLengthMock + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMock + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMock + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMock = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMock = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMock = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/feemarket/types/feemarket.go b/x/feemarket/types/feemarket.go index 3876870..b1c863d 100644 --- a/x/feemarket/types/feemarket.go +++ b/x/feemarket/types/feemarket.go @@ -4,12 +4,13 @@ import ( "encoding/json" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/gogoproto/proto" ) // FeeMarketImplementation represents the interface of various FeeMarket types implemented // by other modules or packages. type FeeMarketImplementation interface { - // proto.Message TODO: add + proto.Message // ValidateBasic does a simple validation check that // doesn't require access to any other information. diff --git a/x/feemarket/types/feemarket.pb.go b/x/feemarket/types/feemarket.pb.go new file mode 100644 index 0000000..b3e9cc2 --- /dev/null +++ b/x/feemarket/types/feemarket.pb.go @@ -0,0 +1,327 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: feemarket/feemarket/v1/feemarket.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/codec/types" + proto "github.com/cosmos/gogoproto/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 + +// FeeMarket is the fee market implementation to be used by the x/feemarket +// module. +type FeeMarket struct { + // Implementation is a byte array that must implement + // x/feemarket/types/FeeMarketImplementation + Implementation []byte `protobuf:"bytes,1,opt,name=implementation,proto3" json:"implementation,omitempty"` +} + +func (m *FeeMarket) Reset() { *m = FeeMarket{} } +func (m *FeeMarket) String() string { return proto.CompactTextString(m) } +func (*FeeMarket) ProtoMessage() {} +func (*FeeMarket) Descriptor() ([]byte, []int) { + return fileDescriptor_515665ad4a4fc434, []int{0} +} +func (m *FeeMarket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FeeMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FeeMarket.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 *FeeMarket) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeeMarket.Merge(m, src) +} +func (m *FeeMarket) XXX_Size() int { + return m.Size() +} +func (m *FeeMarket) XXX_DiscardUnknown() { + xxx_messageInfo_FeeMarket.DiscardUnknown(m) +} + +var xxx_messageInfo_FeeMarket proto.InternalMessageInfo + +func (m *FeeMarket) GetImplementation() []byte { + if m != nil { + return m.Implementation + } + return nil +} + +func init() { + proto.RegisterType((*FeeMarket)(nil), "feemarket.feemarket.v1.FeeMarket") +} + +func init() { + proto.RegisterFile("feemarket/feemarket/v1/feemarket.proto", fileDescriptor_515665ad4a4fc434) +} + +var fileDescriptor_515665ad4a4fc434 = []byte{ + // 207 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4b, 0x4b, 0x4d, 0xcd, + 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x47, 0xb0, 0xca, 0x0c, 0x11, 0x1c, 0xbd, 0x82, 0xa2, 0xfc, + 0x92, 0x7c, 0x21, 0x31, 0x84, 0x00, 0x82, 0x55, 0x66, 0x28, 0x25, 0x99, 0x9e, 0x9f, 0x9f, 0x9e, + 0x93, 0xaa, 0x0f, 0x56, 0x95, 0x54, 0x9a, 0xa6, 0x9f, 0x98, 0x57, 0x09, 0xd1, 0x22, 0x25, 0x99, + 0x9c, 0x5f, 0x9c, 0x9b, 0x5f, 0x1c, 0x0f, 0xe6, 0xe9, 0x43, 0x38, 0x10, 0x29, 0xa5, 0x74, 0x2e, + 0x4e, 0xb7, 0xd4, 0x54, 0x5f, 0xb0, 0x29, 0x42, 0x51, 0x5c, 0x7c, 0x99, 0xb9, 0x05, 0x39, 0xa9, + 0xb9, 0xa9, 0x79, 0x25, 0x89, 0x25, 0x99, 0xf9, 0x79, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x3c, 0x4e, + 0x46, 0xa7, 0xb6, 0xe8, 0xea, 0x61, 0xb7, 0x56, 0x0f, 0xae, 0xdb, 0x13, 0x45, 0x67, 0x10, 0x9a, + 0x49, 0x4e, 0x9e, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, + 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x9f, 0x9e, + 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x5f, 0x9c, 0x9d, 0x59, 0xa0, 0x9b, 0x9b, + 0x5a, 0x86, 0x14, 0x04, 0x15, 0x48, 0xec, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0xd3, + 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x28, 0x7e, 0x40, 0x2f, 0x32, 0x01, 0x00, 0x00, +} + +func (m *FeeMarket) 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 *FeeMarket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FeeMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Implementation) > 0 { + i -= len(m.Implementation) + copy(dAtA[i:], m.Implementation) + i = encodeVarintFeemarket(dAtA, i, uint64(len(m.Implementation))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintFeemarket(dAtA []byte, offset int, v uint64) int { + offset -= sovFeemarket(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *FeeMarket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Implementation) + if l > 0 { + n += 1 + l + sovFeemarket(uint64(l)) + } + return n +} + +func sovFeemarket(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozFeemarket(x uint64) (n int) { + return sovFeemarket(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *FeeMarket) 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 ErrIntOverflowFeemarket + } + 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: FeeMarket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FeeMarket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Implementation", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeemarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthFeemarket + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthFeemarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Implementation = append(m.Implementation[:0], dAtA[iNdEx:postIndex]...) + if m.Implementation == nil { + m.Implementation = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFeemarket(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFeemarket + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipFeemarket(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, ErrIntOverflowFeemarket + } + 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, ErrIntOverflowFeemarket + } + 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, ErrIntOverflowFeemarket + } + 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, ErrInvalidLengthFeemarket + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupFeemarket + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthFeemarket + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthFeemarket = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFeemarket = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupFeemarket = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/feemarket/types/genesis.pb.go b/x/feemarket/types/genesis.pb.go new file mode 100644 index 0000000..41dab0c --- /dev/null +++ b/x/feemarket/types/genesis.pb.go @@ -0,0 +1,545 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: feemarket/feemarket/v1/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/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 feemarket module's genesis state. +type GenesisState struct { + // Plugin is the FeeMarket implementation plugged into the feemarket module. + Plugin FeeMarket `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin"` + // Params are the parameters for the feemarket module. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +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_2180652c84279298, []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) GetPlugin() FeeMarket { + if m != nil { + return m.Plugin + } + return FeeMarket{} +} + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// Params defines the parameters for the feemarket module. +type Params struct { + // Enabled is a flag to enable or disable the feemarket module. + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_2180652c84279298, []int{1} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetEnabled() bool { + if m != nil { + return m.Enabled + } + return false +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "feemarket.feemarket.v1.GenesisState") + proto.RegisterType((*Params)(nil), "feemarket.feemarket.v1.Params") +} + +func init() { + proto.RegisterFile("feemarket/feemarket/v1/genesis.proto", fileDescriptor_2180652c84279298) +} + +var fileDescriptor_2180652c84279298 = []byte{ + // 259 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0x4b, 0x4d, 0xcd, + 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x47, 0xb0, 0xca, 0x0c, 0xf5, 0xd3, 0x53, 0xf3, 0x52, 0x8b, + 0x33, 0x8b, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0xc4, 0xe0, 0x72, 0x7a, 0x08, 0x56, 0x99, + 0xa1, 0x94, 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x58, 0x89, 0x3e, 0x88, 0x05, 0x51, 0x2d, 0x25, 0x99, + 0x9c, 0x5f, 0x9c, 0x9b, 0x5f, 0x1c, 0x0f, 0x91, 0x80, 0x70, 0xa0, 0x52, 0x6a, 0x38, 0xac, 0x43, + 0x98, 0x0a, 0x56, 0xa7, 0xd4, 0xcb, 0xc8, 0xc5, 0xe3, 0x0e, 0x71, 0x42, 0x70, 0x49, 0x62, 0x49, + 0xaa, 0x90, 0x3d, 0x17, 0x5b, 0x41, 0x4e, 0x69, 0x7a, 0x66, 0x9e, 0x04, 0xa3, 0x02, 0xa3, 0x06, + 0xb7, 0x91, 0xa2, 0x1e, 0x76, 0x27, 0xe9, 0xb9, 0xa5, 0xa6, 0xfa, 0x82, 0x39, 0x4e, 0x2c, 0x27, + 0xee, 0xc9, 0x33, 0x04, 0x41, 0xb5, 0x09, 0xd9, 0x70, 0xb1, 0x15, 0x24, 0x16, 0x25, 0xe6, 0x16, + 0x4b, 0x30, 0x81, 0x0d, 0x90, 0xc3, 0x65, 0x40, 0x00, 0x58, 0x15, 0x5c, 0x37, 0x98, 0xa7, 0xa4, + 0xc4, 0xc5, 0x06, 0x11, 0x17, 0x92, 0xe0, 0x62, 0x4f, 0xcd, 0x4b, 0x4c, 0xca, 0x49, 0x4d, 0x01, + 0xbb, 0x84, 0x23, 0x08, 0xc6, 0x75, 0xf2, 0x3c, 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, 0x28, 0xfd, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xe2, 0xec, + 0xcc, 0x02, 0xdd, 0xdc, 0xd4, 0x32, 0x24, 0xff, 0x57, 0x20, 0xb1, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, + 0x93, 0xd8, 0xc0, 0xa1, 0x60, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x27, 0x07, 0xda, 0xbd, 0x9e, + 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 + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Plugin.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 (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Enabled { + i-- + if m.Enabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + 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 + l = m.Plugin.Size() + n += 1 + l + sovGenesis(uint64(l)) + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Enabled { + n += 2 + } + 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 Plugin", 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 err := m.Plugin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", 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 err := m.Params.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 *Params) 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Enabled = bool(v != 0) + 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/x/feemarket/types/query.pb.go b/x/feemarket/types/query.pb.go new file mode 100644 index 0000000..07a4889 --- /dev/null +++ b/x/feemarket/types/query.pb.go @@ -0,0 +1,536 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: feemarket/feemarket/v1/query.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/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 + +// QueryParamsRequest is the request type for the Query/Params RPC method. +type ParamsRequest struct { +} + +func (m *ParamsRequest) Reset() { *m = ParamsRequest{} } +func (m *ParamsRequest) String() string { return proto.CompactTextString(m) } +func (*ParamsRequest) ProtoMessage() {} +func (*ParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d683b3b0d8494138, []int{0} +} +func (m *ParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ParamsRequest.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 *ParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ParamsRequest.Merge(m, src) +} +func (m *ParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *ParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is the response type for the Query/Params RPC method. +type ParamsResponse struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *ParamsResponse) Reset() { *m = ParamsResponse{} } +func (m *ParamsResponse) String() string { return proto.CompactTextString(m) } +func (*ParamsResponse) ProtoMessage() {} +func (*ParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d683b3b0d8494138, []int{1} +} +func (m *ParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ParamsResponse.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 *ParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ParamsResponse.Merge(m, src) +} +func (m *ParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *ParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ParamsResponse proto.InternalMessageInfo + +func (m *ParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*ParamsRequest)(nil), "feemarket.feemarket.v1.ParamsRequest") + proto.RegisterType((*ParamsResponse)(nil), "feemarket.feemarket.v1.ParamsResponse") +} + +func init() { + proto.RegisterFile("feemarket/feemarket/v1/query.proto", fileDescriptor_d683b3b0d8494138) +} + +var fileDescriptor_d683b3b0d8494138 = []byte{ + // 277 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4a, 0x4b, 0x4d, 0xcd, + 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x47, 0xb0, 0xca, 0x0c, 0xf5, 0x0b, 0x4b, 0x53, 0x8b, 0x2a, + 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0xc4, 0xe0, 0x32, 0x7a, 0x08, 0x56, 0x99, 0xa1, 0x94, + 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x58, 0x89, 0x3e, 0x88, 0x05, 0x51, 0x2d, 0x25, 0x93, 0x9e, 0x9f, + 0x9f, 0x9e, 0x93, 0xaa, 0x9f, 0x58, 0x90, 0xa9, 0x9f, 0x98, 0x97, 0x97, 0x5f, 0x92, 0x58, 0x92, + 0x99, 0x9f, 0x57, 0x0c, 0x95, 0x55, 0xc1, 0x61, 0x5f, 0x7a, 0x6a, 0x5e, 0x6a, 0x71, 0x26, 0x54, + 0x95, 0x12, 0x3f, 0x17, 0x6f, 0x40, 0x62, 0x51, 0x62, 0x6e, 0x71, 0x50, 0x6a, 0x61, 0x69, 0x6a, + 0x71, 0x89, 0x92, 0x1f, 0x17, 0x1f, 0x4c, 0xa0, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x55, 0xc8, 0x86, + 0x8b, 0xad, 0x00, 0x2c, 0x22, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa7, 0x87, 0xdd, 0x95, + 0x7a, 0x10, 0x7d, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, 0x41, 0xf5, 0x18, 0x75, 0x30, 0x72, + 0xb1, 0x06, 0x82, 0xbc, 0x28, 0x54, 0xcf, 0xc5, 0x06, 0x51, 0x21, 0xa4, 0x8a, 0xdf, 0x04, 0xa8, + 0x53, 0xa4, 0xd4, 0x08, 0x29, 0x83, 0x38, 0x50, 0x49, 0xad, 0xe9, 0xf2, 0x93, 0xc9, 0x4c, 0x0a, + 0x42, 0x72, 0xfa, 0x38, 0xbc, 0x0c, 0x71, 0x8a, 0x93, 0xe7, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, + 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, + 0x1e, 0xcb, 0x31, 0x44, 0xe9, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, + 0x17, 0x67, 0x67, 0x16, 0xe8, 0xe6, 0xa6, 0x96, 0x21, 0x19, 0x51, 0x81, 0xc4, 0x2e, 0xa9, 0x2c, + 0x48, 0x2d, 0x4e, 0x62, 0x03, 0x87, 0x9e, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x31, 0xbb, + 0xa1, 0xd5, 0x01, 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 { + // Params returns the current feemarket module parameters. + Params(ctx context.Context, in *ParamsRequest, opts ...grpc.CallOption) (*ParamsResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *ParamsRequest, opts ...grpc.CallOption) (*ParamsResponse, error) { + out := new(ParamsResponse) + err := c.cc.Invoke(ctx, "/feemarket.feemarket.v1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Params returns the current feemarket module parameters. + Params(context.Context, *ParamsRequest) (*ParamsResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *ParamsRequest) (*ParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/feemarket.feemarket.v1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*ParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "feemarket.feemarket.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "feemarket/feemarket/v1/query.proto", +} + +func (m *ParamsRequest) 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 *ParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ParamsResponse) 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 *ParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.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 *ParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.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 *ParamsRequest) 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: ParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParamsRequest: 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 *ParamsResponse) 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: ParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", 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 err := m.Params.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/x/feemarket/types/query.pb.gw.go b/x/feemarket/types/query.pb.gw.go new file mode 100644 index 0000000..a0bfb41 --- /dev/null +++ b/x/feemarket/types/query.pb.gw.go @@ -0,0 +1,153 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: feemarket/feemarket/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/metadata" + "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 _ = metadata.Join + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(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 to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + 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_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_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_Params_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_Params_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_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 0, 2, 1, 2, 2}, []string{"feemarket", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage +) diff --git a/x/feemarket/types/tx.pb.go b/x/feemarket/types/tx.pb.go new file mode 100644 index 0000000..d7b97b0 --- /dev/null +++ b/x/feemarket/types/tx.pb.go @@ -0,0 +1,593 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: feemarket/feemarket/v1/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/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 + +// MsgParams defines the Msg/Params request type. It contains the +// new parameters for the feemarket module. +type MsgParams struct { + // Params defines the new parameters for the feemarket module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + // Authority defines the authority that is updating the feemarket module + // parameters. + Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` +} + +func (m *MsgParams) Reset() { *m = MsgParams{} } +func (m *MsgParams) String() string { return proto.CompactTextString(m) } +func (*MsgParams) ProtoMessage() {} +func (*MsgParams) Descriptor() ([]byte, []int) { + return fileDescriptor_1bbf67a633e47917, []int{0} +} +func (m *MsgParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgParams.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 *MsgParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgParams.Merge(m, src) +} +func (m *MsgParams) XXX_Size() int { + return m.Size() +} +func (m *MsgParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgParams proto.InternalMessageInfo + +func (m *MsgParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func (m *MsgParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +// MsgParamsResponse defines the Msg/Params response type. +type MsgParamsResponse struct { +} + +func (m *MsgParamsResponse) Reset() { *m = MsgParamsResponse{} } +func (m *MsgParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgParamsResponse) ProtoMessage() {} +func (*MsgParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1bbf67a633e47917, []int{1} +} +func (m *MsgParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgParamsResponse.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 *MsgParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgParamsResponse.Merge(m, src) +} +func (m *MsgParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgParamsResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgParams)(nil), "feemarket.feemarket.v1.MsgParams") + proto.RegisterType((*MsgParamsResponse)(nil), "feemarket.feemarket.v1.MsgParamsResponse") +} + +func init() { proto.RegisterFile("feemarket/feemarket/v1/tx.proto", fileDescriptor_1bbf67a633e47917) } + +var fileDescriptor_1bbf67a633e47917 = []byte{ + // 325 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0x4b, 0x4d, 0xcd, + 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x47, 0xb0, 0xca, 0x0c, 0xf5, 0x4b, 0x2a, 0xf4, 0x0a, 0x8a, + 0xf2, 0x4b, 0xf2, 0x85, 0xc4, 0xe0, 0xc2, 0x7a, 0x08, 0x56, 0x99, 0xa1, 0x94, 0x0a, 0x0e, 0x8d, + 0xe9, 0xa9, 0x79, 0xa9, 0xc5, 0x99, 0xc5, 0x10, 0xdd, 0x52, 0x92, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, + 0xc5, 0xf1, 0x60, 0x9e, 0x3e, 0x84, 0x03, 0x95, 0x12, 0x87, 0xf0, 0xf4, 0x73, 0x8b, 0xd3, 0x41, + 0xfa, 0x72, 0x8b, 0xd3, 0xa1, 0x12, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x10, 0x0d, 0x20, 0x16, 0x44, + 0x54, 0x69, 0x0a, 0x23, 0x17, 0xa7, 0x6f, 0x71, 0x7a, 0x40, 0x62, 0x51, 0x62, 0x6e, 0xb1, 0x90, + 0x0d, 0x17, 0x5b, 0x01, 0x98, 0x25, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa7, 0x87, 0xdd, + 0x99, 0x7a, 0x10, 0xf5, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, 0x41, 0xf5, 0x08, 0x99, 0x71, + 0x71, 0x26, 0x96, 0x96, 0x64, 0xe4, 0x17, 0x65, 0x96, 0x54, 0x4a, 0x30, 0x29, 0x30, 0x6a, 0x70, + 0x3a, 0x49, 0x5c, 0xda, 0xa2, 0x2b, 0x02, 0x75, 0x9f, 0x63, 0x4a, 0x4a, 0x51, 0x6a, 0x71, 0x71, + 0x70, 0x49, 0x51, 0x66, 0x5e, 0x7a, 0x10, 0x42, 0xa9, 0x95, 0x60, 0xd3, 0xf3, 0x0d, 0x5a, 0x3c, + 0x69, 0x45, 0xf9, 0xb9, 0xf1, 0x89, 0x10, 0x35, 0x4a, 0xc2, 0x5c, 0x82, 0x70, 0x57, 0x05, 0xa5, + 0x16, 0x17, 0xe4, 0xe7, 0x15, 0xa7, 0x1a, 0xa5, 0x70, 0x31, 0xfb, 0x16, 0xa7, 0x0b, 0x85, 0x71, + 0xb1, 0x41, 0x9d, 0xab, 0x88, 0xcb, 0x79, 0x70, 0xbd, 0x52, 0x9a, 0x04, 0x95, 0xc0, 0x8c, 0x97, + 0x62, 0x6d, 0x78, 0xbe, 0x41, 0x8b, 0xd1, 0xc9, 0xf3, 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, 0xa2, 0xf4, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x8b, + 0xb3, 0x33, 0x0b, 0x74, 0x73, 0x53, 0xcb, 0x90, 0x62, 0xa9, 0x02, 0x89, 0x5d, 0x52, 0x59, 0x90, + 0x5a, 0x9c, 0xc4, 0x06, 0x0e, 0x63, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2a, 0xdd, 0xc1, + 0x8e, 0x0e, 0x02, 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 { + // Params defines a method for updating the feemarket module parameters. + Params(ctx context.Context, in *MsgParams, opts ...grpc.CallOption) (*MsgParamsResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) Params(ctx context.Context, in *MsgParams, opts ...grpc.CallOption) (*MsgParamsResponse, error) { + out := new(MsgParamsResponse) + err := c.cc.Invoke(ctx, "/feemarket.feemarket.v1.Msg/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // Params defines a method for updating the feemarket module parameters. + Params(context.Context, *MsgParams) (*MsgParamsResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) Params(ctx context.Context, req *MsgParams) (*MsgParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/feemarket.feemarket.v1.Msg/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Params(ctx, req.(*MsgParams)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "feemarket.feemarket.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Msg_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "feemarket/feemarket/v1/tx.proto", +} + +func (m *MsgParams) 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 *MsgParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.Params.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 *MsgParamsResponse) 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 *MsgParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgParamsResponse) 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 *MsgParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgParamsResponse) 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 *MsgParams) 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: MsgParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = 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 *MsgParamsResponse) 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: MsgParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgParamsResponse: 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") +)