-
Notifications
You must be signed in to change notification settings - Fork 170
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
feat(auction): finalize events #2525
Conversation
WalkthroughThe recent updates streamline the auction module in the Umee project. Key changes include the removal of the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
x/auction/events.pb.go
is excluded by!**/*.pb.go
,!**/*.pb.go
x/auction/query.pb.go
is excluded by!**/*.pb.go
,!**/*.pb.go
Files selected for processing (3)
- proto/umee/auction/v1/events.proto (1 hunks)
- proto/umee/auction/v1/query.proto (1 hunks)
- x/auction/keeper/rewards.go (2 hunks)
Files skipped from review due to trivial changes (1)
- proto/umee/auction/v1/query.proto
Additional comments not posted (3)
proto/umee/auction/v1/events.proto (1)
Line range hint
8-12
: Therewards
field has been removed from theEventRewardsAuctionResult
message. Ensure that all references to this field have been removed or updated in the codebase to prevent any runtime errors.Verification successful
The
rewards
field has been successfully removed from theEventRewardsAuctionResult
message inproto/umee/auction/v1/events.proto
, and no references to this field remain in the codebase.
- The
EventRewardsAuctionResult
message now only containsid
andbidder
fields.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that there are no references to the removed `rewards` field in the codebase. # Test: Search for references to the `rewards` field in the codebase. Expect: No matches. rg --type proto 'repeated cosmos.base.v1beta1.Coin rewards'Length of output: 91
Script:
#!/bin/bash # Description: Verify that there are no references to the removed `rewards` field in the codebase. # Test: Search for references to the `rewards` field in the codebase. Expect: No matches. rg 'repeated cosmos.base.v1beta1.Coin rewards'Length of output: 450
Script:
#!/bin/bash # Description: Extract the `EventRewardsAuctionResult` message from `proto/umee/auction/v1/auction.proto` to verify the removal of the `rewards` field. # Test: Extract the `EventRewardsAuctionResult` message definition. rg -A 10 'message EventRewardsAuctionResult' proto/umee/auction/v1/auction.protoLength of output: 82
Script:
#!/bin/bash # Description: Locate the `EventRewardsAuctionResult` message definition across all `.proto` files to verify the removal of the `rewards` field. # Test: Search for the `EventRewardsAuctionResult` message definition. rg 'message EventRewardsAuctionResult' --type protoLength of output: 83
Script:
#!/bin/bash # Description: Locate the `EventRewardsAuctionResult` message definition across all files to verify the removal of the `rewards` field. # Test: Search for the `EventRewardsAuctionResult` message definition. rg 'message EventRewardsAuctionResult'Length of output: 111
Script:
#!/bin/bash # Description: Extract the `EventRewardsAuctionResult` message from `proto/umee/auction/v1/events.proto` to verify the removal of the `rewards` field. # Test: Extract the `EventRewardsAuctionResult` message definition. rg -A 10 'message EventRewardsAuctionResult' proto/umee/auction/v1/events.protoLength of output: 403
x/auction/keeper/rewards.go (2)
14-14
: The import statement forsdkutil
is necessary for emitting theEventRewardsAuctionResult
event. This change is appropriate.
37-40
: TheEventRewardsAuctionResult
event is emitted correctly usingsdkutil.Emit
. Ensure that theid
andbidder
fields are correctly populated and that the event emission logic aligns with the intended auction finalization process.Verification successful
The
EventRewardsAuctionResult
event is emitted correctly usingsdkutil.Emit
, with theid
andbidder
fields properly populated.
- The
id
field is directly assigned.- The
bidder
field is correctly converted to a string usingsdk.AccAddress(bid.Bidder).String()
.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the `id` and `bidder` fields are correctly populated in the `EventRewardsAuctionResult` event. # Test: Search for the `FinalizeRewardsAuction` function to ensure the correct population of event fields. Expect: Correct population of `id` and `bidder`. rg --type go 'func FinalizeRewardsAuction' -A 20Length of output: 50
Script:
#!/bin/bash # Description: Verify the existence and implementation of the `FinalizeRewardsAuction` function. # Test: Search for the `FinalizeRewardsAuction` function to ensure the correct population of event fields. Expect: Correct population of `id` and `bidder`. ast-grep --lang go --pattern 'func FinalizeRewardsAuction($_) { $$$ }'Length of output: 74
Script:
#!/bin/bash # Description: Verify the existence and implementation of the `FinalizeRewardsAuction` function and inspect the `rewards.go` file. # Test 1: Search for the `FinalizeRewardsAuction` function to ensure the correct population of event fields. Expect: Correct population of `id` and `bidder`. rg 'func FinalizeRewardsAuction' -A 20 # Test 2: Inspect the `rewards.go` file for the event emission logic. Expect: Correct population of `id` and `bidder`. rg 'sdkutil.Emit' x/auction/keeper/rewards.go -A 10Length of output: 407
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2525 +/- ##
===========================================
- Coverage 75.38% 62.81% -12.58%
===========================================
Files 100 275 +175
Lines 8025 15870 +7845
===========================================
+ Hits 6050 9968 +3918
- Misses 1589 5130 +3541
- Partials 386 772 +386
|
Description