From cd380478855bf40ed84503aab63dd19d89f4d48c Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Fri, 22 Mar 2024 14:29:22 +0100 Subject: [PATCH 01/10] feat: reards auction proto --- proto/umee/auction/v1/auction.proto | 15 + proto/umee/auction/v1/genesis.proto | 19 + proto/umee/auction/v1/query.proto | 40 ++ proto/umee/auction/v1/tx.proto | 49 ++ proto/umee/ugov/v1/tx.proto | 2 +- x/auction/auction.pb.go | 327 +++++++++ x/auction/genesis.pb.go | 450 ++++++++++++ x/auction/query.pb.go | 1005 ++++++++++++++++++++++++++ x/auction/query.pb.gw.go | 254 +++++++ x/auction/tx.pb.go | 1007 +++++++++++++++++++++++++++ 10 files changed, 3167 insertions(+), 1 deletion(-) create mode 100644 proto/umee/auction/v1/auction.proto create mode 100644 proto/umee/auction/v1/genesis.proto create mode 100644 proto/umee/auction/v1/query.proto create mode 100644 proto/umee/auction/v1/tx.proto create mode 100644 x/auction/auction.pb.go create mode 100644 x/auction/genesis.pb.go create mode 100644 x/auction/query.pb.go create mode 100644 x/auction/query.pb.gw.go create mode 100644 x/auction/tx.pb.go diff --git a/proto/umee/auction/v1/auction.proto b/proto/umee/auction/v1/auction.proto new file mode 100644 index 0000000000..fd193320fe --- /dev/null +++ b/proto/umee/auction/v1/auction.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; +package umee.auction.v1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/umee-network/umee/v6/x/auction"; +option (gogoproto.goproto_getters_all) = false; + +// RewardsParams defines parameters for the rewards auction. +message RewardsParams { + // auction_duration is duration in seconds. + int64 auction_duration = 1; + // min_bid_increment (nominal) in the base denom for each consequitive bid. + int64 min_bid_increment = 2; +} diff --git a/proto/umee/auction/v1/genesis.proto b/proto/umee/auction/v1/genesis.proto new file mode 100644 index 0000000000..2e0eccac60 --- /dev/null +++ b/proto/umee/auction/v1/genesis.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; +package umee.auction.v1; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "umee/auction/v1/auction.proto"; + +option go_package = "github.com/umee-network/umee/v6/x/auction"; + +option (gogoproto.goproto_getters_all) = false; +// option (gogoproto.equal_all) = false; + +// GenesisState defines the x/auction module's genesis state. +message GenesisState { + RewardsParams rewards_params = 1 [(gogoproto.nullable) = false]; + uint64 reward_round = 2; + string highest_bidder = 3; + repeated cosmos.base.v1beta1.Coin reward_tokens = 4 [(gogoproto.nullable) = false]; +} diff --git a/proto/umee/auction/v1/query.proto b/proto/umee/auction/v1/query.proto new file mode 100644 index 0000000000..76cdded4b6 --- /dev/null +++ b/proto/umee/auction/v1/query.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; +package umee.auction.v1; + +import "google/api/annotations.proto"; +import "gogoproto/gogo.proto"; +import "umee/auction/v1/auction.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/umee-network/umee/v6/x/auction"; + +// Query defines the gRPC querier service. +service Query { + // RewardParams queries parameters for the reward auciton. + rpc RewardParams(QueryRewardParams) returns (QueryRewardParamsResp) { + option (google.api.http).get = "/umee/auction/v1/rewards/params"; + } + // RewardAuction queries the information of the auction by ID. If ID is ommitted, returns + // current reward auction params. + rpc RewardAuction(QueryRewardAuction) returns (QueryRewardAuctionResp) { + option (google.api.http).get = "/umee/auction/v1/rewards/{id}"; + } +} + +message QueryRewardParams {} + +message QueryRewardParamsResp { + RewardsParams params = 1 [(gogoproto.nullable) = false]; +} + +message QueryRewardAuction { + // If zero or not present, the current auction is returned + uint32 id = 1; +} + +message QueryRewardAuctionResp { + uint32 id = 1; + // highest bidder + string bidder = 2; + repeated cosmos.base.v1beta1.Coin rewards = 3 [(gogoproto.nullable) = false]; +} diff --git a/proto/umee/auction/v1/tx.proto b/proto/umee/auction/v1/tx.proto new file mode 100644 index 0000000000..f5023016fa --- /dev/null +++ b/proto/umee/auction/v1/tx.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; +package umee.auction.v1; + +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/msg/v1/msg.proto"; +import "gogoproto/gogo.proto"; +import "umee/auction/v1/auction.proto"; + +option go_package = "github.com/umee-network/umee/v6/x/auction"; +option (gogoproto.goproto_getters_all) = false; + +// Msg defines the x/auction module's Msg service. +service Msg { + // + // Rewards auction: bid umee for protocol rewards + // + + rpc GovSetRewardsParams(MsgGovSetRewardsParams) returns (MsgGovSetRewardsParamsResp); + rpc RewardsBid(MsgRewardsBid) returns (MsgRewardsBidResp); +} + +// MsgGovSetRewardsParams updates rewards parameters. +message MsgGovSetRewardsParams { + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + option (cosmos.msg.v1.signer) = "authority"; + + // authority must be the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + RewardsParams params = 2 [(gogoproto.nullable) = false]; +} + +// MsgGovSetRewardsParamsResp defines the Msg/GovSetRewardsParams response type. +message MsgGovSetRewardsParamsResp {} + +// MsgRewardsBid places a bid for a reword auction. +message MsgRewardsBid { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + string sender = 1; + // amount of the bid in the base tokens + cosmos.base.v1beta1.Coin bid_amount = 2 [(gogoproto.nullable) = false]; + // the current auction ID being bid on. Fails if the ID is not an ID of the current auction. + uint32 id = 3; +} + +// MsgRewardsBidResp response type for Msg/RewardsBid +message MsgRewardsBidResp {} diff --git a/proto/umee/ugov/v1/tx.proto b/proto/umee/ugov/v1/tx.proto index 519d1e4203..3a669fd7d3 100644 --- a/proto/umee/ugov/v1/tx.proto +++ b/proto/umee/ugov/v1/tx.proto @@ -58,4 +58,4 @@ message MsgGovUpdateInflationParams { } // GovUpdateInflationParamsResponse response type. -message GovUpdateInflationParamsResponse {} \ No newline at end of file +message GovUpdateInflationParamsResponse {} diff --git a/x/auction/auction.pb.go b/x/auction/auction.pb.go new file mode 100644 index 0000000000..e1a635970a --- /dev/null +++ b/x/auction/auction.pb.go @@ -0,0 +1,327 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: umee/auction/v1/auction.proto + +package auction + +import ( + fmt "fmt" + _ "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 + +// RewardsParams defines parameters for the rewards auction. +type RewardsParams struct { + // auction_duration is duration in seconds. + AuctionDuration int64 `protobuf:"varint,1,opt,name=auction_duration,json=auctionDuration,proto3" json:"auction_duration,omitempty"` + // min_bid_increment (nominal) in the base denom for each consequitive bid. + MinBidIncrement int64 `protobuf:"varint,2,opt,name=min_bid_increment,json=minBidIncrement,proto3" json:"min_bid_increment,omitempty"` +} + +func (m *RewardsParams) Reset() { *m = RewardsParams{} } +func (m *RewardsParams) String() string { return proto.CompactTextString(m) } +func (*RewardsParams) ProtoMessage() {} +func (*RewardsParams) Descriptor() ([]byte, []int) { + return fileDescriptor_7a7eec280427e7e3, []int{0} +} +func (m *RewardsParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RewardsParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RewardsParams.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 *RewardsParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_RewardsParams.Merge(m, src) +} +func (m *RewardsParams) XXX_Size() int { + return m.Size() +} +func (m *RewardsParams) XXX_DiscardUnknown() { + xxx_messageInfo_RewardsParams.DiscardUnknown(m) +} + +var xxx_messageInfo_RewardsParams proto.InternalMessageInfo + +func init() { + proto.RegisterType((*RewardsParams)(nil), "umee.auction.v1.RewardsParams") +} + +func init() { proto.RegisterFile("umee/auction/v1/auction.proto", fileDescriptor_7a7eec280427e7e3) } + +var fileDescriptor_7a7eec280427e7e3 = []byte{ + // 216 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2d, 0xcd, 0x4d, 0x4d, + 0xd5, 0x4f, 0x2c, 0x4d, 0x2e, 0xc9, 0xcc, 0xcf, 0xd3, 0x2f, 0x33, 0x84, 0x31, 0xf5, 0x0a, 0x8a, + 0xf2, 0x4b, 0xf2, 0x85, 0xf8, 0x41, 0xd2, 0x7a, 0x30, 0xb1, 0x32, 0x43, 0x29, 0x91, 0xf4, 0xfc, + 0xf4, 0x7c, 0xb0, 0x9c, 0x3e, 0x88, 0x05, 0x51, 0xa6, 0x94, 0xc6, 0xc5, 0x1b, 0x94, 0x5a, 0x9e, + 0x58, 0x94, 0x52, 0x1c, 0x90, 0x58, 0x94, 0x98, 0x5b, 0x2c, 0xa4, 0xc9, 0x25, 0x00, 0xd5, 0x14, + 0x9f, 0x52, 0x5a, 0x94, 0x08, 0x62, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x30, 0x07, 0xf1, 0x43, 0xc5, + 0x5d, 0xa0, 0xc2, 0x42, 0x5a, 0x5c, 0x82, 0xb9, 0x99, 0x79, 0xf1, 0x49, 0x99, 0x29, 0xf1, 0x99, + 0x79, 0xc9, 0x45, 0xa9, 0xb9, 0xa9, 0x79, 0x25, 0x12, 0x4c, 0x10, 0xb5, 0xb9, 0x99, 0x79, 0x4e, + 0x99, 0x29, 0x9e, 0x30, 0x61, 0x27, 0xf7, 0x13, 0x0f, 0xe5, 0x18, 0x4e, 0x3c, 0x92, 0x63, 0xbc, + 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, + 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x33, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, + 0x57, 0x1f, 0xe4, 0x6e, 0xdd, 0xbc, 0xd4, 0x92, 0xf2, 0xfc, 0xa2, 0x6c, 0x30, 0x47, 0xbf, 0xcc, + 0x4c, 0xbf, 0x02, 0xe6, 0xbb, 0x24, 0x36, 0xb0, 0xbb, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x26, 0xc1, 0xf4, 0x0e, 0xff, 0x00, 0x00, 0x00, +} + +func (m *RewardsParams) 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 *RewardsParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RewardsParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MinBidIncrement != 0 { + i = encodeVarintAuction(dAtA, i, uint64(m.MinBidIncrement)) + i-- + dAtA[i] = 0x10 + } + if m.AuctionDuration != 0 { + i = encodeVarintAuction(dAtA, i, uint64(m.AuctionDuration)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintAuction(dAtA []byte, offset int, v uint64) int { + offset -= sovAuction(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *RewardsParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AuctionDuration != 0 { + n += 1 + sovAuction(uint64(m.AuctionDuration)) + } + if m.MinBidIncrement != 0 { + n += 1 + sovAuction(uint64(m.MinBidIncrement)) + } + return n +} + +func sovAuction(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAuction(x uint64) (n int) { + return sovAuction(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *RewardsParams) 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 ErrIntOverflowAuction + } + 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: RewardsParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RewardsParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AuctionDuration", wireType) + } + m.AuctionDuration = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AuctionDuration |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinBidIncrement", wireType) + } + m.MinBidIncrement = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MinBidIncrement |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipAuction(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAuction + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAuction(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, ErrIntOverflowAuction + } + 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, ErrIntOverflowAuction + } + 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, ErrIntOverflowAuction + } + 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, ErrInvalidLengthAuction + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAuction + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAuction + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAuction = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAuction = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAuction = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/auction/genesis.pb.go b/x/auction/genesis.pb.go new file mode 100644 index 0000000000..f6b51b2d6e --- /dev/null +++ b/x/auction/genesis.pb.go @@ -0,0 +1,450 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: umee/auction/v1/genesis.proto + +package auction + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + _ "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 x/auction module's genesis state. +type GenesisState struct { + RewardsParams RewardsParams `protobuf:"bytes,1,opt,name=rewards_params,json=rewardsParams,proto3" json:"rewards_params"` + RewardRound uint64 `protobuf:"varint,2,opt,name=reward_round,json=rewardRound,proto3" json:"reward_round,omitempty"` + HighestBidder string `protobuf:"bytes,3,opt,name=highest_bidder,json=highestBidder,proto3" json:"highest_bidder,omitempty"` + RewardTokens []types.Coin `protobuf:"bytes,4,rep,name=reward_tokens,json=rewardTokens,proto3" json:"reward_tokens"` +} + +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_15e83c50dcf6ac7b, []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), "umee.auction.v1.GenesisState") +} + +func init() { proto.RegisterFile("umee/auction/v1/genesis.proto", fileDescriptor_15e83c50dcf6ac7b) } + +var fileDescriptor_15e83c50dcf6ac7b = []byte{ + // 330 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xcf, 0x4a, 0xf4, 0x30, + 0x14, 0xc5, 0x9b, 0x6f, 0x86, 0x0f, 0xec, 0xfc, 0x11, 0x8a, 0x8b, 0x3a, 0x60, 0xac, 0x82, 0x50, + 0x17, 0x26, 0x74, 0x04, 0x1f, 0x60, 0x14, 0x66, 0xe1, 0x46, 0xaa, 0x2b, 0x37, 0x25, 0x6d, 0x43, + 0x27, 0x0c, 0x4d, 0x86, 0x24, 0xed, 0xf8, 0x18, 0x3e, 0xd6, 0x2c, 0x67, 0xe9, 0x4a, 0x74, 0xba, + 0xf4, 0x25, 0xa4, 0x69, 0x06, 0x44, 0x77, 0x37, 0xbf, 0x73, 0xef, 0x3d, 0x37, 0xc7, 0x3d, 0xa9, + 0x4a, 0x4a, 0x31, 0xa9, 0x32, 0xcd, 0x04, 0xc7, 0x75, 0x84, 0x0b, 0xca, 0xa9, 0x62, 0x0a, 0xad, + 0xa4, 0xd0, 0xc2, 0x3b, 0x6c, 0x65, 0x64, 0x65, 0x54, 0x47, 0x13, 0x98, 0x09, 0x55, 0x0a, 0x85, + 0x53, 0xa2, 0x28, 0xae, 0xa3, 0x94, 0x6a, 0x12, 0xe1, 0x4c, 0x30, 0xde, 0x0d, 0x4c, 0x8e, 0x0a, + 0x51, 0x08, 0x53, 0xe2, 0xb6, 0xb2, 0xf4, 0x8f, 0xcb, 0x7e, 0xa3, 0x91, 0xcf, 0xbf, 0x80, 0x3b, + 0x9c, 0x77, 0xbe, 0x8f, 0x9a, 0x68, 0xea, 0xdd, 0xbb, 0x63, 0x49, 0xd7, 0x44, 0xe6, 0x2a, 0x59, + 0x11, 0x49, 0x4a, 0xe5, 0x83, 0x00, 0x84, 0x83, 0x29, 0x44, 0xbf, 0xee, 0x41, 0x71, 0xd7, 0xf6, + 0x60, 0xba, 0x66, 0xfd, 0xcd, 0xfb, 0xa9, 0x13, 0x8f, 0xe4, 0x4f, 0xe8, 0x9d, 0xb9, 0xc3, 0x0e, + 0x24, 0x52, 0x54, 0x3c, 0xf7, 0xff, 0x05, 0x20, 0xec, 0xc7, 0x83, 0x8e, 0xc5, 0x2d, 0xf2, 0x2e, + 0xdc, 0xf1, 0x82, 0x15, 0x0b, 0xaa, 0x74, 0x92, 0xb2, 0x3c, 0xa7, 0xd2, 0xef, 0x05, 0x20, 0x3c, + 0x88, 0x47, 0x96, 0xce, 0x0c, 0xf4, 0xee, 0x5c, 0xbb, 0x3a, 0xd1, 0x62, 0x49, 0xb9, 0xf2, 0xfb, + 0x41, 0x2f, 0x1c, 0x4c, 0x8f, 0x51, 0x17, 0x0a, 0x6a, 0x43, 0x41, 0x36, 0x14, 0x74, 0x2b, 0x18, + 0xb7, 0x07, 0x59, 0xff, 0x27, 0x33, 0x34, 0x9b, 0x6f, 0x3e, 0xa1, 0xb3, 0xd9, 0x41, 0xb0, 0xdd, + 0x41, 0xf0, 0xb1, 0x83, 0xe0, 0xb5, 0x81, 0xce, 0xb6, 0x81, 0xce, 0x5b, 0x03, 0x9d, 0xe7, 0xcb, + 0x82, 0xe9, 0x45, 0x95, 0xa2, 0x4c, 0x94, 0xb8, 0xfd, 0xec, 0x15, 0xa7, 0x7a, 0x2d, 0xe4, 0xd2, + 0x3c, 0x70, 0x7d, 0x83, 0x5f, 0xf6, 0xe1, 0xa5, 0xff, 0x4d, 0x7a, 0xd7, 0xdf, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x4d, 0x7d, 0x55, 0xa3, 0xc4, 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.RewardTokens) > 0 { + for iNdEx := len(m.RewardTokens) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RewardTokens[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.HighestBidder) > 0 { + i -= len(m.HighestBidder) + copy(dAtA[i:], m.HighestBidder) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.HighestBidder))) + i-- + dAtA[i] = 0x1a + } + if m.RewardRound != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.RewardRound)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.RewardsParams.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 + 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.RewardsParams.Size() + n += 1 + l + sovGenesis(uint64(l)) + if m.RewardRound != 0 { + n += 1 + sovGenesis(uint64(m.RewardRound)) + } + l = len(m.HighestBidder) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if len(m.RewardTokens) > 0 { + for _, e := range m.RewardTokens { + l = e.Size() + n += 1 + l + sovGenesis(uint64(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 { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RewardsParams", 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.RewardsParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RewardRound", wireType) + } + m.RewardRound = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RewardRound |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HighestBidder", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HighestBidder = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RewardTokens", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RewardTokens = append(m.RewardTokens, types.Coin{}) + if err := m.RewardTokens[len(m.RewardTokens)-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 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/auction/query.pb.go b/x/auction/query.pb.go new file mode 100644 index 0000000000..66a8bdb71f --- /dev/null +++ b/x/auction/query.pb.go @@ -0,0 +1,1005 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: umee/auction/v1/query.proto + +package auction + +import ( + context "context" + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + _ "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 + +type QueryRewardParams struct { +} + +func (m *QueryRewardParams) Reset() { *m = QueryRewardParams{} } +func (m *QueryRewardParams) String() string { return proto.CompactTextString(m) } +func (*QueryRewardParams) ProtoMessage() {} +func (*QueryRewardParams) Descriptor() ([]byte, []int) { + return fileDescriptor_e1df854d377e58e5, []int{0} +} +func (m *QueryRewardParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryRewardParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryRewardParams.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 *QueryRewardParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRewardParams.Merge(m, src) +} +func (m *QueryRewardParams) XXX_Size() int { + return m.Size() +} +func (m *QueryRewardParams) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRewardParams.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryRewardParams proto.InternalMessageInfo + +type QueryRewardParamsResp struct { + Params RewardsParams `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryRewardParamsResp) Reset() { *m = QueryRewardParamsResp{} } +func (m *QueryRewardParamsResp) String() string { return proto.CompactTextString(m) } +func (*QueryRewardParamsResp) ProtoMessage() {} +func (*QueryRewardParamsResp) Descriptor() ([]byte, []int) { + return fileDescriptor_e1df854d377e58e5, []int{1} +} +func (m *QueryRewardParamsResp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryRewardParamsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryRewardParamsResp.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 *QueryRewardParamsResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRewardParamsResp.Merge(m, src) +} +func (m *QueryRewardParamsResp) XXX_Size() int { + return m.Size() +} +func (m *QueryRewardParamsResp) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRewardParamsResp.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryRewardParamsResp proto.InternalMessageInfo + +func (m *QueryRewardParamsResp) GetParams() RewardsParams { + if m != nil { + return m.Params + } + return RewardsParams{} +} + +type QueryRewardAuction struct { + // If zero or not present, the current auction is returned + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *QueryRewardAuction) Reset() { *m = QueryRewardAuction{} } +func (m *QueryRewardAuction) String() string { return proto.CompactTextString(m) } +func (*QueryRewardAuction) ProtoMessage() {} +func (*QueryRewardAuction) Descriptor() ([]byte, []int) { + return fileDescriptor_e1df854d377e58e5, []int{2} +} +func (m *QueryRewardAuction) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryRewardAuction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryRewardAuction.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 *QueryRewardAuction) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRewardAuction.Merge(m, src) +} +func (m *QueryRewardAuction) XXX_Size() int { + return m.Size() +} +func (m *QueryRewardAuction) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRewardAuction.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryRewardAuction proto.InternalMessageInfo + +func (m *QueryRewardAuction) GetId() uint32 { + if m != nil { + return m.Id + } + return 0 +} + +type QueryRewardAuctionResp struct { + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // highest bidder + Bidder string `protobuf:"bytes,2,opt,name=bidder,proto3" json:"bidder,omitempty"` + Rewards []types.Coin `protobuf:"bytes,3,rep,name=rewards,proto3" json:"rewards"` +} + +func (m *QueryRewardAuctionResp) Reset() { *m = QueryRewardAuctionResp{} } +func (m *QueryRewardAuctionResp) String() string { return proto.CompactTextString(m) } +func (*QueryRewardAuctionResp) ProtoMessage() {} +func (*QueryRewardAuctionResp) Descriptor() ([]byte, []int) { + return fileDescriptor_e1df854d377e58e5, []int{3} +} +func (m *QueryRewardAuctionResp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryRewardAuctionResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryRewardAuctionResp.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 *QueryRewardAuctionResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRewardAuctionResp.Merge(m, src) +} +func (m *QueryRewardAuctionResp) XXX_Size() int { + return m.Size() +} +func (m *QueryRewardAuctionResp) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRewardAuctionResp.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryRewardAuctionResp proto.InternalMessageInfo + +func (m *QueryRewardAuctionResp) GetId() uint32 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *QueryRewardAuctionResp) GetBidder() string { + if m != nil { + return m.Bidder + } + return "" +} + +func (m *QueryRewardAuctionResp) GetRewards() []types.Coin { + if m != nil { + return m.Rewards + } + return nil +} + +func init() { + proto.RegisterType((*QueryRewardParams)(nil), "umee.auction.v1.QueryRewardParams") + proto.RegisterType((*QueryRewardParamsResp)(nil), "umee.auction.v1.QueryRewardParamsResp") + proto.RegisterType((*QueryRewardAuction)(nil), "umee.auction.v1.QueryRewardAuction") + proto.RegisterType((*QueryRewardAuctionResp)(nil), "umee.auction.v1.QueryRewardAuctionResp") +} + +func init() { proto.RegisterFile("umee/auction/v1/query.proto", fileDescriptor_e1df854d377e58e5) } + +var fileDescriptor_e1df854d377e58e5 = []byte{ + // 417 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xcb, 0xae, 0xd3, 0x30, + 0x14, 0x8c, 0x73, 0xa1, 0x08, 0x5f, 0x2e, 0x08, 0x03, 0x55, 0x09, 0xd4, 0x2d, 0xe1, 0xd1, 0xb2, + 0xc0, 0x56, 0x8a, 0x84, 0x84, 0xc4, 0x86, 0xf6, 0x07, 0x20, 0x12, 0x1b, 0x76, 0x4e, 0x62, 0x05, + 0x0b, 0x12, 0x87, 0xbc, 0x0a, 0xaa, 0xd8, 0x00, 0x1f, 0x80, 0x04, 0x1f, 0xd5, 0x65, 0x25, 0x36, + 0xac, 0x10, 0x6a, 0xf9, 0x10, 0x14, 0xdb, 0x95, 0x4a, 0x22, 0x1e, 0x3b, 0xdb, 0x33, 0x67, 0xce, + 0xcc, 0x24, 0xf0, 0x5a, 0x95, 0x70, 0x4e, 0x59, 0x15, 0x96, 0x42, 0xa6, 0xb4, 0xf6, 0xe8, 0xeb, + 0x8a, 0xe7, 0x6f, 0x49, 0x96, 0xcb, 0x52, 0xa2, 0x0b, 0x0d, 0x48, 0x0c, 0x48, 0x6a, 0xcf, 0xb9, + 0x1e, 0x4b, 0x19, 0xbf, 0xe2, 0x94, 0x65, 0x82, 0xb2, 0x34, 0x95, 0x25, 0x6b, 0x90, 0x42, 0xd3, + 0x9d, 0xcb, 0xb1, 0x8c, 0xa5, 0x3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df, 0x40, 0x23, 0xda, 0xfe, 0x7a, 0xc6, + 0x08, 0xd5, 0x95, 0xa1, 0x8f, 0x00, 0x9e, 0xfc, 0x5e, 0xd7, 0xcd, 0xbf, 0xad, 0x30, 0x24, 0x67, + 0xf2, 0x1f, 0x24, 0x65, 0xe4, 0xb6, 0x32, 0x32, 0x42, 0xc3, 0x3f, 0x1a, 0x59, 0x89, 0xe8, 0xdd, + 0x7c, 0xb1, 0xde, 0x62, 0xb0, 0xd9, 0x62, 0xf0, 0x63, 0x8b, 0xc1, 0xa7, 0x1d, 0xb6, 0x36, 0x3b, + 0x6c, 0x7d, 0xdb, 0x61, 0xeb, 0xf9, 0xdd, 0x58, 0x94, 0x2f, 0xaa, 0x80, 0x84, 0x32, 0x51, 0x12, + 0xf7, 0x52, 0x5e, 0x2e, 0x65, 0xfe, 0x52, 0xeb, 0xd5, 0x0f, 0xe8, 0x9b, 0xbd, 0x68, 0xd0, 0x53, + 0x7f, 0xdc, 0xfd, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x08, 0xd2, 0x5d, 0x38, 0x14, 0x03, 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 { + // RewardParams queries parameters for the reward auciton. + RewardParams(ctx context.Context, in *QueryRewardParams, opts ...grpc.CallOption) (*QueryRewardParamsResp, error) + // RewardAuction queries the information of the auction by ID. If ID is ommitted, returns + // current reward auction params. + RewardAuction(ctx context.Context, in *QueryRewardAuction, opts ...grpc.CallOption) (*QueryRewardAuctionResp, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) RewardParams(ctx context.Context, in *QueryRewardParams, opts ...grpc.CallOption) (*QueryRewardParamsResp, error) { + out := new(QueryRewardParamsResp) + err := c.cc.Invoke(ctx, "/umee.auction.v1.Query/RewardParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) RewardAuction(ctx context.Context, in *QueryRewardAuction, opts ...grpc.CallOption) (*QueryRewardAuctionResp, error) { + out := new(QueryRewardAuctionResp) + err := c.cc.Invoke(ctx, "/umee.auction.v1.Query/RewardAuction", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // RewardParams queries parameters for the reward auciton. + RewardParams(context.Context, *QueryRewardParams) (*QueryRewardParamsResp, error) + // RewardAuction queries the information of the auction by ID. If ID is ommitted, returns + // current reward auction params. + RewardAuction(context.Context, *QueryRewardAuction) (*QueryRewardAuctionResp, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) RewardParams(ctx context.Context, req *QueryRewardParams) (*QueryRewardParamsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method RewardParams not implemented") +} +func (*UnimplementedQueryServer) RewardAuction(ctx context.Context, req *QueryRewardAuction) (*QueryRewardAuctionResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method RewardAuction not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_RewardParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRewardParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).RewardParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umee.auction.v1.Query/RewardParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).RewardParams(ctx, req.(*QueryRewardParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_RewardAuction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRewardAuction) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).RewardAuction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umee.auction.v1.Query/RewardAuction", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).RewardAuction(ctx, req.(*QueryRewardAuction)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "umee.auction.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RewardParams", + Handler: _Query_RewardParams_Handler, + }, + { + MethodName: "RewardAuction", + Handler: _Query_RewardAuction_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "umee/auction/v1/query.proto", +} + +func (m *QueryRewardParams) 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 *QueryRewardParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRewardParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryRewardParamsResp) 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 *QueryRewardParamsResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRewardParamsResp) 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 (m *QueryRewardAuction) 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 *QueryRewardAuction) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRewardAuction) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Id != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryRewardAuctionResp) 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 *QueryRewardAuctionResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRewardAuctionResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Rewards) > 0 { + for iNdEx := len(m.Rewards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Bidder) > 0 { + i -= len(m.Bidder) + copy(dAtA[i:], m.Bidder) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Bidder))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + 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 *QueryRewardParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryRewardParamsResp) 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 (m *QueryRewardAuction) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuery(uint64(m.Id)) + } + return n +} + +func (m *QueryRewardAuctionResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuery(uint64(m.Id)) + } + l = len(m.Bidder) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.Rewards) > 0 { + for _, e := range m.Rewards { + l = e.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 *QueryRewardParams) 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: QueryRewardParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryRewardParams: 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 *QueryRewardParamsResp) 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: QueryRewardParamsResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryRewardParamsResp: 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 (m *QueryRewardAuction) 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: QueryRewardAuction: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryRewardAuction: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint32(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 (m *QueryRewardAuctionResp) 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: QueryRewardAuctionResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryRewardAuctionResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bidder", 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.Bidder = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rewards", 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.Rewards = append(m.Rewards, types.Coin{}) + if err := m.Rewards[len(m.Rewards)-1].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/auction/query.pb.gw.go b/x/auction/query.pb.gw.go new file mode 100644 index 0000000000..69c75cb489 --- /dev/null +++ b/x/auction/query.pb.gw.go @@ -0,0 +1,254 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: umee/auction/v1/query.proto + +/* +Package auction is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package auction + +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_RewardParams_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRewardParams + var metadata runtime.ServerMetadata + + msg, err := client.RewardParams(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_RewardParams_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRewardParams + var metadata runtime.ServerMetadata + + msg, err := server.RewardParams(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_RewardAuction_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRewardAuction + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint32(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.RewardAuction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_RewardAuction_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRewardAuction + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint32(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.RewardAuction(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_RewardParams_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_RewardParams_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_RewardParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_RewardAuction_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_RewardAuction_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_RewardAuction_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_RewardParams_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_RewardParams_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_RewardParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_RewardAuction_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_RewardAuction_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_RewardAuction_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_RewardParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"umee", "auction", "v1", "rewards", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_RewardAuction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"umee", "auction", "v1", "rewards", "id"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_RewardParams_0 = runtime.ForwardResponseMessage + + forward_Query_RewardAuction_0 = runtime.ForwardResponseMessage +) diff --git a/x/auction/tx.pb.go b/x/auction/tx.pb.go new file mode 100644 index 0000000000..cadeab8a55 --- /dev/null +++ b/x/auction/tx.pb.go @@ -0,0 +1,1007 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: umee/auction/v1/tx.proto + +package auction + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "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 + +// MsgGovSetRewardsParams updates rewards parameters. +type MsgGovSetRewardsParams struct { + // authority must be the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Params RewardsParams `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgGovSetRewardsParams) Reset() { *m = MsgGovSetRewardsParams{} } +func (m *MsgGovSetRewardsParams) String() string { return proto.CompactTextString(m) } +func (*MsgGovSetRewardsParams) ProtoMessage() {} +func (*MsgGovSetRewardsParams) Descriptor() ([]byte, []int) { + return fileDescriptor_44a5dea2889d94ea, []int{0} +} +func (m *MsgGovSetRewardsParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovSetRewardsParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovSetRewardsParams.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 *MsgGovSetRewardsParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovSetRewardsParams.Merge(m, src) +} +func (m *MsgGovSetRewardsParams) XXX_Size() int { + return m.Size() +} +func (m *MsgGovSetRewardsParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovSetRewardsParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovSetRewardsParams proto.InternalMessageInfo + +// MsgGovSetRewardsParamsResp defines the Msg/GovSetRewardsParams response type. +type MsgGovSetRewardsParamsResp struct { +} + +func (m *MsgGovSetRewardsParamsResp) Reset() { *m = MsgGovSetRewardsParamsResp{} } +func (m *MsgGovSetRewardsParamsResp) String() string { return proto.CompactTextString(m) } +func (*MsgGovSetRewardsParamsResp) ProtoMessage() {} +func (*MsgGovSetRewardsParamsResp) Descriptor() ([]byte, []int) { + return fileDescriptor_44a5dea2889d94ea, []int{1} +} +func (m *MsgGovSetRewardsParamsResp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovSetRewardsParamsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovSetRewardsParamsResp.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 *MsgGovSetRewardsParamsResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovSetRewardsParamsResp.Merge(m, src) +} +func (m *MsgGovSetRewardsParamsResp) XXX_Size() int { + return m.Size() +} +func (m *MsgGovSetRewardsParamsResp) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovSetRewardsParamsResp.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovSetRewardsParamsResp proto.InternalMessageInfo + +// MsgRewardsBid places a bid for a reword auction. +type MsgRewardsBid struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // amount of the bid in the base tokens + BidAmount types.Coin `protobuf:"bytes,2,opt,name=bid_amount,json=bidAmount,proto3" json:"bid_amount"` + // the current auction ID being bid on. Fails if the ID is not an ID of the current auction. + Id uint32 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *MsgRewardsBid) Reset() { *m = MsgRewardsBid{} } +func (m *MsgRewardsBid) String() string { return proto.CompactTextString(m) } +func (*MsgRewardsBid) ProtoMessage() {} +func (*MsgRewardsBid) Descriptor() ([]byte, []int) { + return fileDescriptor_44a5dea2889d94ea, []int{2} +} +func (m *MsgRewardsBid) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRewardsBid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRewardsBid.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 *MsgRewardsBid) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRewardsBid.Merge(m, src) +} +func (m *MsgRewardsBid) XXX_Size() int { + return m.Size() +} +func (m *MsgRewardsBid) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRewardsBid.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRewardsBid proto.InternalMessageInfo + +// MsgRewardsBidResp response type for Msg/RewardsBid +type MsgRewardsBidResp struct { +} + +func (m *MsgRewardsBidResp) Reset() { *m = MsgRewardsBidResp{} } +func (m *MsgRewardsBidResp) String() string { return proto.CompactTextString(m) } +func (*MsgRewardsBidResp) ProtoMessage() {} +func (*MsgRewardsBidResp) Descriptor() ([]byte, []int) { + return fileDescriptor_44a5dea2889d94ea, []int{3} +} +func (m *MsgRewardsBidResp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRewardsBidResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRewardsBidResp.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 *MsgRewardsBidResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRewardsBidResp.Merge(m, src) +} +func (m *MsgRewardsBidResp) XXX_Size() int { + return m.Size() +} +func (m *MsgRewardsBidResp) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRewardsBidResp.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRewardsBidResp proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgGovSetRewardsParams)(nil), "umee.auction.v1.MsgGovSetRewardsParams") + proto.RegisterType((*MsgGovSetRewardsParamsResp)(nil), "umee.auction.v1.MsgGovSetRewardsParamsResp") + proto.RegisterType((*MsgRewardsBid)(nil), "umee.auction.v1.MsgRewardsBid") + proto.RegisterType((*MsgRewardsBidResp)(nil), "umee.auction.v1.MsgRewardsBidResp") +} + +func init() { proto.RegisterFile("umee/auction/v1/tx.proto", fileDescriptor_44a5dea2889d94ea) } + +var fileDescriptor_44a5dea2889d94ea = []byte{ + // 463 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x31, 0x6f, 0x13, 0x31, + 0x14, 0xc7, 0xcf, 0x29, 0x8a, 0x88, 0x51, 0x41, 0x5c, 0xab, 0x70, 0x3d, 0x81, 0x13, 0xdd, 0x42, + 0x00, 0xd5, 0x56, 0x8a, 0xd4, 0xa1, 0x42, 0x48, 0x0d, 0x43, 0xa7, 0x48, 0xd5, 0x75, 0x63, 0xa9, + 0xee, 0x62, 0xcb, 0xb5, 0xaa, 0x3b, 0x47, 0xb6, 0xef, 0x5a, 0x46, 0x98, 0x18, 0xf9, 0x08, 0x9d, + 0x98, 0x19, 0xf8, 0x08, 0x0c, 0x19, 0x2b, 0x26, 0x26, 0x04, 0xc9, 0x00, 0x1f, 0x03, 0xf9, 0xce, + 0x55, 0x68, 0x38, 0xa1, 0x6e, 0xf7, 0xee, 0xef, 0xff, 0xff, 0xfd, 0xde, 0xb3, 0x61, 0x50, 0x64, + 0x8c, 0x91, 0xa4, 0x98, 0x18, 0x21, 0x73, 0x52, 0x0e, 0x89, 0x39, 0xc7, 0x53, 0x25, 0x8d, 0xf4, + 0xef, 0x59, 0x05, 0x3b, 0x05, 0x97, 0xc3, 0x10, 0x4d, 0xa4, 0xce, 0xa4, 0x26, 0x69, 0xa2, 0x19, + 0x29, 0x87, 0x29, 0x33, 0xc9, 0x90, 0x4c, 0xa4, 0xc8, 0x6b, 0x43, 0xb8, 0x55, 0xeb, 0xc7, 0x55, + 0x45, 0xea, 0xc2, 0x49, 0x0f, 0x9c, 0x35, 0xd3, 0xdc, 0xf6, 0xc8, 0x34, 0x77, 0xc2, 0x26, 0x97, + 0x5c, 0xd6, 0x06, 0xfb, 0xe5, 0xfe, 0x3e, 0x5a, 0x85, 0xba, 0xa2, 0xa8, 0xe4, 0xe8, 0x23, 0x80, + 0xdd, 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0xff, 0x14, 0x6e, 0x34, 0xed, 0xf8, 0xf1, 0x3f, + 0xbb, 0x69, 0x1e, 0x32, 0x7c, 0x76, 0xc3, 0x83, 0xb6, 0xa9, 0x7f, 0x08, 0xe1, 0x5f, 0x9b, 0x40, + 0x4d, 0xd6, 0xa5, 0x1e, 0x46, 0xff, 0xd7, 0x6d, 0xe2, 0xe8, 0x60, 0xf6, 0x13, 0x79, 0xb3, 0x39, + 0x02, 0x97, 0x73, 0x04, 0x7e, 0xcc, 0x11, 0xf8, 0xb0, 0x40, 0xde, 0xe5, 0x02, 0x79, 0xdf, 0x16, + 0xc8, 0x7b, 0xfd, 0x84, 0x0b, 0x73, 0x52, 0xa4, 0x78, 0x22, 0x33, 0x62, 0xb3, 0xb6, 0x73, 0x66, + 0xce, 0xa4, 0x3a, 0xad, 0x0a, 0x52, 0xee, 0x92, 0xf3, 0xab, 0x57, 0x97, 0xb6, 0xab, 0x67, 0xf7, + 0xfc, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x45, 0x2f, 0x2a, 0xec, 0x2c, 0x03, 0x00, 0x00, +} + +func (this *MsgGovSetRewardsParams) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgGovSetRewardsParams) + if !ok { + that2, ok := that.(MsgGovSetRewardsParams) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Authority != that1.Authority { + return false + } + if !this.Params.Equal(&that1.Params) { + return false + } + return true +} + +// 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 { + GovSetRewardsParams(ctx context.Context, in *MsgGovSetRewardsParams, opts ...grpc.CallOption) (*MsgGovSetRewardsParamsResp, error) + RewardsBid(ctx context.Context, in *MsgRewardsBid, opts ...grpc.CallOption) (*MsgRewardsBidResp, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) GovSetRewardsParams(ctx context.Context, in *MsgGovSetRewardsParams, opts ...grpc.CallOption) (*MsgGovSetRewardsParamsResp, error) { + out := new(MsgGovSetRewardsParamsResp) + err := c.cc.Invoke(ctx, "/umee.auction.v1.Msg/GovSetRewardsParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RewardsBid(ctx context.Context, in *MsgRewardsBid, opts ...grpc.CallOption) (*MsgRewardsBidResp, error) { + out := new(MsgRewardsBidResp) + err := c.cc.Invoke(ctx, "/umee.auction.v1.Msg/RewardsBid", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + GovSetRewardsParams(context.Context, *MsgGovSetRewardsParams) (*MsgGovSetRewardsParamsResp, error) + RewardsBid(context.Context, *MsgRewardsBid) (*MsgRewardsBidResp, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) GovSetRewardsParams(ctx context.Context, req *MsgGovSetRewardsParams) (*MsgGovSetRewardsParamsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GovSetRewardsParams not implemented") +} +func (*UnimplementedMsgServer) RewardsBid(ctx context.Context, req *MsgRewardsBid) (*MsgRewardsBidResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method RewardsBid not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_GovSetRewardsParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgGovSetRewardsParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GovSetRewardsParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umee.auction.v1.Msg/GovSetRewardsParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GovSetRewardsParams(ctx, req.(*MsgGovSetRewardsParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RewardsBid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRewardsBid) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RewardsBid(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umee.auction.v1.Msg/RewardsBid", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RewardsBid(ctx, req.(*MsgRewardsBid)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "umee.auction.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GovSetRewardsParams", + Handler: _Msg_GovSetRewardsParams_Handler, + }, + { + MethodName: "RewardsBid", + Handler: _Msg_RewardsBid_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "umee/auction/v1/tx.proto", +} + +func (m *MsgGovSetRewardsParams) 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 *MsgGovSetRewardsParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovSetRewardsParams) 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 = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + 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] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgGovSetRewardsParamsResp) 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 *MsgGovSetRewardsParamsResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovSetRewardsParamsResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgRewardsBid) 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 *MsgRewardsBid) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRewardsBid) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Id != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x18 + } + { + size, err := m.BidAmount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRewardsBidResp) 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 *MsgRewardsBidResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRewardsBidResp) 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 *MsgGovSetRewardsParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgGovSetRewardsParamsResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgRewardsBid) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.BidAmount.Size() + n += 1 + l + sovTx(uint64(l)) + if m.Id != 0 { + n += 1 + sovTx(uint64(m.Id)) + } + return n +} + +func (m *MsgRewardsBidResp) 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 *MsgGovSetRewardsParams) 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: MsgGovSetRewardsParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovSetRewardsParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 + 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 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 + 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 *MsgGovSetRewardsParamsResp) 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: MsgGovSetRewardsParamsResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovSetRewardsParamsResp: 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 *MsgRewardsBid) 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: MsgRewardsBid: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRewardsBid: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", 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.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BidAmount", 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.BidAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *MsgRewardsBidResp) 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: MsgRewardsBidResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRewardsBidResp: 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 8963b1ab2c0b3b6ae011e21e1d451dc8d751d27a Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Fri, 22 Mar 2024 17:34:07 +0100 Subject: [PATCH 02/10] lint --- proto/umee/auction/v1/query.proto | 14 ++- proto/umee/auction/v1/tx.proto | 17 +-- x/auction/query.pb.go | 180 ++++++++++++++--------------- x/auction/tx.pb.go | 181 ++++++++++++++++-------------- 4 files changed, 205 insertions(+), 187 deletions(-) diff --git a/proto/umee/auction/v1/query.proto b/proto/umee/auction/v1/query.proto index 76cdded4b6..c13bf64b57 100644 --- a/proto/umee/auction/v1/query.proto +++ b/proto/umee/auction/v1/query.proto @@ -10,29 +10,33 @@ option go_package = "github.com/umee-network/umee/v6/x/auction"; // Query defines the gRPC querier service. service Query { - // RewardParams queries parameters for the reward auciton. - rpc RewardParams(QueryRewardParams) returns (QueryRewardParamsResp) { + // QueryRewardParams queries parameters for the reward auciton. + rpc RewardParams(QueryRewardParams) returns (QueryRewardParamsResponse) { option (google.api.http).get = "/umee/auction/v1/rewards/params"; } // RewardAuction queries the information of the auction by ID. If ID is ommitted, returns // current reward auction params. - rpc RewardAuction(QueryRewardAuction) returns (QueryRewardAuctionResp) { + rpc RewardAuction(QueryRewardAuction) returns (QueryRewardAuctionResponse) { option (google.api.http).get = "/umee/auction/v1/rewards/{id}"; } } +// Query type for Query/RewardParams message QueryRewardParams {} -message QueryRewardParamsResp { +// Response type for Query/RewardParams +message QueryRewardParamsResponse { RewardsParams params = 1 [(gogoproto.nullable) = false]; } +// Query type for QueryRewardAuction message QueryRewardAuction { // If zero or not present, the current auction is returned uint32 id = 1; } -message QueryRewardAuctionResp { +// Response type for Query/RewardAuctionResponse +message QueryRewardAuctionResponse { uint32 id = 1; // highest bidder string bidder = 2; diff --git a/proto/umee/auction/v1/tx.proto b/proto/umee/auction/v1/tx.proto index f5023016fa..a0d90ebd20 100644 --- a/proto/umee/auction/v1/tx.proto +++ b/proto/umee/auction/v1/tx.proto @@ -16,11 +16,14 @@ service Msg { // Rewards auction: bid umee for protocol rewards // - rpc GovSetRewardsParams(MsgGovSetRewardsParams) returns (MsgGovSetRewardsParamsResp); - rpc RewardsBid(MsgRewardsBid) returns (MsgRewardsBidResp); + // Allows x/gov to update rewards auction parameters. + rpc GovSetRewardsParams(MsgGovSetRewardsParams) returns (MsgGovSetRewardsParamsResponse); + // Places a bid for a reword auction. Must be higher than the previous bid by at least + // RewardParams.RewardsParams. + rpc RewardsBid(MsgRewardsBid) returns (MsgRewardsBidResponse); } -// MsgGovSetRewardsParams updates rewards parameters. +// MsgGovSetRewardsParams updates rewards auction parameters. message MsgGovSetRewardsParams { option (gogoproto.equal) = true; option (gogoproto.goproto_getters) = false; @@ -31,8 +34,8 @@ message MsgGovSetRewardsParams { RewardsParams params = 2 [(gogoproto.nullable) = false]; } -// MsgGovSetRewardsParamsResp defines the Msg/GovSetRewardsParams response type. -message MsgGovSetRewardsParamsResp {} +// MsgGovSetRewardsParamsResponse defines the Msg/GovSetRewardsParams response type. +message MsgGovSetRewardsParamsResponse {} // MsgRewardsBid places a bid for a reword auction. message MsgRewardsBid { @@ -45,5 +48,5 @@ message MsgRewardsBid { uint32 id = 3; } -// MsgRewardsBidResp response type for Msg/RewardsBid -message MsgRewardsBidResp {} +// MsgRewardsBidResponse response type for Msg/RewardsBid +message MsgRewardsBidResponse {} diff --git a/x/auction/query.pb.go b/x/auction/query.pb.go index 66a8bdb71f..10d58a21c3 100644 --- a/x/auction/query.pb.go +++ b/x/auction/query.pb.go @@ -30,6 +30,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Query type for Query/RewardParams type QueryRewardParams struct { } @@ -66,22 +67,23 @@ func (m *QueryRewardParams) XXX_DiscardUnknown() { var xxx_messageInfo_QueryRewardParams proto.InternalMessageInfo -type QueryRewardParamsResp struct { +// Response type for Query/RewardParams +type QueryRewardParamsResponse struct { Params RewardsParams `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` } -func (m *QueryRewardParamsResp) Reset() { *m = QueryRewardParamsResp{} } -func (m *QueryRewardParamsResp) String() string { return proto.CompactTextString(m) } -func (*QueryRewardParamsResp) ProtoMessage() {} -func (*QueryRewardParamsResp) Descriptor() ([]byte, []int) { +func (m *QueryRewardParamsResponse) Reset() { *m = QueryRewardParamsResponse{} } +func (m *QueryRewardParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryRewardParamsResponse) ProtoMessage() {} +func (*QueryRewardParamsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_e1df854d377e58e5, []int{1} } -func (m *QueryRewardParamsResp) XXX_Unmarshal(b []byte) error { +func (m *QueryRewardParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryRewardParamsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryRewardParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryRewardParamsResp.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryRewardParamsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -91,25 +93,26 @@ func (m *QueryRewardParamsResp) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } -func (m *QueryRewardParamsResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryRewardParamsResp.Merge(m, src) +func (m *QueryRewardParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRewardParamsResponse.Merge(m, src) } -func (m *QueryRewardParamsResp) XXX_Size() int { +func (m *QueryRewardParamsResponse) XXX_Size() int { return m.Size() } -func (m *QueryRewardParamsResp) XXX_DiscardUnknown() { - xxx_messageInfo_QueryRewardParamsResp.DiscardUnknown(m) +func (m *QueryRewardParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRewardParamsResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryRewardParamsResp proto.InternalMessageInfo +var xxx_messageInfo_QueryRewardParamsResponse proto.InternalMessageInfo -func (m *QueryRewardParamsResp) GetParams() RewardsParams { +func (m *QueryRewardParamsResponse) GetParams() RewardsParams { if m != nil { return m.Params } return RewardsParams{} } +// Query type for QueryRewardAuction type QueryRewardAuction struct { // If zero or not present, the current auction is returned Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` @@ -155,25 +158,26 @@ func (m *QueryRewardAuction) GetId() uint32 { return 0 } -type QueryRewardAuctionResp struct { +// Response type for Query/RewardAuctionResponse +type QueryRewardAuctionResponse struct { Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // highest bidder Bidder string `protobuf:"bytes,2,opt,name=bidder,proto3" json:"bidder,omitempty"` Rewards []types.Coin `protobuf:"bytes,3,rep,name=rewards,proto3" json:"rewards"` } -func (m *QueryRewardAuctionResp) Reset() { *m = QueryRewardAuctionResp{} } -func (m *QueryRewardAuctionResp) String() string { return proto.CompactTextString(m) } -func (*QueryRewardAuctionResp) ProtoMessage() {} -func (*QueryRewardAuctionResp) Descriptor() ([]byte, []int) { +func (m *QueryRewardAuctionResponse) Reset() { *m = QueryRewardAuctionResponse{} } +func (m *QueryRewardAuctionResponse) String() string { return proto.CompactTextString(m) } +func (*QueryRewardAuctionResponse) ProtoMessage() {} +func (*QueryRewardAuctionResponse) Descriptor() ([]byte, []int) { return fileDescriptor_e1df854d377e58e5, []int{3} } -func (m *QueryRewardAuctionResp) XXX_Unmarshal(b []byte) error { +func (m *QueryRewardAuctionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryRewardAuctionResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryRewardAuctionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryRewardAuctionResp.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryRewardAuctionResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -183,33 +187,33 @@ func (m *QueryRewardAuctionResp) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *QueryRewardAuctionResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryRewardAuctionResp.Merge(m, src) +func (m *QueryRewardAuctionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRewardAuctionResponse.Merge(m, src) } -func (m *QueryRewardAuctionResp) XXX_Size() int { +func (m *QueryRewardAuctionResponse) XXX_Size() int { return m.Size() } -func (m *QueryRewardAuctionResp) XXX_DiscardUnknown() { - xxx_messageInfo_QueryRewardAuctionResp.DiscardUnknown(m) +func (m *QueryRewardAuctionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRewardAuctionResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryRewardAuctionResp proto.InternalMessageInfo +var xxx_messageInfo_QueryRewardAuctionResponse proto.InternalMessageInfo -func (m *QueryRewardAuctionResp) GetId() uint32 { +func (m *QueryRewardAuctionResponse) GetId() uint32 { if m != nil { return m.Id } return 0 } -func (m *QueryRewardAuctionResp) GetBidder() string { +func (m *QueryRewardAuctionResponse) GetBidder() string { if m != nil { return m.Bidder } return "" } -func (m *QueryRewardAuctionResp) GetRewards() []types.Coin { +func (m *QueryRewardAuctionResponse) GetRewards() []types.Coin { if m != nil { return m.Rewards } @@ -218,42 +222,42 @@ func (m *QueryRewardAuctionResp) GetRewards() []types.Coin { func init() { proto.RegisterType((*QueryRewardParams)(nil), "umee.auction.v1.QueryRewardParams") - proto.RegisterType((*QueryRewardParamsResp)(nil), "umee.auction.v1.QueryRewardParamsResp") + proto.RegisterType((*QueryRewardParamsResponse)(nil), "umee.auction.v1.QueryRewardParamsResponse") proto.RegisterType((*QueryRewardAuction)(nil), "umee.auction.v1.QueryRewardAuction") - proto.RegisterType((*QueryRewardAuctionResp)(nil), "umee.auction.v1.QueryRewardAuctionResp") + proto.RegisterType((*QueryRewardAuctionResponse)(nil), "umee.auction.v1.QueryRewardAuctionResponse") } func init() { proto.RegisterFile("umee/auction/v1/query.proto", fileDescriptor_e1df854d377e58e5) } var fileDescriptor_e1df854d377e58e5 = []byte{ - // 417 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xcb, 0xae, 0xd3, 0x30, - 0x14, 0x8c, 0x73, 0xa1, 0x08, 0x5f, 0x2e, 0x08, 0x03, 0x55, 0x09, 0xd4, 0x2d, 0xe1, 0xd1, 0xb2, - 0xc0, 0x56, 0x8a, 0x84, 0x84, 0xc4, 0x86, 0xf6, 0x07, 0x20, 0x12, 0x1b, 0x76, 0x4e, 0x62, 0x05, - 0x0b, 0x12, 0x87, 0xbc, 0x0a, 0xaa, 0xd8, 0x00, 0x1f, 0x80, 0x04, 0x1f, 0xd5, 0x65, 0x25, 0x36, - 0xac, 0x10, 0x6a, 0xf9, 0x10, 0x14, 0xdb, 0x95, 0x4a, 0x22, 0x1e, 0x3b, 0xdb, 0x33, 0x67, 0xce, - 0xcc, 0x24, 0xf0, 0x5a, 0x95, 0x70, 0x4e, 0x59, 0x15, 0x96, 0x42, 0xa6, 0xb4, 0xf6, 0xe8, 0xeb, - 0x8a, 0xe7, 0x6f, 0x49,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 0x70, 0xcf, 0x9f, 0x7d, 0xb1, 0xe1, 0x69, 0xb5, - 0x1d, 0x7d, 0x00, 0xf0, 0xdc, 0x61, 0x7e, 0xe4, 0x76, 0xb2, 0x76, 0x3a, 0x72, 0xee, 0xfc, 0x9b, - 0xd3, 0x24, 0x71, 0x27, 0xef, 0xbf, 0xfe, 0xfc, 0x6c, 0xdf, 0x40, 0x23, 0xda, 0xfe, 0x7a, 0xc6, - 0x08, 0xd5, 0x95, 0xa1, 0x8f, 0x00, 0x9e, 0xfc, 0x5e, 0xd7, 0xcd, 0xbf, 0xad, 0x30, 0x24, 0x67, - 0xf2, 0x1f, 0x24, 0x65, 0xe4, 0xb6, 0x32, 0x32, 0x42, 0xc3, 0x3f, 0x1a, 0x59, 0x89, 0xe8, 0xdd, - 0x7c, 0xb1, 0xde, 0x62, 0xb0, 0xd9, 0x62, 0xf0, 0x63, 0x8b, 0xc1, 0xa7, 0x1d, 0xb6, 0x36, 0x3b, - 0x6c, 0x7d, 0xdb, 0x61, 0xeb, 0xf9, 0xdd, 0x58, 0x94, 0x2f, 0xaa, 0x80, 0x84, 0x32, 0x51, 0x12, - 0xf7, 0x52, 0x5e, 0x2e, 0x65, 0xfe, 0x52, 0xeb, 0xd5, 0x0f, 0xe8, 0x9b, 0xbd, 0x68, 0xd0, 0x53, - 0x7f, 0xdc, 0xfd, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x08, 0xd2, 0x5d, 0x38, 0x14, 0x03, 0x00, - 0x00, + // 423 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0xaa, 0xd4, 0x30, + 0x14, 0x86, 0x9b, 0x5e, 0x1d, 0x31, 0xd7, 0xab, 0x18, 0x45, 0xe6, 0x56, 0x6f, 0x66, 0xac, 0x8a, + 0xa3, 0x62, 0x42, 0x47, 0x10, 0x04, 0x37, 0xce, 0xbc, 0x80, 0x76, 0xa7, 0xbb, 0xb4, 0x0d, 0x35, + 0x68, 0x9b, 0xda, 0xb4, 0x1d, 0x45, 0x44, 0x70, 0xa3, 0x4b, 0xc1, 0xad, 0x0f, 0x34, 0xcb, 0x01, + 0x37, 0xae, 0x44, 0x66, 0x7c, 0x10, 0x69, 0x93, 0x0e, 0x63, 0x8b, 0x7a, 0x77, 0xe9, 0x39, 0xff, + 0xf9, 0xf3, 0x9d, 0xbf, 0x81, 0x97, 0xcb, 0x84, 0x73, 0xca, 0xca, 0xb0, 0x10, 0x32, 0xa5, 0x95, + 0x47, 0x5f, 0x95, 0x3c, 0x7f, 0x43, 0xb2, 0x5c, 0x16, 0x12, 0x9d, 0xab, 0x9b, 0xc4, 0x34, 0x49, + 0xe5, 0x39, 0x57, 0x62, 0x29, 0xe3, 0x97, 0x9c, 0xb2, 0x4c, 0x50, 0x96, 0xa6, 0xb2, 0x60, 0x75, + 0x47, 0x69, 0xb9, 0x73, 0x31, 0x96, 0xb1, 0x6c, 0x8e, 0xb4, 0x3e, 0x99, 0xea, 0x51, 0xf7, 0x86, + 0xd6, 0x4f, 0xb7, 0x71, 0x28, 0x55, 0x22, 0x15, 0x0d, 0x98, 0xe2, 0xb4, 0xf2, 0x02, 0x5e, 0x30, + 0x8f, 0x86, 0x52, 0x98, 0xbe, 0x7b, 0x01, 0x9e, 0x7f, 0x52, 0x23, 0xf9, 0x7c, 0xc1, 0xf2, 0xe8, + 0x31, 0xcb, 0x59, 0xa2, 0xdc, 0xa7, 0xf0, 0xb0, 0x57, 0xf4, 0xb9, 0xca, 0x64, 0xaa, 0x38, 0x7a, + 0x08, 0x07, 0x59, 0x53, 0x19, 0x82, 0x31, 0x98, 0xec, 0x4f, 0x31, 0xe9, 0xac, 0x41, 0xf4, 0x98, + 0xd2, 0x73, 0xb3, 0x13, 0xcb, 0x1f, 0x23, 0xcb, 0x37, 0x33, 0xee, 0x75, 0x88, 0x76, 0xac, 0x1f, + 0xe9, 0x21, 0x74, 0x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0xc0, 0x7b, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x19, + 0xe2, 0xc6, 0x95, 0x24, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -268,11 +272,11 @@ 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 QueryClient interface { - // RewardParams queries parameters for the reward auciton. - RewardParams(ctx context.Context, in *QueryRewardParams, opts ...grpc.CallOption) (*QueryRewardParamsResp, error) + // QueryRewardParams queries parameters for the reward auciton. + RewardParams(ctx context.Context, in *QueryRewardParams, opts ...grpc.CallOption) (*QueryRewardParamsResponse, error) // RewardAuction queries the information of the auction by ID. If ID is ommitted, returns // current reward auction params. - RewardAuction(ctx context.Context, in *QueryRewardAuction, opts ...grpc.CallOption) (*QueryRewardAuctionResp, error) + RewardAuction(ctx context.Context, in *QueryRewardAuction, opts ...grpc.CallOption) (*QueryRewardAuctionResponse, error) } type queryClient struct { @@ -283,8 +287,8 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } -func (c *queryClient) RewardParams(ctx context.Context, in *QueryRewardParams, opts ...grpc.CallOption) (*QueryRewardParamsResp, error) { - out := new(QueryRewardParamsResp) +func (c *queryClient) RewardParams(ctx context.Context, in *QueryRewardParams, opts ...grpc.CallOption) (*QueryRewardParamsResponse, error) { + out := new(QueryRewardParamsResponse) err := c.cc.Invoke(ctx, "/umee.auction.v1.Query/RewardParams", in, out, opts...) if err != nil { return nil, err @@ -292,8 +296,8 @@ func (c *queryClient) RewardParams(ctx context.Context, in *QueryRewardParams, o return out, nil } -func (c *queryClient) RewardAuction(ctx context.Context, in *QueryRewardAuction, opts ...grpc.CallOption) (*QueryRewardAuctionResp, error) { - out := new(QueryRewardAuctionResp) +func (c *queryClient) RewardAuction(ctx context.Context, in *QueryRewardAuction, opts ...grpc.CallOption) (*QueryRewardAuctionResponse, error) { + out := new(QueryRewardAuctionResponse) err := c.cc.Invoke(ctx, "/umee.auction.v1.Query/RewardAuction", in, out, opts...) if err != nil { return nil, err @@ -303,21 +307,21 @@ func (c *queryClient) RewardAuction(ctx context.Context, in *QueryRewardAuction, // QueryServer is the server API for Query service. type QueryServer interface { - // RewardParams queries parameters for the reward auciton. - RewardParams(context.Context, *QueryRewardParams) (*QueryRewardParamsResp, error) + // QueryRewardParams queries parameters for the reward auciton. + RewardParams(context.Context, *QueryRewardParams) (*QueryRewardParamsResponse, error) // RewardAuction queries the information of the auction by ID. If ID is ommitted, returns // current reward auction params. - RewardAuction(context.Context, *QueryRewardAuction) (*QueryRewardAuctionResp, error) + RewardAuction(context.Context, *QueryRewardAuction) (*QueryRewardAuctionResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. type UnimplementedQueryServer struct { } -func (*UnimplementedQueryServer) RewardParams(ctx context.Context, req *QueryRewardParams) (*QueryRewardParamsResp, error) { +func (*UnimplementedQueryServer) RewardParams(ctx context.Context, req *QueryRewardParams) (*QueryRewardParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RewardParams not implemented") } -func (*UnimplementedQueryServer) RewardAuction(ctx context.Context, req *QueryRewardAuction) (*QueryRewardAuctionResp, error) { +func (*UnimplementedQueryServer) RewardAuction(ctx context.Context, req *QueryRewardAuction) (*QueryRewardAuctionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RewardAuction not implemented") } @@ -401,7 +405,7 @@ func (m *QueryRewardParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryRewardParamsResp) Marshal() (dAtA []byte, err error) { +func (m *QueryRewardParamsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -411,12 +415,12 @@ func (m *QueryRewardParamsResp) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryRewardParamsResp) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryRewardParamsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryRewardParamsResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryRewardParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -462,7 +466,7 @@ func (m *QueryRewardAuction) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryRewardAuctionResp) Marshal() (dAtA []byte, err error) { +func (m *QueryRewardAuctionResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -472,12 +476,12 @@ func (m *QueryRewardAuctionResp) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryRewardAuctionResp) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryRewardAuctionResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryRewardAuctionResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryRewardAuctionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -531,7 +535,7 @@ func (m *QueryRewardParams) Size() (n int) { return n } -func (m *QueryRewardParamsResp) Size() (n int) { +func (m *QueryRewardParamsResponse) Size() (n int) { if m == nil { return 0 } @@ -554,7 +558,7 @@ func (m *QueryRewardAuction) Size() (n int) { return n } -func (m *QueryRewardAuctionResp) Size() (n int) { +func (m *QueryRewardAuctionResponse) Size() (n int) { if m == nil { return 0 } @@ -632,7 +636,7 @@ func (m *QueryRewardParams) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryRewardParamsResp) Unmarshal(dAtA []byte) error { +func (m *QueryRewardParamsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -655,10 +659,10 @@ func (m *QueryRewardParamsResp) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryRewardParamsResp: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRewardParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryRewardParamsResp: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRewardParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -784,7 +788,7 @@ func (m *QueryRewardAuction) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryRewardAuctionResp) Unmarshal(dAtA []byte) error { +func (m *QueryRewardAuctionResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -807,10 +811,10 @@ func (m *QueryRewardAuctionResp) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryRewardAuctionResp: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRewardAuctionResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryRewardAuctionResp: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRewardAuctionResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/auction/tx.pb.go b/x/auction/tx.pb.go index cadeab8a55..6141a54031 100644 --- a/x/auction/tx.pb.go +++ b/x/auction/tx.pb.go @@ -31,7 +31,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// MsgGovSetRewardsParams updates rewards parameters. +// MsgGovSetRewardsParams updates rewards auction parameters. type MsgGovSetRewardsParams struct { // authority must be the address of the governance account. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` @@ -71,22 +71,22 @@ func (m *MsgGovSetRewardsParams) XXX_DiscardUnknown() { var xxx_messageInfo_MsgGovSetRewardsParams proto.InternalMessageInfo -// MsgGovSetRewardsParamsResp defines the Msg/GovSetRewardsParams response type. -type MsgGovSetRewardsParamsResp struct { +// MsgGovSetRewardsParamsResponse defines the Msg/GovSetRewardsParams response type. +type MsgGovSetRewardsParamsResponse struct { } -func (m *MsgGovSetRewardsParamsResp) Reset() { *m = MsgGovSetRewardsParamsResp{} } -func (m *MsgGovSetRewardsParamsResp) String() string { return proto.CompactTextString(m) } -func (*MsgGovSetRewardsParamsResp) ProtoMessage() {} -func (*MsgGovSetRewardsParamsResp) Descriptor() ([]byte, []int) { +func (m *MsgGovSetRewardsParamsResponse) Reset() { *m = MsgGovSetRewardsParamsResponse{} } +func (m *MsgGovSetRewardsParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgGovSetRewardsParamsResponse) ProtoMessage() {} +func (*MsgGovSetRewardsParamsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_44a5dea2889d94ea, []int{1} } -func (m *MsgGovSetRewardsParamsResp) XXX_Unmarshal(b []byte) error { +func (m *MsgGovSetRewardsParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgGovSetRewardsParamsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgGovSetRewardsParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgGovSetRewardsParamsResp.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgGovSetRewardsParamsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -96,17 +96,17 @@ func (m *MsgGovSetRewardsParamsResp) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } -func (m *MsgGovSetRewardsParamsResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgGovSetRewardsParamsResp.Merge(m, src) +func (m *MsgGovSetRewardsParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovSetRewardsParamsResponse.Merge(m, src) } -func (m *MsgGovSetRewardsParamsResp) XXX_Size() int { +func (m *MsgGovSetRewardsParamsResponse) XXX_Size() int { return m.Size() } -func (m *MsgGovSetRewardsParamsResp) XXX_DiscardUnknown() { - xxx_messageInfo_MsgGovSetRewardsParamsResp.DiscardUnknown(m) +func (m *MsgGovSetRewardsParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovSetRewardsParamsResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgGovSetRewardsParamsResp proto.InternalMessageInfo +var xxx_messageInfo_MsgGovSetRewardsParamsResponse proto.InternalMessageInfo // MsgRewardsBid places a bid for a reword auction. type MsgRewardsBid struct { @@ -150,22 +150,22 @@ func (m *MsgRewardsBid) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRewardsBid proto.InternalMessageInfo -// MsgRewardsBidResp response type for Msg/RewardsBid -type MsgRewardsBidResp struct { +// MsgRewardsBidResponse response type for Msg/RewardsBid +type MsgRewardsBidResponse struct { } -func (m *MsgRewardsBidResp) Reset() { *m = MsgRewardsBidResp{} } -func (m *MsgRewardsBidResp) String() string { return proto.CompactTextString(m) } -func (*MsgRewardsBidResp) ProtoMessage() {} -func (*MsgRewardsBidResp) Descriptor() ([]byte, []int) { +func (m *MsgRewardsBidResponse) Reset() { *m = MsgRewardsBidResponse{} } +func (m *MsgRewardsBidResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRewardsBidResponse) ProtoMessage() {} +func (*MsgRewardsBidResponse) Descriptor() ([]byte, []int) { return fileDescriptor_44a5dea2889d94ea, []int{3} } -func (m *MsgRewardsBidResp) XXX_Unmarshal(b []byte) error { +func (m *MsgRewardsBidResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgRewardsBidResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgRewardsBidResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgRewardsBidResp.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgRewardsBidResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -175,58 +175,59 @@ func (m *MsgRewardsBidResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *MsgRewardsBidResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRewardsBidResp.Merge(m, src) +func (m *MsgRewardsBidResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRewardsBidResponse.Merge(m, src) } -func (m *MsgRewardsBidResp) XXX_Size() int { +func (m *MsgRewardsBidResponse) XXX_Size() int { return m.Size() } -func (m *MsgRewardsBidResp) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRewardsBidResp.DiscardUnknown(m) +func (m *MsgRewardsBidResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRewardsBidResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgRewardsBidResp proto.InternalMessageInfo +var xxx_messageInfo_MsgRewardsBidResponse proto.InternalMessageInfo func init() { proto.RegisterType((*MsgGovSetRewardsParams)(nil), "umee.auction.v1.MsgGovSetRewardsParams") - proto.RegisterType((*MsgGovSetRewardsParamsResp)(nil), "umee.auction.v1.MsgGovSetRewardsParamsResp") + proto.RegisterType((*MsgGovSetRewardsParamsResponse)(nil), "umee.auction.v1.MsgGovSetRewardsParamsResponse") proto.RegisterType((*MsgRewardsBid)(nil), "umee.auction.v1.MsgRewardsBid") - proto.RegisterType((*MsgRewardsBidResp)(nil), "umee.auction.v1.MsgRewardsBidResp") + proto.RegisterType((*MsgRewardsBidResponse)(nil), "umee.auction.v1.MsgRewardsBidResponse") } func init() { proto.RegisterFile("umee/auction/v1/tx.proto", fileDescriptor_44a5dea2889d94ea) } var fileDescriptor_44a5dea2889d94ea = []byte{ - // 463 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x31, 0x6f, 0x13, 0x31, - 0x14, 0xc7, 0xcf, 0x29, 0x8a, 0x88, 0x51, 0x41, 0x5c, 0xab, 0x70, 0x3d, 0x81, 0x13, 0xdd, 0x42, - 0x00, 0xd5, 0x56, 0x8a, 0xd4, 0xa1, 0x42, 0x48, 0x0d, 0x43, 0xa7, 0x48, 0xd5, 0x75, 0x63, 0xa9, - 0xee, 0x62, 0xcb, 0xb5, 0xaa, 0x3b, 0x47, 0xb6, 0xef, 0x5a, 0x46, 0x98, 0x18, 0xf9, 0x08, 0x9d, - 0x98, 0x19, 0xf8, 0x08, 0x0c, 0x19, 0x2b, 0x26, 0x26, 0x04, 0xc9, 0x00, 0x1f, 0x03, 0xf9, 0xce, - 0x55, 0x68, 0x38, 0xa1, 0x6e, 0xf7, 0xee, 0xef, 0xff, 0xff, 0xfd, 0xde, 0xb3, 0x61, 0x50, 0x64, - 0x8c, 0x91, 0xa4, 0x98, 0x18, 0x21, 0x73, 0x52, 0x0e, 0x89, 0x39, 0xc7, 0x53, 0x25, 0x8d, 0xf4, - 0xef, 0x59, 0x05, 0x3b, 0x05, 0x97, 0xc3, 0x10, 0x4d, 0xa4, 0xce, 0xa4, 0x26, 0x69, 0xa2, 0x19, - 0x29, 0x87, 0x29, 0x33, 0xc9, 0x90, 0x4c, 0xa4, 0xc8, 0x6b, 0x43, 0xb8, 0x55, 0xeb, 0xc7, 0x55, - 0x45, 0xea, 0xc2, 0x49, 0x0f, 0x9c, 0x35, 0xd3, 0xdc, 0xf6, 0xc8, 0x34, 0x77, 0xc2, 0x26, 0x97, - 0x5c, 0xd6, 0x06, 0xfb, 0xe5, 0xfe, 0x3e, 0x5a, 0x85, 0xba, 0xa2, 0xa8, 0xe4, 0xe8, 0x23, 0x80, - 0xdd, 0xb1, 0xe6, 0x07, 0xb2, 0x3c, 0x62, 0x26, 0x66, 0x67, 0x89, 0xa2, 0xfa, 0x30, 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, 0x76, 0xc3, 0x83, 0xb6, 0xa9, 0x7f, 0x08, 0xe1, 0x5f, 0x9b, 0x40, - 0x4d, 0xd6, 0xa5, 0x1e, 0x46, 0xff, 0xd7, 0x6d, 0xe2, 0xe8, 0x60, 0xf6, 0x13, 0x79, 0xb3, 0x39, - 0x02, 0x97, 0x73, 0x04, 0x7e, 0xcc, 0x11, 0xf8, 0xb0, 0x40, 0xde, 0xe5, 0x02, 0x79, 0xdf, 0x16, - 0xc8, 0x7b, 0xfd, 0x84, 0x0b, 0x73, 0x52, 0xa4, 0x78, 0x22, 0x33, 0x62, 0xb3, 0xb6, 0x73, 0x66, - 0xce, 0xa4, 0x3a, 0xad, 0x0a, 0x52, 0xee, 0x92, 0xf3, 0xab, 0x57, 0x97, 0xb6, 0xab, 0x67, 0xf7, - 0xfc, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x45, 0x2f, 0x2a, 0xec, 0x2c, 0x03, 0x00, 0x00, + // 465 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0x7d, 0x29, 0x8a, 0xc8, 0xa1, 0x82, 0x64, 0x4a, 0xea, 0x46, 0xe2, 0x12, 0x65, 0x80, + 0x80, 0xd4, 0x3b, 0xa5, 0x48, 0x1d, 0x2a, 0x84, 0xd4, 0x30, 0x74, 0x8a, 0x84, 0x5c, 0x26, 0x96, + 0xca, 0xce, 0x9d, 0xae, 0x27, 0x64, 0xbf, 0xe8, 0xee, 0xec, 0x96, 0x11, 0x26, 0x46, 0x3e, 0x42, + 0x27, 0x66, 0x06, 0x3e, 0x44, 0x06, 0x86, 0x8a, 0x89, 0x09, 0x41, 0x32, 0xc0, 0xc7, 0x40, 0xb6, + 0xcf, 0x0a, 0x0d, 0x11, 0xea, 0xe6, 0xe7, 0xff, 0xfd, 0xff, 0xef, 0xf7, 0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0xa0, 0x54, 0x3c, 0x03, 0x00, + 0x00, } func (this *MsgGovSetRewardsParams) Equal(that interface{}) bool { @@ -269,8 +270,11 @@ 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 { - GovSetRewardsParams(ctx context.Context, in *MsgGovSetRewardsParams, opts ...grpc.CallOption) (*MsgGovSetRewardsParamsResp, error) - RewardsBid(ctx context.Context, in *MsgRewardsBid, opts ...grpc.CallOption) (*MsgRewardsBidResp, error) + // Allows x/gov to update rewards auction parameters. + GovSetRewardsParams(ctx context.Context, in *MsgGovSetRewardsParams, opts ...grpc.CallOption) (*MsgGovSetRewardsParamsResponse, error) + // Places a bid for a reword auction. Must be higher than the previous bid by at least + // RewardParams.RewardsParams. + RewardsBid(ctx context.Context, in *MsgRewardsBid, opts ...grpc.CallOption) (*MsgRewardsBidResponse, error) } type msgClient struct { @@ -281,8 +285,8 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { return &msgClient{cc} } -func (c *msgClient) GovSetRewardsParams(ctx context.Context, in *MsgGovSetRewardsParams, opts ...grpc.CallOption) (*MsgGovSetRewardsParamsResp, error) { - out := new(MsgGovSetRewardsParamsResp) +func (c *msgClient) GovSetRewardsParams(ctx context.Context, in *MsgGovSetRewardsParams, opts ...grpc.CallOption) (*MsgGovSetRewardsParamsResponse, error) { + out := new(MsgGovSetRewardsParamsResponse) err := c.cc.Invoke(ctx, "/umee.auction.v1.Msg/GovSetRewardsParams", in, out, opts...) if err != nil { return nil, err @@ -290,8 +294,8 @@ func (c *msgClient) GovSetRewardsParams(ctx context.Context, in *MsgGovSetReward return out, nil } -func (c *msgClient) RewardsBid(ctx context.Context, in *MsgRewardsBid, opts ...grpc.CallOption) (*MsgRewardsBidResp, error) { - out := new(MsgRewardsBidResp) +func (c *msgClient) RewardsBid(ctx context.Context, in *MsgRewardsBid, opts ...grpc.CallOption) (*MsgRewardsBidResponse, error) { + out := new(MsgRewardsBidResponse) err := c.cc.Invoke(ctx, "/umee.auction.v1.Msg/RewardsBid", in, out, opts...) if err != nil { return nil, err @@ -301,18 +305,21 @@ func (c *msgClient) RewardsBid(ctx context.Context, in *MsgRewardsBid, opts ...g // MsgServer is the server API for Msg service. type MsgServer interface { - GovSetRewardsParams(context.Context, *MsgGovSetRewardsParams) (*MsgGovSetRewardsParamsResp, error) - RewardsBid(context.Context, *MsgRewardsBid) (*MsgRewardsBidResp, error) + // Allows x/gov to update rewards auction parameters. + GovSetRewardsParams(context.Context, *MsgGovSetRewardsParams) (*MsgGovSetRewardsParamsResponse, error) + // Places a bid for a reword auction. Must be higher than the previous bid by at least + // RewardParams.RewardsParams. + RewardsBid(context.Context, *MsgRewardsBid) (*MsgRewardsBidResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. type UnimplementedMsgServer struct { } -func (*UnimplementedMsgServer) GovSetRewardsParams(ctx context.Context, req *MsgGovSetRewardsParams) (*MsgGovSetRewardsParamsResp, error) { +func (*UnimplementedMsgServer) GovSetRewardsParams(ctx context.Context, req *MsgGovSetRewardsParams) (*MsgGovSetRewardsParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GovSetRewardsParams not implemented") } -func (*UnimplementedMsgServer) RewardsBid(ctx context.Context, req *MsgRewardsBid) (*MsgRewardsBidResp, error) { +func (*UnimplementedMsgServer) RewardsBid(ctx context.Context, req *MsgRewardsBid) (*MsgRewardsBidResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RewardsBid not implemented") } @@ -413,7 +420,7 @@ func (m *MsgGovSetRewardsParams) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgGovSetRewardsParamsResp) Marshal() (dAtA []byte, err error) { +func (m *MsgGovSetRewardsParamsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -423,12 +430,12 @@ func (m *MsgGovSetRewardsParamsResp) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgGovSetRewardsParamsResp) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgGovSetRewardsParamsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgGovSetRewardsParamsResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgGovSetRewardsParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -481,7 +488,7 @@ func (m *MsgRewardsBid) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgRewardsBidResp) Marshal() (dAtA []byte, err error) { +func (m *MsgRewardsBidResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -491,12 +498,12 @@ func (m *MsgRewardsBidResp) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgRewardsBidResp) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgRewardsBidResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgRewardsBidResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgRewardsBidResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -530,7 +537,7 @@ func (m *MsgGovSetRewardsParams) Size() (n int) { return n } -func (m *MsgGovSetRewardsParamsResp) Size() (n int) { +func (m *MsgGovSetRewardsParamsResponse) Size() (n int) { if m == nil { return 0 } @@ -557,7 +564,7 @@ func (m *MsgRewardsBid) Size() (n int) { return n } -func (m *MsgRewardsBidResp) Size() (n int) { +func (m *MsgRewardsBidResponse) Size() (n int) { if m == nil { return 0 } @@ -687,7 +694,7 @@ func (m *MsgGovSetRewardsParams) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgGovSetRewardsParamsResp) Unmarshal(dAtA []byte) error { +func (m *MsgGovSetRewardsParamsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -710,10 +717,10 @@ func (m *MsgGovSetRewardsParamsResp) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgGovSetRewardsParamsResp: wiretype end group for non-group") + return fmt.Errorf("proto: MsgGovSetRewardsParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgGovSetRewardsParamsResp: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgGovSetRewardsParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -871,7 +878,7 @@ func (m *MsgRewardsBid) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgRewardsBidResp) Unmarshal(dAtA []byte) error { +func (m *MsgRewardsBidResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -894,10 +901,10 @@ func (m *MsgRewardsBidResp) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgRewardsBidResp: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRewardsBidResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRewardsBidResp: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRewardsBidResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: From 7417060f4d9eb0aa2cc7e0f086fcc15b8978e509 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Fri, 22 Mar 2024 17:35:50 +0100 Subject: [PATCH 03/10] update genesis --- proto/umee/auction/v1/genesis.proto | 8 ++-- x/auction/genesis.pb.go | 66 +++++++++++++++-------------- 2 files changed, 39 insertions(+), 35 deletions(-) diff --git a/proto/umee/auction/v1/genesis.proto b/proto/umee/auction/v1/genesis.proto index 2e0eccac60..6a43d70c42 100644 --- a/proto/umee/auction/v1/genesis.proto +++ b/proto/umee/auction/v1/genesis.proto @@ -12,8 +12,10 @@ option (gogoproto.goproto_getters_all) = false; // GenesisState defines the x/auction module's genesis state. message GenesisState { - RewardsParams rewards_params = 1 [(gogoproto.nullable) = false]; - uint64 reward_round = 2; - string highest_bidder = 3; + RewardsParams rewards_params = 1 [(gogoproto.nullable) = false]; + // latest reward + uint32 reward_id = 2; + // latest highest bid + string highest_bidder = 3; repeated cosmos.base.v1beta1.Coin reward_tokens = 4 [(gogoproto.nullable) = false]; } diff --git a/x/auction/genesis.pb.go b/x/auction/genesis.pb.go index f6b51b2d6e..7c02ae231c 100644 --- a/x/auction/genesis.pb.go +++ b/x/auction/genesis.pb.go @@ -27,9 +27,11 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the x/auction module's genesis state. type GenesisState struct { RewardsParams RewardsParams `protobuf:"bytes,1,opt,name=rewards_params,json=rewardsParams,proto3" json:"rewards_params"` - RewardRound uint64 `protobuf:"varint,2,opt,name=reward_round,json=rewardRound,proto3" json:"reward_round,omitempty"` - HighestBidder string `protobuf:"bytes,3,opt,name=highest_bidder,json=highestBidder,proto3" json:"highest_bidder,omitempty"` - RewardTokens []types.Coin `protobuf:"bytes,4,rep,name=reward_tokens,json=rewardTokens,proto3" json:"reward_tokens"` + // latest reward + RewardId uint32 `protobuf:"varint,2,opt,name=reward_id,json=rewardId,proto3" json:"reward_id,omitempty"` + // latest highest bid + HighestBidder string `protobuf:"bytes,3,opt,name=highest_bidder,json=highestBidder,proto3" json:"highest_bidder,omitempty"` + RewardTokens []types.Coin `protobuf:"bytes,4,rep,name=reward_tokens,json=rewardTokens,proto3" json:"reward_tokens"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -72,28 +74,28 @@ func init() { func init() { proto.RegisterFile("umee/auction/v1/genesis.proto", fileDescriptor_15e83c50dcf6ac7b) } var fileDescriptor_15e83c50dcf6ac7b = []byte{ - // 330 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xcf, 0x4a, 0xf4, 0x30, - 0x14, 0xc5, 0x9b, 0x6f, 0x86, 0x0f, 0xec, 0xfc, 0x11, 0x8a, 0x8b, 0x3a, 0x60, 0xac, 0x82, 0x50, - 0x17, 0x26, 0x74, 0x04, 0x1f, 0x60, 0x14, 0x66, 0xe1, 0x46, 0xaa, 0x2b, 0x37, 0x25, 0x6d, 0x43, - 0x27, 0x0c, 0x4d, 0x86, 0x24, 0xed, 0xf8, 0x18, 0x3e, 0xd6, 0x2c, 0x67, 0xe9, 0x4a, 0x74, 0xba, - 0xf4, 0x25, 0xa4, 0x69, 0x06, 0x44, 0x77, 0x37, 0xbf, 0x73, 0xef, 0x3d, 0x37, 0xc7, 0x3d, 0xa9, - 0x4a, 0x4a, 0x31, 0xa9, 0x32, 0xcd, 0x04, 0xc7, 0x75, 0x84, 0x0b, 0xca, 0xa9, 0x62, 0x0a, 0xad, - 0xa4, 0xd0, 0xc2, 0x3b, 0x6c, 0x65, 0x64, 0x65, 0x54, 0x47, 0x13, 0x98, 0x09, 0x55, 0x0a, 0x85, - 0x53, 0xa2, 0x28, 0xae, 0xa3, 0x94, 0x6a, 0x12, 0xe1, 0x4c, 0x30, 0xde, 0x0d, 0x4c, 0x8e, 0x0a, - 0x51, 0x08, 0x53, 0xe2, 0xb6, 0xb2, 0xf4, 0x8f, 0xcb, 0x7e, 0xa3, 0x91, 0xcf, 0xbf, 0x80, 0x3b, - 0x9c, 0x77, 0xbe, 0x8f, 0x9a, 0x68, 0xea, 0xdd, 0xbb, 0x63, 0x49, 0xd7, 0x44, 0xe6, 0x2a, 0x59, - 0x11, 0x49, 0x4a, 0xe5, 0x83, 0x00, 0x84, 0x83, 0x29, 0x44, 0xbf, 0xee, 0x41, 0x71, 0xd7, 0xf6, - 0x60, 0xba, 0x66, 0xfd, 0xcd, 0xfb, 0xa9, 0x13, 0x8f, 0xe4, 0x4f, 0xe8, 0x9d, 0xb9, 0xc3, 0x0e, - 0x24, 0x52, 0x54, 0x3c, 0xf7, 0xff, 0x05, 0x20, 0xec, 0xc7, 0x83, 0x8e, 0xc5, 0x2d, 0xf2, 0x2e, - 0xdc, 0xf1, 0x82, 0x15, 0x0b, 0xaa, 0x74, 0x92, 0xb2, 0x3c, 0xa7, 0xd2, 0xef, 0x05, 0x20, 0x3c, - 0x88, 0x47, 0x96, 0xce, 0x0c, 0xf4, 0xee, 0x5c, 0xbb, 0x3a, 0xd1, 0x62, 0x49, 0xb9, 0xf2, 0xfb, - 0x41, 0x2f, 0x1c, 0x4c, 0x8f, 0x51, 0x17, 0x0a, 0x6a, 0x43, 0x41, 0x36, 0x14, 0x74, 0x2b, 0x18, - 0xb7, 0x07, 0x59, 0xff, 0x27, 0x33, 0x34, 0x9b, 0x6f, 0x3e, 0xa1, 0xb3, 0xd9, 0x41, 0xb0, 0xdd, - 0x41, 0xf0, 0xb1, 0x83, 0xe0, 0xb5, 0x81, 0xce, 0xb6, 0x81, 0xce, 0x5b, 0x03, 0x9d, 0xe7, 0xcb, - 0x82, 0xe9, 0x45, 0x95, 0xa2, 0x4c, 0x94, 0xb8, 0xfd, 0xec, 0x15, 0xa7, 0x7a, 0x2d, 0xe4, 0xd2, - 0x3c, 0x70, 0x7d, 0x83, 0x5f, 0xf6, 0xe1, 0xa5, 0xff, 0x4d, 0x7a, 0xd7, 0xdf, 0x01, 0x00, 0x00, - 0xff, 0xff, 0x4d, 0x7d, 0x55, 0xa3, 0xc4, 0x01, 0x00, 0x00, + // 327 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0x4f, 0x4b, 0xc3, 0x30, + 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0x0c, 0xb8, 0xcf, 0xbd, 0x0b, 0x77, 0x30, 0x65, 0xc5, + 0x94, 0x4a, 0x95, 0xa4, 0x2c, 0xcf, 0xa9, 0xf0, 0x5b, 0x01, 0x08, 0x3b, 0x71, 0xdf, 0xd2, 0xb1, + 0x86, 0xde, 0x9d, 0x6b, 0x87, 0x26, 0x8a, 0xcf, 0x68, 0x25, 0xfd, 0x76, 0xd0, 0x0a, 0xbb, 0xa3, + 0x63, 0x64, 0xe2, 0x40, 0x4d, 0x1c, 0xc8, 0xc6, 0x81, 0x6e, 0x39, 0xab, 0xec, 0x29, 0x3d, 0xe3, + 0x7a, 0xd6, 0xa6, 0xf1, 0x64, 0xf5, 0x05, 0x9d, 0xd5, 0x06, 0x82, 0xf5, 0x06, 0x82, 0xcf, 0x0d, + 0x04, 0x6f, 0x5b, 0xe8, 0xac, 0xb7, 0xd0, 0x79, 0xdf, 0x42, 0xe7, 0xe5, 0xb2, 0x60, 0x6a, 0xba, + 0x48, 0x51, 0xc6, 0x4b, 0xdc, 0x7c, 0xf3, 0xaa, 0xa2, 0x6a, 0xc9, 0xc5, 0x4c, 0x3f, 0x70, 0x7d, + 0x83, 0x5f, 0x77, 0xb1, 0xa5, 0xfb, 0x3a, 0xb7, 0xeb, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe3, + 0x21, 0xb9, 0x4c, 0xbe, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -137,8 +139,8 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if m.RewardRound != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.RewardRound)) + if m.RewardId != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.RewardId)) i-- dAtA[i] = 0x10 } @@ -174,8 +176,8 @@ func (m *GenesisState) Size() (n int) { _ = l l = m.RewardsParams.Size() n += 1 + l + sovGenesis(uint64(l)) - if m.RewardRound != 0 { - n += 1 + sovGenesis(uint64(m.RewardRound)) + if m.RewardId != 0 { + n += 1 + sovGenesis(uint64(m.RewardId)) } l = len(m.HighestBidder) if l > 0 { @@ -260,9 +262,9 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardRound", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RewardId", wireType) } - m.RewardRound = 0 + m.RewardId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -272,7 +274,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RewardRound |= uint64(b&0x7F) << shift + m.RewardId |= uint32(b&0x7F) << shift if b < 0x80 { break } From 8dee4f29d0eae3e214b7271872e43e5976996d48 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Fri, 22 Mar 2024 17:41:28 +0100 Subject: [PATCH 04/10] fix --- proto/umee/auction/v1/tx.proto | 10 ++-- x/auction/tx.pb.go | 89 ++++++++++++---------------------- 2 files changed, 34 insertions(+), 65 deletions(-) diff --git a/proto/umee/auction/v1/tx.proto b/proto/umee/auction/v1/tx.proto index a0d90ebd20..08532d7d6f 100644 --- a/proto/umee/auction/v1/tx.proto +++ b/proto/umee/auction/v1/tx.proto @@ -25,9 +25,7 @@ service Msg { // MsgGovSetRewardsParams updates rewards auction parameters. message MsgGovSetRewardsParams { - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "authority"; + option (cosmos.msg.v1.signer) = "authority"; // authority must be the address of the governance account. string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; @@ -39,9 +37,9 @@ message MsgGovSetRewardsParamsResponse {} // MsgRewardsBid places a bid for a reword auction. message MsgRewardsBid { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - string sender = 1; + option (cosmos.msg.v1.signer) = "sender"; + + string sender = 1; // amount of the bid in the base tokens cosmos.base.v1beta1.Coin bid_amount = 2 [(gogoproto.nullable) = false]; // the current auction ID being bid on. Fails if the ID is not an ID of the current auction. diff --git a/x/auction/tx.pb.go b/x/auction/tx.pb.go index 6141a54031..e0cc19d326 100644 --- a/x/auction/tx.pb.go +++ b/x/auction/tx.pb.go @@ -197,65 +197,36 @@ func init() { func init() { proto.RegisterFile("umee/auction/v1/tx.proto", fileDescriptor_44a5dea2889d94ea) } var fileDescriptor_44a5dea2889d94ea = []byte{ - // 465 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x31, 0x6f, 0xd3, 0x40, - 0x14, 0xc7, 0x7d, 0x29, 0x8a, 0xc8, 0xa1, 0x82, 0x64, 0x4a, 0xea, 0x46, 0xe2, 0x12, 0x65, 0x80, - 0x80, 0xd4, 0x3b, 0xa5, 0x48, 0x1d, 0x2a, 0x84, 0xd4, 0x30, 0x74, 0x8a, 0x84, 0x5c, 0x26, 0x96, - 0xca, 0xce, 0x9d, 0xae, 0x27, 0x64, 0xbf, 0xe8, 0xee, 0xec, 0x96, 0x11, 0x26, 0x46, 0x3e, 0x42, - 0x27, 0x66, 0x06, 0x3e, 0x44, 0x06, 0x86, 0x8a, 0x89, 0x09, 0x41, 0x32, 0xc0, 0xc7, 0x40, 0xb6, - 0xcf, 0x0a, 0x0d, 0x11, 0xea, 0xe6, 0xe7, 0xff, 0xfd, 0xff, 0xef, 0xf7, 0xde, 0x1d, 0x0e, 0xb2, - 0x44, 0x08, 0x16, 0x65, 0x13, 0xab, 0x20, 0x65, 0xf9, 0x90, 0xd9, 0x73, 0x3a, 0xd5, 0x60, 0xc1, - 0xbf, 0x53, 0x28, 0xd4, 0x29, 0x34, 0x1f, 0x76, 0xc8, 0x04, 0x4c, 0x02, 0x86, 0xc5, 0x91, 0x11, - 0x2c, 0x1f, 0xc6, 0xc2, 0x46, 0x43, 0x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 0x09, 0x75, 0x57, - 0x42, 0x9f, 0x83, 0x4a, 0x1d, 0x60, 0x2b, 0x56, 0xfc, 0xb0, 0x74, 0xf8, 0xb7, 0x71, 0x43, 0xf1, - 0x60, 0xa3, 0x87, 0x06, 0x9b, 0x61, 0x43, 0xf1, 0x83, 0x9b, 0x8e, 0xd9, 0xeb, 0x6f, 0xe3, 0x7b, - 0x57, 0x10, 0x6a, 0xb8, 0xbd, 0x2f, 0x08, 0x6f, 0x8c, 0x8d, 0xf4, 0x01, 0xdf, 0x5d, 0xb7, 0xeb, - 0x87, 0xff, 0xec, 0x68, 0xfd, 0xb0, 0x1d, 0x76, 0xcd, 0x83, 0x75, 0x63, 0xff, 0x25, 0xc6, 0x7f, - 0x6d, 0x84, 0xac, 0xb3, 0x2f, 0xf5, 0xce, 0x83, 0xff, 0xeb, 0x75, 0xea, 0xe8, 0x68, 0xf6, 0x93, - 0x78, 0xb3, 0x39, 0x41, 0x97, 0x73, 0x82, 0x7e, 0xcc, 0x09, 0xfa, 0xb0, 0x20, 0xde, 0xe5, 0x82, - 0x78, 0xdf, 0x16, 0xc4, 0x7b, 0xf5, 0x48, 0x2a, 0x7b, 0x9a, 0xc5, 0x74, 0x02, 0x09, 0x2b, 0xf2, - 0x76, 0x53, 0x61, 0xcf, 0x40, 0xbf, 0x2e, 0x0b, 0x96, 0xef, 0xb3, 0xf3, 0xfa, 0x15, 0xc6, 0xcd, - 0xf2, 0x19, 0x3e, 0xf9, 0x13, 0x00, 0x00, 0xff, 0xff, 0x85, 0x36, 0xa0, 0x54, 0x3c, 0x03, 0x00, - 0x00, -} - -func (this *MsgGovSetRewardsParams) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MsgGovSetRewardsParams) - if !ok { - that2, ok := that.(MsgGovSetRewardsParams) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Authority != that1.Authority { - return false - } - if !this.Params.Equal(&that1.Params) { - return false - } - return true + // 458 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x6a, 0x13, 0x41, + 0x18, 0xc7, 0x77, 0x52, 0x09, 0x64, 0x4a, 0x2b, 0xac, 0xb5, 0xdd, 0x06, 0x1c, 0x43, 0x0e, 0x1a, + 0x85, 0xce, 0x90, 0x0a, 0x3d, 0x14, 0x11, 0x1a, 0x0f, 0x3d, 0x05, 0x64, 0xeb, 0xc9, 0x4b, 0xd9, + 0xcd, 0x0c, 0xd3, 0x41, 0x76, 0xbe, 0x30, 0x33, 0xbb, 0xad, 0x57, 0xf1, 0x01, 0x7c, 0x02, 0x9f, + 0xc1, 0x83, 0x0f, 0x91, 0x83, 0x87, 0xe2, 0xc9, 0x93, 0x68, 0x72, 0xf0, 0x35, 0x64, 0x77, 0x67, + 0x89, 0x8d, 0x41, 0x7a, 0xdb, 0x6f, 0xff, 0xf3, 0xff, 0x7f, 0xbf, 0xef, 0x9b, 0xc1, 0x51, 0x9e, + 0x09, 0xc1, 0x92, 0x7c, 0xe2, 0x14, 0x68, 0x56, 0x0c, 0x99, 0xbb, 0xa2, 0x53, 0x03, 0x0e, 0xc2, + 0xbb, 0xa5, 0x42, 0xbd, 0x42, 0x8b, 0x61, 0x97, 0x4c, 0xc0, 0x66, 0x60, 0x59, 0x9a, 0x58, 0xc1, + 0x8a, 0x61, 0x2a, 0x5c, 0x32, 0x64, 0x13, 0x50, 0xba, 0x36, 0x74, 0xf7, 0x6b, 0xfd, 0xbc, 0xaa, + 0x58, 0x5d, 0x78, 0x69, 0xcf, 0x5b, 0x33, 0x2b, 0xcb, 0x1e, 0x99, 0x95, 0x5e, 0xd8, 0x91, 0x20, + 0xa1, 0x36, 0x94, 0x5f, 0xfe, 0xef, 0x83, 0x55, 0xa8, 0x86, 0xa2, 0x92, 0xfb, 0x9f, 0x10, 0xde, + 0x1d, 0x5b, 0x79,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6, 0xfc, 0xf8, 0x9f, 0xf5, 0xac, 0x9f, 0xb7, 0xcb, + 0x6e, 0x79, 0xb0, 0x69, 0x1c, 0xbe, 0xc6, 0xf8, 0xaf, 0xa5, 0x90, 0x75, 0xf6, 0xa5, 0xde, 0x7d, + 0xf4, 0x7f, 0xbd, 0x49, 0x1d, 0x9d, 0xce, 0x7e, 0x91, 0x60, 0x36, 0x27, 0xe8, 0x7a, 0x4e, 0xd0, + 0xcf, 0x39, 0x41, 0x1f, 0x17, 0x24, 0xb8, 0x5e, 0x90, 0xe0, 0xfb, 0x82, 0x04, 0x6f, 0x9e, 0x48, + 0xe5, 0x2e, 0xf2, 0x94, 0x4e, 0x20, 0x63, 0x65, 0xde, 0x81, 0x16, 0xee, 0x12, 0xcc, 0xdb, 0xaa, + 0x60, 0xc5, 0x11, 0xbb, 0x6a, 0x1e, 0x60, 0xda, 0xae, 0x5e, 0xe0, 0xb3, 0x3f, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x08, 0xf8, 0x43, 0x37, 0x37, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From d6de4064784ad2cc5f5b00374ccdf5f359af99c6 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Fri, 22 Mar 2024 18:52:41 +0100 Subject: [PATCH 05/10] add usd rewards --- proto/umee/auction/v1/query.proto | 5 +- x/auction/query.pb.go | 114 ++++++++++++++++++++++-------- 2 files changed, 87 insertions(+), 32 deletions(-) diff --git a/proto/umee/auction/v1/query.proto b/proto/umee/auction/v1/query.proto index c13bf64b57..36f95926e2 100644 --- a/proto/umee/auction/v1/query.proto +++ b/proto/umee/auction/v1/query.proto @@ -39,6 +39,7 @@ message QueryRewardAuction { message QueryRewardAuctionResponse { uint32 id = 1; // highest bidder - string bidder = 2; - repeated cosmos.base.v1beta1.Coin rewards = 3 [(gogoproto.nullable) = false]; + string bidder = 2; + repeated cosmos.base.v1beta1.Coin rewards = 3 [(gogoproto.nullable) = false]; + cosmos.base.v1beta1.Coin usd_rewards = 4 [(gogoproto.nullable) = false]; } diff --git a/x/auction/query.pb.go b/x/auction/query.pb.go index 10d58a21c3..289ddf9b83 100644 --- a/x/auction/query.pb.go +++ b/x/auction/query.pb.go @@ -162,8 +162,9 @@ func (m *QueryRewardAuction) GetId() uint32 { type QueryRewardAuctionResponse struct { Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // highest bidder - Bidder string `protobuf:"bytes,2,opt,name=bidder,proto3" json:"bidder,omitempty"` - Rewards []types.Coin `protobuf:"bytes,3,rep,name=rewards,proto3" json:"rewards"` + Bidder string `protobuf:"bytes,2,opt,name=bidder,proto3" json:"bidder,omitempty"` + Rewards []types.Coin `protobuf:"bytes,3,rep,name=rewards,proto3" json:"rewards"` + UsdRewards types.Coin `protobuf:"bytes,4,opt,name=usd_rewards,json=usdRewards,proto3" json:"usd_rewards"` } func (m *QueryRewardAuctionResponse) Reset() { *m = QueryRewardAuctionResponse{} } @@ -220,6 +221,13 @@ func (m *QueryRewardAuctionResponse) GetRewards() []types.Coin { return nil } +func (m *QueryRewardAuctionResponse) GetUsdRewards() types.Coin { + if m != nil { + return m.UsdRewards + } + return types.Coin{} +} + func init() { proto.RegisterType((*QueryRewardParams)(nil), "umee.auction.v1.QueryRewardParams") proto.RegisterType((*QueryRewardParamsResponse)(nil), "umee.auction.v1.QueryRewardParamsResponse") @@ -230,34 +238,35 @@ func init() { func init() { proto.RegisterFile("umee/auction/v1/query.proto", fileDescriptor_e1df854d377e58e5) } var fileDescriptor_e1df854d377e58e5 = []byte{ - // 423 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0xaa, 0xd4, 0x30, - 0x14, 0x86, 0x9b, 0x5e, 0x1d, 0x31, 0xd7, 0xab, 0x18, 0x45, 0xe6, 0x56, 0x6f, 0x66, 0xac, 0x8a, - 0xa3, 0x62, 0x42, 0x47, 0x10, 0x04, 0x37, 0xce, 0xbc, 0x80, 0x76, 0xa7, 0xbb, 0xb4, 0x0d, 0x35, - 0x68, 0x9b, 0xda, 0xb4, 0x1d, 0x45, 0x44, 0x70, 0xa3, 0x4b, 0xc1, 0xad, 0x0f, 0x34, 0xcb, 0x01, - 0x37, 0xae, 0x44, 0x66, 0x7c, 0x10, 0x69, 0x93, 0x0e, 0x63, 0x8b, 0x7a, 0x77, 0xe9, 0x39, 0xff, - 0xf9, 0xf3, 0x9d, 0xbf, 0x81, 0x97, 0xcb, 0x84, 0x73, 0xca, 0xca, 0xb0, 0x10, 0x32, 0xa5, 0x95, - 0x47, 0x5f, 0x95, 0x3c, 0x7f, 0x43, 0xb2, 0x5c, 0x16, 0x12, 0x9d, 0xab, 0x9b, 0xc4, 0x34, 0x49, - 0xe5, 0x39, 0x57, 0x62, 0x29, 0xe3, 0x97, 0x9c, 0xb2, 0x4c, 0x50, 0x96, 0xa6, 0xb2, 0x60, 0x75, - 0x47, 0x69, 0xb9, 0x73, 0x31, 0x96, 0xb1, 0x6c, 0x8e, 0xb4, 0x3e, 0x99, 0xea, 0x51, 0xf7, 0x86, - 0xd6, 0x4f, 0xb7, 0x71, 0x28, 0x55, 0x22, 0x15, 0x0d, 0x98, 0xe2, 0xb4, 0xf2, 0x02, 0x5e, 0x30, - 0x8f, 0x86, 0x52, 0x98, 0xbe, 0x7b, 0x01, 0x9e, 0x7f, 0x52, 0x23, 0xf9, 0x7c, 0xc1, 0xf2, 0xe8, - 0x31, 0xcb, 0x59, 0xa2, 0xdc, 0xa7, 0xf0, 0xb0, 0x57, 0xf4, 0xb9, 0xca, 0x64, 0xaa, 0x38, 0x7a, - 0x08, 0x07, 0x59, 0x53, 0x19, 0x82, 0x31, 0x98, 0xec, 0x4f, 0x31, 0xe9, 0xac, 0x41, 0xf4, 0x98, - 0xd2, 0x73, 0xb3, 0x13, 0xcb, 0x1f, 0x23, 0xcb, 0x37, 0x33, 0xee, 0x75, 0x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7, 0xaf, 0x5b, 0xd3, 0x60, 0xd0, 0xbc, 0xc0, 0x7b, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x19, - 0xe2, 0xc6, 0x95, 0x24, 0x03, 0x00, 0x00, + // 442 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xcf, 0x8a, 0xd4, 0x30, + 0x1c, 0x9e, 0x74, 0xd7, 0x11, 0x33, 0xae, 0x62, 0x14, 0x99, 0xad, 0x6e, 0x66, 0xac, 0x8a, 0xa3, + 0x62, 0xc2, 0x8c, 0x20, 0x08, 0x1e, 0x74, 0xf7, 0x05, 0xb4, 0x37, 0xbd, 0x48, 0xda, 0x84, 0x1a, + 0xb4, 0x4d, 0x6d, 0xda, 0xae, 0x22, 0x5e, 0xbc, 0xe8, 0x51, 0xf0, 0xea, 0xcb, 0x78, 0xdb, 0xe3, + 0x82, 0x17, 0x4f, 0x22, 0x33, 0x3e, 0x88, 0x34, 0x49, 0x97, 0xb5, 0x45, 0x77, 0x6f, 0xc9, 0xef, + 0xfb, 0x93, 0xef, 0xf7, 0x11, 0x78, 0xa9, 0x4a, 0x85, 0xa0, 0xac, 0x8a, 0x4b, 0xa9, 0x32, 0x5a, + 0xcf, 0xe9, 0xeb, 0x4a, 0x14, 0x6f, 0x49, 0x5e, 0xa8, 0x52, 0xa1, 0xb3, 0x0d, 0x48, 0x1c, 0x48, + 0xea, 0xb9, 0x7f, 0x39, 0x51, 0x2a, 0x79, 0x25, 0x28, 0xcb, 0x25, 0x65, 0x59, 0xa6, 0x4a, 0xd6, + 0x20, 0xda, 0xd2, 0xfd, 0x0b, 0x89, 0x4a, 0x94, 0x39, 0xd2, 0xe6, 0xe4, 0xa6, 0x5b, 0xdd, 0x17, + 0x5a, 0x3f, 0x0b, 0xe3, 0x58, 0xe9, 0x54, 0x69, 0x1a, 0x31, 0x2d, 0x68, 0x3d, 0x8f, 0x44, 0xc9, + 0xe6, 0x34, 0x56, 0xd2, 0xe1, 0xc1, 0x79, 0x78, 0xee, 0x49, 0x13, 0x29, 0x14, 0xbb, 0xac, 0xe0, + 0x8f, 0x59, 0xc1, 0x52, 0x1d, 0x3c, 0x85, 0x9b, 0xbd, 0x61, 0x28, 0x74, 0xae, 0x32, 0x2d, 0xd0, + 0x03, 0x38, 0xcc, 0xcd, 0x64, 0x0c, 0xa6, 0x60, 0x36, 0x5a, 0x60, 0xd2, 0x59, 0x83, 0x58, 0x99, + 0xb6, 0xba, 0xed, 0xf5, 0xbd, 0x9f, 0x93, 0x41, 0xe8, 0x34, 0xc1, 0x35, 0x88, 0x0e, 0x59, 0x3f, + 0xb2, 0x22, 0x74, 0x06, 0x7a, 0x92, 0x1b, 0xbf, 0x8d, 0xd0, 0x93, 0x3c, 0xf8, 0x06, 0xa0, 0xdf, + 0xa7, 0x1d, 0x44, 0xe8, 0xd0, 0xd1, 0x45, 0x38, 0x8c, 0x24, 0xe7, 0xa2, 0x18, 0x7b, 0x53, 0x30, + 0x3b, 0x15, 0xba, 0x1b, 0xba, 0x0f, 0x4f, 0x16, 0x36, 0xcb, 0x78, 0x6d, 0xba, 0x36, 0x1b, 0x2d, + 0x36, 0x89, 0xad, 0x83, 0x34, 0x75, 0x10, 0x57, 0x07, 0xd9, 0x51, 0x32, 0x73, 0x31, 0x5b, 0x3e, + 0x7a, 0x08, 0x47, 0x95, 0xe6, 0xcf, 0x5b, 0xf9, 0xba, 0x59, 0xf5, 0x48, 0x39, 0xac, 0x34, 0x77, + 0xdb, 0x2f, 0xbe, 0x7a, 0xf0, 0x84, 0xd9, 0x01, 0x7d, 0x04, 0xf0, 0xf4, 0xe1, 0x2a, 0x51, 0xd0, + 0xab, 0xac, 0x57, 0xb7, 0x7f, 0xeb, 0x68, 0x4e, 0xdb, 0x47, 0x70, 0xe3, 0xc3, 0xf7, 0xdf, 0x5f, + 0xbc, 0x2b, 0x68, 0x42, 0xbb, 0x9f, 0xc1, 0xe5, 0xa7, 0xb6, 0x7d, 0xf4, 0x09, 0xc0, 0x8d, 0xbf, + 0x9b, 0xbf, 0xfa, 0xbf, 0x67, 0x1c, 0xc9, 0xbf, 0x7d, 0x0c, 0xd2, 0x41, 0x98, 0xeb, 0x26, 0xcc, + 0x04, 0x6d, 0xfd, 0x33, 0xcc, 0x3b, 0xc9, 0xdf, 0x6f, 0xef, 0xec, 0x2d, 0x31, 0xd8, 0x5f, 0x62, + 0xf0, 0x6b, 0x89, 0xc1, 0xe7, 0x15, 0x1e, 0xec, 0xaf, 0xf0, 0xe0, 0xc7, 0x0a, 0x0f, 0x9e, 0xdd, + 0x4c, 0x64, 0xf9, 0xa2, 0x8a, 0x48, 0xac, 0x52, 0x63, 0x71, 0x27, 0x13, 0xe5, 0xae, 0x2a, 0x5e, + 0x5a, 0xbf, 0xfa, 0x1e, 0x7d, 0xd3, 0x9a, 0x46, 0x43, 0xf3, 0x89, 0xef, 0xfe, 0x09, 0x00, 0x00, + 0xff, 0xff, 0xdb, 0xa4, 0x94, 0xa5, 0x67, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -486,6 +495,16 @@ func (m *QueryRewardAuctionResponse) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l + { + size, err := m.UsdRewards.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 if len(m.Rewards) > 0 { for iNdEx := len(m.Rewards) - 1; iNdEx >= 0; iNdEx-- { { @@ -577,6 +596,8 @@ func (m *QueryRewardAuctionResponse) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) } } + l = m.UsdRewards.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -902,6 +923,39 @@ func (m *QueryRewardAuctionResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UsdRewards", 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.UsdRewards.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) From a3e3a8fa4aa1e9b95fbc2d9181afa747194b7e1b Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Fri, 22 Mar 2024 20:24:59 +0100 Subject: [PATCH 06/10] update params --- proto/umee/auction/v1/auction.proto | 9 ++- proto/umee/auction/v1/genesis.proto | 7 +- x/auction/auction.pb.go | 61 +++++++------- x/auction/genesis.pb.go | 121 +++++++++++++++++++++------- 4 files changed, 131 insertions(+), 67 deletions(-) diff --git a/proto/umee/auction/v1/auction.proto b/proto/umee/auction/v1/auction.proto index fd193320fe..95b1d858bc 100644 --- a/proto/umee/auction/v1/auction.proto +++ b/proto/umee/auction/v1/auction.proto @@ -8,8 +8,9 @@ option (gogoproto.goproto_getters_all) = false; // RewardsParams defines parameters for the rewards auction. message RewardsParams { - // auction_duration is duration in seconds. - int64 auction_duration = 1; - // min_bid_increment (nominal) in the base denom for each consequitive bid. - int64 min_bid_increment = 2; + // bid_duration is duration of the bid phase in seconds. + int64 bid_duration = 1; + // Duration (in seconds) at the end of each auction, when we start collecting revenues for + // the next auction. + int64 revenu_collection_shift = 2; } diff --git a/proto/umee/auction/v1/genesis.proto b/proto/umee/auction/v1/genesis.proto index 6a43d70c42..a164053694 100644 --- a/proto/umee/auction/v1/genesis.proto +++ b/proto/umee/auction/v1/genesis.proto @@ -13,9 +13,12 @@ option (gogoproto.goproto_getters_all) = false; // GenesisState defines the x/auction module's genesis state. message GenesisState { RewardsParams rewards_params = 1 [(gogoproto.nullable) = false]; - // latest reward - uint32 reward_id = 2; + // latest active (in bid phase) reward auction. + uint32 reward_auction_id = 2; // latest highest bid string highest_bidder = 3; repeated cosmos.base.v1beta1.Coin reward_tokens = 4 [(gogoproto.nullable) = false]; + // tokens collected for the next auction, while the current reward auction is still in the + // bid phase. + repeated cosmos.base.v1beta1.Coin next_reward_tokens = 5 [(gogoproto.nullable) = false]; } diff --git a/x/auction/auction.pb.go b/x/auction/auction.pb.go index e1a635970a..fd51a40ee5 100644 --- a/x/auction/auction.pb.go +++ b/x/auction/auction.pb.go @@ -25,10 +25,11 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // RewardsParams defines parameters for the rewards auction. type RewardsParams struct { - // auction_duration is duration in seconds. - AuctionDuration int64 `protobuf:"varint,1,opt,name=auction_duration,json=auctionDuration,proto3" json:"auction_duration,omitempty"` - // min_bid_increment (nominal) in the base denom for each consequitive bid. - MinBidIncrement int64 `protobuf:"varint,2,opt,name=min_bid_increment,json=minBidIncrement,proto3" json:"min_bid_increment,omitempty"` + // bid_duration is duration of the bid phase in seconds. + BidDuration int64 `protobuf:"varint,1,opt,name=bid_duration,json=bidDuration,proto3" json:"bid_duration,omitempty"` + // Duration (in seconds) at the end of each auction, when we start collecting revenues for + // the next auction. + RevenuCollectionShift int64 `protobuf:"varint,2,opt,name=revenu_collection_shift,json=revenuCollectionShift,proto3" json:"revenu_collection_shift,omitempty"` } func (m *RewardsParams) Reset() { *m = RewardsParams{} } @@ -71,21 +72,21 @@ func init() { func init() { proto.RegisterFile("umee/auction/v1/auction.proto", fileDescriptor_7a7eec280427e7e3) } var fileDescriptor_7a7eec280427e7e3 = []byte{ - // 216 bytes of a gzipped FileDescriptorProto + // 221 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0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6e, 0x37, 0x06, + 0x04, 0x00, 0x00, 0xff, 0xff, 0x54, 0x46, 0x9a, 0x8f, 0x03, 0x01, 0x00, 0x00, } func (m *RewardsParams) Marshal() (dAtA []byte, err error) { @@ -108,13 +109,13 @@ func (m *RewardsParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.MinBidIncrement != 0 { - i = encodeVarintAuction(dAtA, i, uint64(m.MinBidIncrement)) + if m.RevenuCollectionShift != 0 { + i = encodeVarintAuction(dAtA, i, uint64(m.RevenuCollectionShift)) i-- dAtA[i] = 0x10 } - if m.AuctionDuration != 0 { - i = encodeVarintAuction(dAtA, i, uint64(m.AuctionDuration)) + if m.BidDuration != 0 { + i = encodeVarintAuction(dAtA, i, uint64(m.BidDuration)) i-- dAtA[i] = 0x8 } @@ -138,11 +139,11 @@ func (m *RewardsParams) Size() (n int) { } var l int _ = l - if m.AuctionDuration != 0 { - n += 1 + sovAuction(uint64(m.AuctionDuration)) + if m.BidDuration != 0 { + n += 1 + sovAuction(uint64(m.BidDuration)) } - if m.MinBidIncrement != 0 { - n += 1 + sovAuction(uint64(m.MinBidIncrement)) + if m.RevenuCollectionShift != 0 { + n += 1 + sovAuction(uint64(m.RevenuCollectionShift)) } return n } @@ -184,9 +185,9 @@ func (m *RewardsParams) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AuctionDuration", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BidDuration", wireType) } - m.AuctionDuration = 0 + m.BidDuration = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuction @@ -196,16 +197,16 @@ func (m *RewardsParams) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.AuctionDuration |= int64(b&0x7F) << shift + m.BidDuration |= int64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinBidIncrement", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RevenuCollectionShift", wireType) } - m.MinBidIncrement = 0 + m.RevenuCollectionShift = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuction @@ -215,7 +216,7 @@ func (m *RewardsParams) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MinBidIncrement |= int64(b&0x7F) << shift + m.RevenuCollectionShift |= int64(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/auction/genesis.pb.go b/x/auction/genesis.pb.go index 7c02ae231c..82857a4e25 100644 --- a/x/auction/genesis.pb.go +++ b/x/auction/genesis.pb.go @@ -27,11 +27,14 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the x/auction module's genesis state. type GenesisState struct { RewardsParams RewardsParams `protobuf:"bytes,1,opt,name=rewards_params,json=rewardsParams,proto3" json:"rewards_params"` - // latest reward - RewardId uint32 `protobuf:"varint,2,opt,name=reward_id,json=rewardId,proto3" json:"reward_id,omitempty"` + // latest active (in bid phase) reward auction. + RewardAuctionId uint32 `protobuf:"varint,2,opt,name=reward_auction_id,json=rewardAuctionId,proto3" json:"reward_auction_id,omitempty"` // latest highest bid HighestBidder string `protobuf:"bytes,3,opt,name=highest_bidder,json=highestBidder,proto3" json:"highest_bidder,omitempty"` RewardTokens []types.Coin `protobuf:"bytes,4,rep,name=reward_tokens,json=rewardTokens,proto3" json:"reward_tokens"` + // tokens collected for the next auction, while the current reward auction is still in the + // bid phase. + NextRewardTokens []types.Coin `protobuf:"bytes,5,rep,name=next_reward_tokens,json=nextRewardTokens,proto3" json:"next_reward_tokens"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -74,28 +77,30 @@ func init() { func init() { proto.RegisterFile("umee/auction/v1/genesis.proto", fileDescriptor_15e83c50dcf6ac7b) } var fileDescriptor_15e83c50dcf6ac7b = []byte{ - // 327 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00,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, 0xed, 0x18, 0x90, 0xb0, - 0xdc, 0xdf, 0x0b, 0x40, 0xd8, 0x8f, 0x0f, 0x0c, 0xb8, 0xcf, 0xbd, 0x0b, 0x77, 0x30, 0x65, 0xc5, - 0x94, 0x4a, 0x95, 0xa4, 0x2c, 0xcf, 0xa9, 0xf0, 0x5b, 0x01, 0x08, 0x3b, 0x71, 0xdf, 0xd2, 0xb1, - 0x86, 0xde, 0x9d, 0x6b, 0x87, 0x26, 0x8a, 0xcf, 0x68, 0x25, 0xfd, 0x76, 0xd0, 0x0a, 0xbb, 0xa3, - 0x63, 0x64, 0xe2, 0x40, 0x4d, 0x1c, 0xc8, 0xc6, 0x81, 0x6e, 0x39, 0xab, 0xec, 0x29, 0x3d, 0xe3, - 0x7a, 0xd6, 0xa6, 0xf1, 0x64, 0xf5, 0x05, 0x9d, 0xd5, 0x06, 0x82, 0xf5, 0x06, 0x82, 0xcf, 0x0d, - 0x04, 0x6f, 0x5b, 0xe8, 0xac, 0xb7, 0xd0, 0x79, 0xdf, 0x42, 0xe7, 0xe5, 0xb2, 0x60, 0x6a, 0xba, - 0x48, 0x51, 0xc6, 0x4b, 0xdc, 0x7c, 0xf3, 0xaa, 0xa2, 0x6a, 0xc9, 0xc5, 0x4c, 0x3f, 0x70, 0x7d, - 0x83, 0x5f, 0x77, 0xb1, 0xa5, 0xfb, 0x3a, 0xb7, 0xeb, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe3, - 0x21, 0xb9, 0x4c, 0xbe, 0x01, 0x00, 0x00, + // 353 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x51, 0x4d, 0x4b, 0xf3, 0x40, + 0x18, 0x4c, 0xda, 0xbe, 0x2f, 0x98, 0x7e, 0x69, 0xf0, 0x10, 0x0b, 0xae, 0x41, 0x10, 0xa2, 0xe0, + 0x2e, 0xa9, 0xe0, 0xdd, 0x2a, 0x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x49, 0x53, 0xcc, 0x9c, + 0xba, 0x6b, 0x7a, 0x3b, 0x41, 0x5b, 0xa3, 0x03, 0x09, 0xda, 0x37, 0x96, 0xce, 0x08, 0x05, 0x1d, + 0xe3, 0x82, 0x3b, 0x0d, 0xb7, 0xee, 0x35, 0xfb, 0x07, 0x50, 0xb5, 0x03, 0xab, 0x76, 0xa0, 0x6e, + 0x07, 0x5e, 0x53, 0x52, 0xe8, 0xcd, 0x5a, 0x4a, 0xf5, 0x24, 0x45, 0xf6, 0xbd, 0x65, 0x17, 0x78, + 0x2e, 0xc2, 0xef, 0x56, 0xff, 0xfe, 0x66, 0xb5, 0x5b, 0x49, 0x83, 0x2d, 0xbb, 0xc1, 0x70, 0xf1, + 0x09, 0x8c, 0xc5, 0x0a, 0x98, 0xcb, 0x15, 0x30, 0x3f, 0x56, 0xc0, 0x7c, 0x59, 0x03, 0x63, 0xb9, + 0x06, 0xc6, 0xdb, 0x1a, 0x18, 0xcf, 0xa7, 0x19, 0x11, 0xa3, 0x69, 0x0c, 0x13, 0x9a, 0xa3, 0xaa, + 0xc4, 0xf3, 0x02, 0x8b, 0x19, 0x65, 0x63, 0xf9, 0x41, 0xe5, 0x25, 0x9a, 0x6f, 0x8e, 0x12, 0xff, + 0x97, 0x57, 0xb9, 0xf8, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x86, 0x77, 0xd1, 0x1c, 0x02, 0x00, + 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -118,6 +123,20 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.NextRewardTokens) > 0 { + for iNdEx := len(m.NextRewardTokens) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.NextRewardTokens[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } if len(m.RewardTokens) > 0 { for iNdEx := len(m.RewardTokens) - 1; iNdEx >= 0; iNdEx-- { { @@ -139,8 +158,8 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if m.RewardId != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.RewardId)) + if m.RewardAuctionId != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.RewardAuctionId)) i-- dAtA[i] = 0x10 } @@ -176,8 +195,8 @@ func (m *GenesisState) Size() (n int) { _ = l l = m.RewardsParams.Size() n += 1 + l + sovGenesis(uint64(l)) - if m.RewardId != 0 { - n += 1 + sovGenesis(uint64(m.RewardId)) + if m.RewardAuctionId != 0 { + n += 1 + sovGenesis(uint64(m.RewardAuctionId)) } l = len(m.HighestBidder) if l > 0 { @@ -189,6 +208,12 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + if len(m.NextRewardTokens) > 0 { + for _, e := range m.NextRewardTokens { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } return n } @@ -262,9 +287,9 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RewardAuctionId", wireType) } - m.RewardId = 0 + m.RewardAuctionId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -274,7 +299,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RewardId |= uint32(b&0x7F) << shift + m.RewardAuctionId |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -345,6 +370,40 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextRewardTokens", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextRewardTokens = append(m.NextRewardTokens, types.Coin{}) + if err := m.NextRewardTokens[len(m.NextRewardTokens)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) From f0e86d8272f6f3937bfa072f4cb5dfaff11d4897 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Fri, 22 Mar 2024 20:33:31 +0100 Subject: [PATCH 07/10] add events --- proto/umee/auction/v1/events.proto | 18 ++ proto/umee/auction/v1/genesis.proto | 13 +- proto/umee/auction/v1/tx.proto | 6 +- x/auction/events.pb.go | 404 ++++++++++++++++++++++++++++ x/auction/genesis.pb.go | 92 +++---- x/auction/tx.pb.go | 120 ++++----- 6 files changed, 538 insertions(+), 115 deletions(-) create mode 100644 proto/umee/auction/v1/events.proto create mode 100644 x/auction/events.pb.go diff --git a/proto/umee/auction/v1/events.proto b/proto/umee/auction/v1/events.proto new file mode 100644 index 0000000000..89c4ecdef2 --- /dev/null +++ b/proto/umee/auction/v1/events.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +package umee.auction.v1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/umee-network/umee/v6/x/auction"; + +option (gogoproto.goproto_getters_all) = false; + +// EventRewardsAuctionResult is emitted at the end of each auction that has at least one bidder. +message EventRewardsAuctionResult { + uint32 id = 1; + string bidder = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // Auctioned tokens. + repeated cosmos.base.v1beta1.Coin rewards = 4 [(gogoproto.nullable) = false]; +} diff --git a/proto/umee/auction/v1/genesis.proto b/proto/umee/auction/v1/genesis.proto index a164053694..790d7b99e2 100644 --- a/proto/umee/auction/v1/genesis.proto +++ b/proto/umee/auction/v1/genesis.proto @@ -13,12 +13,13 @@ option (gogoproto.goproto_getters_all) = false; // GenesisState defines the x/auction module's genesis state. message GenesisState { RewardsParams rewards_params = 1 [(gogoproto.nullable) = false]; - // latest active (in bid phase) reward auction. + // Latest active (in bid phase) reward auction. uint32 reward_auction_id = 2; - // latest highest bid - string highest_bidder = 3; - repeated cosmos.base.v1beta1.Coin reward_tokens = 4 [(gogoproto.nullable) = false]; - // tokens collected for the next auction, while the current reward auction is still in the + // Latest highest bid. + string highest_bidder = 3; + // Tokens collected for the current auction. + repeated cosmos.base.v1beta1.Coin current_rewards = 4 [(gogoproto.nullable) = false]; + // Tokens collected for the next auction, while the current reward auction is still in the // bid phase. - repeated cosmos.base.v1beta1.Coin next_reward_tokens = 5 [(gogoproto.nullable) = false]; + repeated cosmos.base.v1beta1.Coin next_rewards = 5 [(gogoproto.nullable) = false]; } diff --git a/proto/umee/auction/v1/tx.proto b/proto/umee/auction/v1/tx.proto index 08532d7d6f..e09ce6aa08 100644 --- a/proto/umee/auction/v1/tx.proto +++ b/proto/umee/auction/v1/tx.proto @@ -40,10 +40,10 @@ message MsgRewardsBid { option (cosmos.msg.v1.signer) = "sender"; string sender = 1; - // amount of the bid in the base tokens - cosmos.base.v1beta1.Coin bid_amount = 2 [(gogoproto.nullable) = false]; // the current auction ID being bid on. Fails if the ID is not an ID of the current auction. - uint32 id = 3; + uint32 id = 2; + // amount of the bid in the base tokens + cosmos.base.v1beta1.Coin bid_amount = 3 [(gogoproto.nullable) = false]; } // MsgRewardsBidResponse response type for Msg/RewardsBid diff --git a/x/auction/events.pb.go b/x/auction/events.pb.go new file mode 100644 index 0000000000..b05b729fe1 --- /dev/null +++ b/x/auction/events.pb.go @@ -0,0 +1,404 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: umee/auction/v1/events.proto + +package auction + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "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 + +// EventRewardsAuctionResult is emitted at the end of each auction that has at least one bidder. +type EventRewardsAuctionResult struct { + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Bidder string `protobuf:"bytes,2,opt,name=bidder,proto3" json:"bidder,omitempty"` + // Auctioned tokens. + Rewards []types.Coin `protobuf:"bytes,4,rep,name=rewards,proto3" json:"rewards"` +} + +func (m *EventRewardsAuctionResult) Reset() { *m = EventRewardsAuctionResult{} } +func (m *EventRewardsAuctionResult) String() string { return proto.CompactTextString(m) } +func (*EventRewardsAuctionResult) ProtoMessage() {} +func (*EventRewardsAuctionResult) Descriptor() ([]byte, []int) { + return fileDescriptor_b5998c755af8caa1, []int{0} +} +func (m *EventRewardsAuctionResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventRewardsAuctionResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventRewardsAuctionResult.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 *EventRewardsAuctionResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventRewardsAuctionResult.Merge(m, src) +} +func (m *EventRewardsAuctionResult) XXX_Size() int { + return m.Size() +} +func (m *EventRewardsAuctionResult) XXX_DiscardUnknown() { + xxx_messageInfo_EventRewardsAuctionResult.DiscardUnknown(m) +} + +var xxx_messageInfo_EventRewardsAuctionResult proto.InternalMessageInfo + +func init() { + proto.RegisterType((*EventRewardsAuctionResult)(nil), "umee.auction.v1.EventRewardsAuctionResult") +} + +func init() { proto.RegisterFile("umee/auction/v1/events.proto", fileDescriptor_b5998c755af8caa1) } + +var fileDescriptor_b5998c755af8caa1 = []byte{ + // 294 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x34, 0x90, 0xb1, 0x4a, 0xc4, 0x30, + 0x18, 0xc7, 0x9b, 0xf3, 0x38, 0xb1, 0xa2, 0x42, 0xb9, 0xa1, 0x3d, 0x24, 0x16, 0xa7, 0x3a, 0x5c, + 0x62, 0x15, 0x04, 0xc7, 0xab, 0x88, 0x7b, 0xdd, 0x5c, 0xa4, 0x6d, 0x42, 0x0d, 0xda, 0x44, 0x92, + 0xb4, 0xe7, 0x63, 0x38, 0xfa, 0x20, 0x3e, 0x44, 0xc7, 0xc3, 0xc9, 0x49, 0xb4, 0x7d, 0x11, 0x69, + 0x93, 0xdb, 0xf2, 0xe7, 0xf7, 0x23, 0xff, 0xef, 0xfb, 0xdc, 0xe3, 0xba, 0xa2, 0x14, 0x67, 0x75, + 0xa1, 0x99, 0xe0, 0xb8, 0x89, 0x31, 0x6d, 0x28, 0xd7, 0x0a, 0xbd, 0x4a, 0xa1, 0x85, 0x77, 0x34, + 0x50, 0x64, 0x29, 0x6a, 0xe2, 0xc5, 0xbc, 0x14, 0xa5, 0x18, 0x19, 0x1e, 0x5e, 0x46, 0x5b, 0x04, + 0x85, 0x50, 0x95, 0x50, 0x8f, 0x06, 0x98, 0x60, 0x11, 0x34, 0x09, 0xe7, 0x99, 0xa2, 0xb8, 0x89, + 0x73, 0xaa, 0xb3, 0x18, 0x17, 0x82, 0x71, 0xc3, 0x4f, 0x3f, 0x80, 0x1b, 0xdc, 0x0e, 0x95, 0x29, + 0x5d, 0x67, 0x92, 0xa8, 0x95, 0xe9, 0x4a, 0xa9, 0xaa, 0x5f, 0xb4, 0x77, 0xe8, 0x4e, 0x18, 0xf1, + 0x41, 0x08, 0xa2, 0x83, 0x74, 0xc2, 0x88, 0x77, 0xee, 0xce, 0x72, 0x46, 0x08, 0x95, 0xfe, 0x24, + 0x04, 0xd1, 0x5e, 0xe2, 0x7f, 0x7d, 0x2e, 0xe7, 0xb6, 0x6f, 0x45, 0x88, 0xa4, 0x4a, 0xdd, 0x6b, + 0xc9, 0x78, 0x99, 0x5a, 0xcf, 0xbb, 0x76, 0x77, 0xa5, 0xf9, 0xd9, 0x9f, 0x86, 0x3b, 0xd1, 0xfe, + 0x45, 0x80, 0xac, 0x3f, 0x4c, 0x84, 0xec, 0x44, 0xe8, 0x46, 0x30, 0x9e, 0x4c, 0xdb, 0x9f, 0x13, + 0x27, 0xdd, 0xfa, 0xc9, 0x5d, 0xfb, 0x07, 0x9d, 0xb6, 0x83, 0x60, 0xd3, 0x41, 0xf0, 0xdb, 0x41, + 0xf0, 0xde, 0x43, 0x67, 0xd3, 0x43, 0xe7, 0xbb, 0x87, 0xce, 0xc3, 0x59, 0xc9, 0xf4, 0x53, 0x9d, + 0xa3, 0x42, 0x54, 0x78, 0xb8, 0xd2, 0x92, 0x53, 0xbd, 0x16, 0xf2, 0x79, 0x0c, 0xb8, 0xb9, 0xc2, + 0x6f, 0xdb, 0xab, 0xe6, 0xb3, 0x71, 0xd5, 0xcb, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x05, 0x11, + 0xf0, 0x01, 0x6c, 0x01, 0x00, 0x00, +} + +func (m *EventRewardsAuctionResult) 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 *EventRewardsAuctionResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventRewardsAuctionResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Rewards) > 0 { + for iNdEx := len(m.Rewards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Bidder) > 0 { + i -= len(m.Bidder) + copy(dAtA[i:], m.Bidder) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Bidder))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventRewardsAuctionResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovEvents(uint64(m.Id)) + } + l = len(m.Bidder) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if len(m.Rewards) > 0 { + for _, e := range m.Rewards { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + return n +} + +func sovEvents(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventRewardsAuctionResult) 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 ErrIntOverflowEvents + } + 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: EventRewardsAuctionResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventRewardsAuctionResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bidder", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bidder = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rewards = append(m.Rewards, types.Coin{}) + if err := m.Rewards[len(m.Rewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvents(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, ErrIntOverflowEvents + } + 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, ErrIntOverflowEvents + } + 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, ErrIntOverflowEvents + } + 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, ErrInvalidLengthEvents + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvents + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvents + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/auction/genesis.pb.go b/x/auction/genesis.pb.go index 82857a4e25..6263ed3a9d 100644 --- a/x/auction/genesis.pb.go +++ b/x/auction/genesis.pb.go @@ -27,14 +27,15 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the x/auction module's genesis state. type GenesisState struct { RewardsParams RewardsParams `protobuf:"bytes,1,opt,name=rewards_params,json=rewardsParams,proto3" json:"rewards_params"` - // latest active (in bid phase) reward auction. + // Latest active (in bid phase) reward auction. RewardAuctionId uint32 `protobuf:"varint,2,opt,name=reward_auction_id,json=rewardAuctionId,proto3" json:"reward_auction_id,omitempty"` - // latest highest bid - HighestBidder string `protobuf:"bytes,3,opt,name=highest_bidder,json=highestBidder,proto3" json:"highest_bidder,omitempty"` - RewardTokens []types.Coin `protobuf:"bytes,4,rep,name=reward_tokens,json=rewardTokens,proto3" json:"reward_tokens"` - // tokens collected for the next auction, while the current reward auction is still in the + // Latest highest bid. + HighestBidder string `protobuf:"bytes,3,opt,name=highest_bidder,json=highestBidder,proto3" json:"highest_bidder,omitempty"` + // Tokens collected for the current auction. + CurrentRewards []types.Coin `protobuf:"bytes,4,rep,name=current_rewards,json=currentRewards,proto3" json:"current_rewards"` + // Tokens collected for the next auction, while the current reward auction is still in the // bid phase. - NextRewardTokens []types.Coin `protobuf:"bytes,5,rep,name=next_reward_tokens,json=nextRewardTokens,proto3" json:"next_reward_tokens"` + NextRewards []types.Coin `protobuf:"bytes,5,rep,name=next_rewards,json=nextRewards,proto3" json:"next_rewards"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -77,30 +78,29 @@ func init() { func init() { proto.RegisterFile("umee/auction/v1/genesis.proto", fileDescriptor_15e83c50dcf6ac7b) } var fileDescriptor_15e83c50dcf6ac7b = []byte{ - // 353 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x51, 0x4d, 0x4b, 0xf3, 0x40, - 0x18, 0x4c, 0xda, 0xbe, 0x2f, 0x98, 0x7e, 0x69, 0xf0, 0x10, 0x0b, 0xae, 0x41, 0x10, 0xa2, 0xe0, - 0x2e, 0xa9, 0xe0, 0xdd, 0x2a, 0x14, 0x11, 0x41, 0xa2, 0x27, 0x2f, 0x21, 0x1f, 0x4b, 0xba, 0x94, - 0x64, 0xcb, 0xee, 0x36, 0xed, 0xcf, 0xf0, 0x3f, 0x79, 0xe9, 0xb1, 0x47, 0x4f, 0xa2, 0xed, 0x1f, - 0x91, 0xec, 0x6e, 0xa1, 0xea, 0xc5, 0xdb, 0xee, 0xcc, 0x33, 0x33, 0x0f, 0xf3, 0x58, 0x87, 0xd3, - 0x1c, 0x63, 0x14, 0x4d, 0x13, 0x41, 0x68, 0x81, 0x4a, 0x1f, 0x65, 0xb8, 0xc0, 0x9c, 0x70, 0x38, - 0x61, 0x54, 0x50, 0xbb, 0x5b, 0xd1, 0x50, 0xd3, 0xb0, 0xf4, 0x7b, 0x20, 0xa1, 0x3c, 0xa7, 0x1c, - 0xc5, 0x11, 0xc7, 0xa8, 0xf4, 0x63, 0x2c, 0x22, 0x1f, 0x25, 0x94, 0x14, 0x4a, 0xd0, 0xdb, 0xcf, - 0x68, 0x46, 0xe5, 0x13, 0x55, 0x2f, 0x8d, 0xfe, 0x4a, 0xd9, 0x38, 0x4a, 0xfa, 0xf8, 0xb5, 0x66, - 0xb5, 0x86, 0x2a, 0xf7, 0x51, 0x44, 0x02, 0xdb, 0x77, 0x56, 0x87, 0xe1, 0x59, 0xc4, 0x52, 0x1e, - 0x4e, 0x22, 0x16, 0xe5, 0xdc, 0x31, 0x5d, 0xd3, 0x6b, 0xf6, 0x01, 0xfc, 0xb1, 0x0f, 0x0c, 0xd4, - 0xd8, 0x83, 0x9c, 0x1a, 0x34, 0x16, 0xef, 0x47, 0x46, 0xd0, 0x66, 0xdb, 0xa0, 0x7d, 0x66, 0xed, - 0x29, 0x20, 0xd4, 0xba, 0x90, 0xa4, 0x4e, 0xcd, 0x35, 0xbd, 0x76, 0xd0, 0x55, 0xc4, 0x95, 0xc2, - 0x6f, 0x53, 0xfb, 0xc4, 0xea, 0x8c, 0x48, 0x36, 0xc2, 0x5c, 0x84, 0x31, 0x49, 0x53, 0xcc, 0x9c, - 0xba, 0x6b, 0x7a, 0x3b, 0x41, 0x5b, 0xa3, 0x03, 0x09, 0xda, 0x37, 0x96, 0xce, 0x08, 0x05, 0x1d, - 0xe3, 0x82, 0x3b, 0x0d, 0xb7, 0xee, 0x35, 0xfb, 0x07, 0x50, 0xb5, 0x03, 0xab, 0x76, 0xa0, 0x6e, - 0x07, 0x5e, 0x53, 0x52, 0xe8, 0xcd, 0x5a, 0x4a, 0xf5, 0x24, 0x45, 0xf6, 0xbd, 0x65, 0x17, 0x78, - 0x2e, 0xc2, 0xef, 0x56, 0xff, 0xfe, 0x66, 0xb5, 0x5b, 0x49, 0x83, 0x2d, 0xbb, 0xc1, 0x70, 0xf1, - 0x09, 0x8c, 0xc5, 0x0a, 0x98, 0xcb, 0x15, 0x30, 0x3f, 0x56, 0xc0, 0x7c, 0x59, 0x03, 0x63, 0xb9, - 0x06, 0xc6, 0xdb, 0x1a, 0x18, 0xcf, 0xa7, 0x19, 0x11, 0xa3, 0x69, 0x0c, 0x13, 0x9a, 0xa3, 0xaa, - 0xc4, 0xf3, 0x02, 0x8b, 0x19, 0x65, 0x63, 0xf9, 0x41, 0xe5, 0x25, 0x9a, 0x6f, 0x8e, 0x12, 0xff, - 0x97, 0x57, 0xb9, 0xf8, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x86, 0x77, 0xd1, 0x1c, 0x02, 0x00, - 0x00, + // 349 bytes of a gzipped FileDescriptorProto + 0x1f, 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0x7d, 0xfe, 0x13, 0xb4, 0xcf, 0xad, 0x7d, 0x05, + 0x44, 0x5a, 0x17, 0x91, 0xcc, 0x69, 0xb9, 0xa6, 0xd7, 0x0f, 0x87, 0x8a, 0xb8, 0x56, 0xf8, 0x5d, + 0x66, 0x9f, 0x5a, 0x83, 0x29, 0xc9, 0xa7, 0x58, 0xc8, 0x28, 0x21, 0x59, 0x86, 0xb9, 0xd3, 0x76, + 0x4d, 0x6f, 0x2f, 0xec, 0x6b, 0x34, 0x68, 0x40, 0xfb, 0xd6, 0x1a, 0xa6, 0x25, 0xe7, 0x98, 0xca, + 0x48, 0xef, 0x72, 0x3a, 0x6e, 0xdb, 0xeb, 0x8e, 0x0f, 0xa1, 0xea, 0x07, 0xd6, 0xfd, 0x40, 0xdd, + 0x0f, 0xbc, 0x61, 0x84, 0xea, 0x6c, 0x03, 0xad, 0xd3, 0xb9, 0xed, 0xc0, 0xea, 0x51, 0xbc, 0xf8, + 0xb6, 0xd9, 0xf9, 0x9f, 0x4d, 0xb7, 0x16, 0x69, 0x8f, 0x60, 0xb2, 0xfc, 0x04, 0xc6, 0x72, 0x0d, + 0xcc, 0xd5, 0x1a, 0x98, 0x1f, 0x6b, 0x60, 0xbe, 0x6c, 0x80, 0xb1, 0xda, 0x00, 0xe3, 0x6d, 0x03, + 0x8c, 0xa7, 0xb3, 0x9c, 0xc8, 0x69, 0x99, 0xc0, 0x94, 0x15, 0xa8, 0x6e, 0xef, 0x82, 0x62, 0x39, + 0x67, 0xfc, 0xb9, 0xf9, 0xa0, 0xea, 0x0a, 0x2d, 0xb6, 0xd7, 0x48, 0x76, 0x9b, 0x73, 0x5c, 0x7e, + 0x05, 0x00, 0x00, 0xff, 0xff, 0x60, 0x45, 0x2e, 0x3d, 0x15, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -123,10 +123,10 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.NextRewardTokens) > 0 { - for iNdEx := len(m.NextRewardTokens) - 1; iNdEx >= 0; iNdEx-- { + if len(m.NextRewards) > 0 { + for iNdEx := len(m.NextRewards) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.NextRewardTokens[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.NextRewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -137,10 +137,10 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x2a } } - if len(m.RewardTokens) > 0 { - for iNdEx := len(m.RewardTokens) - 1; iNdEx >= 0; iNdEx-- { + if len(m.CurrentRewards) > 0 { + for iNdEx := len(m.CurrentRewards) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.RewardTokens[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.CurrentRewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -202,14 +202,14 @@ func (m *GenesisState) Size() (n int) { if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } - if len(m.RewardTokens) > 0 { - for _, e := range m.RewardTokens { + if len(m.CurrentRewards) > 0 { + for _, e := range m.CurrentRewards { l = e.Size() n += 1 + l + sovGenesis(uint64(l)) } } - if len(m.NextRewardTokens) > 0 { - for _, e := range m.NextRewardTokens { + if len(m.NextRewards) > 0 { + for _, e := range m.NextRewards { l = e.Size() n += 1 + l + sovGenesis(uint64(l)) } @@ -338,7 +338,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardTokens", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CurrentRewards", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -365,14 +365,14 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.RewardTokens = append(m.RewardTokens, types.Coin{}) - if err := m.RewardTokens[len(m.RewardTokens)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.CurrentRewards = append(m.CurrentRewards, types.Coin{}) + if err := m.CurrentRewards[len(m.CurrentRewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextRewardTokens", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NextRewards", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -399,8 +399,8 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NextRewardTokens = append(m.NextRewardTokens, types.Coin{}) - if err := m.NextRewardTokens[len(m.NextRewardTokens)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.NextRewards = append(m.NextRewards, types.Coin{}) + if err := m.NextRewards[len(m.NextRewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/auction/tx.pb.go b/x/auction/tx.pb.go index e0cc19d326..d7cb4e0c46 100644 --- a/x/auction/tx.pb.go +++ b/x/auction/tx.pb.go @@ -111,10 +111,10 @@ var xxx_messageInfo_MsgGovSetRewardsParamsResponse proto.InternalMessageInfo // MsgRewardsBid places a bid for a reword auction. type MsgRewardsBid struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // amount of the bid in the base tokens - BidAmount types.Coin `protobuf:"bytes,2,opt,name=bid_amount,json=bidAmount,proto3" json:"bid_amount"` // the current auction ID being bid on. Fails if the ID is not an ID of the current auction. - Id uint32 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` + Id uint32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + // amount of the bid in the base tokens + BidAmount types.Coin `protobuf:"bytes,3,opt,name=bid_amount,json=bidAmount,proto3" json:"bid_amount"` } func (m *MsgRewardsBid) Reset() { *m = MsgRewardsBid{} } @@ -197,36 +197,36 @@ func init() { func init() { proto.RegisterFile("umee/auction/v1/tx.proto", fileDescriptor_44a5dea2889d94ea) } var fileDescriptor_44a5dea2889d94ea = []byte{ - // 458 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x6a, 0x13, 0x41, - 0x18, 0xc7, 0x77, 0x52, 0x09, 0x64, 0x4a, 0x2b, 0xac, 0xb5, 0xdd, 0x06, 0x1c, 0x43, 0x0e, 0x1a, - 0x85, 0xce, 0x90, 0x0a, 0x3d, 0x14, 0x11, 0x1a, 0x0f, 0x3d, 0x05, 0x64, 0xeb, 0xc9, 0x4b, 0xd9, - 0xcd, 0x0c, 0xd3, 0x41, 0x76, 0xbe, 0x30, 0x33, 0xbb, 0xad, 0x57, 0xf1, 0x01, 0x7c, 0x02, 0x9f, - 0xc1, 0x83, 0x0f, 0x91, 0x83, 0x87, 0xe2, 0xc9, 0x93, 0x68, 0x72, 0xf0, 0x35, 0x64, 0x77, 0x67, - 0x89, 0x8d, 0x41, 0x7a, 0xdb, 0x6f, 0xff, 0xf3, 0xff, 0x7f, 0xbf, 0xef, 0x9b, 0xc1, 0x51, 0x9e, - 0x09, 0xc1, 0x92, 0x7c, 0xe2, 0x14, 0x68, 0x56, 0x0c, 0x99, 0xbb, 0xa2, 0x53, 0x03, 0x0e, 0xc2, - 0xbb, 0xa5, 0x42, 0xbd, 0x42, 0x8b, 0x61, 0x97, 0x4c, 0xc0, 0x66, 0x60, 0x59, 0x9a, 0x58, 0xc1, - 0x8a, 0x61, 0x2a, 0x5c, 0x32, 0x64, 0x13, 0x50, 0xba, 0x36, 0x74, 0xf7, 0x6b, 0xfd, 0xbc, 0xaa, - 0x58, 0x5d, 0x78, 0x69, 0xcf, 0x5b, 0x33, 0x2b, 0xcb, 0x1e, 0x99, 0x95, 0x5e, 0xd8, 0x91, 0x20, - 0xa1, 0x36, 0x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7c, 0xff, 0x06, 0x45, 0xc3, 0x77, 0xf8, 0x15, 0xe1, - 0x8d, 0xb1, 0x95, 0x21, 0xe0, 0x7b, 0xeb, 0xd6, 0xfc, 0xf8, 0x9f, 0xf5, 0xac, 0x9f, 0xb7, 0xcb, - 0x6e, 0x79, 0xb0, 0x69, 0x1c, 0xbe, 0xc6, 0xf8, 0xaf, 0xa5, 0x90, 0x75, 0xf6, 0xa5, 0xde, 0x7d, - 0xf4, 0x7f, 0xbd, 0x49, 0x1d, 0x9d, 0xce, 0x7e, 0x91, 0x60, 0x36, 0x27, 0xe8, 0x7a, 0x4e, 0xd0, - 0xcf, 0x39, 0x41, 0x1f, 0x17, 0x24, 0xb8, 0x5e, 0x90, 0xe0, 0xfb, 0x82, 0x04, 0x6f, 0x9e, 0x48, - 0xe5, 0x2e, 0xf2, 0x94, 0x4e, 0x20, 0x63, 0x65, 0xde, 0x81, 0x16, 0xee, 0x12, 0xcc, 0xdb, 0xaa, - 0x60, 0xc5, 0x11, 0xbb, 0x6a, 0x1e, 0x60, 0xda, 0xae, 0x5e, 0xe0, 0xb3, 0x3f, 0x01, 0x00, 0x00, - 0xff, 0xff, 0x08, 0xf8, 0x43, 0x37, 0x37, 0x03, 0x00, 0x00, + // 457 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x6a, 0x14, 0x31, + 0x18, 0xc7, 0x27, 0x5b, 0x59, 0xd8, 0x94, 0x56, 0x18, 0x6b, 0x3b, 0x5d, 0x30, 0x2e, 0x7b, 0xd0, + 0x2a, 0x34, 0x61, 0x2b, 0xf4, 0x50, 0x44, 0xe8, 0x7a, 0xe8, 0x69, 0x41, 0xa6, 0x9e, 0xbc, 0x94, + 0x99, 0x4d, 0x48, 0x83, 0xcc, 0x7c, 0x4b, 0x92, 0x99, 0xd6, 0xab, 0xf8, 0x00, 0x3e, 0x81, 0xcf, + 0xe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x5e, 0x80, 0x7e, 0xeb, 0x0a, + 0x56, 0x1e, 0xb2, 0xcb, 0xe6, 0x01, 0xa6, 0x5d, 0xf7, 0x02, 0x9f, 0xfd, 0x09, 0x00, 0x00, 0xff, + 0xff, 0x13, 0xf5, 0x07, 0xef, 0x37, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -434,11 +434,6 @@ func (m *MsgRewardsBid) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Id != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x18 - } { size, err := m.BidAmount.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -448,7 +443,12 @@ func (m *MsgRewardsBid) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a + if m.Id != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x10 + } if len(m.Sender) > 0 { i -= len(m.Sender) copy(dAtA[i:], m.Sender) @@ -527,11 +527,11 @@ func (m *MsgRewardsBid) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = m.BidAmount.Size() - n += 1 + l + sovTx(uint64(l)) if m.Id != 0 { n += 1 + sovTx(uint64(m.Id)) } + l = m.BidAmount.Size() + n += 1 + l + sovTx(uint64(l)) return n } @@ -777,6 +777,25 @@ func (m *MsgRewardsBid) Unmarshal(dAtA []byte) error { m.Sender = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field BidAmount", wireType) } @@ -809,25 +828,6 @@ func (m *MsgRewardsBid) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) From 0f7b6e333d1ff7791226cad6c3eaf954966e6b9b Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Fri, 22 Mar 2024 21:02:02 +0100 Subject: [PATCH 08/10] update genesis --- proto/umee/auction/v1/genesis.proto | 7 +- x/auction/genesis.pb.go | 100 +++++++++++++++++++++------- 2 files changed, 82 insertions(+), 25 deletions(-) diff --git a/proto/umee/auction/v1/genesis.proto b/proto/umee/auction/v1/genesis.proto index 790d7b99e2..eef86eb318 100644 --- a/proto/umee/auction/v1/genesis.proto +++ b/proto/umee/auction/v1/genesis.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package umee.auction.v1; +import "google/protobuf/timestamp.proto"; import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; import "umee/auction/v1/auction.proto"; @@ -21,5 +22,9 @@ message GenesisState { repeated cosmos.base.v1beta1.Coin current_rewards = 4 [(gogoproto.nullable) = false]; // Tokens collected for the next auction, while the current reward auction is still in the // bid phase. - repeated cosmos.base.v1beta1.Coin next_rewards = 5 [(gogoproto.nullable) = false]; + repeated cosmos.base.v1beta1.Coin next_rewards = 5 [(gogoproto.nullable) = false]; + google.protobuf.Timestamp current_rewards_auction_start = 6 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; } diff --git a/x/auction/genesis.pb.go b/x/auction/genesis.pb.go index 6263ed3a9d..5c490ce2d7 100644 --- a/x/auction/genesis.pb.go +++ b/x/auction/genesis.pb.go @@ -8,15 +8,19 @@ import ( types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" + time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -35,7 +39,8 @@ type GenesisState struct { CurrentRewards []types.Coin `protobuf:"bytes,4,rep,name=current_rewards,json=currentRewards,proto3" json:"current_rewards"` // Tokens collected for the next auction, while the current reward auction is still in the // bid phase. - NextRewards []types.Coin `protobuf:"bytes,5,rep,name=next_rewards,json=nextRewards,proto3" json:"next_rewards"` + NextRewards []types.Coin `protobuf:"bytes,5,rep,name=next_rewards,json=nextRewards,proto3" json:"next_rewards"` + CurrentRewardsAuctionStart time.Time `protobuf:"bytes,6,opt,name=current_rewards_auction_start,json=currentRewardsAuctionStart,proto3,stdtime" json:"current_rewards_auction_start"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -78,29 +83,33 @@ func init() { func init() { proto.RegisterFile("umee/auction/v1/genesis.proto", fileDescriptor_15e83c50dcf6ac7b) } var fileDescriptor_15e83c50dcf6ac7b = []byte{ - // 349 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x51, 0xcd, 0x4a, 0xc3, 0x40, - 0x18, 0x4c, 0xda, 0x2a, 0x98, 0xfe, 0x61, 0xf0, 0x10, 0x0b, 0xae, 0x41, 0x10, 0xa2, 0xe0, 0x2e, - 0xa9, 0xe0, 0xdd, 0x78, 0xa8, 0xe2, 0x45, 0xe2, 0xcd, 0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- 0x4d, 0x6f, 0x2f, 0xec, 0x6b, 0x34, 0x68, 0x40, 0xfb, 0xd6, 0x1a, 0xa6, 0x25, 0xe7, 0x98, 0xca, - 0x48, 0xef, 0x72, 0x3a, 0x6e, 0xdb, 0xeb, 0x8e, 0x0f, 0xa1, 0xea, 0x07, 0xd6, 0xfd, 0x40, 0xdd, - 0x0f, 0xbc, 0x61, 0x84, 0xea, 0x6c, 0x03, 0xad, 0xd3, 0xb9, 0xed, 0xc0, 0xea, 0x51, 0xbc, 0xf8, - 0xb6, 0xd9, 0xf9, 0x9f, 0x4d, 0xb7, 0x16, 0x69, 0x8f, 0x60, 0xb2, 0xfc, 0x04, 0xc6, 0x72, 0x0d, - 0xcc, 0xd5, 0x1a, 0x98, 0x1f, 0x6b, 0x60, 0xbe, 0x6c, 0x80, 0xb1, 0xda, 0x00, 0xe3, 0x6d, 0x03, - 0x8c, 0xa7, 0xb3, 0x9c, 0xc8, 0x69, 0x99, 0xc0, 0x94, 0x15, 0xa8, 0x6e, 0xef, 0x82, 0x62, 0x39, - 0x67, 0xfc, 0xb9, 0xf9, 0xa0, 0xea, 0x0a, 0x2d, 0xb6, 0xd7, 0x48, 0x76, 0x9b, 0x73, 0x5c, 0x7e, - 0x05, 0x00, 0x00, 0xff, 0xff, 0x60, 0x45, 0x2e, 0x3d, 0x15, 0x02, 0x00, 0x00, + // 412 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x51, 0xcb, 0x8e, 0xd3, 0x30, + 0x00, 0x8c, 0xe9, 0xb2, 0x02, 0x77, 0xdb, 0x8a, 0x88, 0x43, 0xa8, 0xb4, 0x6e, 0x84, 0x84, 0x14, + 0x90, 0xb0, 0x95, 0x45, 0xe2, 0x4e, 0x38, 0x2c, 0x88, 0x0b, 0xca, 0x72, 0xe2, 0x12, 0x39, 0x89, + 0x71, 0x2d, 0x48, 0x5c, 0xd9, 0x4e, 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6d, 0x8a, 0x52, + 0xd4, 0x35, 0x53, 0xd1, 0x24, 0x06, 0xc9, 0xdd, 0x7c, 0xe6, 0xd1, 0xcc, 0x82, 0xe1, 0x2b, 0xb8, + 0xa8, 0x3a, 0xa5, 0x58, 0x6b, 0x0a, 0xff, 0x56, 0x74, 0x14, 0x4f, 0x92, 0xe9, 0xd9, 0x03, 0xec, + 0xfa, 0xc1, 0x43, 0x3f, 0xd8, 0xf7, 0x83, 0x5f, 0x4a, 0xd1, 0xfa, 0x6c, 0x73, 0xaf, 0xf3, 0xb9, + 0xc3, 0x0c, 0x9e, 0xb4, 0xec, 0xea, 0xb7, 0xcd, 0xed, 0xff, 0xb3, 0x99, 0x0e, 0xa2, 0xd1, 0x83, + 0xc3, 0xd3, 0x83, 0x34, 0xbf, 0xfe, 0x54, 0x1b, 0xaa, 0x4c, 0x74, 0x6c, 0xcb, 0x5b, 0x62, 0x37, + 0x2e, 0x1e, 0xc7, 0xc5, 0xef, 0xc6, 0x71, 0xb3, 0x3b, 0x83, 0xeb, 0xf5, 0xb7, 0x15, 0xc8, 0x97, + 0x7f, 0x07, 0xf4, 0xd5, 0x5c, 0x0c, 0x3e, 0xd9, 0xf9, 0xf6, 0x07, 0x0a, 0xb6, 0x3b, 0x04, 0x6e, + 0x76, 0x08, 0x7c, 0xdf, 0x21, 0x70, 0xbd, 0x47, 0xc1, 0xcd, 0x1e, 0x05, 0x5f, 0xf6, 0x28, 0x78, + 0xff, 0x98, 0x0b, 0xb3, 0xee, 0x4a, 0x5c, 0xc9, 0x86, 0x0c, 0x33, 0x3d, 0x6d, 0x99, 0xb9, 0x94, + 0xea, 0xa3, 0xfd, 0x20, 0xfd, 0x73, 0x72, 0x35, 0xce, 0x5e, 0x1e, 0xdb, 0x08, 0xcf, 0x7e, 0x06, + 0x00, 0x00, 0xff, 0xff, 0x74, 0x7a, 0x43, 0x1d, 0x9f, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -123,6 +132,14 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CurrentRewardsAuctionStart, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CurrentRewardsAuctionStart):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintGenesis(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x32 if len(m.NextRewards) > 0 { for iNdEx := len(m.NextRewards) - 1; iNdEx >= 0; iNdEx-- { { @@ -214,6 +231,8 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CurrentRewardsAuctionStart) + n += 1 + l + sovGenesis(uint64(l)) return n } @@ -404,6 +423,39 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentRewardsAuctionStart", 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 := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CurrentRewardsAuctionStart, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) From b85e7e649f81e531549281b61f2bafa87319e961 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Fri, 22 Mar 2024 21:33:00 +0100 Subject: [PATCH 09/10] update --- proto/umee/auction/v1/genesis.proto | 7 +- proto/umee/auction/v1/query.proto | 2 + x/auction/genesis.pb.go | 66 ++++++++-------- x/auction/query.pb.go | 116 +++++++++++++++++++++------- 4 files changed, 124 insertions(+), 67 deletions(-) diff --git a/proto/umee/auction/v1/genesis.proto b/proto/umee/auction/v1/genesis.proto index eef86eb318..b77340c27a 100644 --- a/proto/umee/auction/v1/genesis.proto +++ b/proto/umee/auction/v1/genesis.proto @@ -22,9 +22,6 @@ message GenesisState { repeated cosmos.base.v1beta1.Coin current_rewards = 4 [(gogoproto.nullable) = false]; // Tokens collected for the next auction, while the current reward auction is still in the // bid phase. - repeated cosmos.base.v1beta1.Coin next_rewards = 5 [(gogoproto.nullable) = false]; - google.protobuf.Timestamp current_rewards_auction_start = 6 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; + repeated cosmos.base.v1beta1.Coin next_rewards = 5 [(gogoproto.nullable) = false]; + google.protobuf.Timestamp current_rewards_auction_end = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } diff --git a/proto/umee/auction/v1/query.proto b/proto/umee/auction/v1/query.proto index 36f95926e2..66e563712d 100644 --- a/proto/umee/auction/v1/query.proto +++ b/proto/umee/auction/v1/query.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package umee.auction.v1; +import "google/protobuf/timestamp.proto"; import "google/api/annotations.proto"; import "gogoproto/gogo.proto"; import "umee/auction/v1/auction.proto"; @@ -42,4 +43,5 @@ message QueryRewardAuctionResponse { string bidder = 2; repeated cosmos.base.v1beta1.Coin rewards = 3 [(gogoproto.nullable) = false]; cosmos.base.v1beta1.Coin usd_rewards = 4 [(gogoproto.nullable) = false]; + google.protobuf.Timestamp ends_at = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } diff --git a/x/auction/genesis.pb.go b/x/auction/genesis.pb.go index 5c490ce2d7..81307cb3ef 100644 --- a/x/auction/genesis.pb.go +++ b/x/auction/genesis.pb.go @@ -39,8 +39,8 @@ type GenesisState struct { CurrentRewards []types.Coin `protobuf:"bytes,4,rep,name=current_rewards,json=currentRewards,proto3" json:"current_rewards"` // Tokens collected for the next auction, while the current reward auction is still in the // bid phase. - NextRewards []types.Coin `protobuf:"bytes,5,rep,name=next_rewards,json=nextRewards,proto3" json:"next_rewards"` - CurrentRewardsAuctionStart time.Time `protobuf:"bytes,6,opt,name=current_rewards_auction_start,json=currentRewardsAuctionStart,proto3,stdtime" json:"current_rewards_auction_start"` + NextRewards []types.Coin `protobuf:"bytes,5,rep,name=next_rewards,json=nextRewards,proto3" json:"next_rewards"` + CurrentRewardsAuctionEnd time.Time `protobuf:"bytes,6,opt,name=current_rewards_auction_end,json=currentRewardsAuctionEnd,proto3,stdtime" json:"current_rewards_auction_end"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -83,33 +83,33 @@ func init() { func init() { proto.RegisterFile("umee/auction/v1/genesis.proto", fileDescriptor_15e83c50dcf6ac7b) } var fileDescriptor_15e83c50dcf6ac7b = []byte{ - // 412 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x51, 0xcb, 0x8e, 0xd3, 0x30, - 0x00, 0x8c, 0xe9, 0xb2, 0x02, 0x77, 0xdb, 0x8a, 0x88, 0x43, 0xa8, 0xb4, 0x6e, 0x84, 0x84, 0x14, - 0x90, 0xb0, 0x95, 0x45, 0xe2, 0x4e, 0x38, 0x2c, 0x88, 0x0b, 0xca, 0x72, 0xe2, 0x12, 0x39, 0x89, - 0x71, 0x2d, 0x48, 0x5c, 0xd9, 0x4e, 0x76, 0x3f, 0x63, 0x7f, 0x82, 0x7f, 0xe9, 0x71, 0x8f, 0x9c, - 0x78, 0xb4, 0x3f, 0x82, 0x62, 0x3b, 0x3c, 0xca, 0x85, 0x9b, 0x33, 0xe3, 0x19, 0x4f, 0x66, 0xe0, - 0x69, 0xd7, 0x30, 0x46, 0x68, 0x57, 0x19, 0x21, 0x5b, 0xd2, 0xa7, 0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1, 0x43, 0x3f, 0xd8, 0xf7, 0x83, 0x5f, 0x4a, 0xd1, 0xfa, 0x6c, 0x73, 0xaf, 0xf3, 0xb9, - 0xc3, 0x0c, 0x9e, 0xb4, 0xec, 0xea, 0xb7, 0xcd, 0xed, 0xff, 0xb3, 0x99, 0x0e, 0xa2, 0xd1, 0x83, - 0xc3, 0xd3, 0x83, 0x34, 0xbf, 0xfe, 0x54, 0x1b, 0xaa, 0x4c, 0x74, 0x6c, 0xcb, 0x5b, 0x62, 0x37, - 0x2e, 0x1e, 0xc7, 0xc5, 0xef, 0xc6, 0x71, 0xb3, 0x3b, 0x83, 0xeb, 0xf5, 0xb7, 0x15, 0xc8, 0x97, - 0x7f, 0x07, 0xf4, 0xd5, 0x5c, 0x0c, 0x3e, 0xd9, 0xf9, 0xf6, 0x07, 0x0a, 0xb6, 0x3b, 0x04, 0x6e, - 0x76, 0x08, 0x7c, 0xdf, 0x21, 0x70, 0xbd, 0x47, 0xc1, 0xcd, 0x1e, 0x05, 0x5f, 0xf6, 0x28, 0x78, - 0xff, 0x98, 0x0b, 0xb3, 0xee, 0x4a, 0x5c, 0xc9, 0x86, 0x0c, 0x33, 0x3d, 0x6d, 0x99, 0xb9, 0x94, - 0xea, 0xa3, 0xfd, 0x20, 0xfd, 0x73, 0x72, 0x35, 0xce, 0x5e, 0x1e, 0xdb, 0x08, 0xcf, 0x7e, 0x06, - 0x00, 0x00, 0xff, 0xff, 0x74, 0x7a, 0x43, 0x1d, 0x9f, 0x02, 0x00, 0x00, + // 413 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xcd, 0x8e, 0xd3, 0x30, + 0x14, 0x85, 0x63, 0x3a, 0x8c, 0xc0, 0x9d, 0xb6, 0x22, 0x62, 0x11, 0x8a, 0x70, 0x2b, 0x24, 0xa4, + 0x82, 0x84, 0xad, 0x0e, 0x12, 0x7b, 0x82, 0xd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0x00, 0x00, 0xff, 0xff, 0x19, 0x33, 0xd7, 0xc2, 0x9b, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -132,7 +132,7 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CurrentRewardsAuctionStart, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CurrentRewardsAuctionStart):]) + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CurrentRewardsAuctionEnd, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CurrentRewardsAuctionEnd):]) if err1 != nil { return 0, err1 } @@ -231,7 +231,7 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CurrentRewardsAuctionStart) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CurrentRewardsAuctionEnd) n += 1 + l + sovGenesis(uint64(l)) return n } @@ -425,7 +425,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentRewardsAuctionStart", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CurrentRewardsAuctionEnd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -452,7 +452,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CurrentRewardsAuctionStart, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CurrentRewardsAuctionEnd, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/auction/query.pb.go b/x/auction/query.pb.go index 289ddf9b83..dc4e1367f1 100644 --- a/x/auction/query.pb.go +++ b/x/auction/query.pb.go @@ -10,19 +10,23 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" + time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -165,6 +169,7 @@ type QueryRewardAuctionResponse struct { Bidder string `protobuf:"bytes,2,opt,name=bidder,proto3" json:"bidder,omitempty"` Rewards []types.Coin `protobuf:"bytes,3,rep,name=rewards,proto3" json:"rewards"` UsdRewards types.Coin `protobuf:"bytes,4,opt,name=usd_rewards,json=usdRewards,proto3" json:"usd_rewards"` + EndsAt time.Time `protobuf:"bytes,5,opt,name=ends_at,json=endsAt,proto3,stdtime" json:"ends_at"` } func (m *QueryRewardAuctionResponse) Reset() { *m = QueryRewardAuctionResponse{} } @@ -228,6 +233,13 @@ func (m *QueryRewardAuctionResponse) GetUsdRewards() types.Coin { return types.Coin{} } +func (m *QueryRewardAuctionResponse) GetEndsAt() time.Time { + if m != nil { + return m.EndsAt + } + return time.Time{} +} + func init() { proto.RegisterType((*QueryRewardParams)(nil), "umee.auction.v1.QueryRewardParams") proto.RegisterType((*QueryRewardParamsResponse)(nil), "umee.auction.v1.QueryRewardParamsResponse") @@ -238,35 +250,38 @@ func init() { func init() { proto.RegisterFile("umee/auction/v1/query.proto", fileDescriptor_e1df854d377e58e5) } var fileDescriptor_e1df854d377e58e5 = []byte{ - // 442 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xcf, 0x8a, 0xd4, 0x30, - 0x1c, 0x9e, 0x74, 0xd7, 0x11, 0x33, 0xae, 0x62, 0x14, 0x99, 0xad, 0x6e, 0x66, 0xac, 0x8a, 0xa3, - 0x62, 0xc2, 0x8c, 0x20, 0x08, 0x1e, 0x74, 0xf7, 0x05, 0xb4, 0x37, 0xbd, 0x48, 0xda, 0x84, 0x1a, - 0xb4, 0x4d, 0x6d, 0xda, 0xae, 0x22, 0x5e, 0xbc, 0xe8, 0x51, 0xf0, 0xea, 0xcb, 0x78, 0xdb, 0xe3, - 0x82, 0x17, 0x4f, 0x22, 0x33, 0x3e, 0x88, 0x34, 0x49, 0x97, 0xb5, 0x45, 0x77, 0x6f, 0xc9, 0xef, - 0xfb, 0x93, 0xef, 0xf7, 0x11, 0x78, 0xa9, 0x4a, 0x85, 0xa0, 0xac, 0x8a, 0x4b, 0xa9, 0x32, 0x5a, - 0xcf, 0xe9, 0xeb, 0x4a, 0x14, 0x6f, 0x49, 0x5e, 0xa8, 0x52, 0xa1, 0xb3, 0x0d, 0x48, 0x1c, 0x48, - 0xea, 0xb9, 0x7f, 0x39, 0x51, 0x2a, 0x79, 0x25, 0x28, 0xcb, 0x25, 0x65, 0x59, 0xa6, 0x4a, 0xd6, - 0x20, 0xda, 0xd2, 0xfd, 0x0b, 0x89, 0x4a, 0x94, 0x39, 0xd2, 0xe6, 0xe4, 0xa6, 0x5b, 0xdd, 0x17, - 0x5a, 0x3f, 0x0b, 0xe3, 0x58, 0xe9, 0x54, 0x69, 0x1a, 0x31, 0x2d, 0x68, 0x3d, 0x8f, 0x44, 0xc9, - 0xe6, 0x34, 0x56, 0xd2, 0xe1, 0xc1, 0x79, 0x78, 0xee, 0x49, 0x13, 0x29, 0x14, 0xbb, 0xac, 0xe0, - 0x8f, 0x59, 0xc1, 0x52, 0x1d, 0x3c, 0x85, 0x9b, 0xbd, 0x61, 0x28, 0x74, 0xae, 0x32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 0xcc, 0x3b, 0xc9, 0xdf, 0x6f, 0xef, 0xec, 0x2d, 0x31, 0xd8, 0x5f, 0x62, - 0xf0, 0x6b, 0x89, 0xc1, 0xe7, 0x15, 0x1e, 0xec, 0xaf, 0xf0, 0xe0, 0xc7, 0x0a, 0x0f, 0x9e, 0xdd, - 0x4c, 0x64, 0xf9, 0xa2, 0x8a, 0x48, 0xac, 0x52, 0x63, 0x71, 0x27, 0x13, 0xe5, 0xae, 0x2a, 0x5e, - 0x5a, 0xbf, 0xfa, 0x1e, 0x7d, 0xd3, 0x9a, 0x46, 0x43, 0xf3, 0x89, 0xef, 0xfe, 0x09, 0x00, 0x00, - 0xff, 0xff, 0xdb, 0xa4, 0x94, 0xa5, 0x67, 0x03, 0x00, 0x00, + // 493 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x41, 0x6f, 0xd3, 0x30, + 0x18, 0xad, 0xb3, 0xad, 0x03, 0x97, 0x81, 0x30, 0x08, 0x75, 0x81, 0x25, 0x25, 0x80, 0x28, 0x20, + 0x6c, 0xb5, 0x48, 0x48, 0x48, 0x20, 0xb1, 0xee, 0x0f, 0x40, 0xc4, 0x05, 0x2e, 0x93, 0x53, 0x9b, + 0x60, 0x41, 0xe2, 0x10, 0x3b, 0x1d, 0x08, 0x21, 0x21, 0x2e, 0x70, 0x9c, 0xc4, 0x95, 0x1f, 0xb4, + 0xe3, 0x24, 0x2e, 0x9c, 0x00, 0xb5, 0xfc, 0x10, 0x14, 0xdb, 0x99, 0x46, 0x2b, 0xd8, 0x6e, 0x8e, + 0xdf, 0x7b, 0x9f, 0xdf, 0xf7, 0x5e, 0xe0, 0xc5, 0x2a, 0xe3, 0x9c, 0xd0, 0x6a, 0xac, 0x85, 0xcc, + 0xc9, 0x64, 0x40, 0x5e, 0x57, 0xbc, 0x7c, 0x8b, 0x8b, 0x52, 0x6a, 0x89, 0xce, 0x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x66, 0x68, 0xd2, 0x36, 0x4d, 0xdc, 0xf9, + 0x13, 0x00, 0x00, 0xff, 0xff, 0x1a, 0xdb, 0xd8, 0xe9, 0xc7, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -495,6 +510,14 @@ func (m *QueryRewardAuctionResponse) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l + n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.EndsAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndsAt):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintQuery(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x2a { size, err := m.UsdRewards.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -598,6 +621,8 @@ func (m *QueryRewardAuctionResponse) Size() (n int) { } l = m.UsdRewards.Size() n += 1 + l + sovQuery(uint64(l)) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndsAt) + n += 1 + l + sovQuery(uint64(l)) return n } @@ -956,6 +981,39 @@ func (m *QueryRewardAuctionResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EndsAt", 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 := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.EndsAt, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) From 75c4953e5c41067034dc7221016b2270ef3b0685 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Mon, 25 Mar 2024 16:07:39 +0100 Subject: [PATCH 10/10] Apply suggestions from code review Co-authored-by: Sai Kumar <17549398+gsk967@users.noreply.github.com> --- proto/umee/auction/v1/genesis.proto | 2 +- proto/umee/auction/v1/query.proto | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/umee/auction/v1/genesis.proto b/proto/umee/auction/v1/genesis.proto index b77340c27a..a266765d19 100644 --- a/proto/umee/auction/v1/genesis.proto +++ b/proto/umee/auction/v1/genesis.proto @@ -17,7 +17,7 @@ message GenesisState { // Latest active (in bid phase) reward auction. uint32 reward_auction_id = 2; // Latest highest bid. - string highest_bidder = 3; + string highest_bidder = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // Tokens collected for the current auction. repeated cosmos.base.v1beta1.Coin current_rewards = 4 [(gogoproto.nullable) = false]; // Tokens collected for the next auction, while the current reward auction is still in the diff --git a/proto/umee/auction/v1/query.proto b/proto/umee/auction/v1/query.proto index 66e563712d..38f33abffa 100644 --- a/proto/umee/auction/v1/query.proto +++ b/proto/umee/auction/v1/query.proto @@ -18,7 +18,7 @@ service Query { // RewardAuction queries the information of the auction by ID. If ID is ommitted, returns // current reward auction params. rpc RewardAuction(QueryRewardAuction) returns (QueryRewardAuctionResponse) { - option (google.api.http).get = "/umee/auction/v1/rewards/{id}"; + option (google.api.http).get = "/umee/auction/v1/rewards"; } }