ownable_execute

Attribute Macro ownable_execute 

Source
#[ownable_execute]
Expand description

Append ownership-related execute message variant(s) to an enum.

For example, apply the ownable_execute macro to the following enum:

extern crate cosmwasm_schema; // not to be copied
extern crate nibiru_ownable;  // not to be copied
use cosmwasm_schema::cw_serde;
use nibiru_ownable::ownable_execute;

#[ownable_execute]
#[cw_serde]
enum ExecuteMsg {
    Foo {},
    Bar {},
}

Is equivalent to:

extern crate cosmwasm_schema; // not to be copied
extern crate nibiru_ownable;  // not to be copied
use cosmwasm_schema::cw_serde;
use nibiru_ownable::Action;

#[cw_serde]
enum ExecuteMsg {
    UpdateOwnership(Action),
    Foo {},
    Bar {},
}

let _msg = ExecuteMsg::Foo{};

Note: #[ownable_execute] must be applied before #[cw_serde].