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

Generalize controllers #408

Closed
hashedone opened this issue Sep 9, 2021 · 0 comments · Fixed by #417
Closed

Generalize controllers #408

hashedone opened this issue Sep 9, 2021 · 0 comments · Fixed by #417
Assignees
Milestone

Comments

@hashedone
Copy link
Contributor

cw-controllers are using CosmosMsg<Empty> (and relatives) when it comes to messaging. This is an issue, as it makes them unusable in chains which have their specific custom message (and there is no way to simply map those). The solution is simple - as those utilities are never using Custom, instead of returning cosmwasm_std::Response, they should return generic cosmwasm_std::Response<T>, for eg the cw_controllers::Admin::execute_udpate_admin may look like:

pub fn execute_update_admin<C>(...) -> Result<Response<C> { ... }

C should be easy to infer, as those calls are used to directly return them.

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 a pull request may close this issue.

2 participants