diff --git a/.circleci/config.yml b/.circleci/config.yml index c0b5cfc..ba74e72 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -229,7 +229,7 @@ jobs: - run: name: Install check_contract # Uses --debug for compilation speed - command: cargo install --debug --version 0.16.0-rc5 --features iterator --example check_contract -- cosmwasm-vm + command: cargo install --debug --version 1.0.0-beta --features iterator --example check_contract -- cosmwasm-vm - save_cache: paths: - /usr/local/cargo/registry diff --git a/Cargo.lock b/Cargo.lock index b8072f4..4d465b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -94,9 +94,9 @@ checksum = "44c32f031ea41b4291d695026c023b95d59db2d8a2c7640800ed56bc8f510f22" [[package]] name = "cosmwasm-crypto" -version = "0.16.0" +version = "1.0.0-beta" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa1715a9b71c7c31385a3f021dee2fd0a17b82043ab937467e103aa25043d2e" +checksum = "1b6da9aa7d6d1f5607b184bb207ead134df3ddc99ddb1a2d8d9915b59454d535" dependencies = [ "digest", "ed25519-zebra", @@ -107,18 +107,18 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "0.16.0" +version = "1.0.0-beta" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f6e6dff07965015c4fcdf477c4becde738a2bfb40cf6239bdcea9335016c5a2" +checksum = "eb6c5b99d05fcf047bafc0fc093e8e7b7ecb63b76791f644f5dc3eca5a548de1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "0.16.0" +version = "1.0.0-beta" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac9ba1eea088e7f1ec4a7679c43adcb51e80cbc2af6a6d83d1bb652b7adaf6dc" +checksum = "22e4b3f6933f94acdd3ddb931af4870c2002e3331a4a8b247a4ef070dd31ccb0" dependencies = [ "schemars", "serde_json", @@ -126,9 +126,9 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "0.16.0" +version = "1.0.0-beta" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92bdeee0ebba164ebbef9380522cc50f889db38acc1f1210f6b55ee2244b8c59" +checksum = "3b7214fed59d78adc13b98e68072bf49f5273c8a6713ca98cb7784339f49ef01" dependencies = [ "base64", "cosmwasm-crypto", @@ -142,9 +142,9 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "0.16.0" +version = "1.0.0-beta" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e26053f14f971b05abca3be34f80c631d70c5b5b9df175e7a1d8b4aad83e40cc" +checksum = "665cf97ad42be46936f6e6739711824a9bf21c440a6c98e185a3404aef0c3b81" dependencies = [ "cosmwasm-std", "serde", @@ -202,9 +202,9 @@ dependencies = [ [[package]] name = "cw-controllers" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26bd89d1f5cbae950ec3946ce5874f049c98d5608b1420292d5eda913aa4948d" +checksum = "284e5f6341e10019e1bb96c4accb5ad0e4b84798d5ee57c93478f8acb086dc0e" dependencies = [ "cosmwasm-std", "cw-storage-plus", @@ -216,15 +216,16 @@ dependencies = [ [[package]] name = "cw-multi-test" -version = "0.8.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecca04ea07d99e8cb7031c58ec5a7d8f581d597621353f1ecbee9e2829169d27" +checksum = "670f079c08ee111664b4d01f845ab11aa1f722a51013bd71bfe9d930f323406d" dependencies = [ "anyhow", "cosmwasm-std", "cosmwasm-storage", "cw-storage-plus", "cw0", + "derivative", "itertools", "prost", "schemars", @@ -234,9 +235,9 @@ dependencies = [ [[package]] name = "cw-storage-plus" -version = "0.8.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e867b9972b83b32e00e878dfbff48299ba26618dabeb19b9c56fae176dc225" +checksum = "bbae8575a3517f88581f0a48f7021f01a0ebde1b65d47d33b54d1cba3bd9028f" dependencies = [ "cosmwasm-std", "schemars", @@ -245,9 +246,9 @@ dependencies = [ [[package]] name = "cw0" -version = "0.8.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c497f885a40918a02df7d938c81809965fa05cfc21b3dc591e9950237b5de0a9" +checksum = "1a7ed2e4c60ec883bc5295613b016e9d7710ad6e28610361981ae999e6fe9bc5" dependencies = [ "cosmwasm-std", "schemars", @@ -257,9 +258,9 @@ dependencies = [ [[package]] name = "cw2" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51698a50df8be3d31d7261082f052685d04fe6289df89792fd4efa41daee8b90" +checksum = "f4dc7be3e594753983f9c0a3ef23a1a3fb3afc2155f65ea8522c66703c8bd90f" dependencies = [ "cosmwasm-std", "cw-storage-plus", @@ -269,9 +270,9 @@ dependencies = [ [[package]] name = "cw20" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f24779556263d95d5a7ebf8a0b0cd615df0b34bff69c23f409e5f17b5fb529ef" +checksum = "1ecdcc2b01eaca7c322c841bac5c2eb077c1289c54b393a174d34971212c4b4d" dependencies = [ "cosmwasm-std", "cw0", @@ -281,9 +282,9 @@ dependencies = [ [[package]] name = "cw20-base" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6cac998c7ac2b907fe2ccf1b5b966f5ea823b4aa6c2985770223547b7b77ec" +checksum = "30b9c237cb0713816588c0cc6fb49dbdaf2688b184d441518436b0c986fb45dd" dependencies = [ "cosmwasm-std", "cw-storage-plus", @@ -297,9 +298,9 @@ dependencies = [ [[package]] name = "cw3" -version = "0.8.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "078acdb1876c5c73b443f394f5eb7bbb998b56452836a2545d92ab01d4cb5a9b" +checksum = "2253b0f9e257a954db4657e4edad03acd2d42558aa3da3fe03daf99c429d73c4" dependencies = [ "cosmwasm-std", "cw0", @@ -309,20 +310,21 @@ dependencies = [ [[package]] name = "cw4" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1975f157f12d9a97be34aefb6da6dd054e13812da0fd2f0e5abb195f6db6e475" +checksum = "9d5721e82368b31ff1690258d283b9e1682169d9236c1c2157d30375d5ebf736" dependencies = [ "cosmwasm-std", + "cw-storage-plus", "schemars", "serde", ] [[package]] name = "cw4-group" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aad2ff66f8b09bb3b121b106154afabde83f889b615bc7b18501c2f97966d42" +checksum = "f6ca733c2df6fd4f02f29270893e2075b193d8d87f5d3864ee4b337d1be013f9" dependencies = [ "cosmwasm-std", "cw-controllers", @@ -366,7 +368,7 @@ dependencies = [ [[package]] name = "dso-token" -version = "0.1.1" +version = "0.2.0" dependencies = [ "anyhow", "cosmwasm-schema", @@ -817,7 +819,7 @@ dependencies = [ [[package]] name = "tfi" -version = "0.1.1" +version = "0.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -830,7 +832,7 @@ dependencies = [ [[package]] name = "tfi-factory" -version = "0.1.1" +version = "0.2.0" dependencies = [ "anyhow", "cosmwasm-schema", @@ -854,7 +856,7 @@ dependencies = [ [[package]] name = "tfi-mocks" -version = "0.1.1" +version = "0.2.0" dependencies = [ "cosmwasm-std", "cosmwasm-storage", @@ -866,7 +868,7 @@ dependencies = [ [[package]] name = "tfi-pair" -version = "0.1.1" +version = "0.2.0" dependencies = [ "anyhow", "cosmwasm-schema", @@ -908,7 +910,7 @@ dependencies = [ [[package]] name = "trusted-circle" -version = "0.1.1" +version = "0.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", diff --git a/contracts/dso-token/Cargo.toml b/contracts/dso-token/Cargo.toml index ad160c8..73282ce 100644 --- a/contracts/dso-token/Cargo.toml +++ b/contracts/dso-token/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dso-token" -version = "0.1.1" +version = "0.2.0" authors = ["Ethan Frey "] edition = "2018" @@ -20,19 +20,19 @@ crate-type = ["cdylib", "rlib"] backtraces = ["cosmwasm-std/backtraces"] [dependencies] -cosmwasm-std = { version = "0.16.0" } -cw-storage-plus = "0.8.0" -cw20-base = { version = "0.8.0", features = ["library"] } -cw2 = "0.8.0" -cw4 = "0.8.0" -cw20 = "0.8.0" +cosmwasm-std = "=1.0.0-beta" +cw-storage-plus = "=0.10" +cw20-base = { version = "=0.10", features = ["library"] } +cw2 = "=0.10" +cw4 = "=0.10" +cw20 = "=0.10" schemars = "0.8.1" serde = { version = "1.0.125", default-features = false, features = ["derive"] } thiserror = { version = "1.0.24" } [dev-dependencies] anyhow = "1" -cosmwasm-schema = { version = "0.16.0" } -cw-multi-test = "0.8.1" -cw4-group = "0.8.0" +cosmwasm-schema = "=1.0.0-beta" +cw-multi-test = "=0.10" +cw4-group = "=0.10" derivative = "2" diff --git a/contracts/dso-token/src/contract.rs b/contracts/dso-token/src/contract.rs index a8a677c..072be6b 100644 --- a/contracts/dso-token/src/contract.rs +++ b/contracts/dso-token/src/contract.rs @@ -392,6 +392,8 @@ mod tests { use cw4::{Cw4QueryMsg, MemberListResponse}; use cw_storage_plus::Map; + use std::marker::PhantomData; + const MEMBERS: Map<&Addr, u64> = Map::new(cw4::MEMBERS_KEY); struct GroupQuerier { @@ -514,6 +516,7 @@ mod tests { storage, api, querier, + custom_query_type: PhantomData, }; BALANCES @@ -566,6 +569,7 @@ mod tests { storage, api, querier, + custom_query_type: PhantomData, }; TOKEN_INFO @@ -614,6 +618,7 @@ mod tests { storage, api, querier, + custom_query_type: PhantomData, }; BALANCES @@ -679,6 +684,7 @@ mod tests { storage: MockStorage::new(), api: MockApi::default(), querier: GroupQuerier::new(&whitelist_addr, &[]), + custom_query_type: PhantomData::, }; let info = MessageInfo { diff --git a/contracts/dso-token/src/multitest/suite.rs b/contracts/dso-token/src/multitest/suite.rs index d0510cd..f806a1a 100644 --- a/contracts/dso-token/src/multitest/suite.rs +++ b/contracts/dso-token/src/multitest/suite.rs @@ -1,11 +1,10 @@ use cw20_base::msg::InstantiateMarketingInfo; -use cosmwasm_std::testing::{mock_env, MockApi, MockStorage}; use cosmwasm_std::{to_binary, Addr, Binary, Empty, Response, StdError, Uint128}; use cw20::{Cw20Coin, Cw20Contract, Cw20ReceiveMsg, MinterResponse, TokenInfoResponse}; use cw4::{Cw4Contract, Member}; use cw4_group::msg::ExecuteMsg as Cw4ExecuteMsg; -use cw_multi_test::{App, AppResponse, BankKeeper, Contract, ContractWrapper, Executor}; +use cw_multi_test::{App, AppResponse, Contract, ContractWrapper, Executor}; use crate::msg::{ExecuteMsg, InstantiateMsg}; @@ -107,12 +106,7 @@ impl ReceiverContract { } fn mock_app() -> App { - let env = mock_env(); - let api = MockApi::default(); - let bank = BankKeeper::new(); - let storage = MockStorage::new(); - - App::new(api, env.block, bank, storage) + App::default() } fn contract_group() -> Box> { diff --git a/contracts/tfi-factory/Cargo.toml b/contracts/tfi-factory/Cargo.toml index f7e3f0a..716e5a8 100644 --- a/contracts/tfi-factory/Cargo.toml +++ b/contracts/tfi-factory/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tfi-factory" -version = "0.1.1" +version = "0.2.0" authors = ["Terraform Labs, PTE."] edition = "2018" description = "A tfi factory contract - auto pair contract generator and also directory for all pairs" @@ -23,24 +23,24 @@ crate-type = ["cdylib", "rlib"] backtraces = ["cosmwasm-std/backtraces"] [dependencies] -tfi = { path = "../../packages/tfi", default-features = false, version = "0.1.1"} -cosmwasm-std = { version = "0.16.0", features = ["iterator"] } -cw-storage-plus = { version = "0.8.0", features = ["iterator"]} +tfi = { path = "../../packages/tfi", default-features = false, version = "0.2.0"} +cosmwasm-std = "=1.0.0-beta" +cw-storage-plus = "=0.10" schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } protobuf = { version = "2", features = ["with-bytes"] } thiserror = "1" [dev-dependencies] -cosmwasm-schema = "0.16.0" -cosmwasm-storage = { version = "0.16.0", features = ["iterator"] } +cosmwasm-schema = "=1.0.0-beta" +cosmwasm-storage = "=1.0.0-beta" anyhow = { version = "1", features = ["backtrace"] } -cw-multi-test = "0.8.1" -tfi-pair = { path = "../tfi-pair", version = "0.1" } -dso-token = { path = "../dso-token", version = "0.1" } +cw-multi-test = "=0.10" +tfi-pair = { path = "../tfi-pair", version = "0.2.0" } +dso-token = { path = "../dso-token", version = "0.2.0" } derivative = "2" -cw4-group = { version = "0.8", features = ["library"] } -cw4 = "0.8" -cw20 = "0.8" -cw20-base = { version = "0.8", features = ["library"] } +cw4-group = { version = "=0.10", features = ["library"] } +cw4 = "=0.10" +cw20 = "=0.10" +cw20-base = { version = "=0.10", features = ["library"] } diff --git a/contracts/tfi-factory/src/mock_querier.rs b/contracts/tfi-factory/src/mock_querier.rs index bd07b90..1b63d64 100644 --- a/contracts/tfi-factory/src/mock_querier.rs +++ b/contracts/tfi-factory/src/mock_querier.rs @@ -3,7 +3,7 @@ use cosmwasm_std::{ from_slice, to_binary, Coin, ContractResult, Empty, OwnedDeps, Querier, QuerierResult, QueryRequest, SystemError, SystemResult, WasmQuery, }; -use std::collections::HashMap; +use std::{collections::HashMap, marker::PhantomData}; use tfi::asset::{AssetInfo, PairInfo}; /// mock_dependencies is a drop-in replacement for cosmwasm_std::testing::mock_dependencies @@ -18,6 +18,7 @@ pub fn mock_dependencies( api: MockApi::default(), storage: MockStorage::default(), querier: custom_querier, + custom_query_type: PhantomData, } } diff --git a/contracts/tfi-factory/src/multitest/suite.rs b/contracts/tfi-factory/src/multitest/suite.rs index 66ade9c..469131c 100644 --- a/contracts/tfi-factory/src/multitest/suite.rs +++ b/contracts/tfi-factory/src/multitest/suite.rs @@ -1,22 +1,30 @@ use anyhow::{anyhow, Result}; -use cosmwasm_std::testing::{mock_env, MockApi, MockStorage}; -use cosmwasm_std::{coins, to_binary, Addr, Decimal, Empty, Uint128}; +use cosmwasm_std::{coins, to_binary, Addr, BankMsg, Decimal, Empty, Uint128}; use cw20::{Cw20Coin, Cw20Contract, Cw20ExecuteMsg}; use cw4::{Cw4Contract, Member}; use cw4_group::msg::ExecuteMsg as Cw4ExecuteMsg; -use cw_multi_test::{App, BankKeeper, Contract, ContractWrapper, Executor}; +use cw_multi_test::{App, AppBuilder, Contract, ContractWrapper, Executor}; use derivative::Derivative; use tfi::asset::{Asset, AssetInfo, PairInfo}; use tfi::factory::{ExecuteMsg, InstantiateMsg, QueryMsg}; use tfi::pair::{Cw20HookMsg, ExecuteMsg as PairExecuteMsg}; -fn mock_app() -> App { - let env = mock_env(); - let api = MockApi::default(); - let bank = BankKeeper::new(); - let storage = MockStorage::new(); +const TEST_RESERVE: &str = "reserve"; +const DENOM: &str = "btc"; - App::new(api, env.block, bank, storage) +fn mock_app() -> App { + // Instantiates custom account (TEST_RESERVE) with arbitrary amount + // of tokens to fill any custom account later needed in tests + AppBuilder::new_custom().build(|router, _, storage| { + router + .bank + .init_balance( + storage, + &Addr::unchecked(TEST_RESERVE), + coins(100000, DENOM), + ) + .unwrap(); + }) } fn contract_factory() -> Box> { @@ -338,8 +346,15 @@ impl Config { .into_iter() .map(|actor| -> Result<_> { let addr = Addr::unchecked(&actor.addr); - app.init_bank_balance(&addr, coins(actor.btc, "btc")) - .map_err(|err| anyhow!(err))?; + app.execute( + Addr::unchecked(TEST_RESERVE), + BankMsg::Send { + to_address: actor.addr.to_owned(), + amount: coins(actor.btc, DENOM), + } + .into(), + ) + .unwrap(); let initial_cash = Cw20Coin { address: addr.to_string(), diff --git a/contracts/tfi-pair/Cargo.toml b/contracts/tfi-pair/Cargo.toml index 1c0ad4d..f0b127b 100644 --- a/contracts/tfi-pair/Cargo.toml +++ b/contracts/tfi-pair/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tfi-pair" -version = "0.1.1" +version = "0.2.0" authors = ["Terraform Labs, PTE."] edition = "2018" description = "A tfi pair contract" @@ -24,20 +24,20 @@ backtraces = ["cosmwasm-std/backtraces"] [dependencies] integer-sqrt = "0.1.5" -tfi = { path = "../../packages/tfi", default-features = false, version = "0.1.1"} -cw2 = { version = "0.8.0" } -cw20 = { version = "0.8.0" } -cosmwasm-std = { version = "0.16.0" } -cw-storage-plus = { version = "0.8.0" } +tfi = { path = "../../packages/tfi", default-features = false, version = "0.2.0"} +cw2 = "=0.10" +cw20 = "=0.10" +cosmwasm-std = "=1.0.0-beta" +cw-storage-plus = "=0.10" schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.20" } [dev-dependencies] -cosmwasm-schema = "0.16.0" -cosmwasm-storage = { version = "0.16.0", features = ["iterator"] } -cw20-base = { version = "0.8.0", features = ["library"] } -cw-multi-test = { version = "0.8.1" } -tfi-mocks = { path = "../../packages/mocks", version = "0.1.1"} +cosmwasm-schema = "=1.0.0-beta" +cosmwasm-storage = "=1.0.0-beta" +cw20-base = { version = "=0.10", features = ["library"] } +cw-multi-test = { version = "=0.10" } +tfi-mocks = { path = "../../packages/mocks", version = "0.2.0"} derivative = "2" anyhow = { version = "1", features = ["backtrace"] } diff --git a/contracts/tfi-pair/src/multitest.rs b/contracts/tfi-pair/src/multitest.rs index c226e5a..6bbcf89 100644 --- a/contracts/tfi-pair/src/multitest.rs +++ b/contracts/tfi-pair/src/multitest.rs @@ -1,8 +1,7 @@ use anyhow::{anyhow, Result}; -use cosmwasm_std::testing::{mock_env, MockApi, MockStorage}; -use cosmwasm_std::{coin, coins, to_binary, Addr, Decimal, Empty, StdError, Uint128}; +use cosmwasm_std::{coin, coins, to_binary, Addr, BankMsg, Decimal, Empty, StdError, Uint128}; use cw20::{Cw20Coin, Cw20ExecuteMsg}; -use cw_multi_test::{App, BankKeeper, Contract, ContractWrapper, Executor}; +use cw_multi_test::{App, AppBuilder, Contract, ContractWrapper, Executor}; use derivative::Derivative; use crate::error::ContractError; @@ -12,13 +11,22 @@ use tfi::pair::{ SimulationResponse, }; -fn mock_app() -> App { - let env = mock_env(); - let api = MockApi::default(); - let bank = BankKeeper::new(); - let storage = MockStorage::new(); +const TEST_RESERVE: &str = "reserve"; +const DENOM: &str = "btc"; - App::new(api, env.block, bank, storage) +fn mock_app() -> App { + // Instantiates custom account (TEST_RESERVE) with arbitrary amount + // of tokens to fill any custom account later needed in tests + AppBuilder::new_custom().build(|router, _, storage| { + router + .bank + .init_balance( + storage, + &Addr::unchecked(TEST_RESERVE), + coins(100000, DENOM), + ) + .unwrap(); + }) } pub fn contract_pair() -> Box> { @@ -380,8 +388,15 @@ impl SuiteConfig { let pairs = actors .into_iter() .map(|lp| -> Result<_> { - app.init_bank_balance(&lp.addr, coins(lp.btc, "btc")) - .map_err(|err| anyhow!(err))?; + app.execute( + Addr::unchecked(TEST_RESERVE), + BankMsg::Send { + to_address: lp.addr.to_string(), + amount: coins(lp.btc, DENOM), + } + .into(), + ) + .unwrap(); let cash = Cw20Coin { address: lp.addr.to_string(), @@ -472,8 +487,16 @@ fn setup_liquidity_pool() { // set personal balance let owner = Addr::unchecked("owner"); - let init_funds = coins(20000, "btc"); - app.init_bank_balance(&owner, init_funds).unwrap(); + let init_funds = coins(20000, DENOM); + app.execute( + Addr::unchecked(TEST_RESERVE), + BankMsg::Send { + to_address: owner.to_string(), + amount: init_funds, + } + .into(), + ) + .unwrap(); // set up cw20 contract with some tokens let cw20_id = app.store_code(contract_cw20()); diff --git a/packages/mocks/Cargo.toml b/packages/mocks/Cargo.toml index d099513..55be88d 100644 --- a/packages/mocks/Cargo.toml +++ b/packages/mocks/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tfi-mocks" -version = "0.1.1" +version = "0.2.0" authors = ["Ethan Frey "] edition = "2018" description = "Mocks for tfi tests" @@ -11,9 +11,9 @@ homepage = "https://tgrade.finance" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tfi = { path = "../tfi", version = "0.1.1" } -cw20 = { version = "0.8.0-rc1" } -cosmwasm-storage = { version = "0.16.0" } -cosmwasm-std = { version = "0.16.0" } +tfi = { path = "../tfi", version = "0.2.0" } +cw20 = "=0.10" +cosmwasm-storage = "=1.0.0-beta" +cosmwasm-std = "=1.0.0-beta" schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } diff --git a/packages/mocks/src/lib.rs b/packages/mocks/src/lib.rs index d5647c6..25e7d02 100644 --- a/packages/mocks/src/lib.rs +++ b/packages/mocks/src/lib.rs @@ -9,6 +9,8 @@ use cw20::{BalanceResponse as Cw20BalanceResponse, Cw20QueryMsg, TokenInfoRespon use tfi::asset::PairInfo; use tfi::factory::QueryMsg as FactoryQueryMsg; +use std::marker::PhantomData; + /// mock_dependencies is a drop-in replacement for cosmwasm_std::testing::mock_dependencies /// this uses our CustomQuerier. pub fn mock_dependencies( @@ -21,6 +23,7 @@ pub fn mock_dependencies( storage: MockStorage::default(), api: MockApi::default(), querier: custom_querier, + custom_query_type: PhantomData, } } diff --git a/packages/tfi/Cargo.toml b/packages/tfi/Cargo.toml index 6e433e3..e0bf9f0 100644 --- a/packages/tfi/Cargo.toml +++ b/packages/tfi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tfi" -version = "0.1.1" +version = "0.2.0" authors = ["Ethan Frey "] edition = "2018" description = "Common tfi types" @@ -16,13 +16,13 @@ homepage = "https://tgrade.finance" backtraces = ["cosmwasm-std/backtraces"] [dependencies] -cw20 = { version = "0.8.0-rc1" } -cosmwasm-storage = { version = "0.16.0" } -cosmwasm-std = { version = "0.16.0" } +cw20 = "=0.10" +cosmwasm-storage = "=1.0.0-beta" +cosmwasm-std = "=1.0.0-beta" schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } [dev-dependencies] -cosmwasm-schema = "0.16.0" -tfi-mocks = { path = "../mocks", version = "0.1.1" } +cosmwasm-schema = "=1.0.0-beta" +tfi-mocks = { path = "../mocks", version = "0.2.0" } diff --git a/packages/trusted-circle/Cargo.toml b/packages/trusted-circle/Cargo.toml index 3aa32bc..412368b 100644 --- a/packages/trusted-circle/Cargo.toml +++ b/packages/trusted-circle/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "trusted-circle" -version = "0.1.1" +version = "0.2.0" authors = ["Ethan Frey "] edition = "2018" description = "Public API to call into the trusted-circle contracts" @@ -16,12 +16,12 @@ homepage = "https://tgrade.finance" backtraces = ["cosmwasm-std/backtraces"] [dependencies] -cosmwasm-std = { version = "0.16.0" } +cosmwasm-std = "=1.0.0-beta" schemars = "0.8.1" -cw0 = "0.8" -cw3 = "0.8" +cw0 = "=0.10" +cw3 = "=0.10" serde = { version = "1.0.103", default-features = false, features = ["derive"] } [dev-dependencies] -cosmwasm-schema = "0.16.0" +cosmwasm-schema = "=1.0.0-beta"