Skip to content

Generalize controllers #408

@hashedone

Description

@hashedone

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions