diff --git a/.cargo/config b/.cargo/config index 3cfbdbc2d..2d60e2826 100644 --- a/.cargo/config +++ b/.cargo/config @@ -4,4 +4,3 @@ wasm-debug = "build --lib --target wasm32-unknown-unknown" t = "test --workspace" unit-test = "test --workspace" integration-test = "test --package integration-tests -- --ignored --test-threads 1 -Z unstable-options --report-time" -token-factory-test = "test --package token-factory-tests" diff --git a/Cargo.lock b/Cargo.lock index 385cf2e3d..eb8afe053 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -37,12 +37,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "anyhow" version = "1.0.75" @@ -88,17 +82,6 @@ dependencies = [ "syn 2.0.29", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -189,29 +172,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "bindgen" -version = "0.60.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "062dddbc1ba4aca46de6338e2bf87771414c335f7b2f2036e8f3e9befebf88e6" -dependencies = [ - "bitflags 1.3.2", - "cexpr", - "clang-sys", - "clap", - "env_logger 0.9.3", - "lazy_static", - "lazycell", - "log", - "peeking_take_while", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "which", -] - [[package]] name = "bip32" version = "0.4.0" @@ -283,7 +243,7 @@ dependencies = [ "dao-proposal-single", "dao-voting 2.2.0", "dao-voting-cw20-staked", - "env_logger 0.10.0", + "env_logger", "serde", "serde_json", "serde_yaml", @@ -328,66 +288,12 @@ dependencies = [ "libc", ] -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "chrono" -version = "0.4.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" -dependencies = [ - "android-tzdata", - "num-traits", -] - -[[package]] -name = "clang-sys" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "clap" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" -dependencies = [ - "atty", - "bitflags 1.3.2", - "clap_lex", - "indexmap 1.9.3", - "strsim", - "termcolor", - "textwrap", -] - -[[package]] -name = "clap_lex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] - [[package]] name = "config" version = "0.13.3" @@ -452,7 +358,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "596064e3608349aa302eb68b2df8ed3a66bbb51d9b470dbd9afff70843e44642" dependencies = [ "async-trait", - "cosmrs 0.10.0", + "cosmrs", "regex", "schemars", "serde", @@ -461,17 +367,6 @@ dependencies = [ "tonic 0.8.3", ] -[[package]] -name = "cosmos-sdk-proto" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20b42021d8488665b1a0d9748f1f81df7235362d194f44481e2e61bf376b77b4" -dependencies = [ - "prost 0.11.9", - "prost-types", - "tendermint-proto 0.23.9", -] - [[package]] name = "cosmos-sdk-proto" version = "0.15.0" @@ -496,27 +391,6 @@ dependencies = [ "tonic 0.9.2", ] -[[package]] -name = "cosmrs" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3903590099dcf1ea580d9353034c9ba1dbf55d1389a5bd2ade98535c3445d1f9" -dependencies = [ - "bip32", - "cosmos-sdk-proto 0.14.0", - "ecdsa", - "eyre", - "getrandom", - "k256", - "rand_core 0.6.4", - "serde", - "serde_json", - "subtle-encoding", - "tendermint 0.23.9", - "tendermint-rpc 0.23.9", - "thiserror", -] - [[package]] name = "cosmrs" version = "0.10.0" @@ -533,8 +407,8 @@ dependencies = [ "serde", "serde_json", "subtle-encoding", - "tendermint 0.26.0", - "tendermint-rpc 0.26.0", + "tendermint", + "tendermint-rpc", "thiserror", ] @@ -2279,19 +2153,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "env_logger" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - [[package]] name = "env_logger" version = "0.10.0" @@ -2510,12 +2371,6 @@ version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - [[package]] name = "group" version = "0.12.1" @@ -2586,15 +2441,6 @@ dependencies = [ "http", ] -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.2" @@ -2803,7 +2649,7 @@ dependencies = [ "dao-voting 2.2.0", "dao-voting-cw20-staked", "dao-voting-cw721-staked", - "env_logger 0.10.0", + "env_logger", "once_cell", "rand", "serde", @@ -2817,7 +2663,7 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi", "rustix", "windows-sys", ] @@ -2894,28 +2740,12 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "libc" version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" -[[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if", - "winapi", -] - [[package]] name = "linked-hash-map" version = "0.5.6" @@ -3014,7 +2844,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi", "libc", ] @@ -3064,75 +2894,6 @@ dependencies = [ "hashbrown 0.12.3", ] -[[package]] -name = "os_str_bytes" -version = "6.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" - -[[package]] -name = "osmosis-std" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75895e4db1a81ca29118e366365744f64314938327e4eedba8e6e462fb15e94f" -dependencies = [ - "chrono", - "cosmwasm-std", - "osmosis-std-derive", - "prost 0.11.9", - "prost-types", - "schemars", - "serde", - "serde-cw-value", -] - -[[package]] -name = "osmosis-std" -version = "0.17.0-rc0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0b022b748710ecdf1adc6a124c3bef29f17ef05e7fa1260a08889d1d53f9cc5" -dependencies = [ - "chrono", - "cosmwasm-std", - "osmosis-std-derive", - "prost 0.11.9", - "prost-types", - "schemars", - "serde", - "serde-cw-value", -] - -[[package]] -name = "osmosis-std-derive" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f47f0b2f22adb341bb59e5a3a1b464dde033181954bd055b9ae86d6511ba465b" -dependencies = [ - "itertools 0.10.5", - "proc-macro2", - "prost-types", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "osmosis-test-tube" -version = "16.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61443b780ea4a1b585c41671f2eb17054ab641617dc0befde2ed34f699854b7e" -dependencies = [ - "base64 0.13.1", - "bindgen", - "cosmrs 0.9.0", - "cosmwasm-std", - "osmosis-std 0.16.2", - "prost 0.11.9", - "serde", - "serde_json", - "test-tube", - "thiserror", -] - [[package]] name = "paste" version = "1.0.14" @@ -3154,12 +2915,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "peg" version = "0.7.0" @@ -3508,12 +3263,6 @@ version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - [[package]] name = "rustix" version = "0.38.8" @@ -3668,15 +3417,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde-cw-value" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75d32da6b8ed758b7d850b6c3c08f1d7df51a4df3cb201296e63e34a78e99d4" -dependencies = [ - "serde", -] - [[package]] name = "serde-json-wasm" version = "0.5.1" @@ -3797,12 +3537,6 @@ dependencies = [ "keccak", ] -[[package]] -name = "shlex" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" - [[package]] name = "signature" version = "1.6.4" @@ -3916,12 +3650,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - [[package]] name = "subtle" version = "2.5.0" @@ -3965,37 +3693,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" -[[package]] -name = "tendermint" -version = "0.23.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "467f82178deeebcd357e1273a0c0b77b9a8a0313ef7c07074baebe99d87851f4" -dependencies = [ - "async-trait", - "bytes", - "ed25519", - "ed25519-dalek", - "flex-error", - "futures", - "k256", - "num-traits", - "once_cell", - "prost 0.11.9", - "prost-types", - "ripemd160", - "serde", - "serde_bytes", - "serde_json", - "serde_repr", - "sha2 0.9.9", - "signature", - "subtle", - "subtle-encoding", - "tendermint-proto 0.23.9", - "time", - "zeroize", -] - [[package]] name = "tendermint" version = "0.26.0" @@ -4027,20 +3724,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "tendermint-config" -version = "0.23.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d42ee0abc27ef5fc34080cce8d43c189950d331631546e7dfb983b6274fa327" -dependencies = [ - "flex-error", - "serde", - "serde_json", - "tendermint 0.23.9", - "toml", - "url", -] - [[package]] name = "tendermint-config" version = "0.26.0" @@ -4050,29 +3733,11 @@ dependencies = [ "flex-error", "serde", "serde_json", - "tendermint 0.26.0", + "tendermint", "toml", "url", ] -[[package]] -name = "tendermint-proto" -version = "0.23.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ce80bf536476db81ecc9ebab834dc329c9c1509a694f211a73858814bfe023" -dependencies = [ - "bytes", - "flex-error", - "num-derive", - "num-traits", - "prost 0.11.9", - "prost-types", - "serde", - "serde_bytes", - "subtle-encoding", - "time", -] - [[package]] name = "tendermint-proto" version = "0.26.0" @@ -4109,39 +3774,6 @@ dependencies = [ "time", ] -[[package]] -name = "tendermint-rpc" -version = "0.23.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f14aafe3528a0f75e9f3f410b525617b2de16c4b7830a21f717eee62882ec60" -dependencies = [ - "async-trait", - "bytes", - "flex-error", - "futures", - "getrandom", - "http", - "hyper", - "hyper-proxy", - "hyper-rustls", - "peg", - "pin-project", - "serde", - "serde_bytes", - "serde_json", - "subtle-encoding", - "tendermint 0.23.9", - "tendermint-config 0.23.9", - "tendermint-proto 0.23.9", - "thiserror", - "time", - "tokio", - "tracing", - "url", - "uuid", - "walkdir", -] - [[package]] name = "tendermint-rpc" version = "0.26.0" @@ -4164,8 +3796,8 @@ dependencies = [ "serde_json", "subtle", "subtle-encoding", - "tendermint 0.26.0", - "tendermint-config 0.26.0", + "tendermint", + "tendermint-config", "tendermint-proto 0.26.0", "thiserror", "time", @@ -4206,28 +3838,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "test-tube" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b1f7cafdf7738331999fb1465d2d3032f08ac61940e1ef4601dbbef21d6a5e" -dependencies = [ - "base64 0.13.1", - "cosmrs 0.9.0", - "cosmwasm-std", - "osmosis-std 0.17.0-rc0", - "prost 0.11.9", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "textwrap" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" - [[package]] name = "thiserror" version = "1.0.47" @@ -4319,22 +3929,6 @@ dependencies = [ "token-bindings 0.10.3 (git+https://github.com/CosmosContracts/token-bindings.git?branch=update-token-bindings-test)", ] -[[package]] -name = "token-factory-tests" -version = "0.1.0" -dependencies = [ - "anyhow", - "cosmwasm-std", - "cw-utils 1.0.1", - "dao-interface", - "dao-voting-token-factory-staked", - "env_logger 0.10.0", - "osmosis-test-tube", - "serde", - "serde_json", - "token-bindings 0.10.3 (git+https://github.com/CosmosContracts/token-bindings.git?branch=update-token-bindings-test)", -] - [[package]] name = "tokio" version = "1.32.0" @@ -4746,17 +4340,6 @@ dependencies = [ "webpki", ] -[[package]] -name = "which" -version = "4.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" -dependencies = [ - "either", - "libc", - "once_cell", -] - [[package]] name = "winapi" version = "0.3.9" diff --git a/Cargo.toml b/Cargo.toml index 36ca73554..da26f2bc7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,7 +55,6 @@ cw721 = "0.18" cw721-base = "0.18" env_logger = "0.10" once_cell = "1.18" -osmosis-test-tube = "16.1.2" proc-macro2 = "1.0" quote = "1.0" rand = "0.8" diff --git a/ci/token-factory-tests/Cargo.toml b/ci/token-factory-tests/Cargo.toml deleted file mode 100644 index 37dc37e9b..000000000 --- a/ci/token-factory-tests/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "token-factory-tests" -version = "0.1.0" -edition = { workspace = true } - -[dependencies] -cosmwasm-std = { workspace = true, features = ["ibc3", "cosmwasm_1_1"] } -cw-utils = { workspace = true } -dao-interface = { workspace = true } -dao-voting-token-factory-staked = { workspace = true } -osmosis-test-tube = { workspace = true } -token-bindings = { workspace = true } - -anyhow = { workspace = true } -serde = { workspace = true } -serde_json = { workspace = true } -env_logger = { workspace = true } diff --git a/ci/token-factory-tests/README.md b/ci/token-factory-tests/README.md deleted file mode 100644 index 1396c093a..000000000 --- a/ci/token-factory-tests/README.md +++ /dev/null @@ -1 +0,0 @@ -# Token Factory Integration Tests diff --git a/ci/token-factory-tests/src/lib.rs b/ci/token-factory-tests/src/lib.rs deleted file mode 100644 index 6a1a2055c..000000000 --- a/ci/token-factory-tests/src/lib.rs +++ /dev/null @@ -1,2 +0,0 @@ -#[cfg(all(test, target_arch = "x86"))] -mod token_factory_tests; diff --git a/ci/token-factory-tests/src/token_factory_tests.rs b/ci/token-factory-tests/src/token_factory_tests.rs deleted file mode 100644 index d6c63bcbe..000000000 --- a/ci/token-factory-tests/src/token_factory_tests.rs +++ /dev/null @@ -1,75 +0,0 @@ -use cosmwasm_std::{Coin, Uint128}; -use cw_utils::Duration; -use dao_interface::state::Admin; -use dao_voting_token_factory_staked::msg::{ - DenomResponse, InitialBalance, InstantiateMsg, NewTokenInfo, QueryMsg, TokenInfo, -}; -use osmosis_test_tube::{Account, Module, OsmosisTestApp, Wasm}; -use token_bindings::Metadata; - -const DENOM: &str = "test"; - -#[test] -fn happy_path() { - let app = OsmosisTestApp::new(); - let accs = app - .init_accounts( - &[ - Coin::new(1_000_000_000_000, "uatom"), - Coin::new(1_000_000_000_000, "uosmo"), - ], - 2, - ) - .unwrap(); - let admin = &accs[0]; - - let wasm = Wasm::new(&app); - - let wasm_byte_code = std::fs::read("artifacts/dao_voting_token_factory_staked.wasm").unwrap(); - let code_id = wasm - .store_code(&wasm_byte_code, None, admin) - .unwrap() - .data - .code_id; - - let contract_addr = wasm - .instantiate( - code_id, - &InstantiateMsg { - owner: Some(Admin::CoreModule {}), - manager: Some(admin.address()), - token_info: TokenInfo::New(NewTokenInfo { - subdenom: DENOM.to_string(), - metadata: Some(Metadata { - description: Some("Awesome token, get it now!".to_string()), - denom_units: vec![], - base: None, - display: Some(DENOM.to_string()), - name: Some(DENOM.to_string()), - symbol: Some(DENOM.to_string()), - }), - initial_balances: vec![InitialBalance { - amount: Uint128::new(100), - mint_to_address: admin.address(), - }], - initial_dao_balance: Some(Uint128::new(900)), - }), - unstaking_duration: Some(Duration::Height(5)), - active_threshold: None, - }, - None, // contract admin used for migration, not the same as cw1_whitelist admin - None, // contract label - &[], // funds - admin, // signer - ) - .unwrap() - .data - .address; - - // Query contract state to check if contract instantiation works properly - let tf_denom = wasm - .query::(&contract_addr, &QueryMsg::GetDenom {}) - .unwrap(); - - println!("Token Factory Denom: {:?}", tf_denom); -} diff --git a/justfile b/justfile index c355c028a..2fa8cbcfb 100644 --- a/justfile +++ b/justfile @@ -25,9 +25,6 @@ integration-test-dev test_name="": bootstrap-dev: deploy-local workspace-optimize-arm RUST_LOG=info CONFIG={{orc_config}} cargo run bootstrap-env -token-factory-tests: workspace-optimize - RUST_LOG=info cargo token-factory-test - deploy-local: download-deps docker kill cosmwasm || true docker volume rm -f junod_data