-
Notifications
You must be signed in to change notification settings - Fork 607
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: cosmwasmpool core logic and tests #5354
Conversation
// represents a pool that was stored in the keeper. | ||
// - An error if unmarshalling fails for any of the values fetched from the store. | ||
// In this case, the slice of PoolI interfaces will be nil. | ||
func (k Keeper) GetPools(ctx sdk.Context) ([]poolmanagertypes.PoolI, error) { |
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.
who can call this? I'm concerned about performance as this is a linear operation. Right now this is probably limited by the whitelist, but if we open it up it may be a problem.
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.
This is currently exposed as a query to frontend. For every pool module, we have a similar query. x/poolmanager
exposes an AllPools
query that gets pools from every module. This is not an issue.
However, we should avoid exposing this to stargate whitelist
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.
Added a few nits, but other than that, this looks good to me
Addressed all comments. Going to merge once CI passes. Thanks @nicolaslara |
* feat: cosmwasmpool core logic and tests * changelog * updates * updates * rename cast helpers * rename * remove error check
Closes: #XXX
What is the purpose of the change
This is the core logic and full integration of
x/cosmwasmpool
into the rest of the system.It is tested with the version of transmuter contract as of
main
branch here: https://github.com/osmosis-labs/transmuterSpec: https://github.com/osmosis-labs/osmosis/tree/main/x/cosmwasmpool
The remaining steps are:
Testing and Verifying
This change added tests
Documentation and Release Note
Unreleased
section ofCHANGELOG.md
?Where is the change documented?
x/{module}/README.md
)