diff --git a/Cargo.lock b/Cargo.lock index 48c579c3..3fd8d92a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -227,16 +227,17 @@ dependencies = [ [[package]] name = "cw-multi-test" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579e2c2f2c0877b839c5cad85e67811074e854a50c1ff3085eb8290b1c27809c" +checksum = "561604d987be2ef3e34db1f01f0c98544106d84d8be2af92c0737bb199af452c" dependencies = [ "anyhow", + "bech32", "cosmwasm-std", "cw-storage-plus", "cw-utils", "derivative", - "itertools", + "itertools 0.12.0", "prost", "schemars", "serde", @@ -257,9 +258,9 @@ dependencies = [ [[package]] name = "cw-utils" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9f351a4e4d81ef7c890e44d903f8c0bdcdc00f094fd3a181eaf70c0eec7a3a" +checksum = "1c4a657e5caacc3a0d00ee96ca8618745d050b8f757c709babafb81208d4239c" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -478,6 +479,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.5" @@ -609,9 +619,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fdd22f3b9c31b53c060df4a0613a1c7f062d4115a2b984dd15b1858f7e340d" +checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" dependencies = [ "bytes", "prost-derive", @@ -619,12 +629,12 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "265baba7fabd416cf5078179f7d2cbeca4ce7a9041111900675ea7c4cb8a4c32" +checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" dependencies = [ "anyhow", - "itertools", + "itertools 0.11.0", "proc-macro2", "quote", "syn 2.0.39", @@ -716,9 +726,9 @@ checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" [[package]] name = "serde" -version = "1.0.192" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] @@ -752,9 +762,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.192" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", diff --git a/examples/Cargo.lock b/examples/Cargo.lock index 4a2b8298..74489184 100644 --- a/examples/Cargo.lock +++ b/examples/Cargo.lock @@ -265,16 +265,17 @@ dependencies = [ [[package]] name = "cw-multi-test" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579e2c2f2c0877b839c5cad85e67811074e854a50c1ff3085eb8290b1c27809c" +checksum = "561604d987be2ef3e34db1f01f0c98544106d84d8be2af92c0737bb199af452c" dependencies = [ "anyhow", + "bech32", "cosmwasm-std", "cw-storage-plus", "cw-utils", "derivative", - "itertools", + "itertools 0.12.0", "prost", "schemars", "serde", @@ -295,9 +296,9 @@ dependencies = [ [[package]] name = "cw-utils" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9f351a4e4d81ef7c890e44d903f8c0bdcdc00f094fd3a181eaf70c0eec7a3a" +checksum = "1c4a657e5caacc3a0d00ee96ca8618745d050b8f757c709babafb81208d4239c" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -361,14 +362,15 @@ dependencies = [ [[package]] name = "cw2" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9431d14f64f49e41c6ef5561ed11a5391c417d0cb16455dea8cdcb9037a8d197" +checksum = "c6c120b24fbbf5c3bedebb97f2cc85fbfa1c3287e09223428e7e597b5293c1fa" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus", "schemars", + "semver", "serde", "thiserror", ] @@ -700,6 +702,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.6" @@ -841,9 +852,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fdd22f3b9c31b53c060df4a0613a1c7f062d4115a2b984dd15b1858f7e340d" +checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" dependencies = [ "bytes", "prost-derive", @@ -851,12 +862,12 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "265baba7fabd416cf5078179f7d2cbeca4ce7a9041111900675ea7c4cb8a4c32" +checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" dependencies = [ "anyhow", - "itertools", + "itertools 0.11.0", "proc-macro2", "quote", "syn 2.0.39", @@ -948,9 +959,9 @@ checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" -version = "1.0.192" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] @@ -984,9 +995,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.192" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 1197ee60..5d9d8ba5 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -29,10 +29,10 @@ edition = "2021" anyhow = "1.0.75" cosmwasm-schema = "1.5.0" cosmwasm-std = "1.5.0" -cw-multi-test = "0.18.0" +cw-multi-test = "0.19.0" cw-storage-plus = "1.2.0" cw-utils = "1.0.2" -cw2 = "1.1.1" +cw2 = "1.1.2" getrandom = "0.2.11" semver = "1.0.20" serde = { version = "1.0.192", default-features = false, features = ["derive"] } diff --git a/examples/contracts/cw20-base/src/contract.rs b/examples/contracts/cw20-base/src/contract.rs index 458471d7..03668bc4 100644 --- a/examples/contracts/cw20-base/src/contract.rs +++ b/examples/contracts/cw20-base/src/contract.rs @@ -6,13 +6,12 @@ use cosmwasm_std::{ ensure, Addr, Binary, BlockInfo, DepsMut, Order, Response, StdError, StdResult, Storage, Uint128, }; -use cw2::set_contract_version; +use cw2::{ensure_from_older_version, set_contract_version}; use cw20_allowances::responses::AllowanceResponse; use cw20_marketing::responses::{LogoInfo, MarketingInfoResponse}; use cw20_marketing::Logo; use cw20_minting::responses::MinterResponse; use cw_storage_plus::{Item, Map}; -use cw_utils::ensure_from_older_version; use sylvia::types::{ExecCtx, InstantiateCtx, MigrateCtx, QueryCtx}; use sylvia::{contract, schemars}; diff --git a/sylvia/Cargo.toml b/sylvia/Cargo.toml index 7b5986a2..a9d43912 100644 --- a/sylvia/Cargo.toml +++ b/sylvia/Cargo.toml @@ -12,6 +12,13 @@ categories = ["api-bindings", "wasm"] [features] mt = ["sylvia-derive/mt", "dep:cw-multi-test", "dep:anyhow", "dep:derivative"] +stargate = ["cosmwasm-std/stargate"] +iterator = ["cosmwasm-std/iterator"] +cosmwasm_1_1 = [ + "dep:cw-multi-test", + "cosmwasm-std/cosmwasm_1_1", + "cw-multi-test?/cosmwasm_1_1", +] cosmwasm_1_2 = [ "dep:cw-multi-test", "cosmwasm-std/cosmwasm_1_2", @@ -19,8 +26,16 @@ cosmwasm_1_2 = [ "dep:cw-utils", "sylvia-derive/cosmwasm_1_2", ] -stargate = ["cosmwasm-std/stargate", "cw-multi-test?/stargate"] -staking = ["cosmwasm-std/staking", "cw-multi-test?/staking"] +cosmwasm_1_3 = [ + "dep:cw-multi-test", + "cosmwasm-std/cosmwasm_1_3", + "cw-multi-test?/cosmwasm_1_3", +] +cosmwasm_1_4 = [ + "dep:cw-multi-test", + "cosmwasm-std/cosmwasm_1_4", + "cw-multi-test?/cosmwasm_1_4", +] [dependencies] sylvia-derive = { workspace = true } @@ -31,14 +46,14 @@ serde = { version = "1.0", default-features = false, features = ["derive"] } serde-cw-value = "0.7.0" serde-json-wasm = "1.0.0" konst = "0.3" -cw-multi-test = { version = "0.18.0", optional = true } +cw-multi-test = { version = "0.19.0", optional = true } anyhow = { version = "1.0", optional = true } derivative = { version = "2.2.0", optional = true } cw-utils = { version = "1.0.2", optional = true } [dev-dependencies] anyhow = "1.0" -cw-multi-test = "0.18" +cw-multi-test = "0.19.0" cw-storage-plus = "1.2.0" cw-utils = "1.0.2" thiserror = "1.0.50"