-
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: x/metoken end block functions #2167
Conversation
// todo: add interest claiming | ||
func EndBlocker(k keeper.Keeper) []abci.ValidatorUpdate { | ||
util.Panic(k.ClaimInterest()) | ||
util.Panic(k.RebalanceReserves()) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
// todo: add interest claiming | ||
func EndBlocker(k keeper.Keeper) []abci.ValidatorUpdate { | ||
util.Panic(k.ClaimInterest()) | ||
util.Panic(k.RebalanceReserves()) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
Co-authored-by: Adam Moser <63419657+toteki@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## main #2167 +/- ##
==========================================
- Coverage 75.38% 69.44% -5.95%
==========================================
Files 100 150 +50
Lines 8025 11470 +3445
==========================================
+ Hits 6050 7965 +1915
- Misses 1589 2966 +1377
- Partials 386 539 +153
|
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.
Please double check all errors which are going to EndBlocker. We should avoid possible panics
// todo: add reserves re-balancing | ||
// todo: add interest claiming | ||
func EndBlocker(k keeper.Keeper) []abci.ValidatorUpdate { | ||
util.Panic(k.ClaimLeverageInterest()) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
// todo: add reserves re-balancing | ||
// todo: add interest claiming | ||
func EndBlocker(k keeper.Keeper) []abci.ValidatorUpdate { | ||
util.Panic(k.ClaimLeverageInterest()) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
* add module-based supply and withdraw to leverage module * cl++ * change return order * godoc++ and function order * mocks * mocks --------- Co-authored-by: Egor Kostetskiy <kosegor@gmail.com>
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.
lgtm, few small things to resolve only
This PR contains: