Skip to content

Commit

Permalink
Remove boot / cw-orch, get cw-multi-test working with custom messages
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeHartnell committed Jul 9, 2023
1 parent 1bef4d8 commit 1ac6a88
Show file tree
Hide file tree
Showing 8 changed files with 209 additions and 160 deletions.
68 changes: 1 addition & 67 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions contracts/external/cw-abc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ crate-type = ["cdylib", "rlib"]
backtraces = ["cosmwasm-std/backtraces"]
# use library feature to disable all instantiate/execute/query exports
library = []
boot = ["dep:cw-orch"]
# interface = ["dep:cw-orch"] # Adds the dependency when the feature is enabled

[dependencies]
cw-utils = { workspace = true }
Expand All @@ -35,18 +35,17 @@ rust_decimal = "1.14.3"
integer-sqrt = "0.1.5"
integer-cbrt = "0.1.2"
getrandom = { version = "0.2", features = ["js"] }
# TODO publish this
# TODO publish this and move to workspace
token-bindings = { git = "https://github.com/CosmosContracts/token-bindings", rev = "1412b94" }
cw-ownable = { workspace = true }
cw-paginate-storage = { workspace = true }
cw-orch = { version = "0.13.3", optional = true, git = "https://github.com/AbstractSDK/cw-orchestrator", branch = "main" }
# cw-orch = { version = "0.13.3", optional = true }

[dev-dependencies]
# TODO move to workspace
speculoos = "0.11.0"
#cw-multi-test = { version = "0.16.0" }
anyhow = { workspace = true }
cw-abc = { path = ".", features = ["boot"] }
cw-multi-test = { workspace = true }

[profile.release]
rpath = false
Expand Down
43 changes: 0 additions & 43 deletions contracts/external/cw-abc/src/boot.rs

This file was deleted.

9 changes: 6 additions & 3 deletions contracts/external/cw-abc/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ use std::collections::HashSet;

use token_bindings::{TokenFactoryMsg, TokenFactoryQuery, TokenMsg};

use crate::abc::CurveFn;
use crate::abc::{CommonsPhase, CurveFn};
use crate::curves::DecimalPlaces;
use crate::error::ContractError;
use crate::msg::{ExecuteMsg, InstantiateMsg, QueryMsg, UpdatePhaseConfigMsg};
use crate::state::{
CurveState, CURVE_STATE, CURVE_TYPE, HATCHER_ALLOWLIST, PHASE_CONFIG, SUPPLY_DENOM,
CurveState, CURVE_STATE, CURVE_TYPE, HATCHER_ALLOWLIST, PHASE, PHASE_CONFIG, SUPPLY_DENOM,
};
use crate::{commands, queries};
use cw_utils::nonpayable;

// version info for migration info
pub(crate) const CONTRACT_NAME: &str = "crates.io:cw20-abc";
pub(crate) const CONTRACT_NAME: &str = "crates.io:cw-abc";
const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION");

// By default, the prefix for token factory tokens is "factory"
Expand Down Expand Up @@ -86,6 +86,9 @@ pub fn instantiate(

PHASE_CONFIG.save(deps.storage, &phase_config)?;

// TODO don't hardcode this?
PHASE.save(deps.storage, &CommonsPhase::Hatch)?;

cw_ownable::initialize_owner(deps.storage, deps.api, Some(info.sender.as_str()))?;

Ok(Response::default().add_message(create_supply_denom_msg))
Expand Down

0 comments on commit 1ac6a88

Please sign in to comment.