Skip to content

Commit

Permalink
[frontier-apply] chore: remove deprecated storage getter for all pall…
Browse files Browse the repository at this point in the history
…ets (#1034)
  • Loading branch information
dmitrylavrenov committed Oct 31, 2023
1 parent 2c69a70 commit 83b5bd9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions crates/humanode-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@ impl_runtime_apis! {
}

fn account_code_at(address: H160) -> Vec<u8> {
EVM::account_codes(address)
pallet_evm::AccountCodes::<Runtime>::get(address)
}

fn author() -> H160 {
Expand All @@ -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::<Runtime>::get(address, H256::from_slice(&tmp[..]))
}

fn call(
Expand Down Expand Up @@ -1388,15 +1388,15 @@ impl_runtime_apis! {
}

fn current_transaction_statuses() -> Option<Vec<TransactionStatus>> {
Ethereum::current_transaction_statuses()
pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
}

fn current_block() -> Option<pallet_ethereum::Block> {
Ethereum::current_block()
pallet_ethereum::CurrentBlock::<Runtime>::get()
}

fn current_receipts() -> Option<Vec<pallet_ethereum::Receipt>> {
Ethereum::current_receipts()
pallet_ethereum::CurrentReceipts::<Runtime>::get()
}

fn current_all() -> (
Expand All @@ -1405,9 +1405,9 @@ impl_runtime_apis! {
Option<Vec<TransactionStatus>>
) {
(
Ethereum::current_block(),
Ethereum::current_receipts(),
Ethereum::current_transaction_statuses()
pallet_ethereum::CurrentBlock::<Runtime>::get(),
pallet_ethereum::CurrentReceipts::<Runtime>::get(),
pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
)
}

Expand Down
2 changes: 1 addition & 1 deletion crates/pallet-dummy-precompiles-code/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl<T: Config> Pallet<T> {
let mut weight = T::DbWeight::get().reads(0);

for precompile_address in &T::PrecompilesAddresses::get() {
let code = pallet_evm::Pallet::<T>::account_codes(*precompile_address);
let code = pallet_evm::AccountCodes::<T>::get(*precompile_address);
weight.saturating_accrue(T::DbWeight::get().reads(1));

if code != DUMMY_CODE {
Expand Down

0 comments on commit 83b5bd9

Please sign in to comment.