Skip to content

Commit

Permalink
feat: Make user side cosmwasm-std dep obsolete
Browse files Browse the repository at this point in the history
Provide path to sylvia exposed cw_std dependency in entry_point macro
  • Loading branch information
jawoznia committed Aug 23, 2024
1 parent fdaf07a commit 84ad79d
Show file tree
Hide file tree
Showing 92 changed files with 207 additions and 247 deletions.
71 changes: 23 additions & 48 deletions examples/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
1 change: 0 additions & 1 deletion examples/contracts/custom/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion examples/contracts/custom/src/contract.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
2 changes: 1 addition & 1 deletion examples/contracts/custom/src/cw1.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down
2 changes: 1 addition & 1 deletion examples/contracts/custom/src/messages.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion examples/contracts/custom/src/multitest/custom_module.rs
Original file line number Diff line number Diff line change
@@ -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,
};
Expand Down
4 changes: 2 additions & 2 deletions examples/contracts/custom/src/multitest/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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();

Expand Down
1 change: 0 additions & 1 deletion examples/contracts/cw1-subkeys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion examples/contracts/cw1-subkeys/src/bin/schema.rs
Original file line number Diff line number Diff line change
@@ -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))]
Expand Down
2 changes: 1 addition & 1 deletion examples/contracts/cw1-subkeys/src/contract.rs
Original file line number Diff line number Diff line change
@@ -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,
};
Expand Down
2 changes: 1 addition & 1 deletion examples/contracts/cw1-subkeys/src/cw1.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down
2 changes: 1 addition & 1 deletion examples/contracts/cw1-subkeys/src/error.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions examples/contracts/cw1-subkeys/src/multitest/tests.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down Expand Up @@ -382,7 +382,7 @@ mod permissions {
}

mod cw1_execute {
use cosmwasm_std::BankMsg;
use sylvia::cw_std::BankMsg;

use super::*;

Expand Down
Loading

0 comments on commit 84ad79d

Please sign in to comment.