Skip to content

Commit

Permalink
Bump ink and cc crates (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
SkymanOne authored Feb 29, 2024
1 parent e493471 commit ad58970
Show file tree
Hide file tree
Showing 10 changed files with 117 additions and 100 deletions.
172 changes: 100 additions & 72 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.0"
version = "0.11.0"

[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" }
Expand Down Expand Up @@ -57,5 +57,5 @@ sp-runtime-interface = { version = "24.0.0" }

# Local dependencies

drink = { version = "0.10.0", path = "drink" }
drink-test-macro = { version = "0.10.0", path = "drink/test-macro" }
drink = { version = "0.11.0", path = "drink" }
drink-test-macro = { version = "0.11.0", path = "drink/test-macro" }
2 changes: 1 addition & 1 deletion drink/src/session/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl EventBatch<MinimalRuntime> {
// 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);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/chain-extension/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion examples/contract-events/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion examples/cross-contract-call-tracing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
3 changes: 1 addition & 2 deletions examples/flipper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -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]
Expand Down
18 changes: 4 additions & 14 deletions examples/flipper/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<dyn std::error::Error>> {
#[drink::test]
fn test_flipping_with_custom_runtime(
mut session: Session,
) -> Result<(), Box<dyn std::error::Error>> {
let contract = BundleProvider::Flipper.bundle()?;
let init_value: bool = session
.deploy_bundle_and(contract, "new", &["true"], NO_SALT, NO_ENDOWMENT)?
Expand All @@ -101,4 +92,3 @@ mod tests {
Ok(())
}
}

2 changes: 1 addition & 1 deletion examples/mocking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion examples/quick-start-with-drink/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand Down

0 comments on commit ad58970

Please sign in to comment.