Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to cosmwasm 1.0.0-soon #441

Merged
merged 6 commits into from
Sep 20, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
221 changes: 90 additions & 131 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions contracts/cw1-subkeys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ cw0 = { path = "../../packages/cw0", version = "0.9.0" }
cw1 = { path = "../../packages/cw1", version = "0.9.0" }
cw2 = { path = "../../packages/cw2", version = "0.9.0" }
cw1-whitelist = { path = "../cw1-whitelist", version = "0.9.0", features = ["library"] }
cosmwasm-std = { version = "0.16.0", features = ["staking"] }
cosmwasm-std = { version = "1.0.0-soon", features = ["staking"] }
cw-storage-plus = { path = "../../packages/storage-plus", version = "0.9.0" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.23" }

[dev-dependencies]
cosmwasm-schema = { version = "0.16.0" }
cosmwasm-schema = { version = "1.0.0-soon" }
cw1-whitelist = { path = "../cw1-whitelist", version = "0.9.0", features = ["library", "test-utils"] }
6 changes: 3 additions & 3 deletions contracts/cw1-whitelist/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test-utils = []
cw0 = { path = "../../packages/cw0", version = "0.9.0" }
cw1 = { path = "../../packages/cw1", version = "0.9.0" }
cw2 = { path = "../../packages/cw2", version = "0.9.0" }
cosmwasm-std = { version = "0.16.0", features = ["staking"] }
cosmwasm-std = { version = "1.0.0-soon", features = ["staking"] }
cw-storage-plus = { path = "../../packages/storage-plus", version = "0.9.0" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
Expand All @@ -31,6 +31,6 @@ thiserror = { version = "1.0.23" }
[dev-dependencies]
anyhow = "1"
assert_matches = "1"
cosmwasm-schema = { version = "0.16.0" }
cw-multi-test = "0.8.1"
cosmwasm-schema = { version = "1.0.0-soon" }
cw-multi-test = { path = "../../packages/multi-test", version = "0.9.0" }
derivative = "2"
10 changes: 2 additions & 8 deletions contracts/cw1-whitelist/src/integration_tests.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
use crate::msg::{AdminListResponse, ExecuteMsg, InstantiateMsg, QueryMsg};
use anyhow::{anyhow, Result};
use assert_matches::assert_matches;
use cosmwasm_std::testing::{mock_env, MockApi, MockStorage};
use cosmwasm_std::{to_binary, Addr, CosmosMsg, Empty, QueryRequest, StdError, WasmMsg, WasmQuery};
use cw1::Cw1Contract;
use cw_multi_test::{App, AppResponse, BankKeeper, Contract, ContractWrapper, Executor};
use cw_multi_test::{App, AppResponse, Contract, ContractWrapper, Executor};
use derivative::Derivative;
use serde::{de::DeserializeOwned, Serialize};

fn mock_app() -> App {
let env = mock_env();
let api = MockApi::default();
let bank = BankKeeper::new();
let storage = MockStorage::new();

App::new(api, env.block, bank, storage)
App::default()
}

fn contract_cw1() -> Box<dyn Contract<Empty>> {
Expand Down
4 changes: 2 additions & 2 deletions contracts/cw1155-base/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ cw0 = { path = "../../packages/cw0", version = "0.9.0" }
cw2 = { path = "../../packages/cw2", version = "0.9.0" }
cw1155 = { path = "../../packages/cw1155", version = "0.9.0" }
cw-storage-plus = { path = "../../packages/storage-plus", version = "0.9.0" }
cosmwasm-std = { version = "0.16.0" }
cosmwasm-std = { version = "1.0.0-soon" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.20" }

[dev-dependencies]
cosmwasm-schema = { version = "0.16.0" }
cosmwasm-schema = { version = "1.0.0-soon" }
4 changes: 2 additions & 2 deletions contracts/cw20-atomic-swap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ library = []
cw0 = { path = "../../packages/cw0", version = "0.9.0" }
cw2 = { path = "../../packages/cw2", version = "0.9.0" }
cw20 = { path = "../../packages/cw20", version = "0.9.0" }
cosmwasm-std = { version = "0.16.0" }
cosmwasm-std = { version = "1.0.0-soon" }
cw-storage-plus = { path = "../../packages/storage-plus", version = "0.9.0" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
Expand All @@ -27,4 +27,4 @@ hex = "0.3.1"
sha2 = "0.8.0"

[dev-dependencies]
cosmwasm-schema = { version = "0.16.0" }
cosmwasm-schema = { version = "1.0.0-soon" }
4 changes: 2 additions & 2 deletions contracts/cw20-base/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ cw0 = { path = "../../packages/cw0", version = "0.9.0" }
cw2 = { path = "../../packages/cw2", version = "0.9.0" }
cw20 = { path = "../../packages/cw20", version = "0.9.0" }
cw-storage-plus = { path = "../../packages/storage-plus", version = "0.9.0" }
cosmwasm-std = { version = "0.16.0" }
cosmwasm-std = { version = "1.0.0-soon" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.23" }

[dev-dependencies]
cosmwasm-schema = { version = "0.16.0" }
cosmwasm-schema = { version = "1.0.0-soon" }
4 changes: 2 additions & 2 deletions contracts/cw20-bonding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ cw2 = { path = "../../packages/cw2", version = "0.9.0" }
cw20 = { path = "../../packages/cw20", version = "0.9.0" }
cw20-base = { path = "../../contracts/cw20-base", version = "0.9.0", features = ["library"] }
cw-storage-plus = { path = "../../packages/storage-plus", version = "0.9.0" }
cosmwasm-std = { version = "0.16.0", default-features = false, features = ["staking"] }
cosmwasm-std = { version = "1.0.0-soon", default-features = false, features = ["staking"] }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.23" }
Expand All @@ -34,4 +34,4 @@ integer-sqrt = { version = "0.1.5" }
integer-cbrt = { version = "0.1.2" }

[dev-dependencies]
cosmwasm-schema = { version = "0.16.0" }
cosmwasm-schema = { version = "1.0.0-soon" }
4 changes: 2 additions & 2 deletions contracts/cw20-escrow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ library = []
cw0 = { path = "../../packages/cw0", version = "0.9.0" }
cw2 = { path = "../../packages/cw2", version = "0.9.0" }
cw20 = { path = "../../packages/cw20", version = "0.9.0" }
cosmwasm-std = { version = "0.16.0" }
cosmwasm-std = { version = "1.0.0-soon" }
cw-storage-plus = { path = "../../packages/storage-plus", version = "0.9.0" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.23" }

[dev-dependencies]
cosmwasm-schema = { version = "0.16.0" }
cosmwasm-schema = { version = "1.0.0-soon" }
cw-multi-test = { path = "../../packages/multi-test", version = "0.9.0" }
cw20-base = { path = "../cw20-base", version = "0.9.0", features = ["library"] }
4 changes: 2 additions & 2 deletions contracts/cw20-ics20/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ library = []
cw0 = { path = "../../packages/cw0", version = "0.9.0" }
cw2 = { path = "../../packages/cw2", version = "0.9.0" }
cw20 = { path = "../../packages/cw20", version = "0.9.0" }
cosmwasm-std = { version = "0.16.0", features = ["stargate"] }
cosmwasm-std = { version = "1.0.0-soon", features = ["stargate"] }
cw-storage-plus = { path = "../../packages/storage-plus", version = "0.9.0" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.23" }

[dev-dependencies]
cosmwasm-schema = { version = "0.16.0" }
cosmwasm-schema = { version = "1.0.0-soon" }
4 changes: 2 additions & 2 deletions contracts/cw20-merkle-airdrop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ library = []
cw0 = { path = "../../packages/cw0", version = "0.9.0" }
cw2 = { path = "../../packages/cw2", version = "0.9.0" }
cw20 = { path = "../../packages/cw20", version = "0.9.0" }
cosmwasm-std = { version = "0.16.0" }
cosmwasm-std = { version = "1.0.0-soon" }
cw-storage-plus = { path = "../../packages/storage-plus", version = "0.9.0" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
Expand All @@ -31,5 +31,5 @@ hex = "0.4"
sha2 = { version = "0.9.5", default-features = false }

[dev-dependencies]
cosmwasm-schema = "0.16.0"
cosmwasm-schema = "1.0.0-soon"
serde_json = "1.0"
4 changes: 2 additions & 2 deletions contracts/cw20-staking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ cw2 = { path = "../../packages/cw2", version = "0.9.0" }
cw20 = { path = "../../packages/cw20", version = "0.9.0" }
cw-controllers = { path = "../../packages/controllers", version = "0.9.0" }
cw20-base = { path = "../../contracts/cw20-base", version = "0.9.0", features = ["library"] }
cosmwasm-std = { version = "0.16.0", features = ["staking"] }
cosmwasm-std = { version = "1.0.0-soon", features = ["staking"] }
cw-storage-plus = { path = "../../packages/storage-plus", version = "0.9.0" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.23" }

[dev-dependencies]
cosmwasm-schema = { version = "0.16.0" }
cosmwasm-schema = { version = "1.0.0-soon" }
4 changes: 2 additions & 2 deletions contracts/cw3-fixed-multisig/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ cw0 = { path = "../../packages/cw0", version = "0.9.0" }
cw2 = { path = "../../packages/cw2", version = "0.9.0" }
cw3 = { path = "../../packages/cw3", version = "0.9.0" }
cw-storage-plus = { path = "../../packages/storage-plus", version = "0.9.0" }
cosmwasm-std = { version = "0.16.0" }
cosmwasm-std = { version = "1.0.0-soon" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.23" }

[dev-dependencies]
cosmwasm-schema = { version = "0.16.0" }
cosmwasm-schema = { version = "1.0.0-soon" }
cw20 = { path = "../../packages/cw20", version = "0.9.0" }
cw20-base = { path = "../cw20-base", version = "0.9.0", features = ["library"] }
cw-multi-test = { path = "../../packages/multi-test", version = "0.9.0" }
4 changes: 2 additions & 2 deletions contracts/cw3-flex-multisig/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ cw2 = { path = "../../packages/cw2", version = "0.9.0" }
cw3 = { path = "../../packages/cw3", version = "0.9.0" }
cw4 = { path = "../../packages/cw4", version = "0.9.0" }
cw-storage-plus = { path = "../../packages/storage-plus", version = "0.9.0" }
cosmwasm-std = { version = "0.16.0" }
cosmwasm-std = { version = "1.0.0-soon" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.23" }

[dev-dependencies]
cosmwasm-schema = { version = "0.16.0" }
cosmwasm-schema = { version = "1.0.0-soon" }
cw4-group = { path = "../cw4-group", version = "0.9.0" }
cw-multi-test = { path = "../../packages/multi-test", version = "0.9.0" }
4 changes: 2 additions & 2 deletions contracts/cw4-group/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ cw2 = { path = "../../packages/cw2", version = "0.9.0" }
cw4 = { path = "../../packages/cw4", version = "0.9.0" }
cw-controllers = { path = "../../packages/controllers", version = "0.9.0" }
cw-storage-plus = { path = "../../packages/storage-plus", version = "0.9.0" }
cosmwasm-std = { version = "0.16.0" }
cosmwasm-std = { version = "1.0.0-soon" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.23" }

[dev-dependencies]
cosmwasm-schema = { version = "0.16.0" }
cosmwasm-schema = { version = "1.0.0-soon" }
4 changes: 2 additions & 2 deletions contracts/cw4-stake/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ cw4 = { path = "../../packages/cw4", version = "0.9.0" }
cw20 = { path = "../../packages/cw20", version = "0.9.0" }
cw-controllers = { path = "../../packages/controllers", version = "0.9.0" }
cw-storage-plus = { path = "../../packages/storage-plus", version = "0.9.0" }
cosmwasm-std = { version = "0.16.0" }
cosmwasm-std = { version = "1.0.0-soon" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.23" }

[dev-dependencies]
cosmwasm-schema = { version = "0.16.0" }
cosmwasm-schema = { version = "1.0.0-soon" }
4 changes: 2 additions & 2 deletions contracts/cw721-base/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ cw0 = { path = "../../packages/cw0", version = "0.9.0" }
cw2 = { path = "../../packages/cw2", version = "0.9.0" }
cw721 = { path = "../../packages/cw721", version = "0.9.0" }
cw-storage-plus = { path = "../../packages/storage-plus", version = "0.9.0" }
cosmwasm-std = { version = "0.16.0" }
cosmwasm-std = { version = "1.0.0-soon" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.23" }

[dev-dependencies]
cosmwasm-schema = { version = "0.16.0" }
cosmwasm-schema = { version = "1.0.0-soon" }
2 changes: 1 addition & 1 deletion packages/controllers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ documentation = "https://docs.cosmwasm.com"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
cosmwasm-std = { version = "0.16.0" }
cosmwasm-std = { version = "1.0.0-soon" }
cw0 = { path = "../cw0", version = "0.9.0" }
cw-storage-plus = { path = "../storage-plus", version = "0.9.0" }
schemars = "0.8.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/cw0/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ documentation = "https://docs.cosmwasm.com"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
cosmwasm-std = { version = "0.16.0" }
cosmwasm-std = { version = "1.0.0-soon" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.21" }
Expand Down
4 changes: 2 additions & 2 deletions packages/cw1/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ homepage = "https://cosmwasm.com"
documentation = "https://docs.cosmwasm.com"

[dependencies]
cosmwasm-std = { version = "0.16.0" }
cosmwasm-std = { version = "1.0.0-soon" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }

[dev-dependencies]
cosmwasm-schema = { version = "0.16.0" }
cosmwasm-schema = { version = "1.0.0-soon" }
4 changes: 2 additions & 2 deletions packages/cw1155/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ documentation = "https://docs.cosmwasm.com"

[dependencies]
cw0 = { path = "../../packages/cw0", version = "0.9.0" }
cosmwasm-std = { version = "0.16.0" }
cosmwasm-std = { version = "1.0.0-soon" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }

[dev-dependencies]
cosmwasm-schema = { version = "0.16.0" }
cosmwasm-schema = { version = "1.0.0-soon" }
2 changes: 1 addition & 1 deletion packages/cw2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ homepage = "https://cosmwasm.com"
documentation = "https://docs.cosmwasm.com"

[dependencies]
cosmwasm-std = { version = "0.16.0", default-features = false }
cosmwasm-std = { version = "1.0.0-soon", default-features = false }
cw-storage-plus = { path = "../../packages/storage-plus", version = "0.9.0" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
4 changes: 2 additions & 2 deletions packages/cw2/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

use cosmwasm_std::{Querier, QuerierWrapper, QueryRequest, StdResult, Storage, WasmQuery};
use cosmwasm_std::{Empty, Querier, QuerierWrapper, QueryRequest, StdResult, Storage, WasmQuery};
use cw_storage_plus::Item;

pub const CONTRACT: Item<ContractVersion> = Item::new("contract_info");
Expand Down Expand Up @@ -50,7 +50,7 @@ pub fn query_contract_info<Q: Querier, T: Into<String>>(
contract_addr: contract_addr.into(),
key: CONTRACT.as_slice().into(),
});
QuerierWrapper::new(querier).query(&req)
QuerierWrapper::<Empty>::new(querier).query(&req)
}

#[cfg(test)]
Expand Down
4 changes: 2 additions & 2 deletions packages/cw20/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ documentation = "https://docs.cosmwasm.com"

[dependencies]
cw0 = { path = "../../packages/cw0", version = "0.9.0" }
cosmwasm-std = { version = "0.16.0" }
cosmwasm-std = { version = "1.0.0-soon" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }

[dev-dependencies]
cosmwasm-schema = { version = "0.16.0" }
cosmwasm-schema = { version = "1.0.0-soon" }
11 changes: 6 additions & 5 deletions packages/cw20/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

use cosmwasm_std::{
to_binary, Addr, CosmosMsg, Querier, QuerierWrapper, StdResult, Uint128, WasmMsg, WasmQuery,
to_binary, Addr, CosmosMsg, Empty, Querier, QuerierWrapper, StdResult, Uint128, WasmMsg,
WasmQuery,
};

use crate::{
Expand Down Expand Up @@ -46,7 +47,7 @@ impl Cw20Contract {
msg: to_binary(&msg)?,
}
.into();
let res: BalanceResponse = QuerierWrapper::new(querier).query(&query)?;
let res: BalanceResponse = QuerierWrapper::<Empty>::new(querier).query(&query)?;
Ok(res.balance)
}

Expand All @@ -59,7 +60,7 @@ impl Cw20Contract {
msg: to_binary(&msg)?,
}
.into();
QuerierWrapper::new(querier).query(&query)
QuerierWrapper::<Empty>::new(querier).query(&query)
}

/// Get allowance of spender to use owner's account
Expand All @@ -78,7 +79,7 @@ impl Cw20Contract {
msg: to_binary(&msg)?,
}
.into();
QuerierWrapper::new(querier).query(&query)
QuerierWrapper::<Empty>::new(querier).query(&query)
}

/// Find info on who can mint, and how much
Expand All @@ -89,7 +90,7 @@ impl Cw20Contract {
msg: to_binary(&msg)?,
}
.into();
QuerierWrapper::new(querier).query(&query)
QuerierWrapper::<Empty>::new(querier).query(&query)
}

/// returns true if the contract supports the allowance extension
Expand Down
4 changes: 2 additions & 2 deletions packages/cw3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ documentation = "https://docs.cosmwasm.com"

[dependencies]
cw0 = { path = "../../packages/cw0", version = "0.9.0" }
cosmwasm-std = { version = "0.16.0" }
cosmwasm-std = { version = "1.0.0-soon" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }

[dev-dependencies]
cosmwasm-schema = { version = "0.16.0" }
cosmwasm-schema = { version = "1.0.0-soon" }
4 changes: 2 additions & 2 deletions packages/cw4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ documentation = "https://docs.cosmwasm.com"

[dependencies]
cw-storage-plus = { path = "../storage-plus", version = "0.9.0" }
cosmwasm-std = { version = "0.16.0" }
cosmwasm-std = { version = "1.0.0-soon" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }

[dev-dependencies]
cosmwasm-schema = { version = "0.16.0" }
cosmwasm-schema = { version = "1.0.0-soon" }
Loading