-
Notifications
You must be signed in to change notification settings - Fork 162
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
feature(auction) genesis #2517
feature(auction) genesis #2517
Conversation
WalkthroughThe recent updates in the Changes
Poem
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: 1
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
x/auction/genesis.pb.go
is excluded by!**/*.pb.go
,!**/*.pb.go
Files selected for processing (6)
- proto/umee/auction/v1/genesis.proto (2 hunks)
- x/auction/genesis.go (1 hunks)
- x/auction/keeper/genesis.go (1 hunks)
- x/auction/keeper/grpc_query.go (1 hunks)
- x/auction/keeper/rewards.go (2 hunks)
- x/auction/module/module.go (2 hunks)
Additional Context Used
GitHub Check Runs (1)
Run golangci-lint failure (5)
x/auction/module/module.go: [failure] 136-136:
Error return value of(github.com/umee-network/umee/v6/x/auction/keeper.Keeper).InitGenesis
is not checked (errcheck)
x/auction/module/module.go: [failure] 21-21:
File is notgoimports
-ed (goimports)
Additional comments not posted (14)
x/auction/keeper/genesis.go (2)
8-22
: Changes inExportGenesis
function handle errors effectively and constructGenesisState
correctly.
25-37
: Changes inInitGenesis
function handle errors effectively and manage rewards data correctly.proto/umee/auction/v1/genesis.proto (3)
17-21
: Addition ofrewards_auctions
andrewards_bids
fields inGenesisState
are correctly defined.
23-27
:RewardsKV
message is correctly defined with appropriate field types.
29-32
:BidKV
message is correctly defined with appropriate field types.x/auction/genesis.go (2)
9-17
: Initialization ofGenesisState
inDefaultGenesis
function is correctly implemented.
21-41
: Validation logic inValidate
method ofGenesisState
is correctly implemented.x/auction/keeper/grpc_query.go (1)
32-32
: The added comment inRewardsAuction
method clarifies the return values effectively.x/auction/keeper/rewards.go (5)
49-49
: Renaming ofcurrentRewardsAuctionID
function is consistent with the described changes.
102-114
: Implementation ofgetAllRewardsBids
function is correct and handles errors effectively.
117-125
: Implementation ofstoreAllRewardsBids
function is correct and handles errors effectively.
138-150
: Implementation ofgetAllRewardsAuctions
function is correct and handles errors effectively.
159-167
: Implementation ofstoreAllRewardsAuctions
function is correct and handles errors effectively.x/auction/module/module.go (1)
20-20
: Addition of the import statement forgithub.com/umee-network/umee/v6/util
is necessary for the changes inExportGenesis
.
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.
utACK,
Small suggestion , can you add
func nextRewardsID(currentId int) int {
...
}
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 selected for processing (2)
- x/auction/keeper/rewards.go (2 hunks)
- x/auction/module/module.go (2 hunks)
Files skipped from review as they are similar to previous changes (2)
- x/auction/keeper/rewards.go
- x/auction/module/module.go
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2517 +/- ##
===========================================
- Coverage 75.38% 63.16% -12.23%
===========================================
Files 100 273 +173
Lines 8025 15782 +7757
===========================================
+ Hits 6050 9968 +3918
- Misses 1589 5042 +3453
- Partials 386 772 +386
|
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: 1
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- x/auction/keeper/genesis_test.go (1 hunks)
- x/auction/keeper/init_test.go (1 hunks)
- x/ugov/keeper/intest/keeper.go (2 hunks)
- x/uibc/quota/unit_test.go (2 hunks)
Additional comments not posted (3)
x/ugov/keeper/intest/keeper.go (1)
17-17
: LGTM! The initialization ofugov.Keeper
appears clean and isolated, suitable for testing purposes.x/auction/keeper/init_test.go (1)
17-26
: LGTM! The initialization ofKeeper
for the auction module is well-structured for testing purposes.x/uibc/quota/unit_test.go (1)
22-22
: LGTM! The initialization ofKeeper
for the UIBC quota module is well-structured for testing purposes.
Description