Skip to content

Commit

Permalink
Refactoring. (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
DariuszDepta authored Oct 10, 2024
1 parent 19eb52b commit f7556e9
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 2 additions & 0 deletions src/test_helpers/gov.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg(feature = "stargate")]

use crate::{Contract, ContractWrapper};
use cosmwasm_std::{
Binary, CosmosMsg, Deps, DepsMut, Empty, Env, GovMsg, MessageInfo, Response, StdResult,
Expand Down
2 changes: 2 additions & 0 deletions src/test_helpers/ibc.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg(feature = "stargate")]

use crate::{Contract, ContractWrapper};
use cosmwasm_std::{
Binary, CosmosMsg, Deps, DepsMut, Empty, Env, IbcMsg, MessageInfo, Response, StdResult,
Expand Down
7 changes: 0 additions & 7 deletions src/test_helpers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@

use cosmwasm_schema::cw_serde;
use cosmwasm_std::CustomMsg;
use cw_storage_plus::Item;

pub mod caller;
pub mod echo;
pub mod error;
#[cfg(feature = "stargate")]
pub mod gov;
pub mod hackatom;
#[cfg(feature = "stargate")]
pub mod ibc;
pub mod payout;
pub mod reflect;
#[cfg(feature = "stargate")]
pub mod stargate;

/// Custom message for testing purposes.
Expand All @@ -33,6 +29,3 @@ pub enum CustomHelperMsg {
}

impl CustomMsg for CustomHelperMsg {}

/// Persisted counter for testing purposes.
pub const COUNT: Item<u32> = Item::new("count");
2 changes: 1 addition & 1 deletion src/test_helpers/payout.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use crate::test_helpers::COUNT;
use crate::{Contract, ContractWrapper};
use cosmwasm_schema::cw_serde;
use cosmwasm_std::{
Expand Down Expand Up @@ -28,6 +27,7 @@ pub struct CountResponse {
pub count: u32,
}

const COUNT: Item<u32> = Item::new("count");
const PAYOUT: Item<InstantiateMessage> = Item::new("payout");

fn instantiate(
Expand Down
5 changes: 3 additions & 2 deletions src/test_helpers/reflect.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use crate::test_helpers::{payout, CustomHelperMsg, COUNT};
use crate::test_helpers::{payout, CustomHelperMsg};
use crate::{Contract, ContractWrapper};
use cosmwasm_schema::cw_serde;
use cosmwasm_std::{
to_json_binary, Binary, Deps, DepsMut, Empty, Env, Event, MessageInfo, Reply, Response,
StdError, SubMsg,
};
use cw_storage_plus::Map;
use cw_storage_plus::{Item, Map};

#[cw_serde]
pub struct Message {
Expand All @@ -18,6 +18,7 @@ pub enum QueryMsg {
Reply { id: u64 },
}

const COUNT: Item<u32> = Item::new("count");
const REFLECT: Map<u64, Reply> = Map::new("reflect");

fn instantiate(
Expand Down
2 changes: 2 additions & 0 deletions src/test_helpers/stargate.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg(feature = "stargate")]

use crate::{Contract, ContractWrapper};
use cosmwasm_std::{
Binary, CosmosMsg, Deps, DepsMut, Empty, Env, MessageInfo, Response, StdResult,
Expand Down

0 comments on commit f7556e9

Please sign in to comment.