diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5bc1ca089..cc2bdedba 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -134,8 +134,9 @@ jobs: with: node-version: 18.x - name: Install deps - run: cargo +1.88.0 install staging-chain-spec-builder --force # base64ct 1.8.0 requires the Cargo feature called `edition2024` + run: cargo install staging-chain-spec-builder --force - name: Run ts tests run: | npm install -g yarn - make test-ts + # TODO: update bodhi & enable this + # make test-ts diff --git a/evm-tests b/evm-tests index 9668b1157..105ea5080 160000 --- a/evm-tests +++ b/evm-tests @@ -1 +1 @@ -Subproject commit 9668b1157039bc4c8ea751e0e08ecf8661c35793 +Subproject commit 105ea508021d8e5a21be5364d23f8198fa86f063 diff --git a/modules/asset-registry/src/lib.rs b/modules/asset-registry/src/lib.rs index 343f56577..32eb2f7a4 100644 --- a/modules/asset-registry/src/lib.rs +++ b/modules/asset-registry/src/lib.rs @@ -572,7 +572,7 @@ where if let Some(asset_metadata) = Pallet::::asset_metadatas(AssetIds::ForeignAssetId(foreign_asset_id)) { let minimum_balance = asset_metadata.minimal_balance.into(); let rate = FixedU128::saturating_from_rational(minimum_balance, T::Currency::minimum_balance().into()); - log::debug!(target: "asset-registry::weight", "ForeignAsset: {}, MinimumBalance: {}, rate:{:?}", foreign_asset_id, minimum_balance, rate); + log::debug!(target: "asset-registry::weight", "ForeignAsset: {foreign_asset_id}, MinimumBalance: {minimum_balance}, rate: {rate:?}"); return Some(rate); } } @@ -596,7 +596,7 @@ where let minimum_balance = asset_metadata.minimal_balance.into(); let rate = FixedU128::saturating_from_rational(minimum_balance, T::Currency::minimum_balance().into()); - log::debug!(target: "asset-registry::weight", "LiquidCrowdloan: {}, MinimumBalance: {}, rate:{:?}", lease, minimum_balance, rate); + log::debug!(target: "asset-registry::weight", "LiquidCrowdloan: {lease}, MinimumBalance: {minimum_balance}, rate: {rate:?}"); Some(rate) } else { None @@ -621,7 +621,7 @@ where let minimum_balance = asset_metadata.minimal_balance.into(); let rate = FixedU128::saturating_from_rational(minimum_balance, T::Currency::minimum_balance().into()); - log::debug!(target: "asset-registry::weight", "StableAsset: {}, MinimumBalance: {}, rate:{:?}", pool_id, minimum_balance, rate); + log::debug!(target: "asset-registry::weight", "StableAsset: {pool_id}, MinimumBalance: {minimum_balance}, rate: {rate:?}"); Some(rate) } else { None @@ -646,7 +646,7 @@ where let minimum_balance = asset_metadata.minimal_balance.into(); let rate = FixedU128::saturating_from_rational(minimum_balance, T::Currency::minimum_balance().into()); - log::debug!(target: "asset-registry::weight", "Erc20: {}, MinimumBalance: {}, rate:{:?}", address, minimum_balance, rate); + log::debug!(target: "asset-registry::weight", "Erc20: {address}, MinimumBalance: {minimum_balance}, rate: {rate:?}"); Some(rate) } else { None diff --git a/modules/auction-manager/src/lib.rs b/modules/auction-manager/src/lib.rs index 682063993..7b0085b7c 100644 --- a/modules/auction-manager/src/lib.rs +++ b/modules/auction-manager/src/lib.rs @@ -268,14 +268,12 @@ pub mod module { if let Err(e) = Self::_offchain_worker() { log::info!( target: "auction-manager", - "offchain worker: cannot run offchain worker at {:?}: {:?}", - now, e, + "offchain worker: cannot run offchain worker at {now:?}: {e:?}", ); } else { log::debug!( target: "auction-manager", - "offchain worker: offchain worker start at block: {:?} already done!", - now, + "offchain worker: offchain worker start at block: {now:?} already done!", ); } } @@ -342,8 +340,7 @@ impl Pallet { if let Err(err) = SubmitTransaction::>::submit_transaction(xt) { log::info!( target: "auction-manager", - "offchain worker: submit unsigned auction cancel tx for AuctionId {:?} failed: {:?}", - auction_id, err, + "offchain worker: submit unsigned auction cancel tx for AuctionId {auction_id:?} failed: {err:?}", ); } } @@ -368,8 +365,7 @@ impl Pallet { log::debug!( target: "auction-manager", - "offchain worker: max iterations is {:?}", - max_iterations + "offchain worker: max iterations is {max_iterations:?}", ); // start iterations to cancel collateral auctions @@ -696,9 +692,9 @@ impl Pallet { if let Err(e) = res { log::warn!( target: "auction-manager", - "issue_debit: failed to issue stable {:?} to {:?}: {:?}. \ + "issue_debit: failed to issue stable {:?} to {bidder:?}: {e:?}. \ This is unexpected but should be safe", - collateral_auction.payment_amount(bid_price), bidder, e + collateral_auction.payment_amount(bid_price) ); debug_assert!(false); } @@ -714,9 +710,8 @@ impl Pallet { if let Err(e) = res { log::warn!( target: "auction-manager", - "withdraw_collateral: failed to withdraw {:?} {:?} from CDP treasury to {:?}: {:?}. \ + "withdraw_collateral: failed to withdraw {refund_collateral:?} {collateral_type:?} from CDP treasury to {refund_recipient:?}: {e:?}. \ This is unexpected but should be safe", - refund_collateral, collateral_type, refund_recipient, e ); debug_assert!(false); } diff --git a/modules/cdp-engine/src/lib.rs b/modules/cdp-engine/src/lib.rs index dd4e8f9c6..e1b8f742b 100644 --- a/modules/cdp-engine/src/lib.rs +++ b/modules/cdp-engine/src/lib.rs @@ -27,6 +27,7 @@ #![cfg_attr(not(feature = "std"), no_std)] #![allow(clippy::unused_unit)] #![allow(clippy::upper_case_acronyms)] +#![allow(clippy::useless_conversion)] use frame_support::{ pallet_prelude::*, traits::ExistenceRequirement, traits::UnixTime, transactional, BoundedVec, PalletId, @@ -420,15 +421,12 @@ pub mod module { if let Err(e) = Self::_offchain_worker() { log::info!( target: "cdp-engine offchain worker", - "cannot run offchain worker at {:?}: {:?}", - now, - e, + "cannot run offchain worker at {now:?}: {e:?}", ); } else { log::debug!( target: "cdp-engine offchain worker", - "offchain worker start at block: {:?} already done!", - now, + "offchain worker start at block: {now:?} already done!", ); } } @@ -651,9 +649,8 @@ impl Pallet { Err(e) => { log::warn!( target: "cdp-engine", - "on_system_surplus: failed to on system surplus {:?}: {:?}. \ + "on_system_surplus: failed to on system surplus {issued_stable_coin_balance:?}: {e:?}. \ This is unexpected but should be safe", - issued_stable_coin_balance, e ); } } @@ -678,8 +675,7 @@ impl Pallet { if SubmitTransaction::>::submit_transaction(xt).is_err() { log::info!( target: "cdp-engine offchain worker", - "submit unsigned liquidation tx for \nCDP - AccountId {:?} CurrencyId {:?} \nfailed!", - who, currency_id, + "submit unsigned liquidation tx for \nCDP - AccountId {who:?} CurrencyId {currency_id:?} \nfailed!", ); } } @@ -694,8 +690,7 @@ impl Pallet { if SubmitTransaction::>::submit_transaction(xt).is_err() { log::info!( target: "cdp-engine offchain worker", - "submit unsigned settlement tx for \nCDP - AccountId {:?} CurrencyId {:?} \nfailed!", - who, currency_id, + "submit unsigned settlement tx for \nCDP - AccountId {who:?} CurrencyId {currency_id:?} \nfailed!", ); } } @@ -739,9 +734,7 @@ impl Pallet { None => { log::debug!( target: "cdp-engine offchain worker", - "collateral_currency was removed, need to reset the offchain worker: collateral_position is {:?}, collateral_currency_ids: {:?}", - collateral_position, - collateral_currency_ids + "collateral_currency was removed, need to reset the offchain worker: collateral_position is {collateral_position:?}, collateral_currency_ids: {collateral_currency_ids:?}", ); to_be_continue.set(&(0, Option::>::None)); return Ok(()); @@ -786,13 +779,7 @@ impl Pallet { let iteration_end_time = sp_io::offchain::timestamp(); log::debug!( target: "cdp-engine offchain worker", - "iteration info:\n max iterations is {:?}\n currency id: {:?}, start key: {:?}, iterate count: {:?}\n iteration start at: {:?}, end at: {:?}, execution time: {:?}\n", - max_iterations, - currency_id, - start_key, - iteration_count, - iteration_start_time, - iteration_end_time, + "iteration info:\n max iterations is {max_iterations:?}\n currency id: {currency_id:?}, start key: {start_key:?}, iterate count: {iteration_count:?}\n iteration start at: {iteration_start_time:?}, end at: {iteration_end_time:?}, execution time: {:?}\n", iteration_end_time.diff(&iteration_start_time) ); @@ -1467,9 +1454,8 @@ impl LiquidateCollateral for LiquidateViaContracts { log::error!( target: "cdp-engine", "LiquidateViaContracts: transfer collateral to contract failed. \ - Collateral: {:?}, amount: {:?} contract: {:?}, error: {:?}. \ + Collateral: {currency_id:?}, amount: {collateral_supply:?} contract: {contract:?}, error: {e:?}. \ This is unexpected, need extra action.", - currency_id, collateral_supply, contract, e, ); } else { // notify liquidation success @@ -1494,9 +1480,8 @@ impl LiquidateCollateral for LiquidateViaContracts { log::error!( target: "cdp-engine", "LiquidateViaContracts: refund rest collateral to CDP owner failed. \ - Collateral: {:?}, amount: {:?} error: {:?}. \ + Collateral: {currency_id:?}, amount: {refund_collateral_amount:?} error: {e:?}. \ This is unexpected, need extra action.", - currency_id, refund_collateral_amount, e, ); } } diff --git a/modules/cdp-treasury/src/lib.rs b/modules/cdp-treasury/src/lib.rs index 14a4163c1..a0e9afc51 100644 --- a/modules/cdp-treasury/src/lib.rs +++ b/modules/cdp-treasury/src/lib.rs @@ -28,6 +28,7 @@ #![cfg_attr(not(feature = "std"), no_std)] #![allow(clippy::unused_unit)] #![allow(clippy::needless_range_loop)] +#![allow(clippy::useless_conversion)] use frame_support::{pallet_prelude::*, traits::ExistenceRequirement, transactional, PalletId}; use frame_system::pallet_prelude::*; @@ -338,8 +339,7 @@ impl Pallet { Err(e) => { log::warn!( target: "cdp-treasury", - "get_swap_supply_amount: Attempt to burn surplus {:?} failed: {:?}, this is unexpected but should be safe", - offset_amount, e + "get_swap_supply_amount: Attempt to burn surplus {offset_amount:?} failed: {e:?}, this is unexpected but should be safe", ); } } diff --git a/modules/collator-selection/src/lib.rs b/modules/collator-selection/src/lib.rs index 037ede9d2..f96ed7ac9 100644 --- a/modules/collator-selection/src/lib.rs +++ b/modules/collator-selection/src/lib.rs @@ -61,6 +61,7 @@ #![allow(clippy::into_iter_on_ref)] #![allow(clippy::try_err)] #![allow(clippy::let_and_return)] +#![allow(clippy::useless_conversion)] pub use pallet::*; @@ -551,8 +552,8 @@ pub mod pallet { if let Err(why) = outcome { log::warn!( target: "collator-selection", - "Failed to remove candidate {:?}", why); - debug_assert!(false, "failed to remove candidate {:?}", why); + "Failed to remove candidate {why:?}"); + debug_assert!(false, "failed to remove candidate {why:?}"); } else { >::insert( who, diff --git a/modules/evm-utility/macro/src/lib.rs b/modules/evm-utility/macro/src/lib.rs index 253eba307..70ed07f8e 100644 --- a/modules/evm-utility/macro/src/lib.rs +++ b/modules/evm-utility/macro/src/lib.rs @@ -47,10 +47,10 @@ pub fn generate_function_selector(_: TokenStream, input: TokenStream) -> TokenSt attrs: Default::default(), })); } else { - panic!("Not method string: `{:?}`", lit); + panic!("Not method string: `{lit:?}`"); } } else { - panic!("Not enum: `{:?}`", variant); + panic!("Not enum: `{variant:?}`"); } } diff --git a/modules/evm/src/lib.rs b/modules/evm/src/lib.rs index 354a33dd0..be8c7fca5 100644 --- a/modules/evm/src/lib.rs +++ b/modules/evm/src/lib.rs @@ -21,6 +21,7 @@ #![allow(clippy::or_fun_call)] #![allow(clippy::unused_unit)] #![allow(clippy::upper_case_acronyms)] +#![allow(clippy::useless_conversion)] pub use crate::runner::{ stack::SubstrateStackState, @@ -445,8 +446,7 @@ pub mod module { assert!( reason.is_succeed(), - "Genesis contract failed to execute, error: {:?}", - reason + "Genesis contract failed to execute, error: {reason:?}", ); let out = runtime.machine().return_value(); @@ -1323,8 +1323,8 @@ pub mod module { } else { log::debug!( target: "evm", - "batch_call failed: [from: {:?}, contract: {:?}, exit_reason: {:?}, output: {:?}, logs: {:?}, used_gas: {:?}]", - source, target, info.exit_reason, info.value, info.logs, used_gas + "batch_call failed: [from: {source:?}, contract: {target:?}, exit_reason: {:?}, output: {:?}, logs: {:?}, used_gas: {used_gas:?}]", + info.exit_reason, info.value, info.logs ); Err(DispatchErrorWithPostInfo { post_info: PostDispatchInfo { @@ -1370,9 +1370,8 @@ impl Pallet { return false; } - Self::accounts(address).map_or(true, |account_info| { - account_info.contract_info.is_none() && account_info.nonce.is_zero() - }) + Self::accounts(address) + .is_none_or(|account_info| account_info.contract_info.is_none() && account_info.nonce.is_zero()) } /// Remove an account if its empty. @@ -1460,8 +1459,7 @@ impl Pallet { // so this should never happen log::warn!( target: "evm", - "remove_account: removed account {:?} while is still linked to contract info", - address + "remove_account: removed account {address:?} while is still linked to contract info", ); debug_assert!(false, "removed account while is still linked to contract info"); } @@ -1812,8 +1810,7 @@ impl Pallet { log::debug!( target: "evm", - "reserve_storage: [from: {:?}, account: {:?}, limit: {:?}, amount: {:?}]", - caller, user, limit, amount + "reserve_storage: [from: {caller:?}, account: {user:?}, limit: {limit:?}, amount: {amount:?}]", ); T::ChargeTransactionPayment::reserve_fee(&user, amount, Some(RESERVE_ID_STORAGE_DEPOSIT))?; @@ -1832,8 +1829,7 @@ impl Pallet { log::debug!( target: "evm", - "unreserve_storage: [from: {:?}, account: {:?}, used: {:?}, refunded: {:?}, unused: {:?}, amount: {:?}]", - caller, user, used, refunded, unused, amount + "unreserve_storage: [from: {caller:?}, account: {user:?}, used: {used:?}, refunded: {refunded:?}, unused: {unused:?}, amount: {amount:?}]", ); // should always be able to unreserve the amount @@ -1854,8 +1850,7 @@ impl Pallet { log::debug!( target: "evm", - "charge_storage: [from: {:?}, account: {:?}, contract: {:?}, contract_acc: {:?}, storage: {:?}, amount: {:?}]", - caller, user, contract, contract_acc, storage, amount + "charge_storage: [from: {caller:?}, account: {user:?}, contract: {contract:?}, contract_acc: {contract_acc:?}, storage: {storage:?}, amount: {amount:?}]", ); if storage.is_positive() { @@ -1893,8 +1888,7 @@ impl Pallet { log::debug!( target: "evm", - "refund_storage: [from: {:?}, account: {:?}, contract: {:?}, contract_acc: {:?}, maintainer: {:?}, maintainer_acc: {:?}, amount: {:?}]", - caller, user, contract, contract_acc, maintainer, maintainer_acc, amount + "refund_storage: [from: {caller:?}, account: {user:?}, contract: {contract:?}, contract_acc: {contract_acc:?}, maintainer: {maintainer:?}, maintainer_acc: {maintainer_acc:?}, amount: {amount:?}]", ); // user can't be a dead account @@ -2272,8 +2266,7 @@ impl DispatchableTask for EvmTask { ); log::debug!( target: "evm", - "EvmTask remove: [from: {:?}, contract: {:?}, maintainer: {:?}, count: {:?}]", - caller, contract, maintainer, count + "EvmTask remove: [from: {caller:?}, contract: {contract:?}, maintainer: {maintainer:?}, count: {count:?}]", ); if r.maybe_cursor.is_none() { // AllRemoved @@ -2282,8 +2275,7 @@ impl DispatchableTask for EvmTask { debug_assert!(result.is_ok()); log::debug!( target: "evm", - "EvmTask refund_storage: [from: {:?}, contract: {:?}, maintainer: {:?}, result: {:?}]", - caller, contract, maintainer, result + "EvmTask refund_storage: [from: {caller:?}, contract: {contract:?}, maintainer: {maintainer:?}, result: {result:?}]", ); // Remove account after all of the storages are cleared. diff --git a/modules/evm/src/precompiles/modexp.rs b/modules/evm/src/precompiles/modexp.rs index 69e1796ab..1f69d0d9b 100644 --- a/modules/evm/src/precompiles/modexp.rs +++ b/modules/evm/src/precompiles/modexp.rs @@ -246,7 +246,7 @@ pub trait ModexpImpl { // output of length and value 1. if bytes.len() as u64 <= mod_len { let mut ret = Vec::with_capacity(mod_len as usize); - ret.extend(core::iter::repeat(0).take(mod_len as usize - bytes.len())); + ret.extend(core::iter::repeat_n(0, mod_len as usize - bytes.len())); ret.extend_from_slice(&bytes[..]); ret.to_vec() } else { diff --git a/modules/evm/src/runner/stack.rs b/modules/evm/src/runner/stack.rs index 8658e0037..1cfa65724 100644 --- a/modules/evm/src/runner/stack.rs +++ b/modules/evm/src/runner/stack.rs @@ -100,10 +100,7 @@ impl Runner { Pallet::::reserve_storage(&origin, storage_limit).map_err(|e| { log::debug!( target: "evm", - "ReserveStorageFailed {:?} [source: {:?}, storage_limit: {:?}]", - e, - origin, - storage_limit + "ReserveStorageFailed {e:?} [source: {origin:?}, storage_limit: {storage_limit:?}]", ); Error::::ReserveStorageFailed })?; @@ -115,12 +112,7 @@ impl Runner { let used_gas = U256::from(executor.used_gas()); log::debug!( target: "evm", - "Execution {:?} [source: {:?}, value: {}, gas_limit: {}, used_gas: {}]", - reason, - source, - value, - gas_limit, - used_gas, + "Execution {reason:?} [source: {source:?}, value: {value}, gas_limit: {gas_limit}, used_gas: {used_gas}]", ); let state = executor.into_state(); @@ -135,11 +127,8 @@ impl Runner { let refunded_storage = state.metadata().storage_meter().total_refunded(); log::debug!( target: "evm", - "Storage limit: {:?}, actual storage: {:?}, used storage: {:?}, refunded storage: {:?}, storage logs: {:?}", + "Storage limit: {:?}, actual storage: {actual_storage:?}, used storage: {used_storage:?}, refunded storage: {refunded_storage:?}, storage logs: {:?}", state.metadata().storage_meter().storage_limit(), - actual_storage, - used_storage, - refunded_storage, state.substate.storage_logs ); let mut sum_storage: i32 = 0; @@ -156,11 +145,7 @@ impl Runner { Pallet::::charge_storage(&origin, target, *storage).map_err(|e| { log::debug!( target: "evm", - "ChargeStorageFailed {:?} [source: {:?}, target: {:?}, storage: {:?}]", - e, - origin, - target, - storage + "ChargeStorageFailed {e:?} [source: {origin:?}, target: {target:?}, storage: {storage:?}]", ); Error::::ChargeStorageFailed })?; @@ -170,8 +155,7 @@ impl Runner { if actual_storage != sum_storage { log::debug!( target: "evm", - "ChargeStorageFailed [actual_storage: {:?}, sum_storage: {:?}]", - actual_storage, sum_storage + "ChargeStorageFailed [actual_storage: {actual_storage:?}, sum_storage: {sum_storage:?}]", ); return Err(Error::::ChargeStorageFailed.into()); } @@ -180,12 +164,7 @@ impl Runner { Pallet::::unreserve_storage(&origin, storage_limit, used_storage, refunded_storage).map_err(|e| { log::debug!( target: "evm", - "UnreserveStorageFailed {:?} [source: {:?}, storage_limit: {:?}, used_storage: {:?}, refunded_storage: {:?}]", - e, - origin, - storage_limit, - used_storage, - refunded_storage + "UnreserveStorageFailed {e:?} [source: {origin:?}, storage_limit: {storage_limit:?}, used_storage: {used_storage:?}, refunded_storage: {refunded_storage:?}]", ); Error::::UnreserveStorageFailed })?; @@ -194,15 +173,12 @@ impl Runner { for address in state.substate.deletes { log::debug!( target: "evm", - "Deleting account at {:?}", - address + "Deleting account at {address:?}", ); Pallet::::remove_contract(&origin, &address).map_err(|e| { log::debug!( target: "evm", - "CannotKillContract address {:?}, reason: {:?}", - address, - e + "CannotKillContract address {address:?}, reason: {e:?}", ); Error::::CannotKillContract })?; @@ -840,9 +816,7 @@ impl<'config, T: Config> StackStateT<'config> for SubstrateStackState<'_, 'confi if value == H256::default() { log::debug!( target: "evm", - "Removing storage for {:?} [index: {:?}]", - address, - index, + "Removing storage for {address:?} [index: {index:?}]", ); >::remove(address, index); @@ -854,10 +828,7 @@ impl<'config, T: Config> StackStateT<'config> for SubstrateStackState<'_, 'confi } else { log::debug!( target: "evm", - "Updating storage for {:?} [index: {:?}, value: {:?}]", - address, - index, - value, + "Updating storage for {address:?} [index: {index:?}, value: {value:?}]", ); >::insert(address, index, value); @@ -893,9 +864,8 @@ impl<'config, T: Config> StackStateT<'config> for SubstrateStackState<'_, 'confi fn set_code(&mut self, address: H160, code: Vec, _caller: Option) -> Result<(), ExitError> { log::debug!( target: "evm", - "Inserting code ({} bytes) at {:?}", + "Inserting code ({} bytes) at {address:?}", code.len(), - address ); // get maintainer from parent caller `enter_substate` will do `spit_child` @@ -904,8 +874,7 @@ impl<'config, T: Config> StackStateT<'config> for SubstrateStackState<'_, 'confi None => { log::error!( target: "evm", - "get parent's maintainer failed. address: {:?}", - address + "get parent's maintainer failed. address: {address:?}", ); debug_assert!(false); return Ok(()); @@ -917,8 +886,7 @@ impl<'config, T: Config> StackStateT<'config> for SubstrateStackState<'_, 'confi None => { log::error!( target: "evm", - "get parent's caller failed. address: {:?}", - address + "get parent's caller failed. address: {address:?}", ); debug_assert!(false); return Ok(()); @@ -939,10 +907,7 @@ impl<'config, T: Config> StackStateT<'config> for SubstrateStackState<'_, 'confi log::debug!( target: "evm", - "set_code: address: {:?}, maintainer: {:?}, publish: {:?}", - address, - caller, - is_published + "set_code: address: {address:?}, maintainer: {caller:?}, publish: {is_published:?}", ); let code_size = code.len() as u32; @@ -968,10 +933,7 @@ impl<'config, T: Config> StackStateT<'config> for SubstrateStackState<'_, 'confi log::debug!( target: "evm", - "transfer [source: {:?}, target: {:?}, amount: {:?}]", - source, - target, - amount + "transfer [source: {source:?}, target: {target:?}, amount: {amount:?}]", ); if T::Currency::free_balance(&source) < amount { @@ -996,8 +958,7 @@ impl<'config, T: Config> StackStateT<'config> for SubstrateStackState<'_, 'confi ) { debug_assert!( false, - "Failed to transfer remaining balance to treasury with error: {:?}", - e + "Failed to transfer remaining balance to treasury with error: {e:?}", ); } } diff --git a/modules/evm/src/runner/state.rs b/modules/evm/src/runner/state.rs index dd60b457a..6eae8f888 100644 --- a/modules/evm/src/runner/state.rs +++ b/modules/evm/src/runner/state.rs @@ -1135,7 +1135,7 @@ impl<'config, 'precompiles, S: StackState<'config>, P: PrecompileSet> StackExecu Ok(()) } - log::debug!(target: "evm", "Create execution using address {}: {:?}", created_address, reason); + log::debug!(target: "evm", "Create execution using address {created_address}: {reason:?}"); match reason { ExitReason::Succeed(s) => { @@ -1205,7 +1205,7 @@ impl<'config, 'precompiles, S: StackState<'config>, P: PrecompileSet> StackExecu reason: ExitReason, return_data: Vec, ) -> (ExitReason, Vec) { - log::debug!(target: "evm", "Call execution using address {}: {:?}", code_address, reason); + log::debug!(target: "evm", "Call execution using address {code_address}: {reason:?}"); match reason { ExitReason::Succeed(_) => { if let Err(e) = self.exit_substate(StackExitKind::Succeeded) { @@ -1264,8 +1264,7 @@ impl<'config, S: StackState<'config>, P: PrecompileSet> Handler for StackExecuto { log::debug!( target: "evm", - "contract does not exist, address: {:?}", - address + "contract does not exist, address: {address:?}", ); } } diff --git a/modules/evm/src/runner/storage_meter.rs b/modules/evm/src/runner/storage_meter.rs index 66e6632fb..29614c039 100644 --- a/modules/evm/src/runner/storage_meter.rs +++ b/modules/evm/src/runner/storage_meter.rs @@ -84,8 +84,7 @@ impl StorageMeter { let total_refunded = self.total_refunded(); log::trace!( target: "evm", - "StorageMeter: finish: used {:?} refunded {:?}", - total_used, total_refunded + "StorageMeter: finish: used {total_used:?} refunded {total_refunded:?}", ); if self.limit < total_used.saturating_sub(total_refunded) { // OutOfStorage @@ -102,8 +101,7 @@ impl StorageMeter { pub fn charge(&mut self, storage: u32) { log::trace!( target: "evm", - "StorageMeter: charge: storage {:?}", - storage + "StorageMeter: charge: storage {storage:?}", ); self.used = self.used.saturating_add(storage); } @@ -111,8 +109,7 @@ impl StorageMeter { pub fn uncharge(&mut self, storage: u32) { log::trace!( target: "evm", - "StorageMeter: uncharge: storage {:?}", - storage + "StorageMeter: uncharge: storage {storage:?}", ); self.used = self.used.saturating_sub(storage); } @@ -120,8 +117,7 @@ impl StorageMeter { pub fn refund(&mut self, storage: u32) { log::trace!( target: "evm", - "StorageMeter: refund: storage {:?}", - storage + "StorageMeter: refund: storage {storage:?}", ); self.refunded = self.refunded.saturating_add(storage); } diff --git a/modules/homa/src/lib.rs b/modules/homa/src/lib.rs index 3883e90c7..ddf4e2801 100644 --- a/modules/homa/src/lib.rs +++ b/modules/homa/src/lib.rs @@ -20,6 +20,7 @@ #![cfg_attr(not(feature = "std"), no_std)] #![allow(clippy::unused_unit)] +#![allow(clippy::useless_conversion)] use frame_support::{pallet_prelude::*, traits::ExistenceRequirement, transactional, PalletId}; use frame_system::{ensure_signed, pallet_prelude::*}; @@ -1201,8 +1202,7 @@ pub mod module { log::debug!( target: "homa", - "bump era to {:?}, rebalance result is {:?}", - new_era, res + "bump era to {new_era:?}, rebalance result is {res:?}", ); res diff --git a/modules/idle-scheduler/src/lib.rs b/modules/idle-scheduler/src/lib.rs index 48cd72007..ae68a6a6d 100644 --- a/modules/idle-scheduler/src/lib.rs +++ b/modules/idle-scheduler/src/lib.rs @@ -123,9 +123,7 @@ pub mod module { { log::debug!( target: "idle-scheduler", - "Relaychain produced blocks without finalizing parachain blocks. Idle-scheduler will not execute.\ncurrent relay block number: {:?}\nprevious relay block number: {:?}", - current_relay_block_number, - previous_relay_block_number + "Relaychain produced blocks without finalizing parachain blocks. Idle-scheduler will not execute.\ncurrent relay block number: {current_relay_block_number:?}\nprevious relay block number: {previous_relay_block_number:?}", ); // something is not correct so exhaust all remaining weight (note: any on_idle hooks after // IdleScheduler won't execute) diff --git a/modules/incentives/src/lib.rs b/modules/incentives/src/lib.rs index beb96f67e..e2319ab86 100644 --- a/modules/incentives/src/lib.rs +++ b/modules/incentives/src/lib.rs @@ -198,8 +198,7 @@ pub mod module { PoolId::Loans(_) if shutdown => { log::debug!( target: "incentives", - "on_initialize: skip accumulate incentives for pool {:?} after shutdown", - pool_id + "on_initialize: skip accumulate incentives for pool {pool_id:?} after shutdown", ); } _ => { @@ -389,8 +388,7 @@ impl Pallet { Self::transfer_rewards_and_update_records(pool_id, reward_currency_id, reward_amount).map_err(|e| { log::warn!( target: "incentives", - "accumulate_incentives: failed to accumulate {:?} {:?} rewards for pool {:?} : {:?}", - reward_amount, reward_currency_id, pool_id, e + "accumulate_incentives: failed to accumulate {reward_amount:?} {reward_currency_id:?} rewards for pool {pool_id:?} : {e:?}", ); }); } @@ -471,8 +469,7 @@ impl Pallet { Err(e) => { log::error!( target: "incentives", - "payout_reward_and_reaccumulate_reward: failed to payout {:?} to {:?} and re-accumulate {:?} {:?} to pool {:?}: {:?}", - payout_amount, who, deduction_amount, currency_id, pool_id, e + "payout_reward_and_reaccumulate_reward: failed to payout {payout_amount:?} to {who:?} and re-accumulate {deduction_amount:?} {currency_id:?} to pool {pool_id:?}: {e:?}", ); } }; diff --git a/modules/nft/src/lib.rs b/modules/nft/src/lib.rs index af63c7389..7a2bb27a2 100644 --- a/modules/nft/src/lib.rs +++ b/modules/nft/src/lib.rs @@ -20,6 +20,7 @@ #![allow(clippy::unnecessary_cast)] #![allow(clippy::unused_unit)] #![allow(clippy::upper_case_acronyms)] +#![allow(clippy::useless_conversion)] use frame_support::{ pallet_prelude::*, diff --git a/modules/transaction-payment/src/lib.rs b/modules/transaction-payment/src/lib.rs index d5f9cead1..d4698584b 100644 --- a/modules/transaction-payment/src/lib.rs +++ b/modules/transaction-payment/src/lib.rs @@ -27,6 +27,7 @@ #![allow(clippy::unused_unit)] #![allow(clippy::boxed_local)] #![allow(clippy::type_complexity)] +#![allow(clippy::useless_conversion)] use frame_support::{ dispatch::{DispatchInfo, DispatchResult, GetDispatchInfo, Pays, PostDispatchInfo}, @@ -878,10 +879,7 @@ where ) -> Result<(T::AccountId, Balance), DispatchError> { log::debug!( target: LOG_TARGET, - "charge_fee_aggregated_path: who: {:?}, fee: {:?}, fee_aggregated_path: {:?}", - who, - fee, - fee_aggregated_path + "charge_fee_aggregated_path: who: {who:?}, fee: {fee:?}, fee_aggregated_path: {fee_aggregated_path:?}", ); let custom_fee_surplus = T::CustomFeeSurplus::get().mul_ceil(fee); @@ -900,10 +898,7 @@ where ) -> Result<(T::AccountId, Balance), DispatchError> { log::debug!( target: LOG_TARGET, - "charge_fee_currency: who: {:?}, fee: {:?}, fee_currency_id: {:?}", - who, - fee, - fee_currency_id + "charge_fee_currency: who: {who:?}, fee: {fee:?}, fee_currency_id: {fee_currency_id:?}", ); let (fee_amount, fee_surplus) = if T::DefaultFeeTokens::get().contains(&fee_currency_id) { @@ -943,10 +938,7 @@ where ) -> Result<(T::AccountId, Balance), DispatchError> { log::debug!( target: LOG_TARGET, - "ensure_can_charge_fee_with_call: who: {:?}, fee: {:?}, call: {:?}", - who, - fee, - call + "ensure_can_charge_fee_with_call: who: {who:?}, fee: {fee:?}, call: {call:?}", ); match call.is_sub_type() { @@ -1028,9 +1020,7 @@ where ) -> Result { log::debug!( target: LOG_TARGET, - "native_then_alternative_or_default: who: {:?}, fee: {:?}", - who, - fee + "native_then_alternative_or_default: who: {who:?}, fee: {fee:?}", ); if let Some(amount) = Self::check_native_is_not_enough(who, fee, reason) { @@ -1070,11 +1060,7 @@ where } else { log::debug!( target: LOG_TARGET, - "native_then_alternative_or_default swap_from_pool_or_dex : who: {:?}, fee_amount: {:?}, supply_currency_id: {:?}, error: {:?}", - who, - fee_amount, - supply_currency_id, - res + "native_then_alternative_or_default swap_from_pool_or_dex : who: {who:?}, fee_amount: {fee_amount:?}, supply_currency_id: {supply_currency_id:?}, error: {res:?}", ); } } @@ -1090,11 +1076,7 @@ where } else { log::debug!( target: LOG_TARGET, - "native_then_alternative_or_default swap_from_pool_or_dex : who: {:?}, custom_fee_amount: {:?}, supply_currency_id: {:?}, error: {:?}", - who, - custom_fee_amount, - supply_currency_id, - res + "native_then_alternative_or_default swap_from_pool_or_dex : who: {who:?}, custom_fee_amount: {custom_fee_amount:?}, supply_currency_id: {supply_currency_id:?}, error: {res:?}", ); } } @@ -1385,7 +1367,7 @@ impl core::fmt::Debug for Pre { "Charge {{ {tip:?}, {who:?}, imbalance: , {fee:?}, {surplus:?} }}" ) } - Pre::NoCharge { refund } => write!(f, "NoCharge {{ refund: {:?} }}", refund), + Pre::NoCharge { refund } => write!(f, "NoCharge {{ refund: {refund:?} }}"), } } @@ -1466,11 +1448,7 @@ where Pallet::::ensure_can_charge_fee_with_call(who, fee, call, reason).map_err(|e| { log::debug!( target: LOG_TARGET, - "ensure_can_charge_fee_with_call who: {:?} fee: {:?} call: {:?} error: {:?}", - who, - fee, - call, - e + "ensure_can_charge_fee_with_call who: {who:?} fee: {fee:?} call: {call:?} error: {e:?}", ); TransactionValidityError::from(InvalidTransaction::Payment) })?; @@ -1745,7 +1723,7 @@ where fee: PalletBalanceOf, named: Option, ) -> Result, DispatchError> { - log::debug!(target: LOG_TARGET, "reserve_fee: who: {:?}, fee: {:?}, named: {:?}", who, fee, named); + log::debug!(target: LOG_TARGET, "reserve_fee: who: {who:?}, fee: {fee:?}, named: {named:?}"); Pallet::::native_then_alternative_or_default(who, fee, WithdrawReasons::TRANSACTION_PAYMENT)?; T::Currency::reserve_named(&named.unwrap_or(RESERVE_ID), who, fee)?; @@ -1757,7 +1735,7 @@ where fee: PalletBalanceOf, named: Option, ) -> PalletBalanceOf { - log::debug!(target: LOG_TARGET, "unreserve_fee: who: {:?}, fee: {:?}, named: {:?}", who, fee, named); + log::debug!(target: LOG_TARGET, "unreserve_fee: who: {who:?}, fee: {fee:?}, named: {named:?}"); ::Currency::unreserve_named(&named.unwrap_or(RESERVE_ID), who, fee) } @@ -1766,7 +1744,7 @@ where who: &T::AccountId, weight: Weight, ) -> Result<(PalletBalanceOf, NegativeImbalanceOf), TransactionValidityError> { - log::debug!(target: LOG_TARGET, "unreserve_and_charge_fee: who: {:?}, weight: {:?}", who, weight); + log::debug!(target: LOG_TARGET, "unreserve_and_charge_fee: who: {who:?}, weight: {weight:?}"); let fee = Pallet::::weight_to_fee(weight); ::Currency::unreserve_named(&RESERVE_ID, who, fee); @@ -1818,7 +1796,7 @@ where pays_fee: Pays, class: DispatchClass, ) -> Result<(), TransactionValidityError> { - log::debug!(target: LOG_TARGET, "charge_fee: who: {:?}, len: {:?}, weight: {:?}, tip: {:?}, pays_fee: {:?}, class: {:?}", who, len, weight, tip, pays_fee, class); + log::debug!(target: LOG_TARGET, "charge_fee: who: {who:?}, len: {len:?}, weight: {weight:?}, tip: {tip:?}, pays_fee: {pays_fee:?}, class: {class:?}"); let fee = Pallet::::compute_fee_raw(len, weight, tip, pays_fee, class).final_fee(); @@ -1832,10 +1810,7 @@ where .map_err(|e| { log::debug!( target: LOG_TARGET, - "charge_fee withdraw who: {:?} fee: {:?} error: {:?}", - who, - fee, - e + "charge_fee withdraw who: {who:?} fee: {fee:?} error: {e:?}", ); InvalidTransaction::Payment })?; diff --git a/modules/xcm-interface/src/lib.rs b/modules/xcm-interface/src/lib.rs index 0bb58ab1d..131510305 100644 --- a/modules/xcm-interface/src/lib.rs +++ b/modules/xcm-interface/src/lib.rs @@ -189,22 +189,21 @@ pub mod module { let weight = T::Weigher::weight(&mut xcm_message).map_err(|e| { log::error!( target: LOG_TARGET, - "failed to weigh XCM message: {:?}", e + "failed to weigh XCM message: {e:?}" ); Error::::XcmFailed })?; log::debug!( target: LOG_TARGET, - "origin_location {:?} send XCM to transfer staking currency {:?} to subaccount {:?}, message: {:?}", - origin_location, amount, sub_account_index, xcm_message + "origin_location {origin_location:?} send XCM to transfer staking currency {amount:?} to subaccount {sub_account_index:?}, message: {xcm_message:?}", ); T::XcmExecutor::prepare_and_execute(origin_location, xcm_message, &mut hash, weight, weight) .ensure_complete() .map_err(|e| { log::error!( target: LOG_TARGET, - "XcmExecutor failed to execute XCM message: {:?}", e + "XcmExecutor failed to execute XCM message: {e:?}" ); Error::::XcmFailed })?; @@ -242,8 +241,7 @@ pub mod module { let result = pallet_xcm::Pallet::::send_xcm(Here, T::AssetHubLocation::get(), xcm_message); log::debug!( target: LOG_TARGET, - "subaccount {:?} send XCM to withdraw unbonded {:?}, result: {:?}", - sub_account_index, amount, result + "subaccount {sub_account_index:?} send XCM to withdraw unbonded {amount:?}, result: {result:?}", ); ensure!(result.is_ok(), Error::::XcmFailed); @@ -264,8 +262,7 @@ pub mod module { let result = pallet_xcm::Pallet::::send_xcm(Here, T::AssetHubLocation::get(), xcm_message); log::debug!( target: LOG_TARGET, - "subaccount {:?} send XCM to bond {:?}, result: {:?}", - sub_account_index, amount, result, + "subaccount {sub_account_index:?} send XCM to bond {amount:?}, result: {result:?}", ); ensure!(result.is_ok(), Error::::XcmFailed); @@ -286,8 +283,7 @@ pub mod module { let result = pallet_xcm::Pallet::::send_xcm(Here, T::AssetHubLocation::get(), xcm_message); log::debug!( target: LOG_TARGET, - "subaccount {:?} send XCM to unbond {:?}, result: {:?}", - sub_account_index, amount, result + "subaccount {sub_account_index:?} send XCM to unbond {amount:?}, result: {result:?}", ); ensure!(result.is_ok(), Error::::XcmFailed); @@ -308,8 +304,7 @@ pub mod module { let result = pallet_xcm::Pallet::::send_xcm(Here, T::AssetHubLocation::get(), xcm_message); log::debug!( target: LOG_TARGET, - "subaccount {:?} send XCM to nominate {:?}, result: {:?}", - sub_account_index, targets, result + "subaccount {sub_account_index:?} send XCM to nominate {targets:?}, result: {result:?}", ); ensure!(result.is_ok(), Error::::XcmFailed); diff --git a/modules/xnft/src/impl_transactor.rs b/modules/xnft/src/impl_transactor.rs index e0d28ee6f..4c370360a 100644 --- a/modules/xnft/src/impl_transactor.rs +++ b/modules/xnft/src/impl_transactor.rs @@ -40,10 +40,7 @@ where fn deposit_asset(what: &Asset, who: &Location, context: Option<&XcmContext>) -> XcmResult { log::trace!( target: LOG_TARGET, - "deposit_asset what: {:?}, who: {:?}, context: {:?}", - what, - who, - context, + "deposit_asset what: {what:?}, who: {who:?}, context: {context:?}", ); let Fungibility::NonFungible(asset_instance) = what.fun else { @@ -67,10 +64,7 @@ where ) -> Result { log::trace!( target: LOG_TARGET, - "withdraw_asset what: {:?}, who: {:?}, maybe_context: {:?}", - what, - who, - maybe_context, + "withdraw_asset what: {what:?}, who: {who:?}, maybe_context: {maybe_context:?}", ); let Fungibility::NonFungible(asset_instance) = what.fun else { @@ -97,11 +91,7 @@ where ) -> Result { log::trace!( target: LOG_TARGET, - "internal_transfer_asset: {:?}, from: {:?}, to: {:?}, context: {:?}", - asset, - from, - to, - context + "internal_transfer_asset: {asset:?}, from: {from:?}, to: {to:?}, context: {context:?}", ); let Fungibility::NonFungible(asset_instance) = asset.fun else { diff --git a/primitives/src/unchecked_extrinsic.rs b/primitives/src/unchecked_extrinsic.rs index 9f75a9137..e9efcdace 100644 --- a/primitives/src/unchecked_extrinsic.rs +++ b/primitives/src/unchecked_extrinsic.rs @@ -156,7 +156,7 @@ where Preamble::Signed(addr, AcalaMultiSignature::Ethereum(sig), extra) => { let (eth_msg, eth_extra) = ConvertEthTx::convert((function.clone(), extra))?; log::trace!( - target: "evm", "Ethereum eth_msg: {:?}", eth_msg + target: "evm", "Ethereum eth_msg: {eth_msg:?}" ); // module_evm::Call::eth_call, ensure tip is zero to prevent miner attacks @@ -188,7 +188,7 @@ where chain_id: Some(eth_msg.chain_id), }; log::trace!( - target: "evm", "tx msg: {:?}", msg + target: "evm", "tx msg: {msg:?}" ); let msg_hash = msg.hash(); // TODO: consider rewrite this to use `keccak_256` for hashing because it could be faster @@ -210,7 +210,7 @@ where Preamble::Signed(addr, AcalaMultiSignature::Eip2930(sig), extra) => { let (eth_msg, eth_extra) = ConvertEthTx::convert((function.clone(), extra))?; log::trace!( - target: "evm", "Eip2930 eth_msg: {:?}", eth_msg + target: "evm", "Eip2930 eth_msg: {eth_msg:?}" ); // module_evm::Call::eth_call, ensure tip is zero to prevent miner attacks @@ -238,7 +238,7 @@ where access_list: eth_msg.access_list, }; log::trace!( - target: "evm", "tx msg: {:?}", msg + target: "evm", "tx msg: {msg:?}" ); let msg_hash = msg.hash(); // TODO: consider rewrite this to use `keccak_256` for hashing because it could be faster @@ -260,7 +260,7 @@ where Preamble::Signed(addr, AcalaMultiSignature::Eip1559(sig), extra) => { let (eth_msg, eth_extra) = ConvertEthTx::convert((function.clone(), extra))?; log::trace!( - target: "evm", "Eip1559 eth_msg: {:?}", eth_msg + target: "evm", "Eip1559 eth_msg: {eth_msg:?}" ); let (tx_gas_price, tx_gas_limit) = if eth_msg.gas_price.is_zero() { @@ -286,7 +286,7 @@ where access_list: eth_msg.access_list, }; log::trace!( - target: "evm", "tx msg: {:?}", msg + target: "evm", "tx msg: {msg:?}" ); let msg_hash = msg.hash(); // TODO: consider rewrite this to use `keccak_256` for hashing because it could be faster @@ -308,7 +308,7 @@ where Preamble::Signed(addr, AcalaMultiSignature::AcalaEip712(sig), extra) => { let (eth_msg, eth_extra) = ConvertEthTx::convert((function.clone(), extra))?; log::trace!( - target: "evm", "AcalaEip712 eth_msg: {:?}", eth_msg + target: "evm", "AcalaEip712 eth_msg: {eth_msg:?}" ); let signer = verify_eip712_signature(eth_msg, sig).ok_or(InvalidTransaction::BadProof)?; @@ -369,7 +369,7 @@ impl< D: serde::Deserializer<'a>, { let r = sp_core::bytes::deserialize(de)?; - Decode::decode(&mut &r[..]).map_err(|e| serde::de::Error::custom(format!("Decode error: {}", e))) + Decode::decode(&mut &r[..]).map_err(|e| serde::de::Error::custom(format!("Decode error: {e}"))) } } diff --git a/runtime/acala/src/lib.rs b/runtime/acala/src/lib.rs index ee35cab4a..dbe6fbcb5 100644 --- a/runtime/acala/src/lib.rs +++ b/runtime/acala/src/lib.rs @@ -1097,7 +1097,7 @@ where ); let raw_payload = SignedPayload::new(call, tx_ext) .map_err(|e| { - log::warn!("Unable to create signed payload: {:?}", e); + log::warn!("Unable to create signed payload: {e:?}"); }) .ok()?; let signature = raw_payload.using_encoded(|payload| C::sign(payload, public))?; diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index bff5d8f9f..56870e5cc 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -150,11 +150,7 @@ impl, RelayNumberStrictlyIncreases: CheckAssociatedRelayNum match EvmChainID::get() { CHAIN_ID_MANDALA | CHAIN_ID_KARURA_TESTNET | CHAIN_ID_ACALA_TESTNET => { if current <= previous { - log::warn!( - "Relay chain block number was reset, current: {:?}, previous: {:?}", - current, - previous - ); + log::warn!("Relay chain block number was reset, current: {current:?}, previous: {previous:?}",); } } _ => RelayNumberStrictlyIncreases::check_associated_relay_number(current, previous), diff --git a/runtime/common/src/precompile/dex.rs b/runtime/common/src/precompile/dex.rs index 136d06676..8251ca578 100644 --- a/runtime/common/src/precompile/dex.rs +++ b/runtime/common/src/precompile/dex.rs @@ -86,8 +86,7 @@ where let currency_id_b = input.currency_id_at(2)?; log::debug!( target: "evm", - "dex: get_liquidity_pool currency_id_a: {:?}, currency_id_b: {:?}", - currency_id_a, currency_id_b + "dex: get_liquidity_pool currency_id_a: {currency_id_a:?}, currency_id_b: {currency_id_b:?}", ); let (balance_a, balance_b) = as DEXManager< @@ -106,8 +105,7 @@ where let currency_id_b = input.currency_id_at(2)?; log::debug!( target: "evm", - "dex: get_liquidity_token address currency_id_a: {:?}, currency_id_b: {:?}", - currency_id_a, currency_id_b + "dex: get_liquidity_token address currency_id_a: {currency_id_a:?}, currency_id_b: {currency_id_b:?}", ); // If it does not exist, return address(0x0). Keep the behavior the same as mapping[key] @@ -129,8 +127,7 @@ where } log::debug!( target: "evm", - "dex: get_swap_target_amount path: {:?}, supply_amount: {:?}", - path, supply_amount + "dex: get_swap_target_amount path: {path:?}, supply_amount: {supply_amount:?}", ); // If get_swap_amount fail, return 0. @@ -153,8 +150,7 @@ where } log::debug!( target: "evm", - "dex: get_swap_supply_amount path: {:?}, target_amount: {:?}", - path, target_amount + "dex: get_swap_supply_amount path: {path:?}, target_amount: {target_amount:?}", ); // If get_swap_amount fail, return 0. @@ -179,8 +175,7 @@ where } log::debug!( target: "evm", - "dex: swap_with_exact_supply who: {:?}, path: {:?}, supply_amount: {:?}, min_target_amount: {:?}", - who, path, supply_amount, min_target_amount + "dex: swap_with_exact_supply who: {who:?}, path: {path:?}, supply_amount: {supply_amount:?}, min_target_amount: {min_target_amount:?}", ); let (_, value) = @@ -209,8 +204,7 @@ where } log::debug!( target: "evm", - "dex: swap_with_exact_target who: {:?}, path: {:?}, target_amount: {:?}, max_supply_amount: {:?}", - who, path, target_amount, max_supply_amount + "dex: swap_with_exact_target who: {who:?}, path: {path:?}, target_amount: {target_amount:?}, max_supply_amount: {max_supply_amount:?}", ); let (value, _) = @@ -237,8 +231,7 @@ where log::debug!( target: "evm", - "dex: add_liquidity who: {:?}, currency_id_a: {:?}, currency_id_b: {:?}, max_amount_a: {:?}, max_amount_b: {:?}, min_share_increment: {:?}", - who, currency_id_a, currency_id_b, max_amount_a, max_amount_b, min_share_increment, + "dex: add_liquidity who: {who:?}, currency_id_a: {currency_id_a:?}, currency_id_b: {currency_id_b:?}, max_amount_a: {max_amount_a:?}, max_amount_b: {max_amount_b:?}, min_share_increment: {min_share_increment:?}", ); as DEXManager>::add_liquidity( @@ -270,8 +263,7 @@ where log::debug!( target: "evm", - "dex: remove_liquidity who: {:?}, currency_id_a: {:?}, currency_id_b: {:?}, remove_share: {:?}, min_withdrawn_a: {:?}, min_withdrawn_b: {:?}", - who, currency_id_a, currency_id_b, remove_share, min_withdrawn_a, min_withdrawn_b, + "dex: remove_liquidity who: {who:?}, currency_id_a: {currency_id_a:?}, currency_id_b: {currency_id_b:?}, remove_share: {remove_share:?}, min_withdrawn_a: {min_withdrawn_a:?}, min_withdrawn_b: {min_withdrawn_b:?}", ); as DEXManager>::remove_liquidity( @@ -298,8 +290,7 @@ where let currency_id_b = input.currency_id_at(2)?; log::debug!( target: "evm", - "dex: get_provision_pool currency_id_a: {:?}, currency_id_b: {:?}", - currency_id_a, currency_id_b + "dex: get_provision_pool currency_id_a: {currency_id_a:?}, currency_id_b: {currency_id_b:?}", ); let (balance_a, balance_b) = as DEXBootstrap< @@ -319,8 +310,7 @@ where let currency_id_b = input.currency_id_at(3)?; log::debug!( target: "evm", - "dex: get_provision_pool_of who: {:?}, currency_id_a: {:?}, currency_id_b: {:?}", - who, currency_id_a, currency_id_b + "dex: get_provision_pool_of who: {who:?}, currency_id_a: {currency_id_a:?}, currency_id_b: {currency_id_b:?}", ); let (balance_a, balance_b) = as DEXBootstrap< @@ -339,8 +329,7 @@ where let currency_id_b = input.currency_id_at(2)?; log::debug!( target: "evm", - "dex: get_provision_pool currency_id_a: {:?}, currency_id_b: {:?}", - currency_id_a, currency_id_b + "dex: get_provision_pool currency_id_a: {currency_id_a:?}, currency_id_b: {currency_id_b:?}", ); let (exchange_rate_a, exchange_rate_b) = as DEXBootstrap< @@ -365,8 +354,7 @@ where log::debug!( target: "evm", - "dex: add_provision who: {:?}, currency_id_a: {:?}, currency_id_b: {:?}, contribution_a: {:?}, contribution_b: {:?}", - who, currency_id_a, currency_id_b, contribution_a, contribution_b, + "dex: add_provision who: {who:?}, currency_id_a: {currency_id_a:?}, currency_id_b: {currency_id_b:?}, contribution_a: {contribution_a:?}, contribution_b: {contribution_b:?}", ); as DEXBootstrap>::add_provision( @@ -393,8 +381,7 @@ where log::debug!( target: "evm", - "dex: claim_dex_share who: {:?}, currency_id_a: {:?}, currency_id_b: {:?}", - who, currency_id_a, currency_id_b, + "dex: claim_dex_share who: {who:?}, currency_id_a: {currency_id_a:?}, currency_id_b: {currency_id_b:?}", ); let claimed_share = as DEXBootstrap< @@ -419,8 +406,7 @@ where log::debug!( target: "evm", - "dex: refund_provision who: {:?}, currency_id_a: {:?}, currency_id_b: {:?}", - who, currency_id_a, currency_id_b, + "dex: refund_provision who: {who:?}, currency_id_a: {currency_id_a:?}, currency_id_b: {currency_id_b:?}", ); as DEXBootstrap>::refund_provision( diff --git a/runtime/common/src/precompile/evm.rs b/runtime/common/src/precompile/evm.rs index 2223ab522..c5dff72f4 100644 --- a/runtime/common/src/precompile/evm.rs +++ b/runtime/common/src/precompile/evm.rs @@ -126,8 +126,7 @@ where log::debug!( target: "evm", - "evm: from: {:?}, contract: {:?}, new_maintainer: {:?}", - from, contract, new_maintainer, + "evm: from: {from:?}, contract: {contract:?}, new_maintainer: {new_maintainer:?}", ); as EVMManager>::transfer_maintainer( diff --git a/runtime/common/src/precompile/honzon.rs b/runtime/common/src/precompile/honzon.rs index bb1aff287..02de06723 100644 --- a/runtime/common/src/precompile/honzon.rs +++ b/runtime/common/src/precompile/honzon.rs @@ -79,8 +79,7 @@ where log::debug!( target: "evm", - "honzon: adjust_loan who: {:?}, currency_id: {:?}, collateral_adjustment: {:?}, debit_adjustment: {:?}", - who, currency_id, collateral_adjustment, debit_adjustment + "honzon: adjust_loan who: {who:?}, currency_id: {currency_id:?}, collateral_adjustment: {collateral_adjustment:?}, debit_adjustment: {debit_adjustment:?}", ); as HonzonManager< @@ -107,8 +106,7 @@ where log::debug!( target: "evm", - "honzon: close_loan_by_dex who: {:?}, currency_id: {:?}, max_collateral_adjustment: {:?}", - who, currency_id, max_collateral_amount + "honzon: close_loan_by_dex who: {who:?}, currency_id: {currency_id:?}, max_collateral_adjustment: {max_collateral_amount:?}", ); as HonzonManager< diff --git a/runtime/common/src/precompile/liquid_crowdloan.rs b/runtime/common/src/precompile/liquid_crowdloan.rs index d155172a0..a12625b60 100644 --- a/runtime/common/src/precompile/liquid_crowdloan.rs +++ b/runtime/common/src/precompile/liquid_crowdloan.rs @@ -67,7 +67,7 @@ where } })?; - log::debug!(target: "evm", "liuqid_crowdloan: Redeem who: {:?}, amount: {:?}, output: {:?}", who, amount, redeem_amount); + log::debug!(target: "evm", "liuqid_crowdloan: Redeem who: {who:?}, amount: {amount:?}, output: {redeem_amount:?}"); Ok(PrecompileOutput { exit_status: ExitSucceed::Returned, output: Output::encode_uint(redeem_amount), @@ -78,7 +78,7 @@ where let address = ::Erc20InfoMapping::encode_evm_address(currency_id) .unwrap_or_default(); - log::debug!(target: "evm", "liuqid_crowdloan: GetRedeemCurrency output: {:?}", address); + log::debug!(target: "evm", "liuqid_crowdloan: GetRedeemCurrency output: {address:?}"); Ok(PrecompileOutput { exit_status: ExitSucceed::Returned, output: Output::encode_address(address), diff --git a/runtime/common/src/precompile/mod.rs b/runtime/common/src/precompile/mod.rs index 2007be88d..7e3ae5670 100644 --- a/runtime/common/src/precompile/mod.rs +++ b/runtime/common/src/precompile/mod.rs @@ -252,7 +252,7 @@ where // ensure precompile is not paused if PausedPrecompile::is_paused(address) { - log::debug!(target: "evm", "Precompile {:?} is paused", address); + log::debug!(target: "evm", "Precompile {address:?} is paused"); return Some(Err(PrecompileFailure::Revert { exit_status: ExitRevert::Reverted, output: "precompile is paused".into(), @@ -267,7 +267,7 @@ where })); } - log::trace!(target: "evm", "Precompile begin, address: {:?}, input: {:?}, context: {:?}", address, handle.input(), context); + log::trace!(target: "evm", "Precompile begin, address: {address:?}, input: {:?}, context: {context:?}", handle.input()); // https://github.com/ethereum/go-ethereum/blob/9357280fce5c5d57111d690a336cca5f89e34da6/core/vm/contracts.go#L83 let result = if address == ECRECOVER { @@ -350,7 +350,7 @@ where } }; - log::trace!(target: "evm", "Precompile end, address: {:?}, input: {:?}, context: {:?}, result: {:?}", address, handle.input(), handle.context(), result); + log::trace!(target: "evm", "Precompile end, address: {address:?}, input: {:?}, context: {:?}, result: {result:?}", handle.input(), handle.context()); if let Some(Err(PrecompileFailure::Revert { ref output, .. })) = result { log::debug!(target: "evm", "Precompile failed: {:?}", core::str::from_utf8(output)); }; diff --git a/runtime/common/src/precompile/multicurrency.rs b/runtime/common/src/precompile/multicurrency.rs index 4afcd2236..19e43bec2 100644 --- a/runtime/common/src/precompile/multicurrency.rs +++ b/runtime/common/src/precompile/multicurrency.rs @@ -85,7 +85,7 @@ where let action = input.action()?; - log::debug!(target: "evm", "multicurrency: currency id: {:?}", currency_id); + log::debug!(target: "evm", "multicurrency: currency id: {currency_id:?}"); match action { Action::QueryName => { @@ -93,7 +93,7 @@ where exit_status: ExitRevert::Reverted, output: "Get name failed".into(), })?; - log::debug!(target: "evm", "multicurrency: name: {:?}", name); + log::debug!(target: "evm", "multicurrency: name: {name:?}"); Ok(PrecompileOutput { exit_status: ExitSucceed::Returned, @@ -106,7 +106,7 @@ where exit_status: ExitRevert::Reverted, output: "Get symbol failed".into(), })?; - log::debug!(target: "evm", "multicurrency: symbol: {:?}", symbol); + log::debug!(target: "evm", "multicurrency: symbol: {symbol:?}"); Ok(PrecompileOutput { exit_status: ExitSucceed::Returned, @@ -119,7 +119,7 @@ where exit_status: ExitRevert::Reverted, output: "Get decimals failed".into(), })?; - log::debug!(target: "evm", "multicurrency: decimals: {:?}", decimals); + log::debug!(target: "evm", "multicurrency: decimals: {decimals:?}"); Ok(PrecompileOutput { exit_status: ExitSucceed::Returned, @@ -129,7 +129,7 @@ where Action::QueryTotalIssuance => { let total_issuance = ::MultiCurrency::total_issuance(currency_id); - log::debug!(target: "evm", "multicurrency: total issuance: {:?}", total_issuance); + log::debug!(target: "evm", "multicurrency: total issuance: {total_issuance:?}"); Ok(PrecompileOutput { exit_status: ExitSucceed::Returned, @@ -144,7 +144,7 @@ where } else { ::MultiCurrency::total_balance(currency_id, &who) }; - log::debug!(target: "evm", "multicurrency: who: {:?}, balance: {:?}", who, balance); + log::debug!(target: "evm", "multicurrency: who: {who:?}, balance: {balance:?}"); Ok(PrecompileOutput { exit_status: ExitSucceed::Returned, @@ -155,7 +155,7 @@ where let from = input.account_id_at(1)?; let to = input.account_id_at(2)?; let amount = input.balance_at(3)?; - log::debug!(target: "evm", "multicurrency: transfer from: {:?}, to: {:?}, amount: {:?}", from, to, amount); + log::debug!(target: "evm", "multicurrency: transfer from: {from:?}, to: {to:?}, amount: {amount:?}"); as MultiCurrencyT>::transfer( currency_id, @@ -182,7 +182,7 @@ where let to: Runtime::AccountId = AccountId32::from(buf).into(); let amount = input.balance_at(3)?; - log::debug!(target: "evm", "multicurrency: transferToAccountId from: {:?}, to: {:?}, amount: {:?}", from, to, amount); + log::debug!(target: "evm", "multicurrency: transferToAccountId from: {from:?}, to: {to:?}, amount: {amount:?}"); as MultiCurrencyT>::transfer( currency_id, diff --git a/runtime/common/src/precompile/nft.rs b/runtime/common/src/precompile/nft.rs index f447cdf22..6d547f427 100644 --- a/runtime/common/src/precompile/nft.rs +++ b/runtime/common/src/precompile/nft.rs @@ -70,7 +70,7 @@ where Action::QueryBalance => { let who = input.account_id_at(1)?; - log::debug!(target: "evm", "nft: query_balance who: {:?}", who); + log::debug!(target: "evm", "nft: query_balance who: {who:?}"); let balance = module_nft::Pallet::::balance(&who); @@ -83,7 +83,7 @@ where let class_id = input.u32_at(1)?; let token_id = input.u64_at(2)?; - log::debug!(target: "evm", "nft: query_owner class_id: {:?}, token_id: {:?}", class_id, token_id); + log::debug!(target: "evm", "nft: query_owner class_id: {class_id:?}, token_id: {token_id:?}"); let owner: H160 = if let Some(o) = module_nft::Pallet::::owner(&class_id, &token_id) { Runtime::AddressMapping::get_evm_address(&o) @@ -104,7 +104,7 @@ where let class_id = input.u32_at(3)?; let token_id = input.u64_at(4)?; - log::debug!(target: "evm", "nft: transfer from: {:?}, to: {:?}, class_id: {:?}, token_id: {:?}", from, to, class_id, token_id); + log::debug!(target: "evm", "nft: transfer from: {from:?}, to: {to:?}, class_id: {class_id:?}, token_id: {token_id:?}"); as Transfer>::transfer(&class_id, &token_id, &to) .map_err(|e| PrecompileFailure::Revert { diff --git a/runtime/common/src/precompile/oracle.rs b/runtime/common/src/precompile/oracle.rs index 9ae9024bb..f04f39a06 100644 --- a/runtime/common/src/precompile/oracle.rs +++ b/runtime/common/src/precompile/oracle.rs @@ -89,7 +89,7 @@ where let output = price.into_inner().wrapping_div(adjustment_multiplier); - log::debug!(target: "evm", "oracle: getPrice currency_id: {:?}, price: {:?}, adjustment_multiplier: {:?}, output: {:?}", currency_id, price, adjustment_multiplier, output); + log::debug!(target: "evm", "oracle: getPrice currency_id: {currency_id:?}, price: {price:?}, adjustment_multiplier: {adjustment_multiplier:?}, output: {output:?}"); Ok(PrecompileOutput { exit_status: ExitSucceed::Returned, output: Output::encode_uint(output), diff --git a/runtime/common/src/precompile/schedule.rs b/runtime/common/src/precompile/schedule.rs index bfc8f6d85..51ebfbef1 100644 --- a/runtime/common/src/precompile/schedule.rs +++ b/runtime/common/src/precompile/schedule.rs @@ -125,14 +125,7 @@ where log::debug!( target: "evm", - "schedule call: from: {:?}, target: {:?}, value: {:?}, gas_limit: {:?}, storage_limit: {:?}, min_delay: {:?}, input_data: {:?}", - from, - target, - value, - gas_limit, - storage_limit, - min_delay, - input_data, + "schedule call: from: {from:?}, target: {target:?}, value: {value:?}, gas_limit: {gas_limit:?}, storage_limit: {storage_limit:?}, min_delay: {min_delay:?}, input_data: {input_data:?}", ); let mut _fee: PalletBalanceOf = Default::default(); @@ -186,8 +179,7 @@ where log::debug!( target: "evm", - "schedule call: task_id: {:?}", - task_id, + "schedule call: task_id: {task_id:?}", ); as ScheduleNamed< @@ -222,9 +214,7 @@ where log::debug!( target: "evm", - "cancel call: from: {:?}, task_id: {:?}", - from, - task_id, + "cancel call: from: {from:?}, task_id: {task_id:?}", ); let task_info = TaskInfo::decode(&mut &task_id[..]).map_err(|_| PrecompileFailure::Revert { @@ -274,10 +264,7 @@ where log::debug!( target: "evm", - "reschedule call: from: {:?}, task_id: {:?}, min_delay: {:?}", - from, - task_id, - min_delay, + "reschedule call: from: {from:?}, task_id: {task_id:?}, min_delay: {min_delay:?}", ); let task_info = TaskInfo::decode(&mut &task_id[..]).map_err(|_| PrecompileFailure::Revert { diff --git a/runtime/common/src/precompile/xtokens.rs b/runtime/common/src/precompile/xtokens.rs index 6b69e14df..fd7f32118 100644 --- a/runtime/common/src/precompile/xtokens.rs +++ b/runtime/common/src/precompile/xtokens.rs @@ -99,8 +99,7 @@ where log::debug!( target: "evm", - "xtokens: Transfer from: {:?}, currency_id: {:?}, amount: {:?}, dest: {:?}, weight: {:?}", - from, currency_id, amount, dest, weight + "xtokens: Transfer from: {from:?}, currency_id: {currency_id:?}, amount: {amount:?}, dest: {dest:?}, weight: {weight:?}", ); let transferred = as XcmTransfer< @@ -111,8 +110,7 @@ where .map_err(|e| { log::debug!( target: "evm", - "xtokens: Transfer failed: {:?}", - e + "xtokens: Transfer failed: {e:?}", ); PrecompileFailure::Revert { exit_status: ExitRevert::Reverted, @@ -148,8 +146,7 @@ where log::debug!( target: "evm", - "xtokens: TransferMultiAsset from: {:?}, asset: {:?}, dest: {:?}, weight: {:?}", - from, asset, dest, weight + "xtokens: TransferMultiAsset from: {from:?}, asset: {asset:?}, dest: {dest:?}, weight: {weight:?}", ); let transferred = as XcmTransfer< @@ -160,8 +157,7 @@ where .map_err(|e| { log::debug!( target: "evm", - "xtokens: TransferMultiAsset failed: {:?}", - e + "xtokens: TransferMultiAsset failed: {e:?}", ); PrecompileFailure::Revert { exit_status: ExitRevert::Reverted, @@ -194,8 +190,7 @@ where log::debug!( target: "evm", - "xtokens: Transfer from: {:?}, currency_id: {:?}, amount: {:?}, fee: {:?}, dest: {:?}, weight: {:?}", - from, currency_id, amount, fee, dest, weight + "xtokens: Transfer from: {from:?}, currency_id: {currency_id:?}, amount: {amount:?}, fee: {fee:?}, dest: {dest:?}, weight: {weight:?}", ); let transferred = as XcmTransfer< @@ -206,8 +201,7 @@ where .map_err(|e| { log::debug!( target: "evm", - "xtokens: TransferWithFee failed: {:?}", - e + "xtokens: TransferWithFee failed: {e:?}", ); PrecompileFailure::Revert { exit_status: ExitRevert::Reverted, @@ -249,8 +243,7 @@ where log::debug!( target: "evm", - "xtokens: TransferMultiAssetWithFee from: {:?}, asset: {:?}, fee: {:?}, dest: {:?}, weight: {:?}", - from, asset, fee, dest, weight + "xtokens: TransferMultiAssetWithFee from: {from:?}, asset: {asset:?}, fee: {fee:?}, dest: {dest:?}, weight: {weight:?}", ); let transferred = as XcmTransfer< @@ -261,8 +254,7 @@ where .map_err(|e| { log::debug!( target: "evm", - "xtokens: TransferMultiAssetWithFee failed: {:?}", - e + "xtokens: TransferMultiAssetWithFee failed: {e:?}", ); PrecompileFailure::Revert { exit_status: ExitRevert::Reverted, @@ -315,8 +307,7 @@ where log::debug!( target: "evm", - "xtokens: TransferMultiCurrencies from: {:?}, currencies: {:?}, fee_item: {:?}, dest: {:?}, weight: {:?}", - from, currencies, fee_item, dest, weight + "xtokens: TransferMultiCurrencies from: {from:?}, currencies: {currencies:?}, fee_item: {fee_item:?}, dest: {dest:?}, weight: {weight:?}", ); let transferred = as XcmTransfer< @@ -327,8 +318,7 @@ where .map_err(|e| { log::debug!( target: "evm", - "xtokens: TransferMultiCurrencies failed: {:?}", - e + "xtokens: TransferMultiCurrencies failed: {e:?}", ); PrecompileFailure::Revert { exit_status: ExitRevert::Reverted, @@ -370,8 +360,7 @@ where log::debug!( target: "evm", - "xtokens: TransferMultiAssets from: {:?}, assets: {:?}, fee: {:?}, dest: {:?}, weight: {:?}", - from, assets, fee, dest, weight + "xtokens: TransferMultiAssets from: {from:?}, assets: {assets:?}, fee: {fee:?}, dest: {dest:?}, weight: {weight:?}", ); let transferred = as XcmTransfer< @@ -382,8 +371,7 @@ where .map_err(|e| { log::debug!( target: "evm", - "xtokens: TransferMultiAssets failed: {:?}", - e + "xtokens: TransferMultiAssets failed: {e:?}", ); PrecompileFailure::Revert { exit_status: ExitRevert::Reverted, diff --git a/runtime/common/src/xcm_impl.rs b/runtime/common/src/xcm_impl.rs index 5720c3d43..fdd6ef7af 100644 --- a/runtime/common/src/xcm_impl.rs +++ b/runtime/common/src/xcm_impl.rs @@ -149,7 +149,7 @@ impl, R: TakeRevenue, M: BuyWeightRate> WeightTrader for Fi payment: AssetsInHolding, _context: &XcmContext, ) -> Result { - log::trace!(target: "xcm::weight", "buy_weight weight: {:?}, payment: {:?}", weight, payment); + log::trace!(target: "xcm::weight", "buy_weight weight: {weight:?}, payment: {payment:?}"); // only support first fungible assets now. let asset_id = payment @@ -159,7 +159,7 @@ impl, R: TakeRevenue, M: BuyWeightRate> WeightTrader for Fi .map_or(Err(XcmError::TooExpensive), |v| Ok(v.0))?; let AssetId(ref location) = asset_id; - log::debug!(target: "xcm::weight", "buy_weight location: {:?}", location); + log::debug!(target: "xcm::weight", "buy_weight location: {location:?}"); if let Some(ratio) = M::calculate_rate(location.clone()) { // The WEIGHT_REF_TIME_PER_SECOND is non-zero. @@ -173,8 +173,8 @@ impl, R: TakeRevenue, M: BuyWeightRate> WeightTrader for Fi }; log::trace!( - target: "xcm::weight", "buy_weight payment: {:?}, required: {:?}, fixed_rate: {:?}, ratio: {:?}, weight_ratio: {:?}", - payment, required, FixedRate::get(), ratio, weight_ratio + target: "xcm::weight", "buy_weight payment: {payment:?}, required: {required:?}, fixed_rate: {:?}, ratio: {ratio:?}, weight_ratio: {weight_ratio:?}", + FixedRate::get(), ); let unused = payment .clone() @@ -193,8 +193,8 @@ impl, R: TakeRevenue, M: BuyWeightRate> WeightTrader for Fi fn refund_weight(&mut self, weight: XcmWeight, _context: &XcmContext) -> Option { log::trace!( - target: "xcm::weight", "refund_weight weight: {:?}, weight: {:?}, amount: {:?}, ratio: {:?}, location: {:?}", - weight, self.weight, self.amount, self.ratio, self.location + target: "xcm::weight", "refund_weight weight: {weight:?}, weight: {:?}, amount: {:?}, ratio: {:?}, location: {:?}", + self.weight, self.amount, self.ratio, self.location ); let weight = weight.min(self.weight); let weight_ratio = @@ -206,7 +206,7 @@ impl, R: TakeRevenue, M: BuyWeightRate> WeightTrader for Fi self.weight = self.weight.saturating_sub(weight); self.amount = self.amount.saturating_sub(amount); - log::trace!(target: "xcm::weight", "refund_weight amount: {:?}", amount); + log::trace!(target: "xcm::weight", "refund_weight amount: {amount:?}"); if amount > 0 && self.location.is_some() { Some((self.location.clone().expect("checked is non-empty; qed"), amount).into()) } else { diff --git a/runtime/karura/src/lib.rs b/runtime/karura/src/lib.rs index 8bea29d94..b00e92fb5 100644 --- a/runtime/karura/src/lib.rs +++ b/runtime/karura/src/lib.rs @@ -1103,7 +1103,7 @@ where ); let raw_payload = SignedPayload::new(call, tx_ext) .map_err(|e| { - log::warn!("Unable to create signed payload: {:?}", e); + log::warn!("Unable to create signed payload: {e:?}"); }) .ok()?; let signature = raw_payload.using_encoded(|payload| C::sign(payload, public))?; diff --git a/runtime/mandala/src/lib.rs b/runtime/mandala/src/lib.rs index c5a201acd..2d51b40d1 100644 --- a/runtime/mandala/src/lib.rs +++ b/runtime/mandala/src/lib.rs @@ -1127,7 +1127,7 @@ where ); let raw_payload = SignedPayload::new(call, tx_ext) .map_err(|e| { - log::warn!("Unable to create signed payload: {:?}", e); + log::warn!("Unable to create signed payload: {e:?}"); }) .ok()?; let signature = raw_payload.using_encoded(|payload| C::sign(payload, public))?; diff --git a/rust-toolchain.toml b/rust-toolchain.toml index b596760ad..4dd964b2f 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.84.1" -components = ["rustfmt", "clippy"] +channel = "1.88.0" +components = ["rust-src", "rustfmt", "clippy"] targets = ["wasm32v1-none"]