Skip to content

Incorrect Cw4ExecuteMsg used during remove_hook #637

@sushiwushi

Description

@sushiwushi

Quoting from https://github.com/CosmWasm/cw-plus/blob/main/packages/cw4/src/helpers.rs#L45-L48:

pub fn remove_hook<T: Into<String>>(&self, addr: T) -> StdResult<CosmosMsg> {
        let msg = Cw4ExecuteMsg::AddHook { addr: addr.into() }; //uses AddHook instead of RemoveHook
        self.encode_msg(msg)
    }

Probably should be:

pub fn remove_hook<T: Into<String>>(&self, addr: T) -> StdResult<CosmosMsg> {
        let msg = Cw4ExecuteMsg::RemoveHook { addr: addr.into() };
        self.encode_msg(msg)
    }

PS: This was found during an audit.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions