From d226c414c7ec4329fc05320b40246a72263983a5 Mon Sep 17 00:00:00 2001 From: AlexD10S Date: Wed, 24 Sep 2025 11:39:06 +0200 Subject: [PATCH 01/14] feat: ink_revive crate --- Cargo.lock | 34 +++- Cargo.toml | 3 + crates/e2e/Cargo.toml | 3 +- crates/e2e/sandbox/Cargo.toml | 2 + crates/revive/Cargo.toml | 41 ++++ crates/revive/src/evm.rs | 87 +++++++++ crates/revive/src/hex_serde.rs | 85 +++++++++ crates/revive/src/lib.rs | 9 + crates/revive/src/primitives.rs | 176 ++++++++++++++++++ .../sol-cross-contract/Cargo.toml | 2 +- .../sol-cross-contract/e2e_tests.rs | 8 +- .../solidity-abi/sol-encoding/Cargo.toml | 2 +- .../solidity-abi/sol-encoding/e2e_tests.rs | 10 +- 13 files changed, 445 insertions(+), 17 deletions(-) create mode 100644 crates/revive/Cargo.toml create mode 100644 crates/revive/src/evm.rs create mode 100644 crates/revive/src/hex_serde.rs create mode 100644 crates/revive/src/lib.rs create mode 100644 crates/revive/src/primitives.rs diff --git a/Cargo.lock b/Cargo.lock index 60c18bf98bb..eb4bed07265 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1224,9 +1224,9 @@ dependencies = [ [[package]] name = "blst" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fd49896f12ac9b6dcd7a5998466b9b58263a695a3dd1ecc1aaca2e12a90b080" +checksum = "dcdb4c7013139a150f9fc55d123186dbfaba0d912817466282c73ac49e71fb45" dependencies = [ "cc", "glob", @@ -1336,9 +1336,9 @@ dependencies = [ [[package]] name = "c-kzg" -version = "2.1.1" +version = "2.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7318cfa722931cb5fe0838b98d3ce5621e75f6a6408abc21721d80de9223f2e4" +checksum = "137a2a2878ed823ef1bd73e5441e245602aae5360022113b8ad259ca4b5b8727" dependencies = [ "blst", "cc", @@ -1538,7 +1538,7 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fde0e0ec90c9dfb3b4b1a0891a7dcd0e2bffde2f7efed5fe7c9bb00e5bfb915e" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] @@ -2346,7 +2346,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.0", + "windows-sys 0.60.2", ] [[package]] @@ -3485,6 +3485,7 @@ dependencies = [ "ink_e2e_macro", "ink_env", "ink_primitives 6.0.0-alpha.4", + "ink_revive", "ink_sandbox", "itertools 0.14.0", "jsonrpsee", @@ -3713,6 +3714,20 @@ dependencies = [ "xxhash-rust", ] +[[package]] +name = "ink_revive" +version = "6.0.0-alpha.4" +dependencies = [ + "alloy-core", + "frame-support", + "ink_primitives 6.0.0-alpha.4", + "pallet-revive-uapi", + "parity-scale-codec", + "scale-info", + "serde", + "sp-runtime", +] + [[package]] name = "ink_sandbox" version = "6.0.0-alpha.4" @@ -3721,6 +3736,7 @@ dependencies = [ "frame-support", "frame-system", "ink_primitives 6.0.0-alpha.4", + "ink_revive", "pallet-balances", "pallet-revive", "pallet-timestamp", @@ -5836,7 +5852,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.0", + "windows-sys 0.60.2", ] [[package]] @@ -7847,7 +7863,7 @@ dependencies = [ "getrandom 0.3.3", "once_cell", "rustix", - "windows-sys 0.61.0", + "windows-sys 0.60.2", ] [[package]] @@ -8747,7 +8763,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.0", + "windows-sys 0.48.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 95fac355d3a..3dff31d072c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,7 @@ members = [ "crates/ink/ir", "crates/ink/macro", "crates/metadata", + "crates/revive", "crates/prelude", "crates/primitives", "crates/storage", @@ -104,6 +105,7 @@ xcm = { package = "staging-xcm", git = "https://github.com/use-ink/polkadot-sdk. polkavm-derive = { version = "0.26.0", default-features = false } # Solidity dependencies +alloy-core = { version = "1.1.0", default-features = false } alloy-sol-types = { version = "1.3.0", default-features = false } const_format = { version = "0.2.34", features = ["fmt"] } keccak-const = "0.2.0" @@ -121,6 +123,7 @@ ink_macro = { version = "=6.0.0-alpha.4", path = "crates/ink/macro", default-fea ink_metadata = { version = "=6.0.0-alpha.4", path = "crates/metadata", default-features = false } ink_prelude = { version = "=6.0.0-alpha.4", path = "crates/prelude", default-features = false } ink_primitives = { version = "=6.0.0-alpha.4", path = "crates/primitives", default-features = false } +ink_revive = { version = "=6.0.0-alpha.4", path = "crates/revive", default-features = false } ink_storage = { version = "=6.0.0-alpha.4", path = "crates/storage", default-features = false } ink_storage_traits = { version = "=6.0.0-alpha.4", path = "crates/storage/traits", default-features = false } diff --git a/crates/e2e/Cargo.toml b/crates/e2e/Cargo.toml index e83b112dcf7..9cdb1a4425c 100644 --- a/crates/e2e/Cargo.toml +++ b/crates/e2e/Cargo.toml @@ -19,6 +19,7 @@ ink_e2e_macro = { workspace = true, default-features = true } ink = { workspace = true, default-features = true } ink_env = { workspace = true, default-features = true } ink_primitives = { workspace = true, default-features = true } +ink_revive = { workspace = true, default-features = true } ink_sandbox = { version = "=6.0.0-alpha.4", path = "./sandbox", optional = true } cargo_metadata = { workspace = true } @@ -61,7 +62,6 @@ default = [ "std" ] std = [ "impl-serde/std", "ink_e2e_macro/std", - "pallet-revive/std", "scale-info/std", "scale/std", "serde/std", @@ -72,6 +72,7 @@ std = [ "sp-runtime-interface/std", "sp-weights/std", "ink_e2e_macro/std", + "ink_revive/std", "ink_sandbox?/std", "frame-support/std", ] diff --git a/crates/e2e/sandbox/Cargo.toml b/crates/e2e/sandbox/Cargo.toml index 35ee1eee1e3..dacc4dcdb7d 100644 --- a/crates/e2e/sandbox/Cargo.toml +++ b/crates/e2e/sandbox/Cargo.toml @@ -23,6 +23,7 @@ sp-externalities = { workspace = true } sp-runtime = { workspace = true } sp-io = { workspace = true } ink_primitives = { workspace = true } +ink_revive = { workspace = true } paste = { workspace = true } scale-info = { workspace = true } @@ -37,6 +38,7 @@ std = [ "frame-system/std", "frame-metadata/std", "ink_primitives/std", + "ink_revive/std", "pallet-balances/std", "pallet-revive/std", "pallet-timestamp/std", diff --git a/crates/revive/Cargo.toml b/crates/revive/Cargo.toml new file mode 100644 index 00000000000..f6e726eade7 --- /dev/null +++ b/crates/revive/Cargo.toml @@ -0,0 +1,41 @@ +[package] +name = "ink_revive" +version.workspace = true +authors.workspace = true +edition.workspace = true +license.workspace = true +description = "ink! revive primitives (placeholder)" +repository.workspace = true +homepage.workspace = true +keywords.workspace = true +categories.workspace = true + +[lib] +path = "src/lib.rs" + +[dependencies] +scale = { workspace = true } +frame-support = { workspace = true } +scale-info = { workspace = true } +serde = { workspace = true, features = ["derive"] } +ink_primitives = { workspace = true } +# sp-weights = { workspace = true } +# sp-core = { workspace = true } +sp-runtime = { workspace = true } +pallet-revive-uapi = { workspace = true, features = ["scale"] } +alloy-core = { workspace = true, features = ["sol-types"] } + +[features] +default = ["std"] +std = [ + "alloy-core/std", + "scale/std", + "scale-info/std", + "frame-support/std", + "ink_primitives/std", + # "sp-weights/std", + # "sp-core/std", + "sp-runtime/std", + "serde/std", +] + diff --git a/crates/revive/src/evm.rs b/crates/revive/src/evm.rs new file mode 100644 index 00000000000..c849010327c --- /dev/null +++ b/crates/revive/src/evm.rs @@ -0,0 +1,87 @@ +use scale::{Decode, Encode}; +use serde::{ + Deserialize, + Serialize, +}; +use alloc::vec::Vec; +use scale_info::TypeInfo; +use ink_primitives::{ + H160, U256, H256 +}; + + +/// A smart contract execution call trace. +#[derive( + TypeInfo, Default, Encode, Decode, Serialize, Deserialize, Clone, Debug, Eq, PartialEq, +)] +#[serde(rename_all = "camelCase")] +pub struct CallTrace { + /// Address of the sender. + pub from: H160, + /// Amount of gas provided for the call. + pub gas: Gas, + /// Amount of gas used. + pub gas_used: Gas, + /// Address of the receiver. + pub to: H160, + /// Call input data. + pub input: Vec, + /// Return data. + #[serde(skip_serializing_if = "Vec::is_empty")] + pub output: Vec, + /// The error message if the call failed. + #[serde(skip_serializing_if = "Option::is_none")] + pub error: Option, + /// The revert reason, if the call reverted. + #[serde(skip_serializing_if = "Option::is_none")] + pub revert_reason: Option, + /// List of sub-calls. + #[serde(skip_serializing_if = "Vec::is_empty")] + pub calls: Vec>, + /// List of logs emitted during the call. + #[serde(skip_serializing_if = "Vec::is_empty")] + pub logs: Vec, + /// Amount of value transferred. + #[serde(skip_serializing_if = "Option::is_none")] + pub value: Option, + /// Type of call. + #[serde(rename = "type")] + pub call_type: CallType, +} + +/// A log emitted during a call. +#[derive( + Debug, Default, Clone, Encode, Decode, TypeInfo, Serialize, Deserialize, Eq, PartialEq, +)] +pub struct CallLog { + /// The address of the contract that emitted the log. + pub address: H160, + /// The topics used to index the log. + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub topics: Vec, + /// The log's data. + pub data: Vec, + /// Position of the log relative to subcalls within the same trace + /// See for details + #[serde(with = "super::hex_serde")] + pub position: u32, +} + +/// The type of call that was executed. +#[derive( + Default, TypeInfo, Encode, Decode, Serialize, Deserialize, Eq, PartialEq, Clone, Debug, +)] +#[serde(rename_all = "UPPERCASE")] +pub enum CallType { + /// A regular call. + #[default] + Call, + /// A read-only call. + StaticCall, + /// A delegate call. + DelegateCall, + /// A create call. + Create, + /// A create2 call. + Create2, +} \ No newline at end of file diff --git a/crates/revive/src/hex_serde.rs b/crates/revive/src/hex_serde.rs new file mode 100644 index 00000000000..e57926a8fd2 --- /dev/null +++ b/crates/revive/src/hex_serde.rs @@ -0,0 +1,85 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use alloc::{format, string::String, vec::Vec}; +use alloy_core::hex; +use serde::{Deserialize, Deserializer, Serializer}; + +pub trait HexCodec: Sized { + type Error; + fn to_hex(&self) -> String; + fn from_hex(s: String) -> Result; +} + +macro_rules! impl_hex_codec { + ($($t:ty),*) => { + $( + impl HexCodec for $t { + type Error = core::num::ParseIntError; + fn to_hex(&self) -> String { + format!("0x{:x}", self) + } + fn from_hex(s: String) -> Result { + <$t>::from_str_radix(s.trim_start_matches("0x"), 16) + } + } + )* + }; +} + +impl_hex_codec!(u8, u32); + +impl HexCodec for [u8; T] { + type Error = hex::FromHexError; + fn to_hex(&self) -> String { + format!("0x{}", hex::encode(self)) + } + fn from_hex(s: String) -> Result { + let data = hex::decode(s.trim_start_matches("0x"))?; + data.try_into().map_err(|_| hex::FromHexError::InvalidStringLength) + } +} + +impl HexCodec for Vec { + type Error = hex::FromHexError; + fn to_hex(&self) -> String { + format!("0x{}", hex::encode(self)) + } + fn from_hex(s: String) -> Result { + hex::decode(s.trim_start_matches("0x")) + } +} + +pub fn serialize(value: &T, serializer: S) -> Result +where + S: Serializer, + T: HexCodec, +{ + let s = value.to_hex(); + serializer.serialize_str(&s) +} + +pub fn deserialize<'de, D, T>(deserializer: D) -> Result +where + D: Deserializer<'de>, + T: HexCodec, + ::Error: core::fmt::Debug, +{ + let s = String::deserialize(deserializer)?; + let value = T::from_hex(s).map_err(|e| serde::de::Error::custom(format!("{:?}", e)))?; + Ok(value) +} \ No newline at end of file diff --git a/crates/revive/src/lib.rs b/crates/revive/src/lib.rs new file mode 100644 index 00000000000..01f334ad2c5 --- /dev/null +++ b/crates/revive/src/lib.rs @@ -0,0 +1,9 @@ +#![cfg_attr(not(feature = "std"), no_std)] +extern crate alloc; + +mod evm; +mod hex_serde; +mod primitives; + +pub use evm::CallTrace; +pub use primitives::{ContractResult, ExecReturnValue, InstantiateReturnValue, StorageDeposit}; diff --git a/crates/revive/src/primitives.rs b/crates/revive/src/primitives.rs new file mode 100644 index 00000000000..a0685b95efb --- /dev/null +++ b/crates/revive/src/primitives.rs @@ -0,0 +1,176 @@ +#![cfg_attr(not(feature = "std"), allow(unused_imports))] + +use pallet_revive_uapi::ReturnFlags; +use scale::{Decode, Encode, MaxEncodedLen}; +use alloc::vec::Vec; +use scale_info::TypeInfo; +use frame_support::weights::Weight; +use ink_primitives::{ + H160, +}; +use sp_runtime::{ + traits::{Saturating, Zero}, + DispatchError, RuntimeDebug, +}; + +/// The amount of balance that was either charged or refunded in order to pay for storage. +#[derive( + Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, MaxEncodedLen, RuntimeDebug, TypeInfo, +)] +pub enum StorageDeposit { + /// The transaction reduced storage consumption. + /// + /// This means that the specified amount of balance was transferred from the involved + /// deposit accounts to the origin. + Refund(Balance), + /// The transaction increased storage consumption. + /// + /// This means that the specified amount of balance was transferred from the origin + /// to the involved deposit accounts. + Charge(Balance), +} + +impl Default for StorageDeposit { + fn default() -> Self { + Self::Charge(Zero::zero()) + } +} + +impl StorageDeposit { + /// Returns how much balance is charged or `0` in case of a refund. + pub fn charge_or_zero(&self) -> Balance { + match self { + Self::Charge(amount) => *amount, + Self::Refund(_) => Zero::zero(), + } + } + + pub fn is_zero(&self) -> bool { + match self { + Self::Charge(amount) => amount.is_zero(), + Self::Refund(amount) => amount.is_zero(), + } + } +} + +impl StorageDeposit +where + Balance: Saturating + Ord + Copy, +{ + /// This is essentially a saturating signed add. + pub fn saturating_add(&self, rhs: &Self) -> Self { + use StorageDeposit::*; + match (self, rhs) { + (Charge(lhs), Charge(rhs)) => Charge(lhs.saturating_add(*rhs)), + (Refund(lhs), Refund(rhs)) => Refund(lhs.saturating_add(*rhs)), + (Charge(lhs), Refund(rhs)) => + if lhs >= rhs { + Charge(lhs.saturating_sub(*rhs)) + } else { + Refund(rhs.saturating_sub(*lhs)) + }, + (Refund(lhs), Charge(rhs)) => + if lhs > rhs { + Refund(lhs.saturating_sub(*rhs)) + } else { + Charge(rhs.saturating_sub(*lhs)) + }, + } + } + + /// This is essentially a saturating signed sub. + pub fn saturating_sub(&self, rhs: &Self) -> Self { + use StorageDeposit::*; + match (self, rhs) { + (Charge(lhs), Refund(rhs)) => Charge(lhs.saturating_add(*rhs)), + (Refund(lhs), Charge(rhs)) => Refund(lhs.saturating_add(*rhs)), + (Charge(lhs), Charge(rhs)) => + if lhs >= rhs { + Charge(lhs.saturating_sub(*rhs)) + } else { + Refund(rhs.saturating_sub(*lhs)) + }, + (Refund(lhs), Refund(rhs)) => + if lhs > rhs { + Refund(lhs.saturating_sub(*rhs)) + } else { + Charge(rhs.saturating_sub(*lhs)) + }, + } + } + + /// If the amount of deposit (this type) is constrained by a `limit` this calculates how + /// much balance (if any) is still available from this limit. + /// + /// # Note + /// + /// In case of a refund the return value can be larger than `limit`. + pub fn available(&self, limit: &Balance) -> Balance { + use StorageDeposit::*; + match self { + Charge(amount) => limit.saturating_sub(*amount), + Refund(amount) => limit.saturating_add(*amount), + } + } +} + +/// Result type of a `bare_call` or `bare_instantiate` call as well as `ContractsApi::call` and +/// `ContractsApi::instantiate`. +/// +/// It contains the execution result together with some auxiliary information. +/// +/// #Note +/// +/// It has been extended to include `events` at the end of the struct while not bumping the +/// `ContractsApi` version. Therefore when SCALE decoding a `ContractResult` its trailing data +/// should be ignored to avoid any potential compatibility issues. +#[derive(Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo)] +pub struct ContractResult { + /// How much weight was consumed during execution. + pub gas_consumed: Weight, + /// How much weight is required as gas limit in order to execute this call. + /// + /// This value should be used to determine the weight limit for on-chain execution. + /// + /// # Note + /// + /// This can only be different from [`Self::gas_consumed`] when weight pre charging + /// is used. Currently, only `seal_call_runtime` makes use of pre charging. + /// Additionally, any `seal_call` or `seal_instantiate` makes use of pre-charging + /// when a non-zero `gas_limit` argument is supplied. + pub gas_required: Weight, + /// How much balance was paid by the origin into the contract's deposit account in order to + /// pay for storage. + /// + /// The storage deposit is never actually charged from the origin in case of [`Self::result`] + /// is `Err`. This is because on error all storage changes are rolled back including the + /// payment of the deposit. + pub storage_deposit: StorageDeposit, + /// The execution result of the vm binary code. + pub result: Result, +} + +/// Output of a contract call or instantiation which ran to completion. +#[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, TypeInfo, Default)] +pub struct ExecReturnValue { + /// Flags passed along by `seal_return`. Empty when `seal_return` was never called. + pub flags: ReturnFlags, + /// Buffer passed along by `seal_return`. Empty when `seal_return` was never called. + pub data: Vec, +} + +impl ExecReturnValue { + /// The contract did revert all storage changes. + pub fn did_revert(&self) -> bool { + self.flags.contains(ReturnFlags::REVERT) + } +} + +/// The result of a successful contract instantiation. +#[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, TypeInfo)] +pub struct InstantiateReturnValue { + /// The output of the called constructor. + pub result: ExecReturnValue, + /// The address of the new contract. + pub addr: H160, +} \ No newline at end of file diff --git a/integration-tests/solidity-abi/sol-cross-contract/Cargo.toml b/integration-tests/solidity-abi/sol-cross-contract/Cargo.toml index 2c71661acf4..40b5ce0e40a 100755 --- a/integration-tests/solidity-abi/sol-cross-contract/Cargo.toml +++ b/integration-tests/solidity-abi/sol-cross-contract/Cargo.toml @@ -12,7 +12,7 @@ sha3 = { version = "0.10", default-features = false } [dev-dependencies] ink_e2e = { path = "../../../crates/e2e", features = ["sandbox"] } ink_sandbox = { path = "../../../crates/e2e/sandbox" } -pallet-revive = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } +ink_revive = { path = "../../../crates/revive" } sha3 = { version = "0.10" } other-contract-sol = { path = "other-contract-sol" } diff --git a/integration-tests/solidity-abi/sol-cross-contract/e2e_tests.rs b/integration-tests/solidity-abi/sol-cross-contract/e2e_tests.rs index 741cbbe6b0a..7df0d806c0c 100644 --- a/integration-tests/solidity-abi/sol-cross-contract/e2e_tests.rs +++ b/integration-tests/solidity-abi/sol-cross-contract/e2e_tests.rs @@ -13,7 +13,7 @@ use ink::{ primitives::DepositLimit, }; use ink_sandbox::frame_system::pallet_prelude::OriginFor; -use pallet_revive::ExecReturnValue; +use ink_revive::ExecReturnValue; const STORAGE_DEPOSIT_LIMIT: DepositLimit = DepositLimit::UnsafeOnlyForDryRun; @@ -172,7 +172,11 @@ impl ContractSandbox { STORAGE_DEPOSIT_LIMIT, ); - result.result.expect("sandbox call contract failed") + let call_raw = result.result.expect("sandbox call contract failed"); + ExecReturnValue { + flags: call_raw.flags, + data: call_raw.data + } } } diff --git a/integration-tests/solidity-abi/sol-encoding/Cargo.toml b/integration-tests/solidity-abi/sol-encoding/Cargo.toml index e6e3223c68a..8d9b76e2e6d 100755 --- a/integration-tests/solidity-abi/sol-encoding/Cargo.toml +++ b/integration-tests/solidity-abi/sol-encoding/Cargo.toml @@ -11,7 +11,7 @@ ink = { path = "../../../crates/ink", default-features = false } [dev-dependencies] ink_e2e = { path = "../../../crates/e2e", features = ["sandbox"] } ink_sandbox = { path = "../../../crates/e2e/sandbox" } -pallet-revive = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } +ink_revive = { path = "../../../crates/revive" } sha3 = { version = "0.10" } [lib] diff --git a/integration-tests/solidity-abi/sol-encoding/e2e_tests.rs b/integration-tests/solidity-abi/sol-encoding/e2e_tests.rs index ba753d52518..a5a5285907a 100644 --- a/integration-tests/solidity-abi/sol-encoding/e2e_tests.rs +++ b/integration-tests/solidity-abi/sol-encoding/e2e_tests.rs @@ -12,7 +12,7 @@ use ink_sandbox::{ api::prelude::*, frame_system::pallet_prelude::OriginFor, }; -use pallet_revive::ExecReturnValue; +use ink_revive::ExecReturnValue; const STORAGE_DEPOSIT_LIMIT: DepositLimit = DepositLimit::UnsafeOnlyForDryRun; @@ -114,7 +114,7 @@ impl ContractSandbox { data: Vec, origin: OriginFor<::Runtime>, ) -> ExecReturnValue { - ::call_contract( + let call_raw = ::call_contract( &mut self.sandbox, self.contract_addr, 0, @@ -124,7 +124,11 @@ impl ContractSandbox { STORAGE_DEPOSIT_LIMIT, ) .result - .expect("sandbox call contract failed") + .expect("sandbox call contract failed"); + ExecReturnValue { + flags: call_raw.flags, + data: call_raw.data + } } } From b9eeff6ac34ee1602a154a52feb7b4a73dda177b Mon Sep 17 00:00:00 2001 From: AlexD10S Date: Wed, 24 Sep 2025 16:40:12 +0200 Subject: [PATCH 02/14] refactor: remove revive references from e2e crate --- Cargo.lock | 3 +- crates/e2e/Cargo.toml | 1 - crates/e2e/src/backend.rs | 2 +- crates/e2e/src/contract_results.rs | 2 +- crates/e2e/src/error.rs | 2 +- crates/e2e/src/lib.rs | 2 +- crates/e2e/src/sandbox_client.rs | 85 +++++++++++++--- crates/e2e/src/subxt_client.rs | 2 +- crates/e2e/src/xts.rs | 2 +- crates/revive/Cargo.toml | 6 +- crates/revive/src/evm.rs | 157 ++++++++++++++++++++++++++++- crates/revive/src/lib.rs | 5 +- crates/revive/src/primitives.rs | 14 ++- 13 files changed, 252 insertions(+), 31 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eb4bed07265..7a1e0b42b7a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3489,7 +3489,6 @@ dependencies = [ "ink_sandbox", "itertools 0.14.0", "jsonrpsee", - "pallet-revive", "parity-scale-codec", "regex", "scale-info", @@ -3719,12 +3718,14 @@ name = "ink_revive" version = "6.0.0-alpha.4" dependencies = [ "alloy-core", + "derive_more 2.0.1", "frame-support", "ink_primitives 6.0.0-alpha.4", "pallet-revive-uapi", "parity-scale-codec", "scale-info", "serde", + "sp-core", "sp-runtime", ] diff --git a/crates/e2e/Cargo.toml b/crates/e2e/Cargo.toml index 9cdb1a4425c..a4186782dec 100644 --- a/crates/e2e/Cargo.toml +++ b/crates/e2e/Cargo.toml @@ -24,7 +24,6 @@ ink_sandbox = { version = "=6.0.0-alpha.4", path = "./sandbox", optional = true cargo_metadata = { workspace = true } contract-build = { workspace = true } -pallet-revive = { workspace = true } funty = { workspace = true } impl-serde = { workspace = true } jsonrpsee = { workspace = true, features = ["ws-client"] } diff --git a/crates/e2e/src/backend.rs b/crates/e2e/src/backend.rs index 759059f2da8..1f0451e8619 100644 --- a/crates/e2e/src/backend.rs +++ b/crates/e2e/src/backend.rs @@ -22,7 +22,7 @@ use ink_primitives::{ abi::AbiEncodeWith, }; use jsonrpsee::core::async_trait; -use pallet_revive::evm::CallTrace; +use ink_revive::evm::CallTrace; use sp_weights::Weight; use subxt::dynamic::Value; diff --git a/crates/e2e/src/contract_results.rs b/crates/e2e/src/contract_results.rs index 99e844b258a..07de4163540 100644 --- a/crates/e2e/src/contract_results.rs +++ b/crates/e2e/src/contract_results.rs @@ -36,7 +36,7 @@ use ink_primitives::{ H256, MessageResult, }; -use pallet_revive::{ +use ink_revive::{ CodeUploadResult, ExecReturnValue, InstantiateReturnValue, diff --git a/crates/e2e/src/error.rs b/crates/e2e/src/error.rs index 71f4fcd7962..369d233d922 100644 --- a/crates/e2e/src/error.rs +++ b/crates/e2e/src/error.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use pallet_revive::evm::CallTrace; +use ink_revive::evm::CallTrace; use std::fmt; /// An error occurred while interacting with the E2E backend. diff --git a/crates/e2e/src/lib.rs b/crates/e2e/src/lib.rs index 4698998956f..1186171cdcd 100644 --- a/crates/e2e/src/lib.rs +++ b/crates/e2e/src/lib.rs @@ -57,7 +57,7 @@ pub use node_proc::{ TestNodeProcess, TestNodeProcessBuilder, }; -pub use pallet_revive::evm::CallTrace; +pub use ink_revive::evm::CallTrace; #[cfg(feature = "sandbox")] pub use sandbox_client::{ Client as SandboxClient, diff --git a/crates/e2e/src/sandbox_client.rs b/crates/e2e/src/sandbox_client.rs index 56714feab1e..fcbdc4ebf9f 100644 --- a/crates/e2e/src/sandbox_client.rs +++ b/crates/e2e/src/sandbox_client.rs @@ -60,6 +60,7 @@ use ink_primitives::{ DepositLimit, H160, abi::AbiEncodeWith, + U256 }; use ink_sandbox::{ AccountIdFor, @@ -73,19 +74,24 @@ use ink_sandbox::{ pallet_revive, }; use jsonrpsee::core::async_trait; -use pallet_revive::{ - AddressMapper, +use ink_revive::{ + ExecReturnValue, CodeUploadReturnValue, InstantiateReturnValue, - MomentOf, evm::{ CallTrace, - CallTracerConfig, - Trace, - TracerType, - U256, + CallLog }, }; +use pallet_revive::{ + AddressMapper, + MomentOf, + evm::{ + TracerType, + Trace, + CallTracerConfig, + } +}; use scale::Decode; use sp_core::{ Pair as _, @@ -360,7 +366,7 @@ where }; let trace = match tracer.collect_trace() { - Some(Trace::Call(call_trace)) => Some(call_trace), + Some(Trace::Call(call_trace)) => Some(to_revive_trace(call_trace)), _ => None, }; @@ -444,10 +450,13 @@ where let result = ContractResult:: { gas_consumed: dry_run_result.gas_consumed, gas_required: dry_run_result.gas_required, - storage_deposit: dry_run_result.storage_deposit, + storage_deposit: to_revive_storage_deposit(dry_run_result.storage_deposit), result: dry_run_result.result.map(|res| { InstantiateReturnValue { - result: res.result, + result: ExecReturnValue { + flags: res.result.flags, + data: res.result.data, + }, addr: res.addr, } }), @@ -556,7 +565,7 @@ where .map_err(|err| SandboxErr::new(format!("bare_call: {err:?}"))) })?; let trace = match tracer.collect_trace() { - Some(Trace::Call(call_trace)) => Some(call_trace), + Some(Trace::Call(call_trace)) => Some(to_revive_trace(call_trace)), _ => None, }; @@ -630,8 +639,13 @@ where exec_result: ContractExecResultFor:: { gas_consumed: result.gas_consumed, gas_required: result.gas_required, - storage_deposit: result.storage_deposit, - result: result.result, + storage_deposit: to_revive_storage_deposit(result.storage_deposit), + result: result.result.map(|res| { + ExecReturnValue { + flags: res.flags, + data: res.data, + } + }), }, trace: None, // todo _marker: Default::default(), @@ -829,3 +843,48 @@ where let origin = RawOrigin::Signed(caller); OriginFor::::from(origin) } + + +/// Convert a `pallet_revive::CallTrace` (sandbox) into an `ink_revive::CallTrace` (API). +fn to_revive_trace(t: pallet_revive::evm::CallTrace) -> CallTrace { + CallTrace { + from: t.from, + gas: t.gas, + gas_used: t.gas_used, + to: t.to, + input: t.input.0, + output: t.output.0, + error: t.error, + revert_reason: t.revert_reason, + calls: t.calls.into_iter().map(to_revive_trace).collect(), + logs: t.logs.into_iter().map(|log| CallLog { + address: log.address, + topics: log.topics, + data: log.data.0, + ..Default::default() + }).collect(), + value: t.value, + call_type: to_revive_call_type(t.call_type), + } +} + +/// Convert a `pallet_revive::CallType` into an `ink_revive::evm::CallType`. +fn to_revive_call_type(ct: pallet_revive::evm::CallType) -> ink_revive::evm::CallType { + match ct { + pallet_revive::evm::CallType::Call => ink_revive::evm::CallType::Call, + pallet_revive::evm::CallType::StaticCall => ink_revive::evm::CallType::StaticCall, + pallet_revive::evm::CallType::DelegateCall => ink_revive::evm::CallType::DelegateCall, + pallet_revive::evm::CallType::Create => ink_revive::evm::CallType::Create, + pallet_revive::evm::CallType::Create2 => ink_revive::evm::CallType::Create2, + } +} + +/// Convert a `ink_revive::StorageDeposit` into an `ink_revive::StorageDeposit`. +fn to_revive_storage_deposit( + sd: pallet_revive::StorageDeposit, +) -> ink_revive::StorageDeposit { + match sd { + pallet_revive::StorageDeposit::Charge(b) => ink_revive::StorageDeposit::Charge(b), + pallet_revive::StorageDeposit::Refund(b) => ink_revive::StorageDeposit::Refund(b), + } +} diff --git a/crates/e2e/src/subxt_client.rs b/crates/e2e/src/subxt_client.rs index 4fb2bf5a4f9..26ced5bca26 100644 --- a/crates/e2e/src/subxt_client.rs +++ b/crates/e2e/src/subxt_client.rs @@ -74,7 +74,7 @@ use ink_primitives::{ abi::AbiEncodeWith, }; use jsonrpsee::core::async_trait; -use pallet_revive::evm::CallTrace; +use ink_revive::evm::CallTrace; use scale::{ Decode, Encode, diff --git a/crates/e2e/src/xts.rs b/crates/e2e/src/xts.rs index 4874ba85b5e..025869c9ec8 100644 --- a/crates/e2e/src/xts.rs +++ b/crates/e2e/src/xts.rs @@ -29,7 +29,7 @@ use ink_primitives::{ Address, DepositLimit, }; -use pallet_revive::{ +use ink_revive::{ CodeUploadResult, evm::{ CallTrace, diff --git a/crates/revive/Cargo.toml b/crates/revive/Cargo.toml index f6e726eade7..1ea8d80561c 100644 --- a/crates/revive/Cargo.toml +++ b/crates/revive/Cargo.toml @@ -19,8 +19,8 @@ frame-support = { workspace = true } scale-info = { workspace = true } serde = { workspace = true, features = ["derive"] } ink_primitives = { workspace = true } -# sp-weights = { workspace = true } -# sp-core = { workspace = true } +derive_more = { workspace = true, features = ["from", "try_into"] } +sp-core = { workspace = true } sp-runtime = { workspace = true } pallet-revive-uapi = { workspace = true, features = ["scale"] } alloy-core = { workspace = true, features = ["sol-types"] } @@ -34,7 +34,7 @@ std = [ "frame-support/std", "ink_primitives/std", # "sp-weights/std", - # "sp-core/std", + "sp-core/std", "sp-runtime/std", "serde/std", ] diff --git a/crates/revive/src/evm.rs b/crates/revive/src/evm.rs index c849010327c..c317a5984b4 100644 --- a/crates/revive/src/evm.rs +++ b/crates/revive/src/evm.rs @@ -1,9 +1,10 @@ use scale::{Decode, Encode}; use serde::{ - Deserialize, - Serialize, + ser::{SerializeMap, Serializer}, + Deserialize, Serialize, }; -use alloc::vec::Vec; +use derive_more::From; +use alloc::{collections::BTreeMap, string::String, vec::Vec}; use scale_info::TypeInfo; use ink_primitives::{ H160, U256, H256 @@ -84,4 +85,154 @@ pub enum CallType { Create, /// A create2 call. Create2, +} + +/// The configuration for the call tracer. +#[derive(Clone, Debug, Decode, Serialize, Deserialize, Encode, PartialEq, TypeInfo)] +#[serde(default, rename_all = "camelCase")] +pub struct CallTracerConfig { + /// Whether to include logs in the trace. + pub with_logs: bool, + + /// Whether to only include the top-level calls in the trace. + pub only_top_call: bool, +} + +impl Default for CallTracerConfig { + fn default() -> Self { + Self { with_logs: true, only_top_call: false } + } +} + +/// A Trace +#[derive(TypeInfo, From, Encode, Decode, Serialize, Deserialize, Clone, Debug, Eq, PartialEq)] +#[serde(untagged)] +pub enum Trace { + /// A call trace. + Call(CallTrace), + /// A prestate trace. + Prestate(PrestateTrace), +} + +/// A prestate Trace +#[derive(TypeInfo, Encode, Decode, Serialize, Deserialize, Clone, Debug, Eq, PartialEq)] +#[serde(untagged)] +pub enum PrestateTrace { + /// The Prestate mode returns the accounts necessary to execute a given transaction + Prestate(BTreeMap), + + /// The diff mode returns the differences between the transaction's pre and post-state + /// The result only contains the accounts that were modified by the transaction + DiffMode { + /// The state before the call. + /// The accounts in the `pre` field will contain all of their basic fields, even if those + /// fields have not been modified. For `storage` however, only non-empty slots that have + /// been modified will be included + pre: BTreeMap, + /// The state after the call. + /// It only contains the specific fields that were actually modified during the transaction + post: BTreeMap, + }, +} + +impl PrestateTrace { + /// Returns the pre and post trace info. + pub fn state_mut( + &mut self, + ) -> (&mut BTreeMap, Option<&mut BTreeMap>) { + match self { + PrestateTrace::Prestate(pre) => (pre, None), + PrestateTrace::DiffMode { pre, post } => (pre, Some(post)), + } + } +} + +/// The info of a prestate trace. +#[derive( + TypeInfo, Default, Encode, Decode, Serialize, Deserialize, Clone, Debug, Eq, PartialEq, +)] +pub struct PrestateTraceInfo { + /// The balance of the account. + #[serde(skip_serializing_if = "Option::is_none")] + pub balance: Option, + /// The nonce of the account. + #[serde(skip_serializing_if = "Option::is_none")] + pub nonce: Option, + /// The code of the contract account. + #[serde(skip_serializing_if = "Option::is_none")] + pub code: Option>, + /// The storage of the contract account. + #[serde(skip_serializing_if = "is_empty", serialize_with = "serialize_map_skip_none")] + pub storage: BTreeMap, Option>>, +} + +/// Returns true if the map has no `Some` element +pub fn is_empty(map: &BTreeMap>) -> bool { + !map.values().any(|v| v.is_some()) +} + +/// Serializes a map, skipping `None` values. +pub fn serialize_map_skip_none( + map: &BTreeMap>, + serializer: S, +) -> Result +where + S: Serializer, + K: serde::Serialize, + V: serde::Serialize, +{ + let len = map.values().filter(|v| v.is_some()).count(); + let mut ser_map = serializer.serialize_map(Some(len))?; + + for (key, opt_val) in map { + if let Some(val) = opt_val { + ser_map.serialize_entry(key, val)?; + } + } + + ser_map.end() +} + +/// The type of tracer to use. +/// Only "callTracer" is supported for now. +#[derive(TypeInfo, Debug, Clone, Encode, Decode, Serialize, Deserialize, PartialEq)] +#[serde(tag = "tracer", content = "tracerConfig", rename_all = "camelCase")] +pub enum TracerType { + /// A tracer that traces calls. + CallTracer(Option), + + /// A tracer that traces the prestate. + PrestateTracer(Option), +} + +impl From for TracerType { + fn from(config: CallTracerConfig) -> Self { + TracerType::CallTracer(Some(config)) + } +} + +impl Default for TracerType { + fn default() -> Self { + TracerType::CallTracer(Some(CallTracerConfig::default())) + } +} + +/// The configuration for the prestate tracer. +#[derive(Clone, Debug, Decode, Serialize, Deserialize, Encode, PartialEq, TypeInfo)] +#[serde(default, rename_all = "camelCase")] +pub struct PrestateTracerConfig { + /// Whether to include the diff mode in the trace. + pub diff_mode: bool, + + /// Whether to include storage in the trace. + pub disable_storage: bool, + + /// Whether to include code in the trace. + pub disable_code: bool, +} + +impl Default for PrestateTracerConfig { + fn default() -> Self { + Self { diff_mode: false, disable_storage: false, disable_code: false } + } } \ No newline at end of file diff --git a/crates/revive/src/lib.rs b/crates/revive/src/lib.rs index 01f334ad2c5..a54bc14d273 100644 --- a/crates/revive/src/lib.rs +++ b/crates/revive/src/lib.rs @@ -1,9 +1,8 @@ #![cfg_attr(not(feature = "std"), no_std)] extern crate alloc; -mod evm; +pub mod evm; mod hex_serde; mod primitives; -pub use evm::CallTrace; -pub use primitives::{ContractResult, ExecReturnValue, InstantiateReturnValue, StorageDeposit}; +pub use primitives::{ContractResult, ExecReturnValue, InstantiateReturnValue, StorageDeposit, CodeUploadResult, CodeUploadReturnValue}; diff --git a/crates/revive/src/primitives.rs b/crates/revive/src/primitives.rs index a0685b95efb..275dbfcfc8c 100644 --- a/crates/revive/src/primitives.rs +++ b/crates/revive/src/primitives.rs @@ -173,4 +173,16 @@ pub struct InstantiateReturnValue { pub result: ExecReturnValue, /// The address of the new contract. pub addr: H160, -} \ No newline at end of file +} + +/// The result of successfully uploading a contract. +#[derive(Clone, PartialEq, Eq, Encode, Decode, MaxEncodedLen, RuntimeDebug, TypeInfo)] +pub struct CodeUploadReturnValue { + /// The key under which the new code is stored. + pub code_hash: sp_core::H256, + /// The deposit that was reserved at the caller. Is zero when the code already existed. + pub deposit: Balance, +} + +/// Result type of a `bare_code_upload` call. +pub type CodeUploadResult = Result, DispatchError>; From 361f991777b830df7fd8376c1217160f92d4c1af Mon Sep 17 00:00:00 2001 From: AlexD10S Date: Wed, 24 Sep 2025 16:41:14 +0200 Subject: [PATCH 03/14] chore: format --- crates/e2e/src/backend.rs | 2 +- crates/e2e/src/lib.rs | 2 +- crates/e2e/src/sandbox_client.rs | 57 +++--- crates/e2e/src/subxt_client.rs | 2 +- crates/revive/src/evm.rs | 326 +++++++++++++++++-------------- crates/revive/src/hex_serde.rs | 72 ++++--- crates/revive/src/lib.rs | 9 +- crates/revive/src/primitives.rs | 285 ++++++++++++++------------- 8 files changed, 415 insertions(+), 340 deletions(-) diff --git a/crates/e2e/src/backend.rs b/crates/e2e/src/backend.rs index 1f0451e8619..74907d79dbb 100644 --- a/crates/e2e/src/backend.rs +++ b/crates/e2e/src/backend.rs @@ -21,8 +21,8 @@ use ink_primitives::{ H160, abi::AbiEncodeWith, }; -use jsonrpsee::core::async_trait; use ink_revive::evm::CallTrace; +use jsonrpsee::core::async_trait; use sp_weights::Weight; use subxt::dynamic::Value; diff --git a/crates/e2e/src/lib.rs b/crates/e2e/src/lib.rs index 1186171cdcd..34b414192ca 100644 --- a/crates/e2e/src/lib.rs +++ b/crates/e2e/src/lib.rs @@ -53,11 +53,11 @@ pub use contract_results::{ UploadResult, }; pub use ink_e2e_macro::test; +pub use ink_revive::evm::CallTrace; pub use node_proc::{ TestNodeProcess, TestNodeProcessBuilder, }; -pub use ink_revive::evm::CallTrace; #[cfg(feature = "sandbox")] pub use sandbox_client::{ Client as SandboxClient, diff --git a/crates/e2e/src/sandbox_client.rs b/crates/e2e/src/sandbox_client.rs index fcbdc4ebf9f..13487470402 100644 --- a/crates/e2e/src/sandbox_client.rs +++ b/crates/e2e/src/sandbox_client.rs @@ -59,8 +59,17 @@ use ink_env::{ use ink_primitives::{ DepositLimit, H160, + U256, abi::AbiEncodeWith, - U256 +}; +use ink_revive::{ + CodeUploadReturnValue, + ExecReturnValue, + InstantiateReturnValue, + evm::{ + CallLog, + CallTrace, + }, }; use ink_sandbox::{ AccountIdFor, @@ -74,23 +83,14 @@ use ink_sandbox::{ pallet_revive, }; use jsonrpsee::core::async_trait; -use ink_revive::{ - ExecReturnValue, - CodeUploadReturnValue, - InstantiateReturnValue, - evm::{ - CallTrace, - CallLog - }, -}; use pallet_revive::{ AddressMapper, - MomentOf, + MomentOf, evm::{ - TracerType, - Trace, CallTracerConfig, - } + Trace, + TracerType, + }, }; use scale::Decode; use sp_core::{ @@ -642,9 +642,9 @@ where storage_deposit: to_revive_storage_deposit(result.storage_deposit), result: result.result.map(|res| { ExecReturnValue { - flags: res.flags, - data: res.data, - } + flags: res.flags, + data: res.data, + } }), }, trace: None, // todo @@ -844,7 +844,6 @@ where OriginFor::::from(origin) } - /// Convert a `pallet_revive::CallTrace` (sandbox) into an `ink_revive::CallTrace` (API). fn to_revive_trace(t: pallet_revive::evm::CallTrace) -> CallTrace { CallTrace { @@ -857,12 +856,18 @@ fn to_revive_trace(t: pallet_revive::evm::CallTrace) -> CallTrace { error: t.error, revert_reason: t.revert_reason, calls: t.calls.into_iter().map(to_revive_trace).collect(), - logs: t.logs.into_iter().map(|log| CallLog { - address: log.address, - topics: log.topics, - data: log.data.0, - ..Default::default() - }).collect(), + logs: t + .logs + .into_iter() + .map(|log| { + CallLog { + address: log.address, + topics: log.topics, + data: log.data.0, + ..Default::default() + } + }) + .collect(), value: t.value, call_type: to_revive_call_type(t.call_type), } @@ -873,7 +878,9 @@ fn to_revive_call_type(ct: pallet_revive::evm::CallType) -> ink_revive::evm::Cal match ct { pallet_revive::evm::CallType::Call => ink_revive::evm::CallType::Call, pallet_revive::evm::CallType::StaticCall => ink_revive::evm::CallType::StaticCall, - pallet_revive::evm::CallType::DelegateCall => ink_revive::evm::CallType::DelegateCall, + pallet_revive::evm::CallType::DelegateCall => { + ink_revive::evm::CallType::DelegateCall + } pallet_revive::evm::CallType::Create => ink_revive::evm::CallType::Create, pallet_revive::evm::CallType::Create2 => ink_revive::evm::CallType::Create2, } diff --git a/crates/e2e/src/subxt_client.rs b/crates/e2e/src/subxt_client.rs index 26ced5bca26..110e4757785 100644 --- a/crates/e2e/src/subxt_client.rs +++ b/crates/e2e/src/subxt_client.rs @@ -73,8 +73,8 @@ use ink_primitives::{ DepositLimit, abi::AbiEncodeWith, }; -use jsonrpsee::core::async_trait; use ink_revive::evm::CallTrace; +use jsonrpsee::core::async_trait; use scale::{ Decode, Encode, diff --git a/crates/revive/src/evm.rs b/crates/revive/src/evm.rs index c317a5984b4..03611a9d4a2 100644 --- a/crates/revive/src/evm.rs +++ b/crates/revive/src/evm.rs @@ -1,196 +1,222 @@ -use scale::{Decode, Encode}; -use serde::{ - ser::{SerializeMap, Serializer}, - Deserialize, Serialize, +use alloc::{ + collections::BTreeMap, + string::String, + vec::Vec, }; use derive_more::From; -use alloc::{collections::BTreeMap, string::String, vec::Vec}; -use scale_info::TypeInfo; use ink_primitives::{ - H160, U256, H256 + H160, + H256, + U256, +}; +use scale::{ + Decode, + Encode, +}; +use scale_info::TypeInfo; +use serde::{ + Deserialize, + Serialize, + ser::{ + SerializeMap, + Serializer, + }, }; - /// A smart contract execution call trace. #[derive( - TypeInfo, Default, Encode, Decode, Serialize, Deserialize, Clone, Debug, Eq, PartialEq, + TypeInfo, Default, Encode, Decode, Serialize, Deserialize, Clone, Debug, Eq, PartialEq, )] #[serde(rename_all = "camelCase")] pub struct CallTrace { - /// Address of the sender. - pub from: H160, - /// Amount of gas provided for the call. - pub gas: Gas, - /// Amount of gas used. - pub gas_used: Gas, - /// Address of the receiver. - pub to: H160, - /// Call input data. - pub input: Vec, - /// Return data. - #[serde(skip_serializing_if = "Vec::is_empty")] - pub output: Vec, - /// The error message if the call failed. - #[serde(skip_serializing_if = "Option::is_none")] - pub error: Option, - /// The revert reason, if the call reverted. - #[serde(skip_serializing_if = "Option::is_none")] - pub revert_reason: Option, - /// List of sub-calls. - #[serde(skip_serializing_if = "Vec::is_empty")] - pub calls: Vec>, - /// List of logs emitted during the call. - #[serde(skip_serializing_if = "Vec::is_empty")] - pub logs: Vec, - /// Amount of value transferred. - #[serde(skip_serializing_if = "Option::is_none")] - pub value: Option, - /// Type of call. - #[serde(rename = "type")] - pub call_type: CallType, + /// Address of the sender. + pub from: H160, + /// Amount of gas provided for the call. + pub gas: Gas, + /// Amount of gas used. + pub gas_used: Gas, + /// Address of the receiver. + pub to: H160, + /// Call input data. + pub input: Vec, + /// Return data. + #[serde(skip_serializing_if = "Vec::is_empty")] + pub output: Vec, + /// The error message if the call failed. + #[serde(skip_serializing_if = "Option::is_none")] + pub error: Option, + /// The revert reason, if the call reverted. + #[serde(skip_serializing_if = "Option::is_none")] + pub revert_reason: Option, + /// List of sub-calls. + #[serde(skip_serializing_if = "Vec::is_empty")] + pub calls: Vec>, + /// List of logs emitted during the call. + #[serde(skip_serializing_if = "Vec::is_empty")] + pub logs: Vec, + /// Amount of value transferred. + #[serde(skip_serializing_if = "Option::is_none")] + pub value: Option, + /// Type of call. + #[serde(rename = "type")] + pub call_type: CallType, } /// A log emitted during a call. #[derive( - Debug, Default, Clone, Encode, Decode, TypeInfo, Serialize, Deserialize, Eq, PartialEq, + Debug, Default, Clone, Encode, Decode, TypeInfo, Serialize, Deserialize, Eq, PartialEq, )] pub struct CallLog { - /// The address of the contract that emitted the log. - pub address: H160, - /// The topics used to index the log. - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub topics: Vec, - /// The log's data. - pub data: Vec, - /// Position of the log relative to subcalls within the same trace - /// See for details - #[serde(with = "super::hex_serde")] - pub position: u32, + /// The address of the contract that emitted the log. + pub address: H160, + /// The topics used to index the log. + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub topics: Vec, + /// The log's data. + pub data: Vec, + /// Position of the log relative to subcalls within the same trace + /// See for details + #[serde(with = "super::hex_serde")] + pub position: u32, } /// The type of call that was executed. #[derive( - Default, TypeInfo, Encode, Decode, Serialize, Deserialize, Eq, PartialEq, Clone, Debug, + Default, TypeInfo, Encode, Decode, Serialize, Deserialize, Eq, PartialEq, Clone, Debug, )] #[serde(rename_all = "UPPERCASE")] pub enum CallType { - /// A regular call. - #[default] - Call, - /// A read-only call. - StaticCall, - /// A delegate call. - DelegateCall, - /// A create call. - Create, - /// A create2 call. - Create2, + /// A regular call. + #[default] + Call, + /// A read-only call. + StaticCall, + /// A delegate call. + DelegateCall, + /// A create call. + Create, + /// A create2 call. + Create2, } /// The configuration for the call tracer. #[derive(Clone, Debug, Decode, Serialize, Deserialize, Encode, PartialEq, TypeInfo)] #[serde(default, rename_all = "camelCase")] pub struct CallTracerConfig { - /// Whether to include logs in the trace. - pub with_logs: bool, + /// Whether to include logs in the trace. + pub with_logs: bool, - /// Whether to only include the top-level calls in the trace. - pub only_top_call: bool, + /// Whether to only include the top-level calls in the trace. + pub only_top_call: bool, } impl Default for CallTracerConfig { - fn default() -> Self { - Self { with_logs: true, only_top_call: false } - } + fn default() -> Self { + Self { + with_logs: true, + only_top_call: false, + } + } } /// A Trace -#[derive(TypeInfo, From, Encode, Decode, Serialize, Deserialize, Clone, Debug, Eq, PartialEq)] +#[derive( + TypeInfo, From, Encode, Decode, Serialize, Deserialize, Clone, Debug, Eq, PartialEq, +)] #[serde(untagged)] pub enum Trace { - /// A call trace. - Call(CallTrace), - /// A prestate trace. - Prestate(PrestateTrace), + /// A call trace. + Call(CallTrace), + /// A prestate trace. + Prestate(PrestateTrace), } /// A prestate Trace -#[derive(TypeInfo, Encode, Decode, Serialize, Deserialize, Clone, Debug, Eq, PartialEq)] +#[derive( + TypeInfo, Encode, Decode, Serialize, Deserialize, Clone, Debug, Eq, PartialEq, +)] #[serde(untagged)] pub enum PrestateTrace { - /// The Prestate mode returns the accounts necessary to execute a given transaction - Prestate(BTreeMap), - - /// The diff mode returns the differences between the transaction's pre and post-state - /// The result only contains the accounts that were modified by the transaction - DiffMode { - /// The state before the call. - /// The accounts in the `pre` field will contain all of their basic fields, even if those - /// fields have not been modified. For `storage` however, only non-empty slots that have - /// been modified will be included - pre: BTreeMap, - /// The state after the call. - /// It only contains the specific fields that were actually modified during the transaction - post: BTreeMap, - }, + /// The Prestate mode returns the accounts necessary to execute a given transaction + Prestate(BTreeMap), + + /// The diff mode returns the differences between the transaction's pre and post-state + /// The result only contains the accounts that were modified by the transaction + DiffMode { + /// The state before the call. + /// The accounts in the `pre` field will contain all of their basic fields, even + /// if those fields have not been modified. For `storage` however, only + /// non-empty slots that have been modified will be included + pre: BTreeMap, + /// The state after the call. + /// It only contains the specific fields that were actually modified during the + /// transaction + post: BTreeMap, + }, } impl PrestateTrace { - /// Returns the pre and post trace info. - pub fn state_mut( - &mut self, - ) -> (&mut BTreeMap, Option<&mut BTreeMap>) { - match self { - PrestateTrace::Prestate(pre) => (pre, None), - PrestateTrace::DiffMode { pre, post } => (pre, Some(post)), - } - } + /// Returns the pre and post trace info. + pub fn state_mut( + &mut self, + ) -> ( + &mut BTreeMap, + Option<&mut BTreeMap>, + ) { + match self { + PrestateTrace::Prestate(pre) => (pre, None), + PrestateTrace::DiffMode { pre, post } => (pre, Some(post)), + } + } } /// The info of a prestate trace. #[derive( - TypeInfo, Default, Encode, Decode, Serialize, Deserialize, Clone, Debug, Eq, PartialEq, + TypeInfo, Default, Encode, Decode, Serialize, Deserialize, Clone, Debug, Eq, PartialEq, )] pub struct PrestateTraceInfo { - /// The balance of the account. - #[serde(skip_serializing_if = "Option::is_none")] - pub balance: Option, - /// The nonce of the account. - #[serde(skip_serializing_if = "Option::is_none")] - pub nonce: Option, - /// The code of the contract account. - #[serde(skip_serializing_if = "Option::is_none")] - pub code: Option>, - /// The storage of the contract account. - #[serde(skip_serializing_if = "is_empty", serialize_with = "serialize_map_skip_none")] - pub storage: BTreeMap, Option>>, + /// The balance of the account. + #[serde(skip_serializing_if = "Option::is_none")] + pub balance: Option, + /// The nonce of the account. + #[serde(skip_serializing_if = "Option::is_none")] + pub nonce: Option, + /// The code of the contract account. + #[serde(skip_serializing_if = "Option::is_none")] + pub code: Option>, + /// The storage of the contract account. + #[serde( + skip_serializing_if = "is_empty", + serialize_with = "serialize_map_skip_none" + )] + pub storage: BTreeMap, Option>>, } /// Returns true if the map has no `Some` element pub fn is_empty(map: &BTreeMap>) -> bool { - !map.values().any(|v| v.is_some()) + !map.values().any(|v| v.is_some()) } /// Serializes a map, skipping `None` values. pub fn serialize_map_skip_none( - map: &BTreeMap>, - serializer: S, + map: &BTreeMap>, + serializer: S, ) -> Result where - S: Serializer, - K: serde::Serialize, - V: serde::Serialize, + S: Serializer, + K: serde::Serialize, + V: serde::Serialize, { - let len = map.values().filter(|v| v.is_some()).count(); - let mut ser_map = serializer.serialize_map(Some(len))?; + let len = map.values().filter(|v| v.is_some()).count(); + let mut ser_map = serializer.serialize_map(Some(len))?; - for (key, opt_val) in map { - if let Some(val) = opt_val { - ser_map.serialize_entry(key, val)?; - } - } + for (key, opt_val) in map { + if let Some(val) = opt_val { + ser_map.serialize_entry(key, val)?; + } + } - ser_map.end() + ser_map.end() } /// The type of tracer to use. @@ -198,41 +224,45 @@ where #[derive(TypeInfo, Debug, Clone, Encode, Decode, Serialize, Deserialize, PartialEq)] #[serde(tag = "tracer", content = "tracerConfig", rename_all = "camelCase")] pub enum TracerType { - /// A tracer that traces calls. - CallTracer(Option), + /// A tracer that traces calls. + CallTracer(Option), - /// A tracer that traces the prestate. - PrestateTracer(Option), + /// A tracer that traces the prestate. + PrestateTracer(Option), } impl From for TracerType { - fn from(config: CallTracerConfig) -> Self { - TracerType::CallTracer(Some(config)) - } + fn from(config: CallTracerConfig) -> Self { + TracerType::CallTracer(Some(config)) + } } impl Default for TracerType { - fn default() -> Self { - TracerType::CallTracer(Some(CallTracerConfig::default())) - } + fn default() -> Self { + TracerType::CallTracer(Some(CallTracerConfig::default())) + } } /// The configuration for the prestate tracer. #[derive(Clone, Debug, Decode, Serialize, Deserialize, Encode, PartialEq, TypeInfo)] #[serde(default, rename_all = "camelCase")] pub struct PrestateTracerConfig { - /// Whether to include the diff mode in the trace. - pub diff_mode: bool, + /// Whether to include the diff mode in the trace. + pub diff_mode: bool, - /// Whether to include storage in the trace. - pub disable_storage: bool, + /// Whether to include storage in the trace. + pub disable_storage: bool, - /// Whether to include code in the trace. - pub disable_code: bool, + /// Whether to include code in the trace. + pub disable_code: bool, } impl Default for PrestateTracerConfig { - fn default() -> Self { - Self { diff_mode: false, disable_storage: false, disable_code: false } - } -} \ No newline at end of file + fn default() -> Self { + Self { + diff_mode: false, + disable_storage: false, + disable_code: false, + } + } +} diff --git a/crates/revive/src/hex_serde.rs b/crates/revive/src/hex_serde.rs index e57926a8fd2..15fcd849ded 100644 --- a/crates/revive/src/hex_serde.rs +++ b/crates/revive/src/hex_serde.rs @@ -15,14 +15,22 @@ // See the License for the specific language governing permissions and // limitations under the License. -use alloc::{format, string::String, vec::Vec}; +use alloc::{ + format, + string::String, + vec::Vec, +}; use alloy_core::hex; -use serde::{Deserialize, Deserializer, Serializer}; +use serde::{ + Deserialize, + Deserializer, + Serializer, +}; pub trait HexCodec: Sized { - type Error; - fn to_hex(&self) -> String; - fn from_hex(s: String) -> Result; + type Error; + fn to_hex(&self) -> String; + fn from_hex(s: String) -> Result; } macro_rules! impl_hex_codec { @@ -44,42 +52,44 @@ macro_rules! impl_hex_codec { impl_hex_codec!(u8, u32); impl HexCodec for [u8; T] { - type Error = hex::FromHexError; - fn to_hex(&self) -> String { - format!("0x{}", hex::encode(self)) - } - fn from_hex(s: String) -> Result { - let data = hex::decode(s.trim_start_matches("0x"))?; - data.try_into().map_err(|_| hex::FromHexError::InvalidStringLength) - } + type Error = hex::FromHexError; + fn to_hex(&self) -> String { + format!("0x{}", hex::encode(self)) + } + fn from_hex(s: String) -> Result { + let data = hex::decode(s.trim_start_matches("0x"))?; + data.try_into() + .map_err(|_| hex::FromHexError::InvalidStringLength) + } } impl HexCodec for Vec { - type Error = hex::FromHexError; - fn to_hex(&self) -> String { - format!("0x{}", hex::encode(self)) - } - fn from_hex(s: String) -> Result { - hex::decode(s.trim_start_matches("0x")) - } + type Error = hex::FromHexError; + fn to_hex(&self) -> String { + format!("0x{}", hex::encode(self)) + } + fn from_hex(s: String) -> Result { + hex::decode(s.trim_start_matches("0x")) + } } pub fn serialize(value: &T, serializer: S) -> Result where - S: Serializer, - T: HexCodec, + S: Serializer, + T: HexCodec, { - let s = value.to_hex(); - serializer.serialize_str(&s) + let s = value.to_hex(); + serializer.serialize_str(&s) } pub fn deserialize<'de, D, T>(deserializer: D) -> Result where - D: Deserializer<'de>, - T: HexCodec, - ::Error: core::fmt::Debug, + D: Deserializer<'de>, + T: HexCodec, + ::Error: core::fmt::Debug, { - let s = String::deserialize(deserializer)?; - let value = T::from_hex(s).map_err(|e| serde::de::Error::custom(format!("{:?}", e)))?; - Ok(value) -} \ No newline at end of file + let s = String::deserialize(deserializer)?; + let value = + T::from_hex(s).map_err(|e| serde::de::Error::custom(format!("{:?}", e)))?; + Ok(value) +} diff --git a/crates/revive/src/lib.rs b/crates/revive/src/lib.rs index a54bc14d273..192de0ab247 100644 --- a/crates/revive/src/lib.rs +++ b/crates/revive/src/lib.rs @@ -5,4 +5,11 @@ pub mod evm; mod hex_serde; mod primitives; -pub use primitives::{ContractResult, ExecReturnValue, InstantiateReturnValue, StorageDeposit, CodeUploadResult, CodeUploadReturnValue}; +pub use primitives::{ + CodeUploadResult, + CodeUploadReturnValue, + ContractResult, + ExecReturnValue, + InstantiateReturnValue, + StorageDeposit, +}; diff --git a/crates/revive/src/primitives.rs b/crates/revive/src/primitives.rs index 275dbfcfc8c..71ae9df92aa 100644 --- a/crates/revive/src/primitives.rs +++ b/crates/revive/src/primitives.rs @@ -1,188 +1,209 @@ #![cfg_attr(not(feature = "std"), allow(unused_imports))] -use pallet_revive_uapi::ReturnFlags; -use scale::{Decode, Encode, MaxEncodedLen}; use alloc::vec::Vec; -use scale_info::TypeInfo; use frame_support::weights::Weight; -use ink_primitives::{ - H160, +use ink_primitives::H160; +use pallet_revive_uapi::ReturnFlags; +use scale::{ + Decode, + Encode, + MaxEncodedLen, }; +use scale_info::TypeInfo; use sp_runtime::{ - traits::{Saturating, Zero}, - DispatchError, RuntimeDebug, + DispatchError, + RuntimeDebug, + traits::{ + Saturating, + Zero, + }, }; /// The amount of balance that was either charged or refunded in order to pay for storage. #[derive( - Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, MaxEncodedLen, RuntimeDebug, TypeInfo, + Clone, + Eq, + PartialEq, + Ord, + PartialOrd, + Encode, + Decode, + MaxEncodedLen, + RuntimeDebug, + TypeInfo, )] pub enum StorageDeposit { - /// The transaction reduced storage consumption. - /// - /// This means that the specified amount of balance was transferred from the involved - /// deposit accounts to the origin. - Refund(Balance), - /// The transaction increased storage consumption. - /// - /// This means that the specified amount of balance was transferred from the origin - /// to the involved deposit accounts. - Charge(Balance), + /// The transaction reduced storage consumption. + /// + /// This means that the specified amount of balance was transferred from the involved + /// deposit accounts to the origin. + Refund(Balance), + /// The transaction increased storage consumption. + /// + /// This means that the specified amount of balance was transferred from the origin + /// to the involved deposit accounts. + Charge(Balance), } impl Default for StorageDeposit { - fn default() -> Self { - Self::Charge(Zero::zero()) - } + fn default() -> Self { + Self::Charge(Zero::zero()) + } } impl StorageDeposit { - /// Returns how much balance is charged or `0` in case of a refund. - pub fn charge_or_zero(&self) -> Balance { - match self { - Self::Charge(amount) => *amount, - Self::Refund(_) => Zero::zero(), - } - } + /// Returns how much balance is charged or `0` in case of a refund. + pub fn charge_or_zero(&self) -> Balance { + match self { + Self::Charge(amount) => *amount, + Self::Refund(_) => Zero::zero(), + } + } - pub fn is_zero(&self) -> bool { - match self { - Self::Charge(amount) => amount.is_zero(), - Self::Refund(amount) => amount.is_zero(), - } - } + pub fn is_zero(&self) -> bool { + match self { + Self::Charge(amount) => amount.is_zero(), + Self::Refund(amount) => amount.is_zero(), + } + } } impl StorageDeposit where - Balance: Saturating + Ord + Copy, + Balance: Saturating + Ord + Copy, { - /// This is essentially a saturating signed add. - pub fn saturating_add(&self, rhs: &Self) -> Self { - use StorageDeposit::*; - match (self, rhs) { - (Charge(lhs), Charge(rhs)) => Charge(lhs.saturating_add(*rhs)), - (Refund(lhs), Refund(rhs)) => Refund(lhs.saturating_add(*rhs)), - (Charge(lhs), Refund(rhs)) => - if lhs >= rhs { - Charge(lhs.saturating_sub(*rhs)) - } else { - Refund(rhs.saturating_sub(*lhs)) - }, - (Refund(lhs), Charge(rhs)) => - if lhs > rhs { - Refund(lhs.saturating_sub(*rhs)) - } else { - Charge(rhs.saturating_sub(*lhs)) - }, - } - } + /// This is essentially a saturating signed add. + pub fn saturating_add(&self, rhs: &Self) -> Self { + use StorageDeposit::*; + match (self, rhs) { + (Charge(lhs), Charge(rhs)) => Charge(lhs.saturating_add(*rhs)), + (Refund(lhs), Refund(rhs)) => Refund(lhs.saturating_add(*rhs)), + (Charge(lhs), Refund(rhs)) => { + if lhs >= rhs { + Charge(lhs.saturating_sub(*rhs)) + } else { + Refund(rhs.saturating_sub(*lhs)) + } + } + (Refund(lhs), Charge(rhs)) => { + if lhs > rhs { + Refund(lhs.saturating_sub(*rhs)) + } else { + Charge(rhs.saturating_sub(*lhs)) + } + } + } + } - /// This is essentially a saturating signed sub. - pub fn saturating_sub(&self, rhs: &Self) -> Self { - use StorageDeposit::*; - match (self, rhs) { - (Charge(lhs), Refund(rhs)) => Charge(lhs.saturating_add(*rhs)), - (Refund(lhs), Charge(rhs)) => Refund(lhs.saturating_add(*rhs)), - (Charge(lhs), Charge(rhs)) => - if lhs >= rhs { - Charge(lhs.saturating_sub(*rhs)) - } else { - Refund(rhs.saturating_sub(*lhs)) - }, - (Refund(lhs), Refund(rhs)) => - if lhs > rhs { - Refund(lhs.saturating_sub(*rhs)) - } else { - Charge(rhs.saturating_sub(*lhs)) - }, - } - } + /// This is essentially a saturating signed sub. + pub fn saturating_sub(&self, rhs: &Self) -> Self { + use StorageDeposit::*; + match (self, rhs) { + (Charge(lhs), Refund(rhs)) => Charge(lhs.saturating_add(*rhs)), + (Refund(lhs), Charge(rhs)) => Refund(lhs.saturating_add(*rhs)), + (Charge(lhs), Charge(rhs)) => { + if lhs >= rhs { + Charge(lhs.saturating_sub(*rhs)) + } else { + Refund(rhs.saturating_sub(*lhs)) + } + } + (Refund(lhs), Refund(rhs)) => { + if lhs > rhs { + Refund(lhs.saturating_sub(*rhs)) + } else { + Charge(rhs.saturating_sub(*lhs)) + } + } + } + } - /// If the amount of deposit (this type) is constrained by a `limit` this calculates how - /// much balance (if any) is still available from this limit. - /// - /// # Note - /// - /// In case of a refund the return value can be larger than `limit`. - pub fn available(&self, limit: &Balance) -> Balance { - use StorageDeposit::*; - match self { - Charge(amount) => limit.saturating_sub(*amount), - Refund(amount) => limit.saturating_add(*amount), - } - } + /// If the amount of deposit (this type) is constrained by a `limit` this calculates + /// how much balance (if any) is still available from this limit. + /// + /// # Note + /// + /// In case of a refund the return value can be larger than `limit`. + pub fn available(&self, limit: &Balance) -> Balance { + use StorageDeposit::*; + match self { + Charge(amount) => limit.saturating_sub(*amount), + Refund(amount) => limit.saturating_add(*amount), + } + } } -/// Result type of a `bare_call` or `bare_instantiate` call as well as `ContractsApi::call` and -/// `ContractsApi::instantiate`. +/// Result type of a `bare_call` or `bare_instantiate` call as well as +/// `ContractsApi::call` and `ContractsApi::instantiate`. /// /// It contains the execution result together with some auxiliary information. /// /// #Note /// -/// It has been extended to include `events` at the end of the struct while not bumping the -/// `ContractsApi` version. Therefore when SCALE decoding a `ContractResult` its trailing data -/// should be ignored to avoid any potential compatibility issues. +/// It has been extended to include `events` at the end of the struct while not bumping +/// the `ContractsApi` version. Therefore when SCALE decoding a `ContractResult` its +/// trailing data should be ignored to avoid any potential compatibility issues. #[derive(Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo)] pub struct ContractResult { - /// How much weight was consumed during execution. - pub gas_consumed: Weight, - /// How much weight is required as gas limit in order to execute this call. - /// - /// This value should be used to determine the weight limit for on-chain execution. - /// - /// # Note - /// - /// This can only be different from [`Self::gas_consumed`] when weight pre charging - /// is used. Currently, only `seal_call_runtime` makes use of pre charging. - /// Additionally, any `seal_call` or `seal_instantiate` makes use of pre-charging - /// when a non-zero `gas_limit` argument is supplied. - pub gas_required: Weight, - /// How much balance was paid by the origin into the contract's deposit account in order to - /// pay for storage. - /// - /// The storage deposit is never actually charged from the origin in case of [`Self::result`] - /// is `Err`. This is because on error all storage changes are rolled back including the - /// payment of the deposit. - pub storage_deposit: StorageDeposit, - /// The execution result of the vm binary code. - pub result: Result, + /// How much weight was consumed during execution. + pub gas_consumed: Weight, + /// How much weight is required as gas limit in order to execute this call. + /// + /// This value should be used to determine the weight limit for on-chain execution. + /// + /// # Note + /// + /// This can only be different from [`Self::gas_consumed`] when weight pre charging + /// is used. Currently, only `seal_call_runtime` makes use of pre charging. + /// Additionally, any `seal_call` or `seal_instantiate` makes use of pre-charging + /// when a non-zero `gas_limit` argument is supplied. + pub gas_required: Weight, + /// How much balance was paid by the origin into the contract's deposit account in + /// order to pay for storage. + /// + /// The storage deposit is never actually charged from the origin in case of + /// [`Self::result`] is `Err`. This is because on error all storage changes are + /// rolled back including the payment of the deposit. + pub storage_deposit: StorageDeposit, + /// The execution result of the vm binary code. + pub result: Result, } /// Output of a contract call or instantiation which ran to completion. #[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, TypeInfo, Default)] pub struct ExecReturnValue { - /// Flags passed along by `seal_return`. Empty when `seal_return` was never called. - pub flags: ReturnFlags, - /// Buffer passed along by `seal_return`. Empty when `seal_return` was never called. - pub data: Vec, + /// Flags passed along by `seal_return`. Empty when `seal_return` was never called. + pub flags: ReturnFlags, + /// Buffer passed along by `seal_return`. Empty when `seal_return` was never called. + pub data: Vec, } impl ExecReturnValue { - /// The contract did revert all storage changes. - pub fn did_revert(&self) -> bool { - self.flags.contains(ReturnFlags::REVERT) - } + /// The contract did revert all storage changes. + pub fn did_revert(&self) -> bool { + self.flags.contains(ReturnFlags::REVERT) + } } /// The result of a successful contract instantiation. #[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, TypeInfo)] pub struct InstantiateReturnValue { - /// The output of the called constructor. - pub result: ExecReturnValue, - /// The address of the new contract. - pub addr: H160, + /// The output of the called constructor. + pub result: ExecReturnValue, + /// The address of the new contract. + pub addr: H160, } /// The result of successfully uploading a contract. #[derive(Clone, PartialEq, Eq, Encode, Decode, MaxEncodedLen, RuntimeDebug, TypeInfo)] pub struct CodeUploadReturnValue { - /// The key under which the new code is stored. - pub code_hash: sp_core::H256, - /// The deposit that was reserved at the caller. Is zero when the code already existed. - pub deposit: Balance, + /// The key under which the new code is stored. + pub code_hash: sp_core::H256, + /// The deposit that was reserved at the caller. Is zero when the code already + /// existed. + pub deposit: Balance, } /// Result type of a `bare_code_upload` call. -pub type CodeUploadResult = Result, DispatchError>; +pub type CodeUploadResult = + Result, DispatchError>; From 4797cc4f848d67697910158339359ee25d866a54 Mon Sep 17 00:00:00 2001 From: AlexD10S Date: Wed, 24 Sep 2025 20:32:59 +0200 Subject: [PATCH 04/14] chore: format in tests --- crates/revive/Cargo.toml | 1 - .../solidity-abi/sol-cross-contract/e2e_tests.rs | 4 ++-- integration-tests/solidity-abi/sol-encoding/e2e_tests.rs | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/crates/revive/Cargo.toml b/crates/revive/Cargo.toml index 1ea8d80561c..14419d8c037 100644 --- a/crates/revive/Cargo.toml +++ b/crates/revive/Cargo.toml @@ -33,7 +33,6 @@ std = [ "scale-info/std", "frame-support/std", "ink_primitives/std", - # "sp-weights/std", "sp-core/std", "sp-runtime/std", "serde/std", diff --git a/integration-tests/solidity-abi/sol-cross-contract/e2e_tests.rs b/integration-tests/solidity-abi/sol-cross-contract/e2e_tests.rs index 7df0d806c0c..0d6ecf6aeee 100644 --- a/integration-tests/solidity-abi/sol-cross-contract/e2e_tests.rs +++ b/integration-tests/solidity-abi/sol-cross-contract/e2e_tests.rs @@ -12,8 +12,8 @@ use ink::{ SolEncode, primitives::DepositLimit, }; -use ink_sandbox::frame_system::pallet_prelude::OriginFor; use ink_revive::ExecReturnValue; +use ink_sandbox::frame_system::pallet_prelude::OriginFor; const STORAGE_DEPOSIT_LIMIT: DepositLimit = DepositLimit::UnsafeOnlyForDryRun; @@ -175,7 +175,7 @@ impl ContractSandbox { let call_raw = result.result.expect("sandbox call contract failed"); ExecReturnValue { flags: call_raw.flags, - data: call_raw.data + data: call_raw.data, } } } diff --git a/integration-tests/solidity-abi/sol-encoding/e2e_tests.rs b/integration-tests/solidity-abi/sol-encoding/e2e_tests.rs index a5a5285907a..ca45c8a58c6 100644 --- a/integration-tests/solidity-abi/sol-encoding/e2e_tests.rs +++ b/integration-tests/solidity-abi/sol-encoding/e2e_tests.rs @@ -6,13 +6,13 @@ use ink::{ primitives::DepositLimit, }; use ink_e2e::ContractsRegistry; +use ink_revive::ExecReturnValue; use ink_sandbox::{ DefaultSandbox, Sandbox, api::prelude::*, frame_system::pallet_prelude::OriginFor, }; -use ink_revive::ExecReturnValue; const STORAGE_DEPOSIT_LIMIT: DepositLimit = DepositLimit::UnsafeOnlyForDryRun; @@ -127,7 +127,7 @@ impl ContractSandbox { .expect("sandbox call contract failed"); ExecReturnValue { flags: call_raw.flags, - data: call_raw.data + data: call_raw.data, } } } From daf7837b4f6ded224b8ceca877aab4fd36ec953a Mon Sep 17 00:00:00 2001 From: AlexD10S Date: Thu, 25 Sep 2025 09:48:39 +0200 Subject: [PATCH 05/14] docs: licenses in ink_revive files --- crates/revive/src/evm.rs | 17 +++++++++++++++++ crates/revive/src/lib.rs | 14 ++++++++++++++ crates/revive/src/primitives.rs | 17 +++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/crates/revive/src/evm.rs b/crates/revive/src/evm.rs index 03611a9d4a2..77c78ac5bb3 100644 --- a/crates/revive/src/evm.rs +++ b/crates/revive/src/evm.rs @@ -1,3 +1,20 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + use alloc::{ collections::BTreeMap, string::String, diff --git a/crates/revive/src/lib.rs b/crates/revive/src/lib.rs index 192de0ab247..dde5d22af58 100644 --- a/crates/revive/src/lib.rs +++ b/crates/revive/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright (C) Use Ink (UK) Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #![cfg_attr(not(feature = "std"), no_std)] extern crate alloc; diff --git a/crates/revive/src/primitives.rs b/crates/revive/src/primitives.rs index 71ae9df92aa..bb54c3fbaf9 100644 --- a/crates/revive/src/primitives.rs +++ b/crates/revive/src/primitives.rs @@ -1,3 +1,20 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #![cfg_attr(not(feature = "std"), allow(unused_imports))] use alloc::vec::Vec; From 842163e805fb047f17369ec54da89ba683375da5 Mon Sep 17 00:00:00 2001 From: AlexD10S Date: Thu, 25 Sep 2025 14:44:55 +0200 Subject: [PATCH 06/14] refactor: move pallet_revive deps into ink_sandbox --- crates/e2e/sandbox/src/lib.rs | 56 +++++++++++++++++++++++ crates/e2e/src/sandbox_client.rs | 77 +++++--------------------------- 2 files changed, 68 insertions(+), 65 deletions(-) diff --git a/crates/e2e/sandbox/src/lib.rs b/crates/e2e/sandbox/src/lib.rs index 3cae6bb33d9..64d5605d7fc 100644 --- a/crates/e2e/sandbox/src/lib.rs +++ b/crates/e2e/sandbox/src/lib.rs @@ -17,6 +17,10 @@ use frame_system::{ }, }; use ink_primitives::U256; +use ink_revive::evm::{ + CallLog, + CallTrace, +}; pub use macros::{ BlockBuilder, DefaultSandbox, @@ -170,3 +174,55 @@ where let evm_value: U256 = value.into(); native_to_eth_ratio.saturating_mul(evm_value) } + +/// Convert a `pallet_revive::CallTrace` (sandbox) into an `ink_revive::CallTrace` (API). +pub fn to_revive_trace(t: pallet_revive::evm::CallTrace) -> CallTrace { + CallTrace { + from: t.from, + gas: t.gas, + gas_used: t.gas_used, + to: t.to, + input: t.input.0, + output: t.output.0, + error: t.error, + revert_reason: t.revert_reason, + calls: t.calls.into_iter().map(to_revive_trace).collect(), + logs: t + .logs + .into_iter() + .map(|log| { + CallLog { + address: log.address, + topics: log.topics, + data: log.data.0, + ..Default::default() + } + }) + .collect(), + value: t.value, + call_type: to_revive_call_type(t.call_type), + } +} + +/// Convert a `pallet_revive::CallType` into an `ink_revive::evm::CallType`. +fn to_revive_call_type(ct: pallet_revive::evm::CallType) -> ink_revive::evm::CallType { + match ct { + pallet_revive::evm::CallType::Call => ink_revive::evm::CallType::Call, + pallet_revive::evm::CallType::StaticCall => ink_revive::evm::CallType::StaticCall, + pallet_revive::evm::CallType::DelegateCall => { + ink_revive::evm::CallType::DelegateCall + } + pallet_revive::evm::CallType::Create => ink_revive::evm::CallType::Create, + pallet_revive::evm::CallType::Create2 => ink_revive::evm::CallType::Create2, + } +} + +/// Convert a `ink_revive::StorageDeposit` into an `ink_revive::StorageDeposit`. +pub fn to_revive_storage_deposit( + sd: pallet_revive::StorageDeposit, +) -> ink_revive::StorageDeposit { + match sd { + pallet_revive::StorageDeposit::Charge(b) => ink_revive::StorageDeposit::Charge(b), + pallet_revive::StorageDeposit::Refund(b) => ink_revive::StorageDeposit::Refund(b), + } +} diff --git a/crates/e2e/src/sandbox_client.rs b/crates/e2e/src/sandbox_client.rs index 13487470402..e670c211057 100644 --- a/crates/e2e/src/sandbox_client.rs +++ b/crates/e2e/src/sandbox_client.rs @@ -66,10 +66,7 @@ use ink_revive::{ CodeUploadReturnValue, ExecReturnValue, InstantiateReturnValue, - evm::{ - CallLog, - CallTrace, - }, + evm::CallTrace, }; use ink_sandbox::{ AccountIdFor, @@ -81,17 +78,19 @@ use ink_sandbox::{ frame_system::pallet_prelude::OriginFor, pallet_balances, pallet_revive, -}; -use jsonrpsee::core::async_trait; -use pallet_revive::{ - AddressMapper, - MomentOf, - evm::{ - CallTracerConfig, - Trace, - TracerType, + pallet_revive::{ + AddressMapper, + MomentOf, + evm::{ + CallTracerConfig, + Trace, + TracerType, + }, }, + to_revive_storage_deposit, + to_revive_trace, }; +use jsonrpsee::core::async_trait; use scale::Decode; use sp_core::{ Pair as _, @@ -843,55 +842,3 @@ where let origin = RawOrigin::Signed(caller); OriginFor::::from(origin) } - -/// Convert a `pallet_revive::CallTrace` (sandbox) into an `ink_revive::CallTrace` (API). -fn to_revive_trace(t: pallet_revive::evm::CallTrace) -> CallTrace { - CallTrace { - from: t.from, - gas: t.gas, - gas_used: t.gas_used, - to: t.to, - input: t.input.0, - output: t.output.0, - error: t.error, - revert_reason: t.revert_reason, - calls: t.calls.into_iter().map(to_revive_trace).collect(), - logs: t - .logs - .into_iter() - .map(|log| { - CallLog { - address: log.address, - topics: log.topics, - data: log.data.0, - ..Default::default() - } - }) - .collect(), - value: t.value, - call_type: to_revive_call_type(t.call_type), - } -} - -/// Convert a `pallet_revive::CallType` into an `ink_revive::evm::CallType`. -fn to_revive_call_type(ct: pallet_revive::evm::CallType) -> ink_revive::evm::CallType { - match ct { - pallet_revive::evm::CallType::Call => ink_revive::evm::CallType::Call, - pallet_revive::evm::CallType::StaticCall => ink_revive::evm::CallType::StaticCall, - pallet_revive::evm::CallType::DelegateCall => { - ink_revive::evm::CallType::DelegateCall - } - pallet_revive::evm::CallType::Create => ink_revive::evm::CallType::Create, - pallet_revive::evm::CallType::Create2 => ink_revive::evm::CallType::Create2, - } -} - -/// Convert a `ink_revive::StorageDeposit` into an `ink_revive::StorageDeposit`. -fn to_revive_storage_deposit( - sd: pallet_revive::StorageDeposit, -) -> ink_revive::StorageDeposit { - match sd { - pallet_revive::StorageDeposit::Charge(b) => ink_revive::StorageDeposit::Charge(b), - pallet_revive::StorageDeposit::Refund(b) => ink_revive::StorageDeposit::Refund(b), - } -} From bfbbdaa4e380071821eb85ce453239c9c5df486b Mon Sep 17 00:00:00 2001 From: AlexD10S Date: Thu, 25 Sep 2025 14:50:43 +0200 Subject: [PATCH 07/14] refactor: rename ink_revive to ink_revive_types --- Cargo.lock | 6 ++-- Cargo.toml | 4 +-- crates/e2e/Cargo.toml | 4 +-- crates/e2e/sandbox/Cargo.toml | 4 +-- crates/e2e/sandbox/src/lib.rs | 35 ++++++++++++------- crates/e2e/src/backend.rs | 2 +- crates/e2e/src/contract_results.rs | 2 +- crates/e2e/src/error.rs | 2 +- crates/e2e/src/lib.rs | 2 +- crates/e2e/src/sandbox_client.rs | 2 +- crates/e2e/src/subxt_client.rs | 2 +- crates/e2e/src/xts.rs | 2 +- crates/{revive => revive-types}/Cargo.toml | 2 +- crates/{revive => revive-types}/src/evm.rs | 0 .../{revive => revive-types}/src/hex_serde.rs | 0 crates/{revive => revive-types}/src/lib.rs | 0 .../src/primitives.rs | 0 .../sol-cross-contract/Cargo.toml | 2 +- .../sol-cross-contract/e2e_tests.rs | 2 +- .../solidity-abi/sol-encoding/Cargo.toml | 2 +- .../solidity-abi/sol-encoding/e2e_tests.rs | 2 +- 21 files changed, 43 insertions(+), 34 deletions(-) rename crates/{revive => revive-types}/Cargo.toml (97%) rename crates/{revive => revive-types}/src/evm.rs (100%) rename crates/{revive => revive-types}/src/hex_serde.rs (100%) rename crates/{revive => revive-types}/src/lib.rs (100%) rename crates/{revive => revive-types}/src/primitives.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 7a1e0b42b7a..92d60251280 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3485,7 +3485,7 @@ dependencies = [ "ink_e2e_macro", "ink_env", "ink_primitives 6.0.0-alpha.4", - "ink_revive", + "ink_revive_types", "ink_sandbox", "itertools 0.14.0", "jsonrpsee", @@ -3714,7 +3714,7 @@ dependencies = [ ] [[package]] -name = "ink_revive" +name = "ink_revive_types" version = "6.0.0-alpha.4" dependencies = [ "alloy-core", @@ -3737,7 +3737,7 @@ dependencies = [ "frame-support", "frame-system", "ink_primitives 6.0.0-alpha.4", - "ink_revive", + "ink_revive_types", "pallet-balances", "pallet-revive", "pallet-timestamp", diff --git a/Cargo.toml b/Cargo.toml index 3dff31d072c..0cafe5d2405 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ members = [ "crates/ink/ir", "crates/ink/macro", "crates/metadata", - "crates/revive", + "crates/revive-types", "crates/prelude", "crates/primitives", "crates/storage", @@ -123,7 +123,7 @@ ink_macro = { version = "=6.0.0-alpha.4", path = "crates/ink/macro", default-fea ink_metadata = { version = "=6.0.0-alpha.4", path = "crates/metadata", default-features = false } ink_prelude = { version = "=6.0.0-alpha.4", path = "crates/prelude", default-features = false } ink_primitives = { version = "=6.0.0-alpha.4", path = "crates/primitives", default-features = false } -ink_revive = { version = "=6.0.0-alpha.4", path = "crates/revive", default-features = false } +ink_revive_types = { version = "=6.0.0-alpha.4", path = "crates/revive-types", default-features = false } ink_storage = { version = "=6.0.0-alpha.4", path = "crates/storage", default-features = false } ink_storage_traits = { version = "=6.0.0-alpha.4", path = "crates/storage/traits", default-features = false } diff --git a/crates/e2e/Cargo.toml b/crates/e2e/Cargo.toml index a4186782dec..c65f1cc9e0b 100644 --- a/crates/e2e/Cargo.toml +++ b/crates/e2e/Cargo.toml @@ -19,7 +19,7 @@ ink_e2e_macro = { workspace = true, default-features = true } ink = { workspace = true, default-features = true } ink_env = { workspace = true, default-features = true } ink_primitives = { workspace = true, default-features = true } -ink_revive = { workspace = true, default-features = true } +ink_revive_types = { workspace = true, default-features = true } ink_sandbox = { version = "=6.0.0-alpha.4", path = "./sandbox", optional = true } cargo_metadata = { workspace = true } @@ -71,7 +71,7 @@ std = [ "sp-runtime-interface/std", "sp-weights/std", "ink_e2e_macro/std", - "ink_revive/std", + "ink_revive_types/std", "ink_sandbox?/std", "frame-support/std", ] diff --git a/crates/e2e/sandbox/Cargo.toml b/crates/e2e/sandbox/Cargo.toml index dacc4dcdb7d..608d2f20382 100644 --- a/crates/e2e/sandbox/Cargo.toml +++ b/crates/e2e/sandbox/Cargo.toml @@ -23,7 +23,7 @@ sp-externalities = { workspace = true } sp-runtime = { workspace = true } sp-io = { workspace = true } ink_primitives = { workspace = true } -ink_revive = { workspace = true } +ink_revive_types = { workspace = true } paste = { workspace = true } scale-info = { workspace = true } @@ -38,7 +38,7 @@ std = [ "frame-system/std", "frame-metadata/std", "ink_primitives/std", - "ink_revive/std", + "ink_revive_types/std", "pallet-balances/std", "pallet-revive/std", "pallet-timestamp/std", diff --git a/crates/e2e/sandbox/src/lib.rs b/crates/e2e/sandbox/src/lib.rs index 64d5605d7fc..4f88bb95f34 100644 --- a/crates/e2e/sandbox/src/lib.rs +++ b/crates/e2e/sandbox/src/lib.rs @@ -17,7 +17,7 @@ use frame_system::{ }, }; use ink_primitives::U256; -use ink_revive::evm::{ +use ink_revive_types::evm::{ CallLog, CallTrace, }; @@ -175,7 +175,8 @@ where native_to_eth_ratio.saturating_mul(evm_value) } -/// Convert a `pallet_revive::CallTrace` (sandbox) into an `ink_revive::CallTrace` (API). +/// Convert a `pallet_revive::CallTrace` (sandbox) into an `ink_revive_types::CallTrace` +/// (API). pub fn to_revive_trace(t: pallet_revive::evm::CallTrace) -> CallTrace { CallTrace { from: t.from, @@ -204,25 +205,33 @@ pub fn to_revive_trace(t: pallet_revive::evm::CallTrace) -> CallTrace { } } -/// Convert a `pallet_revive::CallType` into an `ink_revive::evm::CallType`. -fn to_revive_call_type(ct: pallet_revive::evm::CallType) -> ink_revive::evm::CallType { +/// Convert a `pallet_revive::CallType` into an `ink_revive_types::evm::CallType`. +fn to_revive_call_type( + ct: pallet_revive::evm::CallType, +) -> ink_revive_types::evm::CallType { match ct { - pallet_revive::evm::CallType::Call => ink_revive::evm::CallType::Call, - pallet_revive::evm::CallType::StaticCall => ink_revive::evm::CallType::StaticCall, + pallet_revive::evm::CallType::Call => ink_revive_types::evm::CallType::Call, + pallet_revive::evm::CallType::StaticCall => { + ink_revive_types::evm::CallType::StaticCall + } pallet_revive::evm::CallType::DelegateCall => { - ink_revive::evm::CallType::DelegateCall + ink_revive_types::evm::CallType::DelegateCall } - pallet_revive::evm::CallType::Create => ink_revive::evm::CallType::Create, - pallet_revive::evm::CallType::Create2 => ink_revive::evm::CallType::Create2, + pallet_revive::evm::CallType::Create => ink_revive_types::evm::CallType::Create, + pallet_revive::evm::CallType::Create2 => ink_revive_types::evm::CallType::Create2, } } -/// Convert a `ink_revive::StorageDeposit` into an `ink_revive::StorageDeposit`. +/// Convert a `pallet_revive::StorageDeposit` into an `ink_revive_types::StorageDeposit`. pub fn to_revive_storage_deposit( sd: pallet_revive::StorageDeposit, -) -> ink_revive::StorageDeposit { +) -> ink_revive_types::StorageDeposit { match sd { - pallet_revive::StorageDeposit::Charge(b) => ink_revive::StorageDeposit::Charge(b), - pallet_revive::StorageDeposit::Refund(b) => ink_revive::StorageDeposit::Refund(b), + pallet_revive::StorageDeposit::Charge(b) => { + ink_revive_types::StorageDeposit::Charge(b) + } + pallet_revive::StorageDeposit::Refund(b) => { + ink_revive_types::StorageDeposit::Refund(b) + } } } diff --git a/crates/e2e/src/backend.rs b/crates/e2e/src/backend.rs index 74907d79dbb..958c7d8c304 100644 --- a/crates/e2e/src/backend.rs +++ b/crates/e2e/src/backend.rs @@ -21,7 +21,7 @@ use ink_primitives::{ H160, abi::AbiEncodeWith, }; -use ink_revive::evm::CallTrace; +use ink_revive_types::evm::CallTrace; use jsonrpsee::core::async_trait; use sp_weights::Weight; use subxt::dynamic::Value; diff --git a/crates/e2e/src/contract_results.rs b/crates/e2e/src/contract_results.rs index 07de4163540..5bb49c0fa27 100644 --- a/crates/e2e/src/contract_results.rs +++ b/crates/e2e/src/contract_results.rs @@ -36,7 +36,7 @@ use ink_primitives::{ H256, MessageResult, }; -use ink_revive::{ +use ink_revive_types::{ CodeUploadResult, ExecReturnValue, InstantiateReturnValue, diff --git a/crates/e2e/src/error.rs b/crates/e2e/src/error.rs index 369d233d922..8fb99044301 100644 --- a/crates/e2e/src/error.rs +++ b/crates/e2e/src/error.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use ink_revive::evm::CallTrace; +use ink_revive_types::evm::CallTrace; use std::fmt; /// An error occurred while interacting with the E2E backend. diff --git a/crates/e2e/src/lib.rs b/crates/e2e/src/lib.rs index 34b414192ca..096d9e96b5d 100644 --- a/crates/e2e/src/lib.rs +++ b/crates/e2e/src/lib.rs @@ -53,7 +53,7 @@ pub use contract_results::{ UploadResult, }; pub use ink_e2e_macro::test; -pub use ink_revive::evm::CallTrace; +pub use ink_revive_types::evm::CallTrace; pub use node_proc::{ TestNodeProcess, TestNodeProcessBuilder, diff --git a/crates/e2e/src/sandbox_client.rs b/crates/e2e/src/sandbox_client.rs index e670c211057..5139bc390d5 100644 --- a/crates/e2e/src/sandbox_client.rs +++ b/crates/e2e/src/sandbox_client.rs @@ -62,7 +62,7 @@ use ink_primitives::{ U256, abi::AbiEncodeWith, }; -use ink_revive::{ +use ink_revive_types::{ CodeUploadReturnValue, ExecReturnValue, InstantiateReturnValue, diff --git a/crates/e2e/src/subxt_client.rs b/crates/e2e/src/subxt_client.rs index 110e4757785..5bc722049d7 100644 --- a/crates/e2e/src/subxt_client.rs +++ b/crates/e2e/src/subxt_client.rs @@ -73,7 +73,7 @@ use ink_primitives::{ DepositLimit, abi::AbiEncodeWith, }; -use ink_revive::evm::CallTrace; +use ink_revive_types::evm::CallTrace; use jsonrpsee::core::async_trait; use scale::{ Decode, diff --git a/crates/e2e/src/xts.rs b/crates/e2e/src/xts.rs index 025869c9ec8..0e9e488e83b 100644 --- a/crates/e2e/src/xts.rs +++ b/crates/e2e/src/xts.rs @@ -29,7 +29,7 @@ use ink_primitives::{ Address, DepositLimit, }; -use ink_revive::{ +use ink_revive_types::{ CodeUploadResult, evm::{ CallTrace, diff --git a/crates/revive/Cargo.toml b/crates/revive-types/Cargo.toml similarity index 97% rename from crates/revive/Cargo.toml rename to crates/revive-types/Cargo.toml index 14419d8c037..5a4a427993f 100644 --- a/crates/revive/Cargo.toml +++ b/crates/revive-types/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "ink_revive" +name = "ink_revive_types" version.workspace = true authors.workspace = true edition.workspace = true diff --git a/crates/revive/src/evm.rs b/crates/revive-types/src/evm.rs similarity index 100% rename from crates/revive/src/evm.rs rename to crates/revive-types/src/evm.rs diff --git a/crates/revive/src/hex_serde.rs b/crates/revive-types/src/hex_serde.rs similarity index 100% rename from crates/revive/src/hex_serde.rs rename to crates/revive-types/src/hex_serde.rs diff --git a/crates/revive/src/lib.rs b/crates/revive-types/src/lib.rs similarity index 100% rename from crates/revive/src/lib.rs rename to crates/revive-types/src/lib.rs diff --git a/crates/revive/src/primitives.rs b/crates/revive-types/src/primitives.rs similarity index 100% rename from crates/revive/src/primitives.rs rename to crates/revive-types/src/primitives.rs diff --git a/integration-tests/solidity-abi/sol-cross-contract/Cargo.toml b/integration-tests/solidity-abi/sol-cross-contract/Cargo.toml index 40b5ce0e40a..dfc7b82d33e 100755 --- a/integration-tests/solidity-abi/sol-cross-contract/Cargo.toml +++ b/integration-tests/solidity-abi/sol-cross-contract/Cargo.toml @@ -12,7 +12,7 @@ sha3 = { version = "0.10", default-features = false } [dev-dependencies] ink_e2e = { path = "../../../crates/e2e", features = ["sandbox"] } ink_sandbox = { path = "../../../crates/e2e/sandbox" } -ink_revive = { path = "../../../crates/revive" } +ink_revive_types = { path = "../../../crates/revive-types" } sha3 = { version = "0.10" } other-contract-sol = { path = "other-contract-sol" } diff --git a/integration-tests/solidity-abi/sol-cross-contract/e2e_tests.rs b/integration-tests/solidity-abi/sol-cross-contract/e2e_tests.rs index 0d6ecf6aeee..dc2a13959bb 100644 --- a/integration-tests/solidity-abi/sol-cross-contract/e2e_tests.rs +++ b/integration-tests/solidity-abi/sol-cross-contract/e2e_tests.rs @@ -12,7 +12,7 @@ use ink::{ SolEncode, primitives::DepositLimit, }; -use ink_revive::ExecReturnValue; +use ink_revive_types::ExecReturnValue; use ink_sandbox::frame_system::pallet_prelude::OriginFor; const STORAGE_DEPOSIT_LIMIT: DepositLimit = DepositLimit::UnsafeOnlyForDryRun; diff --git a/integration-tests/solidity-abi/sol-encoding/Cargo.toml b/integration-tests/solidity-abi/sol-encoding/Cargo.toml index 8d9b76e2e6d..8ac0cfcac38 100755 --- a/integration-tests/solidity-abi/sol-encoding/Cargo.toml +++ b/integration-tests/solidity-abi/sol-encoding/Cargo.toml @@ -11,7 +11,7 @@ ink = { path = "../../../crates/ink", default-features = false } [dev-dependencies] ink_e2e = { path = "../../../crates/e2e", features = ["sandbox"] } ink_sandbox = { path = "../../../crates/e2e/sandbox" } -ink_revive = { path = "../../../crates/revive" } +ink_revive_types = { path = "../../../crates/revive-types" } sha3 = { version = "0.10" } [lib] diff --git a/integration-tests/solidity-abi/sol-encoding/e2e_tests.rs b/integration-tests/solidity-abi/sol-encoding/e2e_tests.rs index ca45c8a58c6..1e81ae71345 100644 --- a/integration-tests/solidity-abi/sol-encoding/e2e_tests.rs +++ b/integration-tests/solidity-abi/sol-encoding/e2e_tests.rs @@ -6,7 +6,7 @@ use ink::{ primitives::DepositLimit, }; use ink_e2e::ContractsRegistry; -use ink_revive::ExecReturnValue; +use ink_revive_types::ExecReturnValue; use ink_sandbox::{ DefaultSandbox, Sandbox, From a0d173b93bc7ced6387ee79a636fe528fb01502f Mon Sep 17 00:00:00 2001 From: AlexD10S Date: Fri, 26 Sep 2025 08:42:47 +0200 Subject: [PATCH 08/14] docs: description and version in ink_revive_types --- crates/revive-types/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/revive-types/Cargo.toml b/crates/revive-types/Cargo.toml index 5a4a427993f..f8fb5e5c98c 100644 --- a/crates/revive-types/Cargo.toml +++ b/crates/revive-types/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "ink_revive_types" version.workspace = true -authors.workspace = true +authors = ["Use Ink ", "Parity Technologies "] edition.workspace = true license.workspace = true -description = "ink! revive primitives (placeholder)" +description = "Primitives copied from Parity's Polkadot SDK module `pallet-revive`. Copied to reduce the build times of ink! contracts." repository.workspace = true homepage.workspace = true keywords.workspace = true From dec49d12f077af993ab04575af72320aa5b4eba5 Mon Sep 17 00:00:00 2001 From: AlexD10S Date: Fri, 26 Sep 2025 08:48:26 +0200 Subject: [PATCH 09/14] refactor: remove some unnecesary dependencies --- Cargo.lock | 2 -- crates/revive-types/Cargo.toml | 4 ---- crates/revive-types/src/primitives.rs | 9 ++++++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 92d60251280..21bc59fed67 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3719,13 +3719,11 @@ version = "6.0.0-alpha.4" dependencies = [ "alloy-core", "derive_more 2.0.1", - "frame-support", "ink_primitives 6.0.0-alpha.4", "pallet-revive-uapi", "parity-scale-codec", "scale-info", "serde", - "sp-core", "sp-runtime", ] diff --git a/crates/revive-types/Cargo.toml b/crates/revive-types/Cargo.toml index f8fb5e5c98c..b4adf252d7b 100644 --- a/crates/revive-types/Cargo.toml +++ b/crates/revive-types/Cargo.toml @@ -15,12 +15,10 @@ path = "src/lib.rs" [dependencies] scale = { workspace = true } -frame-support = { workspace = true } scale-info = { workspace = true } serde = { workspace = true, features = ["derive"] } ink_primitives = { workspace = true } derive_more = { workspace = true, features = ["from", "try_into"] } -sp-core = { workspace = true } sp-runtime = { workspace = true } pallet-revive-uapi = { workspace = true, features = ["scale"] } alloy-core = { workspace = true, features = ["sol-types"] } @@ -31,9 +29,7 @@ std = [ "alloy-core/std", "scale/std", "scale-info/std", - "frame-support/std", "ink_primitives/std", - "sp-core/std", "sp-runtime/std", "serde/std", ] diff --git a/crates/revive-types/src/primitives.rs b/crates/revive-types/src/primitives.rs index bb54c3fbaf9..1b41461f70f 100644 --- a/crates/revive-types/src/primitives.rs +++ b/crates/revive-types/src/primitives.rs @@ -18,8 +18,11 @@ #![cfg_attr(not(feature = "std"), allow(unused_imports))] use alloc::vec::Vec; -use frame_support::weights::Weight; -use ink_primitives::H160; +use ink_primitives::{ + H160, + H256, + Weight, +}; use pallet_revive_uapi::ReturnFlags; use scale::{ Decode, @@ -215,7 +218,7 @@ pub struct InstantiateReturnValue { #[derive(Clone, PartialEq, Eq, Encode, Decode, MaxEncodedLen, RuntimeDebug, TypeInfo)] pub struct CodeUploadReturnValue { /// The key under which the new code is stored. - pub code_hash: sp_core::H256, + pub code_hash: H256, /// The deposit that was reserved at the caller. Is zero when the code already /// existed. pub deposit: Balance, From 1ded365d9dddba599c245bb50c64cabef8efb909 Mon Sep 17 00:00:00 2001 From: AlexD10S Date: Thu, 25 Sep 2025 09:36:30 +0200 Subject: [PATCH 10/14] chore: upgrade some dependencies --- Cargo.lock | 1418 ++++++++++++++++++++++++++++++++++++++-------------- Cargo.toml | 12 +- 2 files changed, 1044 insertions(+), 386 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 21bc59fed67..09c45420fcd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -133,9 +133,9 @@ dependencies = [ [[package]] name = "alloy-eips" -version = "1.0.30" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a15b4b0f6bab47aae017d52bb5a739bda381553c09fb9918b7172721ef5f5de" +checksum = "4bfec530782b30151e2564edf3c900f1fa6852128b7a993e458e8e3815d8b915" dependencies = [ "alloy-eip2124", "alloy-eip2930", @@ -178,7 +178,7 @@ dependencies = [ "derive_more 2.0.1", "foldhash", "hashbrown 0.15.5", - "indexmap 2.11.1", + "indexmap 2.11.4", "itoa", "k256", "keccak-asm", @@ -216,9 +216,9 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "1.0.30" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1b3b1078b8775077525bc9fe9f6577e815ceaecd6c412a4f3b4d8aa2836e8f6" +checksum = "19c3835bdc128f2f3418f5d6c76aec63a245d72973e0eaacc9720aa0787225c5" dependencies = [ "alloy-primitives", "serde", @@ -248,7 +248,7 @@ dependencies = [ "alloy-sol-macro-input", "const-hex", "heck", - "indexmap 2.11.1", + "indexmap 2.11.4", "proc-macro-error2", "proc-macro2", "quote", @@ -356,9 +356,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.99" +version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" [[package]] name = "approx" @@ -853,9 +853,9 @@ dependencies = [ [[package]] name = "async-fs" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f7e37c0ed80b2a977691c47dae8625cfb21e205827106c64f7c588766b2e50" +checksum = "8034a681df4aed8b8edbd7fbe472401ecf009251c8b40556b304567052e294c5" dependencies = [ "async-lock", "blocking", @@ -864,11 +864,11 @@ dependencies = [ [[package]] name = "async-io" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19634d6336019ef220f09fd31168ce5c184b295cbf80345437cc36094ef223ca" +checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" dependencies = [ - "async-lock", + "autocfg", "cfg-if", "concurrent-queue", "futures-io", @@ -877,7 +877,7 @@ dependencies = [ "polling", "rustix", "slab", - "windows-sys 0.60.2", + "windows-sys 0.61.0", ] [[package]] @@ -904,9 +904,9 @@ dependencies = [ [[package]] name = "async-process" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65daa13722ad51e6ab1a1b9c01299142bc75135b337923cfa10e79bbbd669f00" +checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75" dependencies = [ "async-channel", "async-io", @@ -922,9 +922,9 @@ dependencies = [ [[package]] name = "async-signal" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f567af260ef69e1d52c2b560ce0ea230763e6fbb9214a85d768760a920e3e3c1" +checksum = "43c070bbf59cd3570b6b2dd54cd772527c7c3620fce8be898406dd3ed6adc64c" dependencies = [ "async-io", "async-lock", @@ -935,7 +935,7 @@ dependencies = [ "rustix", "signal-hook-registry", "slab", - "windows-sys 0.60.2", + "windows-sys 0.61.0", ] [[package]] @@ -1049,6 +1049,17 @@ dependencies = [ "parity-scale-codec", ] +[[package]] +name = "binary-merkle-tree" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "181f5380e435b8ba6d901f8b16fc8908c6f0f8bea8973113d1c8718d89bb1809" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", +] + [[package]] name = "bip32" version = "0.5.3" @@ -1236,9 +1247,9 @@ dependencies = [ [[package]] name = "bollard" -version = "0.18.1" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ccca1260af6a459d75994ad5acc1651bcabcbdbc41467cc9786519ab854c30" +checksum = "8796b390a5b4c86f9f2e8173a68c2791f4fa6b038b84e96dbc01c016d1e6722c" dependencies = [ "base64", "bollard-stubs", @@ -1269,11 +1280,12 @@ dependencies = [ [[package]] name = "bollard-stubs" -version = "1.47.1-rc.27.3.1" +version = "1.49.0-rc.28.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f179cfbddb6e77a5472703d4b30436bff32929c0aa8a9008ecf23d1d3cdd0da" +checksum = "2e7814991259013d5a5bee4ae28657dae0747d843cf06c40f7fc0c2894d6fa38" dependencies = [ "serde", + "serde_json", "serde_repr", "serde_with", ] @@ -1351,11 +1363,11 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.12" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0b03af37dad7a14518b7691d81acb0f8222604ad3d1b02f6b4bed5188c0cd5" +checksum = "e1de8bc0aa9e9385ceb3bf0c152e3a9b9544f6c4a912c8ae504e80c1f0368603" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -1376,13 +1388,22 @@ dependencies = [ "serde", ] +[[package]] +name = "cargo-platform" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "122ec45a44b270afd1402f351b782c676b173e3c3fb28d86ff7ebfb4d86a4ee4" +dependencies = [ + "serde", +] + [[package]] name = "cargo-util-schemas" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dc1a6f7b5651af85774ae5a34b4e8be397d9cf4bc063b7e6dbd99a841837830" dependencies = [ - "semver 1.0.26", + "semver 1.0.27", "serde", "serde-untagged", "serde-value", @@ -1400,7 +1421,7 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform 0.1.9", - "semver 1.0.26", + "semver 1.0.27", "serde", "serde_json", "thiserror 1.0.69", @@ -1415,7 +1436,22 @@ dependencies = [ "camino", "cargo-platform 0.2.0", "cargo-util-schemas", - "semver 1.0.26", + "semver 1.0.27", + "serde", + "serde_json", + "thiserror 2.0.16", +] + +[[package]] +name = "cargo_metadata" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c3f56c207c76c07652489840ff98687dcf213de178ac0974660d6fefeaf5ec6" +dependencies = [ + "camino", + "cargo-platform 0.3.1", + "cargo-util-schemas", + "semver 1.0.27", "serde", "serde_json", "thiserror 2.0.16", @@ -1423,9 +1459,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.36" +version = "1.2.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5252b3d2648e5eedbc1a6f501e3c795e07025c1e93bbf8bbdd6eef7f447a6d54" +checksum = "80f41ae168f955c12fb8960b057d70d0ca153fb83182b57d86380443527be7e9" dependencies = [ "find-msvc-tools", "shlex", @@ -1488,9 +1524,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.47" +version = "4.5.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eac00902d9d136acd712710d71823fb8ac8004ca445a89e73a41d45aa712931" +checksum = "e2134bb3ea021b78629caa971416385309e0131b351b25e01dc16fb54e1b5fae" dependencies = [ "clap_builder", "clap_derive", @@ -1498,9 +1534,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.47" +version = "4.5.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ad9bbf750e73b5884fb8a211a9424a1906c1e156724260fdae972f31d70e1d6" +checksum = "c2ba64afa3c0a6df7fa517765e31314e983f51dda798ffba27b988194fb65dc9" dependencies = [ "anstream", "anstyle", @@ -1538,7 +1574,7 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fde0e0ec90c9dfb3b4b1a0891a7dcd0e2bffde2f7efed5fe7c9bb00e5bfb915e" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -1578,15 +1614,14 @@ dependencies = [ [[package]] name = "const-hex" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dccd746bf9b1038c0507b7cec21eb2b11222db96a2902c96e8c185d6d20fb9c4" +checksum = "b6407bff74dea37e0fa3dc1c1c974e5d46405f0c987bf9997a0762adce71eda6" dependencies = [ "cfg-if", "cpufeatures", - "hex", "proptest", - "serde", + "serde_core", ] [[package]] @@ -1670,14 +1705,14 @@ checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "contract-build" -version = "6.0.0-alpha.3" -source = "git+https://github.com/use-ink/cargo-contract?branch=master#226c0e61f7f4fdefa7f1e21eed711ced287dc3ac" +version = "6.0.0-alpha.4" +source = "git+https://github.com/use-ink/cargo-contract?branch=master#4b8f9f6a5d5a03a599d83e958212a7598bb5762b" dependencies = [ "alloy-json-abi", "anyhow", "blake2", "bollard", - "cargo_metadata 0.21.0", + "cargo_metadata 0.22.0", "clap", "colored", "contract-metadata", @@ -1686,13 +1721,14 @@ dependencies = [ "heck", "hex", "impl-serde", - "ink_metadata 6.0.0-alpha.3", + "ink_metadata 6.0.0-alpha.4 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.4)", "itertools 0.14.0", "parity-scale-codec", "polkavm-linker 0.29.0", "regex", "rustc_version 0.4.1", - "semver 1.0.26", + "rustversion", + "semver 1.0.27", "serde", "serde_json", "sha3", @@ -1700,24 +1736,22 @@ dependencies = [ "term_size", "tokio", "tokio-stream", - "toml 0.8.23", + "toml 0.9.7", "tracing", "url", "uzers", "walkdir", - "which", - "zip 3.0.0", - "zip 4.6.1", + "zip", ] [[package]] name = "contract-metadata" -version = "6.0.0-alpha.3" -source = "git+https://github.com/use-ink/cargo-contract?branch=master#226c0e61f7f4fdefa7f1e21eed711ced287dc3ac" +version = "6.0.0-alpha.4" +source = "git+https://github.com/use-ink/cargo-contract?branch=master#4b8f9f6a5d5a03a599d83e958212a7598bb5762b" dependencies = [ "anyhow", "impl-serde", - "semver 1.0.26", + "semver 1.0.27", "serde", "serde_json", "url", @@ -1910,8 +1944,18 @@ version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.20.11", + "darling_macro 0.20.11", +] + +[[package]] +name = "darling" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" +dependencies = [ + "darling_core 0.21.3", + "darling_macro 0.21.3", ] [[package]] @@ -1928,13 +1972,38 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "darling_core" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.106", +] + [[package]] name = "darling_macro" version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ - "darling_core", + "darling_core 0.20.11", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "darling_macro" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" +dependencies = [ + "darling_core 0.21.3", "quote", "syn 2.0.106", ] @@ -1952,12 +2021,12 @@ dependencies = [ [[package]] name = "deranged" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d630bccd429a5bb5a64b5e94f693bfc48c9f8566418fda4c494cc94f911f87cc" +checksum = "a41953f86f8a05768a6cda24def994fd2f424b04ec5c719cf89989779f199071" dependencies = [ "powerfmt", - "serde", + "serde_core", ] [[package]] @@ -2331,11 +2400,12 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "erased-serde" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e004d887f51fcb9fef17317a2f3525c887d8aa3f4f50fed920816a688284a5b7" +checksum = "259d404d09818dec19332e31d94558aeb442fea04c817006456c24b5460bbd4b" dependencies = [ "serde", + "serde_core", "typeid", ] @@ -2346,7 +2416,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.0", ] [[package]] @@ -2486,9 +2556,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fd99930f64d146689264c637b5af2f0233a933bef0d8570e2526bf9e083192d" +checksum = "1ced73b1dacfc750a6db6c0a0c3a3853c8b41997e2e2c563dc90804ae6867959" [[package]] name = "fixed-hash" @@ -2528,8 +2598,8 @@ name = "frame-benchmarking" version = "28.0.0" source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1#a71ec19a94702ea71767ba5ac97603ea6c6305c1" dependencies = [ - "frame-support", - "frame-support-procedural", + "frame-support 28.0.0", + "frame-support-procedural 23.0.0", "frame-system", "linregress", "log", @@ -2537,13 +2607,13 @@ dependencies = [ "paste", "scale-info", "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", - "sp-runtime-interface", - "sp-storage", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-runtime-interface 24.0.0", + "sp-storage 19.0.0", "static_assertions", ] @@ -2596,12 +2666,12 @@ source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea717 dependencies = [ "aquamarine", "array-bytes", - "binary-merkle-tree", + "binary-merkle-tree 13.0.0", "bitflags 1.3.2", "docify", "environmental", "frame-metadata", - "frame-support-procedural", + "frame-support-procedural 23.0.0", "impl-trait-for-tuples", "k256", "log", @@ -2611,22 +2681,64 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-api", - "sp-arithmetic", - "sp-core", - "sp-crypto-hashing-proc-macro", - "sp-debug-derive", - "sp-genesis-builder", - "sp-inherents", - "sp-io", - "sp-metadata-ir", - "sp-runtime", - "sp-staking", - "sp-state-machine", - "sp-std", - "sp-tracing", - "sp-trie", - "sp-weights", + "sp-api 26.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-crypto-hashing-proc-macro 0.1.0 (git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1)", + "sp-debug-derive 14.0.0 (git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1)", + "sp-genesis-builder 0.8.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-metadata-ir 0.6.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", + "sp-state-machine 0.35.0", + "sp-std 14.0.0 (git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1)", + "sp-tracing 16.0.0", + "sp-trie 29.0.0", + "sp-weights 27.0.0", + "tt-call", +] + +[[package]] +name = "frame-support" +version = "42.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "318417cb0d270d4a5bb8fff1619501ffbb5c484735e54113a9d9c381ad43c8fe" +dependencies = [ + "aquamarine", + "array-bytes", + "binary-merkle-tree 16.0.0", + "bitflags 1.3.2", + "docify", + "environmental", + "frame-metadata", + "frame-support-procedural 35.0.0", + "impl-trait-for-tuples", + "k256", + "log", + "macro_magic", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "serde_json", + "sp-api 38.0.0", + "sp-arithmetic 28.0.0", + "sp-core 38.0.0", + "sp-crypto-hashing-proc-macro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-genesis-builder 0.19.0", + "sp-inherents 38.0.0", + "sp-io 42.0.0", + "sp-metadata-ir 0.12.0", + "sp-runtime 43.0.0", + "sp-staking 40.0.0", + "sp-state-machine 0.47.0", + "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-tracing 18.0.0", + "sp-trie 41.0.0", + "sp-weights 33.0.0", "tt-call", ] @@ -2640,7 +2752,7 @@ dependencies = [ "derive-syn-parse", "docify", "expander", - "frame-support-procedural-tools", + "frame-support-procedural-tools 10.0.0", "itertools 0.11.0", "macro_magic", "proc-macro-warning", @@ -2650,12 +2762,46 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "frame-support-procedural" +version = "35.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c481996abeb9027d9a4d62d0c2cb4115c0ee6ef3120ad234fa2776b6313a4ed4" +dependencies = [ + "Inflector", + "cfg-expr", + "derive-syn-parse", + "docify", + "expander", + "frame-support-procedural-tools 13.0.1", + "itertools 0.11.0", + "macro_magic", + "proc-macro-warning", + "proc-macro2", + "quote", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 2.0.106", +] + [[package]] name = "frame-support-procedural-tools" version = "10.0.0" source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1#a71ec19a94702ea71767ba5ac97603ea6c6305c1" dependencies = [ - "frame-support-procedural-tools-derive", + "frame-support-procedural-tools-derive 11.0.0", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "frame-support-procedural-tools" +version = "13.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81a088fd6fda5f53ff0c17fc7551ce8bd0ead14ba742228443c8196296a7369b" +dependencies = [ + "frame-support-procedural-tools-derive 12.0.0", "proc-macro-crate", "proc-macro2", "quote", @@ -2672,6 +2818,17 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "frame-support-procedural-tools-derive" +version = "12.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed971c6435503a099bdac99fe4c5bea08981709e5b5a0a8535a1856f48561191" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "frame-system" version = "28.0.0" @@ -2679,16 +2836,16 @@ source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea717 dependencies = [ "cfg-if", "docify", - "frame-support", + "frame-support 28.0.0", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-version", - "sp-weights", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-version 29.0.0", + "sp-weights 27.0.0", ] [[package]] @@ -2846,7 +3003,7 @@ dependencies = [ "cfg-if", "libc", "r-efi", - "wasi 0.14.5+wasi-0.2.4", + "wasi 0.14.7+wasi-0.2.4", ] [[package]] @@ -2908,7 +3065,7 @@ dependencies = [ "futures-core", "futures-sink", "http", - "indexmap 2.11.1", + "indexmap 2.11.4", "slab", "tokio", "tokio-util", @@ -2967,6 +3124,12 @@ dependencies = [ "serde", ] +[[package]] +name = "hashbrown" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" + [[package]] name = "heck" version = "0.5.0" @@ -2984,9 +3147,6 @@ name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -dependencies = [ - "serde", -] [[package]] name = "hex-conservative" @@ -3147,9 +3307,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" +checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" dependencies = [ "bytes", "futures-channel", @@ -3183,9 +3343,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.63" +version = "0.1.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" +checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -3408,13 +3568,14 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.11.1" +version = "2.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206a8042aec68fa4a62e8d3f7aa4ceb508177d9324faf261e1959e495b7a1921" +checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5" dependencies = [ "equivalent", - "hashbrown 0.15.5", + "hashbrown 0.16.0", "serde", + "serde_core", ] [[package]] @@ -3436,8 +3597,8 @@ dependencies = [ "parity-scale-codec", "polkavm-derive 0.26.0", "scale-info", - "sp-io", - "sp-runtime-interface", + "sp-io 30.0.0", + "sp-runtime-interface 24.0.0", "staging-xcm", "trybuild", ] @@ -3478,7 +3639,7 @@ version = "6.0.0-alpha.4" dependencies = [ "cargo_metadata 0.21.0", "contract-build", - "frame-support", + "frame-support 28.0.0", "funty", "impl-serde", "ink", @@ -3495,12 +3656,12 @@ dependencies = [ "serde", "serde_json", "sha3", - "sp-core", - "sp-io", + "sp-core 38.0.0", + "sp-io 30.0.0", "sp-keyring", - "sp-runtime", - "sp-runtime-interface", - "sp-weights", + "sp-runtime 43.0.0", + "sp-runtime-interface 24.0.0", + "sp-weights 33.0.0", "subxt", "subxt-metadata 0.44.0", "subxt-signer 0.44.0", @@ -3515,7 +3676,7 @@ dependencies = [ name = "ink_e2e_macro" version = "6.0.0-alpha.4" dependencies = [ - "darling", + "darling 0.20.11", "derive_more 2.0.1", "ink", "ink_e2e", @@ -3571,8 +3732,8 @@ dependencies = [ "secp256k1 0.30.0", "sha2 0.10.9", "sha3", - "sp-io", - "sp-runtime-interface", + "sp-io 30.0.0", + "sp-runtime-interface 24.0.0", "staging-xcm", "static_assertions", ] @@ -3614,39 +3775,38 @@ dependencies = [ [[package]] name = "ink_metadata" -version = "6.0.0-alpha.3" -source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.3#5dee03ccdc5bf3d26a53dfd287385eedb3d3a695" +version = "6.0.0-alpha.4" dependencies = [ "derive_more 2.0.1", "impl-serde", - "ink_prelude 6.0.0-alpha.3", - "ink_primitives 6.0.0-alpha.3", + "ink_prelude 6.0.0-alpha.4", + "ink_primitives 6.0.0-alpha.4", "parity-scale-codec", + "pretty_assertions", "scale-info", "schemars 0.8.22", "serde", + "serde_json", ] [[package]] name = "ink_metadata" version = "6.0.0-alpha.4" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.4#fc608bfa1a78f7068a64907c616c40749fbb7723" dependencies = [ "derive_more 2.0.1", "impl-serde", - "ink_prelude 6.0.0-alpha.4", - "ink_primitives 6.0.0-alpha.4", + "ink_prelude 6.0.0-alpha.4 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.4)", + "ink_primitives 6.0.0-alpha.4 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.4)", "parity-scale-codec", - "pretty_assertions", "scale-info", "schemars 0.8.22", "serde", - "serde_json", ] [[package]] name = "ink_prelude" -version = "6.0.0-alpha.3" -source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.3#5dee03ccdc5bf3d26a53dfd287385eedb3d3a695" +version = "6.0.0-alpha.4" dependencies = [ "cfg-if", ] @@ -3654,20 +3814,22 @@ dependencies = [ [[package]] name = "ink_prelude" version = "6.0.0-alpha.4" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.4#fc608bfa1a78f7068a64907c616c40749fbb7723" dependencies = [ "cfg-if", ] [[package]] name = "ink_primitives" -version = "6.0.0-alpha.3" -source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.3#5dee03ccdc5bf3d26a53dfd287385eedb3d3a695" +version = "6.0.0-alpha.4" dependencies = [ "alloy-sol-types", "cfg-if", "derive_more 2.0.1", "impl-trait-for-tuples", - "ink_prelude 6.0.0-alpha.3", + "ink", + "ink_env", + "ink_prelude 6.0.0-alpha.4", "itertools 0.14.0", "num-traits", "pallet-revive-uapi", @@ -3678,24 +3840,23 @@ dependencies = [ "scale-encode", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime-interface", - "sp-weights", + "sp-core 38.0.0", + "sp-io 30.0.0", + "sp-runtime-interface 24.0.0", + "sp-weights 33.0.0", "xxhash-rust", ] [[package]] name = "ink_primitives" version = "6.0.0-alpha.4" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.4#fc608bfa1a78f7068a64907c616c40749fbb7723" dependencies = [ "alloy-sol-types", "cfg-if", "derive_more 2.0.1", "impl-trait-for-tuples", - "ink", - "ink_env", - "ink_prelude 6.0.0-alpha.4", + "ink_prelude 6.0.0-alpha.4 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.4)", "itertools 0.14.0", "num-traits", "pallet-revive-uapi", @@ -3706,10 +3867,10 @@ dependencies = [ "scale-encode", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime-interface", - "sp-weights", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime-interface 24.0.0", + "sp-weights 27.0.0", "xxhash-rust", ] @@ -3732,7 +3893,7 @@ name = "ink_sandbox" version = "6.0.0-alpha.4" dependencies = [ "frame-metadata", - "frame-support", + "frame-support 28.0.0", "frame-system", "ink_primitives 6.0.0-alpha.4", "ink_revive_types", @@ -3743,10 +3904,10 @@ dependencies = [ "paste", "scale-info", "sha3", - "sp-core", - "sp-externalities", - "sp-io", - "sp-runtime", + "sp-core 38.0.0", + "sp-externalities 0.25.0", + "sp-io 30.0.0", + "sp-runtime 43.0.0", ] [[package]] @@ -3780,8 +3941,8 @@ dependencies = [ "parity-scale-codec", "paste", "scale-info", - "sp-io", - "sp-runtime-interface", + "sp-io 30.0.0", + "sp-runtime-interface 24.0.0", ] [[package]] @@ -3913,9 +4074,9 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "js-sys" -version = "0.3.78" +version = "0.3.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0b063578492ceec17683ef2f8c5e89121fbd0b172cbc280635ab7567db2738" +checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305" dependencies = [ "once_cell", "wasm-bindgen", @@ -4076,9 +4237,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.175" +version = "0.2.176" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" +checksum = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174" [[package]] name = "libm" @@ -4088,9 +4249,9 @@ checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" [[package]] name = "libredox" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" +checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" dependencies = [ "bitflags 2.9.4", "libc", @@ -4594,13 +4755,13 @@ source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea717 dependencies = [ "docify", "frame-benchmarking", - "frame-support", + "frame-support 28.0.0", "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 28.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -4614,7 +4775,7 @@ dependencies = [ "ethereum-standards", "ethereum-types", "frame-benchmarking", - "frame-support", + "frame-support 28.0.0", "frame-system", "hex-literal 0.4.1", "humantime-serde", @@ -4637,14 +4798,14 @@ dependencies = [ "rlp 0.6.1", "scale-info", "serde", - "sp-api", - "sp-arithmetic", + "sp-api 26.0.0", + "sp-arithmetic 23.0.0", "sp-consensus-aura", "sp-consensus-babe", "sp-consensus-slots", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", "substrate-bn", "subxt-signer 0.43.0", ] @@ -4661,8 +4822,8 @@ dependencies = [ "pallet-revive-uapi", "polkavm-linker 0.27.0", "serde_json", - "sp-core", - "sp-io", + "sp-core 28.0.0", + "sp-io 30.0.0", "toml 0.8.23", ] @@ -4697,14 +4858,14 @@ source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea717 dependencies = [ "docify", "frame-benchmarking", - "frame-support", + "frame-support 28.0.0", "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-inherents", - "sp-runtime", - "sp-storage", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "sp-storage 19.0.0", "sp-timestamp", ] @@ -4714,13 +4875,13 @@ version = "28.0.0" source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1#a71ec19a94702ea71767ba5ac97603ea6c6305c1" dependencies = [ "frame-benchmarking", - "frame-support", + "frame-support 28.0.0", "frame-system", "parity-scale-codec", "scale-info", "serde", - "sp-io", - "sp-runtime", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -4845,9 +5006,9 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pest" -version = "2.8.1" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323" +checksum = "21e0a3a33733faeaf8651dfee72dd0f388f0c8e5ad496a3478fa5a922f49cfa8" dependencies = [ "memchr", "thiserror 2.0.16", @@ -4991,7 +5152,7 @@ dependencies = [ [[package]] name = "polkavm-common" version = "0.29.0" -source = "git+https://github.com/paritytech/polkavm.git#db1df41408242e6a29fd5c0ef658e5b319ef8bb4" +source = "git+https://github.com/paritytech/polkavm.git#d4219f863d31fb013b68d4758da6e1335614b3dc" [[package]] name = "polkavm-derive" @@ -5074,7 +5235,7 @@ dependencies = [ [[package]] name = "polkavm-linker" version = "0.29.0" -source = "git+https://github.com/paritytech/polkavm.git#db1df41408242e6a29fd5c0ef658e5b319ef8bb4" +source = "git+https://github.com/paritytech/polkavm.git#d4219f863d31fb013b68d4758da6e1335614b3dc" dependencies = [ "dirs", "gimli", @@ -5094,16 +5255,16 @@ checksum = "061088785efd93e4367faf12f341bb356208c06bab43aa942d472068af80d1c4" [[package]] name = "polling" -version = "3.10.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5bd19146350fe804f7cb2669c851c03d69da628803dab0d98018142aaa5d829" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" dependencies = [ "cfg-if", "concurrent-queue", "hermit-abi", "pin-project-lite", "rustix", - "windows-sys 0.60.2", + "windows-sys 0.61.0", ] [[package]] @@ -5198,11 +5359,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" +checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" dependencies = [ - "toml_edit", + "toml_edit 0.23.6", ] [[package]] @@ -5287,9 +5448,9 @@ dependencies = [ [[package]] name = "proptest" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fcdab19deb5195a31cf7726a210015ff1496ba1464fd42cb4f537b8b01b471f" +checksum = "2bb0be07becd10686a0bb407298fb425360a5c44a663774406340c59a22de4ce" dependencies = [ "bit-set", "bit-vec", @@ -5768,13 +5929,14 @@ dependencies = [ [[package]] name = "ruint" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ecb38f82477f20c5c3d62ef52d7c4e536e38ea9b73fb570a20c5cae0e14bcf6" +checksum = "a68df0380e5c9d20ce49534f292a36a7514ae21350726efe1865bdb1fa91d278" dependencies = [ "alloy-rlp", "ark-ff 0.3.0", "ark-ff 0.4.2", + "ark-ff 0.5.0", "bytes", "fastrlp 0.3.1", "fastrlp 0.4.0", @@ -5788,7 +5950,7 @@ dependencies = [ "rand 0.9.2", "rlp 0.5.2", "ruint-macro", - "serde", + "serde_core", "valuable", "zeroize", ] @@ -5838,7 +6000,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver 1.0.26", + "semver 1.0.27", ] [[package]] @@ -5851,14 +6013,14 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.60.2", + "windows-sys 0.61.0", ] [[package]] name = "rustls" -version = "0.23.31" +version = "0.23.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc" +checksum = "cd3c25631629d034ce7cd9940adc9d45762d46de2b0f57193c4443b92c6d4d40" dependencies = [ "log", "once_cell", @@ -5919,9 +6081,9 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" -version = "0.103.5" +version = "0.103.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a37813727b78798e53c2bec3f5e8fe12a6d6f8389bf9ca7802add4c9905ad8" +checksum = "8572f3c2cb9934231157b45499fc41e1f58c589fdfb81a844ba873265e80f8eb" dependencies = [ "ring", "rustls-pki-types", @@ -6018,7 +6180,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f4b54a1211260718b92832b661025d1f1a4b6930fbadd6908e00edd265fa5f7" dependencies = [ - "darling", + "darling 0.20.11", "proc-macro2", "quote", "syn 2.0.106", @@ -6045,7 +6207,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78a3993a13b4eafa89350604672c8757b7ea84c7c5947d4b3691e3169c96379b" dependencies = [ - "darling", + "darling 0.20.11", "proc-macro-crate", "proc-macro2", "quote", @@ -6337,9 +6499,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b369d18893388b345804dc0007963c99b7d665ae71d275812d828c6f089640" +checksum = "cc198e42d9b7510827939c9a15f5062a0c913f3371d765977e586d2fe6c16f4a" dependencies = [ "bitflags 2.9.4", "core-foundation", @@ -6369,11 +6531,12 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" dependencies = [ "serde", + "serde_core", ] [[package]] @@ -6387,21 +6550,23 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.219" +version = "1.0.226" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "0dca6411025b24b60bfa7ec1fe1f8e710ac09782dca409ee8237ba74b51295fd" dependencies = [ + "serde_core", "serde_derive", ] [[package]] name = "serde-untagged" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34836a629bcbc6f1afdf0907a744870039b1e14c0561cb26094fa683b158eff3" +checksum = "f9faf48a4a2d2693be24c6289dbe26552776eb7737074e6722891fadbe6c5058" dependencies = [ "erased-serde", "serde", + "serde_core", "typeid", ] @@ -6417,18 +6582,28 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.17" +version = "0.11.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96" +checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8" dependencies = [ "serde", + "serde_core", +] + +[[package]] +name = "serde_core" +version = "1.0.226" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba2ba63999edb9dac981fb34b3e5c0d111a69b0924e253ed29d83f7c99e966a4" +dependencies = [ + "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.219" +version = "1.0.226" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "8db53ae22f34573731bafa1db20f04027b2d25e02d8205921b569171699cdb33" dependencies = [ "proc-macro2", "quote", @@ -6448,15 +6623,16 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.143" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ - "indexmap 2.11.1", + "indexmap 2.11.4", "itoa", "memchr", "ryu", "serde", + "serde_core", ] [[package]] @@ -6481,11 +6657,11 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40734c41988f7306bb04f0ecf60ec0f3f1caa34290e4e8ea471dcd3346483b83" +checksum = "5417783452c2be558477e104686f7de5dae53dba813c28435e0e70f82d9b04ee" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -6502,15 +6678,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.14.0" +version = "3.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2c45cd61fefa9db6f254525d46e392b852e0e61d9a1fd36e5bd183450a556d5" +checksum = "c522100790450cf78eeac1507263d0a350d4d5b30df0c8e1fe051a10c22b376e" dependencies = [ "base64", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.11.1", + "indexmap 2.11.4", "schemars 0.9.0", "schemars 1.0.4", "serde", @@ -6522,11 +6698,11 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.14.0" +version = "3.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de90945e6565ce0d9a25098082ed4ee4002e047cb59892c318d66821e14bb30f" +checksum = "327ada00f7d64abaac1e55a6911e90cf665aa051b9a561c7006c157f4633135e" dependencies = [ - "darling", + "darling 0.21.3", "proc-macro2", "quote", "syn 2.0.106", @@ -6871,15 +7047,38 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-api-proc-macro", - "sp-core", - "sp-externalities", - "sp-metadata-ir", - "sp-runtime", - "sp-runtime-interface", - "sp-state-machine", - "sp-trie", - "sp-version", + "sp-api-proc-macro 15.0.0", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "sp-metadata-ir 0.6.0", + "sp-runtime 31.0.1", + "sp-runtime-interface 24.0.0", + "sp-state-machine 0.35.0", + "sp-trie 29.0.0", + "sp-version 29.0.0", + "thiserror 1.0.69", +] + +[[package]] +name = "sp-api" +version = "38.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d91062b6183f20a6c5fb02d055eeacb4791c8ad32fa1d280c75c0b29aa74acf" +dependencies = [ + "docify", + "hash-db", + "log", + "parity-scale-codec", + "scale-info", + "sp-api-proc-macro 24.0.0", + "sp-core 38.0.0", + "sp-externalities 0.30.0", + "sp-metadata-ir 0.12.0", + "sp-runtime 43.0.0", + "sp-runtime-interface 31.0.0", + "sp-state-machine 0.47.0", + "sp-trie 41.0.0", + "sp-version 41.0.0", "thiserror 1.0.69", ] @@ -6897,6 +7096,21 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "sp-api-proc-macro" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8124c25cffbde85d2ef5978fa710bb900d89c368821e04d59040788a0ece3e25" +dependencies = [ + "Inflector", + "blake2", + "expander", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "sp-application-crypto" version = "30.0.0" @@ -6905,8 +7119,21 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", + "sp-core 28.0.0", + "sp-io 30.0.0", +] + +[[package]] +name = "sp-application-crypto" +version = "42.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fb8f2382e7b06f3754d66d781bb57021e415715b48a3a65ea452f9ca7e13ec8" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 38.0.0", + "sp-io 42.0.0", ] [[package]] @@ -6924,18 +7151,33 @@ dependencies = [ ] [[package]] -name = "sp-consensus-aura" -version = "0.32.0" -source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1#a71ec19a94702ea71767ba5ac97603ea6c6305c1" +name = "sp-arithmetic" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f4755af7cc57f4a2a830e134b403fc832caa5d93dacb970ffc7ac717f38c40" dependencies = [ - "async-trait", + "docify", + "integer-sqrt", + "num-traits", "parity-scale-codec", "scale-info", - "sp-api", - "sp-application-crypto", + "serde", + "static_assertions", +] + +[[package]] +name = "sp-consensus-aura" +version = "0.32.0" +source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1#a71ec19a94702ea71767ba5ac97603ea6c6305c1" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", "sp-consensus-slots", - "sp-inherents", - "sp-runtime", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", "sp-timestamp", ] @@ -6948,12 +7190,12 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api", - "sp-application-crypto", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", "sp-consensus-slots", - "sp-core", - "sp-inherents", - "sp-runtime", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", "sp-timestamp", ] @@ -7003,12 +7245,61 @@ dependencies = [ "serde", "sha2 0.10.9", "sp-crypto-hashing 0.1.0 (git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1)", - "sp-debug-derive", - "sp-externalities", - "sp-std", - "sp-storage", + "sp-debug-derive 14.0.0 (git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1)", + "sp-externalities 0.25.0", + "sp-std 14.0.0 (git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1)", + "sp-storage 19.0.0", "ss58-registry", - "substrate-bip39", + "substrate-bip39 0.4.7", + "thiserror 1.0.69", + "tracing", + "w3f-bls", + "zeroize", +] + +[[package]] +name = "sp-core" +version = "38.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eb651e016aa5556f5401596d764566240fe44f7a989dc46ebdefa684e9aeaaa" +dependencies = [ + "ark-vrf", + "array-bytes", + "bitflags 1.3.2", + "blake2", + "bounded-collections", + "bs58", + "dyn-clone", + "ed25519-zebra", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde", + "itertools 0.11.0", + "k256", + "libsecp256k1", + "log", + "merlin", + "parity-bip39", + "parity-scale-codec", + "parking_lot", + "paste", + "primitive-types 0.13.1", + "rand 0.8.5", + "scale-info", + "schnorrkel", + "secp256k1 0.28.2", + "secrecy 0.8.0", + "serde", + "sha2 0.10.9", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.30.0", + "sp-runtime-interface 31.0.0", + "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 22.0.0", + "ss58-registry", + "substrate-bip39 0.6.0", "thiserror 1.0.69", "tracing", "w3f-bls", @@ -7042,6 +7333,17 @@ dependencies = [ "twox-hash 1.6.3", ] +[[package]] +name = "sp-crypto-hashing-proc-macro" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b85d0f1f1e44bd8617eb2a48203ee854981229e3e79e6f468c7175d5fd37489b" +dependencies = [ + "quote", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 2.0.106", +] + [[package]] name = "sp-crypto-hashing-proc-macro" version = "0.1.0" @@ -7052,6 +7354,17 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "sp-debug-derive" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d09fa0a5f7299fb81ee25ae3853d26200f7a348148aed6de76be905c007dbe" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "sp-debug-derive" version = "14.0.0" @@ -7069,7 +7382,18 @@ source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea717 dependencies = [ "environmental", "parity-scale-codec", - "sp-storage", + "sp-storage 19.0.0", +] + +[[package]] +name = "sp-externalities" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cbf059dce180a8bf8b6c8b08b6290fa3d1c7f069a60f1df038ab5dd5fc0ba6" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-storage 22.0.0", ] [[package]] @@ -7080,8 +7404,21 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde_json", - "sp-api", - "sp-runtime", + "sp-api 26.0.0", + "sp-runtime 31.0.1", +] + +[[package]] +name = "sp-genesis-builder" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e16e1046045e47124c09a9c9c03bfd1933926d67512aa1e66b778b81e51f4bb" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde_json", + "sp-api 38.0.0", + "sp-runtime 43.0.0", ] [[package]] @@ -7093,7 +7430,21 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 31.0.1", + "thiserror 1.0.69", +] + +[[package]] +name = "sp-inherents" +version = "38.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d91ae44bf5232bff4e1a804b8eda9cecbf56921c0d67699f7b638db4ea1b776" +dependencies = [ + "async-trait", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-runtime 43.0.0", "thiserror 1.0.69", ] @@ -7111,25 +7462,53 @@ dependencies = [ "polkavm-derive 0.26.0", "rustversion", "secp256k1 0.28.2", - "sp-core", + "sp-core 28.0.0", "sp-crypto-hashing 0.1.0 (git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1)", - "sp-externalities", - "sp-keystore", - "sp-runtime-interface", - "sp-state-machine", - "sp-tracing", - "sp-trie", + "sp-externalities 0.25.0", + "sp-keystore 0.34.0", + "sp-runtime-interface 24.0.0", + "sp-state-machine 0.35.0", + "sp-tracing 16.0.0", + "sp-trie 29.0.0", + "tracing", + "tracing-core", +] + +[[package]] +name = "sp-io" +version = "42.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d0f8eb3f6c8824549b9482d71516324cf6e2fd650fcc0845d7a4080233898da" +dependencies = [ + "bytes", + "docify", + "ed25519-dalek", + "libsecp256k1", + "log", + "parity-scale-codec", + "polkavm-derive 0.26.0", + "rustversion", + "secp256k1 0.28.2", + "sp-core 38.0.0", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.30.0", + "sp-keystore 0.44.0", + "sp-runtime-interface 31.0.0", + "sp-state-machine 0.47.0", + "sp-tracing 18.0.0", + "sp-trie 41.0.0", "tracing", "tracing-core", ] [[package]] name = "sp-keyring" -version = "31.0.0" -source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1#a71ec19a94702ea71767ba5ac97603ea6c6305c1" +version = "43.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0152e8b42857f1764a2ce6abda725d8be008423cc054b747c33a69cbc2a3dd7c" dependencies = [ - "sp-core", - "sp-runtime", + "sp-core 38.0.0", + "sp-runtime 43.0.0", "strum", ] @@ -7140,8 +7519,20 @@ source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea717 dependencies = [ "parity-scale-codec", "parking_lot", - "sp-core", - "sp-externalities", + "sp-core 28.0.0", + "sp-externalities 0.25.0", +] + +[[package]] +name = "sp-keystore" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f63da3f73c67601452dde155804233f76e993802d4b106e33ae7d88577f46b6a" +dependencies = [ + "parity-scale-codec", + "parking_lot", + "sp-core 38.0.0", + "sp-externalities 0.30.0", ] [[package]] @@ -7154,6 +7545,17 @@ dependencies = [ "scale-info", ] +[[package]] +name = "sp-metadata-ir" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1464c9e76f97c80a8dbccfe3f9fd4be0f25d0cc372efcf8fdf8791619b0998b9" +dependencies = [ + "frame-metadata", + "parity-scale-codec", + "scale-info", +] + [[package]] name = "sp-panic-handler" version = "13.0.0" @@ -7163,12 +7565,22 @@ dependencies = [ "regex", ] +[[package]] +name = "sp-panic-handler" +version = "13.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8b52e69a577cbfdea62bfaf16f59eb884422ce98f78b5cd8d9bf668776bced1" +dependencies = [ + "backtrace", + "regex", +] + [[package]] name = "sp-runtime" version = "31.0.1" source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1#a71ec19a94702ea71767ba5ac97603ea6c6305c1" dependencies = [ - "binary-merkle-tree", + "binary-merkle-tree 13.0.0", "docify", "either", "hash256-std-hasher", @@ -7181,13 +7593,43 @@ dependencies = [ "scale-info", "serde", "simple-mermaid", - "sp-application-crypto", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-std", - "sp-trie", - "sp-weights", + "sp-application-crypto 30.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-std 14.0.0 (git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1)", + "sp-trie 29.0.0", + "sp-weights 27.0.0", + "tracing", + "tuplex", +] + +[[package]] +name = "sp-runtime" +version = "43.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3992bd6026675946f12fc3c891c863f017a01449a5a15d07656ea1b6503f3ba2" +dependencies = [ + "binary-merkle-tree 16.0.0", + "docify", + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "num-traits", + "parity-scale-codec", + "paste", + "rand 0.8.5", + "scale-info", + "serde", + "simple-mermaid", + "sp-application-crypto 42.0.0", + "sp-arithmetic 28.0.0", + "sp-core 38.0.0", + "sp-io 42.0.0", + "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-trie 41.0.0", + "sp-weights 33.0.0", "tracing", "tuplex", ] @@ -7201,12 +7643,32 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "polkavm-derive 0.26.0", - "sp-externalities", - "sp-runtime-interface-proc-macro", - "sp-std", - "sp-storage", - "sp-tracing", - "sp-wasm-interface", + "sp-externalities 0.25.0", + "sp-runtime-interface-proc-macro 17.0.0", + "sp-std 14.0.0 (git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1)", + "sp-storage 19.0.0", + "sp-tracing 16.0.0", + "sp-wasm-interface 20.0.0", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "31.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4820882d8e6e764b98efaeed3a431aa9a0d1738c4adf935fbb4c50113288073" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "polkavm-derive 0.26.0", + "primitive-types 0.13.1", + "sp-externalities 0.30.0", + "sp-runtime-interface-proc-macro 20.0.0", + "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 22.0.0", + "sp-tracing 18.0.0", + "sp-wasm-interface 23.0.0", "static_assertions", ] @@ -7223,6 +7685,20 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "20.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04178084ae654b3924934a56943ee73e3562db4d277e948393561b08c3b5b5fe" +dependencies = [ + "Inflector", + "expander", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "sp-staking" version = "26.0.0" @@ -7232,8 +7708,22 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-runtime", + "sp-core 28.0.0", + "sp-runtime 31.0.1", +] + +[[package]] +name = "sp-staking" +version = "40.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9945ce70bbfb9b1c876f94a81017915bc932a576b8a9735b88aabfa01ea4e5" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 38.0.0", + "sp-runtime 43.0.0", ] [[package]] @@ -7247,15 +7737,42 @@ dependencies = [ "parking_lot", "rand 0.8.5", "smallvec", - "sp-core", - "sp-externalities", - "sp-panic-handler", - "sp-trie", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "sp-panic-handler 13.0.0", + "sp-trie 29.0.0", + "thiserror 1.0.69", + "tracing", + "trie-db", +] + +[[package]] +name = "sp-state-machine" +version = "0.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaa59c3fdf73700dd3e9dcce503fb15c3ef59dfed3ed34f0eec78d8f5b5d1c45" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "parking_lot", + "rand 0.8.5", + "smallvec", + "sp-core 38.0.0", + "sp-externalities 0.30.0", + "sp-panic-handler 13.0.2", + "sp-trie 41.0.0", "thiserror 1.0.69", "tracing", "trie-db", ] +[[package]] +name = "sp-std" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8ee986414b0a9ad741776762f4083cd3a5128449b982a3919c4df36874834" + [[package]] name = "sp-std" version = "14.0.0" @@ -7270,7 +7787,20 @@ dependencies = [ "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive", + "sp-debug-derive 14.0.0 (git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1)", +] + +[[package]] +name = "sp-storage" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee3b70ca340e41cde9d2e069d354508a6e37a6573d66f7cc38f11549002f64ec" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -7280,8 +7810,8 @@ source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea717 dependencies = [ "async-trait", "parity-scale-codec", - "sp-inherents", - "sp-runtime", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", "thiserror 1.0.69", ] @@ -7297,6 +7827,19 @@ dependencies = [ "tracing-subscriber 0.3.20", ] +[[package]] +name = "sp-tracing" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7fa3a9161173fa99b4455afc52811eb8251e90ca37a2cbebb8be9c47dc55c00" +dependencies = [ + "parity-scale-codec", + "regex", + "tracing", + "tracing-core", + "tracing-subscriber 0.3.20", +] + [[package]] name = "sp-trie" version = "29.0.0" @@ -7313,9 +7856,35 @@ dependencies = [ "rand 0.8.5", "scale-info", "schnellru", - "sp-core", - "sp-externalities", - "substrate-prometheus-endpoint", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "substrate-prometheus-endpoint 0.17.0", + "thiserror 1.0.69", + "tracing", + "trie-db", + "trie-root", +] + +[[package]] +name = "sp-trie" +version = "41.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17205dd7df84be66e55a136b5d80dfb6c23806376c0ef5e847ea9344c0478cf" +dependencies = [ + "ahash", + "foldhash", + "hash-db", + "hashbrown 0.15.5", + "memory-db", + "nohash-hasher", + "parity-scale-codec", + "parking_lot", + "rand 0.8.5", + "scale-info", + "schnellru", + "sp-core 38.0.0", + "sp-externalities 0.30.0", + "substrate-prometheus-endpoint 0.17.7", "thiserror 1.0.69", "tracing", "trie-db", @@ -7332,10 +7901,28 @@ dependencies = [ "parity-wasm", "scale-info", "serde", - "sp-crypto-hashing-proc-macro", - "sp-runtime", - "sp-std", - "sp-version-proc-macro", + "sp-crypto-hashing-proc-macro 0.1.0 (git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1)", + "sp-runtime 31.0.1", + "sp-std 14.0.0 (git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1)", + "sp-version-proc-macro 13.0.0", + "thiserror 1.0.69", +] + +[[package]] +name = "sp-version" +version = "41.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e0d7b57b6577ddab5b363c2d6e9d49609749e041ee50e7232ecb413bc1cfa3f" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "parity-wasm", + "scale-info", + "serde", + "sp-crypto-hashing-proc-macro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime 43.0.0", + "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-version-proc-macro 15.0.0", "thiserror 1.0.69", ] @@ -7351,6 +7938,19 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "sp-version-proc-macro" +version = "15.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54cabc8279e835cd9c608d70cb00e693bddec94fe8478e9f3104dad1da5f93ca" +dependencies = [ + "parity-scale-codec", + "proc-macro-warning", + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "sp-wasm-interface" version = "20.0.0" @@ -7362,6 +7962,18 @@ dependencies = [ "parity-scale-codec", ] +[[package]] +name = "sp-wasm-interface" +version = "23.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "568979072b49384ef6bbaa5aa1306a91f0b983a4b22c8ef515b601748683b97c" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", +] + [[package]] name = "sp-weights" version = "27.0.0" @@ -7372,8 +7984,23 @@ dependencies = [ "scale-info", "serde", "smallvec", - "sp-arithmetic", - "sp-debug-derive", + "sp-arithmetic 23.0.0", + "sp-debug-derive 14.0.0 (git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1)", +] + +[[package]] +name = "sp-weights" +version = "33.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cae0642af5f2dd0b1cddcd06f91c36f7abe0528713e97b6e3c36faf0b8229114" +dependencies = [ + "bounded-collections", + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic 28.0.0", + "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -7415,22 +8042,23 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staging-xcm" -version = "7.0.1" -source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1#a71ec19a94702ea71767ba5ac97603ea6c6305c1" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16708a8ff2bf701090ca8146ad4a0eb8ab00f2a03108f8c889d4eb2eccd7233d" dependencies = [ "array-bytes", "bounded-collections", "derive-where", "environmental", - "frame-support", + "frame-support 42.0.0", "hex-literal 0.4.1", "impl-trait-for-tuples", + "log", "parity-scale-codec", "scale-info", "serde", - "sp-runtime", - "sp-weights", - "tracing", + "sp-runtime 43.0.0", + "sp-weights 33.0.0", "xcm-procedural", ] @@ -7480,6 +8108,19 @@ dependencies = [ "zeroize", ] +[[package]] +name = "substrate-bip39" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca58ffd742f693dc13d69bdbb2e642ae239e0053f6aab3b104252892f856700a" +dependencies = [ + "hmac 0.12.1", + "pbkdf2", + "schnorrkel", + "sha2 0.10.9", + "zeroize", +] + [[package]] name = "substrate-bn" version = "0.6.0" @@ -7507,6 +8148,21 @@ dependencies = [ "tokio", ] +[[package]] +name = "substrate-prometheus-endpoint" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d23e4bc8e910a312820d589047ab683928b761242dbe31dee081fbdb37cbe0be" +dependencies = [ + "http-body-util", + "hyper", + "hyper-util", + "log", + "prometheus", + "thiserror 1.0.69", + "tokio", +] + [[package]] name = "subtle" version = "2.6.1" @@ -7650,7 +8306,7 @@ version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "501bf358698f5ab02a6199a1fcd3f1b482e2f5b6eb5d185411e6a74a175ec8e8" dependencies = [ - "darling", + "darling 0.20.11", "parity-scale-codec", "proc-macro-error2", "quote", @@ -7854,15 +8510,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.22.0" +version = "3.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84fa4d11fadde498443cca10fd3ac23c951f0dc59e080e9f4b93d4df4e4eea53" +checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" dependencies = [ "fastrand", "getrandom 0.3.3", "once_cell", "rustix", - "windows-sys 0.60.2", + "windows-sys 0.61.0", ] [[package]] @@ -7944,11 +8600,12 @@ dependencies = [ [[package]] name = "time" -version = "0.3.43" +version = "0.3.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bde6f1ec10e72d583d91623c939f623002284ef622b87de38cfd546cbf2031" +checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" dependencies = [ "deranged", + "itoa", "num-conv", "powerfmt", "serde", @@ -8038,9 +8695,9 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.2" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" +checksum = "05f63835928ca123f1bef57abbcd23bb2ba0ac9ae1235f1e65bda0d06e7786bd" dependencies = [ "rustls", "tokio", @@ -8080,19 +8737,19 @@ dependencies = [ "serde", "serde_spanned 0.6.9", "toml_datetime 0.6.11", - "toml_edit", + "toml_edit 0.22.27", ] [[package]] name = "toml" -version = "0.9.5" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75129e1dc5000bfbaa9fee9d1b21f974f9fbad9daec557a521ee6e080825f6e8" +checksum = "00e5e5d9bf2475ac9d4f0d9edab68cc573dc2fd644b0dba36b0c30a92dd9eaa0" dependencies = [ - "indexmap 2.11.1", - "serde", - "serde_spanned 1.0.0", - "toml_datetime 0.7.0", + "indexmap 2.11.4", + "serde_core", + "serde_spanned 1.0.2", + "toml_datetime 0.7.2", "toml_parser", "toml_writer", "winnow", @@ -8109,11 +8766,11 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bade1c3e902f58d73d3f294cd7f20391c1cb2fbcb643b73566bc773971df91e3" +checksum = "32f1085dec27c2b6632b04c80b3bb1b4300d6495d1e129693bdda7d91e72eec1" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -8122,7 +8779,7 @@ version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ - "indexmap 2.11.1", + "indexmap 2.11.4", "serde", "serde_spanned 0.6.9", "toml_datetime 0.6.11", @@ -8130,11 +8787,23 @@ dependencies = [ "winnow", ] +[[package]] +name = "toml_edit" +version = "0.23.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3effe7c0e86fdff4f69cdd2ccc1b96f933e24811c5441d44904e8683e27184b" +dependencies = [ + "indexmap 2.11.4", + "toml_datetime 0.7.2", + "toml_parser", + "winnow", +] + [[package]] name = "toml_parser" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b551886f449aa90d4fe2bdaa9f4a2577ad2dde302c61ecf262d80b116db95c10" +checksum = "4cf893c33be71572e0e9aa6dd15e6677937abd686b066eac3f8cd3531688a627" dependencies = [ "winnow", ] @@ -8147,9 +8816,9 @@ checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" [[package]] name = "toml_writer" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc842091f2def52017664b53082ecbbeb5c7731092bad69d2c63050401dfd64" +checksum = "d163a63c116ce562a22cda521fcc4d79152e7aba014456fb5eb442f6d6a10109" [[package]] name = "tower-service" @@ -8258,9 +8927,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "trybuild" -version = "1.0.110" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32e257d7246e7a9fd015fb0b28b330a8d4142151a33f03e6a497754f4b1f6a8e" +checksum = "0ded9fdb81f30a5708920310bfcd9ea7482ff9cba5f54601f7a19a877d5c2392" dependencies = [ "dissimilar", "glob", @@ -8269,7 +8938,7 @@ dependencies = [ "serde_json", "target-triple", "termcolor", - "toml 0.9.5", + "toml 0.9.7", ] [[package]] @@ -8543,27 +9212,27 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" -version = "0.14.5+wasi-0.2.4" +version = "0.14.7+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4494f6290a82f5fe584817a676a34b9d6763e8d9d18204009fb31dceca98fd4" +checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" dependencies = [ "wasip2", ] [[package]] name = "wasip2" -version = "1.0.0+wasi-0.2.4" +version = "1.0.1+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03fa2761397e5bd52002cd7e73110c71af2109aca4e521a9f40473fe685b0a24" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" dependencies = [ "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.101" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e14915cadd45b529bb8d1f343c4ed0ac1de926144b746e2710f9cd05df6603b" +checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d" dependencies = [ "cfg-if", "once_cell", @@ -8574,9 +9243,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.101" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28d1ba982ca7923fd01448d5c30c6864d0a14109560296a162f80f305fb93bb" +checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19" dependencies = [ "bumpalo", "log", @@ -8588,9 +9257,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.51" +version = "0.4.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca85039a9b469b38336411d6d6ced91f3fc87109a2a27b0c197663f5144dffe" +checksum = "7e038d41e478cc73bae0ff9b36c60cff1c98b8f38f8d7e8061e79ee63608ac5c" dependencies = [ "cfg-if", "js-sys", @@ -8601,9 +9270,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.101" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3d463ae3eff775b0c45df9da45d68837702ac35af998361e2c84e7c5ec1b0d" +checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -8611,9 +9280,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.101" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bb4ce89b08211f923caf51d527662b75bdc9c9c7aab40f86dcb9fb85ac552aa" +checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7" dependencies = [ "proc-macro2", "quote", @@ -8624,9 +9293,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.101" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f143854a3b13752c6950862c906306adb27c7e839f7414cec8fea35beab624c1" +checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1" dependencies = [ "unicode-ident", ] @@ -8683,9 +9352,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.78" +version = "0.3.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77e4b637749ff0d92b8fad63aa1f7cff3cbe125fd49c175cd6345e7272638b12" +checksum = "9367c417a924a74cae129e6a2ae3b47fabb1f8995595ab474029da749a8be120" dependencies = [ "js-sys", "wasm-bindgen", @@ -8762,7 +9431,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.61.0", ] [[package]] @@ -8773,13 +9442,13 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.61.2" +version = "0.62.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +checksum = "57fe7168f7de578d2d8a05b07fd61870d2e73b4020e9f49aa00da8471723497c" dependencies = [ "windows-implement", "windows-interface", - "windows-link 0.1.3", + "windows-link 0.2.0", "windows-result", "windows-strings", ] @@ -8820,20 +9489,20 @@ checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" [[package]] name = "windows-result" -version = "0.3.4" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +checksum = "7084dcc306f89883455a206237404d3eaf961e5bd7e0f312f7c91f57eb44167f" dependencies = [ - "windows-link 0.1.3", + "windows-link 0.2.0", ] [[package]] name = "windows-strings" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +checksum = "7218c655a553b0bed4426cf54b20d7ba363ef543b52d515b3e48d7fd55318dda" dependencies = [ - "windows-link 0.1.3", + "windows-link 0.2.0", ] [[package]] @@ -9150,9 +9819,9 @@ checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" [[package]] name = "wit-bindgen" -version = "0.45.1" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c573471f125075647d03df72e026074b7203790d41351cd6edc96f46bcccd36" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] name = "writeable" @@ -9183,8 +9852,9 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "7.0.0" -source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1#a71ec19a94702ea71767ba5ac97603ea6c6305c1" +version = "11.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d3d21c65cbf847ae0b1a8e6411b614d269d3108c6c649b039bffcf225e89aa4" dependencies = [ "Inflector", "proc-macro2", @@ -9330,24 +10000,12 @@ dependencies = [ [[package]] name = "zip" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12598812502ed0105f607f941c386f43d441e00148fce9dec3ca5ffb0bde9308" -dependencies = [ - "arbitrary", - "crc32fast", - "indexmap 2.11.1", - "memchr", -] - -[[package]] -name = "zip" -version = "4.6.1" +version = "5.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caa8cd6af31c3b31c6631b8f483848b91589021b28fffe50adada48d4f4d2ed1" +checksum = "2f852905151ac8d4d06fdca66520a661c09730a74c6d4e2b0f27b436b382e532" dependencies = [ "arbitrary", "crc32fast", - "indexmap 2.11.1", + "indexmap 2.11.4", "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 0cafe5d2405..b54e2f69cee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -94,12 +94,12 @@ pallet-revive-uapi = { git = "https://github.com/use-ink/polkadot-sdk.git", rev sp-externalities = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } sp-io = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] } -sp-runtime-interface = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_target_static_assertions"] } -sp-core = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } -sp-keyring = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } -sp-runtime = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1" } -sp-weights = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } -xcm = { package = "staging-xcm", git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } +sp-runtime-interface = { version = "31.0.0", default-features = false, features = ["disable_target_static_assertions"] } +sp-core = { version = "38.0.0", default-features = false } +sp-keyring = {version = "43.0.0", default-features = false } +sp-runtime = "43.0.0" +sp-weights = { version = "33.0.0", default-features = false } +xcm = { package = "staging-xcm", version = "18.0.0", default-features = false } # PolkaVM dependencies polkavm-derive = { version = "0.26.0", default-features = false } From 22b60322f6a57198ab3f3d8cf63d1c4fdacc7e92 Mon Sep 17 00:00:00 2001 From: AlexD10S Date: Thu, 25 Sep 2025 10:43:08 +0200 Subject: [PATCH 11/14] chore: upgrade all dependencies except pallet_revive --- Cargo.lock | 184 ++++++++++++++---- Cargo.toml | 14 +- crates/e2e/Cargo.toml | 7 +- crates/env/Cargo.toml | 4 +- crates/ink/Cargo.toml | 4 +- crates/primitives/Cargo.toml | 4 +- crates/storage/traits/Cargo.toml | 4 +- .../public/contract-xcm/Cargo.toml | 4 +- .../public/payment-channel/Cargo.toml | 2 +- .../public/runtime-call-contract/Cargo.toml | 10 +- 10 files changed, 169 insertions(+), 68 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 09c45420fcd..c1485e856f4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2600,7 +2600,7 @@ source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea717 dependencies = [ "frame-support 28.0.0", "frame-support-procedural 23.0.0", - "frame-system", + "frame-system 28.0.0", "linregress", "log", "parity-scale-codec", @@ -2617,6 +2617,31 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "frame-benchmarking" +version = "42.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b574ee6e347515ef5009a895e537922f6139f278842897c43c68d93e1d1d00d" +dependencies = [ + "frame-support 42.0.0", + "frame-support-procedural 35.0.0", + "frame-system 42.0.0", + "linregress", + "log", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "sp-api 38.0.0", + "sp-application-crypto 42.0.0", + "sp-core 38.0.0", + "sp-io 42.0.0", + "sp-runtime 43.0.0", + "sp-runtime-interface 31.0.0", + "sp-storage 22.0.0", + "static_assertions", +] + [[package]] name = "frame-decode" version = "0.8.3" @@ -2848,6 +2873,26 @@ dependencies = [ "sp-weights 27.0.0", ] +[[package]] +name = "frame-system" +version = "42.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8643078c6b60d4082dd566b25004ca74bce5241a167cde9e87a5ae939eeca471" +dependencies = [ + "cfg-if", + "docify", + "frame-support 42.0.0", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 38.0.0", + "sp-io 42.0.0", + "sp-runtime 43.0.0", + "sp-version 41.0.0", + "sp-weights 33.0.0", +] + [[package]] name = "fs-err" version = "2.11.0" @@ -3595,10 +3640,10 @@ dependencies = [ "linkme", "pallet-revive-uapi", "parity-scale-codec", - "polkavm-derive 0.26.0", + "polkavm-derive 0.29.0", "scale-info", - "sp-io 30.0.0", - "sp-runtime-interface 24.0.0", + "sp-io 42.0.0", + "sp-runtime-interface 31.0.0", "staging-xcm", "trybuild", ] @@ -3625,7 +3670,7 @@ dependencies = [ "ink_primitives 6.0.0-alpha.4", "itertools 0.14.0", "parity-scale-codec", - "polkavm-derive 0.26.0", + "polkavm-derive 0.29.0", "proc-macro2", "quote", "serde", @@ -3639,7 +3684,7 @@ version = "6.0.0-alpha.4" dependencies = [ "cargo_metadata 0.21.0", "contract-build", - "frame-support 28.0.0", + "frame-support 42.0.0", "funty", "impl-serde", "ink", @@ -3650,6 +3695,7 @@ dependencies = [ "ink_sandbox", "itertools 0.14.0", "jsonrpsee", + "pallet-revive", "parity-scale-codec", "regex", "scale-info", @@ -3657,10 +3703,10 @@ dependencies = [ "serde_json", "sha3", "sp-core 38.0.0", - "sp-io 30.0.0", + "sp-io 42.0.0", "sp-keyring", "sp-runtime 43.0.0", - "sp-runtime-interface 24.0.0", + "sp-runtime-interface 31.0.0", "sp-weights 33.0.0", "subxt", "subxt-metadata 0.44.0", @@ -3724,7 +3770,7 @@ dependencies = [ "num-traits", "pallet-revive-uapi", "parity-scale-codec", - "polkavm-derive 0.26.0", + "polkavm-derive 0.29.0", "scale-decode", "scale-encode", "scale-info", @@ -3732,8 +3778,8 @@ dependencies = [ "secp256k1 0.30.0", "sha2 0.10.9", "sha3", - "sp-io 30.0.0", - "sp-runtime-interface 24.0.0", + "sp-io 42.0.0", + "sp-runtime-interface 31.0.0", "staging-xcm", "static_assertions", ] @@ -3841,8 +3887,8 @@ dependencies = [ "scale-info", "serde", "sp-core 38.0.0", - "sp-io 30.0.0", - "sp-runtime-interface 24.0.0", + "sp-io 42.0.0", + "sp-runtime-interface 31.0.0", "sp-weights 33.0.0", "xxhash-rust", ] @@ -3893,8 +3939,8 @@ name = "ink_sandbox" version = "6.0.0-alpha.4" dependencies = [ "frame-metadata", - "frame-support 28.0.0", - "frame-system", + "frame-support 42.0.0", + "frame-system 42.0.0", "ink_primitives 6.0.0-alpha.4", "ink_revive_types", "pallet-balances", @@ -3905,8 +3951,8 @@ dependencies = [ "scale-info", "sha3", "sp-core 38.0.0", - "sp-externalities 0.25.0", - "sp-io 30.0.0", + "sp-externalities 0.30.0", + "sp-io 42.0.0", "sp-runtime 43.0.0", ] @@ -3941,8 +3987,8 @@ dependencies = [ "parity-scale-codec", "paste", "scale-info", - "sp-io 30.0.0", - "sp-runtime-interface 24.0.0", + "sp-io 42.0.0", + "sp-runtime-interface 31.0.0", ] [[package]] @@ -4750,18 +4796,19 @@ dependencies = [ [[package]] name = "pallet-balances" -version = "28.0.0" -source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1#a71ec19a94702ea71767ba5ac97603ea6c6305c1" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54e1d878d53272e0b47d4a55170ea6966b97ccc6f83107cf6173407c6407c730" dependencies = [ "docify", - "frame-benchmarking", - "frame-support 28.0.0", - "frame-system", + "frame-benchmarking 42.0.0", + "frame-support 42.0.0", + "frame-system 42.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 38.0.0", + "sp-runtime 43.0.0", ] [[package]] @@ -4774,9 +4821,9 @@ dependencies = [ "environmental", "ethereum-standards", "ethereum-types", - "frame-benchmarking", + "frame-benchmarking 28.0.0", "frame-support 28.0.0", - "frame-system", + "frame-system 28.0.0", "hex-literal 0.4.1", "humantime-serde", "impl-trait-for-tuples", @@ -4853,20 +4900,21 @@ dependencies = [ [[package]] name = "pallet-timestamp" -version = "27.0.0" -source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1#a71ec19a94702ea71767ba5ac97603ea6c6305c1" +version = "41.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21992790039a56ff9af246896d24d6e209c7db8ab9ebd45674aff12cdd4d0074" dependencies = [ "docify", - "frame-benchmarking", - "frame-support 28.0.0", - "frame-system", + "frame-benchmarking 42.0.0", + "frame-support 42.0.0", + "frame-system 42.0.0", "log", "parity-scale-codec", "scale-info", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", - "sp-storage 19.0.0", - "sp-timestamp", + "sp-inherents 38.0.0", + "sp-runtime 43.0.0", + "sp-storage 22.0.0", + "sp-timestamp 38.0.0", ] [[package]] @@ -4874,9 +4922,9 @@ name = "pallet-transaction-payment" version = "28.0.0" source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1#a71ec19a94702ea71767ba5ac97603ea6c6305c1" dependencies = [ - "frame-benchmarking", + "frame-benchmarking 28.0.0", "frame-support 28.0.0", - "frame-system", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", "serde", @@ -5149,6 +5197,12 @@ dependencies = [ "polkavm-assembler", ] +[[package]] +name = "polkavm-common" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f634b46a6a47a5de381f56d1d8cced9f8640d063b2b1a44b0da6dbef91bbd400" + [[package]] name = "polkavm-common" version = "0.29.0" @@ -5172,6 +5226,15 @@ dependencies = [ "polkavm-derive-impl-macro 0.27.0", ] +[[package]] +name = "polkavm-derive" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37ba6256c003853b6adb5dc8394e0e1882a9545ee3bec4e4ce533e7e4f488825" +dependencies = [ + "polkavm-derive-impl-macro 0.29.0", +] + [[package]] name = "polkavm-derive-impl" version = "0.26.0" @@ -5196,6 +5259,18 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "polkavm-derive-impl" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90751404f08622c8a671695605cfc1bd83ec091339bd3258a37acc7a931c8741" +dependencies = [ + "polkavm-common 0.29.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "polkavm-derive-impl-macro" version = "0.26.0" @@ -5216,6 +5291,16 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "polkavm-derive-impl-macro" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10e463de593b485c8685d42737aae81c24005dba967deaaaccbb6f3e936d8596" +dependencies = [ + "polkavm-derive-impl 0.29.0", + "syn 2.0.106", +] + [[package]] name = "polkavm-linker" version = "0.27.0" @@ -5242,7 +5327,7 @@ dependencies = [ "hashbrown 0.14.5", "log", "object", - "polkavm-common 0.29.0", + "polkavm-common 0.29.0 (git+https://github.com/paritytech/polkavm.git)", "regalloc2", "rustc-demangle", ] @@ -7178,7 +7263,7 @@ dependencies = [ "sp-consensus-slots", "sp-inherents 26.0.0", "sp-runtime 31.0.1", - "sp-timestamp", + "sp-timestamp 26.0.0", ] [[package]] @@ -7196,7 +7281,7 @@ dependencies = [ "sp-core 28.0.0", "sp-inherents 26.0.0", "sp-runtime 31.0.1", - "sp-timestamp", + "sp-timestamp 26.0.0", ] [[package]] @@ -7207,7 +7292,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-timestamp", + "sp-timestamp 26.0.0", ] [[package]] @@ -7815,6 +7900,19 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "sp-timestamp" +version = "38.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57897783f3ae2b0630196f767194d9f753759305a5266fc2e0522e920733df0a" +dependencies = [ + "async-trait", + "parity-scale-codec", + "sp-inherents 38.0.0", + "sp-runtime 43.0.0", + "thiserror 1.0.69", +] + [[package]] name = "sp-tracing" version = "16.0.0" diff --git a/Cargo.toml b/Cargo.toml index b54e2f69cee..7c207dffd86 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -84,16 +84,16 @@ const_env = { version = "0.1" } # Substrate dependencies frame-metadata = { version = "23.0.0", default-features = false } -frame-system = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } -frame-support = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } -pallet-balances = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } -pallet-timestamp = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } +frame-system = { version = "42.0.0", default-features = false } +frame-support = { version = "42.0.0", default-features = false } +pallet-balances = { version = "43.0.1", default-features = false } +pallet-timestamp = { version = "41.0.0", default-features = false } pallet-revive = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } pallet-revive-uapi = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["unstable-hostfn"] } -sp-externalities = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } -sp-io = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] } +sp-externalities = { version = "0.30.0", default-features = false } +sp-io = { version = "42.0.0", default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] } sp-runtime-interface = { version = "31.0.0", default-features = false, features = ["disable_target_static_assertions"] } sp-core = { version = "38.0.0", default-features = false } sp-keyring = {version = "43.0.0", default-features = false } @@ -102,7 +102,7 @@ sp-weights = { version = "33.0.0", default-features = false } xcm = { package = "staging-xcm", version = "18.0.0", default-features = false } # PolkaVM dependencies -polkavm-derive = { version = "0.26.0", default-features = false } +polkavm-derive = { version = "0.29.0", default-features = false } # Solidity dependencies alloy-core = { version = "1.1.0", default-features = false } diff --git a/crates/e2e/Cargo.toml b/crates/e2e/Cargo.toml index c65f1cc9e0b..e16e85ae807 100644 --- a/crates/e2e/Cargo.toml +++ b/crates/e2e/Cargo.toml @@ -46,11 +46,12 @@ sp-core = { workspace = true } sp-keyring = { workspace = true } sp-runtime = { workspace = true } sp-weights = { workspace = true } +pallet-revive = { workspace = true, optional = true } regex = "1.11.2" itertools = "0.14.0" -sp-io = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] } -sp-runtime-interface = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_target_static_assertions"] } +sp-io = { workspace = true, default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] } +sp-runtime-interface = { workspace = true, default-features = false, features = ["disable_target_static_assertions"] } [dev-dependencies] # Required for the doctest of `MessageBuilder::call` @@ -74,10 +75,12 @@ std = [ "ink_revive_types/std", "ink_sandbox?/std", "frame-support/std", + "pallet-revive?/std", ] sandbox = [ "dep:ink_sandbox", "dep:subxt-metadata", + "dep:pallet-revive", "ink_e2e_macro/sandbox", ] diff --git a/crates/env/Cargo.toml b/crates/env/Cargo.toml index 3b8c515f837..24d32643b6c 100644 --- a/crates/env/Cargo.toml +++ b/crates/env/Cargo.toml @@ -32,8 +32,8 @@ xcm = { workspace = true, optional = true } hex-literal = "1" const-crypto = "0.3.0" -sp-io = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] } -sp-runtime-interface = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_target_static_assertions"] } +sp-io = { workspace = true, default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] } +sp-runtime-interface = { workspace = true, default-features = false, features = ["disable_target_static_assertions"] } [target.'cfg(target_arch = "riscv64")'.dependencies] polkavm-derive = { workspace = true, default-features = false } diff --git a/crates/ink/Cargo.toml b/crates/ink/Cargo.toml index 83dcd7ba828..560f473026b 100644 --- a/crates/ink/Cargo.toml +++ b/crates/ink/Cargo.toml @@ -33,8 +33,8 @@ linkme = { workspace = true, optional = true } polkavm-derive = { workspace = true } xcm = { workspace = true, optional = true } -sp-io = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] } -sp-runtime-interface = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_target_static_assertions"] } +sp-io = { workspace = true, default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] } +sp-runtime-interface = { workspace = true, default-features = false, features = ["disable_target_static_assertions"] } [dev-dependencies] ink_ir = { workspace = true, default-features = true } diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index fbd05eb3dc2..ebeb4ca364e 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -31,8 +31,8 @@ cfg-if = { workspace = true } num-traits = { workspace = true, features = ["i128"] } sp-core = { workspace = true } -sp-io = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] } -sp-runtime-interface = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_target_static_assertions"] } +sp-io = { workspace = true, default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] } +sp-runtime-interface = { workspace = true, default-features = false, features = ["disable_target_static_assertions"] } sp-weights = { workspace = true } impl-trait-for-tuples = { workspace = true } itertools = { workspace = true } diff --git a/crates/storage/traits/Cargo.toml b/crates/storage/traits/Cargo.toml index b9b647af3be..3e5e22dbbb2 100644 --- a/crates/storage/traits/Cargo.toml +++ b/crates/storage/traits/Cargo.toml @@ -21,8 +21,8 @@ ink_prelude = { workspace = true } scale = { workspace = true } scale-info = { workspace = true, features = ["derive"], optional = true } -sp-io = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] } -sp-runtime-interface = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_target_static_assertions"] } +sp-io = { workspace = true, default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] } +sp-runtime-interface = { workspace = true, default-features = false, features = ["disable_target_static_assertions"] } [dev-dependencies] paste = { workspace = true } diff --git a/integration-tests/public/contract-xcm/Cargo.toml b/integration-tests/public/contract-xcm/Cargo.toml index df9ef2f2622..bedda4d9667 100644 --- a/integration-tests/public/contract-xcm/Cargo.toml +++ b/integration-tests/public/contract-xcm/Cargo.toml @@ -7,8 +7,8 @@ publish = false [dependencies] ink = { path = "../../../crates/ink", default-features = false, features = ["unstable-hostfn"] } -frame-support = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } -pallet-balances = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } +frame-support = { version = "42.0.0", default-features = false } +pallet-balances = { version = "43.0.1", default-features = false } [dev-dependencies] ink_e2e = { path = "../../../crates/e2e", features = ["sandbox"] } diff --git a/integration-tests/public/payment-channel/Cargo.toml b/integration-tests/public/payment-channel/Cargo.toml index 1d79f25e43a..66c2ba2dda6 100755 --- a/integration-tests/public/payment-channel/Cargo.toml +++ b/integration-tests/public/payment-channel/Cargo.toml @@ -8,7 +8,7 @@ publish = false [dependencies] # `unstable-hostfn` is needed for the `pallet-revive` function `terminate_contract` ink = { path = "../../../crates/ink", default-features = false, features = ["unstable-hostfn"] } -sp-core = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } +sp-core = { version = "38.0.0", default-features = false } [dev-dependencies] hex-literal = "1" diff --git a/integration-tests/public/runtime-call-contract/Cargo.toml b/integration-tests/public/runtime-call-contract/Cargo.toml index daf2a01401f..ef0e2dc5454 100644 --- a/integration-tests/public/runtime-call-contract/Cargo.toml +++ b/integration-tests/public/runtime-call-contract/Cargo.toml @@ -11,11 +11,11 @@ keywords = ["polkavm", "ink", "riscv", "blockchain", "edsl"] publish = false [workspace.dependencies] -frame-support = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } -frame-system = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } -pallet-balances = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } +frame-support = { version = "42.0.0", default-features = false } +frame-system = { version = "42.0.0", default-features = false } +pallet-balances = { version = "43.0.1", default-features = false } pallet-revive = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } -sp-runtime = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } +sp-runtime = { version = "43.0.0", default-features = false } # todo codec = { package = "parity-scale-codec", version = "3.7.4", default-features = false } @@ -38,7 +38,7 @@ sandbox-runtime = { path = "sandbox-runtime", default-features = false } scale-value = "0.18.0" # can't use workspace dependency because of `cargo-contract` build not # working with workspace dependencies -frame-support = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } +frame-support = { version = "42.0.0", default-features = false } [lib] path = "lib.rs" From ff5cdfebfd139896f9a767b9397ab4d51fbccf71 Mon Sep 17 00:00:00 2001 From: AlexD10S Date: Fri, 26 Sep 2025 10:07:07 +0200 Subject: [PATCH 12/14] fix: weights update --- Cargo.lock | 138 +++++++++---------------------- Cargo.toml | 16 ++-- crates/e2e/src/sandbox_client.rs | 20 ++++- 3 files changed, 63 insertions(+), 111 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c1485e856f4..8efd5737627 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2600,7 +2600,7 @@ source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea717 dependencies = [ "frame-support 28.0.0", "frame-support-procedural 23.0.0", - "frame-system 28.0.0", + "frame-system", "linregress", "log", "parity-scale-codec", @@ -2617,31 +2617,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "frame-benchmarking" -version = "42.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b574ee6e347515ef5009a895e537922f6139f278842897c43c68d93e1d1d00d" -dependencies = [ - "frame-support 42.0.0", - "frame-support-procedural 35.0.0", - "frame-system 42.0.0", - "linregress", - "log", - "parity-scale-codec", - "paste", - "scale-info", - "serde", - "sp-api 38.0.0", - "sp-application-crypto 42.0.0", - "sp-core 38.0.0", - "sp-io 42.0.0", - "sp-runtime 43.0.0", - "sp-runtime-interface 31.0.0", - "sp-storage 22.0.0", - "static_assertions", -] - [[package]] name = "frame-decode" version = "0.8.3" @@ -2873,26 +2848,6 @@ dependencies = [ "sp-weights 27.0.0", ] -[[package]] -name = "frame-system" -version = "42.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8643078c6b60d4082dd566b25004ca74bce5241a167cde9e87a5ae939eeca471" -dependencies = [ - "cfg-if", - "docify", - "frame-support 42.0.0", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 38.0.0", - "sp-io 42.0.0", - "sp-runtime 43.0.0", - "sp-version 41.0.0", - "sp-weights 33.0.0", -] - [[package]] name = "fs-err" version = "2.11.0" @@ -3642,7 +3597,7 @@ dependencies = [ "parity-scale-codec", "polkavm-derive 0.29.0", "scale-info", - "sp-io 42.0.0", + "sp-io 30.0.0", "sp-runtime-interface 31.0.0", "staging-xcm", "trybuild", @@ -3684,7 +3639,7 @@ version = "6.0.0-alpha.4" dependencies = [ "cargo_metadata 0.21.0", "contract-build", - "frame-support 42.0.0", + "frame-support 28.0.0", "funty", "impl-serde", "ink", @@ -3703,11 +3658,11 @@ dependencies = [ "serde_json", "sha3", "sp-core 38.0.0", - "sp-io 42.0.0", + "sp-io 30.0.0", "sp-keyring", - "sp-runtime 43.0.0", + "sp-runtime 31.0.1", "sp-runtime-interface 31.0.0", - "sp-weights 33.0.0", + "sp-weights 27.0.0", "subxt", "subxt-metadata 0.44.0", "subxt-signer 0.44.0", @@ -3778,7 +3733,7 @@ dependencies = [ "secp256k1 0.30.0", "sha2 0.10.9", "sha3", - "sp-io 42.0.0", + "sp-io 30.0.0", "sp-runtime-interface 31.0.0", "staging-xcm", "static_assertions", @@ -3887,9 +3842,9 @@ dependencies = [ "scale-info", "serde", "sp-core 38.0.0", - "sp-io 42.0.0", + "sp-io 30.0.0", "sp-runtime-interface 31.0.0", - "sp-weights 33.0.0", + "sp-weights 27.0.0", "xxhash-rust", ] @@ -3931,7 +3886,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-runtime", + "sp-runtime 31.0.1", ] [[package]] @@ -3939,8 +3894,8 @@ name = "ink_sandbox" version = "6.0.0-alpha.4" dependencies = [ "frame-metadata", - "frame-support 42.0.0", - "frame-system 42.0.0", + "frame-support 28.0.0", + "frame-system", "ink_primitives 6.0.0-alpha.4", "ink_revive_types", "pallet-balances", @@ -3951,9 +3906,9 @@ dependencies = [ "scale-info", "sha3", "sp-core 38.0.0", - "sp-externalities 0.30.0", - "sp-io 42.0.0", - "sp-runtime 43.0.0", + "sp-externalities 0.25.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -3987,7 +3942,7 @@ dependencies = [ "parity-scale-codec", "paste", "scale-info", - "sp-io 42.0.0", + "sp-io 30.0.0", "sp-runtime-interface 31.0.0", ] @@ -4796,19 +4751,18 @@ dependencies = [ [[package]] name = "pallet-balances" -version = "43.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e1d878d53272e0b47d4a55170ea6966b97ccc6f83107cf6173407c6407c730" +version = "28.0.0" +source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1#a71ec19a94702ea71767ba5ac97603ea6c6305c1" dependencies = [ "docify", - "frame-benchmarking 42.0.0", - "frame-support 42.0.0", - "frame-system 42.0.0", + "frame-benchmarking", + "frame-support 28.0.0", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 38.0.0", - "sp-runtime 43.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -4821,9 +4775,9 @@ dependencies = [ "environmental", "ethereum-standards", "ethereum-types", - "frame-benchmarking 28.0.0", + "frame-benchmarking", "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-system", "hex-literal 0.4.1", "humantime-serde", "impl-trait-for-tuples", @@ -4900,21 +4854,20 @@ dependencies = [ [[package]] name = "pallet-timestamp" -version = "41.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21992790039a56ff9af246896d24d6e209c7db8ab9ebd45674aff12cdd4d0074" +version = "27.0.0" +source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1#a71ec19a94702ea71767ba5ac97603ea6c6305c1" dependencies = [ "docify", - "frame-benchmarking 42.0.0", - "frame-support 42.0.0", - "frame-system 42.0.0", + "frame-benchmarking", + "frame-support 28.0.0", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-inherents 38.0.0", - "sp-runtime 43.0.0", - "sp-storage 22.0.0", - "sp-timestamp 38.0.0", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "sp-storage 19.0.0", + "sp-timestamp", ] [[package]] @@ -4922,9 +4875,9 @@ name = "pallet-transaction-payment" version = "28.0.0" source = "git+https://github.com/use-ink/polkadot-sdk.git?rev=a71ec19a94702ea71767ba5ac97603ea6c6305c1#a71ec19a94702ea71767ba5ac97603ea6c6305c1" dependencies = [ - "frame-benchmarking 28.0.0", + "frame-benchmarking", "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-system", "parity-scale-codec", "scale-info", "serde", @@ -7263,7 +7216,7 @@ dependencies = [ "sp-consensus-slots", "sp-inherents 26.0.0", "sp-runtime 31.0.1", - "sp-timestamp 26.0.0", + "sp-timestamp", ] [[package]] @@ -7281,7 +7234,7 @@ dependencies = [ "sp-core 28.0.0", "sp-inherents 26.0.0", "sp-runtime 31.0.1", - "sp-timestamp 26.0.0", + "sp-timestamp", ] [[package]] @@ -7292,7 +7245,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-timestamp 26.0.0", + "sp-timestamp", ] [[package]] @@ -7900,19 +7853,6 @@ dependencies = [ "thiserror 1.0.69", ] -[[package]] -name = "sp-timestamp" -version = "38.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57897783f3ae2b0630196f767194d9f753759305a5266fc2e0522e920733df0a" -dependencies = [ - "async-trait", - "parity-scale-codec", - "sp-inherents 38.0.0", - "sp-runtime 43.0.0", - "thiserror 1.0.69", -] - [[package]] name = "sp-tracing" version = "16.0.0" diff --git a/Cargo.toml b/Cargo.toml index 7c207dffd86..ff78f35c826 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -84,21 +84,21 @@ const_env = { version = "0.1" } # Substrate dependencies frame-metadata = { version = "23.0.0", default-features = false } -frame-system = { version = "42.0.0", default-features = false } -frame-support = { version = "42.0.0", default-features = false } -pallet-balances = { version = "43.0.1", default-features = false } -pallet-timestamp = { version = "41.0.0", default-features = false } +frame-system = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } +frame-support = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } +pallet-balances = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } +pallet-timestamp = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } pallet-revive = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } pallet-revive-uapi = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["unstable-hostfn"] } -sp-externalities = { version = "0.30.0", default-features = false } -sp-io = { version = "42.0.0", default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] } +sp-externalities = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } +sp-io = {git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] } sp-runtime-interface = { version = "31.0.0", default-features = false, features = ["disable_target_static_assertions"] } sp-core = { version = "38.0.0", default-features = false } sp-keyring = {version = "43.0.0", default-features = false } -sp-runtime = "43.0.0" -sp-weights = { version = "33.0.0", default-features = false } +sp-runtime = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1" } +sp-weights = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } xcm = { package = "staging-xcm", version = "18.0.0", default-features = false } # PolkaVM dependencies diff --git a/crates/e2e/src/sandbox_client.rs b/crates/e2e/src/sandbox_client.rs index 5139bc390d5..f434a46e4a5 100644 --- a/crates/e2e/src/sandbox_client.rs +++ b/crates/e2e/src/sandbox_client.rs @@ -447,8 +447,14 @@ where }; let result = ContractResult:: { - gas_consumed: dry_run_result.gas_consumed, - gas_required: dry_run_result.gas_required, + gas_consumed: sp_runtime::Weight::from_parts( + dry_run_result.gas_consumed.ref_time(), + dry_run_result.gas_consumed.proof_size(), + ), + gas_required: sp_runtime::Weight::from_parts( + dry_run_result.gas_required.ref_time(), + dry_run_result.gas_required.proof_size(), + ), storage_deposit: to_revive_storage_deposit(dry_run_result.storage_deposit), result: dry_run_result.result.map(|res| { InstantiateReturnValue { @@ -636,8 +642,14 @@ where // todo error when `AccountUnmapped` Ok(CallDryRunResult { exec_result: ContractExecResultFor:: { - gas_consumed: result.gas_consumed, - gas_required: result.gas_required, + gas_consumed: sp_runtime::Weight::from_parts( + result.gas_consumed.ref_time(), + result.gas_consumed.proof_size(), + ), + gas_required: sp_runtime::Weight::from_parts( + result.gas_required.ref_time(), + result.gas_required.proof_size(), + ), storage_deposit: to_revive_storage_deposit(result.storage_deposit), result: result.result.map(|res| { ExecReturnValue { From 62a36810df90d9cef63368e537a672835e3961d3 Mon Sep 17 00:00:00 2001 From: AlexD10S Date: Fri, 26 Sep 2025 11:46:13 +0200 Subject: [PATCH 13/14] refactor: dependencies --- Cargo.lock | 5 ++--- Cargo.toml | 2 +- crates/e2e/Cargo.toml | 3 --- crates/e2e/src/sandbox_client.rs | 12 +++++++++--- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8efd5737627..c297e11935c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3650,7 +3650,6 @@ dependencies = [ "ink_sandbox", "itertools 0.14.0", "jsonrpsee", - "pallet-revive", "parity-scale-codec", "regex", "scale-info", @@ -3662,7 +3661,7 @@ dependencies = [ "sp-keyring", "sp-runtime 31.0.1", "sp-runtime-interface 31.0.0", - "sp-weights 27.0.0", + "sp-weights 33.0.0", "subxt", "subxt-metadata 0.44.0", "subxt-signer 0.44.0", @@ -3844,7 +3843,7 @@ dependencies = [ "sp-core 38.0.0", "sp-io 30.0.0", "sp-runtime-interface 31.0.0", - "sp-weights 27.0.0", + "sp-weights 33.0.0", "xxhash-rust", ] diff --git a/Cargo.toml b/Cargo.toml index ff78f35c826..78c3f3a3d33 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -98,7 +98,7 @@ sp-runtime-interface = { version = "31.0.0", default-features = false, features sp-core = { version = "38.0.0", default-features = false } sp-keyring = {version = "43.0.0", default-features = false } sp-runtime = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1" } -sp-weights = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } +sp-weights = { version = "33.0.0", default-features = false } xcm = { package = "staging-xcm", version = "18.0.0", default-features = false } # PolkaVM dependencies diff --git a/crates/e2e/Cargo.toml b/crates/e2e/Cargo.toml index e16e85ae807..299596662a1 100644 --- a/crates/e2e/Cargo.toml +++ b/crates/e2e/Cargo.toml @@ -46,7 +46,6 @@ sp-core = { workspace = true } sp-keyring = { workspace = true } sp-runtime = { workspace = true } sp-weights = { workspace = true } -pallet-revive = { workspace = true, optional = true } regex = "1.11.2" itertools = "0.14.0" @@ -75,12 +74,10 @@ std = [ "ink_revive_types/std", "ink_sandbox?/std", "frame-support/std", - "pallet-revive?/std", ] sandbox = [ "dep:ink_sandbox", "dep:subxt-metadata", - "dep:pallet-revive", "ink_e2e_macro/sandbox", ] diff --git a/crates/e2e/src/sandbox_client.rs b/crates/e2e/src/sandbox_client.rs index f434a46e4a5..0d2ddb37d01 100644 --- a/crates/e2e/src/sandbox_client.rs +++ b/crates/e2e/src/sandbox_client.rs @@ -60,6 +60,7 @@ use ink_primitives::{ DepositLimit, H160, U256, + Weight, abi::AbiEncodeWith, }; use ink_revive_types::{ @@ -72,7 +73,6 @@ use ink_sandbox::{ AccountIdFor, RuntimeCall, Sandbox, - Weight, api::prelude::*, frame_system, frame_system::pallet_prelude::OriginFor, @@ -351,7 +351,10 @@ where data, salt(), caller_to_origin::(caller), - gas_limit, + sp_runtime::Weight::from_parts( + gas_limit.ref_time(), + gas_limit.proof_size(), + ), storage_deposit_limit, ) }); @@ -563,7 +566,10 @@ where value, input_data, caller_to_origin::(signer), - gas_limit, + sp_runtime::Weight::from_parts( + gas_limit.ref_time(), + gas_limit.proof_size(), + ), storage_deposit_limit, ) .result From 4645c4145e32ff0b9f5d82cb83eba8b66dacd652 Mon Sep 17 00:00:00 2001 From: AlexD10S Date: Fri, 26 Sep 2025 13:38:21 +0200 Subject: [PATCH 14/14] fix: dependencies in tests --- integration-tests/public/contract-xcm/Cargo.toml | 4 ++-- integration-tests/public/payment-channel/Cargo.toml | 2 +- .../public/runtime-call-contract/Cargo.toml | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/integration-tests/public/contract-xcm/Cargo.toml b/integration-tests/public/contract-xcm/Cargo.toml index bedda4d9667..df9ef2f2622 100644 --- a/integration-tests/public/contract-xcm/Cargo.toml +++ b/integration-tests/public/contract-xcm/Cargo.toml @@ -7,8 +7,8 @@ publish = false [dependencies] ink = { path = "../../../crates/ink", default-features = false, features = ["unstable-hostfn"] } -frame-support = { version = "42.0.0", default-features = false } -pallet-balances = { version = "43.0.1", default-features = false } +frame-support = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } +pallet-balances = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } [dev-dependencies] ink_e2e = { path = "../../../crates/e2e", features = ["sandbox"] } diff --git a/integration-tests/public/payment-channel/Cargo.toml b/integration-tests/public/payment-channel/Cargo.toml index 66c2ba2dda6..1d79f25e43a 100755 --- a/integration-tests/public/payment-channel/Cargo.toml +++ b/integration-tests/public/payment-channel/Cargo.toml @@ -8,7 +8,7 @@ publish = false [dependencies] # `unstable-hostfn` is needed for the `pallet-revive` function `terminate_contract` ink = { path = "../../../crates/ink", default-features = false, features = ["unstable-hostfn"] } -sp-core = { version = "38.0.0", default-features = false } +sp-core = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } [dev-dependencies] hex-literal = "1" diff --git a/integration-tests/public/runtime-call-contract/Cargo.toml b/integration-tests/public/runtime-call-contract/Cargo.toml index ef0e2dc5454..daf2a01401f 100644 --- a/integration-tests/public/runtime-call-contract/Cargo.toml +++ b/integration-tests/public/runtime-call-contract/Cargo.toml @@ -11,11 +11,11 @@ keywords = ["polkavm", "ink", "riscv", "blockchain", "edsl"] publish = false [workspace.dependencies] -frame-support = { version = "42.0.0", default-features = false } -frame-system = { version = "42.0.0", default-features = false } -pallet-balances = { version = "43.0.1", default-features = false } +frame-support = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } +frame-system = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } +pallet-balances = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } pallet-revive = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } -sp-runtime = { version = "43.0.0", default-features = false } +sp-runtime = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } # todo codec = { package = "parity-scale-codec", version = "3.7.4", default-features = false } @@ -38,7 +38,7 @@ sandbox-runtime = { path = "sandbox-runtime", default-features = false } scale-value = "0.18.0" # can't use workspace dependency because of `cargo-contract` build not # working with workspace dependencies -frame-support = { version = "42.0.0", default-features = false } +frame-support = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false } [lib] path = "lib.rs"