difftreelog
feat(evm-coder) helper methods
in: master
1 file changed
pallets/evm-coder-substrate/src/lib.rsdiffbeforeafterboth16 execution::{self, Result},16 execution::{self, Result},17 types::{Msg, value},17 types::{Msg, value},18 };18 };19 use frame_support::ensure;19 use frame_support::{ensure};20 use pallet_evm::{ExitError, ExitReason, ExitRevert, ExitSucceed, PrecompileOutput};20 use pallet_evm::{ExitError, ExitReason, ExitRevert, ExitSucceed, PrecompileOutput};21 pub use frame_support::dispatch::DispatchResult;21 pub use frame_support::dispatch::DispatchResult;22 use pallet_ethereum::EthereumTransactionSender;22 use pallet_ethereum::EthereumTransactionSender;120 pub fn consume_sload_sub(&self) -> DispatchResult {120 pub fn consume_sload_sub(&self) -> DispatchResult {121 self.consume_gas_sub(G_SLOAD_WORD)121 self.consume_gas_sub(G_SLOAD_WORD)122 }122 }123 pub fn consume_sstores_sub(&self, amount: usize) -> DispatchResult {124 self.consume_gas_sub(G_SSTORE_WORD.saturating_mul(amount as u64))125 }123 pub fn consume_sstore_sub(&self) -> DispatchResult {126 pub fn consume_sstore_sub(&self) -> DispatchResult {124 self.consume_gas_sub(G_SSTORE_WORD)127 self.consume_gas_sub(G_SSTORE_WORD)125 }128 }