From 83b5bd9128d80e9651cd6fe5f9e1433b93d74bc7 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Tue, 31 Oct 2023 17:51:56 +0300 Subject: [PATCH] [frontier-apply] chore: remove deprecated storage getter for all pallets (#1034) --- crates/humanode-runtime/src/lib.rs | 16 ++++++++-------- crates/pallet-dummy-precompiles-code/src/lib.rs | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/crates/humanode-runtime/src/lib.rs b/crates/humanode-runtime/src/lib.rs index e8006c047..37c7572bb 100644 --- a/crates/humanode-runtime/src/lib.rs +++ b/crates/humanode-runtime/src/lib.rs @@ -1300,7 +1300,7 @@ impl_runtime_apis! { } fn account_code_at(address: H160) -> Vec { - EVM::account_codes(address) + pallet_evm::AccountCodes::::get(address) } fn author() -> H160 { @@ -1310,7 +1310,7 @@ impl_runtime_apis! { fn storage_at(address: H160, index: U256) -> H256 { let mut tmp = [0u8; 32]; index.to_big_endian(&mut tmp); - EVM::account_storages(address, H256::from_slice(&tmp[..])) + pallet_evm::AccountStorages::::get(address, H256::from_slice(&tmp[..])) } fn call( @@ -1388,15 +1388,15 @@ impl_runtime_apis! { } fn current_transaction_statuses() -> Option> { - Ethereum::current_transaction_statuses() + pallet_ethereum::CurrentTransactionStatuses::::get() } fn current_block() -> Option { - Ethereum::current_block() + pallet_ethereum::CurrentBlock::::get() } fn current_receipts() -> Option> { - Ethereum::current_receipts() + pallet_ethereum::CurrentReceipts::::get() } fn current_all() -> ( @@ -1405,9 +1405,9 @@ impl_runtime_apis! { Option> ) { ( - Ethereum::current_block(), - Ethereum::current_receipts(), - Ethereum::current_transaction_statuses() + pallet_ethereum::CurrentBlock::::get(), + pallet_ethereum::CurrentReceipts::::get(), + pallet_ethereum::CurrentTransactionStatuses::::get() ) } diff --git a/crates/pallet-dummy-precompiles-code/src/lib.rs b/crates/pallet-dummy-precompiles-code/src/lib.rs index 4361e5a3b..3ebc3bb06 100644 --- a/crates/pallet-dummy-precompiles-code/src/lib.rs +++ b/crates/pallet-dummy-precompiles-code/src/lib.rs @@ -135,7 +135,7 @@ impl Pallet { let mut weight = T::DbWeight::get().reads(0); for precompile_address in &T::PrecompilesAddresses::get() { - let code = pallet_evm::Pallet::::account_codes(*precompile_address); + let code = pallet_evm::AccountCodes::::get(*precompile_address); weight.saturating_accrue(T::DbWeight::get().reads(1)); if code != DUMMY_CODE {