Crates.io | dao-dao-macros |
lib.rs | dao-dao-macros |
version | 2.6.0 |
source | src |
created_at | 2023-07-03 12:34:59.466187 |
updated_at | 2024-11-07 23:42:06.729916 |
description | A package macros for deriving DAO module interfaces. |
homepage | |
repository | https://github.com/DA0-DA0/dao-contracts |
max_upload_size | |
id | 906963 |
size | 16,224 |
This package provides a collection of macros that may be used to derive DAO module interfaces on message enums. For example, to derive the voting module interface on an enum:
use cosmwasm_schema::{cw_serde, QueryResponses};
use dao_dao_macros::{cw20_token_query, voting_module_query};
use dao_interface::voting::TotalPowerAtHeightResponse;
use dao_interface::voting::VotingPowerAtHeightResponse;
#[cw20_token_query]
#[voting_module_query]
#[cw_serde]
#[derive(QueryResponses)]
pub enum Query {}