diff --git a/contracts/hackatom/Cargo.toml b/contracts/hackatom/Cargo.toml index 6e6f47a129..fd77d71fa5 100644 --- a/contracts/hackatom/Cargo.toml +++ b/contracts/hackatom/Cargo.toml @@ -30,7 +30,7 @@ cranelift = ["cosmwasm-vm/cranelift"] [dependencies] cosmwasm-schema = { path = "../../packages/schema" } -cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["std", "abort"] } +cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["std", "abort", "cosmwasm_2_2"] } schemars = "0.8.12" serde = { version = "1.0.103", default-features = false, features = ["derive"] } sha2 = "0.10" diff --git a/contracts/hackatom/tests/integration.rs b/contracts/hackatom/tests/integration.rs index c6b201ba37..9459c08c74 100644 --- a/contracts/hackatom/tests/integration.rs +++ b/contracts/hackatom/tests/integration.rs @@ -53,7 +53,7 @@ fn make_init_msg(api: &MockApi) -> (InstantiateMsg, String) { #[test] fn proper_initialization() { let mut deps = mock_instance(WASM, &[]); - assert_eq!(deps.required_capabilities().len(), 0); + assert_eq!(deps.required_capabilities().len(), 7); let verifier = deps.api().addr_make("verifies"); let beneficiary = deps.api().addr_make("benefits"); diff --git a/packages/check/src/main.rs b/packages/check/src/main.rs index 99c3768fcc..e6b508ba55 100644 --- a/packages/check/src/main.rs +++ b/packages/check/src/main.rs @@ -11,7 +11,7 @@ use cosmwasm_vm::capabilities_from_csv; use cosmwasm_vm::internals::{check_wasm, compile, make_compiling_engine}; const DEFAULT_AVAILABLE_CAPABILITIES: &str = - "iterator,staking,stargate,cosmwasm_1_1,cosmwasm_1_2,cosmwasm_1_3,cosmwasm_1_4,cosmwasm_2_0,cosmwasm_2_1"; + "iterator,staking,stargate,cosmwasm_1_1,cosmwasm_1_2,cosmwasm_1_3,cosmwasm_1_4,cosmwasm_2_0,cosmwasm_2_1,cosmwasm_2_2"; pub fn main() { let matches = Command::new("Contract checking") diff --git a/packages/derive/src/lib.rs b/packages/derive/src/lib.rs index ec44619bd8..ddbb4bb139 100644 --- a/packages/derive/src/lib.rs +++ b/packages/derive/src/lib.rs @@ -182,7 +182,7 @@ fn entry_point_impl(attr: TokenStream, item: TokenStream) -> TokenStream { let fn_name = &function.sig.ident; let wasm_export = format_ident!("__wasm_export_{fn_name}"); - // Migrate entry point can take 2 or 3 arguments. + // Migrate entry point can take 2 or 3 arguments let do_call = if fn_name == "migrate" && args == 3 { format_ident!("do_migrate_with_info") } else { diff --git a/packages/std/src/exports.rs b/packages/std/src/exports.rs index 56dc6ef4b7..b8057298e5 100644 --- a/packages/std/src/exports.rs +++ b/packages/std/src/exports.rs @@ -205,6 +205,7 @@ where /// - `M`: message type for request /// - `C`: custom response message type (see CosmosMsg) /// - `E`: error type for responses +#[cfg(feature = "cosmwasm_2_2")] pub fn do_migrate_with_info( migrate_with_info_fn: &dyn Fn(DepsMut, Env, M, MigrateInfo) -> Result, E>, env_ptr: u32, diff --git a/packages/std/src/lib.rs b/packages/std/src/lib.rs index 258e1e6203..f683954cfe 100644 --- a/packages/std/src/lib.rs +++ b/packages/std/src/lib.rs @@ -127,10 +127,12 @@ mod imports; #[cfg(target_arch = "wasm32")] mod memory; // Used by exports and imports only. This assumes pointers are 32 bit long, which makes it untestable on dev machines. +#[cfg(all(feature = "cosmwasm_2_2", target_arch = "wasm32"))] +pub use crate::exports::do_migrate_with_info; #[cfg(target_arch = "wasm32")] pub use crate::exports::{ do_execute, do_ibc_destination_callback, do_ibc_source_callback, do_instantiate, do_migrate, - do_migrate_with_info, do_query, do_reply, do_sudo, + do_query, do_reply, do_sudo, }; #[cfg(all(feature = "stargate", target_arch = "wasm32"))] pub use crate::exports::{