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

feat: add SupplyFromModule and WithdrawFromModule to leverage #2170

Merged
merged 6 commits into from
Jul 27, 2023

Conversation

toteki
Copy link
Member

@toteki toteki commented Jul 27, 2023

This is meant to be merged into the metoken endblocker branch

It allows created SupplyFromModule and WithdrawFromModule which distinguish recoverable from nonrecoverable errors, and allows module-specific logic to be used in these functions in the future.

@toteki toteki requested review from a team as code owners July 27, 2023 00:03
@toteki
Copy link
Member Author

toteki commented Jul 27, 2023

Note: @kosegor could you regenerate the mock keepers using whichever mock gen you used originally? I changed the leverage keeper's signature.

Copy link
Member

@robert-zaremba robert-zaremba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pre-approving. Let's move the error in the return params to the last position

x/leverage/keeper/keeper.go Outdated Show resolved Hide resolved
x/leverage/keeper/keeper.go Show resolved Hide resolved
x/metoken/keeper/redeem.go Outdated Show resolved Hide resolved
x/leverage/keeper/keeper.go Outdated Show resolved Hide resolved
x/leverage/keeper/keeper.go Outdated Show resolved Hide resolved
@kosegor
Copy link
Contributor

kosegor commented Jul 27, 2023

Note: @kosegor could you regenerate the mock keepers using whichever mock gen you used originally? I changed the leverage keeper's signature.

pushed regenerated mocks

@kosegor kosegor merged commit db96bfb into egor/metoken-end-block Jul 27, 2023
@kosegor kosegor deleted the adam/modulesupply branch July 27, 2023 13:44
github-merge-queue bot pushed a commit that referenced this pull request Jul 27, 2023
* reserves and interest refeactored

* tests adapted (not working yet)

* endblock funcs

* Update x/metoken/keeper/redeem.go

Co-authored-by: Adam Moser <63419657+toteki@users.noreply.github.com>

* adam comments

* fix mocks

* safeguard for transferring dust

* robert comments

* fix

* safer exit when asset not found

* imports

* feat: add SupplyFromModule and WithdrawFromModule to leverage (#2170)

* 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>

* new integration with x/leverage

* fix after merge from main

* unit mocks

* fix

* better logs

* couple more comments

---------

Co-authored-by: Adam Moser <63419657+toteki@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants