From 158e4f88f0cbd1e38ec2f9605942f3105e51a7d0 Mon Sep 17 00:00:00 2001 From: Interchain Adair <32375605+adairrr@users.noreply.github.com> Date: Mon, 16 Dec 2024 05:53:10 -0500 Subject: [PATCH 1/6] Add union-testnet-9 (#528) * Add union-testnet-9 * Update packages/cw-orch-networks/src/networks/union.rs * Update packages/cw-orch-networks/src/networks/union.rs * Publish and changelog --------- Co-authored-by: Kayanski --- CHANGELOG.md | 1 + packages/cw-orch-networks/Cargo.toml | 2 +- packages/cw-orch-networks/src/networks/union.rs | 14 +++++++++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac5b507ad..57726ce9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unpublished +- [networks] Replaced union testnet-8 by union-testnet-9 ### Breaking diff --git a/packages/cw-orch-networks/Cargo.toml b/packages/cw-orch-networks/Cargo.toml index 7bfa6a931..260b4782a 100644 --- a/packages/cw-orch-networks/Cargo.toml +++ b/packages/cw-orch-networks/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cw-orch-networks" -version = "0.24.6" +version = "0.24.7" authors = { workspace = true } edition = { workspace = true } license = { workspace = true } diff --git a/packages/cw-orch-networks/src/networks/union.rs b/packages/cw-orch-networks/src/networks/union.rs index 83064b0ca..f15339c76 100644 --- a/packages/cw-orch-networks/src/networks/union.rs +++ b/packages/cw-orch-networks/src/networks/union.rs @@ -7,8 +7,9 @@ pub const UNION_NETWORK: NetworkInfo = NetworkInfo { coin_type: 118, }; -pub const UNION_TESTNET: ChainInfo = UNION_TESTNET_8; +pub const UNION_TESTNET: ChainInfo = UNION_TESTNET_9; +#[deprecated] pub const UNION_TESTNET_8: ChainInfo = ChainInfo { kind: ChainKind::Testnet, chain_id: "union-testnet-8", @@ -20,4 +21,15 @@ pub const UNION_TESTNET_8: ChainInfo = ChainInfo { fcd_url: None, }; +pub const UNION_TESTNET_9: ChainInfo = ChainInfo { + kind: ChainKind::Testnet, + chain_id: "union-testnet-9", + gas_denom: "muno", + gas_price: 0.000025, + grpc_urls: &["https://grpc.union-testnet-9.cor.systems:443"], + network_info: UNION_NETWORK, + lcd_url: None, + fcd_url: None, +}; + // ANCHOR_END: union From 26f10dceb59932464c2412372b358b87e7d763b4 Mon Sep 17 00:00:00 2001 From: Kayanski <44806566+Kayanski@users.noreply.github.com> Date: Mon, 16 Dec 2024 11:53:22 +0100 Subject: [PATCH 2/6] Updated osmosis-test-tube (#529) * Updated osmosis-test-tube * Changelog --- CHANGELOG.md | 3 ++- Cargo.toml | 2 +- packages/cw-orch-osmosis-test-tube/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57726ce9f..479d2ce21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,8 @@ ### Breaking -- [cw-orch-interchain-core] Modify the structure and the names of the IBC analysis and following structure. +- [interchain-core] Modify the structure and the names of the IBC analysis and following structure. +- [osmosis-test-tube] Update `osmosis-test-tube` to "v27.0.0" ## 0.26.0 [8. October 2024] diff --git a/Cargo.toml b/Cargo.toml index 1ba01e83c..194e52c34 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ cw-multi-test = { package = "abstract-cw-multi-test", version = "2.0.2", feature cw20 = { version = "2.0.0" } cw20-base = { version = "2.0.0" } -osmosis-test-tube = { version = "26.0.0" } +osmosis-test-tube = { version = "27.0.0" } neutron-test-tube = { version = "=5.0.1" } anyhow = "1.0" diff --git a/packages/cw-orch-osmosis-test-tube/Cargo.toml b/packages/cw-orch-osmosis-test-tube/Cargo.toml index d0b84c9a4..632b5240a 100644 --- a/packages/cw-orch-osmosis-test-tube/Cargo.toml +++ b/packages/cw-orch-osmosis-test-tube/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cw-orch-osmosis-test-tube" -version = "0.4.0" +version = "0.5.0" description = "Cw-orch environment adapter for osmosis-test-tube" authors.workspace = true edition.workspace = true From df39fe9d9e63d7630d6b4e17deb5f25b6c1c03d7 Mon Sep 17 00:00:00 2001 From: Kayanski <44806566+Kayanski@users.noreply.github.com> Date: Mon, 16 Dec 2024 14:40:31 +0100 Subject: [PATCH 3/6] Fix/ci (#530) * Update insta review * Added taplo * Removed clippy warning deprecated * Eliding lifetimes clippy * Nits for clipy --- .github/workflows/check.yml | 2 +- Cargo.toml | 72 ++++++----- contracts-ws/Cargo.toml | 12 +- contracts-ws/contracts/counter/Cargo.toml | 36 +++--- .../contracts/mock_contract/Cargo.toml | 26 ++-- .../contracts/mock_contract_u64/Cargo.toml | 22 ++-- cw-orch-daemon/Cargo.toml | 114 +++++++++--------- cw-orch-daemon/tests/mock_networks.toml | 24 ++-- cw-orch-interchain/Cargo.toml | 64 +++++----- cw-orch/Cargo.toml | 91 +++++++------- ...sts__multiple_contracts_snapshot_test.snap | 7 +- ...orch__snapshots__tests__snapshot_test.snap | 3 +- docs/book.toml | 28 ++--- packages/clone-testing/Cargo.toml | 40 +++--- packages/cw-orch-core/Cargo.toml | 42 +++---- packages/cw-orch-mock/Cargo.toml | 30 ++--- packages/cw-orch-networks/Cargo.toml | 20 +-- packages/cw-orch-networks/src/networks/mod.rs | 2 + packages/cw-orch-neutron-test-tube/Cargo.toml | 26 ++-- packages/cw-orch-osmosis-test-tube/Cargo.toml | 28 ++--- packages/cw-orch-traits/Cargo.toml | 20 +-- packages/integrations/cw-plus/Cargo.toml | 54 ++++----- .../interchain/interchain-core/Cargo.toml | 52 ++++---- .../interchain/interchain-daemon/Cargo.toml | 56 +++++---- .../interchain-daemon/src/interchain_env.rs | 32 ++--- .../interchain-daemon/src/packet_inspector.rs | 44 +++---- .../interchain/interchain-mock/Cargo.toml | 32 ++--- packages/interchain/proto/Cargo.toml | 38 +++--- packages/interchain/starship/Cargo.toml | 34 +++--- .../macros/cw-orch-contract-derive/Cargo.toml | 16 +-- packages/macros/cw-orch-fns-derive/Cargo.toml | 18 +-- .../macros/from-interface-derive/Cargo.toml | 12 +- rustfmt.toml | 4 +- taplo.toml | 5 + test_contracts/compatibility-test/Cargo.toml | 22 ++-- 35 files changed, 555 insertions(+), 573 deletions(-) create mode 100644 taplo.toml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 4a01aedf1..b3d29bec2 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -79,7 +79,7 @@ jobs: # https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability strategy: matrix: - msrv: [1.76.0] # dep/feat syntax fixed with co-exist dep + msrv: [1.78.0] # dep/feat syntax fixed with co-exist dep name: ubuntu / ${{ matrix.msrv }} steps: - uses: actions/checkout@v4 diff --git a/Cargo.toml b/Cargo.toml index 194e52c34..8e5b25407 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,7 @@ [workspace] +exclude = [ + "test_contracts/compatibility-test", # TODO: add new after cw-orch-core 2.0.0 as it's breaking, it shouldn't be compatible +] members = [ "cw-orch", "cw-orch-daemon", @@ -15,71 +18,66 @@ members = [ "packages/interchain/*", "packages/integrations/*", ] -exclude = [ - "test_contracts/compatibility-test", # TODO: add new after cw-orch-core 2.0.0 as it's breaking, it shouldn't be compatible -] resolver = "2" [workspace.package] -authors = ["CyberHoward "] -edition = "2021" -license = "LGPL-3.0" +authors = ["CyberHoward "] +edition = "2021" +license = "LGPL-3.0" repository = "https://github.com/AbstractSDK/cw-orchestrator" [workspace.dependencies] -cw-utils = { version = "2.0.0" } -cosmwasm-std = { version = "2.1" } -cw-storage-plus = { version = "2.0.0" } cosmos-sdk-proto = { version = "0.24.0", default-features = false } +cosmwasm-std = { version = "2.1" } +cw-storage-plus = { version = "2.0.0" } +cw-utils = { version = "2.0.0" } -cw-multi-test = { package = "abstract-cw-multi-test", version = "2.0.2", features = [ - "cosmwasm_1_2", -] } -cw20 = { version = "2.0.0" } -cw20-base = { version = "2.0.0" } +cw-multi-test = { package = "abstract-cw-multi-test", version = "2.0.2", features = ["cosmwasm_1_2"] } +cw20 = { version = "2.0.0" } +cw20-base = { version = "2.0.0" } -osmosis-test-tube = { version = "27.0.0" } neutron-test-tube = { version = "=5.0.1" } +osmosis-test-tube = { version = "27.0.0" } anyhow = "1.0" -serde = { version = "1.0.208", default-features = false, features = ["derive"] } -tokio = { version = "1.39", features = ["full"] } +serde = { version = "1.0.208", default-features = false, features = ["derive"] } +tokio = { version = "1.39", features = ["full"] } -cw-orch = { path = "./cw-orch", version = "0.27.0" } -cw-orch-daemon = { path = "./cw-orch-daemon", version = "0.28.0" } -cw-orch-core = { path = "packages/cw-orch-core", version = "2.1.3" } -cw-orch-traits = { path = "packages/cw-orch-traits", version = "0.25.0" } -cw-orch-mock = { path = "packages/cw-orch-mock", version = "0.24.2" } +cw-orch = { path = "./cw-orch", version = "0.27.0" } +cw-orch-core = { path = "packages/cw-orch-core", version = "2.1.3" } +cw-orch-daemon = { path = "./cw-orch-daemon", version = "0.28.0" } +cw-orch-mock = { path = "packages/cw-orch-mock", version = "0.24.2" } cw-orch-networks = { path = "packages/cw-orch-networks", version = "0.24.3" } +cw-orch-traits = { path = "packages/cw-orch-traits", version = "0.25.0" } # Macros cw-orch-contract-derive = { path = "packages/macros/cw-orch-contract-derive", version = "0.21.0" } -cw-orch-fns-derive = { path = "packages/macros/cw-orch-fns-derive", version = "0.23.0" } +cw-orch-fns-derive = { path = "packages/macros/cw-orch-fns-derive", version = "0.23.0" } # Extensions -cw-orch-osmosis-test-tube = { version = "0.4.0", path = "packages/cw-orch-osmosis-test-tube" } cw-orch-neutron-test-tube = { version = "0.1.0", path = "packages/cw-orch-neutron-test-tube" } +cw-orch-osmosis-test-tube = { version = "0.4.0", path = "packages/cw-orch-osmosis-test-tube" } #Clone Testing cw-orch-clone-testing = { version = "0.8.0", path = "packages/clone-testing" } # Interchain -cw-orch-interchain = { path = "cw-orch-interchain", version = "0.8.0" } -cw-orch-interchain-core = { path = "packages/interchain/interchain-core", version = "0.9.0" } +cw-orch-interchain = { path = "cw-orch-interchain", version = "0.8.0" } +cw-orch-interchain-core = { path = "packages/interchain/interchain-core", version = "0.9.0" } cw-orch-interchain-daemon = { path = "packages/interchain/interchain-daemon", version = "0.9.0" } -cw-orch-interchain-mock = { path = "packages/interchain/interchain-mock", version = "0.9.0" } -cw-orch-starship = { path = "packages/interchain/starship", version = "0.7.0" } -cw-orch-proto = { path = "packages/interchain/proto", version = "0.9.0" } +cw-orch-interchain-mock = { path = "packages/interchain/interchain-mock", version = "0.9.0" } +cw-orch-proto = { path = "packages/interchain/proto", version = "0.9.0" } +cw-orch-starship = { path = "packages/interchain/starship", version = "0.7.0" } -thiserror = { version = "1.0.63" } -sha2 = { version = "0.10.8" } -serde_json = "1.0.125" -tonic = { version = "0.12.1" } +cosmrs = { version = "0.19.0" } +ibc-proto = { version = "0.47.0" } +prost = "0.13.1" prost-types = "0.13.1" -prost = "0.13.1" -cosmrs = { version = "0.19.0" } -ibc-proto = { version = "0.47.0" } +serde_json = "1.0.125" +sha2 = { version = "0.10.8" } +thiserror = { version = "1.0.63" } +tonic = { version = "0.12.1" } # Test deps speculoos = "0.11.0" @@ -87,5 +85,5 @@ speculoos = "0.11.0" log = "0.4.22" # Interchain -ibc-relayer-types = { version = "0.29.2" } ibc-chain-registry = { version = "0.29.2" } +ibc-relayer-types = { version = "0.29.2" } diff --git a/contracts-ws/Cargo.toml b/contracts-ws/Cargo.toml index ecd465167..26380f2e1 100644 --- a/contracts-ws/Cargo.toml +++ b/contracts-ws/Cargo.toml @@ -8,14 +8,14 @@ resolver = "2" edition = "2021" [workspace.dependencies] -cosmwasm-std = "2.0.0" -cw20 = { version = "2.0.0" } -cw20-base = { version = "2.0.0" } +cosmwasm-std = "2.0.0" cw-storage-plus = { version = "2.0.0" } +cw20 = { version = "2.0.0" } +cw20-base = { version = "2.0.0" } -serde = { version = "1.0.103", default-features = false, features = ["derive"] } anyhow = "1.0" -log = "0.4.14" +log = "0.4.14" +serde = { version = "1.0.103", default-features = false, features = ["derive"] } -cw-orch = { path = "../cw-orch", version = "0.27.0" } +cw-orch = { path = "../cw-orch", version = "0.27.0" } cw-orch-interchain = { path = "../cw-orch-interchain", version = "0.8.1" } diff --git a/contracts-ws/contracts/counter/Cargo.toml b/contracts-ws/contracts/counter/Cargo.toml index c55e1d9bf..a79bb618e 100644 --- a/contracts-ws/contracts/counter/Cargo.toml +++ b/contracts-ws/contracts/counter/Cargo.toml @@ -1,29 +1,29 @@ [package] -name = "counter-contract" -version = "0.27.1" description = "counter constract" -keywords = ["cosmwasm", "blockchain"] -edition = { workspace = true } -license = "LGPL-3.0" -exclude = [".env"] +edition = { workspace = true } +exclude = [".env"] +keywords = ["cosmwasm", "blockchain"] +license = "LGPL-3.0" +name = "counter-contract" +version = "0.27.1" [lib] crate-type = ["cdylib", "rlib"] [features] default = ["export"] -export = [] +export = [] [dependencies] -cosmwasm-std = { workspace = true } -cw-storage-plus = { workspace = true } -cw2 = "2.0" cosmwasm-schema = "2.1" -schemars = "0.8.21" -thiserror = { version = "1.0.63" } -serde = { workspace = true } -serde_json = "1.0.125" -cw-orch = { workspace = true, features = ["daemon"] } +cosmwasm-std = { workspace = true } +cw-orch = { workspace = true, features = ["daemon"] } +cw-storage-plus = { workspace = true } +cw2 = "2.0" +schemars = "0.8.21" +serde = { workspace = true } +serde_json = "1.0.125" +thiserror = { version = "1.0.63" } # Unused, only there to check for wasm compatibility cw-orch-interchain = { workspace = true, features = ["daemon"] } @@ -32,7 +32,7 @@ name = "deploy" [dev-dependencies] # Deps for deployment -dotenv = { version = "0.15.0" } +anyhow = { workspace = true } +cw-orch = { workspace = true, features = ["daemon"] } +dotenv = { version = "0.15.0" } pretty_env_logger = { version = "0.5.0" } -cw-orch = { workspace = true, features = ["daemon"] } -anyhow = { workspace = true } diff --git a/contracts-ws/contracts/mock_contract/Cargo.toml b/contracts-ws/contracts/mock_contract/Cargo.toml index 1f2a032b1..acff2c0be 100644 --- a/contracts-ws/contracts/mock_contract/Cargo.toml +++ b/contracts-ws/contracts/mock_contract/Cargo.toml @@ -1,9 +1,9 @@ [package] -name = "mock-contract" -version = "0.1.0" description = "Mock constract for cw-orch macro testing" -keywords = ["cosmwasm", "blockchain"] -edition = { workspace = true } +edition = { workspace = true } +keywords = ["cosmwasm", "blockchain"] +name = "mock-contract" +version = "0.1.0" exclude = [".env"] @@ -11,17 +11,17 @@ exclude = [".env"] crate-type = ["cdylib", "rlib"] [features] -default = ["export"] -export = [] +default = ["export"] +export = [] interface = [] [dependencies] -cosmwasm-std = { workspace = true } -cw2 = { version = "2.0.0" } -serde = { workspace = true } -schemars = "0.8.21" -serde_json = "1.0.125" -thiserror = { version = "1.0.63" } cosmwasm-schema = "2.1" -cw-orch = { workspace = true } +cosmwasm-std = { workspace = true } +cw-orch = { workspace = true } cw-storage-plus = { workspace = true } +cw2 = { version = "2.0.0" } +schemars = "0.8.21" +serde = { workspace = true } +serde_json = "1.0.125" +thiserror = { version = "1.0.63" } diff --git a/contracts-ws/contracts/mock_contract_u64/Cargo.toml b/contracts-ws/contracts/mock_contract_u64/Cargo.toml index 9035fad58..964d8a86c 100644 --- a/contracts-ws/contracts/mock_contract_u64/Cargo.toml +++ b/contracts-ws/contracts/mock_contract_u64/Cargo.toml @@ -1,9 +1,9 @@ [package] -name = "mock-contract-u64" -version = "0.1.0" description = "Mock constract for cw-orch macro testing" -keywords = ["cosmwasm", "blockchain"] -edition = { workspace = true } +edition = { workspace = true } +keywords = ["cosmwasm", "blockchain"] +name = "mock-contract-u64" +version = "0.1.0" exclude = [".env"] @@ -12,15 +12,15 @@ crate-type = ["cdylib", "rlib"] [features] default = ["export"] -export = [] +export = [] [dependencies] -cosmwasm-std = { workspace = true } -serde = { workspace = true } -schemars = "0.8.21" -serde_json = "1.0.125" -thiserror = { version = "1.0.63" } cosmwasm-schema = "2.1" -cw-orch = { workspace = true } +cosmwasm-std = { workspace = true } +cw-orch = { workspace = true } +schemars = "0.8.21" +serde = { workspace = true } +serde_json = "1.0.125" +thiserror = { version = "1.0.63" } mock-contract = { path = "../mock_contract" } diff --git a/cw-orch-daemon/Cargo.toml b/cw-orch-daemon/Cargo.toml index 2af2f8476..cf674a25c 100644 --- a/cw-orch-daemon/Cargo.toml +++ b/cw-orch-daemon/Cargo.toml @@ -1,14 +1,14 @@ [package] -name = "cw-orch-daemon" -version = "0.28.1" -authors = { workspace = true } -edition = { workspace = true } -license = { workspace = true } -repository = { workspace = true } +authors = { workspace = true } +categories = ["development-tools"] description = "Scripting library for deploying and interacting with CosmWasm smart-contracts" -keywords = ["cosmwasm", "blockchain"] -categories = ["development-tools"] -readme = "../README.md" +edition = { workspace = true } +keywords = ["cosmwasm", "blockchain"] +license = { workspace = true } +name = "cw-orch-daemon" +readme = "../README.md" +repository = { workspace = true } +version = "0.28.1" exclude = [".env"] @@ -20,51 +20,51 @@ all-features = true default = [] # enable node-backed tests (ensure Docker is running) # run with `cargo test --jobs 1 --features node-tests` +eth = ["dep:ethers-signers", "dep:ethers-core"] node-tests = [] -eth = ["dep:ethers-signers", "dep:ethers-core"] [dependencies] # Default deps -cw-orch-core = { workspace = true } -cw-orch-traits = { workspace = true } +cw-orch-core = { workspace = true } cw-orch-networks = { workspace = true } +cw-orch-traits = { workspace = true } +anyhow = { workspace = true } cosmwasm-std = { workspace = true } -anyhow = { workspace = true } -serde = { workspace = true } -schemars = "0.8.21" -log = { workspace = true } -serde_json = { workspace = true } -thiserror = { workspace = true } +log = { workspace = true } +schemars = "0.8.21" +serde = { workspace = true } +serde_json = { workspace = true } +thiserror = { workspace = true } prost-types = { workspace = true } # Daemon deps -sha2 = { workspace = true } -prost = { workspace = true } -bitcoin = { version = "0.32.2" } -bech32 = { version = "0.11.0", default-features = false, features = ["alloc"] } -hex = { version = "0.4.3" } -ripemd = { version = "0.1.3" } -tokio = { workspace = true, features = ["full"] } -tonic = { workspace = true, features = ["tls-native-roots"] } -reqwest = { version = "0.12.5" } -base64 = { version = "0.22.1" } -rand_core = { version = "0.6.4", default-features = false } +base16 = { version = "0.2.1" } +base64 = { version = "0.22.1" } +bech32 = { version = "0.11.0", default-features = false, features = ["alloc"] } +bip39 = { version = "2.0.0", features = ["rand"] } +bitcoin = { version = "0.32.2" } +chrono = { version = "0.4" } +cosmrs = { workspace = true, features = ["dev", "cosmwasm", "grpc"] } +dirs = "5.0.1" ed25519-dalek = { version = "2", features = ["serde"] } -eyre = { version = "0.6" } -cosmrs = { workspace = true, features = ["dev", "cosmwasm", "grpc"] } -chrono = { version = "0.4" } -base16 = { version = "0.2.1" } -ring = { version = "0.17.8" } -dirs = "5.0.1" -bip39 = { version = "2.0.0", features = ["rand"] } +eyre = { version = "0.6" } +hex = { version = "0.4.3" } +prost = { workspace = true } +rand_core = { version = "0.6.4", default-features = false } +reqwest = { version = "0.12.5" } +ring = { version = "0.17.8" } +ripemd = { version = "0.1.3" } +sha2 = { workspace = true } +tokio = { workspace = true, features = ["full"] } +tonic = { workspace = true, features = ["tls-native-roots"] } # Injective dependencies -ethers-signers = { version = "2.0.14", optional = true } -ethers-core = { version = "2.0.14", optional = true } async-recursion = "1.1.1" +ethers-core = { version = "2.0.14", optional = true } +ethers-signers = { version = "2.0.14", optional = true } # Gzip -flate2 = { version = "1.0.31" } +flate2 = { version = "1.0.31" } lazy_static = "1.5.0" # Lock daemon @@ -75,32 +75,30 @@ once_cell = { version = "1.19.0" } uid = "0.1.7" # Deserialize network config -toml = "0.8" -http = "1.1.0" +http = "1.1.0" libc-print = "0.1.23" +toml = "0.8" [dev-dependencies] -cw-orch-daemon = { path = "." } -cw-orch = { path = "../cw-orch", features = ["daemon"] } -env_logger = "0.11.5" -cw20 = { version = "2" } -cw20-base = { version = "2" } cosmwasm-schema = "2.1" -speculoos = "0.11.0" -ctor = "0.2.8" -duct = "0.13" -mock-contract = { path = "../contracts-ws/contracts/mock_contract", features = [ - "interface", -] } -serial_test = { version = "3.1.1" } +ctor = "0.2.8" +cw-orch = { path = "../cw-orch", features = ["daemon"] } +cw-orch-daemon = { path = "." } +cw20 = { version = "2" } +cw20-base = { version = "2" } +duct = "0.13" +env_logger = "0.11.5" +mock-contract = { path = "../contracts-ws/contracts/mock_contract", features = ["interface"] } +serial_test = { version = "3.1.1" } +speculoos = "0.11.0" # Ethereum deps +ethers-core = { version = "2.0.14" } ethers-signers = { version = "2.0.14" } -ethers-core = { version = "2.0.14" } -tokio-test = "0.4.4" +tokio-test = "0.4.4" # File lock test -nix = { version = "0.29.0", features = ["process"] } -counter-contract = { path = "../contracts-ws/contracts/counter" } -dotenv = "0.15.0" +counter-contract = { path = "../contracts-ws/contracts/counter" } +dotenv = "0.15.0" +nix = { version = "0.29.0", features = ["process"] } pretty_env_logger = "0.5.0" diff --git a/cw-orch-daemon/tests/mock_networks.toml b/cw-orch-daemon/tests/mock_networks.toml index ea6fa2d89..340d22a62 100644 --- a/cw-orch-daemon/tests/mock_networks.toml +++ b/cw-orch-daemon/tests/mock_networks.toml @@ -1,20 +1,20 @@ [juno-1] -chain_id = "joono-1" -gas_denom = "gas_denom" -gas_price = 64 -grpc_urls = ["http://juno-grpc.com:123"] -lcd_url = "http://juno-lcd.com:321" -fcd_url = "http://juno-fcd.com:234" -kind = "local" +chain_id = "joono-1" +fcd_url = "http://juno-fcd.com:234" +gas_denom = "gas_denom" +gas_price = 64 +grpc_urls = ["http://juno-grpc.com:123"] +kind = "local" +lcd_url = "http://juno-lcd.com:321" network_info = { chain_name = "joono", pub_address_prefix = "joo", coin_type = 42 } [neutron-1] gas_price = 1.23 [abstr-1] -kind = "mainnet" -chain_id = "juno-1" -gas_denom = "ujuno" -gas_price = 0.075 -grpc_urls = ["http://juno-grpc.polkachu.com:12690"] +chain_id = "juno-1" +gas_denom = "ujuno" +gas_price = 0.075 +grpc_urls = ["http://juno-grpc.polkachu.com:12690"] +kind = "mainnet" network_info = { chain_name = "juno", pub_address_prefix = "juno", coin_type = 118 } diff --git a/cw-orch-interchain/Cargo.toml b/cw-orch-interchain/Cargo.toml index 85d6565d6..c7332e123 100644 --- a/cw-orch-interchain/Cargo.toml +++ b/cw-orch-interchain/Cargo.toml @@ -1,13 +1,13 @@ [package] -name = "cw-orch-interchain" -version = "0.8.1" -authors = { workspace = true } -edition = { workspace = true } -license = { workspace = true } -repository = { workspace = true } +authors = { workspace = true } +categories = ["development-tools"] description = "Scripting library for deploying and interacting with CosmWasm smart-contracts" -keywords = ["cosmwasm", "blockchain"] -categories = ["development-tools"] +edition = { workspace = true } +keywords = ["cosmwasm", "blockchain"] +license = { workspace = true } +name = "cw-orch-interchain" +repository = { workspace = true } +version = "0.8.1" exclude = [".env"] @@ -18,40 +18,36 @@ all-features = true [features] default = [] # enable the optional dependencies -daemon = [ - "cw-orch-interchain-core/daemon", - "dep:cw-orch-interchain-daemon", - "dep:cw-orch-starship", -] +daemon = ["cw-orch-interchain-core/daemon", "dep:cw-orch-interchain-daemon", "dep:cw-orch-starship"] [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -cw-orch-interchain-core = { workspace = true } -cw-orch-interchain-mock = { workspace = true } -cw-orch-interchain-daemon = { workspace = true, optional = true } -cw-orch-starship = { workspace = true, optional = true } +cw-orch-interchain-core = { workspace = true } +cw-orch-interchain-daemon = { workspace = true, optional = true } +cw-orch-interchain-mock = { workspace = true } +cw-orch-starship = { workspace = true, optional = true } ibc-relayer-types.workspace = true #Used only for testing cosmwasm-std.workspace = true -cw1 = "2.0.0" -cw1-whitelist = "2.0.0" -speculoos.workspace = true +cw1 = "2.0.0" +cw1-whitelist = "2.0.0" +speculoos.workspace = true [dev-dependencies] -cw-orch = { workspace = true, features = ["daemon"] } -cw-orch-interchain = { path = ".", features = ["daemon"] } -simple-ica-controller = { git = "https://github.com/Buckram123/cw-ibc-demo.git", rev = "2cc3c14" } -simple-ica-host = { git = "https://github.com/Buckram123/cw-ibc-demo.git", rev = "2cc3c14" } -clap = { version = "4.5.16", features = ["derive"] } -dotenv = "0.15.0" -env_logger = "0.11.5" +clap = { version = "4.5.16", features = ["derive"] } +cosmos-sdk-proto = { workspace = true } +cw-orch = { workspace = true, features = ["daemon"] } +cw-orch-interchain = { path = ".", features = ["daemon"] } +dotenv = "0.15.0" +env_logger = "0.11.5" +ibc-proto = { workspace = true } ibc-relayer-types.workspace = true -log.workspace = true -speculoos.workspace = true -tokio = "1.39.2" -cosmos-sdk-proto = { workspace = true } -prost-types = { workspace = true } -ibc-proto = { workspace = true } -pretty_env_logger = "0.5.0" +log.workspace = true +pretty_env_logger = "0.5.0" +prost-types = { workspace = true } +simple-ica-controller = { git = "https://github.com/Buckram123/cw-ibc-demo.git", rev = "2cc3c14" } +simple-ica-host = { git = "https://github.com/Buckram123/cw-ibc-demo.git", rev = "2cc3c14" } +speculoos.workspace = true +tokio = "1.39.2" diff --git a/cw-orch/Cargo.toml b/cw-orch/Cargo.toml index d86f7a3c2..5fe357a5e 100644 --- a/cw-orch/Cargo.toml +++ b/cw-orch/Cargo.toml @@ -1,14 +1,14 @@ [package] -name = "cw-orch" -version = "0.27.0" -authors = { workspace = true } -edition = { workspace = true } -license = { workspace = true } -repository = { workspace = true } +authors = { workspace = true } +categories = ["development-tools"] description = "Scripting library for deploying and interacting with CosmWasm smart-contracts" -keywords = ["cosmwasm", "blockchain"] -categories = ["development-tools"] -readme = "README.md" +edition = { workspace = true } +keywords = ["cosmwasm", "blockchain"] +license = { workspace = true } +name = "cw-orch" +readme = "README.md" +repository = { workspace = true } +version = "0.27.0" exclude = [".env"] @@ -17,89 +17,80 @@ exclude = [".env"] all-features = true [[example]] -name = "local_daemon" +name = "local_daemon" required-features = ["daemon"] [[example]] -name = "testnet_daemon" +name = "testnet_daemon" required-features = ["daemon"] [[example]] -name = "injective" +name = "injective" required-features = ["eth"] [[example]] -name = "bank_query" -path = "examples/queries/bank_query.rs" +name = "bank_query" +path = "examples/queries/bank_query.rs" required-features = ["daemon"] [[example]] -name = "testnet_queries" -path = "examples/queries/testnet_queries.rs" +name = "testnet_queries" +path = "examples/queries/testnet_queries.rs" required-features = ["daemon"] [features] default = [] # enable the optional dependencies -daemon = [ - "dep:tokio", - "dep:cosmrs", - "dep:cw-orch-daemon", - "dep:cw-orch-networks", -] -eth = ["daemon", "cw-orch-core/eth", "cw-orch-daemon?/eth"] +daemon = ["dep:tokio", "dep:cosmrs", "dep:cw-orch-daemon", "dep:cw-orch-networks"] +eth = ["daemon", "cw-orch-core/eth", "cw-orch-daemon?/eth"] snapshot-testing = ["dep:insta", "dep:sanitize-filename"] [dependencies] # Derive cw-orch-contract-derive = { workspace = true } -cw-orch-fns-derive = { workspace = true } +cw-orch-fns-derive = { workspace = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] # Daemon deps +cosmrs = { workspace = true, features = ["dev", "cosmwasm", "grpc"], optional = true } cw-orch-networks = { workspace = true, optional = true } -tokio = { workspace = true, features = ["full"], optional = true } -cosmrs = { workspace = true, features = [ - "dev", - "cosmwasm", - "grpc", -], optional = true } +tokio = { workspace = true, features = ["full"], optional = true } # Live mock deps tonic = { workspace = true, optional = true, features = ["tls", "tls-roots"] } # Snapshot deps -insta = { version = "1.39.0", features = ["yaml"], optional = true } +insta = { version = "1.39.0", features = ["yaml"], optional = true } sanitize-filename = { version = "0.5.0", optional = true } # Default deps +anyhow = { workspace = true } cosmwasm-std = { workspace = true } -cw-utils = { workspace = true } -anyhow = { workspace = true } -serde = { workspace = true } -schemars = "0.8.21" -log = { workspace = true } -thiserror = { workspace = true } -hex = "0.4.3" +cw-utils = { workspace = true } +hex = "0.4.3" +log = { workspace = true } +schemars = "0.8.21" +serde = { workspace = true } +thiserror = { workspace = true } # Env deps # This packages will most likely make wasm not compilable +cw-orch-core = { workspace = true } cw-orch-daemon = { workspace = true, optional = true } +cw-orch-mock = { workspace = true } cw-orch-traits = { workspace = true } -cw-orch-core = { workspace = true } -cw-orch-mock = { workspace = true } [dev-dependencies] -cw-orch = { features = ["daemon", "snapshot-testing"], path = "." } -env_logger = "0.11.5" -cosmwasm-schema = "2.1" -counter-contract = { path = "../contracts-ws/contracts/counter" } -mock-contract = { path = "../contracts-ws/contracts/mock_contract" } +cosmwasm-schema = "2.1" +counter-contract = { path = "../contracts-ws/contracts/counter" } +cw-orch = { features = ["daemon", "snapshot-testing"], path = "." } +dotenv = "0.15.0" +env_logger = "0.11.5" +mock-contract = { path = "../contracts-ws/contracts/mock_contract" } mock-contract-u64 = { path = "../contracts-ws/contracts/mock_contract_u64" } -serde_json = { workspace = true } -dotenv = "0.15.0" -osmosis-std = "0.26.0" -prost = { workspace = true } -prost-types = { workspace = true } +osmosis-std = "0.26.0" +prost = { workspace = true } +prost-types = { workspace = true } +serde_json = { workspace = true } diff --git a/cw-orch/src/snapshots/cw_orch__snapshots__tests__multiple_contracts_snapshot_test.snap b/cw-orch/src/snapshots/cw_orch__snapshots__tests__multiple_contracts_snapshot_test.snap index c4e3718ff..a219aa5bc 100644 --- a/cw-orch/src/snapshots/cw_orch__snapshots__tests__multiple_contracts_snapshot_test.snap +++ b/cw-orch/src/snapshots/cw_orch__snapshots__tests__multiple_contracts_snapshot_test.snap @@ -1,19 +1,20 @@ --- source: cw-orch/src/snapshots.rs expression: all_storage +snapshot_kind: text --- counter_contract: - - contract_info - - "{\"contract\":\"crates.io:counter\",\"version\":\"0.27.0\"}" + - "{\"contract\":\"crates.io:counter\",\"version\":\"0.27.1\"}" - - state - "{\"count\":1,\"owner\":\"cosmwasm1pgm8hyk0pvphmlvfjc8wsvk4daluz5tgrw6pu5mfpemk74uxnx9qlm3aqg\"}" second-counter-contract: - - contract_info - - "{\"contract\":\"crates.io:counter\",\"version\":\"0.27.0\"}" + - "{\"contract\":\"crates.io:counter\",\"version\":\"0.27.1\"}" - - state - "{\"count\":4,\"owner\":\"cosmwasm1pgm8hyk0pvphmlvfjc8wsvk4daluz5tgrw6pu5mfpemk74uxnx9qlm3aqg\"}" third-counter-contract: - - contract_info - - "{\"contract\":\"crates.io:counter\",\"version\":\"0.27.0\"}" + - "{\"contract\":\"crates.io:counter\",\"version\":\"0.27.1\"}" - - state - "{\"count\":3,\"owner\":\"cosmwasm1pgm8hyk0pvphmlvfjc8wsvk4daluz5tgrw6pu5mfpemk74uxnx9qlm3aqg\"}" diff --git a/cw-orch/src/snapshots/cw_orch__snapshots__tests__snapshot_test.snap b/cw-orch/src/snapshots/cw_orch__snapshots__tests__snapshot_test.snap index 342e56246..122a77908 100644 --- a/cw-orch/src/snapshots/cw_orch__snapshots__tests__snapshot_test.snap +++ b/cw-orch/src/snapshots/cw_orch__snapshots__tests__snapshot_test.snap @@ -1,9 +1,10 @@ --- source: cw-orch/src/snapshots.rs expression: all_storage +snapshot_kind: text --- counter_contract: - - contract_info - - "{\"contract\":\"crates.io:counter\",\"version\":\"0.27.0\"}" + - "{\"contract\":\"crates.io:counter\",\"version\":\"0.27.1\"}" - - state - "{\"count\":1,\"owner\":\"cosmwasm1pgm8hyk0pvphmlvfjc8wsvk4daluz5tgrw6pu5mfpemk74uxnx9qlm3aqg\"}" diff --git a/docs/book.toml b/docs/book.toml index 6e8e8a04b..77705ee3c 100644 --- a/docs/book.toml +++ b/docs/book.toml @@ -1,28 +1,22 @@ [book] -authors = ["CyberHoward", "Riada"] -language = "en" +authors = ["CyberHoward", "Riada"] +language = "en" multilingual = false -src = "src" -title = "cw-orchestrator documentation" +src = "src" +title = "cw-orchestrator documentation" [preprocessor.keeper] -command = "mdbook-keeper" +command = "mdbook-keeper" +externs = ["cosmwasm_schema", "cosmwasm_std", "counter_contract", "cw_orch_interchain", "anyhow"] manifest_dir = "../" -externs = [ - "cosmwasm_schema", - "cosmwasm_std", - "counter_contract", - "cw_orch_interchain", - "anyhow", -] [output.html] -default-theme = "light" +curly-quotes = true +default-theme = "light" +edit-url-template = "https://github.com/AbstractSDK/cw-orchestrator/edit/main/docs/{path}" +git-repository-icon = "fa-github" +git-repository-url = "https://github.com/AbstractSDK/cw-orchestrator" preferred-dark-theme = "navy" -curly-quotes = true -git-repository-url = "https://github.com/AbstractSDK/cw-orchestrator" -git-repository-icon = "fa-github" -edit-url-template = "https://github.com/AbstractSDK/cw-orchestrator/edit/main/docs/{path}" [extern] # Define the external crate and its features diff --git a/packages/clone-testing/Cargo.toml b/packages/clone-testing/Cargo.toml index 6f8b29a79..6d1720deb 100644 --- a/packages/clone-testing/Cargo.toml +++ b/packages/clone-testing/Cargo.toml @@ -1,40 +1,40 @@ [package] -name = "cw-orch-clone-testing" -version = "0.9.1" -authors.workspace = true -edition.workspace = true -license.workspace = true +authors.workspace = true +description = "Adapter for interacting with cw-multi-test via the cw-orchestrator tool" +edition.workspace = true +license.workspace = true +name = "cw-orch-clone-testing" repository.workspace = true -description = "Adapter for interacting with cw-multi-test via the cw-orchestrator tool" +version = "0.9.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] cosmwasm-std = { workspace = true } -cw-orch-core = { workspace = true } -cw-orch-mock = { workspace = true } +cw-orch-core = { workspace = true } cw-orch-daemon = { workspace = true } +cw-orch-mock = { workspace = true } clone-cw-multi-test = { version = "0.6.1" } -cw-utils = { workspace = true } -serde = { workspace = true } -log = { workspace = true } -anyhow = { workspace = true } -tokio = { workspace = true } +anyhow = { workspace = true } +cw-utils = { workspace = true } itertools = "0.12.0" -sha2 = "0.10.8" -tonic = { workspace = true } +log = { workspace = true } +serde = { workspace = true } +sha2 = "0.10.8" +tokio = { workspace = true } +tonic = { workspace = true } [dev-dependencies] cosmwasm-schema = "2.0.0" -speculoos = { workspace = true } +speculoos = { workspace = true } -cw20 = { version = "2.0.0" } +cw20 = { version = "2.0.0" } cw20-base = { version = "2.0.0" } -env_logger = "0.10.0" -counter-contract = { path = "../../contracts-ws/contracts/counter" } -cw-orch = { path = "../../cw-orch", features = ["daemon"] } +counter-contract = { path = "../../contracts-ws/contracts/counter" } +cw-orch = { path = "../../cw-orch", features = ["daemon"] } +env_logger = "0.10.0" pretty_env_logger = "0.5.0" diff --git a/packages/cw-orch-core/Cargo.toml b/packages/cw-orch-core/Cargo.toml index dce02fc18..42aa7e0c0 100644 --- a/packages/cw-orch-core/Cargo.toml +++ b/packages/cw-orch-core/Cargo.toml @@ -1,14 +1,14 @@ [package] -name = "cw-orch-core" -version = "2.1.3" -authors = { workspace = true } -edition = { workspace = true } -license = { workspace = true } -repository = { workspace = true } +authors = { workspace = true } +categories = ["development-tools"] description = "Scripting library for deploying and interacting with CosmWasm smart-contracts" -keywords = ["cosmwasm", "blockchain"] -categories = ["development-tools"] -readme = "README.md" +edition = { workspace = true } +keywords = ["cosmwasm", "blockchain"] +license = { workspace = true } +name = "cw-orch-core" +readme = "README.md" +repository = { workspace = true } +version = "2.1.3" exclude = [".env"] @@ -18,27 +18,27 @@ all-features = true [features] default = [] -eth = ["dep:snailquote"] +eth = ["dep:snailquote"] [dependencies] -thiserror = { workspace = true } -cosmwasm-std = { workspace = true } -serde = { workspace = true } +cosmwasm-std = { workspace = true } cw-multi-test = { workspace = true } +serde = { workspace = true } +thiserror = { workspace = true } -log = { workspace = true } -sha2 = { workspace = true } -anyhow = { workspace = true } +anyhow = { workspace = true } +log = { workspace = true } serde_json = { workspace = true } +sha2 = { workspace = true } # Ethereum deps -snailquote = { version = "0.3.1", optional = true } -dirs = "5.0.1" -cw-utils = { workspace = true } cosmos-sdk-proto = { workspace = true, features = ["cosmwasm"] } -cw-storage-plus = { workspace = true } +cw-storage-plus = { workspace = true } +cw-utils = { workspace = true } +dirs = "5.0.1" +snailquote = { version = "0.3.1", optional = true } [dev-dependencies] +anyhow = { workspace = true } speculoos = { workspace = true } -anyhow = { workspace = true } diff --git a/packages/cw-orch-mock/Cargo.toml b/packages/cw-orch-mock/Cargo.toml index 70d9989b6..85cefb120 100644 --- a/packages/cw-orch-mock/Cargo.toml +++ b/packages/cw-orch-mock/Cargo.toml @@ -1,27 +1,27 @@ [package] -name = "cw-orch-mock" -version = "0.24.3" -authors.workspace = true -edition.workspace = true -license.workspace = true +authors.workspace = true +description = "Adapter for interacting with cw-multi-test via the cw-orchestrator tool" +edition.workspace = true +license.workspace = true +name = "cw-orch-mock" repository.workspace = true -description = "Adapter for interacting with cw-multi-test via the cw-orchestrator tool" +version = "0.24.3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cw-orch-core = { workspace = true } -cosmwasm-std = { workspace = true, features = ["cosmwasm_1_2"] } +cosmwasm-std = { workspace = true, features = ["cosmwasm_1_2"] } cw-multi-test = { workspace = true } -cw-utils = { workspace = true } -serde = { workspace = true } -sha2 = { workspace = true } -log = { workspace = true } +cw-orch-core = { workspace = true } +cw-utils = { workspace = true } +log = { workspace = true } +serde = { workspace = true } +sha2 = { workspace = true } [dev-dependencies] -speculoos = { workspace = true } -cw20 = { version = "2.0.0" } +cw20 = { version = "2.0.0" } cw20-base = { version = "2.0.0" } +speculoos = { workspace = true } +anyhow = { workspace = true } mock-contract = { path = "../../contracts-ws/contracts/mock_contract" } -anyhow = { workspace = true } diff --git a/packages/cw-orch-networks/Cargo.toml b/packages/cw-orch-networks/Cargo.toml index 260b4782a..dbc15adf6 100644 --- a/packages/cw-orch-networks/Cargo.toml +++ b/packages/cw-orch-networks/Cargo.toml @@ -1,17 +1,17 @@ [package] -name = "cw-orch-networks" -version = "0.24.7" -authors = { workspace = true } -edition = { workspace = true } -license = { workspace = true } -repository = { workspace = true } +authors = { workspace = true } +categories = ["development-tools"] description = "Networks library for deploying and interacting with CosmWasm smart-contracts" -keywords = ["cosmwasm", "blockchain"] -categories = ["development-tools"] -readme = "README.md" +edition = { workspace = true } +keywords = ["cosmwasm", "blockchain"] +license = { workspace = true } +name = "cw-orch-networks" +readme = "README.md" +repository = { workspace = true } +version = "0.24.7" exclude = [".env"] [dependencies] cw-orch-core = { workspace = true } -serde = { workspace = true } +serde = { workspace = true } diff --git a/packages/cw-orch-networks/src/networks/mod.rs b/packages/cw-orch-networks/src/networks/mod.rs index d1bac7143..e31c09b0e 100644 --- a/packages/cw-orch-networks/src/networks/mod.rs +++ b/packages/cw-orch-networks/src/networks/mod.rs @@ -19,6 +19,7 @@ pub mod terra; pub mod union; pub mod xion; +#[allow(deprecated)] use crate::networks::union::UNION_TESTNET_8; pub use archway::{ARCHWAY_1, CONSTANTINE_3}; pub use cosmos::COSMOS_HUB_TESTNET; @@ -82,6 +83,7 @@ pub const SUPPORTED_NETWORKS: &[ChainInfo] = &[ XION_TESTNET_1, ROLLKIT_TESTNET, LOCAL_LANDSLIDE, + #[allow(deprecated)] UNION_TESTNET_8, COSMOS_HUB_TESTNET, ]; diff --git a/packages/cw-orch-neutron-test-tube/Cargo.toml b/packages/cw-orch-neutron-test-tube/Cargo.toml index 1e161b4ac..09b87e956 100644 --- a/packages/cw-orch-neutron-test-tube/Cargo.toml +++ b/packages/cw-orch-neutron-test-tube/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "cw-orch-neutron-test-tube" -version = "0.2.1" -description = "Cw-orch environment adapter for neutron-test-tube" -authors.workspace = true -edition.workspace = true -license.workspace = true +authors.workspace = true +description = "Cw-orch environment adapter for neutron-test-tube" +edition.workspace = true +license.workspace = true +name = "cw-orch-neutron-test-tube" repository.workspace = true +version = "0.2.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -14,16 +14,16 @@ repository.workspace = true # Test Tube env deps neutron-test-tube = { workspace = true } -prost-types = { workspace = true } -prost = { workspace = true } -cosmwasm-std = { workspace = true } -serde = { workspace = true } -cw-orch-core = { workspace = true } -cw-orch-mock = { workspace = true } +cosmwasm-std = { workspace = true } +cw-orch-core = { workspace = true } +cw-orch-mock = { workspace = true } cw-orch-traits = { workspace = true } +prost = { workspace = true } +prost-types = { workspace = true } +serde = { workspace = true } [dev-dependencies] counter-contract = { path = "../../contracts-ws/contracts/counter" } -env_logger = "0.11.3" +env_logger = "0.11.3" cw-orch = { workspace = true } diff --git a/packages/cw-orch-osmosis-test-tube/Cargo.toml b/packages/cw-orch-osmosis-test-tube/Cargo.toml index 632b5240a..2a0107cc0 100644 --- a/packages/cw-orch-osmosis-test-tube/Cargo.toml +++ b/packages/cw-orch-osmosis-test-tube/Cargo.toml @@ -1,28 +1,28 @@ [package] -name = "cw-orch-osmosis-test-tube" -version = "0.5.0" -description = "Cw-orch environment adapter for osmosis-test-tube" -authors.workspace = true -edition.workspace = true -license.workspace = true +authors.workspace = true +description = "Cw-orch environment adapter for osmosis-test-tube" +edition.workspace = true +license.workspace = true +name = "cw-orch-osmosis-test-tube" repository.workspace = true +version = "0.5.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] # Test Tube env deps +cosmwasm-std = { workspace = true } +cw-orch-core = { workspace = true } +cw-orch-mock = { workspace = true } +cw-orch-traits = { workspace = true } osmosis-test-tube = { workspace = true } -prost-types = { workspace = true } -prost = { workspace = true } -cosmwasm-std = { workspace = true } -serde = { workspace = true } -cw-orch-core = { workspace = true } -cw-orch-mock = { workspace = true } -cw-orch-traits = { workspace = true } +prost = { workspace = true } +prost-types = { workspace = true } +serde = { workspace = true } [dev-dependencies] counter-contract = { path = "../../contracts-ws/contracts/counter" } -env_logger = "0.11.3" +env_logger = "0.11.3" cw-orch = { workspace = true } diff --git a/packages/cw-orch-traits/Cargo.toml b/packages/cw-orch-traits/Cargo.toml index e20549e22..043dcb9f0 100644 --- a/packages/cw-orch-traits/Cargo.toml +++ b/packages/cw-orch-traits/Cargo.toml @@ -1,16 +1,16 @@ [package] -name = "cw-orch-traits" -version = "0.25.0" -authors = { workspace = true } -edition = { workspace = true } -license = { workspace = true } -repository = { workspace = true } +authors = { workspace = true } +categories = ["development-tools"] description = "Scripting library for deploying and interacting with CosmWasm smart-contracts" -keywords = ["cosmwasm", "blockchain"] -categories = ["development-tools"] -readme = "README.md" +edition = { workspace = true } +keywords = ["cosmwasm", "blockchain"] +license = { workspace = true } +name = "cw-orch-traits" +readme = "README.md" +repository = { workspace = true } +version = "0.25.0" [dependencies] cw-orch-core = { workspace = true } -prost-types = { workspace = true } +prost-types = { workspace = true } diff --git a/packages/integrations/cw-plus/Cargo.toml b/packages/integrations/cw-plus/Cargo.toml index 940438667..10ec7687d 100644 --- a/packages/integrations/cw-plus/Cargo.toml +++ b/packages/integrations/cw-plus/Cargo.toml @@ -1,44 +1,44 @@ [package] -name = "cw-plus-orch" -version = "0.25.0" # Version of cw-orch that's used -edition = "2021" -description = "cw-orch interfaces for cw-plus base contracts" -license = "Apache-2.0" -repository = "https://github.com/AbstractSDK/cw-orchestrator" -homepage = "https://abstract.money" +description = "cw-orch interfaces for cw-plus base contracts" documentation = "https://orchestrator.abstract.money" +edition = "2021" +homepage = "https://abstract.money" +license = "Apache-2.0" +name = "cw-plus-orch" +repository = "https://github.com/AbstractSDK/cw-orchestrator" +version = "0.25.0" # Version of cw-orch that's used # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cosmwasm-std = { workspace = true } -cw-utils = { workspace = true } cosmwasm-schema = { version = "2.0.0" } +cosmwasm-std = { workspace = true } +cw-utils = { workspace = true } -cw-controllers = { version = "2.0.0" } -cw1 = { version = "2.0.0" } -cw1-subkeys = { version = "2.0.0", features = ["library"] } -cw1-whitelist = { version = "2.0.0", features = ["library"] } -cw3 = { version = "2.0.0" } +cw-controllers = { version = "2.0.0" } +cw1 = { version = "2.0.0" } +cw1-subkeys = { version = "2.0.0", features = ["library"] } +cw1-whitelist = { version = "2.0.0", features = ["library"] } +cw20 = { version = "2.0.0" } +cw20-base = { version = "2.0.0", features = ["library"] } +cw20-ics20 = { version = "2.0.0", features = ["library"] } +cw3 = { version = "2.0.0" } cw3-fixed-multisig = { version = "2.0.0", features = ["library"] } -cw3-flex-multisig = { version = "2.0.0", features = ["library"] } -cw4 = { version = "2.0.0" } -cw4-group = { version = "2.0.0", features = ["library"] } -cw4-stake = { version = "2.0.0", features = ["library"] } -cw20 = { version = "2.0.0" } -cw20-base = { version = "2.0.0", features = ["library"] } -cw20-ics20 = { version = "2.0.0", features = ["library"] } +cw3-flex-multisig = { version = "2.0.0", features = ["library"] } +cw4 = { version = "2.0.0" } +cw4-group = { version = "2.0.0", features = ["library"] } +cw4-stake = { version = "2.0.0", features = ["library"] } cw-orch-from-interface-derive = { version = "0.1.0", path = "../../macros/from-interface-derive" } cw-orch = { workspace = true } [dev-dependencies] +cw-orch = { workspace = true, features = ["daemon"] } cw-orch-interchain = { workspace = true } -cw-orch = { workspace = true, features = ["daemon"] } -dotenv = "0.15.0" -octocrab = "0.39.0" -pretty_env_logger = "0.5.0" -reqwest = "0.12.7" -tokio.workspace = true +dotenv = "0.15.0" +octocrab = "0.39.0" +pretty_env_logger = "0.5.0" +reqwest = "0.12.7" +tokio.workspace = true diff --git a/packages/interchain/interchain-core/Cargo.toml b/packages/interchain/interchain-core/Cargo.toml index 497977d79..a3284b7fd 100644 --- a/packages/interchain/interchain-core/Cargo.toml +++ b/packages/interchain/interchain-core/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "cw-orch-interchain-core" -version = "0.9.2" -authors.workspace = true -edition.workspace = true -license.workspace = true +authors.workspace = true +description = "Interchain extension for cw-orch. Creates the basic traits for working with interchain environments" +edition.workspace = true +license.workspace = true +name = "cw-orch-interchain-core" repository.workspace = true -description = "Interchain extension for cw-orch. Creates the basic traits for working with interchain environments" +version = "0.9.2" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -14,29 +14,27 @@ daemon = ["dep:cw-orch-daemon"] [dependencies] -base64 = "0.22.1" -cosmwasm-schema = "2.1.3" -cosmwasm-std = { workspace = true } -cw-orch-core = { workspace = true } -cw-orch-mock = { workspace = true } -cw-orch-daemon = { workspace = true, optional = true } -futures = "0.3.30" +base64 = "0.22.1" +cosmwasm-schema = "2.1.3" +cosmwasm-std = { workspace = true } +cw-orch-core = { workspace = true } +cw-orch-daemon = { workspace = true, optional = true } +cw-orch-mock = { workspace = true } +futures = "0.3.30" ibc-relayer-types = { workspace = true } -log = { workspace = true } +log = { workspace = true } # TODO: polytone = "2.0.0" -prost = "0.13.1" +prost = "0.13.1" +serde = { workspace = true } serde_json = { workspace = true } -serde = { workspace = true } -thiserror = { workspace = true } -tokio = "1.39.2" -tonic = { workspace = true, features = ["tls", "tls-roots"] } +thiserror = { workspace = true } +tokio = "1.39.2" +tonic = { workspace = true, features = ["tls", "tls-roots"] } [dev-dependencies] -counter-contract = { path = "../../../contracts-ws/contracts/counter" } -cw-orch-interchain = { path = "../../../cw-orch-interchain", features = [ - "daemon", -] } -cw-orch = { workspace = true } -cosmos-sdk-proto = { workspace = true } -ibc-proto = { workspace = true } -prost-types = { workspace = true } +cosmos-sdk-proto = { workspace = true } +counter-contract = { path = "../../../contracts-ws/contracts/counter" } +cw-orch = { workspace = true } +cw-orch-interchain = { path = "../../../cw-orch-interchain", features = ["daemon"] } +ibc-proto = { workspace = true } +prost-types = { workspace = true } diff --git a/packages/interchain/interchain-daemon/Cargo.toml b/packages/interchain/interchain-daemon/Cargo.toml index 627d35b0b..8c39a077a 100644 --- a/packages/interchain/interchain-daemon/Cargo.toml +++ b/packages/interchain/interchain-daemon/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "cw-orch-interchain-daemon" -version = "0.9.0" -description = "An interchain intergration crate for interacting with actual chain nodes (via gRPC)" -authors.workspace = true -edition.workspace = true -license.workspace = true +authors.workspace = true +description = "An interchain intergration crate for interacting with actual chain nodes (via gRPC)" +edition.workspace = true +license.workspace = true +name = "cw-orch-interchain-daemon" repository.workspace = true +version = "0.9.0" [lib] @@ -13,36 +13,34 @@ repository.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +cw-orch-core = { workspace = true } cw-orch-daemon = { workspace = true } -cw-orch-core = { workspace = true } tokio = { workspace = true } -async-recursion = "1.1.1" -base64 = "0.22.1" -cosmwasm-schema = "2.1.3" -futures = "0.3.30" +async-recursion = "1.1.1" +base64 = "0.22.1" +cosmrs = { workspace = true } +cosmwasm-schema = "2.1.3" +derive_builder = "0.20.0" +diff-struct = "0.5.3" +futures = "0.3.30" +futures-util = "0.3.30" ibc-relayer-types = { workspace = true } -log = "0.4.22" -log4rs = "1.3.0" -thiserror = "1.0.63" -tonic = { workspace = true } -cosmrs = { workspace = true } -futures-util = "0.3.30" -derive_builder = "0.20.0" -diff-struct = "0.5.3" -serde_json = { workspace = true } +log = "0.4.22" +log4rs = "1.3.0" +serde_json = { workspace = true } +thiserror = "1.0.63" +tonic = { workspace = true } +cosmwasm-std = { workspace = true } cw-orch-interchain-core = { workspace = true, features = ["daemon"] } -cw-orch-starship = { workspace = true } -dialoguer = "0.11.0" -cosmwasm-std = { workspace = true } +cw-orch-starship = { workspace = true } +dialoguer = "0.11.0" [dev-dependencies] -pretty_env_logger = "0.5.0" -anyhow = { workspace = true } -cw-orch = { workspace = true, features = ["daemon"] } -cw-orch-interchain = { path = "../../../cw-orch-interchain", features = [ - "daemon", -] } +anyhow = { workspace = true } +cw-orch = { workspace = true, features = ["daemon"] } +cw-orch-interchain = { path = "../../../cw-orch-interchain", features = ["daemon"] } +pretty_env_logger = "0.5.0" diff --git a/packages/interchain/interchain-daemon/src/interchain_env.rs b/packages/interchain/interchain-daemon/src/interchain_env.rs index f7ed82fc8..06a7f5b39 100644 --- a/packages/interchain/interchain-daemon/src/interchain_env.rs +++ b/packages/interchain/interchain-daemon/src/interchain_env.rs @@ -333,9 +333,9 @@ impl DaemonInterchain { Ok(ibc_trail) } - async fn find_channel_creation_tx<'a>( + async fn find_channel_creation_tx( &self, - src_chain: ChainId<'a>, + src_chain: ChainId<'_>, ibc_channel: &InterchainChannel, ) -> Result, InterchainDaemonError> { for _ in 0..5 { @@ -372,9 +372,9 @@ impl DaemonInterchain { } /// Queries the last transactions that is related to creating a channel from chain from to the counterparty chain defined in the structure - async fn get_last_channel_creation<'a>( + async fn get_last_channel_creation( &self, - src_chain: ChainId<'a>, + src_chain: ChainId<'_>, ibc_channel: &InterchainChannel, ) -> Result>, InterchainDaemonError> { let (channel_init, channel_try, channel_ack, channel_confirm) = try_join4( @@ -393,10 +393,10 @@ impl DaemonInterchain { )) } - async fn get_channel_creation_init<'a>( + async fn get_channel_creation_init( &self, - from: ChainId<'a>, - ibc_channel: &'a InterchainChannel, + from: ChainId<'_>, + ibc_channel: &InterchainChannel, ) -> Result, InterchainDaemonError> { let (src_port, dst_port) = ibc_channel.get_ordered_ports_from(from)?; @@ -412,10 +412,10 @@ impl DaemonInterchain { Ok(find_one_tx_by_events(src_port, channel_creation_events_init_events).await?) } - async fn get_channel_creation_try<'a>( + async fn get_channel_creation_try( &self, - from: ChainId<'a>, - ibc_channel: &'a InterchainChannel, + from: ChainId<'_>, + ibc_channel: &InterchainChannel, ) -> Result, InterchainDaemonError> { let (src_port, dst_port) = ibc_channel.get_ordered_ports_from(from)?; @@ -437,10 +437,10 @@ impl DaemonInterchain { Ok(find_one_tx_by_events(dst_port, channel_creation_try_events).await?) } - async fn get_channel_creation_ack<'a>( + async fn get_channel_creation_ack( &self, - from: ChainId<'a>, - ibc_channel: &'a InterchainChannel, + from: ChainId<'_>, + ibc_channel: &InterchainChannel, ) -> Result, InterchainDaemonError> { let (src_port, dst_port) = ibc_channel.get_ordered_ports_from(from)?; @@ -456,10 +456,10 @@ impl DaemonInterchain { Ok(find_one_tx_by_events(src_port, channel_creation_ack_events).await?) } - async fn get_channel_creation_confirm<'a>( + async fn get_channel_creation_confirm( &self, - from: ChainId<'a>, - ibc_channel: &'a InterchainChannel, + from: ChainId<'_>, + ibc_channel: &InterchainChannel, ) -> Result, InterchainDaemonError> { let (src_port, dst_port) = ibc_channel.get_ordered_ports_from(from)?; diff --git a/packages/interchain/interchain-daemon/src/packet_inspector.rs b/packages/interchain/interchain-daemon/src/packet_inspector.rs index c72d4f039..0e6cb5a67 100644 --- a/packages/interchain/interchain-daemon/src/packet_inspector.rs +++ b/packages/interchain/interchain-daemon/src/packet_inspector.rs @@ -168,7 +168,7 @@ impl PacketInspector { /// Gets the grpc channel associed with a specific `chain_id` /// If it's not registered in this struct (using the `add_custom_chain` member), it will query the grpc from the chain regisry (`networks::parse_network` function) - async fn get_grpc_channel<'a>(&self, chain_id: ChainId<'a>) -> IcDaemonResult { + async fn get_grpc_channel(&self, chain_id: ChainId<'_>) -> IcDaemonResult { let grpc_channel = self.registered_chains.get(chain_id); if let Some(dst_grpc_channel) = grpc_channel { @@ -182,12 +182,12 @@ impl PacketInspector { /// This is a wrapper to follow a packet directly in a single future /// Prefer the use of `await_ibc_execution` for following IBC packets related to a transaction - pub async fn follow_packet<'a>( + pub async fn follow_packet( self, - src_chain: ChainId<'a>, + src_chain: ChainId<'_>, src_port: PortId, src_channel: ChannelId, - dst_chain: ChainId<'a>, + dst_chain: ChainId<'_>, sequence: Sequence, ) -> IcDaemonResult> { let src_grpc_channel = self.get_grpc_channel(src_chain).await?; @@ -255,10 +255,10 @@ impl PacketInspector { /// This is also logged for debugging purposes /// /// We return the tx hash of the received packet on the remote chain as well as the ack packet transaction on the origin chain - pub async fn follow_packet_cycle<'a>( + pub async fn follow_packet_cycle( &self, - from: ChainId<'a>, - ibc_channel: &'a InterchainChannel, + from: ChainId<'_>, + ibc_channel: &InterchainChannel, sequence: Sequence, ) -> Result, InterchainDaemonError> { let (src_port, dst_port) = ibc_channel.get_ordered_ports_from(from)?; @@ -348,10 +348,10 @@ impl PacketInspector { } /// This functions looks for timeouts of an IBC packet on its origin chain. It returns the tx hash of the timeout tx. - pub async fn follow_packet_timeout<'a>( + pub async fn follow_packet_timeout( &self, - from: ChainId<'a>, - ibc_channel: &'a InterchainChannel, + from: ChainId<'_>, + ibc_channel: &InterchainChannel, sequence: Sequence, ) -> Result, InterchainDaemonError> { // 0. Query the send tx hash for analysis @@ -410,10 +410,10 @@ impl PacketInspector { } // From is the channel from which the send packet has been sent - pub async fn get_packet_send_tx<'a>( + pub async fn get_packet_send_tx( &self, - from: ChainId<'a>, - ibc_channel: &'a InterchainChannel, + from: ChainId<'_>, + ibc_channel: &InterchainChannel, packet_sequence: Sequence, ) -> Result { let (src_port, dst_port) = ibc_channel.get_ordered_ports_from(from)?; @@ -437,10 +437,10 @@ impl PacketInspector { } // on is the chain on which the packet will be received - pub async fn get_packet_receive_tx<'a>( + pub async fn get_packet_receive_tx( &self, - from: ChainId<'a>, - ibc_channel: &'a InterchainChannel, + from: ChainId<'_>, + ibc_channel: &InterchainChannel, packet_sequence: Sequence, ) -> Result { let (src_port, dst_port) = ibc_channel.get_ordered_ports_from(from)?; @@ -464,10 +464,10 @@ impl PacketInspector { } // on is the chain on which the packet will be received - pub async fn get_packet_timeout_tx<'a>( + pub async fn get_packet_timeout_tx( &self, - from: ChainId<'a>, - ibc_channel: &'a InterchainChannel, + from: ChainId<'_>, + ibc_channel: &InterchainChannel, packet_sequence: Sequence, ) -> Result { let (src_port, dst_port) = ibc_channel.get_ordered_ports_from(from)?; @@ -491,10 +491,10 @@ impl PacketInspector { } // From is the channel from which the original send packet has been sent - pub async fn get_packet_ack_receive_tx<'a>( + pub async fn get_packet_ack_receive_tx( &self, - from: ChainId<'a>, - ibc_channel: &'a InterchainChannel, + from: ChainId<'_>, + ibc_channel: &InterchainChannel, packet_sequence: Sequence, ) -> Result { let (src_port, dst_port) = ibc_channel.get_ordered_ports_from(from)?; diff --git a/packages/interchain/interchain-mock/Cargo.toml b/packages/interchain/interchain-mock/Cargo.toml index 19c5f3e98..7cab3b968 100644 --- a/packages/interchain/interchain-mock/Cargo.toml +++ b/packages/interchain/interchain-mock/Cargo.toml @@ -1,28 +1,28 @@ [package] -name = "cw-orch-interchain-mock" -version = "0.9.0" -authors.workspace = true -edition.workspace = true -license.workspace = true +authors.workspace = true +description = "Adapter for interacting with ibc on cw-multi-test via cw-orch" +edition.workspace = true +license.workspace = true +name = "cw-orch-interchain-mock" repository.workspace = true -description = "Adapter for interacting with ibc on cw-multi-test via cw-orch" +version = "0.9.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cw-orch-mock = { workspace = true } cw-orch-core = { workspace = true } +cw-orch-mock = { workspace = true } -anyhow = { workspace = true } -cosmwasm-std = { workspace = true } -cw-utils = { workspace = true } -serde = { workspace = true } -cosmrs = { workspace = true } +anyhow = { workspace = true } +cosmrs = { workspace = true } +cosmwasm-std = { workspace = true } cw-orch-interchain-core = { workspace = true } -thiserror = { workspace = true } -ibc-relayer-types = { workspace = true } -log = { workspace = true } -serde_json = { workspace = true } +cw-utils = { workspace = true } +ibc-relayer-types = { workspace = true } +log = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +thiserror = { workspace = true } [dev-dependencies] cw20 = { workspace = true } diff --git a/packages/interchain/proto/Cargo.toml b/packages/interchain/proto/Cargo.toml index 28324984c..bc4d90c58 100644 --- a/packages/interchain/proto/Cargo.toml +++ b/packages/interchain/proto/Cargo.toml @@ -1,33 +1,33 @@ [package] -name = "cw-orch-proto" -description = "A helper crate for interaction with protos from different chains. Mostly used for handling cw20 coins and ibc transfers" -version = "0.9.0" -authors.workspace = true -edition.workspace = true -license.workspace = true +authors.workspace = true +description = "A helper crate for interaction with protos from different chains. Mostly used for handling cw20 coins and ibc transfers" +edition.workspace = true +license.workspace = true +name = "cw-orch-proto" repository.workspace = true +version = "0.9.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +cw-orch-core = { workspace = true } cw-orch-interchain-core = { workspace = true } -cw-orch-traits = { workspace = true } -cw-orch-core = { workspace = true } +cw-orch-traits = { workspace = true } anyhow = { workspace = true } -ibc-proto = { workspace = true } -prost-types = { workspace = true } -prost = { workspace = true } -cosmwasm-std = { workspace = true } +cosmwasm-std = { workspace = true } +ibc-proto = { workspace = true } ibc-relayer-types = { workspace = true } -log = { workspace = true } -tokio = { workspace = true } -tonic = { workspace = true } -osmosis-std = { version = "0.26.0" } +log = { workspace = true } +osmosis-std = { version = "0.26.0" } +prost = { workspace = true } +prost-types = { workspace = true } +tokio = { workspace = true } +tonic = { workspace = true } [dev-dependencies] -cw-orch-starship = { workspace = true } cw-orch-interchain-daemon = { workspace = true } -env_logger = "0.11.5" -speculoos = { workspace = true } +cw-orch-starship = { workspace = true } +env_logger = "0.11.5" +speculoos = { workspace = true } diff --git a/packages/interchain/starship/Cargo.toml b/packages/interchain/starship/Cargo.toml index b85c6ab98..b7f189b03 100644 --- a/packages/interchain/starship/Cargo.toml +++ b/packages/interchain/starship/Cargo.toml @@ -1,32 +1,32 @@ [package] -name = "cw-orch-starship" -version = "0.7.0" -authors.workspace = true -edition.workspace = true -license.workspace = true +authors.workspace = true +description = "Adapter for interacting with cosmoslogy:starship via cw-orch" +edition.workspace = true +license.workspace = true +name = "cw-orch-starship" repository.workspace = true -description = "Adapter for interacting with cosmoslogy:starship via cw-orch" +version = "0.7.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -reqwest = { version = "0.12.5", features = ["json"] } -serde = { version = "1.0", features = ["derive"] } +reqwest = { version = "0.12.5", features = ["json"] } +serde = { version = "1.0", features = ["derive"] } serde_json = "1.0.125" # Serde yaml deprecated -yaml-rust2 = "0.8" +cosmwasm-std = { workspace = true } ibc-chain-registry = { workspace = true } -ibc-relayer-types = { workspace = true } -thiserror = "1.0.63" -cosmwasm-std = { workspace = true } +ibc-relayer-types = { workspace = true } +thiserror = "1.0.63" +yaml-rust2 = "0.8" +cw-orch-core = { workspace = true } cw-orch-daemon = { workspace = true } -cw-orch-core = { workspace = true } -tokio = { workspace = true } +tokio = { workspace = true } -url = "2.5.2" +env_logger = "0.11" log.workspace = true -env_logger = "0.11" +url = "2.5.2" -kube = { version = "0.93.1", features = ["runtime", "derive", "ws"] } k8s-openapi = { version = "0.22.0", features = ["latest"] } +kube = { version = "0.93.1", features = ["runtime", "derive", "ws"] } diff --git a/packages/macros/cw-orch-contract-derive/Cargo.toml b/packages/macros/cw-orch-contract-derive/Cargo.toml index 1a6fbcd28..069a563f4 100644 --- a/packages/macros/cw-orch-contract-derive/Cargo.toml +++ b/packages/macros/cw-orch-contract-derive/Cargo.toml @@ -1,16 +1,16 @@ [package] -name = "cw-orch-contract-derive" -version = "0.21.1" -authors = { workspace = true } -edition = { workspace = true } -license = { workspace = true } -repository = { workspace = true } +authors = { workspace = true } description = "Attribute macro for creating a contract interface." +edition = { workspace = true } +license = { workspace = true } +name = "cw-orch-contract-derive" +repository = { workspace = true } +version = "0.21.1" [lib] proc-macro = true [dependencies] convert_case = "0.6.0" -quote = "1" -syn = { version = "2", features = ["full", "extra-traits"] } +quote = "1" +syn = { version = "2", features = ["full", "extra-traits"] } diff --git a/packages/macros/cw-orch-fns-derive/Cargo.toml b/packages/macros/cw-orch-fns-derive/Cargo.toml index 116660edb..9684b8574 100644 --- a/packages/macros/cw-orch-fns-derive/Cargo.toml +++ b/packages/macros/cw-orch-fns-derive/Cargo.toml @@ -1,17 +1,17 @@ [package] -name = "cw-orch-fns-derive" -version = "0.23.1" -authors = { workspace = true } -edition = { workspace = true } -license = { workspace = true } -repository = { workspace = true } +authors = { workspace = true } description = "Derive macro for generating contract interfaces." +edition = { workspace = true } +license = { workspace = true } +name = "cw-orch-fns-derive" +repository = { workspace = true } +version = "0.23.1" [lib] proc-macro = true [dependencies] -quote = "1" -proc-macro2 = "1" -syn = { version = "2", features = ["full", "extra-traits", "visit-mut"] } convert_case = "0.6.0" +proc-macro2 = "1" +quote = "1" +syn = { version = "2", features = ["full", "extra-traits", "visit-mut"] } diff --git a/packages/macros/from-interface-derive/Cargo.toml b/packages/macros/from-interface-derive/Cargo.toml index aa39dca66..a17c8e785 100644 --- a/packages/macros/from-interface-derive/Cargo.toml +++ b/packages/macros/from-interface-derive/Cargo.toml @@ -1,9 +1,9 @@ [package] -name = "cw-orch-from-interface-derive" -version = "0.1.0" -edition = "2021" -license = "Apache-2.0" description = "Macro for generating From implementation for cw-orch interfaces of copied types" +edition = "2021" +license = "Apache-2.0" +name = "cw-orch-from-interface-derive" +version = "0.1.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -11,6 +11,6 @@ description = "Macro for generating From implementation for cw-orch interfaces o proc-macro = true [dependencies] -quote = "1" proc-macro2 = "1" -syn = { version = "2", features = ["full", "extra-traits", "visit-mut"] } +quote = "1" +syn = { version = "2", features = ["full", "extra-traits", "visit-mut"] } diff --git a/rustfmt.toml b/rustfmt.toml index c1bf54ee3..b39fcaab0 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,7 +1,7 @@ # stable +hard_tabs = false newline_style = "unix" -hard_tabs = false -tab_spaces = 4 +tab_spaces = 4 # unstable_features = true # imports_granularity = "Crate" diff --git a/taplo.toml b/taplo.toml new file mode 100644 index 000000000..85e56f12e --- /dev/null +++ b/taplo.toml @@ -0,0 +1,5 @@ +[formatting] +align_entries = true +column_width = 100 +inline_table_expand = false +reorder_keys = true diff --git a/test_contracts/compatibility-test/Cargo.toml b/test_contracts/compatibility-test/Cargo.toml index f86ce16bf..b11272004 100644 --- a/test_contracts/compatibility-test/Cargo.toml +++ b/test_contracts/compatibility-test/Cargo.toml @@ -1,9 +1,9 @@ [package] -name = "cw-orch-compatibility-test" -version = "0.1.0" description = "Mock constract for cw-orch macro testing" -keywords = ["cosmwasm", "blockchain"] -edition = { workspace = true } +edition = { workspace = true } +keywords = ["cosmwasm", "blockchain"] +name = "cw-orch-compatibility-test" +version = "0.1.0" exclude = [".env"] @@ -11,17 +11,17 @@ exclude = [".env"] crate-type = ["cdylib", "rlib"] [features] -default = ["export"] -export = [] +default = ["export"] +export = [] interface = [] [dependencies] -cosmwasm-std = { workspace = true } -serde = { workspace = true } -schemars = "0.8.10" -serde_json = "1.0.79" -thiserror = { version = "1.0.21" } cosmwasm-schema = "2.0" +cosmwasm-std = { workspace = true } +schemars = "0.8.10" +serde = { workspace = true } +serde_json = "1.0.79" +thiserror = { version = "1.0.21" } # This version should not be a path dependency and be kept to the last cw-orch version (beyond v0.23) # Keeping a different package until v0.23 to avoid package conflicts cw-orch = { package = "aaa-test-cw-orch", version = "0.25" } From 58cc1951ff0dfe9c22d8f70998c5d9f8d1372baf Mon Sep 17 00:00:00 2001 From: Kayanski <44806566+Kayanski@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:33:47 +0100 Subject: [PATCH 4/6] Added bank send function (#526) * Added bank send function * formatting * Update packages/cw-orch-core/src/environment/tx_handler.rs Co-authored-by: Mykhailo Donchenko <91957742+Buckram123@users.noreply.github.com> * Changelog * Insta * Updated versions and published * Changelog --------- Co-authored-by: Mykhailo Donchenko <91957742+Buckram123@users.noreply.github.com> --- CHANGELOG.md | 7 +++- Cargo.toml | 4 +- cw-orch-daemon/Cargo.toml | 2 +- .../examples/daemon-capabilities.rs | 28 +++++++------ cw-orch-daemon/examples/hd_index.rs | 6 +-- cw-orch-daemon/examples/manual_sender.rs | 20 ++++++++- cw-orch-daemon/src/core.rs | 4 +- cw-orch-daemon/src/senders/cosmos.rs | 20 +-------- cw-orch-daemon/src/senders/cosmos_batch.rs | 33 +++++++++++---- cw-orch-daemon/src/senders/sign.rs | 20 +++++++++ cw-orch-daemon/src/senders/tx.rs | 9 ++++ cw-orch-daemon/src/sync/core.rs | 11 +++++ cw-orch-daemon/tests/authz.rs | 12 +----- cw-orch-daemon/tests/querier.rs | 18 ++------ cw-orch-interchain/tests/common/bank.rs | 42 ------------------- cw-orch-interchain/tests/common/ica_demo.rs | 10 ++--- cw-orch-interchain/tests/common/mod.rs | 1 - cw-orch/examples/complex_testnet_daemon.rs | 9 ++-- packages/clone-testing/Cargo.toml | 2 +- packages/clone-testing/src/core.rs | 23 +++++++++- packages/cw-orch-core/Cargo.toml | 2 +- .../src/environment/tx_handler.rs | 8 ++++ packages/cw-orch-mock/Cargo.toml | 2 +- packages/cw-orch-mock/src/core.rs | 20 ++++++++- packages/cw-orch-neutron-test-tube/Cargo.toml | 2 +- .../cw-orch-neutron-test-tube/src/core.rs | 25 ++++++++++- packages/cw-orch-osmosis-test-tube/Cargo.toml | 2 +- .../cw-orch-osmosis-test-tube/src/core.rs | 25 ++++++++++- 28 files changed, 224 insertions(+), 143 deletions(-) delete mode 100644 cw-orch-interchain/tests/common/bank.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index 479d2ce21..e37f56d3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # cw-orchestrator Changelog -## Unpublished +## Cw-orch-daemon 0.29.0 - cw-orch-core 2.1.4 [16. December 2024] - [networks] Replaced union testnet-8 by union-testnet-9 @@ -8,6 +8,11 @@ - [interchain-core] Modify the structure and the names of the IBC analysis and following structure. - [osmosis-test-tube] Update `osmosis-test-tube` to "v27.0.0" +- [daemon]: Move the bank_send method from the Wallet to the TxSender trait. + +### Added + +- [core] bank_send method on TxHandler to facilitate sending funds in script ## 0.26.0 [8. October 2024] diff --git a/Cargo.toml b/Cargo.toml index 8e5b25407..20d608dd7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,8 +44,8 @@ serde = { version = "1.0.208", default-features = false, features = ["derive"] tokio = { version = "1.39", features = ["full"] } cw-orch = { path = "./cw-orch", version = "0.27.0" } -cw-orch-core = { path = "packages/cw-orch-core", version = "2.1.3" } -cw-orch-daemon = { path = "./cw-orch-daemon", version = "0.28.0" } +cw-orch-core = { path = "packages/cw-orch-core", version = "2.1.4" } +cw-orch-daemon = { path = "./cw-orch-daemon", version = "0.29.0" } cw-orch-mock = { path = "packages/cw-orch-mock", version = "0.24.2" } cw-orch-networks = { path = "packages/cw-orch-networks", version = "0.24.3" } cw-orch-traits = { path = "packages/cw-orch-traits", version = "0.25.0" } diff --git a/cw-orch-daemon/Cargo.toml b/cw-orch-daemon/Cargo.toml index cf674a25c..252b6961e 100644 --- a/cw-orch-daemon/Cargo.toml +++ b/cw-orch-daemon/Cargo.toml @@ -8,7 +8,7 @@ license = { workspace = true } name = "cw-orch-daemon" readme = "../README.md" repository = { workspace = true } -version = "0.28.1" +version = "0.29.0" exclude = [".env"] diff --git a/cw-orch-daemon/examples/daemon-capabilities.rs b/cw-orch-daemon/examples/daemon-capabilities.rs index 25b7cf49b..297258474 100644 --- a/cw-orch-daemon/examples/daemon-capabilities.rs +++ b/cw-orch-daemon/examples/daemon-capabilities.rs @@ -3,7 +3,8 @@ use std::str::FromStr; use cosmrs::{tx::Msg, AccountId, Coin, Denom}; use cosmwasm_std::{coins, Addr}; // ANCHOR: full_counter_example -use cw_orch_daemon::senders::tx::TxSender; +use cw_orch::prelude::Stargate; +use cw_orch::prelude::TxHandler; use cw_orch_daemon::DaemonBuilder; use cw_orch_networks::networks; @@ -19,13 +20,11 @@ pub fn main() -> anyhow::Result<()> { // We commit the tx (also resimulates the tx) // ANCHOR: send_tx - let wallet = daemon.sender(); - let rt = daemon.rt_handle.clone(); - rt.block_on(wallet.bank_send( + daemon.bank_send( &Addr::unchecked(""), - coins(345, "ujunox"), - ))?; + &coins(345, "ujunox"), + )?; // ANCHOR_END: send_tx // ANCHOR: cosmrs_tx @@ -45,22 +44,27 @@ pub fn main() -> anyhow::Result<()> { denom: Denom::from_str("ujuno").unwrap(), }, }; - rt.block_on(wallet.commit_tx(vec![tx_msg.clone()], None))?; + daemon + .rt_handle + .block_on(daemon.sender().commit_tx(vec![tx_msg.clone()], None))?; // ANCHOR_END: cosmrs_tx // ANCHOR: any_tx - rt.block_on(wallet.commit_tx_any( - vec![cosmrs::Any { + daemon.commit_any( + vec![prost_types::Any { type_url: "/cosmos.staking.v1beta1.MsgBeginRedelegate".to_string(), value: tx_msg.to_any().unwrap().value, }], None, - ))?; + )?; // ANCHOR_END: any_tx // ANCHOR: simulate_tx - let (gas_needed, fee_needed) = - rt.block_on(wallet.simulate(vec![tx_msg.to_any().unwrap()], None))?; + let (gas_needed, fee_needed) = daemon.rt_handle.block_on( + daemon + .sender() + .simulate(vec![tx_msg.to_any().unwrap()], None), + )?; log::info!( "Submitting this transaction will necessitate: diff --git a/cw-orch-daemon/examples/hd_index.rs b/cw-orch-daemon/examples/hd_index.rs index c407e3496..781e67a20 100644 --- a/cw-orch-daemon/examples/hd_index.rs +++ b/cw-orch-daemon/examples/hd_index.rs @@ -16,11 +16,7 @@ pub fn main() -> anyhow::Result<()> { .authz_granter(&Addr::unchecked(LOCAL_JUNO_GRANTER)); let chain = Daemon::builder(network).build_sender(sender)?; - chain.rt_handle.block_on( - chain - .sender() - .bank_send(&Addr::unchecked(LOCAL_JUNO_GRANTER), coins(10000, "ujuno")), - )?; + chain.bank_send(&Addr::unchecked(LOCAL_JUNO_GRANTER), &coins(10000, "ujuno"))?; Ok(()) } diff --git a/cw-orch-daemon/examples/manual_sender.rs b/cw-orch-daemon/examples/manual_sender.rs index 9c9b4fdc4..14a73696a 100644 --- a/cw-orch-daemon/examples/manual_sender.rs +++ b/cw-orch-daemon/examples/manual_sender.rs @@ -5,10 +5,11 @@ use cw_orch_daemon::queriers::Node; use cw_orch_daemon::senders::builder::SenderBuilder; use cw_orch_daemon::senders::query::QuerySender; use cw_orch_daemon::tx_broadcaster::assert_broadcast_code_cosm_response; -use cw_orch_daemon::{DaemonBase, GrpcChannel, TxBuilder}; +use cw_orch_daemon::{parse_cw_coins, DaemonBase, GrpcChannel, TxBuilder}; use cw_orch_daemon::{CosmTxResponse, DaemonError}; +use cosmrs::bank::MsgSend; use cosmrs::proto::cosmos; use cosmrs::proto::cosmos::auth::v1beta1::BaseAccount; use cosmrs::proto::cosmos::vesting::v1beta1::PeriodicVestingAccount; @@ -20,6 +21,7 @@ use cw_orch::prelude::*; use cw_orch_core::environment::ChainInfoOwned; use prost::Message; use std::io::{self, Write}; +use std::str::FromStr; use std::sync::Arc; use tonic::transport::Channel; @@ -122,6 +124,22 @@ impl TxSender for ManualSender { fn account_id(&self) -> AccountId { self.sender.clone().to_string().parse().unwrap() } + + async fn bank_send( + &self, + recipient: &Addr, + coins: &[cosmwasm_std::Coin], + ) -> Result { + let acc_id = self.msg_sender()?; + + let msg_send = MsgSend { + from_address: acc_id, + to_address: AccountId::from_str(recipient.as_str())?, + amount: parse_cw_coins(coins)?, + }; + + self.commit_tx(vec![msg_send], Some("sending tokens")).await + } } impl ManualSender { diff --git a/cw-orch-daemon/src/core.rs b/cw-orch-daemon/src/core.rs index f3b7f5fd9..4104a4fb2 100644 --- a/cw-orch-daemon/src/core.rs +++ b/cw-orch-daemon/src/core.rs @@ -444,9 +444,7 @@ impl AsyncWasmQuerier for DaemonAsync { } } -pub(crate) fn parse_cw_coins( - coins: &[cosmwasm_std::Coin], -) -> Result, DaemonError> { +pub fn parse_cw_coins(coins: &[cosmwasm_std::Coin]) -> Result, DaemonError> { coins .iter() .map(|cosmwasm_std::Coin { amount, denom }| { diff --git a/cw-orch-daemon/src/senders/cosmos.rs b/cw-orch-daemon/src/senders/cosmos.rs index 1fba13405..5ac4cf492 100644 --- a/cw-orch-daemon/src/senders/cosmos.rs +++ b/cw-orch-daemon/src/senders/cosmos.rs @@ -5,7 +5,6 @@ use super::{ tx::TxSender, }; use crate::{ - core::parse_cw_coins, cosmos_modules::{self, auth::BaseAccount}, env::{DaemonEnvVars, LOCAL_MNEMONIC_ENV_NAME, MAIN_MNEMONIC_ENV_NAME, TEST_MNEMONIC_ENV_NAME}, error::DaemonError, @@ -19,7 +18,6 @@ use crate::{ use bitcoin::secp256k1::{All, Secp256k1, Signing}; use cosmos_modules::vesting::PeriodicVestingAccount; use cosmrs::{ - bank::MsgSend, crypto::secp256k1::SigningKey, proto::traits::Message, tendermint::chain::Id, @@ -32,7 +30,7 @@ use cw_orch_core::{ environment::{AccessConfig, ChainInfoOwned, ChainKind}, CoreEnvVars, CwEnvError, }; -use std::{str::FromStr, sync::Arc}; +use std::sync::Arc; use tonic::transport::Channel; #[cfg(feature = "eth")] @@ -163,22 +161,6 @@ impl Wallet { Signer::account_id(self).to_string() } - pub async fn bank_send( - &self, - recipient: &Addr, - coins: Vec, - ) -> Result { - let acc_id = self.msg_sender()?; - - let msg_send = MsgSend { - from_address: acc_id, - to_address: AccountId::from_str(recipient.as_str())?, - amount: parse_cw_coins(&coins)?, - }; - - self.commit_tx(vec![msg_send], Some("sending tokens")).await - } - /// Computes the gas needed for submitting a transaction pub async fn calculate_gas( &self, diff --git a/cw-orch-daemon/src/senders/cosmos_batch.rs b/cw-orch-daemon/src/senders/cosmos_batch.rs index d939ff20c..11a65a754 100644 --- a/cw-orch-daemon/src/senders/cosmos_batch.rs +++ b/cw-orch-daemon/src/senders/cosmos_batch.rs @@ -1,7 +1,11 @@ -use crate::{DaemonBase, INSTANTIATE_2_TYPE_URL}; - +use super::builder::SenderBuilder; +use super::cosmos::Wallet; +use super::query::QuerySender; +use super::tx::TxSender; +use crate::parse_cw_coins; use crate::{error::DaemonError, tx_resp::CosmTxResponse}; - +use crate::{DaemonBase, INSTANTIATE_2_TYPE_URL}; +use cosmrs::bank::MsgSend; use cosmrs::proto::cosmwasm::wasm::v1::{MsgInstantiateContract, MsgStoreCode}; use cosmrs::{AccountId, Any}; use cosmwasm_std::Addr; @@ -9,14 +13,9 @@ use cw_orch_core::environment::ChainInfoOwned; use cw_orch_core::log::transaction_target; use options::CosmosBatchOptions; use prost::Name; - +use std::str::FromStr; use std::sync::{Arc, Mutex}; -use super::builder::SenderBuilder; -use super::cosmos::Wallet; -use super::query::QuerySender; -use super::tx::TxSender; - pub type BatchDaemon = DaemonBase; pub mod options { @@ -132,4 +131,20 @@ impl TxSender for CosmosBatchSender { fn account_id(&self) -> AccountId { self.sender.account_id() } + + async fn bank_send( + &self, + recipient: &Addr, + coins: &[cosmwasm_std::Coin], + ) -> Result { + let acc_id = self.msg_sender()?; + + let msg_send = MsgSend { + from_address: acc_id, + to_address: AccountId::from_str(recipient.as_str())?, + amount: parse_cw_coins(coins)?, + }; + + self.commit_tx(vec![msg_send], Some("sending tokens")).await + } } diff --git a/cw-orch-daemon/src/senders/sign.rs b/cw-orch-daemon/src/senders/sign.rs index 2662e7f91..0d20b3127 100644 --- a/cw-orch-daemon/src/senders/sign.rs +++ b/cw-orch-daemon/src/senders/sign.rs @@ -1,4 +1,7 @@ +use std::str::FromStr; + use crate::{ + parse_cw_coins, queriers::Node, tx_broadcaster::{ account_sequence_strategy, assert_broadcast_code_cosm_response, insufficient_fee_strategy, @@ -7,6 +10,7 @@ use crate::{ CosmTxResponse, DaemonError, QuerySender, TxBuilder, TxSender, }; use cosmrs::{ + bank::MsgSend, proto::cosmos::authz::v1beta1::MsgExec, tendermint::chain::Id, tx::{Body, Fee, Raw, SignDoc, SignerInfo}, @@ -132,4 +136,20 @@ impl TxSender for T { Ok(self.account_id()) } } + + async fn bank_send( + &self, + recipient: &Addr, + coins: &[cosmwasm_std::Coin], + ) -> Result { + let acc_id = self.msg_sender()?; + + let msg_send = MsgSend { + from_address: acc_id, + to_address: AccountId::from_str(recipient.as_str())?, + amount: parse_cw_coins(coins)?, + }; + + self.commit_tx(vec![msg_send], Some("sending tokens")).await + } } diff --git a/cw-orch-daemon/src/senders/tx.rs b/cw-orch-daemon/src/senders/tx.rs index 0426f22e4..cccc4c2f2 100644 --- a/cw-orch-daemon/src/senders/tx.rs +++ b/cw-orch-daemon/src/senders/tx.rs @@ -66,4 +66,13 @@ pub trait TxSender: QuerySender + Sync { Ok(commit) } } + + // Send funds using the bank module + fn bank_send( + &self, + _receiver: &Addr, + _amount: &[cosmwasm_std::Coin], + ) -> impl std::future::Future> + Send { + async { unimplemented!() } + } } diff --git a/cw-orch-daemon/src/sync/core.rs b/cw-orch-daemon/src/sync/core.rs index 7320cc17b..84289b075 100644 --- a/cw-orch-daemon/src/sync/core.rs +++ b/cw-orch-daemon/src/sync/core.rs @@ -236,6 +236,17 @@ impl TxHandler for DaemonBase { .upload_with_access_config(contract_source, access_config), ) } + + fn bank_send( + &self, + receiver: &Addr, + amount: &[cosmwasm_std::Coin], + ) -> Result { + self.rt_handle + .block_on(self.sender().bank_send(receiver, amount)) + .map_err(Into::into) + .map(Into::into) + } } impl Stargate for DaemonBase { diff --git a/cw-orch-daemon/tests/authz.rs b/cw-orch-daemon/tests/authz.rs index a90e18008..da7baf516 100644 --- a/cw-orch-daemon/tests/authz.rs +++ b/cw-orch-daemon/tests/authz.rs @@ -120,18 +120,10 @@ mod tests { // Check use of grants // The we send some funds to the account - runtime.block_on( - daemon - .sender() - .bank_send(&grantee, coins(100_000, LOCAL_JUNO.gas_denom)), - )?; + daemon.bank_send(&grantee, &coins(100_000, LOCAL_JUNO.gas_denom))?; // And send a large amount of tokens on their behalf - runtime.block_on( - second_daemon - .sender() - .bank_send(&grantee, coins(500_000, LOCAL_JUNO.gas_denom)), - )?; + second_daemon.bank_send(&grantee, &coins(500_000, LOCAL_JUNO.gas_denom))?; // the balance of the grantee whould be 600_000 or close diff --git a/cw-orch-daemon/tests/querier.rs b/cw-orch-daemon/tests/querier.rs index 9bc334d1d..621887647 100644 --- a/cw-orch-daemon/tests/querier.rs +++ b/cw-orch-daemon/tests/querier.rs @@ -5,7 +5,7 @@ mod queriers { use cosmwasm_std::Addr; use cw_orch_core::contract::interface_traits::*; - use cw_orch_daemon::{queriers::Bank, GrpcChannel}; + use cw_orch_daemon::{parse_cw_coins, queriers::Bank, GrpcChannel}; use cw_orch_networks::networks; use mock_contract::InstantiateMsg; use speculoos::{asserting, result::ResultAssertions}; @@ -14,14 +14,14 @@ mod queriers { use cw_orch_daemon::{ queriers::StakingBondStatus, queriers::{CosmWasm, Gov, Ibc, Node, Staking}, - Daemon, DaemonError, + Daemon, }; use tokio::runtime::Runtime; use cosmrs::{ cosmwasm::MsgExecuteContract, tx::{self, Msg}, - AccountId, Denom, + AccountId, }; pub async fn build_channel() -> tonic::transport::Channel { @@ -239,16 +239,4 @@ mod queriers { .that(&contract_info) .is_ok(); } - - fn parse_cw_coins(coins: &[cosmwasm_std::Coin]) -> Result, DaemonError> { - coins - .iter() - .map(|cosmwasm_std::Coin { amount, denom }| { - Ok(cosmrs::Coin { - amount: amount.u128(), - denom: Denom::from_str(denom)?, - }) - }) - .collect::, DaemonError>>() - } } diff --git a/cw-orch-interchain/tests/common/bank.rs b/cw-orch-interchain/tests/common/bank.rs deleted file mode 100644 index eb66b6147..000000000 --- a/cw-orch-interchain/tests/common/bank.rs +++ /dev/null @@ -1,42 +0,0 @@ -use cosmwasm_std::{BankMsg, Coin, CosmosMsg}; -use cw_orch::prelude::*; - -pub trait BankModule: TxHandler { - fn send( - &self, - receiver: &Addr, - funds: Vec, - ) -> Result<::Response, ::Error>; -} - -impl BankModule for Mock { - fn send( - &self, - receiver: &Addr, - funds: Vec, - ) -> Result<::Response, ::Error> { - let app_responses = self - .app - .borrow_mut() - .execute_multi( - self.sender.clone(), - vec![CosmosMsg::Bank(BankMsg::Send { - to_address: receiver.to_string(), - amount: funds, - })], - ) - .unwrap(); - Ok(app_responses[0].clone()) - } -} - -impl BankModule for Daemon { - fn send( - &self, - recipient: &Addr, - funds: Vec, - ) -> Result<::Response, ::Error> { - self.rt_handle - .block_on(self.sender().bank_send(recipient, funds)) - } -} diff --git a/cw-orch-interchain/tests/common/ica_demo.rs b/cw-orch-interchain/tests/common/ica_demo.rs index 9d0cc7aac..10ea6bc2d 100644 --- a/cw-orch-interchain/tests/common/ica_demo.rs +++ b/cw-orch-interchain/tests/common/ica_demo.rs @@ -48,11 +48,9 @@ use simple_ica_host::msg::{self as host_msgs}; use speculoos::assert_that; -use super::bank::BankModule; - const CRATE_PATH: &str = env!("CARGO_MANIFEST_DIR"); -pub fn full_ica_test>( +pub fn full_ica_test>( interchain: &IBC, host_chain_id: &str, controller_chain_id: &str, @@ -101,7 +99,7 @@ fn deploy_contracts( } /// Test the cw-ica contract -fn test_ica>( +fn test_ica>( interchain: &IBC, // controller on osmosis controller: &Controller, @@ -119,9 +117,9 @@ fn test_ica>( let channel = remote_account.channel_id; // send some funds to the remote account - juno.send( + juno.bank_send( &remote_addr, - vec![cosmwasm_std::coin(100u128, host_funds_denom)], + &cosmwasm_std::coins(100u128, host_funds_denom), ) .map_err(Into::into)?; diff --git a/cw-orch-interchain/tests/common/mod.rs b/cw-orch-interchain/tests/common/mod.rs index cdc7f64bb..4686308ae 100644 --- a/cw-orch-interchain/tests/common/mod.rs +++ b/cw-orch-interchain/tests/common/mod.rs @@ -1,2 +1 @@ -pub mod bank; pub mod ica_demo; diff --git a/cw-orch/examples/complex_testnet_daemon.rs b/cw-orch/examples/complex_testnet_daemon.rs index b3175a78e..d7531801a 100644 --- a/cw-orch/examples/complex_testnet_daemon.rs +++ b/cw-orch/examples/complex_testnet_daemon.rs @@ -98,14 +98,11 @@ pub fn main() { .unwrap(); // We send some funds to the counter contract let contract_addr = counter.address().unwrap(); + daemon - .rt_handle - .block_on( - daemon - .sender() - .bank_send(&contract_addr, coins(50_000, denom.clone())), - ) + .bank_send(&contract_addr, &coins(50_000, denom.clone())) .unwrap(); + // We verify they have received their funds assert_eq!( daemon diff --git a/packages/clone-testing/Cargo.toml b/packages/clone-testing/Cargo.toml index 6d1720deb..e2bc6fafd 100644 --- a/packages/clone-testing/Cargo.toml +++ b/packages/clone-testing/Cargo.toml @@ -5,7 +5,7 @@ edition.workspace = true license.workspace = true name = "cw-orch-clone-testing" repository.workspace = true -version = "0.9.1" +version = "0.9.2" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/packages/clone-testing/src/core.rs b/packages/clone-testing/src/core.rs index bcd9502b5..fb4e43bb0 100644 --- a/packages/clone-testing/src/core.rs +++ b/packages/clone-testing/src/core.rs @@ -6,8 +6,8 @@ use clone_cw_multi_test::{ App, AppBuilder, BankKeeper, Contract, Executor, WasmKeeper, }; use cosmwasm_std::{ - to_json_binary, Addr, Binary, Coin, CosmosMsg, Empty, Event, StdError, StdResult, Uint128, - WasmMsg, + to_json_binary, Addr, BankMsg, Binary, Coin, CosmosMsg, Empty, Event, StdError, StdResult, + Uint128, WasmMsg, }; use cw_orch_core::{ contract::interface_traits::{ContractInstance, Uploadable}, @@ -411,6 +411,25 @@ impl TxHandler for CloneTesting { Ok(app_resp) } + + fn bank_send( + &self, + receiver: &Addr, + amount: &[cosmwasm_std::Coin], + ) -> Result { + self.app + .borrow_mut() + .execute( + self.sender.clone(), + BankMsg::Send { + to_address: receiver.to_string(), + amount: amount.to_vec(), + } + .into(), + ) + .map_err(From::from) + .map(Into::into) + } } /// Custom AppResponse type for working with the IndexResponse trait diff --git a/packages/cw-orch-core/Cargo.toml b/packages/cw-orch-core/Cargo.toml index 42aa7e0c0..87925fbf6 100644 --- a/packages/cw-orch-core/Cargo.toml +++ b/packages/cw-orch-core/Cargo.toml @@ -8,7 +8,7 @@ license = { workspace = true } name = "cw-orch-core" readme = "README.md" repository = { workspace = true } -version = "2.1.3" +version = "2.1.4" exclude = [".env"] diff --git a/packages/cw-orch-core/src/environment/tx_handler.rs b/packages/cw-orch-core/src/environment/tx_handler.rs index fed8761a9..98a5bf4e1 100644 --- a/packages/cw-orch-core/src/environment/tx_handler.rs +++ b/packages/cw-orch-core/src/environment/tx_handler.rs @@ -94,6 +94,14 @@ pub trait TxHandler: ChainState + Clone { chain.set_sender(sender.clone()); chain } + + fn bank_send( + &self, + _receiver: &Addr, + _amount: &[cosmwasm_std::Coin], + ) -> Result { + unimplemented!("Bank send is not implemented on this env") + } } pub enum AccessConfig { diff --git a/packages/cw-orch-mock/Cargo.toml b/packages/cw-orch-mock/Cargo.toml index 85cefb120..a6a90f86a 100644 --- a/packages/cw-orch-mock/Cargo.toml +++ b/packages/cw-orch-mock/Cargo.toml @@ -5,7 +5,7 @@ edition.workspace = true license.workspace = true name = "cw-orch-mock" repository.workspace = true -version = "0.24.3" +version = "0.24.4" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/packages/cw-orch-mock/src/core.rs b/packages/cw-orch-mock/src/core.rs index 082a7f531..9345de531 100644 --- a/packages/cw-orch-mock/src/core.rs +++ b/packages/cw-orch-mock/src/core.rs @@ -2,7 +2,7 @@ use std::{cell::RefCell, fmt::Debug, rc::Rc}; use cosmwasm_std::{ testing::{MockApi, MockStorage}, - to_json_binary, Addr, Api, Binary, CosmosMsg, Empty, Event, WasmMsg, + to_json_binary, Addr, Api, BankMsg, Binary, CosmosMsg, Empty, Event, WasmMsg, }; use cw_multi_test::{ ibc::IbcSimpleModule, App, AppResponse, BankKeeper, Contract, DistributionKeeper, Executor, @@ -263,6 +263,24 @@ impl TxHandler for MockBase { log::debug!("Uploading with access is not enforced when using Mock testing"); self.upload(contract_source) } + + fn bank_send( + &self, + receiver: &Addr, + amount: &[cosmwasm_std::Coin], + ) -> Result { + self.app + .borrow_mut() + .execute( + self.sender.clone(), + BankMsg::Send { + to_address: receiver.to_string(), + amount: amount.to_vec(), + } + .into(), + ) + .map_err(From::from) + } } #[cfg(test)] diff --git a/packages/cw-orch-neutron-test-tube/Cargo.toml b/packages/cw-orch-neutron-test-tube/Cargo.toml index 09b87e956..cb9806299 100644 --- a/packages/cw-orch-neutron-test-tube/Cargo.toml +++ b/packages/cw-orch-neutron-test-tube/Cargo.toml @@ -5,7 +5,7 @@ edition.workspace = true license.workspace = true name = "cw-orch-neutron-test-tube" repository.workspace = true -version = "0.2.1" +version = "0.2.2" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/packages/cw-orch-neutron-test-tube/src/core.rs b/packages/cw-orch-neutron-test-tube/src/core.rs index 3586f36a1..de7cf4ab6 100644 --- a/packages/cw-orch-neutron-test-tube/src/core.rs +++ b/packages/cw-orch-neutron-test-tube/src/core.rs @@ -1,6 +1,6 @@ pub use neutron_test_tube; -use cosmwasm_std::{coin, Addr, Coins}; +use cosmwasm_std::{coin, Addr, BankMsg, Coins}; use cw_orch_core::contract::interface_traits::Uploadable; use cw_orch_core::contract::WasmPath; @@ -9,6 +9,7 @@ use cw_orch_core::environment::{BankQuerier, BankSetter, ChainInfo, DefaultQueri use cosmwasm_std::{Binary, Coin, Uint128}; use cw_orch_core::CwEnvError; use cw_orch_mock::cw_multi_test::AppResponse; +use neutron_test_tube::cosmrs::proto::cosmos::bank::v1beta1::MsgSendResponse; use neutron_test_tube::{ neutron_std::{cosmwasm_to_proto_coins, types::cosmos::bank::v1beta1::MsgSend}, Account, Bank, Module, NeutronTestApp, Runner, RunnerError, SigningAccount, Wasm, @@ -323,6 +324,28 @@ impl TxHandler for NeutronTestTube { events: instantiate_response.events, }) } + + fn bank_send( + &self, + receiver: &Addr, + amount: &[cosmwasm_std::Coin], + ) -> Result { + let send_response = (*self.app.borrow()) + .execute_cosmos_msgs::( + &[BankMsg::Send { + to_address: receiver.to_string(), + amount: amount.to_vec(), + } + .into()], + &self.sender, + ) + .map_err(map_err)?; + + Ok(AppResponse { + data: Some(Binary::new(send_response.raw_data)), + events: send_response.events, + }) + } } /// Gas Fee token for NeutronTestTube, used in BankSetter diff --git a/packages/cw-orch-osmosis-test-tube/Cargo.toml b/packages/cw-orch-osmosis-test-tube/Cargo.toml index 2a0107cc0..82f9decfe 100644 --- a/packages/cw-orch-osmosis-test-tube/Cargo.toml +++ b/packages/cw-orch-osmosis-test-tube/Cargo.toml @@ -5,7 +5,7 @@ edition.workspace = true license.workspace = true name = "cw-orch-osmosis-test-tube" repository.workspace = true -version = "0.5.0" +version = "0.5.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/packages/cw-orch-osmosis-test-tube/src/core.rs b/packages/cw-orch-osmosis-test-tube/src/core.rs index 447cebfb2..bf3916b6b 100644 --- a/packages/cw-orch-osmosis-test-tube/src/core.rs +++ b/packages/cw-orch-osmosis-test-tube/src/core.rs @@ -1,6 +1,6 @@ pub use osmosis_test_tube; -use cosmwasm_std::{coin, Addr, Coins}; +use cosmwasm_std::{coin, Addr, BankMsg, Coins}; use cw_orch_core::contract::interface_traits::Uploadable; use cw_orch_core::contract::WasmPath; @@ -10,6 +10,7 @@ use cosmwasm_std::{Binary, Coin, Uint128}; use cw_orch_core::CwEnvError; use cw_orch_mock::cw_multi_test::AppResponse; use cw_orch_traits::Stargate; +use osmosis_test_tube::cosmrs::proto::cosmos::bank::v1beta1::MsgSendResponse; use osmosis_test_tube::{Account, Bank, Gamm, Module, Runner, RunnerError, SigningAccount, Wasm}; // This should be the way to import stuff. @@ -345,6 +346,28 @@ impl TxHandler for OsmosisTestTube { events: instantiate_response.events, }) } + + fn bank_send( + &self, + receiver: &Addr, + amount: &[cosmwasm_std::Coin], + ) -> Result { + let send_response = (*self.app.borrow()) + .execute_cosmos_msgs::( + &[BankMsg::Send { + to_address: receiver.to_string(), + amount: amount.to_vec(), + } + .into()], + &self.sender, + ) + .map_err(map_err)?; + + Ok(AppResponse { + data: Some(Binary::new(send_response.raw_data)), + events: send_response.events, + }) + } } /// Gas Fee token for OmosisTestTube, used in BankSetter From 300d17f61760102b645f12b9f24ad20bc444f940 Mon Sep 17 00:00:00 2001 From: Interchain Adair <32375605+adairrr@users.noreply.github.com> Date: Thu, 19 Dec 2024 14:56:28 -0800 Subject: [PATCH 5/6] Update Union Testnet 9 Endpoints --- packages/cw-orch-networks/src/networks/union.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cw-orch-networks/src/networks/union.rs b/packages/cw-orch-networks/src/networks/union.rs index f15339c76..d30c79778 100644 --- a/packages/cw-orch-networks/src/networks/union.rs +++ b/packages/cw-orch-networks/src/networks/union.rs @@ -26,7 +26,7 @@ pub const UNION_TESTNET_9: ChainInfo = ChainInfo { chain_id: "union-testnet-9", gas_denom: "muno", gas_price: 0.000025, - grpc_urls: &["https://grpc.union-testnet-9.cor.systems:443"], + grpc_urls: &["https://grpc.testnet-9.union.build:443", "https://grpc.union-testnet-9.cor.systems:443"], network_info: UNION_NETWORK, lcd_url: None, fcd_url: None, From ce63803dc8b53f94679fd7efbcc99708543e0594 Mon Sep 17 00:00:00 2001 From: Interchain Adair <32375605+adairrr@users.noreply.github.com> Date: Thu, 19 Dec 2024 14:57:42 -0800 Subject: [PATCH 6/6] Update mod.rs --- packages/cw-orch-networks/src/networks/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cw-orch-networks/src/networks/mod.rs b/packages/cw-orch-networks/src/networks/mod.rs index e31c09b0e..8bd9cb975 100644 --- a/packages/cw-orch-networks/src/networks/mod.rs +++ b/packages/cw-orch-networks/src/networks/mod.rs @@ -20,7 +20,7 @@ pub mod union; pub mod xion; #[allow(deprecated)] -use crate::networks::union::UNION_TESTNET_8; +use crate::networks::union::{UNION_TESTNET_8, UNION_TESTNET_9}; pub use archway::{ARCHWAY_1, CONSTANTINE_3}; pub use cosmos::COSMOS_HUB_TESTNET; pub use cw_orch_core::environment::{ChainInfo, ChainKind, NetworkInfo}; @@ -85,5 +85,6 @@ pub const SUPPORTED_NETWORKS: &[ChainInfo] = &[ LOCAL_LANDSLIDE, #[allow(deprecated)] UNION_TESTNET_8, + UNION_TESTNET_9, COSMOS_HUB_TESTNET, ];