From 18de0f8d9857006da8890dae6e3579965f80880b Mon Sep 17 00:00:00 2001 From: Dat-Andre <114091333+Dat-Andre@users.noreply.github.com> Date: Mon, 8 May 2023 22:17:13 +0100 Subject: [PATCH] 697 (#702) * update cw-orch dependency * add getrandom dependency to .toml --------- Co-authored-by: Jake Hartnell --- contracts/external/cw-abc/Cargo.toml | 11 ++++++++--- contracts/external/cw-abc/src/boot.rs | 10 +++++----- contracts/external/cw-abc/src/integration.rs | 2 +- contracts/external/cw-abc/src/lib.rs | 8 ++++---- contracts/external/cw-abc/src/msg.rs | 4 ++-- 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/contracts/external/cw-abc/Cargo.toml b/contracts/external/cw-abc/Cargo.toml index 0223dc1b9..d5fdc2b5a 100644 --- a/contracts/external/cw-abc/Cargo.toml +++ b/contracts/external/cw-abc/Cargo.toml @@ -1,7 +1,11 @@ [package] name = "cw-abc" version = "0.0.1" -authors = ["Ethan Frey ", "Jake Hartnell", "Adair "] +authors = [ + "Ethan Frey ", + "Jake Hartnell", + "Adair ", +] edition = { workspace = true } description = "Implements an Augmented Bonding Curve" license = "Apache-2.0" @@ -16,7 +20,7 @@ crate-type = ["cdylib", "rlib"] backtraces = ["cosmwasm-std/backtraces"] # use library feature to disable all instantiate/execute/query exports library = [] -boot = ["dep:boot-core"] +boot = ["dep:cw-orch"] [dependencies] cw-utils = { workspace = true } @@ -30,11 +34,12 @@ cw-address-like = "1.0.4" rust_decimal = "1.14.3" integer-sqrt = "0.1.5" integer-cbrt = "0.1.2" +getrandom = { version = "0.2", features = ["js"] } # TODO publish this token-bindings = { git = "https://github.com/CosmosContracts/token-bindings", rev = "1412b94" } cw-ownable = { workspace = true } cw-paginate-storage = { workspace = true } -boot-core = { version = "0.10.0", optional = true, git = "https://github.com/AbstractSDK/BOOT", branch = "fix/custom_binding_contract_wrapper" } +cw-orch = { version = "0.13.3", optional = true, git = "https://github.com/AbstractSDK/cw-orchestrator", branch = "main" } [dev-dependencies] # TODO move to workspace diff --git a/contracts/external/cw-abc/src/boot.rs b/contracts/external/cw-abc/src/boot.rs index d8376b0e5..ad2309b0b 100644 --- a/contracts/external/cw-abc/src/boot.rs +++ b/contracts/external/cw-abc/src/boot.rs @@ -1,9 +1,9 @@ use crate::msg::*; -use boot_core::{contract, Contract, CwEnv}; -#[cfg(feature = "daemon")] -use boot_core::{ArtifactsDir, Daemon, WasmPath}; -use boot_core::{ContractWrapper, Mock, MockState, TxHandler, Uploadable}; use cosmwasm_std::Empty; +use cw_orch::{contract, Contract, CwEnv}; +#[cfg(feature = "daemon")] +use cw_orch::{ArtifactsDir, Daemon, WasmPath}; +use cw_orch::{ContractWrapper, Mock, MockState, TxHandler, Uploadable}; use token_bindings::{TokenFactoryMsg, TokenFactoryQuery}; #[contract(InstantiateMsg, ExecuteMsg, QueryMsg, Empty)] @@ -18,7 +18,7 @@ impl CwAbc { /// Basic app for the token factory contract /// TODO: should be in the bindings, along with custom handler for multi-test -pub(crate) type TokenFactoryBasicApp = boot_core::BasicApp; +pub(crate) type TokenFactoryBasicApp = cw_orch::BasicApp; type TokenFactoryMock = Mock; diff --git a/contracts/external/cw-abc/src/integration.rs b/contracts/external/cw-abc/src/integration.rs index d6b23b8bc..767dbdf77 100644 --- a/contracts/external/cw-abc/src/integration.rs +++ b/contracts/external/cw-abc/src/integration.rs @@ -1,6 +1,6 @@ use crate::{abc::CurveType, boot::CwAbc}; -use boot_core::{BootUpload, Mock}; use cosmwasm_std::{Addr, Uint128}; +use cw_orch::{CwOrcUpload, Mock}; use crate::testing::prelude::*; diff --git a/contracts/external/cw-abc/src/lib.rs b/contracts/external/cw-abc/src/lib.rs index 5070715b8..24ac48a7d 100644 --- a/contracts/external/cw-abc/src/lib.rs +++ b/contracts/external/cw-abc/src/lib.rs @@ -33,8 +33,8 @@ pub(crate) mod testing { pub(crate) mod prelude { pub use super::{ - default_instantiate_msg, default_supply_metadata, mock_tf_dependencies, TEST_BUYER, - TEST_CREATOR, TEST_INVESTOR, TEST_RESERVE_DENOM, TEST_SUPPLY_DENOM, + default_instantiate_msg, default_supply_metadata, mock_tf_dependencies, TEST_CREATOR, + TEST_RESERVE_DENOM, TEST_SUPPLY_DENOM, _TEST_BUYER, _TEST_INVESTOR, }; pub use crate::msg::{ExecuteMsg, InstantiateMsg, QueryMsg}; pub use speculoos::prelude::*; @@ -42,8 +42,8 @@ pub(crate) mod testing { pub const TEST_RESERVE_DENOM: &str = "satoshi"; pub const TEST_CREATOR: &str = "creator"; - pub const TEST_INVESTOR: &str = "investor"; - pub const TEST_BUYER: &str = "buyer"; + pub const _TEST_INVESTOR: &str = "investor"; + pub const _TEST_BUYER: &str = "buyer"; pub const TEST_SUPPLY_DENOM: &str = "subdenom"; diff --git a/contracts/external/cw-abc/src/msg.rs b/contracts/external/cw-abc/src/msg.rs index c1c30a1ca..92de30f70 100644 --- a/contracts/external/cw-abc/src/msg.rs +++ b/contracts/external/cw-abc/src/msg.rs @@ -41,7 +41,7 @@ pub enum UpdatePhaseConfigMsg { #[cw_ownable::cw_ownable_execute] #[cw_serde] -#[cfg_attr(feature = "boot", derive(boot_core::ExecuteFns))] +#[cfg_attr(feature = "boot", derive(cw_orch::ExecuteFns))] pub enum ExecuteMsg { /// Buy will attempt to purchase as many supply tokens as possible. /// You must send only reserve tokens in that message @@ -66,7 +66,7 @@ pub enum ExecuteMsg { #[cw_ownable::cw_ownable_query] #[cw_serde] #[derive(QueryResponses)] -#[cfg_attr(feature = "boot", derive(boot_core::QueryFns))] +#[cfg_attr(feature = "boot", derive(cw_orch::QueryFns))] pub enum QueryMsg { /// Returns the reserve and supply quantities, as well as the spot price to buy 1 token /// Returns [`CurveInfoResponse`]