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,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9d, + 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, 0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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, 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, 0x4b, 0xc8, 0xcf, 0x92, 0x2e, 0x92, 0xdd, + 0xb2, 0xbb, 0x49, 0xfb, 0x18, 0x3e, 0x90, 0x0f, 0xd0, 0x63, 0x8f, 0x9e, 0x44, 0xdb, 0x17, 0x91, + 0x64, 0xb7, 0x28, 0x7a, 0xf1, 0xb6, 0x3b, 0xf3, 0xcd, 0x7c, 0xc3, 0x7c, 0xd6, 0x51, 0x59, 0x60, + 0x8c, 0xe2, 0x32, 0x95, 0x84, 0x51, 0x54, 0xf9, 0x28, 0xc7, 0x14, 0x0b, 0x22, 0xe0, 0x8c, 0x33, + 0xc9, 0xec, 0x61, 0x4d, 0x43, 0x4d, 0xc3, 0xca, 0x1f, 0x81, 0x94, 0x89, 0x82, 0x09, 0x94, 0xc4, + 0x02, 0xa3, 0xca, 0x4f, 0xb0, 0x8c, 0x7d, 0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xe3, 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, 0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8e, 0x14, 0x0f, 0x77, 0x71, 0xdb, 0x0a, 0xcd, 0x85, - 0xa9, 0xb1, 0x63, 0x5f, 0x85, 0x2f, 0x30, 0x4e, 0x15, 0x3f, 0x4f, 0x32, 0xc8, 0xb5, 0xf3, 0x74, - 0xfb, 0xd4, 0xcf, 0x53, 0x5e, 0x05, 0xf5, 0x57, 0x41, 0x5f, 0x82, 0xd2, 0x1e, 0xac, 0x93, 0x2a, - 0x7e, 0x52, 0x39, 0xc2, 0x6d, 0xdc, 0x52, 0x3c, 0xda, 0xe8, 0xa1, 0xc1, 0x56, 0xdc, 0x52, 0xfc, - 0x78, 0xb3, 0x64, 0xf5, 0xe1, 0xfd, 0x3d, 0x7c, 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, + 0xe0, 0xc1, 0x87, 0xd8, 0x83, 0x87, 0xe2, 0xc9, 0x93, 0xe8, 0xee, 0xc1, 0xd7, 0x90, 0xc9, 0x64, + 0x58, 0x5b, 0x07, 0xe9, 0x6d, 0xbe, 0xf9, 0xe7, 0xff, 0xff, 0x7e, 0xdf, 0x97, 0xe0, 0xa8, 0xc8, + 0x84, 0x60, 0x49, 0x31, 0xb5, 0x0a, 0x72, 0x56, 0x8e, 0x98, 0xbd, 0xa4, 0x33, 0x0d, 0x16, 0xc2, + 0xbb, 0x95, 0x42, 0xbd, 0x42, 0xcb, 0x51, 0x9f, 0x4c, 0xc1, 0x64, 0x60, 0x58, 0x9a, 0x18, 0xc1, + 0xca, 0x51, 0x2a, 0x6c, 0x32, 0x62, 0x53, 0x50, 0x79, 0x6d, 0xe8, 0xef, 0xd6, 0xfa, 0x99, 0xab, + 0x58, 0x5d, 0x78, 0x69, 0xc7, 0x5b, 0x33, 0x23, 0xab, 0x1e, 0x99, 0x91, 0x5e, 0xd8, 0x92, 0x20, + 0xa1, 0x36, 0x54, 0x5f, 0xfe, 0xef, 0x83, 0x9b, 0x50, 0x0d, 0x85, 0x93, 0x87, 0x9f, 0x10, 0xde, + 0x9e, 0x18, 0x79, 0x02, 0xe5, 0xa9, 0xb0, 0xb1,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67, 0x3d, 0xed, 0xf3, 0xf6, 0xd9, + 0x2d, 0x0f, 0x36, 0x8d, 0xc3, 0xd7, 0x18, 0xff, 0xb5, 0x14, 0xd2, 0x66, 0x5f, 0xe9, 0xfd, 0x47, + 0xff, 0xd7, 0x9b, 0xd4, 0xf1, 0xc9, 0xfc, 0x17, 0x09, 0xe6, 0x0b, 0x82, 0xae, 0x16, 0x04, 0xfd, + 0x5c, 0x10, 0xf4, 0x71, 0x49, 0x82, 0xab, 0x25, 0x09, 0xbe, 0x2f, 0x49, 0xf0, 0xe6, 0x89, 0x54, + 0xf6, 0xbc, 0x48, 0xe9, 0x14, 0x32, 0x56, 0xe5, 0xed, 0xe7, 0xc2, 0x5e, 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:])