Skip to content

Commit

Permalink
add events
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-zaremba committed Mar 22, 2024
1 parent a3e3a8f commit f0e86d8
Show file tree
Hide file tree
Showing 6 changed files with 538 additions and 115 deletions.
18 changes: 18 additions & 0 deletions proto/umee/auction/v1/events.proto
Original file line number Diff line number Diff line change
@@ -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];
}
13 changes: 7 additions & 6 deletions proto/umee/auction/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
6 changes: 3 additions & 3 deletions proto/umee/auction/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit f0e86d8

Please sign in to comment.