diff --git a/Cargo.toml b/Cargo.toml index 6257270..9b4197e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,15 +18,15 @@ homepage = "https://github.com/Cardinal-Cryptography/drink" license = "Apache-2.0" readme = "README.md" repository = "https://github.com/Cardinal-Cryptography/drink" -version = "0.10.1" +version = "0.11.1" [workspace.dependencies] anyhow = { version = "1.0.71" } cargo_metadata = { version = "0.18.1" } clap = { version = "4.3.4" } -contract-build = { version = "4.0.0-rc.2" } -contract-metadata = { version = "4.0.0-rc.2" } -contract-transcode = { version = "4.0.0-rc.2" } +contract-build = { version = "4.0.0-rc.3" } +contract-metadata = { version = "4.0.0-rc.3" } +contract-transcode = { version = "4.0.0-rc.3" } convert_case = { version = "0.6.0" } crossterm = { version = "0.26.0" } darling = { version = "0.20.3" } @@ -57,5 +57,5 @@ sp-runtime-interface = { version = "24.0.0" } # Local dependencies -drink = { version = "0.10.1", path = "drink" } -drink-test-macro = { version = "0.10.1", path = "drink/test-macro" } +drink = { version = "0.11.1", path = "drink" } +drink-test-macro = { version = "0.11.1", path = "drink/test-macro" } diff --git a/drink/src/session/record.rs b/drink/src/session/record.rs index a09e102..e5ad2c3 100644 --- a/drink/src/session/record.rs +++ b/drink/src/session/record.rs @@ -192,7 +192,7 @@ impl EventBatch { // We have to `encode` the data because `decode_contract_event` is targeted // at decoding the data from the runtime, and not directly from the contract // events. - .decode_contract_event(&signature_topic.into(), &mut &*data.encode()) + .decode_contract_event(&signature_topic, &mut &*data.encode()) { return Some(decoded); } diff --git a/examples/chain-extension/Cargo.toml b/examples/chain-extension/Cargo.toml index 8380454..4b065cc 100644 --- a/examples/chain-extension/Cargo.toml +++ b/examples/chain-extension/Cargo.toml @@ -10,7 +10,7 @@ version = "0.1.0" path = "src/lib.rs" [dependencies] -ink = { version = "=5.0.0-rc.1", default-features = false } +ink = { version = "=5.0.0-rc.2", default-features = false } scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } diff --git a/examples/contract-events/Cargo.toml b/examples/contract-events/Cargo.toml index 77d6cf2..14b7314 100644 --- a/examples/contract-events/Cargo.toml +++ b/examples/contract-events/Cargo.toml @@ -10,7 +10,7 @@ version = "0.1.0" path = "lib.rs" [dependencies] -ink = { version = "=5.0.0-rc.1", default-features = false } +ink = { version = "=5.0.0-rc.2", default-features = false } scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } diff --git a/examples/cross-contract-call-tracing/Cargo.toml b/examples/cross-contract-call-tracing/Cargo.toml index 5584e76..c74744c 100644 --- a/examples/cross-contract-call-tracing/Cargo.toml +++ b/examples/cross-contract-call-tracing/Cargo.toml @@ -7,7 +7,7 @@ repository = "https://github.com/Cardinal-Cryptography/drink" version = "0.1.0" [dependencies] -ink = { version = "=5.0.0-rc.1", default-features = false } +ink = { version = "=5.0.0-rc.2", default-features = false } scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } diff --git a/examples/flipper/Cargo.toml b/examples/flipper/Cargo.toml index 3f276a5..22cc828 100755 --- a/examples/flipper/Cargo.toml +++ b/examples/flipper/Cargo.toml @@ -7,7 +7,7 @@ repository = "https://github.com/Cardinal-Cryptography/drink" version = "0.1.0" [dependencies] -ink = { version = "=5.0.0-rc.1", default-features = false, features = ["ink-debug"] } +ink = { version = "=5.0.0-rc.2", default-features = false, features = ["ink-debug"] } scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } @@ -18,7 +18,6 @@ drink = { path = "../../drink" } # testing custom runtime frame-support = "28.0.0" frame-system = "28.0.0" -pallet-contracts-mock-network = "3.0.0" [lib] diff --git a/examples/flipper/lib.rs b/examples/flipper/lib.rs index 8ae6ab8..37efebe 100755 --- a/examples/flipper/lib.rs +++ b/examples/flipper/lib.rs @@ -72,19 +72,10 @@ mod tests { Ok(()) } - use pallet_contracts_mock_network::{ALICE, parachain::Runtime as ParachainRuntime}; - use drink::impl_sandbox_config; - - impl_sandbox_config!( - struct ParachainConfig { - runtime: ParachainRuntime; - default_balance: 1_000_000_000_000_000; - default_actor: ALICE; - } - ); - - #[drink::test(config = ParachainConfig)] - fn test_flipping_with_custom_runtime(mut session: Session) -> Result<(), Box> { + #[drink::test] + fn test_flipping_with_custom_runtime( + mut session: Session, + ) -> Result<(), Box> { let contract = BundleProvider::Flipper.bundle()?; let init_value: bool = session .deploy_bundle_and(contract, "new", &["true"], NO_SALT, NO_ENDOWMENT)? @@ -101,4 +92,3 @@ mod tests { Ok(()) } } - diff --git a/examples/mocking/Cargo.toml b/examples/mocking/Cargo.toml index 92e0d4e..45729db 100755 --- a/examples/mocking/Cargo.toml +++ b/examples/mocking/Cargo.toml @@ -7,7 +7,7 @@ repository = "https://github.com/Cardinal-Cryptography/drink" version = "0.1.0" [dependencies] -ink = { version = "=5.0.0-rc.1", default-features = false } +ink = { version = "=5.0.0-rc.2", default-features = false } scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } diff --git a/examples/quick-start-with-drink/Cargo.toml b/examples/quick-start-with-drink/Cargo.toml index 2d40b9a..75d229b 100755 --- a/examples/quick-start-with-drink/Cargo.toml +++ b/examples/quick-start-with-drink/Cargo.toml @@ -13,7 +13,7 @@ path = "lib.rs" # We use standard dependencies for an ink! smart-contract. # For debugging from contract, we enable the `ink-debug` feature of `ink` crate. -ink = { version = "=5.0.0-rc.1", default-features = false, features = ["ink-debug"] } +ink = { version = "=5.0.0-rc.2", default-features = false, features = ["ink-debug"] } scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true }