Skip to content

Commit

Permalink
chore: adding events to msg bid txn (#2570)
Browse files Browse the repository at this point in the history
* adding events to msg bid txn

* proto lint

* fix the grammer
  • Loading branch information
gsk967 authored Jul 8, 2024
1 parent 2966992 commit 17328ba
Show file tree
Hide file tree
Showing 3 changed files with 275 additions and 21 deletions.
7 changes: 7 additions & 0 deletions proto/umee/auction/v1/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,10 @@ message EventRewardsAuctionResult {
message EventFundRewardsAuction {
repeated cosmos.base.v1beta1.Coin assets = 1 [(gogoproto.nullable) = false];
}

// EventRewardsBid is emitted when the user bid the auction reward.
message EventRewardsBid {
string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
uint32 id = 2;
cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false];
}
282 changes: 261 additions & 21 deletions x/auction/events.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions x/auction/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,12 @@ func (m msgServer) RewardsBid(ctx context.Context, msg *auction.MsgRewardsBid) (
if err := k.rewardsBid(msg); err != nil {
return nil, err
}

sdkutil.Emit(&sdkCtx, &auction.EventRewardsBid{
Sender: msg.Sender,
Id: msg.Id,
Amount: msg.Amount,
})

return &auction.MsgRewardsBidResponse{}, nil
}

0 comments on commit 17328ba

Please sign in to comment.