nibiru-ownable-derive
Macros for generating code used by the
nibiru-ownablecrate.
nibiru-ownable-derive provides procedural macros that automatically inject ownership-related message variants into your CosmWasm contract's ExecuteMsg and QueryMsg enums, eliminating boilerplate code.
Macros
#[ownable_execute]
Adds an UpdateOwnership(nibiru_ownable::Action) variant to your ExecuteMsg enum:
use cw_serde;
use ownable_execute;
// Must be applied before #[cw_serde]
Expands to:
#[ownable_query]
Adds an Ownership {} variant to your QueryMsg enum:
use ;
use ownable_query;
// Must be applied before #[cw_serde]
Expands to:
Usage
Add both crates to your Cargo.toml:
[]
= "0.6.0"
= "0.6.0"
Import the macros from nibiru-ownable (they are re-exported):
use ;
Documentation
For detailed API documentation, visit docs.rs/nibiru-ownable-derive.
License
Contents of this crate at or prior to version 0.5.0 are published under GNU Affero General Public License v3 or later; contents after the said version are published under Apache-2.0 license.