From 7ea05c8577f6e5727c0c956650ac5ae18f8d55ba Mon Sep 17 00:00:00 2001 From: Henrique Nogara Date: Wed, 20 Dec 2023 18:26:02 -0300 Subject: [PATCH 1/7] Write extrinsic error to output buffer --- contracts/nft_royalty/Cargo.lock | 10 -- contracts/nft_royalty/Cargo.toml | 5 +- contracts/upgradeable-polymesh-ink/Cargo.lock | 10 -- contracts/upgradeable-polymesh-ink/Cargo.toml | 2 +- contracts/upgradeable-polymesh-ink/src/lib.rs | 120 +++++------------- pallets/contracts/src/chain_extension.rs | 16 ++- 6 files changed, 51 insertions(+), 112 deletions(-) diff --git a/contracts/nft_royalty/Cargo.lock b/contracts/nft_royalty/Cargo.lock index 878938403d..9b5e8407a6 100644 --- a/contracts/nft_royalty/Cargo.lock +++ b/contracts/nft_royalty/Cargo.lock @@ -2043,8 +2043,6 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "polymesh-api" version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0447542e190095b2950c3047483a4f676d07be3cce61e095a672ef2197cb28e" dependencies = [ "ink", "log", @@ -2059,8 +2057,6 @@ dependencies = [ [[package]] name = "polymesh-api-client" version = "3.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9724c8ccc50b2aeb885d9b6906b02bf0a6815cf2e80e6b95dcfd3c6714820f3" dependencies = [ "async-stream", "async-trait", @@ -2092,8 +2088,6 @@ dependencies = [ [[package]] name = "polymesh-api-codegen" version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40cb9faabe0fcc9b39b1e58f8de3b0771bb6240dc0ec9643d9b50c1880357eae" dependencies = [ "frame-metadata", "heck", @@ -2112,8 +2106,6 @@ dependencies = [ [[package]] name = "polymesh-api-codegen-macro" version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "140562a50fce7873d1d1e43bccddf5d1930704352d2d2cafa01c6feaf96c799c" dependencies = [ "darling", "parity-scale-codec", @@ -2127,8 +2119,6 @@ dependencies = [ [[package]] name = "polymesh-api-ink" version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0d34465f4790fc4836dcc35b0ccc033a9bf4cc93d56ad240f381203e46ae279" dependencies = [ "hex", "ink", diff --git a/contracts/nft_royalty/Cargo.toml b/contracts/nft_royalty/Cargo.toml index 0e93063663..ae5874bc9f 100755 --- a/contracts/nft_royalty/Cargo.toml +++ b/contracts/nft_royalty/Cargo.toml @@ -10,14 +10,11 @@ scale = { package = "parity-scale-codec", version = "3", default-features = fals scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } sp-arithmetic = { version = "6.0.0", default-features = false } -polymesh-ink = { path = "../../../tmp/Polymesh/contracts/upgradeable-polymesh-ink", default-features = false, features = ["as-library"] } +polymesh-ink = { path = "../upgradeable-polymesh-ink", default-features = false, features = ["as-library"] } [lib] path = "lib.rs" -[profile.dev] -overflow-checks = false # Disable integer overflow checks. - [features] default = ["std"] std = [ diff --git a/contracts/upgradeable-polymesh-ink/Cargo.lock b/contracts/upgradeable-polymesh-ink/Cargo.lock index 37e9ce95a1..ea32c06823 100644 --- a/contracts/upgradeable-polymesh-ink/Cargo.lock +++ b/contracts/upgradeable-polymesh-ink/Cargo.lock @@ -2023,8 +2023,6 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "polymesh-api" version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0447542e190095b2950c3047483a4f676d07be3cce61e095a672ef2197cb28e" dependencies = [ "ink", "log", @@ -2039,8 +2037,6 @@ dependencies = [ [[package]] name = "polymesh-api-client" version = "3.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9724c8ccc50b2aeb885d9b6906b02bf0a6815cf2e80e6b95dcfd3c6714820f3" dependencies = [ "async-stream", "async-trait", @@ -2072,8 +2068,6 @@ dependencies = [ [[package]] name = "polymesh-api-codegen" version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40cb9faabe0fcc9b39b1e58f8de3b0771bb6240dc0ec9643d9b50c1880357eae" dependencies = [ "frame-metadata", "heck", @@ -2092,8 +2086,6 @@ dependencies = [ [[package]] name = "polymesh-api-codegen-macro" version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "140562a50fce7873d1d1e43bccddf5d1930704352d2d2cafa01c6feaf96c799c" dependencies = [ "darling", "parity-scale-codec", @@ -2107,8 +2099,6 @@ dependencies = [ [[package]] name = "polymesh-api-ink" version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0d34465f4790fc4836dcc35b0ccc033a9bf4cc93d56ad240f381203e46ae279" dependencies = [ "hex", "ink", diff --git a/contracts/upgradeable-polymesh-ink/Cargo.toml b/contracts/upgradeable-polymesh-ink/Cargo.toml index 0643e9b782..751494bf91 100755 --- a/contracts/upgradeable-polymesh-ink/Cargo.toml +++ b/contracts/upgradeable-polymesh-ink/Cargo.toml @@ -15,7 +15,7 @@ ink = { version = "4.3", default-features = false } scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } scale-info = { version = "2", default-features = false, features = ["derive"], optional = true } -polymesh-api = { version = "3.5", default-features = false, features = ["ink"] } +polymesh-api = { path = "../../../polymesh-api", default-features = false, features = ["ink"] } paste = "1.0" diff --git a/contracts/upgradeable-polymesh-ink/src/lib.rs b/contracts/upgradeable-polymesh-ink/src/lib.rs index 9dd2a6833d..d13f6892c1 100755 --- a/contracts/upgradeable-polymesh-ink/src/lib.rs +++ b/contracts/upgradeable-polymesh-ink/src/lib.rs @@ -8,109 +8,59 @@ mod macros; use alloc::vec; use alloc::vec::Vec; -// Polymesh API. -pub use polymesh_api::{ - ink::{basic_types::IdentityId, extension::PolymeshEnvironment}, - polymesh::types::{ - pallet_corporate_actions, - pallet_corporate_actions::CAId, - polymesh_contracts::Api as ContractRuntimeApi, - polymesh_primitives::{ - asset::{AssetName, AssetType, CheckpointId}, - asset_metadata::{ - AssetMetadataKey, AssetMetadataLocalKey, AssetMetadataName, AssetMetadataValue, - }, - identity_id::{PortfolioId, PortfolioKind, PortfolioName, PortfolioNumber}, - nft::{NFTId, NFTs}, - portfolio::{Fund, FundDescription}, - settlement::{InstructionId, Leg, SettlementType, VenueDetails, VenueId, VenueType}, - ticker::Ticker, - }, - }, - polymesh::Api, +pub use polymesh_api::ink::basic_types::IdentityId; +pub use polymesh_api::ink::extension::{ + PolymeshEnvironment, PolymeshRuntimeErr as PolymeshInkExtError, }; +pub use polymesh_api::ink::Error as PolymeshInkError; +pub use polymesh_api::polymesh::types::pallet_corporate_actions; +pub use polymesh_api::polymesh::types::pallet_corporate_actions::CAId; +pub use polymesh_api::polymesh::types::polymesh_contracts::Api as ContractRuntimeApi; +pub use polymesh_api::polymesh::types::polymesh_primitives::asset::{ + AssetName, AssetType, CheckpointId, +}; +pub use polymesh_api::polymesh::types::polymesh_primitives::asset_metadata::{ + AssetMetadataKey, AssetMetadataLocalKey, AssetMetadataName, AssetMetadataValue, +}; +pub use polymesh_api::polymesh::types::polymesh_primitives::identity_id::{ + PortfolioId, PortfolioKind, PortfolioName, PortfolioNumber, +}; +pub use polymesh_api::polymesh::types::polymesh_primitives::nft::{NFTId, NFTs}; +pub use polymesh_api::polymesh::types::polymesh_primitives::portfolio::{Fund, FundDescription}; +pub use polymesh_api::polymesh::types::polymesh_primitives::settlement::{ + InstructionId, Leg, SettlementType, VenueDetails, VenueId, VenueType, +}; +pub use polymesh_api::polymesh::types::polymesh_primitives::ticker::Ticker; +pub use polymesh_api::polymesh::Api; pub const API_VERSION: ContractRuntimeApi = ContractRuntimeApi { desc: *b"POLY", major: 6, }; -/// The contract error types. +/// Contract Errors. #[derive(Debug, scale::Encode, scale::Decode)] #[cfg_attr(feature = "std", derive(scale_info::TypeInfo))] pub enum PolymeshError { /// Polymesh runtime error. - PolymeshError, - /// Missing Identity. MultiSig's are not supported. + PolymeshRuntime(PolymeshInkError), + /// [`IdentityId`] not found for the contract caller. MultiSig's are not supported. MissingIdentity, - /// Invalid portfolio authorization. + /// No portfolio was found for the given [`PortfolioId`]. InvalidPortfolioAuthorization, - /// Ink! Delegate call error. - InkDelegateCallError { - selector: [u8; 4], - err: Option, - }, -} - -/// Encodable `ink::env::Error`. -#[derive(Debug, scale::Encode, scale::Decode)] -#[cfg_attr(feature = "std", derive(scale_info::TypeInfo))] -pub enum InkEnvError { - /// Error upon decoding an encoded value. - ScaleDecodeError, - /// The call to another contract has trapped. - CalleeTrapped, - /// The call to another contract has been reverted. - CalleeReverted, - /// The queried contract storage entry is missing. - KeyNotFound, - /// Transfer failed for other not further specified reason. Most probably - /// reserved or locked balance of the sender that was preventing the transfer. - TransferFailed, - /// Deprecated and no longer returned: Endowment is no longer required. - _EndowmentTooLow, - /// No code could be found at the supplied code hash. - CodeNotFound, - /// The account that was called is no contract, but a plain account. - NotCallable, - /// The call to `seal_debug_message` had no effect because debug message - /// recording was disabled. - LoggingDisabled, - /// ECDSA pubkey recovery failed. Most probably wrong recovery id or signature. - EcdsaRecoveryFailed, -} - -impl PolymeshError { - pub fn from_delegate_error(err: ink::env::Error, selector: ink::env::call::Selector) -> Self { - use ink::env::Error::*; - Self::InkDelegateCallError { - selector: selector.to_bytes(), - err: match err { - Decode(_) => Some(InkEnvError::ScaleDecodeError), - CalleeTrapped => Some(InkEnvError::CalleeTrapped), - CalleeReverted => Some(InkEnvError::CalleeReverted), - KeyNotFound => Some(InkEnvError::KeyNotFound), - TransferFailed => Some(InkEnvError::TransferFailed), - _EndowmentTooLow => Some(InkEnvError::_EndowmentTooLow), - CodeNotFound => Some(InkEnvError::CodeNotFound), - NotCallable => Some(InkEnvError::NotCallable), - LoggingDisabled => Some(InkEnvError::LoggingDisabled), - EcdsaRecoveryFailed => Some(InkEnvError::EcdsaRecoveryFailed), - _ => None, - }, - } - } + /// Polymesh ink extension error. + PolymeshExtension(PolymeshInkExtError), } -impl From for PolymeshError { - fn from(_err: polymesh_api::ink::Error) -> Self { - Self::PolymeshError +impl From for PolymeshError { + fn from(err: PolymeshInkError) -> Self { + Self::PolymeshRuntime(err) } } -impl From for PolymeshError { - fn from(_err: polymesh_api::ink::extension::PolymeshRuntimeErr) -> Self { - Self::PolymeshError +impl From for PolymeshError { + fn from(err: PolymeshInkExtError) -> Self { + Self::PolymeshExtension(err) } } diff --git a/pallets/contracts/src/chain_extension.rs b/pallets/contracts/src/chain_extension.rs index 5330a443d5..8f3696a9cd 100644 --- a/pallets/contracts/src/chain_extension.rs +++ b/pallets/contracts/src/chain_extension.rs @@ -8,6 +8,8 @@ use frame_support::log::trace; use frame_support::storage::unhashed; use frame_support::traits::{Get, GetCallMetadata}; use frame_system::RawOrigin; +use scale_info::prelude::format; +use scale_info::prelude::string::String; use scale_info::TypeInfo; use sp_core::crypto::UncheckedFrom; @@ -540,9 +542,19 @@ where env.adjust_weight(charged_amount, actual_weight); } - // Ensure the call was successful. - result.map_err(|e| e.error)?; + // Ensure the call was successful + if let Err(e) = result { + if let DispatchError::Module(e) = e.error { + let error_string: Result<(), String> = Err(format!("{e:?}")); + env.write(&error_string.encode(), false, None) + .map_err(|_| Error::::ReadStorageFailed)?; + return Ok(ce::RetVal::Converging(0)); + } + return Err(e.error); + } + env.write(&Ok::<(), String>(()).encode(), false, None) + .map_err(|_| Error::::ReadStorageFailed)?; // Done; continue with smart contract execution when returning. Ok(ce::RetVal::Converging(0)) } From a92049c3ba52323fdf52efed6a65f07ae4dff252 Mon Sep 17 00:00:00 2001 From: Henrique Nogara Date: Thu, 21 Dec 2023 09:06:55 -0300 Subject: [PATCH 2/7] Remove support for FuncId::OldCallRuntime; Add CallRuntimeWithError --- pallets/contracts/src/chain_extension.rs | 105 +++++++---------------- 1 file changed, 32 insertions(+), 73 deletions(-) diff --git a/pallets/contracts/src/chain_extension.rs b/pallets/contracts/src/chain_extension.rs index 8f3696a9cd..c2ac4f5fcb 100644 --- a/pallets/contracts/src/chain_extension.rs +++ b/pallets/contracts/src/chain_extension.rs @@ -81,9 +81,7 @@ pub enum FuncId { GetKeyDid, KeyHasher(KeyHasher, HashSize), GetLatestApiUpgrade, - - /// Deprecated Polymesh (<=5.0) chain extensions. - OldCallRuntime(ExtrinsicId), + CallRuntimeWithError, } impl FuncId { @@ -103,16 +101,7 @@ impl FuncId { 0x11 => Some(Self::KeyHasher(KeyHasher::Twox, HashSize::B128)), 0x12 => Some(Self::KeyHasher(KeyHasher::Twox, HashSize::B256)), 0x13 => Some(Self::GetLatestApiUpgrade), - _ => None, - }, - 0x1A => match func_id { - 0x00_00 | 0x01_00 | 0x02_00 | 0x03_00 | 0x11_00 => Some(Self::OldCallRuntime( - ExtrinsicId(0x1A, (func_id >> 8) as u8), - )), - _ => None, - }, - 0x2F => match func_id { - 0x01_00 => Some(Self::OldCallRuntime(ExtrinsicId(0x2F, 0x01))), + 0x14 => Some(Self::CallRuntimeWithError), _ => None, }, _ => None, @@ -134,9 +123,7 @@ impl Into for FuncId { Self::KeyHasher(KeyHasher::Twox, HashSize::B128) => (0x0000, 0x11), Self::KeyHasher(KeyHasher::Twox, HashSize::B256) => (0x0000, 0x12), Self::GetLatestApiUpgrade => (0x0000, 0x13), - Self::OldCallRuntime(ExtrinsicId(ext_id, func_id)) => { - (ext_id as u32, (func_id as u32) << 8) - } + Self::CallRuntimeWithError => (0x0000, 0x14), }; (ext_id << 16) + func_id } @@ -181,17 +168,9 @@ struct ChainInput<'a, 'b> { } impl<'a, 'b> ChainInput<'a, 'b> { - pub fn new(input1: &'a [u8], input2: &'b [u8]) -> Self { - Self { input1, input2 } - } - pub fn len(&self) -> usize { self.input1.len() + self.input2.len() } - - pub fn is_empty(&self) -> bool { - self.len() == 0 - } } impl<'a, 'b> codec::Input for ChainInput<'a, 'b> { @@ -460,7 +439,7 @@ where fn call_runtime( env: ce::Environment, - old_call: Option, + write_error: bool, ) -> ce::Result where ::RuntimeCall: GetDispatchInfo + GetCallMetadata, @@ -482,39 +461,20 @@ where // Decide what to call in the runtime. let (call, extrinsic_id) = { - match old_call { - None => { - let input = env.read(in_len)?; - // Decode the pallet_id & extrinsic_id. - let ext_id = ExtrinsicId::try_from(input.as_slice()) - .ok_or(Error::::InvalidRuntimeCall)?; - // Check if the extrinsic is allowed to be called. - Module::::ensure_call_runtime(ext_id)?; - ( - <::RuntimeCall>::decode_all_with_depth_limit( - MAX_DECODE_DEPTH, - &mut input.as_slice(), - ) - .map_err(|_| Error::::InvalidRuntimeCall)?, - ext_id, - ) - } - Some(ext_id) => { - // Check if the extrinsic is allowed to be called. - Module::::ensure_call_runtime(ext_id)?; - // Convert old ChainExtension runtime calls into `Call` format. - let extrinsic: [u8; 2] = ext_id.into(); - let params = env.read(in_len)?; - let mut input = ChainInput::new(&extrinsic, params.as_slice()); - let call = <::RuntimeCall>::decode_with_depth_limit( - MAX_DECODE_DEPTH, - &mut input, - ) - .map_err(|_| Error::::InvalidRuntimeCall)?; - ensure!(input.is_empty(), Error::::DataLeftAfterDecoding); - (call, ext_id) - } - } + let input = env.read(in_len)?; + // Decode the pallet_id & extrinsic_id. + let ext_id = + ExtrinsicId::try_from(input.as_slice()).ok_or(Error::::InvalidRuntimeCall)?; + // Check if the extrinsic is allowed to be called. + Module::::ensure_call_runtime(ext_id)?; + ( + <::RuntimeCall>::decode_all_with_depth_limit( + MAX_DECODE_DEPTH, + &mut input.as_slice(), + ) + .map_err(|_| Error::::InvalidRuntimeCall)?, + ext_id, + ) }; // Charge weight for the call. @@ -544,17 +504,21 @@ where // Ensure the call was successful if let Err(e) = result { - if let DispatchError::Module(e) = e.error { - let error_string: Result<(), String> = Err(format!("{e:?}")); - env.write(&error_string.encode(), false, None) - .map_err(|_| Error::::ReadStorageFailed)?; - return Ok(ce::RetVal::Converging(0)); + if write_error { + if let DispatchError::Module(e) = e.error { + let error_string: Result<(), String> = Err(format!("{e:?}")); + env.write(&error_string.encode(), false, None) + .map_err(|_| Error::::ReadStorageFailed)?; + return Ok(ce::RetVal::Converging(0)); + } } return Err(e.error); } - env.write(&Ok::<(), String>(()).encode(), false, None) - .map_err(|_| Error::::ReadStorageFailed)?; + if write_error { + env.write(&Ok::<(), String>(()).encode(), false, None) + .map_err(|_| Error::::ReadStorageFailed)?; + } // Done; continue with smart contract execution when returning. Ok(ce::RetVal::Converging(0)) } @@ -596,13 +560,13 @@ where Ok(ce::RetVal::Converging(0)) } Some(FuncId::ReadStorage) => read_storage(env), - Some(FuncId::CallRuntime) => call_runtime(env, None), + Some(FuncId::CallRuntime) => call_runtime(env, false), Some(FuncId::GetSpecVersion) => get_version(env, true), Some(FuncId::GetTransactionVersion) => get_version(env, false), Some(FuncId::GetKeyDid) => get_key_did(env), Some(FuncId::KeyHasher(hasher, size)) => key_hasher(env, hasher, size), Some(FuncId::GetLatestApiUpgrade) => get_latest_api_upgrade(env), - Some(FuncId::OldCallRuntime(p)) => call_runtime(env, Some(p)), + Some(FuncId::CallRuntimeWithError) => call_runtime(env, true), None => { trace!( target: "runtime", @@ -644,11 +608,6 @@ mod tests { test_func_id(FuncId::KeyHasher(KeyHasher::Twox, HashSize::B128)); test_func_id(FuncId::KeyHasher(KeyHasher::Twox, HashSize::B256)); test_func_id(FuncId::GetLatestApiUpgrade); - test_func_id(FuncId::OldCallRuntime(ExtrinsicId(0x1A, 0x00))); - test_func_id(FuncId::OldCallRuntime(ExtrinsicId(0x1A, 0x01))); - test_func_id(FuncId::OldCallRuntime(ExtrinsicId(0x1A, 0x02))); - test_func_id(FuncId::OldCallRuntime(ExtrinsicId(0x1A, 0x03))); - test_func_id(FuncId::OldCallRuntime(ExtrinsicId(0x1A, 0x11))); - test_func_id(FuncId::OldCallRuntime(ExtrinsicId(0x2F, 0x01))); + test_func_id(FuncId::CallRuntimeWithError); } } From cffa1079f325f5a34846240c453690e88ea1f8ee Mon Sep 17 00:00:00 2001 From: Henrique Nogara Date: Thu, 21 Dec 2023 16:15:20 -0300 Subject: [PATCH 3/7] Split contract tests; Change test to use call_runtime instead of old_call_runtime --- pallets/runtime/tests/src/contracts_test.rs | 319 ++++++++++---------- 1 file changed, 157 insertions(+), 162 deletions(-) diff --git a/pallets/runtime/tests/src/contracts_test.rs b/pallets/runtime/tests/src/contracts_test.rs index f897004a19..b43ba3eac9 100644 --- a/pallets/runtime/tests/src/contracts_test.rs +++ b/pallets/runtime/tests/src/contracts_test.rs @@ -3,13 +3,15 @@ use frame_support::dispatch::{DispatchError, Weight}; use frame_support::{ assert_err_ignore_postinfo, assert_noop, assert_ok, assert_storage_noop, StorageMap, }; -use polymesh_contracts::{Api, ApiCodeHash, ApiNextUpgrade, ChainVersion, NextUpgrade}; +use polymesh_contracts::{ + Api, ApiCodeHash, ApiNextUpgrade, ChainVersion, ExtrinsicId, NextUpgrade, +}; use sp_keyring::AccountKeyring; use sp_runtime::traits::Hash; use pallet_identity::ParentDid; use polymesh_common_utilities::constants::currency::POLY; -use polymesh_primitives::{AccountId, Gas, Permissions, PortfolioPermissions, Ticker}; +use polymesh_primitives::{Gas, Permissions, PortfolioPermissions, SubsetRestriction, Ticker}; use polymesh_runtime_common::Currency; use crate::ext_builder::ExtBuilder; @@ -50,164 +52,43 @@ fn chain_extension() -> (Vec, CodeHash) { compile_module("chain_extension").unwrap() } -#[test] -fn misc_polymesh_extensions() { - let eve = AccountKeyring::Eve.to_account_id(); - ExtBuilder::default() - .cdd_providers(vec![eve.clone()]) - .adjust(Box::new(move |storage| { - polymesh_contracts::GenesisConfig { - call_whitelist: [ - [0x1A, 0x00], - [0x1A, 0x01], - [0x1A, 0x02], - [0x1A, 0x03], - [0x1A, 0x11], - [0x2F, 0x01], - ] - .into_iter() - .map(|ext_id: [u8; 2]| ext_id.into()) - .collect(), - } - .assimilate_storage(storage) - .unwrap(); - })) - .build() - .execute_with(|| { - let owner = User::new(AccountKeyring::Alice); - let user = User::new(AccountKeyring::Bob); - Balances::make_free_balance_be(&owner.acc(), 1_000_000 * POLY); - - let (code, _) = chain_extension(); - let hash = Hashing::hash(&code); - let salt = vec![0xFF]; - - let perms = Permissions { - portfolio: PortfolioPermissions::Whole, - ..Permissions::empty() - }; - let instantiate = || { - Contracts::instantiate_with_code_perms( - owner.origin(), - Balances::minimum_balance(), - GAS_LIMIT, - None, - code.clone(), - vec![], - salt.clone(), - perms.clone(), - ) - }; - let derive_key = |key, salt| FrameContracts::contract_address(&key, &hash, &[], salt); - let call = |key: AccountId, value, data| { - FrameContracts::call(user.origin(), key.into(), value, GAS_LIMIT, None, data) - }; - let assert_has_secondary_key = |key: AccountId| { - let data = Identity::get_key_identity_data(key).unwrap(); - assert_eq!(data.identity, owner.did); - assert_eq!(data.permissions.unwrap(), perms); - }; - - // Instantiate contract. - // Next time, a secondary key with that key already exists. - assert_ok!(instantiate()); - assert_noop!(instantiate(), IdentityError::AlreadyLinked); - - // Ensure contract is now a secondary key of Alice. - let key_first_contract = derive_key(owner.acc(), &salt); - assert_has_secondary_key(key_first_contract.clone()); - - // Ensure a call different non-existent instantiation results in "contract not found". - assert_storage_noop!(assert_err_ignore_postinfo!( - call(derive_key(owner.acc(), &[0x00]), 0, vec![]), - BaseContractsError::ContractNotFound, - )); - - // Execute a chain extension with too long data. - let call = |value, data| call(key_first_contract.clone(), value, data); - let mut too_long_data = 0x00_00_00_01.encode(); - too_long_data.extend(vec![b'X'; MaxInLen::get() as usize + 1]); - assert_storage_noop!(assert_err_ignore_postinfo!( - call(0, too_long_data), - ContractsError::InLenTooLarge, - )); - - // Execute a func_id that isn't recognized. - assert_storage_noop!(assert_err_ignore_postinfo!( - call(0, 0x04_00_00_00.encode()), - ContractsError::InvalidFuncId, - )); - - // Input for registering ticker `A` (11 trailing nulls). - let ticker = Ticker::from_slice_truncated(b"A" as &[u8]); - let mut register_ticker_data = 0x00_1A_00_00.encode(); - register_ticker_data.extend(ticker.encode()); - - // Leave too much data left in the input. - let mut register_ticker_extra_data = register_ticker_data.clone(); - register_ticker_extra_data.extend(b"X"); // Adding this leaves too much data. - assert_storage_noop!(assert_err_ignore_postinfo!( - call(0, register_ticker_extra_data), - ContractsError::DataLeftAfterDecoding, - )); - - // Execute `register_ticker` but fail due to lacking permissions. - assert_storage_noop!(assert_err_ignore_postinfo!( - call(0, register_ticker_data.clone()), - pallet_permissions::Error::::UnauthorizedCaller, - )); - - // Grant permissions to `key_first_contract`, and so registration should go through. - assert_ok!(Identity::set_secondary_key_permissions( - owner.origin(), - key_first_contract.clone(), - Permissions::default(), - )); - - // The contract doesn't have enough POLYX to cover the protocol fee. - assert_storage_noop!(assert_err_ignore_postinfo!( - call(0, register_ticker_data.clone()), - pallet_protocol_fee::Error::::InsufficientAccountBalance, - )); - - // Successfully execute `register_ticker`, - // ensuring that it was Alice who registered it. - assert_ok!(call(2500, register_ticker_data)); - assert_ok!(Asset::ensure_owner(&ticker, owner.did)); - }) +fn update_call_runtime_whitelist(extrinsics: Vec<(ExtrinsicId, bool)>) { + assert_ok!(Contracts::update_call_runtime_whitelist(root(), extrinsics)); } #[test] -fn deploy_as_child_identity() { - let eve = AccountKeyring::Eve.to_account_id(); - ExtBuilder::default() - .cdd_providers(vec![eve.clone()]) - .adjust(Box::new(move |storage| { - polymesh_contracts::GenesisConfig { - call_whitelist: [ - [0x1A, 0x00], - [0x1A, 0x01], - [0x1A, 0x02], - [0x1A, 0x03], - [0x1A, 0x11], - [0x2F, 0x01], - ] - .into_iter() - .map(|ext_id: [u8; 2]| ext_id.into()) - .collect(), - } - .assimilate_storage(storage) - .unwrap(); - })) - .build() - .execute_with(|| { - let salt = vec![0xFF]; - let (code, _) = chain_extension(); - let hash = Hashing::hash(&code); - let alice = User::new(AccountKeyring::Alice); - Balances::make_free_balance_be(&alice.acc(), 1_000_000 * POLY); +fn deploy_as_secondary_key() { + ExtBuilder::default().build().execute_with(|| { + let alice = User::new(AccountKeyring::Alice); + Balances::make_free_balance_be(&alice.acc(), 1_000_000 * POLY); - assert_ok!(Contracts::instantiate_with_code_as_primary_key( + let permissions = Permissions { + portfolio: PortfolioPermissions::Whole, + asset: SubsetRestriction::empty(), + extrinsic: SubsetRestriction::empty(), + }; + let (code, _) = chain_extension(); + let salt = vec![0xFF]; + // Deploy the contract as a secondary key of Alice + assert_ok!(Contracts::instantiate_with_code_perms( + alice.origin(), + Balances::minimum_balance(), + GAS_LIMIT, + None, + code.clone(), + vec![], + salt.clone(), + permissions.clone(), + )); + // Ensures the is a secondary key of alice + let hash = Hashing::hash(&code); + let derived_key = FrameContracts::contract_address(&alice.acc(), &hash, &[], &salt); + let key_data = Identity::get_key_identity_data(derived_key).unwrap(); + assert_eq!(key_data.identity, alice.did); + assert_eq!(key_data.permissions.unwrap(), permissions); + // The same contract can't be instantiated twice for the same identity + assert_noop!( + Contracts::instantiate_with_code_perms( alice.origin(), Balances::minimum_balance(), GAS_LIMIT, @@ -215,13 +96,127 @@ fn deploy_as_child_identity() { code.clone(), vec![], salt.clone(), - )); + permissions.clone(), + ), + IdentityError::AlreadyLinked + ); + }) +} - let contract_account_id = - FrameContracts::contract_address(&alice.acc(), &hash, &[], &salt); - let child_id = Identity::get_identity(&contract_account_id).unwrap(); - assert_eq!(ParentDid::get(child_id), Some(alice.did)); - }) +#[test] +fn chain_extension_calls() { + ExtBuilder::default().build().execute_with(|| { + let bob = User::new(AccountKeyring::Bob); + let alice = User::new(AccountKeyring::Alice); + let ticker = Ticker::from_slice_truncated(b"A" as &[u8]); + Balances::make_free_balance_be(&alice.acc(), 1_000_000 * POLY); + + let permissions = Permissions { + portfolio: PortfolioPermissions::Whole, + asset: SubsetRestriction::empty(), + extrinsic: SubsetRestriction::empty(), + }; + let (code, _) = chain_extension(); + let salt = vec![0xFF]; + // Deploy the contract as a secondary key of Alice + assert_ok!(Contracts::instantiate_with_code_perms( + alice.origin(), + Balances::minimum_balance(), + GAS_LIMIT, + None, + code.clone(), + vec![], + salt.clone(), + permissions.clone(), + )); + // A call to a non-existent instantiation must return an error + let hash = Hashing::hash(&code); + let wrong_key = FrameContracts::contract_address(&alice.acc(), &hash, &[], &[0x00]); + assert_storage_noop!(assert_err_ignore_postinfo!( + FrameContracts::call( + bob.origin(), + wrong_key.into(), + 0, + GAS_LIMIT, + None, + Vec::new() + ), + BaseContractsError::ContractNotFound + )); + // Calls to functions not recognized must return an error + let contract_key = FrameContracts::contract_address(&alice.acc(), &hash, &[], &salt); + assert_storage_noop!(assert_err_ignore_postinfo!( + FrameContracts::call( + bob.origin(), + contract_key.clone().into(), + 0, + GAS_LIMIT, + None, + 0x04_00_00_00.encode() + ), + ContractsError::InvalidFuncId, + )); + // Calls the right chain extension function, but runtime call fails + let extrinsic_id: ExtrinsicId = [0x1A, 0x00].into(); + update_call_runtime_whitelist(vec![(extrinsic_id.clone(), true)]); + let register_ticker_input = [ + 0x00_00_00_01.encode(), + extrinsic_id.encode(), + ticker.encode(), + ] + .concat(); + assert_storage_noop!(assert_err_ignore_postinfo!( + FrameContracts::call( + bob.origin(), + contract_key.clone().into(), + 0, + GAS_LIMIT, + None, + register_ticker_input.clone() + ), + pallet_permissions::Error::::UnauthorizedCaller, + )); + // Successfull call + assert_ok!(Identity::set_secondary_key_permissions( + alice.origin(), + contract_key.clone(), + Permissions::default(), + )); + assert_ok!(FrameContracts::call( + bob.origin(), + contract_key.into(), + 2_500, + GAS_LIMIT, + None, + register_ticker_input + ),); + assert_ok!(Asset::ensure_owner(&ticker, alice.did)); + }) +} + +#[test] +fn deploy_as_child_identity() { + ExtBuilder::default().build().execute_with(|| { + let salt = vec![0xFF]; + let (code, _) = chain_extension(); + let hash = Hashing::hash(&code); + let alice = User::new(AccountKeyring::Alice); + Balances::make_free_balance_be(&alice.acc(), 1_000_000 * POLY); + + assert_ok!(Contracts::instantiate_with_code_as_primary_key( + alice.origin(), + Balances::minimum_balance(), + GAS_LIMIT, + None, + code.clone(), + vec![], + salt.clone(), + )); + + let contract_account_id = FrameContracts::contract_address(&alice.acc(), &hash, &[], &salt); + let child_id = Identity::get_identity(&contract_account_id).unwrap(); + assert_eq!(ParentDid::get(child_id), Some(alice.did)); + }) } #[test] From c46655f9d9bf0eead1986cebfb3fab4e3d86e4f8 Mon Sep 17 00:00:00 2001 From: Henrique Nogara Date: Thu, 21 Dec 2023 16:21:17 -0300 Subject: [PATCH 4/7] Add InkDelegateCallError back --- contracts/upgradeable-polymesh-ink/src/lib.rs | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/contracts/upgradeable-polymesh-ink/src/lib.rs b/contracts/upgradeable-polymesh-ink/src/lib.rs index d13f6892c1..6b74b0d156 100755 --- a/contracts/upgradeable-polymesh-ink/src/lib.rs +++ b/contracts/upgradeable-polymesh-ink/src/lib.rs @@ -50,6 +50,61 @@ pub enum PolymeshError { InvalidPortfolioAuthorization, /// Polymesh ink extension error. PolymeshExtension(PolymeshInkExtError), + /// Ink! Delegate call error. + InkDelegateCallError { + selector: [u8; 4], + err: Option, + }, +} + +/// Encodable `ink::env::Error`. +#[derive(Debug, scale::Encode, scale::Decode)] +#[cfg_attr(feature = "std", derive(scale_info::TypeInfo))] +pub enum InkEnvError { + /// Error upon decoding an encoded value. + ScaleDecodeError, + /// The call to another contract has trapped. + CalleeTrapped, + /// The call to another contract has been reverted. + CalleeReverted, + /// The queried contract storage entry is missing. + KeyNotFound, + /// Transfer failed for other not further specified reason. Most probably + /// reserved or locked balance of the sender that was preventing the transfer. + TransferFailed, + /// Deprecated and no longer returned: Endowment is no longer required. + _EndowmentTooLow, + /// No code could be found at the supplied code hash. + CodeNotFound, + /// The account that was called is no contract, but a plain account. + NotCallable, + /// The call to `seal_debug_message` had no effect because debug message + /// recording was disabled. + LoggingDisabled, + /// ECDSA pubkey recovery failed. Most probably wrong recovery id or signature. + EcdsaRecoveryFailed, +} + +impl PolymeshError { + pub fn from_delegate_error(err: ink::env::Error, selector: ink::env::call::Selector) -> Self { + use ink::env::Error::*; + Self::InkDelegateCallError { + selector: selector.to_bytes(), + err: match err { + Decode(_) => Some(InkEnvError::ScaleDecodeError), + CalleeTrapped => Some(InkEnvError::CalleeTrapped), + CalleeReverted => Some(InkEnvError::CalleeReverted), + KeyNotFound => Some(InkEnvError::KeyNotFound), + TransferFailed => Some(InkEnvError::TransferFailed), + _EndowmentTooLow => Some(InkEnvError::_EndowmentTooLow), + CodeNotFound => Some(InkEnvError::CodeNotFound), + NotCallable => Some(InkEnvError::NotCallable), + LoggingDisabled => Some(InkEnvError::LoggingDisabled), + EcdsaRecoveryFailed => Some(InkEnvError::EcdsaRecoveryFailed), + _ => None, + }, + } + } } impl From for PolymeshError { From fd089a53f12f5b3eab084d42ba0507d4a269b1d1 Mon Sep 17 00:00:00 2001 From: Henrique Nogara Date: Mon, 15 Jan 2024 10:06:08 -0300 Subject: [PATCH 5/7] Update polymesh-api dependency --- contracts/upgradeable-polymesh-ink/Cargo.lock | 20 ++++++++++++++----- contracts/upgradeable-polymesh-ink/Cargo.toml | 2 +- contracts/upgradeable-polymesh-ink/src/lib.rs | 12 +---------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/contracts/upgradeable-polymesh-ink/Cargo.lock b/contracts/upgradeable-polymesh-ink/Cargo.lock index ea32c06823..381e0e15a8 100644 --- a/contracts/upgradeable-polymesh-ink/Cargo.lock +++ b/contracts/upgradeable-polymesh-ink/Cargo.lock @@ -2022,7 +2022,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "polymesh-api" -version = "3.5.0" +version = "3.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe458a4721937ff96c6e7765d18d21b71148c398656a17814dfbb72cb62bdb9d" dependencies = [ "ink", "log", @@ -2036,7 +2038,9 @@ dependencies = [ [[package]] name = "polymesh-api-client" -version = "3.2.5" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eeac54b128958d9aac03d3f88f43be10ee396c746b7ee329e5794f990c1ff5c7" dependencies = [ "async-stream", "async-trait", @@ -2067,7 +2071,9 @@ dependencies = [ [[package]] name = "polymesh-api-codegen" -version = "3.2.0" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "420d0d8d2abb36e1581e373505933620af181c99e788833b4f7714ee2b05e1eb" dependencies = [ "frame-metadata", "heck", @@ -2085,7 +2091,9 @@ dependencies = [ [[package]] name = "polymesh-api-codegen-macro" -version = "3.2.0" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e165461828beeb9832b9b7a33caa6ebad97a4a900c2f50149df084455170f53c" dependencies = [ "darling", "parity-scale-codec", @@ -2098,7 +2106,9 @@ dependencies = [ [[package]] name = "polymesh-api-ink" -version = "1.1.0" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3076551d480aed6860a93b30f31d972bde708ff3308ec086e26bc62e7e97ae" dependencies = [ "hex", "ink", diff --git a/contracts/upgradeable-polymesh-ink/Cargo.toml b/contracts/upgradeable-polymesh-ink/Cargo.toml index 751494bf91..c1a5a37fe8 100755 --- a/contracts/upgradeable-polymesh-ink/Cargo.toml +++ b/contracts/upgradeable-polymesh-ink/Cargo.toml @@ -15,7 +15,7 @@ ink = { version = "4.3", default-features = false } scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } scale-info = { version = "2", default-features = false, features = ["derive"], optional = true } -polymesh-api = { path = "../../../polymesh-api", default-features = false, features = ["ink"] } +polymesh-api = { version = "3.6", default-features = false, features = ["ink"] } paste = "1.0" diff --git a/contracts/upgradeable-polymesh-ink/src/lib.rs b/contracts/upgradeable-polymesh-ink/src/lib.rs index 6b74b0d156..38e19a3700 100755 --- a/contracts/upgradeable-polymesh-ink/src/lib.rs +++ b/contracts/upgradeable-polymesh-ink/src/lib.rs @@ -9,9 +9,7 @@ use alloc::vec; use alloc::vec::Vec; pub use polymesh_api::ink::basic_types::IdentityId; -pub use polymesh_api::ink::extension::{ - PolymeshEnvironment, PolymeshRuntimeErr as PolymeshInkExtError, -}; +pub use polymesh_api::ink::extension::PolymeshEnvironment; pub use polymesh_api::ink::Error as PolymeshInkError; pub use polymesh_api::polymesh::types::pallet_corporate_actions; pub use polymesh_api::polymesh::types::pallet_corporate_actions::CAId; @@ -48,8 +46,6 @@ pub enum PolymeshError { MissingIdentity, /// No portfolio was found for the given [`PortfolioId`]. InvalidPortfolioAuthorization, - /// Polymesh ink extension error. - PolymeshExtension(PolymeshInkExtError), /// Ink! Delegate call error. InkDelegateCallError { selector: [u8; 4], @@ -113,12 +109,6 @@ impl From for PolymeshError { } } -impl From for PolymeshError { - fn from(err: PolymeshInkExtError) -> Self { - Self::PolymeshExtension(err) - } -} - /// The contract result type. pub type PolymeshResult = core::result::Result; From ae49996b8b21ab1f987f40471cf6abc217e30bf6 Mon Sep 17 00:00:00 2001 From: Henrique Nogara Date: Mon, 15 Jan 2024 13:40:36 -0300 Subject: [PATCH 6/7] Add use_call_runtime_with_error --- contracts/upgradeable-polymesh-ink/Cargo.lock | 690 +++++++++--------- contracts/upgradeable-polymesh-ink/Cargo.toml | 1 + 2 files changed, 347 insertions(+), 344 deletions(-) diff --git a/contracts/upgradeable-polymesh-ink/Cargo.lock b/contracts/upgradeable-polymesh-ink/Cargo.lock index 381e0e15a8..014206e38f 100644 --- a/contracts/upgradeable-polymesh-ink/Cargo.lock +++ b/contracts/upgradeable-polymesh-ink/Cargo.lock @@ -18,16 +18,16 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli", + "gimli 0.27.3", ] [[package]] name = "addr2line" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli", + "gimli 0.28.1", ] [[package]] @@ -38,23 +38,23 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.12", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" dependencies = [ "cfg-if", - "getrandom 0.2.10", + "getrandom 0.2.12", "once_cell", "version_check", "zerocopy", @@ -62,9 +62,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -95,9 +95,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.72" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" [[package]] name = "array-bytes" @@ -131,9 +131,9 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "async-lock" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" dependencies = [ "event-listener", ] @@ -157,18 +157,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] name = "async-trait" -version = "0.1.72" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] @@ -179,16 +179,16 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "addr2line 0.20.0", + "addr2line 0.21.0", "cc", "cfg-if", "libc", "miniz_oxide", - "object 0.31.1", + "object 0.32.2", "rustc-demangle", ] @@ -200,9 +200,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "beef" @@ -342,9 +342,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byte-slice-cast" @@ -360,21 +360,24 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -384,14 +387,14 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", - "winapi", + "windows-targets 0.48.5", ] [[package]] @@ -402,9 +405,9 @@ checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -412,9 +415,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpp_demangle" @@ -427,9 +430,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.9" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -625,9 +628,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.12" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "ed25519" @@ -770,9 +773,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -785,9 +788,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -795,15 +798,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -813,32 +816,32 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" @@ -852,9 +855,9 @@ dependencies = [ [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -900,9 +903,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "libc", @@ -920,6 +923,12 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + [[package]] name = "gloo-net" version = "0.4.0" @@ -968,9 +977,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.20" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "b553656127a00601c8ae5590fcfdc118e4083a7924b6cf4ffc1ea4b99dc429d7" dependencies = [ "bytes", "fnv", @@ -978,7 +987,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap 2.1.0", "slab", "tokio", "tokio-util", @@ -1006,7 +1015,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.7", ] [[package]] @@ -1015,14 +1024,14 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", ] [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "heck" @@ -1032,9 +1041,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -1087,9 +1096,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -1098,9 +1107,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", @@ -1115,9 +1124,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -1127,9 +1136,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", @@ -1167,16 +1176,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows", + "windows-core", ] [[package]] @@ -1255,12 +1264,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.3", ] [[package]] @@ -1309,7 +1318,7 @@ dependencies = [ "quote", "serde", "serde_json", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] @@ -1323,7 +1332,7 @@ dependencies = [ "ink_primitives", "parity-scale-codec", "secp256k1 0.27.0", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", ] @@ -1350,7 +1359,7 @@ dependencies = [ "scale-encode", "scale-info", "secp256k1 0.27.0", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", "static_assertions", ] @@ -1366,7 +1375,7 @@ dependencies = [ "itertools", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] @@ -1381,7 +1390,7 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", "synstructure", ] @@ -1476,13 +1485,13 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" dependencies = [ "hermit-abi", - "rustix 0.38.13", - "windows-sys 0.48.0", + "rustix 0.38.30", + "windows-sys 0.52.0", ] [[package]] @@ -1496,15 +1505,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" dependencies = [ "wasm-bindgen", ] @@ -1629,9 +1638,9 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ "cpufeatures", ] @@ -1644,9 +1653,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" [[package]] name = "libsecp256k1" @@ -1704,15 +1713,15 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "linux-raw-sys" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -1720,9 +1729,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "mach" @@ -1744,9 +1753,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "memfd" @@ -1754,7 +1763,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.13", + "rustix 0.38.30", ] [[package]] @@ -1810,9 +1819,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -1837,9 +1846,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] @@ -1868,18 +1877,18 @@ dependencies = [ [[package]] name = "object" -version = "0.31.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" @@ -1901,9 +1910,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "parity-scale-codec" -version = "3.6.4" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8e946cc0cc711189c0b0249fb8b599cbeeab9784d83c415719368bb8d4ac64" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -1916,11 +1925,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.4" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a296c3079b5fefbc499e1de58dc26c09b1b9a5952d26694ee89f04a43ebbb3e" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 2.0.1", "proc-macro2", "quote", "syn 1.0.109", @@ -1938,15 +1947,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -1990,29 +1999,29 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] name = "pin-project-lite" -version = "0.2.10" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2106,9 +2115,9 @@ dependencies = [ [[package]] name = "polymesh-api-ink" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3076551d480aed6860a93b30f31d972bde708ff3308ec086e26bc62e7e97ae" +checksum = "37133ff748242241c6ebaaff618b9d7a4e8beb7689ce0c4c2d102c3110dfe9b4" dependencies = [ "hex", "ink", @@ -2127,6 +2136,7 @@ dependencies = [ "parity-scale-codec", "paste", "polymesh-api", + "polymesh-api-ink", "scale-info", ] @@ -2138,9 +2148,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "primitive-types" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", @@ -2156,7 +2166,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" +dependencies = [ + "toml_datetime", + "toml_edit 0.20.2", ] [[package]] @@ -2185,9 +2205,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" dependencies = [ "unicode-ident", ] @@ -2203,9 +2223,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.32" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -2275,7 +2295,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.12", ] [[package]] @@ -2289,31 +2309,31 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.3.5" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "ref-cast" -version = "1.0.19" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61ef7e18e8841942ddb1cf845054f8008410030a3997875d9e49b7a363063df1" +checksum = "c4846d4c50d1721b1a3bef8af76924eef20d5e723647333798c1b519b3a9473f" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.19" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfaf0c85b766276c797f3791f5bc6d5bd116b41d53049af2789666b0c0bc9fa" +checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] @@ -2362,30 +2382,15 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi", -] - -[[package]] -name = "ring" -version = "0.17.3" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babe80d5c16becf6594aa32ad2be8fe08498e7ae60b77de8df700e67f191d7e" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", - "getrandom 0.2.10", + "getrandom 0.2.12", "libc", - "spin 0.9.8", - "untrusted 0.9.0", + "spin", + "untrusted", "windows-sys 0.48.0", ] @@ -2429,25 +2434,25 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.13" +version = "0.38.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" +checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" dependencies = [ "bitflags 2.4.1", "errno", "libc", - "linux-raw-sys 0.4.11", - "windows-sys 0.48.0", + "linux-raw-sys 0.4.12", + "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.21.9" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", - "ring 0.17.3", + "ring", "rustls-webpki", "sct", ] @@ -2466,11 +2471,11 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.2", + "base64 0.21.7", ] [[package]] @@ -2479,8 +2484,8 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.3", - "untrusted 0.9.0", + "ring", + "untrusted", ] [[package]] @@ -2491,9 +2496,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "scale-bits" @@ -2526,7 +2531,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27873eb6005868f8cc72dcfe109fae664cf51223d35387bc2f28be4c28d94c47" dependencies = [ "darling", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -2552,7 +2557,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "995491f110efdc6bea96d6a746140e32bfceb4ea47510750a5467295a4707a25" dependencies = [ "darling", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -2578,7 +2583,7 @@ version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -2586,11 +2591,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2599,7 +2604,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", "cfg-if", "hashbrown 0.13.2", ] @@ -2647,12 +2652,12 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", + "ring", + "untrusted", ] [[package]] @@ -2731,9 +2736,9 @@ checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" [[package]] name = "serde" -version = "1.0.177" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63ba2516aa6bf82e0b19ca8b50019d52df58455d3cf9bdaf6315225fdd0c560a" +checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" dependencies = [ "serde_derive", ] @@ -2749,31 +2754,31 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.12" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" +checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.177" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "401797fe7833d72109fedec6bfcbe67c0eed9b99772f26eb8afd261f0abc6fd3" +checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] name = "serde_json" -version = "1.0.104" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" +checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.1.0", "itoa", "ryu", "serde", @@ -2819,9 +2824,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -2840,9 +2845,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] @@ -2864,27 +2869,27 @@ checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "smallvec" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "2593d31f82ead8df961d8bd23a64c2ccf2eb5dd34b0a34bfb4dd54011c72009e" [[package]] name = "socket2" -version = "0.4.9" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -2985,7 +2990,7 @@ dependencies = [ "blake2b_simd", "byteorder", "digest 0.10.7", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", "sp-std", "twox-hash", @@ -2999,7 +3004,7 @@ checksum = "c7f531814d2f16995144c74428830ccf7d94ff4a7749632b83ad8199b181140c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] @@ -3115,10 +3120,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5d5bd5566fe5633ec48dfa35ab152fd29f8a577c21971e1c6db9f28afb9bbb9" dependencies = [ "Inflector", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] @@ -3181,7 +3186,7 @@ version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48e4eeb7ef23f79eba8609db79ef9cef242f994f1f87a3c0387b4b5f177fda74" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", "hash-db", "hashbrown 0.13.2", "lazy_static", @@ -3229,12 +3234,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - [[package]] name = "spin" version = "0.9.8" @@ -3243,9 +3242,9 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "ss58-registry" -version = "1.41.0" +version = "1.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfc443bad666016e012538782d9e3006213a7db43e9fb1dda91657dc06a6fa08" +checksum = "3c0c74081753a8ce1c8eb10b9f262ab6f7017e5ad3317c17a54c7ab65fcb3c6e" dependencies = [ "Inflector", "num-format", @@ -3276,9 +3275,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "substrate-bip39" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" +checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", @@ -3314,7 +3313,7 @@ dependencies = [ "schnorrkel 0.10.2", "secp256k1 0.27.0", "secrecy", - "sha2 0.10.7", + "sha2 0.10.8", "sp-core-hashing", "thiserror", "zeroize", @@ -3333,9 +3332,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.32" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239814284fd6f1a4ffe4ca893952cdd93c224b6a1571c9a9eadd670295c0c9e2" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -3350,7 +3349,7 @@ checksum = "285ba80e733fac80aa4270fbcdf83772a79b80aa35c97075320abfee4a915b06" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", "unicode-xid", ] @@ -3362,37 +3361,37 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.12" +version = "0.12.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" +checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" [[package]] name = "termcolor" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] @@ -3417,7 +3416,7 @@ dependencies = [ "pbkdf2 0.11.0", "rand 0.8.5", "rustc-hash", - "sha2 0.10.7", + "sha2 0.10.8", "thiserror", "unicode-normalization", "wasm-bindgen", @@ -3441,11 +3440,10 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.29.1" +version = "1.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" dependencies = [ - "autocfg", "backtrace", "bytes", "libc", @@ -3461,13 +3459,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] @@ -3482,9 +3480,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", @@ -3503,11 +3501,22 @@ checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" [[package]] name = "toml_edit" -version = "0.19.14" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.1.0", "toml_datetime", "winnow", ] @@ -3541,11 +3550,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -3554,20 +3562,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -3575,12 +3583,12 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] @@ -3640,9 +3648,9 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "twox-hash" @@ -3658,9 +3666,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "uint" @@ -3676,15 +3684,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -3701,12 +3709,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - [[package]] name = "untrusted" version = "0.9.0" @@ -3759,9 +3761,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3769,24 +3771,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" dependencies = [ "cfg-if", "js-sys", @@ -3796,9 +3798,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3806,22 +3808,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" [[package]] name = "wasmparser" @@ -3875,7 +3877,7 @@ checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" dependencies = [ "anyhow", "cranelift-entity", - "gimli", + "gimli 0.27.3", "indexmap 1.9.3", "log", "object 0.30.4", @@ -3897,7 +3899,7 @@ dependencies = [ "bincode", "cfg-if", "cpp_demangle", - "gimli", + "gimli 0.27.3", "log", "object 0.30.4", "rustc-demangle", @@ -3967,9 +3969,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" dependencies = [ "js-sys", "wasm-bindgen", @@ -4013,12 +4015,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows" -version = "0.48.0" +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.52.0", ] [[package]] @@ -4036,7 +4038,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -4065,17 +4067,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -4101,9 +4103,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" @@ -4119,9 +4121,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" @@ -4137,9 +4139,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" @@ -4155,9 +4157,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" @@ -4173,9 +4175,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" @@ -4191,9 +4193,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" @@ -4209,9 +4211,9 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" @@ -4221,9 +4223,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.1" +version = "0.5.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b5872fa2e10bd067ae946f927e726d7d603eaeb6e02fa6a350e0722d2b8c11" +checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" dependencies = [ "memchr", ] @@ -4239,35 +4241,35 @@ dependencies = [ [[package]] name = "xxhash-rust" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9828b178da53440fa9c766a3d2f73f7cf5d0ac1fe3980c1e5018d899fd19e07b" +checksum = "53be06678ed9e83edb1745eb72efc0bbcd7b5c3c35711a860906aed827a13d61" [[package]] name = "zerocopy" -version = "0.7.26" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.26" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] name = "zeroize" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" dependencies = [ "zeroize_derive", ] @@ -4280,5 +4282,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] diff --git a/contracts/upgradeable-polymesh-ink/Cargo.toml b/contracts/upgradeable-polymesh-ink/Cargo.toml index c1a5a37fe8..6f1fef8adf 100755 --- a/contracts/upgradeable-polymesh-ink/Cargo.toml +++ b/contracts/upgradeable-polymesh-ink/Cargo.toml @@ -16,6 +16,7 @@ scale = { package = "parity-scale-codec", version = "3", default-features = fals scale-info = { version = "2", default-features = false, features = ["derive"], optional = true } polymesh-api = { version = "3.6", default-features = false, features = ["ink"] } +polymesh-api-ink = { version = "1.2.2", default-features = false, features = ["use_call_runtime_with_error"] } paste = "1.0" From 2ad9cce43a2c0bb6bd824cecfb79b4d1915bf2fa Mon Sep 17 00:00:00 2001 From: Henrique Nogara Date: Mon, 15 Jan 2024 19:15:37 -0300 Subject: [PATCH 7/7] Add use_call_runtime_with_error as a feature flag --- contracts/upgradeable-polymesh-ink/Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/upgradeable-polymesh-ink/Cargo.toml b/contracts/upgradeable-polymesh-ink/Cargo.toml index 6f1fef8adf..d7433a2341 100755 --- a/contracts/upgradeable-polymesh-ink/Cargo.toml +++ b/contracts/upgradeable-polymesh-ink/Cargo.toml @@ -16,7 +16,7 @@ scale = { package = "parity-scale-codec", version = "3", default-features = fals scale-info = { version = "2", default-features = false, features = ["derive"], optional = true } polymesh-api = { version = "3.6", default-features = false, features = ["ink"] } -polymesh-api-ink = { version = "1.2.2", default-features = false, features = ["use_call_runtime_with_error"] } +polymesh-api-ink = { version = "1.2.2", default-features = false } paste = "1.0" @@ -28,6 +28,7 @@ features = ["as-library"] [features] default = ["std"] +use_call_runtime_with_error = ["polymesh-api-ink/use_call_runtime_with_error"] # Compile as upgradable library. as-library = []