Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: adding events to msg bid txn #2570

Merged
merged 3 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 rewward.
gsk967 marked this conversation as resolved.
Show resolved Hide resolved
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 @@
if err := k.rewardsBid(msg); err != nil {
return nil, err
}

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

Check warning on line 61 in x/auction/keeper/msg_server.go

View check run for this annotation

Codecov / codecov/patch

x/auction/keeper/msg_server.go#L57-L61

Added lines #L57 - L61 were not covered by tests
gsk967 marked this conversation as resolved.
Show resolved Hide resolved

return &auction.MsgRewardsBidResponse{}, nil
}
Loading