From 84ad79da2c4382ae133d407732fb891063e5795a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wo=C5=BAniak?= Date: Fri, 23 Aug 2024 12:07:11 +0200 Subject: [PATCH] feat: Make user side cosmwasm-std dep obsolete Provide path to sylvia exposed cw_std dependency in entry_point macro --- examples/Cargo.lock | 71 ++++++------------- examples/Cargo.toml | 7 +- examples/contracts/custom/Cargo.toml | 1 - examples/contracts/custom/src/contract.rs | 2 +- examples/contracts/custom/src/cw1.rs | 2 +- examples/contracts/custom/src/messages.rs | 2 +- .../custom/src/multitest/custom_module.rs | 2 +- .../contracts/custom/src/multitest/tests.rs | 4 +- examples/contracts/cw1-subkeys/Cargo.toml | 1 - .../contracts/cw1-subkeys/src/bin/schema.rs | 2 +- .../contracts/cw1-subkeys/src/contract.rs | 2 +- examples/contracts/cw1-subkeys/src/cw1.rs | 2 +- examples/contracts/cw1-subkeys/src/error.rs | 2 +- .../cw1-subkeys/src/multitest/tests.rs | 4 +- .../contracts/cw1-subkeys/src/responses.rs | 4 +- examples/contracts/cw1-subkeys/src/state.rs | 2 +- .../contracts/cw1-subkeys/src/whitelist.rs | 2 +- examples/contracts/cw1-whitelist/Cargo.toml | 1 - .../contracts/cw1-whitelist/src/bin/schema.rs | 2 +- .../contracts/cw1-whitelist/src/contract.rs | 8 +-- examples/contracts/cw1-whitelist/src/cw1.rs | 2 +- examples/contracts/cw1-whitelist/src/error.rs | 2 +- .../contracts/cw1-whitelist/src/multitest.rs | 2 +- .../contracts/cw1-whitelist/src/whitelist.rs | 2 +- examples/contracts/cw20-base/Cargo.toml | 1 - .../contracts/cw20-base/src/allowances.rs | 2 +- .../contracts/cw20-base/src/bin/schema.rs | 2 +- examples/contracts/cw20-base/src/contract.rs | 2 +- examples/contracts/cw20-base/src/error.rs | 2 +- examples/contracts/cw20-base/src/marketing.rs | 2 +- examples/contracts/cw20-base/src/minting.rs | 2 +- .../src/multitest/allowances_tests.rs | 2 +- .../cw20-base/src/multitest/base_tests.rs | 2 +- .../src/multitest/marketing_tests.rs | 2 +- .../cw20-base/src/multitest/minting_tests.rs | 2 +- .../cw20-base/src/multitest/receiver.rs | 10 +-- .../src/multitest/receiver_contract.rs | 2 +- examples/contracts/cw20-base/src/responses.rs | 2 +- .../contracts/cw20-base/src/validation.rs | 2 +- .../entry-points-overriding/Cargo.toml | 1 - .../entry-points-overriding/src/contract.rs | 2 +- .../src/entry_points.rs | 2 +- .../entry-points-overriding/src/messages.rs | 2 +- .../entry-points-overriding/src/multitest.rs | 2 +- .../contracts/generic_contract/Cargo.toml | 1 - .../generic_contract/src/contract.rs | 6 +- .../src/custom_and_generic.rs | 2 +- .../contracts/generic_contract/src/cw1.rs | 4 +- .../contracts/generic_contract/src/generic.rs | 6 +- .../generic_iface_on_contract/Cargo.toml | 1 - .../generic_iface_on_contract/src/contract.rs | 8 +-- .../src/custom_and_generic.rs | 2 +- .../generic_iface_on_contract/src/cw1.rs | 2 +- .../generic_iface_on_contract/src/generic.rs | 2 +- .../contracts/generics_forwarded/Cargo.toml | 1 - .../generics_forwarded/src/contract.rs | 8 +-- .../src/custom_and_generic.rs | 6 +- .../contracts/generics_forwarded/src/cw1.rs | 4 +- .../contracts/generics_forwarded/src/error.rs | 2 +- .../generics_forwarded/src/generic.rs | 6 +- .../interfaces/custom-and-generic/Cargo.toml | 1 - .../interfaces/custom-and-generic/src/lib.rs | 10 +-- examples/interfaces/cw1/Cargo.toml | 1 - examples/interfaces/cw1/src/lib.rs | 4 +- .../interfaces/cw20-allowances/Cargo.toml | 1 - .../interfaces/cw20-allowances/src/lib.rs | 2 +- .../cw20-allowances/src/responses.rs | 2 +- examples/interfaces/cw20-marketing/Cargo.toml | 1 - examples/interfaces/cw20-marketing/src/lib.rs | 2 +- .../cw20-marketing/src/responses.rs | 2 +- examples/interfaces/cw20-minting/Cargo.toml | 1 - examples/interfaces/cw20-minting/src/lib.rs | 2 +- .../interfaces/cw20-minting/src/responses.rs | 2 +- examples/interfaces/cw4/Cargo.toml | 1 - examples/interfaces/cw4/src/lib.rs | 4 +- examples/interfaces/generic/Cargo.toml | 1 - examples/interfaces/generic/src/lib.rs | 18 ++--- examples/interfaces/whitelist/Cargo.toml | 1 - examples/interfaces/whitelist/src/lib.rs | 4 +- sylvia-derive/src/entry_points.rs | 4 +- sylvia/tests/api.rs | 10 +-- sylvia/tests/custom_msg.rs | 28 ++++---- sylvia/tests/custom_query.rs | 28 ++++---- sylvia/tests/dispatching.rs | 12 ++-- sylvia/tests/entry_points.rs | 10 +-- sylvia/tests/executor.rs | 10 +-- sylvia/tests/interface_impl.rs | 6 +- sylvia/tests/messages_generation.rs | 12 ++-- sylvia/tests/multitest.rs | 2 +- sylvia/tests/querier.rs | 12 ++-- sylvia/tests/query_returns.rs | 6 +- sylvia/tests/remote.rs | 16 ++--- 92 files changed, 207 insertions(+), 247 deletions(-) diff --git a/examples/Cargo.lock b/examples/Cargo.lock index d8596061..61aec0b8 100644 --- a/examples/Cargo.lock +++ b/examples/Cargo.lock @@ -233,15 +233,15 @@ dependencies = [ [[package]] name = "cosmwasm-core" -version = "2.1.1" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "367fc87c43759098a476ef90f915aadc66c300480ad9c155b512081fbf327bc1" +checksum = "d905990ef3afb5753bb709dc7de88e9e370aa32bcc2f31731d4b533b63e82490" [[package]] name = "cosmwasm-crypto" -version = "2.1.1" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7c41f3e371ea457d3b98bb592c38858b46efcf614e0e988ec2ebbdb973954f" +checksum = "5b2a7bd9c1dd9a377a4dc0f4ad97d24b03c33798cd5a6d7ceb8869b41c5d2f2d" dependencies = [ "ark-bls12-381", "ark-ec", @@ -262,9 +262,9 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "2.1.1" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c10510e8eb66cf7e109741b1e2c76ad18f30b5a1daa064f5f7115c1f733aaea0" +checksum = "029910b409398fdf81955d7301b906caf81f2c42b013ea074fbd89720229c424" dependencies = [ "proc-macro2", "quote", @@ -273,9 +273,9 @@ dependencies = [ [[package]] name = "cosmwasm-schema" -version = "2.1.1" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f79879b6b7ef6a331b05030ce91ce46a7c4b0baf1ed6b382cce2e9a168109380" +checksum = "4bc0d4d85e83438ab9a0fea9348446f7268bc016aacfebce37e998559f151294" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -286,9 +286,9 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "2.1.1" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b53e33c0e97170c7ac9cb440f4bc599a07f9cbb9b7e87916cca37b1239d57b" +checksum = "edf5c8adac41bb7751c050d7c4c18675be19ee128714454454575e894424eeef" dependencies = [ "proc-macro2", "quote", @@ -297,9 +297,9 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "2.1.1" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92011c39570876f340d5f9defa68bf92797b1c44421f1b9ea9b04a31d6defd33" +checksum = "51dec99a2e478715c0a4277f0dbeadbb8466500eb7dec873d0924edd086e77f1" dependencies = [ "base64", "bech32", @@ -407,7 +407,6 @@ version = "0.5.0" dependencies = [ "anyhow", "cosmwasm-schema", - "cosmwasm-std", "cw-multi-test", "cw-storage-plus", "cw1", @@ -421,7 +420,6 @@ version = "0.5.0" dependencies = [ "anyhow", "cosmwasm-schema", - "cosmwasm-std", "cw-multi-test", "serde", "sylvia", @@ -429,9 +427,9 @@ dependencies = [ [[package]] name = "cw-multi-test" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0034bfb4c06dfc8b50f0b1a06c3fc0f2312a1bae568a97db65930de071288ba" +checksum = "b0ae276e7a06ad1b7e7da78a3d68aba80634cde30ee7fe8259a94e653603fef8" dependencies = [ "anyhow", "bech32", @@ -477,7 +475,6 @@ version = "0.5.0" dependencies = [ "anyhow", "cosmwasm-schema", - "cosmwasm-std", "cw-multi-test", "serde", "sylvia", @@ -489,7 +486,6 @@ version = "0.5.0" dependencies = [ "anyhow", "cosmwasm-schema", - "cosmwasm-std", "cw-multi-test", "cw-storage-plus", "cw-utils", @@ -509,7 +505,6 @@ dependencies = [ "anyhow", "assert_matches", "cosmwasm-schema", - "cosmwasm-std", "cw-multi-test", "cw-storage-plus", "cw1", @@ -541,7 +536,6 @@ version = "0.5.0" dependencies = [ "anyhow", "cosmwasm-schema", - "cosmwasm-std", "cw-multi-test", "cw-utils", "serde", @@ -555,7 +549,6 @@ dependencies = [ "anyhow", "assert_matches", "cosmwasm-schema", - "cosmwasm-std", "cw-multi-test", "cw-storage-plus", "cw-utils", @@ -575,7 +568,6 @@ version = "0.5.0" dependencies = [ "anyhow", "cosmwasm-schema", - "cosmwasm-std", "cw-multi-test", "serde", "sylvia", @@ -587,7 +579,6 @@ version = "0.5.0" dependencies = [ "anyhow", "cosmwasm-schema", - "cosmwasm-std", "cw-multi-test", "serde", "sylvia", @@ -599,7 +590,6 @@ version = "0.5.0" dependencies = [ "anyhow", "cosmwasm-schema", - "cosmwasm-std", "cw-multi-test", "serde", "sylvia", @@ -732,7 +722,6 @@ version = "0.5.0" dependencies = [ "anyhow", "cosmwasm-schema", - "cosmwasm-std", "cw-multi-test", "cw-storage-plus", "cw-utils", @@ -768,7 +757,6 @@ version = "0.5.0" dependencies = [ "anyhow", "cosmwasm-schema", - "cosmwasm-std", "cw-multi-test", "serde", "sylvia", @@ -791,7 +779,6 @@ version = "0.5.0" dependencies = [ "anyhow", "cosmwasm-schema", - "cosmwasm-std", "custom-and-generic", "cw-multi-test", "cw-storage-plus", @@ -808,7 +795,6 @@ version = "0.5.0" dependencies = [ "anyhow", "cosmwasm-schema", - "cosmwasm-std", "custom-and-generic", "cw-multi-test", "cw-storage-plus", @@ -825,7 +811,6 @@ version = "0.5.0" dependencies = [ "anyhow", "cosmwasm-schema", - "cosmwasm-std", "custom-and-generic", "cw-multi-test", "cw-storage-plus", @@ -912,15 +897,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.13.0" @@ -1101,9 +1077,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.12.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +checksum = "e13db3d3fde688c61e2446b4d843bc27a7e8af269a69440c0308021dc92333cc" dependencies = [ "bytes", "prost-derive", @@ -1111,12 +1087,12 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +checksum = "18bec9b0adc4eba778b33684b7ba3e7137789434769ee3ce3930463ef904cfca" dependencies = [ "anyhow", - "itertools 0.12.1", + "itertools 0.13.0", "proc-macro2", "quote", "syn 2.0.72", @@ -1250,9 +1226,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.204" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" dependencies = [ "serde_derive", ] @@ -1277,9 +1253,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.204" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" dependencies = [ "proc-macro2", "quote", @@ -1487,7 +1463,6 @@ version = "0.5.0" dependencies = [ "anyhow", "cosmwasm-schema", - "cosmwasm-std", "cw-multi-test", "serde", "sylvia", diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 3812c4a7..32a1b06c 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -28,13 +28,12 @@ edition = "2021" [workspace.dependencies] anyhow = "1.0.86" -cosmwasm-schema = "2.1.1" -cosmwasm-std = "2.1.1" -cw-multi-test = "2.1.0" +cosmwasm-schema = "2.1.3" +cw-multi-test = "2.1.1" cw-storage-plus = "2.0.0" cw-utils = "2.0.0" cw2 = "2.0.0" semver = "1.0.23" -serde = { version = "1.0.204", default-features = false, features = ["derive"] } +serde = { version = "1.0.208", default-features = false, features = ["derive"] } thiserror = "1.0.63" assert_matches = "1.5.0" diff --git a/examples/contracts/custom/Cargo.toml b/examples/contracts/custom/Cargo.toml index 5125a504..e51e7d61 100644 --- a/examples/contracts/custom/Cargo.toml +++ b/examples/contracts/custom/Cargo.toml @@ -19,7 +19,6 @@ mt = ["library", "anyhow", "cw-multi-test"] [dependencies] cw1 = { path = "../../interfaces/cw1" } cosmwasm-schema = { workspace = true } -cosmwasm-std = { workspace = true, features = ["staking"] } cw-storage-plus = { workspace = true } serde = { workspace = true } sylvia = { path = "../../../sylvia" } diff --git a/examples/contracts/custom/src/contract.rs b/examples/contracts/custom/src/contract.rs index 1d15d674..c549a8d8 100644 --- a/examples/contracts/custom/src/contract.rs +++ b/examples/contracts/custom/src/contract.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{CosmosMsg, QueryRequest, Response, StdResult}; +use sylvia::cw_std::{CosmosMsg, QueryRequest, Response, StdResult}; use cw_storage_plus::Item; use sylvia::types::{ExecCtx, InstantiateCtx, QueryCtx, SudoCtx}; use sylvia::{contract, schemars}; diff --git a/examples/contracts/custom/src/cw1.rs b/examples/contracts/custom/src/cw1.rs index 372eef9e..ecbf1d71 100644 --- a/examples/contracts/custom/src/cw1.rs +++ b/examples/contracts/custom/src/cw1.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{CosmosMsg, Empty, Response, StdError, StdResult}; +use sylvia::cw_std::{CosmosMsg, Empty, Response, StdError, StdResult}; use cw1::{CanExecuteResp, Cw1}; use sylvia::types::{ExecCtx, QueryCtx}; diff --git a/examples/contracts/custom/src/messages.rs b/examples/contracts/custom/src/messages.rs index 9461363f..30076f85 100644 --- a/examples/contracts/custom/src/messages.rs +++ b/examples/contracts/custom/src/messages.rs @@ -1,5 +1,5 @@ use cosmwasm_schema::cw_serde; -use cosmwasm_std::{CustomMsg, CustomQuery}; +use sylvia::cw_std::{CustomMsg, CustomQuery}; #[cw_serde] pub struct CountResponse { diff --git a/examples/contracts/custom/src/multitest/custom_module.rs b/examples/contracts/custom/src/multitest/custom_module.rs index ca9719b5..c38cb1ed 100644 --- a/examples/contracts/custom/src/multitest/custom_module.rs +++ b/examples/contracts/custom/src/multitest/custom_module.rs @@ -1,5 +1,5 @@ use cosmwasm_schema::schemars::JsonSchema; -use cosmwasm_std::{ +use sylvia::cw_std::{ to_json_binary, Addr, Api, Binary, BlockInfo, CustomQuery, Empty, Querier, StdError, StdResult, Storage, }; diff --git a/examples/contracts/custom/src/multitest/tests.rs b/examples/contracts/custom/src/multitest/tests.rs index 8d980c98..fa3cfa92 100644 --- a/examples/contracts/custom/src/multitest/tests.rs +++ b/examples/contracts/custom/src/multitest/tests.rs @@ -7,7 +7,7 @@ use super::custom_module::CustomModule; use crate::contract::sv::mt::CustomContractProxy; -use cosmwasm_std::CosmosMsg; +use sylvia::cw_std::CosmosMsg; use cw1::sv::mt::Cw1Proxy; #[test] @@ -29,7 +29,7 @@ fn test_custom() { contract.send_custom().call(&owner).unwrap(); contract - .can_execute("".to_string(), CosmosMsg::Custom(cosmwasm_std::Empty {})) + .can_execute("".to_string(), CosmosMsg::Custom(sylvia::cw_std::Empty {})) .unwrap(); contract.execute(vec![]).call(&owner).unwrap(); diff --git a/examples/contracts/cw1-subkeys/Cargo.toml b/examples/contracts/cw1-subkeys/Cargo.toml index 218534b9..6e03b0c3 100644 --- a/examples/contracts/cw1-subkeys/Cargo.toml +++ b/examples/contracts/cw1-subkeys/Cargo.toml @@ -13,7 +13,6 @@ mt = ["library", "cw-multi-test", "anyhow"] [dependencies] anyhow = { workspace = true, optional = true } cosmwasm-schema = { workspace = true } -cosmwasm-std = { workspace = true, features = ["staking"] } cw-multi-test = { workspace = true, optional = true } cw-storage-plus = { workspace = true } cw-utils = { workspace = true } diff --git a/examples/contracts/cw1-subkeys/src/bin/schema.rs b/examples/contracts/cw1-subkeys/src/bin/schema.rs index 8a4be049..44f42451 100644 --- a/examples/contracts/cw1-subkeys/src/bin/schema.rs +++ b/examples/contracts/cw1-subkeys/src/bin/schema.rs @@ -1,5 +1,5 @@ use cosmwasm_schema::write_api; -use cosmwasm_std::Empty; +use sylvia::cw_std::Empty; use cw1_subkeys::contract::sv::{ContractExecMsg, ContractQueryMsg, InstantiateMsg}; #[cfg(not(tarpaulin_include))] diff --git a/examples/contracts/cw1-subkeys/src/contract.rs b/examples/contracts/cw1-subkeys/src/contract.rs index 8b27b6c1..17aaffea 100644 --- a/examples/contracts/cw1-subkeys/src/contract.rs +++ b/examples/contracts/cw1-subkeys/src/contract.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{ +use sylvia::cw_std::{ ensure, ensure_ne, Addr, BankMsg, Coin, CosmosMsg, Deps, DistributionMsg, Empty, Env, Order, Response, StakingMsg, StdResult, }; diff --git a/examples/contracts/cw1-subkeys/src/cw1.rs b/examples/contracts/cw1-subkeys/src/cw1.rs index 60bd5281..254a16c7 100644 --- a/examples/contracts/cw1-subkeys/src/cw1.rs +++ b/examples/contracts/cw1-subkeys/src/cw1.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{ensure, Addr, CosmosMsg, Response, StdResult}; +use sylvia::cw_std::{ensure, Addr, CosmosMsg, Response, StdResult}; use cw1::{CanExecuteResp, Cw1}; use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx}; diff --git a/examples/contracts/cw1-subkeys/src/error.rs b/examples/contracts/cw1-subkeys/src/error.rs index f3baaa42..a572c7e7 100644 --- a/examples/contracts/cw1-subkeys/src/error.rs +++ b/examples/contracts/cw1-subkeys/src/error.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::StdError; +use sylvia::cw_std::StdError; use cw1_whitelist::error::ContractError as WhitelistError; use cw_utils::Expiration; use thiserror::Error; diff --git a/examples/contracts/cw1-subkeys/src/multitest/tests.rs b/examples/contracts/cw1-subkeys/src/multitest/tests.rs index 12b4fbef..ec486ae3 100644 --- a/examples/contracts/cw1-subkeys/src/multitest/tests.rs +++ b/examples/contracts/cw1-subkeys/src/multitest/tests.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{coin, coins, Addr}; +use sylvia::cw_std::{coin, coins, Addr}; use cw2::{query_contract_info, ContractVersion}; use cw_multi_test::IntoBech32; use cw_utils::{Expiration, NativeBalance}; @@ -382,7 +382,7 @@ mod permissions { } mod cw1_execute { - use cosmwasm_std::BankMsg; + use sylvia::cw_std::BankMsg; use super::*; diff --git a/examples/contracts/cw1-subkeys/src/responses.rs b/examples/contracts/cw1-subkeys/src/responses.rs index e4ac3a54..ec736123 100644 --- a/examples/contracts/cw1-subkeys/src/responses.rs +++ b/examples/contracts/cw1-subkeys/src/responses.rs @@ -1,6 +1,6 @@ use crate::state::Permissions; use cosmwasm_schema::schemars::JsonSchema; -use cosmwasm_std::Addr; +use sylvia::cw_std::Addr; use cw_utils::{Expiration, NativeBalance}; use serde::{Deserialize, Serialize}; use sylvia::schemars; @@ -44,7 +44,7 @@ impl AllowanceInfo { /// # use cw_utils::{Expiration, NativeBalance}; /// # use cw1_subkeys::msg::AllowanceInfo; /// # use cosmwasm_schema::{cw_serde, QueryResponses}; - /// # use cosmwasm_std::coin; + /// # use sylvia::cw_std::coin; /// /// let mut allows = vec![Allowance { /// spender: "spender2".to_owned(), diff --git a/examples/contracts/cw1-subkeys/src/state.rs b/examples/contracts/cw1-subkeys/src/state.rs index 6fc645da..e9ffd4c9 100644 --- a/examples/contracts/cw1-subkeys/src/state.rs +++ b/examples/contracts/cw1-subkeys/src/state.rs @@ -48,7 +48,7 @@ impl Allowance { /// ``` /// # use cw_utils::{Expiration, NativeBalance}; /// # use cw1_subkeys::state::Allowance; - /// # use cosmwasm_std::coin; + /// # use sylvia::cw_std::coin; /// /// let allow1 = Allowance { /// balance: NativeBalance(vec![coin(1, "token1"), coin(0, "token2"), coin(2, "token1"), coin(3, "token3")]), diff --git a/examples/contracts/cw1-subkeys/src/whitelist.rs b/examples/contracts/cw1-subkeys/src/whitelist.rs index 7da9331c..bbd1fb0f 100644 --- a/examples/contracts/cw1-subkeys/src/whitelist.rs +++ b/examples/contracts/cw1-subkeys/src/whitelist.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{Response, StdResult}; +use sylvia::cw_std::{Response, StdResult}; use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx}; use whitelist::responses::AdminListResponse; use whitelist::Whitelist; diff --git a/examples/contracts/cw1-whitelist/Cargo.toml b/examples/contracts/cw1-whitelist/Cargo.toml index edafd667..a4422d09 100644 --- a/examples/contracts/cw1-whitelist/Cargo.toml +++ b/examples/contracts/cw1-whitelist/Cargo.toml @@ -16,7 +16,6 @@ library = [] mt = ["sylvia/mt", "library", "cw-multi-test", "anyhow"] [dependencies] -cosmwasm-std = { workspace = true, features = ["staking"] } cosmwasm-schema = { workspace = true } serde = { workspace = true } sylvia = { path = "../../../sylvia" } diff --git a/examples/contracts/cw1-whitelist/src/bin/schema.rs b/examples/contracts/cw1-whitelist/src/bin/schema.rs index 83ca2718..b99d7158 100644 --- a/examples/contracts/cw1-whitelist/src/bin/schema.rs +++ b/examples/contracts/cw1-whitelist/src/bin/schema.rs @@ -1,5 +1,5 @@ use cosmwasm_schema::write_api; -use cosmwasm_std::Empty; +use sylvia::cw_std::Empty; use cw1_whitelist::contract::sv::{ContractExecMsg, ContractQueryMsg, InstantiateMsg}; #[cfg(not(tarpaulin_include))] diff --git a/examples/contracts/cw1-whitelist/src/contract.rs b/examples/contracts/cw1-whitelist/src/contract.rs index 145589a9..42eb4485 100644 --- a/examples/contracts/cw1-whitelist/src/contract.rs +++ b/examples/contracts/cw1-whitelist/src/contract.rs @@ -1,5 +1,5 @@ use crate::error::ContractError; -use cosmwasm_std::{Addr, Deps, Empty, Response}; +use sylvia::cw_std::{Addr, Deps, Empty, Response}; use cw2::set_contract_version; use cw_storage_plus::{Item, Map}; use sylvia::types::{CustomMsg, CustomQuery, InstantiateCtx}; @@ -62,8 +62,8 @@ where #[cfg(test)] mod tests { use super::*; - use cosmwasm_std::testing::{message_info, mock_dependencies, mock_env}; - use cosmwasm_std::{ + use sylvia::cw_std::testing::{message_info, mock_dependencies, mock_env}; + use sylvia::cw_std::{ coin, coins, to_json_binary, BankMsg, CosmosMsg, StakingMsg, SubMsg, WasmMsg, }; use cw1::Cw1; @@ -299,7 +299,7 @@ mod tests { } mod msgs { - use cosmwasm_std::{from_json, to_json_binary, BankMsg, Empty}; + use sylvia::cw_std::{from_json, to_json_binary, BankMsg, Empty}; use crate::contract::sv::{ContractExecMsg, ContractQueryMsg}; diff --git a/examples/contracts/cw1-whitelist/src/cw1.rs b/examples/contracts/cw1-whitelist/src/cw1.rs index ef850a81..73c2eefb 100644 --- a/examples/contracts/cw1-whitelist/src/cw1.rs +++ b/examples/contracts/cw1-whitelist/src/cw1.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{Addr, CosmosMsg, Response, StdResult}; +use sylvia::cw_std::{Addr, CosmosMsg, Response, StdResult}; use cw1::{CanExecuteResp, Cw1}; use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx}; diff --git a/examples/contracts/cw1-whitelist/src/error.rs b/examples/contracts/cw1-whitelist/src/error.rs index 28e7fa40..ae8367aa 100644 --- a/examples/contracts/cw1-whitelist/src/error.rs +++ b/examples/contracts/cw1-whitelist/src/error.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::StdError; +use sylvia::cw_std::StdError; use thiserror::Error; #[derive(Error, Debug, PartialEq)] diff --git a/examples/contracts/cw1-whitelist/src/multitest.rs b/examples/contracts/cw1-whitelist/src/multitest.rs index 78aa3915..4cb36f8c 100644 --- a/examples/contracts/cw1-whitelist/src/multitest.rs +++ b/examples/contracts/cw1-whitelist/src/multitest.rs @@ -1,6 +1,6 @@ #[cfg(test)] mod test { - use cosmwasm_std::{to_json_binary, Addr, WasmMsg}; + use sylvia::cw_std::{to_json_binary, Addr, WasmMsg}; use cw_multi_test::IntoBech32; use whitelist::responses::AdminListResponse; diff --git a/examples/contracts/cw1-whitelist/src/whitelist.rs b/examples/contracts/cw1-whitelist/src/whitelist.rs index 900e5c6c..e292d1e8 100644 --- a/examples/contracts/cw1-whitelist/src/whitelist.rs +++ b/examples/contracts/cw1-whitelist/src/whitelist.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{Empty, Order, Response, StdResult}; +use sylvia::cw_std::{Empty, Order, Response, StdResult}; use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx}; use whitelist::responses::AdminListResponse; use whitelist::Whitelist; diff --git a/examples/contracts/cw20-base/Cargo.toml b/examples/contracts/cw20-base/Cargo.toml index 0dd0dc26..2e2ea2c4 100644 --- a/examples/contracts/cw20-base/Cargo.toml +++ b/examples/contracts/cw20-base/Cargo.toml @@ -18,7 +18,6 @@ mt = ["library", "cw-multi-test", "anyhow"] [dependencies] anyhow = { workspace = true, optional = true } cosmwasm-schema = { workspace = true } -cosmwasm-std = { workspace = true, features = ["staking"] } cw-multi-test = { workspace = true, optional = true } cw-storage-plus = { workspace = true } cw-utils = { workspace = true } diff --git a/examples/contracts/cw20-base/src/allowances.rs b/examples/contracts/cw20-base/src/allowances.rs index 87fb65c9..d0b4412a 100644 --- a/examples/contracts/cw20-base/src/allowances.rs +++ b/examples/contracts/cw20-base/src/allowances.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{Addr, Binary, Order, Response, StdError, StdResult, Uint128}; +use sylvia::cw_std::{Addr, Binary, Order, Response, StdError, StdResult, Uint128}; use cw20_allowances::responses::{ AllAccountsResponse, AllAllowancesResponse, AllSpenderAllowancesResponse, AllowanceInfo, AllowanceResponse, SpenderAllowanceInfo, diff --git a/examples/contracts/cw20-base/src/bin/schema.rs b/examples/contracts/cw20-base/src/bin/schema.rs index 75d3970f..eeb9d36d 100644 --- a/examples/contracts/cw20-base/src/bin/schema.rs +++ b/examples/contracts/cw20-base/src/bin/schema.rs @@ -1,5 +1,5 @@ use cosmwasm_schema::write_api; -use cosmwasm_std::Empty; +use sylvia::cw_std::Empty; use cw20_base::contract::sv::{ContractExecMsg, ContractQueryMsg, InstantiateMsg}; #[cfg(not(tarpaulin_include))] diff --git a/examples/contracts/cw20-base/src/contract.rs b/examples/contracts/cw20-base/src/contract.rs index 7205cb07..c40ffc64 100644 --- a/examples/contracts/cw20-base/src/contract.rs +++ b/examples/contracts/cw20-base/src/contract.rs @@ -2,7 +2,7 @@ use crate::error::ContractError; use crate::responses::{BalanceResponse, Cw20Coin, Cw20ReceiveMsg, TokenInfoResponse}; use crate::validation::{validate_accounts, validate_msg, verify_logo}; use cosmwasm_schema::cw_serde; -use cosmwasm_std::{ +use sylvia::cw_std::{ ensure, Addr, Binary, BlockInfo, DepsMut, Empty, Order, Response, StdError, StdResult, Storage, Uint128, }; diff --git a/examples/contracts/cw20-base/src/error.rs b/examples/contracts/cw20-base/src/error.rs index e0fece07..489d33c4 100644 --- a/examples/contracts/cw20-base/src/error.rs +++ b/examples/contracts/cw20-base/src/error.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::StdError; +use sylvia::cw_std::StdError; use thiserror::Error; #[derive(Error, Debug, PartialEq)] diff --git a/examples/contracts/cw20-base/src/marketing.rs b/examples/contracts/cw20-base/src/marketing.rs index 2b67037c..8ea9bce1 100644 --- a/examples/contracts/cw20-base/src/marketing.rs +++ b/examples/contracts/cw20-base/src/marketing.rs @@ -1,7 +1,7 @@ use crate::contract::Cw20Base; use crate::error::ContractError; use crate::validation::verify_logo; -use cosmwasm_std::{Response, StdError, StdResult}; +use sylvia::cw_std::{Response, StdError, StdResult}; use cw20_marketing::responses::{DownloadLogoResponse, LogoInfo, MarketingInfoResponse}; use cw20_marketing::{Cw20Marketing, EmbeddedLogo, Logo}; use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx}; diff --git a/examples/contracts/cw20-base/src/minting.rs b/examples/contracts/cw20-base/src/minting.rs index b587e03a..423eee50 100644 --- a/examples/contracts/cw20-base/src/minting.rs +++ b/examples/contracts/cw20-base/src/minting.rs @@ -1,6 +1,6 @@ use crate::contract::{Cw20Base, MinterData}; use crate::error::ContractError; -use cosmwasm_std::{Response, StdResult, Uint128}; +use sylvia::cw_std::{Response, StdResult, Uint128}; use cw20_minting::responses::MinterResponse; use cw20_minting::Cw20Minting; use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx}; diff --git a/examples/contracts/cw20-base/src/multitest/allowances_tests.rs b/examples/contracts/cw20-base/src/multitest/allowances_tests.rs index f4983bf7..a638b697 100644 --- a/examples/contracts/cw20-base/src/multitest/allowances_tests.rs +++ b/examples/contracts/cw20-base/src/multitest/allowances_tests.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{Binary, StdError, Timestamp, Uint128}; +use sylvia::cw_std::{Binary, StdError, Timestamp, Uint128}; use cw20_allowances::responses::{ AllAllowancesResponse, AllSpenderAllowancesResponse, AllowanceInfo, AllowanceResponse, SpenderAllowanceInfo, diff --git a/examples/contracts/cw20-base/src/multitest/base_tests.rs b/examples/contracts/cw20-base/src/multitest/base_tests.rs index 00693292..b26e23e0 100644 --- a/examples/contracts/cw20-base/src/multitest/base_tests.rs +++ b/examples/contracts/cw20-base/src/multitest/base_tests.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{Binary, StdError, Uint128}; +use sylvia::cw_std::{Binary, StdError, Uint128}; use cw20_allowances::responses::{AllAllowancesResponse, SpenderAllowanceInfo}; use cw_multi_test::IntoBech32; use cw_utils::Expiration; diff --git a/examples/contracts/cw20-base/src/multitest/marketing_tests.rs b/examples/contracts/cw20-base/src/multitest/marketing_tests.rs index eb050e1f..cc2533fc 100644 --- a/examples/contracts/cw20-base/src/multitest/marketing_tests.rs +++ b/examples/contracts/cw20-base/src/multitest/marketing_tests.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{Addr, StdError}; +use sylvia::cw_std::{Addr, StdError}; use cw20_marketing::responses::{DownloadLogoResponse, LogoInfo, MarketingInfoResponse}; use cw20_marketing::{EmbeddedLogo, Logo}; use cw_multi_test::IntoBech32; diff --git a/examples/contracts/cw20-base/src/multitest/minting_tests.rs b/examples/contracts/cw20-base/src/multitest/minting_tests.rs index 54c90ea8..6b669002 100644 --- a/examples/contracts/cw20-base/src/multitest/minting_tests.rs +++ b/examples/contracts/cw20-base/src/multitest/minting_tests.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{Addr, StdError, Uint128}; +use sylvia::cw_std::{Addr, StdError, Uint128}; use cw20_minting::responses::MinterResponse; use cw_multi_test::IntoBech32; use sylvia::multitest::App; diff --git a/examples/contracts/cw20-base/src/multitest/receiver.rs b/examples/contracts/cw20-base/src/multitest/receiver.rs index 2d67d44d..bdcb0aee 100644 --- a/examples/contracts/cw20-base/src/multitest/receiver.rs +++ b/examples/contracts/cw20-base/src/multitest/receiver.rs @@ -1,9 +1,9 @@ -use cosmwasm_std::{Binary, Response, StdError, Uint128}; +use sylvia::cw_std::{Binary, Response, StdError, Uint128}; use sylvia::types::ExecCtx; use sylvia::{interface, schemars}; #[interface] -#[sv::custom(msg=cosmwasm_std::Empty, query=cosmwasm_std::Empty)] +#[sv::custom(msg=sylvia::cw_std::Empty, query=sylvia::cw_std::Empty)] pub trait Receiver { type Error: From; @@ -19,7 +19,7 @@ pub trait Receiver { pub mod impl_receiver { use crate::multitest::receiver_contract::ReceiverContract; - use cosmwasm_std::{Response, StdError}; + use sylvia::cw_std::{Response, StdError}; use sylvia::types::ExecCtx; impl super::Receiver for ReceiverContract { @@ -29,8 +29,8 @@ pub mod impl_receiver { &self, _ctx: ExecCtx, _sender: String, - _amount: cosmwasm_std::Uint128, - _msg: cosmwasm_std::Binary, + _amount: sylvia::cw_std::Uint128, + _msg: sylvia::cw_std::Binary, ) -> Result { Ok(Response::default()) } diff --git a/examples/contracts/cw20-base/src/multitest/receiver_contract.rs b/examples/contracts/cw20-base/src/multitest/receiver_contract.rs index 12caae24..9b98c3a5 100644 --- a/examples/contracts/cw20-base/src/multitest/receiver_contract.rs +++ b/examples/contracts/cw20-base/src/multitest/receiver_contract.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{Response, StdResult}; +use sylvia::cw_std::{Response, StdResult}; use sylvia::types::InstantiateCtx; use sylvia::{contract, schemars}; diff --git a/examples/contracts/cw20-base/src/responses.rs b/examples/contracts/cw20-base/src/responses.rs index a3aaf6ff..f7e6d5e6 100644 --- a/examples/contracts/cw20-base/src/responses.rs +++ b/examples/contracts/cw20-base/src/responses.rs @@ -1,5 +1,5 @@ use cosmwasm_schema::cw_serde; -use cosmwasm_std::{to_json_binary, Addr, Binary, CosmosMsg, StdResult, Uint128, WasmMsg}; +use sylvia::cw_std::{to_json_binary, Addr, Binary, CosmosMsg, StdResult, Uint128, WasmMsg}; use std::fmt; /// Cw20ReceiveMsg should be de/serialized under `Receive()` variant in a ExecuteMsg diff --git a/examples/contracts/cw20-base/src/validation.rs b/examples/contracts/cw20-base/src/validation.rs index 161e0cbc..0df83100 100644 --- a/examples/contracts/cw20-base/src/validation.rs +++ b/examples/contracts/cw20-base/src/validation.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{StdError, StdResult}; +use sylvia::cw_std::{StdError, StdResult}; use cw20_marketing::{EmbeddedLogo, Logo}; use crate::error::ContractError; diff --git a/examples/contracts/entry-points-overriding/Cargo.toml b/examples/contracts/entry-points-overriding/Cargo.toml index 5cc75460..3b996d93 100644 --- a/examples/contracts/entry-points-overriding/Cargo.toml +++ b/examples/contracts/entry-points-overriding/Cargo.toml @@ -18,7 +18,6 @@ mt = ["library", "cw-multi-test", "anyhow"] [dependencies] anyhow = { workspace = true, optional = true } cosmwasm-schema = { workspace = true } -cosmwasm-std = { workspace = true, features = ["staking"] } cw-multi-test = { workspace = true, optional = true } cw-storage-plus = { workspace = true } cw-utils = { workspace = true } diff --git a/examples/contracts/entry-points-overriding/src/contract.rs b/examples/contracts/entry-points-overriding/src/contract.rs index 54fcb258..5c773616 100644 --- a/examples/contracts/entry-points-overriding/src/contract.rs +++ b/examples/contracts/entry-points-overriding/src/contract.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{Response, StdError, StdResult}; +use sylvia::cw_std::{Response, StdError, StdResult}; use cw_storage_plus::Item; use sylvia::types::{ExecCtx, InstantiateCtx, QueryCtx}; use sylvia::{contract, schemars}; diff --git a/examples/contracts/entry-points-overriding/src/entry_points.rs b/examples/contracts/entry-points-overriding/src/entry_points.rs index 6fc17466..6b5b3f0f 100644 --- a/examples/contracts/entry-points-overriding/src/entry_points.rs +++ b/examples/contracts/entry-points-overriding/src/entry_points.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{entry_point, DepsMut, Env, MessageInfo, Response, StdResult}; +use sylvia::cw_std::{entry_point, DepsMut, Env, MessageInfo, Response, StdResult}; use crate::contract::CounterContract; use crate::messages::{CustomExecMsg, SudoMsg}; diff --git a/examples/contracts/entry-points-overriding/src/messages.rs b/examples/contracts/entry-points-overriding/src/messages.rs index 56b372b5..34fa206e 100644 --- a/examples/contracts/entry-points-overriding/src/messages.rs +++ b/examples/contracts/entry-points-overriding/src/messages.rs @@ -1,5 +1,5 @@ use cosmwasm_schema::cw_serde; -use cosmwasm_std::{DepsMut, Env, MessageInfo, Response, StdError, StdResult}; +use sylvia::cw_std::{DepsMut, Env, MessageInfo, Response, StdError, StdResult}; use sylvia::types::ExecCtx; use crate::contract::sv::ContractExecMsg; diff --git a/examples/contracts/entry-points-overriding/src/multitest.rs b/examples/contracts/entry-points-overriding/src/multitest.rs index bc3f7ed7..9d642233 100644 --- a/examples/contracts/entry-points-overriding/src/multitest.rs +++ b/examples/contracts/entry-points-overriding/src/multitest.rs @@ -3,7 +3,7 @@ mod test { use crate::contract::sv::mt::{CodeId, CounterContractProxy}; use crate::contract::sv::{ContractExecMsg, ExecMsg}; use crate::messages::{CustomExecMsg, SudoMsg, UserExecMsg}; - use cosmwasm_std::Addr; + use sylvia::cw_std::Addr; use cw_multi_test::{Executor, IntoBech32}; use sylvia::multitest::App; diff --git a/examples/contracts/generic_contract/Cargo.toml b/examples/contracts/generic_contract/Cargo.toml index 780df461..053f8692 100644 --- a/examples/contracts/generic_contract/Cargo.toml +++ b/examples/contracts/generic_contract/Cargo.toml @@ -18,7 +18,6 @@ mt = ["library", "cw-multi-test", "anyhow"] [dependencies] anyhow = { workspace = true, optional = true } cosmwasm-schema = { workspace = true } -cosmwasm-std = { workspace = true, features = ["staking"] } cw-multi-test = { workspace = true, optional = true } cw-storage-plus = { workspace = true } cw-utils = { workspace = true } diff --git a/examples/contracts/generic_contract/src/contract.rs b/examples/contracts/generic_contract/src/contract.rs index 2b641522..4a29611c 100644 --- a/examples/contracts/generic_contract/src/contract.rs +++ b/examples/contracts/generic_contract/src/contract.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{Reply, Response, StdResult}; +use sylvia::cw_std::{Reply, Response, StdResult}; use cw_storage_plus::Item; use serde::Deserialize; use sylvia::types::{CustomMsg, ExecCtx, InstantiateCtx, MigrateCtx, QueryCtx, ReplyCtx, SudoCtx}; @@ -9,11 +9,11 @@ use sylvia::entry_points; #[cosmwasm_schema::cw_serde] pub struct SvCustomMsg; -impl cosmwasm_std::CustomMsg for SvCustomMsg {} +impl sylvia::cw_std::CustomMsg for SvCustomMsg {} #[cosmwasm_schema::cw_serde] pub struct SvCustomQuery; -impl cosmwasm_std::CustomQuery for SvCustomQuery {} +impl sylvia::cw_std::CustomQuery for SvCustomQuery {} pub struct GenericContract< InstantiateT, diff --git a/examples/contracts/generic_contract/src/custom_and_generic.rs b/examples/contracts/generic_contract/src/custom_and_generic.rs index 001cb74a..d5195a6b 100644 --- a/examples/contracts/generic_contract/src/custom_and_generic.rs +++ b/examples/contracts/generic_contract/src/custom_and_generic.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{CosmosMsg, Response, StdError, StdResult}; +use sylvia::cw_std::{CosmosMsg, Response, StdError, StdResult}; use custom_and_generic::CustomAndGeneric; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; diff --git a/examples/contracts/generic_contract/src/cw1.rs b/examples/contracts/generic_contract/src/cw1.rs index dc8b2075..5dac9437 100644 --- a/examples/contracts/generic_contract/src/cw1.rs +++ b/examples/contracts/generic_contract/src/cw1.rs @@ -1,5 +1,5 @@ use crate::contract::GenericContract; -use cosmwasm_std::{CosmosMsg, Empty, Response, StdError, StdResult}; +use sylvia::cw_std::{CosmosMsg, Empty, Response, StdError, StdResult}; use cw1::{CanExecuteResp, Cw1}; use sylvia::types::{ExecCtx, QueryCtx}; @@ -54,7 +54,7 @@ impl< mod tests { use crate::contract::sv::mt::CodeId; use crate::contract::{GenericContract, SvCustomMsg, SvCustomQuery}; - use cosmwasm_std::{CosmosMsg, Empty}; + use sylvia::cw_std::{CosmosMsg, Empty}; use cw1::sv::mt::Cw1Proxy; use cw_multi_test::IntoBech32; use sylvia::multitest::App; diff --git a/examples/contracts/generic_contract/src/generic.rs b/examples/contracts/generic_contract/src/generic.rs index 59541e16..f0a466c6 100644 --- a/examples/contracts/generic_contract/src/generic.rs +++ b/examples/contracts/generic_contract/src/generic.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{CosmosMsg, Response, StdError, StdResult}; +use sylvia::cw_std::{CosmosMsg, Response, StdError, StdResult}; use generic::Generic; use serde::Deserialize; use sylvia::types::{CustomMsg, ExecCtx, QueryCtx, SudoCtx}; @@ -34,7 +34,7 @@ impl< FieldT, > where - for<'msg_de> InstantiateT: cosmwasm_std::CustomMsg + Deserialize<'msg_de> + 'msg_de, + for<'msg_de> InstantiateT: sylvia::cw_std::CustomMsg + Deserialize<'msg_de> + 'msg_de, Exec1T: CustomMsg + 'static, Exec2T: CustomMsg + 'static, Exec3T: CustomMsg + 'static, @@ -118,7 +118,7 @@ where mod tests { use crate::contract::sv::mt::CodeId; use crate::contract::{GenericContract, SvCustomMsg, SvCustomQuery}; - use cosmwasm_std::CosmosMsg; + use sylvia::cw_std::CosmosMsg; use cw_multi_test::IntoBech32; use generic::sv::mt::GenericProxy; use sylvia::multitest::App; diff --git a/examples/contracts/generic_iface_on_contract/Cargo.toml b/examples/contracts/generic_iface_on_contract/Cargo.toml index 9476c2ec..4cc7dafc 100644 --- a/examples/contracts/generic_iface_on_contract/Cargo.toml +++ b/examples/contracts/generic_iface_on_contract/Cargo.toml @@ -18,7 +18,6 @@ mt = ["library", "cw-multi-test", "anyhow"] [dependencies] anyhow = { workspace = true, optional = true } cosmwasm-schema = { workspace = true } -cosmwasm-std = { workspace = true, features = ["staking"] } cw-multi-test = { workspace = true, optional = true } cw-storage-plus = { workspace = true } cw-utils = { workspace = true } diff --git a/examples/contracts/generic_iface_on_contract/src/contract.rs b/examples/contracts/generic_iface_on_contract/src/contract.rs index 43f94183..20043bfd 100644 --- a/examples/contracts/generic_iface_on_contract/src/contract.rs +++ b/examples/contracts/generic_iface_on_contract/src/contract.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{Response, StdResult}; +use sylvia::cw_std::{Response, StdResult}; use sylvia::types::InstantiateCtx; use sylvia::{contract, schemars}; @@ -9,11 +9,11 @@ pub struct NonGenericContract; #[cosmwasm_schema::cw_serde] pub struct SvCustomMsg; -impl cosmwasm_std::CustomMsg for SvCustomMsg {} +impl sylvia::cw_std::CustomMsg for SvCustomMsg {} #[cosmwasm_schema::cw_serde] pub struct SvCustomQuery; -impl cosmwasm_std::CustomQuery for SvCustomQuery {} +impl sylvia::cw_std::CustomQuery for SvCustomQuery {} #[cfg_attr(not(feature = "library"), entry_points)] #[contract] @@ -39,7 +39,7 @@ impl NonGenericContract { #[cfg(test)] mod tests { use super::{SvCustomMsg, SvCustomQuery}; - use cosmwasm_std::{CosmosMsg, Empty}; + use sylvia::cw_std::{CosmosMsg, Empty}; use cw_multi_test::IntoBech32; use sylvia::multitest::App; diff --git a/examples/contracts/generic_iface_on_contract/src/custom_and_generic.rs b/examples/contracts/generic_iface_on_contract/src/custom_and_generic.rs index 80c2092b..b79e3fd2 100644 --- a/examples/contracts/generic_iface_on_contract/src/custom_and_generic.rs +++ b/examples/contracts/generic_iface_on_contract/src/custom_and_generic.rs @@ -1,5 +1,5 @@ use crate::contract::{SvCustomMsg, SvCustomQuery}; -use cosmwasm_std::{CosmosMsg, Response, StdError, StdResult}; +use sylvia::cw_std::{CosmosMsg, Response, StdError, StdResult}; use custom_and_generic::CustomAndGeneric; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; diff --git a/examples/contracts/generic_iface_on_contract/src/cw1.rs b/examples/contracts/generic_iface_on_contract/src/cw1.rs index c9cc5a99..1a34aaca 100644 --- a/examples/contracts/generic_iface_on_contract/src/cw1.rs +++ b/examples/contracts/generic_iface_on_contract/src/cw1.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{CosmosMsg, Empty, Response, StdError, StdResult}; +use sylvia::cw_std::{CosmosMsg, Empty, Response, StdError, StdResult}; use cw1::{CanExecuteResp, Cw1}; use sylvia::types::{ExecCtx, QueryCtx}; diff --git a/examples/contracts/generic_iface_on_contract/src/generic.rs b/examples/contracts/generic_iface_on_contract/src/generic.rs index a9e83584..2075de88 100644 --- a/examples/contracts/generic_iface_on_contract/src/generic.rs +++ b/examples/contracts/generic_iface_on_contract/src/generic.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{CosmosMsg, Response, StdError, StdResult}; +use sylvia::cw_std::{CosmosMsg, Response, StdError, StdResult}; use generic::Generic; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; diff --git a/examples/contracts/generics_forwarded/Cargo.toml b/examples/contracts/generics_forwarded/Cargo.toml index 62a01615..8ec6cb18 100644 --- a/examples/contracts/generics_forwarded/Cargo.toml +++ b/examples/contracts/generics_forwarded/Cargo.toml @@ -18,7 +18,6 @@ mt = ["library", "cw-multi-test", "anyhow"] [dependencies] anyhow = { workspace = true, optional = true } cosmwasm-schema = { workspace = true } -cosmwasm-std = { workspace = true, features = ["staking"] } cw-multi-test = { workspace = true, optional = true } cw-storage-plus = { workspace = true } cw-utils = { workspace = true } diff --git a/examples/contracts/generics_forwarded/src/contract.rs b/examples/contracts/generics_forwarded/src/contract.rs index f6ac52dc..0a26b014 100644 --- a/examples/contracts/generics_forwarded/src/contract.rs +++ b/examples/contracts/generics_forwarded/src/contract.rs @@ -1,5 +1,5 @@ use crate::error::ContractError; -use cosmwasm_std::{Reply, Response}; +use sylvia::cw_std::{Reply, Response}; use cw_storage_plus::Item; use serde::Deserialize; use sylvia::types::{ @@ -9,11 +9,11 @@ use sylvia::{contract, schemars}; #[cosmwasm_schema::cw_serde] pub struct SvCustomMsg; -impl cosmwasm_std::CustomMsg for SvCustomMsg {} +impl sylvia::cw_std::CustomMsg for SvCustomMsg {} #[cosmwasm_schema::cw_serde] pub struct SvCustomQuery; -impl cosmwasm_std::CustomQuery for SvCustomQuery {} +impl sylvia::cw_std::CustomQuery for SvCustomQuery {} pub struct GenericsForwardedContract< InstantiateT, @@ -90,7 +90,7 @@ impl< FieldT, > where - for<'msg_de> InstantiateT: cosmwasm_std::CustomMsg + Deserialize<'msg_de> + 'msg_de, + for<'msg_de> InstantiateT: sylvia::cw_std::CustomMsg + Deserialize<'msg_de> + 'msg_de, Exec1T: CustomMsg + 'static, Exec2T: CustomMsg + 'static, Exec3T: CustomMsg + 'static, diff --git a/examples/contracts/generics_forwarded/src/custom_and_generic.rs b/examples/contracts/generics_forwarded/src/custom_and_generic.rs index 2d2996a8..60499267 100644 --- a/examples/contracts/generics_forwarded/src/custom_and_generic.rs +++ b/examples/contracts/generics_forwarded/src/custom_and_generic.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{CosmosMsg, Response}; +use sylvia::cw_std::{CosmosMsg, Response}; use custom_and_generic::CustomAndGeneric; use serde::Deserialize; use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx, SudoCtx}; @@ -39,7 +39,7 @@ impl< FieldT, > where - for<'msg_de> InstantiateT: cosmwasm_std::CustomMsg + Deserialize<'msg_de> + 'msg_de, + for<'msg_de> InstantiateT: sylvia::cw_std::CustomMsg + Deserialize<'msg_de> + 'msg_de, Exec1T: CustomMsg + 'static, Exec2T: CustomMsg + 'static, Exec3T: CustomMsg + 'static, @@ -127,7 +127,7 @@ where mod tests { use crate::contract::sv::mt::CodeId; use crate::contract::{GenericsForwardedContract, SvCustomMsg, SvCustomQuery}; - use cosmwasm_std::CosmosMsg; + use sylvia::cw_std::CosmosMsg; use custom_and_generic::sv::mt::CustomAndGenericProxy; use cw_multi_test::IntoBech32; use sylvia::multitest::App; diff --git a/examples/contracts/generics_forwarded/src/cw1.rs b/examples/contracts/generics_forwarded/src/cw1.rs index f4306463..d87cee5e 100644 --- a/examples/contracts/generics_forwarded/src/cw1.rs +++ b/examples/contracts/generics_forwarded/src/cw1.rs @@ -1,5 +1,5 @@ use cosmwasm_schema::schemars::JsonSchema; -use cosmwasm_std::{CosmosMsg, CustomMsg, Empty, Response, StdResult}; +use sylvia::cw_std::{CosmosMsg, CustomMsg, Empty, Response, StdResult}; use cw1::{CanExecuteResp, Cw1}; use serde::de::DeserializeOwned; use serde::Deserialize; @@ -78,7 +78,7 @@ where mod tests { use crate::contract::sv::mt::CodeId; use crate::contract::{GenericsForwardedContract, SvCustomMsg, SvCustomQuery}; - use cosmwasm_std::{CosmosMsg, Empty}; + use sylvia::cw_std::{CosmosMsg, Empty}; use cw1::sv::mt::Cw1Proxy; use cw_multi_test::IntoBech32; use sylvia::multitest::App; diff --git a/examples/contracts/generics_forwarded/src/error.rs b/examples/contracts/generics_forwarded/src/error.rs index 7155f592..33474c72 100644 --- a/examples/contracts/generics_forwarded/src/error.rs +++ b/examples/contracts/generics_forwarded/src/error.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::StdError; +use sylvia::cw_std::StdError; use thiserror::Error; #[derive(Error, Debug, PartialEq)] diff --git a/examples/contracts/generics_forwarded/src/generic.rs b/examples/contracts/generics_forwarded/src/generic.rs index c5817544..06529fe2 100644 --- a/examples/contracts/generics_forwarded/src/generic.rs +++ b/examples/contracts/generics_forwarded/src/generic.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{CosmosMsg, Response}; +use sylvia::cw_std::{CosmosMsg, Response}; use generic::Generic; use serde::Deserialize; use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx, SudoCtx}; @@ -39,7 +39,7 @@ impl< FieldT, > where - for<'msg_de> InstantiateT: cosmwasm_std::CustomMsg + Deserialize<'msg_de> + 'msg_de, + for<'msg_de> InstantiateT: sylvia::cw_std::CustomMsg + Deserialize<'msg_de> + 'msg_de, Exec1T: CustomMsg + 'static, Exec2T: CustomMsg + 'static, Exec3T: CustomMsg + 'static, @@ -125,7 +125,7 @@ where mod tests { use crate::contract::sv::mt::CodeId; use crate::contract::{GenericsForwardedContract, SvCustomMsg, SvCustomQuery}; - use cosmwasm_std::CosmosMsg; + use sylvia::cw_std::CosmosMsg; use cw_multi_test::IntoBech32; use generic::sv::mt::GenericProxy; use sylvia::multitest::App; diff --git a/examples/interfaces/custom-and-generic/Cargo.toml b/examples/interfaces/custom-and-generic/Cargo.toml index 12a74d81..0c64cdc0 100644 --- a/examples/interfaces/custom-and-generic/Cargo.toml +++ b/examples/interfaces/custom-and-generic/Cargo.toml @@ -12,7 +12,6 @@ homepage = "https://cosmwasm.com" mt = ["sylvia/mt"] [dependencies] -cosmwasm-std = { workspace = true, features = ["staking"] } cosmwasm-schema = { workspace = true } serde = { workspace = true } sylvia = { path = "../../../sylvia" } diff --git a/examples/interfaces/custom-and-generic/src/lib.rs b/examples/interfaces/custom-and-generic/src/lib.rs index 97637a0a..a9eb9eba 100644 --- a/examples/interfaces/custom-and-generic/src/lib.rs +++ b/examples/interfaces/custom-and-generic/src/lib.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{CosmosMsg, Response, StdError}; +use sylvia::cw_std::{CosmosMsg, Response, StdError}; use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx, SudoCtx}; use sylvia::{interface, schemars}; @@ -71,18 +71,18 @@ pub trait CustomAndGeneric { #[cfg(test)] #[allow(deprecated)] mod tests { - use cosmwasm_std::testing::mock_dependencies; - use cosmwasm_std::{Addr, CosmosMsg, Empty, QuerierWrapper}; + use sylvia::cw_std::testing::mock_dependencies; + use sylvia::cw_std::{Addr, CosmosMsg, Empty, QuerierWrapper}; use sylvia::types::InterfaceApi; use crate::sv::Querier; #[cosmwasm_schema::cw_serde] pub struct SvCustomMsg; - impl cosmwasm_std::CustomMsg for SvCustomMsg {} + impl sylvia::cw_std::CustomMsg for SvCustomMsg {} #[cosmwasm_schema::cw_serde] pub struct SvCustomQuery; - impl cosmwasm_std::CustomQuery for SvCustomQuery {} + impl sylvia::cw_std::CustomQuery for SvCustomQuery {} #[test] fn construct_messages() { diff --git a/examples/interfaces/cw1/Cargo.toml b/examples/interfaces/cw1/Cargo.toml index f4fc06e0..62c5abf3 100644 --- a/examples/interfaces/cw1/Cargo.toml +++ b/examples/interfaces/cw1/Cargo.toml @@ -12,7 +12,6 @@ homepage = "https://cosmwasm.com" mt = ["sylvia/mt"] [dependencies] -cosmwasm-std = { workspace = true, features = ["staking"] } cosmwasm-schema = { workspace = true } serde = { workspace = true } sylvia = { path = "../../../sylvia" } diff --git a/examples/interfaces/cw1/src/lib.rs b/examples/interfaces/cw1/src/lib.rs index 1f59e587..51cd0c1f 100644 --- a/examples/interfaces/cw1/src/lib.rs +++ b/examples/interfaces/cw1/src/lib.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{CosmosMsg, Response, StdError, StdResult}; +use sylvia::cw_std::{CosmosMsg, Response, StdError, StdResult}; use serde::{Deserialize, Serialize}; use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx}; use sylvia::{interface, schemars}; @@ -40,7 +40,7 @@ pub trait Cw1 { #[cfg(test)] mod tests { - use cosmwasm_std::{coins, from_json, to_json_binary, BankMsg, Empty}; + use sylvia::cw_std::{coins, from_json, to_json_binary, BankMsg, Empty}; use crate::sv::{Cw1ExecMsg, Cw1QueryMsg}; diff --git a/examples/interfaces/cw20-allowances/Cargo.toml b/examples/interfaces/cw20-allowances/Cargo.toml index 71a177f6..fdedb391 100644 --- a/examples/interfaces/cw20-allowances/Cargo.toml +++ b/examples/interfaces/cw20-allowances/Cargo.toml @@ -12,7 +12,6 @@ homepage = "https://cosmwasm.com" mt = ["sylvia/mt"] [dependencies] -cosmwasm-std = { workspace = true, features = ["staking"] } cosmwasm-schema = { workspace = true } serde = { workspace = true } sylvia = { path = "../../../sylvia" } diff --git a/examples/interfaces/cw20-allowances/src/lib.rs b/examples/interfaces/cw20-allowances/src/lib.rs index 8a7d0219..99a9a7bd 100644 --- a/examples/interfaces/cw20-allowances/src/lib.rs +++ b/examples/interfaces/cw20-allowances/src/lib.rs @@ -1,6 +1,6 @@ pub mod responses; -use cosmwasm_std::{Binary, Response, StdError, StdResult, Uint128}; +use sylvia::cw_std::{Binary, Response, StdError, StdResult, Uint128}; use cw_utils::Expiration; use responses::{ AllAccountsResponse, AllAllowancesResponse, AllSpenderAllowancesResponse, AllowanceResponse, diff --git a/examples/interfaces/cw20-allowances/src/responses.rs b/examples/interfaces/cw20-allowances/src/responses.rs index fa23d5bf..7b5038f8 100644 --- a/examples/interfaces/cw20-allowances/src/responses.rs +++ b/examples/interfaces/cw20-allowances/src/responses.rs @@ -1,5 +1,5 @@ use cosmwasm_schema::cw_serde; -use cosmwasm_std::Uint128; +use sylvia::cw_std::Uint128; use cw_utils::Expiration; use serde::{Deserialize, Serialize}; use sylvia::schemars; diff --git a/examples/interfaces/cw20-marketing/Cargo.toml b/examples/interfaces/cw20-marketing/Cargo.toml index 7c7bb821..76f80da6 100644 --- a/examples/interfaces/cw20-marketing/Cargo.toml +++ b/examples/interfaces/cw20-marketing/Cargo.toml @@ -12,7 +12,6 @@ homepage = "https://cosmwasm.com" mt = ["sylvia/mt"] [dependencies] -cosmwasm-std = { workspace = true, features = ["staking"] } cosmwasm-schema = { workspace = true } serde = { workspace = true } sylvia = { path = "../../../sylvia" } diff --git a/examples/interfaces/cw20-marketing/src/lib.rs b/examples/interfaces/cw20-marketing/src/lib.rs index f0d3d2f1..6a6bf1d6 100644 --- a/examples/interfaces/cw20-marketing/src/lib.rs +++ b/examples/interfaces/cw20-marketing/src/lib.rs @@ -1,7 +1,7 @@ pub mod responses; use cosmwasm_schema::cw_serde; -use cosmwasm_std::{Binary, Response, StdError, StdResult}; +use sylvia::cw_std::{Binary, Response, StdError, StdResult}; use responses::{DownloadLogoResponse, MarketingInfoResponse}; use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx}; use sylvia::{interface, schemars}; diff --git a/examples/interfaces/cw20-marketing/src/responses.rs b/examples/interfaces/cw20-marketing/src/responses.rs index aae3e4cd..047e8b1c 100644 --- a/examples/interfaces/cw20-marketing/src/responses.rs +++ b/examples/interfaces/cw20-marketing/src/responses.rs @@ -1,5 +1,5 @@ use cosmwasm_schema::cw_serde; -use cosmwasm_std::{Addr, Binary}; +use sylvia::cw_std::{Addr, Binary}; use serde::{Deserialize, Serialize}; use sylvia::schemars; diff --git a/examples/interfaces/cw20-minting/Cargo.toml b/examples/interfaces/cw20-minting/Cargo.toml index db11866a..6af6214e 100644 --- a/examples/interfaces/cw20-minting/Cargo.toml +++ b/examples/interfaces/cw20-minting/Cargo.toml @@ -12,7 +12,6 @@ homepage = "https://cosmwasm.com" mt = ["sylvia/mt"] [dependencies] -cosmwasm-std = { workspace = true, features = ["staking"] } cosmwasm-schema = { workspace = true } serde = { workspace = true } sylvia = { path = "../../../sylvia" } diff --git a/examples/interfaces/cw20-minting/src/lib.rs b/examples/interfaces/cw20-minting/src/lib.rs index 405e3a89..816585fd 100644 --- a/examples/interfaces/cw20-minting/src/lib.rs +++ b/examples/interfaces/cw20-minting/src/lib.rs @@ -1,6 +1,6 @@ pub mod responses; -use cosmwasm_std::{Response, StdError, StdResult, Uint128}; +use sylvia::cw_std::{Response, StdError, StdResult, Uint128}; use responses::MinterResponse; use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx}; use sylvia::{interface, schemars}; diff --git a/examples/interfaces/cw20-minting/src/responses.rs b/examples/interfaces/cw20-minting/src/responses.rs index ac01e235..7dbe3e5c 100644 --- a/examples/interfaces/cw20-minting/src/responses.rs +++ b/examples/interfaces/cw20-minting/src/responses.rs @@ -1,5 +1,5 @@ use cosmwasm_schema::cw_serde; -use cosmwasm_std::Uint128; +use sylvia::cw_std::Uint128; #[cw_serde] pub struct MinterResponse { diff --git a/examples/interfaces/cw4/Cargo.toml b/examples/interfaces/cw4/Cargo.toml index 1e849017..bd71a508 100644 --- a/examples/interfaces/cw4/Cargo.toml +++ b/examples/interfaces/cw4/Cargo.toml @@ -12,7 +12,6 @@ homepage = "https://cosmwasm.com" mt = ["sylvia/mt"] [dependencies] -cosmwasm-std = { workspace = true, features = ["staking"] } cosmwasm-schema = { workspace = true } serde = { workspace = true } sylvia = { path = "../../../sylvia" } diff --git a/examples/interfaces/cw4/src/lib.rs b/examples/interfaces/cw4/src/lib.rs index b4c4ecbb..ba53ab08 100644 --- a/examples/interfaces/cw4/src/lib.rs +++ b/examples/interfaces/cw4/src/lib.rs @@ -1,6 +1,6 @@ pub mod responses; -use cosmwasm_std::{Response, StdError}; +use sylvia::cw_std::{Response, StdError}; use responses::{ AdminResponse, HooksResponse, MemberListResponse, MemberResponse, TotalWeightResponse, }; @@ -69,7 +69,7 @@ pub trait Cw4 { #[cfg(test)] mod tests { - use cosmwasm_std::{from_json, to_json_binary}; + use sylvia::cw_std::{from_json, to_json_binary}; use super::sv::*; diff --git a/examples/interfaces/generic/Cargo.toml b/examples/interfaces/generic/Cargo.toml index cfb9eb30..8cd1f362 100644 --- a/examples/interfaces/generic/Cargo.toml +++ b/examples/interfaces/generic/Cargo.toml @@ -12,7 +12,6 @@ homepage = "https://cosmwasm.com" mt = ["sylvia/mt"] [dependencies] -cosmwasm-std = { workspace = true, features = ["staking"] } cosmwasm-schema = { workspace = true } serde = { workspace = true } sylvia = { path = "../../../sylvia" } diff --git a/examples/interfaces/generic/src/lib.rs b/examples/interfaces/generic/src/lib.rs index b2e1dc3e..ed450f11 100644 --- a/examples/interfaces/generic/src/lib.rs +++ b/examples/interfaces/generic/src/lib.rs @@ -1,10 +1,10 @@ -use cosmwasm_std::{CosmosMsg, Response, StdError}; +use sylvia::cw_std::{CosmosMsg, Response, StdError}; use sylvia::types::{CustomMsg, ExecCtx, QueryCtx, SudoCtx}; use sylvia::{interface, schemars}; #[interface] -#[sv::custom(msg=cosmwasm_std::Empty, query=cosmwasm_std::Empty)] +#[sv::custom(msg=sylvia::cw_std::Empty, query=sylvia::cw_std::Empty)] pub trait Generic { type Error: From; type Exec1T: CustomMsg; @@ -70,15 +70,15 @@ pub trait Generic { #[cfg(test)] #[allow(deprecated)] mod tests { - use cosmwasm_std::testing::mock_dependencies; - use cosmwasm_std::{Addr, CosmosMsg, Empty, QuerierWrapper}; + use sylvia::cw_std::testing::mock_dependencies; + use sylvia::cw_std::{Addr, CosmosMsg, Empty, QuerierWrapper}; use sylvia::types::InterfaceApi; use crate::sv::Querier; #[cosmwasm_schema::cw_serde] pub struct SvCustomMsg; - impl cosmwasm_std::CustomMsg for SvCustomMsg {} + impl sylvia::cw_std::CustomMsg for SvCustomMsg {} #[test] fn construct_messages() { @@ -282,7 +282,7 @@ mod tests { SvCustomMsg, SvCustomMsg, SvCustomMsg, - cosmwasm_std::Empty, + sylvia::cw_std::Empty, > as InterfaceApi>::Exec::generic_exec_one( vec![CosmosMsg::Custom(SvCustomMsg {})], vec![CosmosMsg::Custom(SvCustomMsg {})], @@ -295,7 +295,7 @@ mod tests { SvCustomMsg, SvCustomMsg, SvCustomMsg, - cosmwasm_std::Empty, + sylvia::cw_std::Empty, SvCustomMsg, SvCustomMsg, SvCustomMsg, @@ -314,7 +314,7 @@ mod tests { _, _, SvCustomMsg, - cosmwasm_std::Empty, + sylvia::cw_std::Empty, > as InterfaceApi>::Sudo::generic_sudo_one( CosmosMsg::Custom(SvCustomMsg {}), CosmosMsg::Custom(SvCustomMsg {}), @@ -325,7 +325,7 @@ mod tests { SvCustomMsg, SvCustomMsg, SvCustomMsg, - cosmwasm_std::Empty, + sylvia::cw_std::Empty, SvCustomMsg, SvCustomMsg, _, diff --git a/examples/interfaces/whitelist/Cargo.toml b/examples/interfaces/whitelist/Cargo.toml index 3bcee9f9..50bf6f80 100644 --- a/examples/interfaces/whitelist/Cargo.toml +++ b/examples/interfaces/whitelist/Cargo.toml @@ -12,7 +12,6 @@ homepage = "https://cosmwasm.com" mt = ["sylvia/mt"] [dependencies] -cosmwasm-std = { workspace = true, features = ["staking"] } cosmwasm-schema = { workspace = true } serde = { workspace = true } sylvia = { path = "../../../sylvia" } diff --git a/examples/interfaces/whitelist/src/lib.rs b/examples/interfaces/whitelist/src/lib.rs index 58bdf102..c0b77509 100644 --- a/examples/interfaces/whitelist/src/lib.rs +++ b/examples/interfaces/whitelist/src/lib.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{Response, StdError, StdResult}; +use sylvia::cw_std::{Response, StdError, StdResult}; use responses::AdminListResponse; use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx}; use sylvia::{interface, schemars}; @@ -27,7 +27,7 @@ pub trait Whitelist { #[cfg(test)] mod tests { - use cosmwasm_std::{from_json, to_json_binary}; + use sylvia::cw_std::{from_json, to_json_binary}; use super::*; diff --git a/sylvia-derive/src/entry_points.rs b/sylvia-derive/src/entry_points.rs index 915dfe9f..33544c59 100644 --- a/sylvia-derive/src/entry_points.rs +++ b/sylvia-derive/src/entry_points.rs @@ -209,8 +209,10 @@ impl<'a> EntryPoints<'a> { }, }; + let cw_std = quote! { #sylvia ::cw_std }.to_string(); + quote! { - #[#sylvia ::cw_std::entry_point] + #[#sylvia ::cw_std::entry_point(crate = #cw_std )] pub fn #ep_name ( #params , #msg diff --git a/sylvia/tests/api.rs b/sylvia/tests/api.rs index 5e441515..c89d162e 100644 --- a/sylvia/tests/api.rs +++ b/sylvia/tests/api.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{Response, StdResult}; +use sylvia::cw_std::{Response, StdResult}; use std::marker::PhantomData; use sylvia::types::{ @@ -66,16 +66,16 @@ where mod tests { use crate::SomeContract; use cosmwasm_schema::cw_serde; - use cosmwasm_std::testing::mock_dependencies; - use cosmwasm_std::{Addr, QuerierWrapper}; + use sylvia::cw_std::testing::mock_dependencies; + use sylvia::cw_std::{Addr, QuerierWrapper}; use sylvia::types::ContractApi; #[cw_serde] pub struct SvCustomMsg; - impl cosmwasm_std::CustomMsg for SvCustomMsg {} + impl sylvia::cw_std::CustomMsg for SvCustomMsg {} #[cw_serde] pub struct SvCustomQuery; - impl cosmwasm_std::CustomQuery for SvCustomQuery {} + impl sylvia::cw_std::CustomQuery for SvCustomQuery {} pub type ConcreteContract = SomeContract< SvCustomMsg, diff --git a/sylvia/tests/custom_msg.rs b/sylvia/tests/custom_msg.rs index 3d00c61d..616c7b4a 100644 --- a/sylvia/tests/custom_msg.rs +++ b/sylvia/tests/custom_msg.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{CustomMsg, Response, StdResult}; +use sylvia::cw_std::{CustomMsg, Response, StdResult}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use sylvia::types::{ExecCtx, InstantiateCtx, MigrateCtx, QueryCtx, SudoCtx}; @@ -20,14 +20,14 @@ pub struct MyContract; pub struct SomeResponse; mod some_interface { - use cosmwasm_std::{Response, StdError, StdResult}; + use sylvia::cw_std::{Response, StdError, StdResult}; use sylvia::interface; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; use crate::{MyMsg, SomeResponse}; #[interface] - #[sv::custom(msg=MyMsg, query=cosmwasm_std::Empty)] + #[sv::custom(msg=MyMsg, query=sylvia::cw_std::Empty)] pub trait SomeInterface { type Error: From; @@ -43,7 +43,7 @@ mod some_interface { } mod impl_some_interface { - use cosmwasm_std::{Response, StdError, StdResult}; + use sylvia::cw_std::{Response, StdError, StdResult}; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; use crate::some_interface::SomeInterface; @@ -69,12 +69,12 @@ mod impl_some_interface { // Use `#[sv::custom(..)]` if both it and associated type defined mod interface { use crate::MyMsg; - use cosmwasm_std::{CustomMsg, Response, StdError, StdResult}; + use sylvia::cw_std::{CustomMsg, Response, StdError, StdResult}; use sylvia::interface; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; #[interface] - #[sv::custom(msg=MyMsg, query=cosmwasm_std::Empty)] + #[sv::custom(msg=MyMsg, query=sylvia::cw_std::Empty)] pub trait Interface { type Error: From; type ExecC: CustomMsg; @@ -92,7 +92,7 @@ mod interface { mod impl_interface { use crate::interface::Interface; use crate::{MyMsg, OtherMsg}; - use cosmwasm_std::{Response, StdError, StdResult}; + use sylvia::cw_std::{Response, StdError, StdResult}; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; impl Interface for crate::MyContract { @@ -114,12 +114,12 @@ mod impl_interface { } mod other_interface { - use cosmwasm_std::{Response, StdError, StdResult}; + use sylvia::cw_std::{Response, StdError, StdResult}; use sylvia::interface; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; #[interface] - #[sv::custom(msg=cosmwasm_std::Empty, query=cosmwasm_std::Empty)] + #[sv::custom(msg=sylvia::cw_std::Empty, query=sylvia::cw_std::Empty)] pub trait OtherInterface { type Error: From; @@ -135,7 +135,7 @@ mod other_interface { } mod impl_other_interface { use crate::other_interface::OtherInterface; - use cosmwasm_std::{Response, StdError, StdResult}; + use sylvia::cw_std::{Response, StdError, StdResult}; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; impl OtherInterface for crate::MyContract { @@ -157,12 +157,12 @@ mod impl_other_interface { mod associated_interface { use crate::SomeResponse; - use cosmwasm_std::{CustomMsg, Response, StdError, StdResult}; + use sylvia::cw_std::{CustomMsg, Response, StdError, StdResult}; use sylvia::interface; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; #[interface] - #[sv::custom(query=cosmwasm_std::Empty)] + #[sv::custom(query=sylvia::cw_std::Empty)] pub trait AssociatedInterface { type Error: From; type ExecC: CustomMsg; @@ -180,7 +180,7 @@ mod associated_interface { mod impl_associated_interface { use crate::associated_interface::AssociatedInterface; use crate::{MyMsg, SomeResponse}; - use cosmwasm_std::{Response, StdError, StdResult}; + use sylvia::cw_std::{Response, StdError, StdResult}; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; impl AssociatedInterface for crate::MyContract { @@ -248,7 +248,7 @@ mod tests { use crate::some_interface::sv::mt::SomeInterfaceProxy; use crate::sv::mt::MyContractProxy; use crate::{MyContract, MyMsg}; - use cosmwasm_std::Addr; + use sylvia::cw_std::Addr; use cw_multi_test::IntoBech32; use sylvia::multitest::App; diff --git a/sylvia/tests/custom_query.rs b/sylvia/tests/custom_query.rs index 53a9b20a..5bd65252 100644 --- a/sylvia/tests/custom_query.rs +++ b/sylvia/tests/custom_query.rs @@ -1,5 +1,5 @@ use cosmwasm_schema::cw_serde; -use cosmwasm_std::{CustomQuery, Response, StdResult}; +use sylvia::cw_std::{CustomQuery, Response, StdResult}; use sylvia::types::{ExecCtx, InstantiateCtx, MigrateCtx, QueryCtx, SudoCtx}; use sylvia::{contract, entry_points}; @@ -19,14 +19,14 @@ pub struct MyContract; pub struct SomeResponse; mod interface { - use cosmwasm_std::{CustomQuery, Response, StdError, StdResult}; + use sylvia::cw_std::{CustomQuery, Response, StdError, StdResult}; use sylvia::interface; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; use crate::{MyQuery, SomeResponse}; #[interface] - #[sv::custom(query=MyQuery, msg=cosmwasm_std::Empty)] + #[sv::custom(query=MyQuery, msg=sylvia::cw_std::Empty)] pub trait Interface { type Error: From; type QueryC: CustomQuery; @@ -43,7 +43,7 @@ mod interface { } mod impl_interface { - use cosmwasm_std::{Response, StdError, StdResult}; + use sylvia::cw_std::{Response, StdError, StdResult}; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; use crate::{MyQuery, OtherQuery, SomeResponse}; @@ -67,14 +67,14 @@ mod impl_interface { } mod some_interface { - use cosmwasm_std::{Response, StdError, StdResult}; + use sylvia::cw_std::{Response, StdError, StdResult}; use sylvia::interface; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; use crate::{MyQuery, SomeResponse}; #[interface] - #[sv::custom(query=MyQuery, msg=cosmwasm_std::Empty)] + #[sv::custom(query=MyQuery, msg=sylvia::cw_std::Empty)] pub trait SomeInterface { type Error: From; @@ -90,7 +90,7 @@ mod some_interface { } mod impl_some_interface { - use cosmwasm_std::{Response, StdError, StdResult}; + use sylvia::cw_std::{Response, StdError, StdResult}; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; use crate::{MyQuery, SomeResponse}; @@ -113,14 +113,14 @@ mod impl_some_interface { } mod associated_type_interface { - use cosmwasm_std::{CustomQuery, Response, StdError, StdResult}; + use sylvia::cw_std::{CustomQuery, Response, StdError, StdResult}; use sylvia::interface; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; use crate::SomeResponse; #[interface] - #[sv::custom(msg=cosmwasm_std::Empty)] + #[sv::custom(msg=sylvia::cw_std::Empty)] pub trait AssociatedTypeInterface { type Error: From; type QueryC: CustomQuery; @@ -139,7 +139,7 @@ mod associated_type_interface { mod impl_associated_type_interface { use crate::associated_type_interface::AssociatedTypeInterface; use crate::{MyQuery, SomeResponse}; - use cosmwasm_std::{Response, StdError, StdResult}; + use sylvia::cw_std::{Response, StdError, StdResult}; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; impl AssociatedTypeInterface for crate::MyContract { @@ -161,14 +161,14 @@ mod impl_associated_type_interface { } mod default_query_interface { - use cosmwasm_std::{Response, StdError, StdResult}; + use sylvia::cw_std::{Response, StdError, StdResult}; use sylvia::interface; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; use crate::SomeResponse; #[interface] - #[sv::custom(msg=cosmwasm_std::Empty, query=cosmwasm_std::Empty)] + #[sv::custom(msg=sylvia::cw_std::Empty, query=sylvia::cw_std::Empty)] pub trait DefaultQueryInterface { type Error: From; @@ -186,7 +186,7 @@ mod default_query_interface { mod impl_default_query_interface { use crate::default_query_interface::DefaultQueryInterface; use crate::SomeResponse; - use cosmwasm_std::{Response, StdError, StdResult}; + use sylvia::cw_std::{Response, StdError, StdResult}; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; impl DefaultQueryInterface for crate::MyContract { @@ -254,7 +254,7 @@ mod tests { use crate::sv::mt::MyContractProxy; use crate::{MyContract, MyQuery}; - use cosmwasm_std::{Addr, Empty}; + use sylvia::cw_std::{Addr, Empty}; use cw_multi_test::IntoBech32; use sylvia::multitest::App; diff --git a/sylvia/tests/dispatching.rs b/sylvia/tests/dispatching.rs index 6db6b038..4de6e31a 100644 --- a/sylvia/tests/dispatching.rs +++ b/sylvia/tests/dispatching.rs @@ -1,5 +1,5 @@ -use cosmwasm_std::testing::{message_info, mock_dependencies, mock_env}; -use cosmwasm_std::{from_json, Addr, Decimal, Response}; +use sylvia::cw_std::testing::{message_info, mock_dependencies, mock_env}; +use sylvia::cw_std::{from_json, Addr, Decimal, Response}; use cw_multi_test::IntoAddr; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; @@ -18,14 +18,14 @@ pub struct QueryResponse { } mod interface { - use cosmwasm_std::{Addr, Decimal, Response, StdError}; + use sylvia::cw_std::{Addr, Decimal, Response, StdError}; use sylvia::interface; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; use crate::{EmptyQueryResponse, QueryResponse}; #[interface] - #[sv::custom(msg=cosmwasm_std::Empty, query=cosmwasm_std::Empty)] + #[sv::custom(msg=sylvia::cw_std::Empty, query=sylvia::cw_std::Empty)] pub trait Interface { type Error: From; @@ -57,7 +57,7 @@ mod interface { } mod impl_interface { - use cosmwasm_std::{Addr, Decimal, Response, StdError}; + use sylvia::cw_std::{Addr, Decimal, Response, StdError}; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; use crate::{EmptyQueryResponse, QueryResponse}; @@ -126,7 +126,7 @@ mod impl_interface { mod contract { use std::cell::RefCell; - use cosmwasm_std::{Addr, Response, StdError, StdResult}; + use sylvia::cw_std::{Addr, Response, StdError, StdResult}; use cw_storage_plus::{Item, Map}; use sylvia::types::{InstantiateCtx, SudoCtx}; use sylvia_derive::{contract, entry_points}; diff --git a/sylvia/tests/entry_points.rs b/sylvia/tests/entry_points.rs index 27332b0f..d31677ff 100644 --- a/sylvia/tests/entry_points.rs +++ b/sylvia/tests/entry_points.rs @@ -8,7 +8,7 @@ pub struct CountResponse { pub mod sudo { use cosmwasm_schema::cw_serde; - use cosmwasm_std::{Coin, DepsMut, Env, Response, StdError, StdResult}; + use sylvia::cw_std::{Coin, DepsMut, Env, Response, StdError, StdResult}; use sylvia::types::SudoCtx; #[cw_serde] @@ -61,7 +61,7 @@ pub mod migrate { pub mod exec { use cosmwasm_schema::cw_serde; - use cosmwasm_std::{DepsMut, Env, MessageInfo, Response, StdError, StdResult}; + use sylvia::cw_std::{DepsMut, Env, MessageInfo, Response, StdError, StdResult}; use sylvia::types::ExecCtx; use crate::contract::Contract; @@ -99,7 +99,7 @@ pub mod exec { } pub mod entry_points { - use cosmwasm_std::{entry_point, DepsMut, Env, MessageInfo, Response, StdError, StdResult}; + use sylvia::cw_std::{entry_point, DepsMut, Env, MessageInfo, Response, StdError, StdResult}; use crate::contract::Contract; use crate::exec::CustomExecMsg; @@ -133,7 +133,7 @@ pub mod entry_points { } mod contract { - use cosmwasm_std::{Response, StdError, StdResult}; + use sylvia::cw_std::{Response, StdError, StdResult}; use cw_storage_plus::Item; use sylvia::types::{ExecCtx, InstantiateCtx, MigrateCtx, QueryCtx, SudoCtx}; use sylvia::{contract, entry_points}; @@ -212,7 +212,7 @@ mod contract { #[cfg(all(test, feature = "mt"))] mod tests { - use cosmwasm_std::Addr; + use sylvia::cw_std::Addr; use cw_multi_test::{Executor, IntoBech32}; use sylvia::multitest::App; diff --git a/sylvia/tests/executor.rs b/sylvia/tests/executor.rs index 712bdc7c..d13ffd8d 100644 --- a/sylvia/tests/executor.rs +++ b/sylvia/tests/executor.rs @@ -1,6 +1,6 @@ #![cfg(feature = "mt")] -use cosmwasm_std::{Addr, Response, StdResult}; +use sylvia::cw_std::{Addr, Response, StdResult}; use cw_storage_plus::Item; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; @@ -13,14 +13,14 @@ pub struct CountResponse { } pub mod counter { - use cosmwasm_std::{Response, StdError, StdResult}; + use sylvia::cw_std::{Response, StdError, StdResult}; use sylvia::interface; use sylvia::types::{ExecCtx, QueryCtx}; use crate::CountResponse; #[interface] - #[sv::custom(msg=cosmwasm_std::Empty, query=cosmwasm_std::Empty)] + #[sv::custom(msg=sylvia::cw_std::Empty, query=sylvia::cw_std::Empty)] pub trait Counter { type Error: From; @@ -32,7 +32,7 @@ pub mod counter { } } -use cosmwasm_std::StdError; +use sylvia::cw_std::StdError; use counter::sv::Executor as InterfaceExecutor; use counter::Counter; use sv::Executor as ContractExecutor; @@ -114,7 +114,7 @@ impl CounterContract { #[cfg(test)] mod tests { - use cosmwasm_std::Addr; + use sylvia::cw_std::Addr; use cw_multi_test::IntoBech32; use sylvia::multitest::App; diff --git a/sylvia/tests/interface_impl.rs b/sylvia/tests/interface_impl.rs index ac638f8e..aa45a827 100644 --- a/sylvia/tests/interface_impl.rs +++ b/sylvia/tests/interface_impl.rs @@ -1,9 +1,9 @@ -use cosmwasm_std::{Empty, Response, StdError, StdResult}; +use sylvia::cw_std::{Empty, Response, StdError, StdResult}; use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, InstantiateCtx, QueryCtx, SudoCtx}; use sylvia::{contract, entry_points}; mod interface1 { - use cosmwasm_std::{Response, StdError, StdResult}; + use sylvia::cw_std::{Response, StdError, StdResult}; use sylvia::interface; use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx, SudoCtx}; @@ -34,7 +34,7 @@ mod interface1 { } mod interface2 { - use cosmwasm_std::{Response, StdError, StdResult}; + use sylvia::cw_std::{Response, StdError, StdResult}; use sylvia::interface; use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx, SudoCtx}; diff --git a/sylvia/tests/messages_generation.rs b/sylvia/tests/messages_generation.rs index 556f7f51..fe7cbb22 100644 --- a/sylvia/tests/messages_generation.rs +++ b/sylvia/tests/messages_generation.rs @@ -2,7 +2,7 @@ use std::fmt::Debug; use std::str::FromStr; use contract::sv::{ExecMsg, InstantiateMsg, MigrateMsg, QueryMsg, SudoMsg}; -use cosmwasm_std::{from_json, Addr, CustomQuery, Decimal}; +use sylvia::cw_std::{from_json, Addr, CustomQuery, Decimal}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; @@ -17,7 +17,7 @@ pub struct MyQuery; impl CustomQuery for MyQuery {} pub mod interface { - use cosmwasm_std::{Addr, Decimal, Response, StdError}; + use sylvia::cw_std::{Addr, Decimal, Response, StdError}; use sylvia::interface; use sylvia::types::{ExecCtx, QueryCtx, SudoCtx}; use thiserror::Error; @@ -28,7 +28,7 @@ pub mod interface { #[sv::msg_attr(exec, derive(PartialOrd, Error))] #[sv::msg_attr(query, derive(PartialOrd, Error))] #[sv::msg_attr(sudo, derive(PartialOrd, Error))] - #[sv::custom(msg=cosmwasm_std::Empty, query=cosmwasm_std::Empty)] + #[sv::custom(msg=sylvia::cw_std::Empty, query=sylvia::cw_std::Empty)] pub trait Interface { type Error: From; @@ -65,7 +65,7 @@ pub mod interface { } mod contract { - use cosmwasm_std::{Addr, Reply, Response, StdResult}; + use sylvia::cw_std::{Addr, Reply, Response, StdResult}; use sylvia::contract; use sylvia::types::{ExecCtx, InstantiateCtx, MigrateCtx, QueryCtx, ReplyCtx, SudoCtx}; use sylvia_derive::entry_points; @@ -122,8 +122,8 @@ mod contract { fn argumented_execution( &self, _ctx: ExecCtx, - _addr: cosmwasm_std::Addr, - #[serde(default)] _coef: cosmwasm_std::Decimal, + _addr: sylvia::cw_std::Addr, + #[serde(default)] _coef: sylvia::cw_std::Decimal, #[serde(default)] _desc: String, ) -> StdResult { Ok(Response::new()) diff --git a/sylvia/tests/multitest.rs b/sylvia/tests/multitest.rs index 166067ea..8c3b8c83 100644 --- a/sylvia/tests/multitest.rs +++ b/sylvia/tests/multitest.rs @@ -1,6 +1,6 @@ #![cfg(feature = "mt")] -use cosmwasm_std::{CodeInfoResponse, Empty, Response, StdResult}; +use sylvia::cw_std::{CodeInfoResponse, Empty, Response, StdResult}; use cw_multi_test::IntoBech32; use std::marker::PhantomData; use sylvia::entry_points; diff --git a/sylvia/tests/querier.rs b/sylvia/tests/querier.rs index cd48971a..7a8b0274 100644 --- a/sylvia/tests/querier.rs +++ b/sylvia/tests/querier.rs @@ -1,6 +1,6 @@ #![cfg(feature = "mt")] -use cosmwasm_std::{Addr, Response, StdResult}; +use sylvia::cw_std::{Addr, Response, StdResult}; use cw_storage_plus::Item; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; @@ -13,14 +13,14 @@ pub struct CountResponse { } pub mod counter { - use cosmwasm_std::{Response, StdError, StdResult}; + use sylvia::cw_std::{Response, StdError, StdResult}; use sylvia::interface; use sylvia::types::{ExecCtx, QueryCtx}; use crate::CountResponse; #[interface] - #[sv::custom(msg=cosmwasm_std::Empty, query=cosmwasm_std::Empty)] + #[sv::custom(msg=sylvia::cw_std::Empty, query=sylvia::cw_std::Empty)] pub trait Counter { type Error: From; @@ -42,7 +42,7 @@ pub mod impl_counter { use crate::counter::sv::Querier; use crate::counter::Counter; use crate::CountResponse; - use cosmwasm_std::{Response, StdError, StdResult}; + use sylvia::cw_std::{Response, StdError, StdResult}; use sylvia::types::{ExecCtx, QueryCtx}; impl Counter for super::CounterContract { @@ -116,8 +116,8 @@ impl CounterContract { #[cfg(test)] mod tests { - use cosmwasm_std::testing::mock_dependencies; - use cosmwasm_std::{Addr, Empty, QuerierWrapper}; + use sylvia::cw_std::testing::mock_dependencies; + use sylvia::cw_std::{Addr, Empty, QuerierWrapper}; use cw_multi_test::IntoBech32; use sylvia::multitest::App; diff --git a/sylvia/tests/query_returns.rs b/sylvia/tests/query_returns.rs index 85430598..6cfd5e1b 100644 --- a/sylvia/tests/query_returns.rs +++ b/sylvia/tests/query_returns.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{Response, StdError, StdResult}; +use sylvia::cw_std::{Response, StdError, StdResult}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; @@ -18,14 +18,14 @@ pub struct QueryResponse; type QueryResult = Result; pub mod msg { - use cosmwasm_std::StdError; + use sylvia::cw_std::StdError; use sylvia::interface; use sylvia::types::QueryCtx; use crate::{QueryResponse, QueryResult}; #[interface(module=msg)] - #[sv::custom(msg=cosmwasm_std::Empty, query=cosmwasm_std::Empty)] + #[sv::custom(msg=sylvia::cw_std::Empty, query=sylvia::cw_std::Empty)] pub trait Interface { type Error: From; diff --git a/sylvia/tests/remote.rs b/sylvia/tests/remote.rs index 2da8e309..c24e0fbf 100644 --- a/sylvia/tests/remote.rs +++ b/sylvia/tests/remote.rs @@ -1,19 +1,19 @@ use cosmwasm_schema::cw_serde; -use cosmwasm_std::{Addr, StdError}; +use sylvia::cw_std::{Addr, StdError}; use serde::de::DeserializeOwned; use serde::{Deserialize, Serialize}; use sylvia::types::Remote; #[cw_serde] pub struct ExampleMsg; -impl cosmwasm_std::CustomMsg for ExampleMsg {} +impl sylvia::cw_std::CustomMsg for ExampleMsg {} #[cw_serde] pub struct ExampleQuery; -impl cosmwasm_std::CustomQuery for ExampleQuery {} +impl sylvia::cw_std::CustomQuery for ExampleQuery {} pub mod counter { - use cosmwasm_std::{Response, StdError}; + use sylvia::cw_std::{Response, StdError}; use serde::de::DeserializeOwned; use serde::Serialize; use sylvia::interface; @@ -39,7 +39,7 @@ pub mod counter { } pub mod signed_contract { - use cosmwasm_std::{Response, StdError, StdResult}; + use sylvia::cw_std::{Response, StdError, StdResult}; use cw_storage_plus::Item; use sylvia::contract; use sylvia::types::{ExecCtx, InstantiateCtx, QueryCtx}; @@ -98,7 +98,7 @@ pub mod signed_contract { } pub mod unsigned_contract { - use cosmwasm_std::{Response, StdError, StdResult}; + use sylvia::cw_std::{Response, StdError, StdResult}; use cw_storage_plus::Item; use sylvia::contract; use sylvia::types::{ExecCtx, InstantiateCtx, QueryCtx}; @@ -188,7 +188,7 @@ where } pub mod manager { - use cosmwasm_std::{Addr, Response, StdError, StdResult}; + use sylvia::cw_std::{Addr, Response, StdError, StdResult}; use cw_storage_plus::Item; use schemars::JsonSchema; use serde::de::DeserializeOwned; @@ -262,7 +262,7 @@ pub mod manager { #[cfg(test)] mod tests { - use cosmwasm_std::{Addr, StdError}; + use sylvia::cw_std::{Addr, StdError}; use cw_multi_test::{BasicApp, IntoBech32}; use sylvia::multitest::{App, Proxy}; use sylvia::types::Remote;