Skip to content

Commit

Permalink
feat(cognitarium): add dummy store query impl
Browse files Browse the repository at this point in the history
  • Loading branch information
amimart committed Jun 1, 2023
1 parent c5b6119 commit e30e507
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions contracts/okp4-cognitarium/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
use crate::contract::execute::insert;
#[cfg(not(feature = "library"))]
use cosmwasm_std::entry_point;
use cosmwasm_std::{Binary, Deps, DepsMut, Env, MessageInfo, Response, StdError, StdResult};
use cosmwasm_std::{
to_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdError, StdResult,
};
use cw2::set_contract_version;

use crate::error::ContractError;
Expand Down Expand Up @@ -71,8 +73,20 @@ pub mod execute {
}

#[cfg_attr(not(feature = "library"), entry_point)]
pub fn query(_deps: Deps, _env: Env, _msg: QueryMsg) -> StdResult<Binary> {
Err(StdError::generic_err("Not implemented"))
pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult<Binary> {
match msg {
QueryMsg::Store => to_binary(&query::store(deps)?),
_ => Err(StdError::generic_err("Not implemented")),
}
}

pub mod query {
use super::*;
use crate::msg::StoreStat;

pub fn store(deps: Deps) -> StdResult<StoreStat> {
Err(StdError::generic_err("Not implemented"))
}
}

#[cfg(test)]
Expand Down

0 comments on commit e30e507

Please sign in to comment.