QueryMsg

The only difference when handling query messages in the fixed multisig ADO is the use of the. #[andr_query]attribute. Just like #[andr_instantiate] and #[andr_exec], this macro ensures that the common ADO queries are included.

msg.rs
#[andr_query]
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    ...
}

This case is handled here:

contract.rs
#[cfg_attr(not(feature = "library"), entry_point)]
pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> Result<Binary, ContractError> {
    match msg {
    
        /// handle base queries
        _ => ADOContract::default().query(deps, env, msg),
    }
}

The remaining logic for the queries is the same as in both the CW3 and ADO versions.

Last updated

Was this helpful?