pub struct MemoryStackState<'backend, 'config, B> { /* private fields */ }Implementations§
Source§impl<'backend, 'config, B: Backend> MemoryStackState<'backend, 'config, B>
impl<'backend, 'config, B: Backend> MemoryStackState<'backend, 'config, B>
pub const fn new( metadata: StackSubstateMetadata<'config>, backend: &'backend B, ) -> Self
Sourcepub fn account_mut(&mut self, address: H160) -> &mut MemoryStackAccount
pub fn account_mut(&mut self, address: H160) -> &mut MemoryStackAccount
Returns a mutable reference to an account given its address
pub fn deconstruct( self, ) -> (impl IntoIterator<Item = Apply<impl IntoIterator<Item = (H256, H256)>>>, impl IntoIterator<Item = Log>)
Sourcepub fn withdraw(&mut self, address: H160, value: U256) -> Result<(), ExitError>
pub fn withdraw(&mut self, address: H160, value: U256) -> Result<(), ExitError>
§Errors
Return ExitError
pub fn deposit(&mut self, address: H160, value: U256)
Trait Implementations§
Source§impl<B: Backend> Backend for MemoryStackState<'_, '_, B>
impl<B: Backend> Backend for MemoryStackState<'_, '_, B>
Source§fn block_hash(&self, number: U256) -> H256
fn block_hash(&self, number: U256) -> H256
Environmental block hash.
Source§fn block_number(&self) -> U256
fn block_number(&self) -> U256
Environmental block number.
Source§fn block_coinbase(&self) -> H160
fn block_coinbase(&self) -> H160
Environmental coinbase.
Source§fn block_timestamp(&self) -> U256
fn block_timestamp(&self) -> U256
Environmental block timestamp.
Source§fn block_difficulty(&self) -> U256
fn block_difficulty(&self) -> U256
Environmental block difficulty.
Source§fn block_randomness(&self) -> Option<H256>
fn block_randomness(&self) -> Option<H256>
Get environmental block randomness.
Source§fn block_gas_limit(&self) -> U256
fn block_gas_limit(&self) -> U256
Environmental block gas limit.
Source§fn block_base_fee_per_gas(&self) -> U256
fn block_base_fee_per_gas(&self) -> U256
Environmental block base fee.
Source§fn is_empty_storage(&self, address: H160) -> bool
fn is_empty_storage(&self, address: H160) -> bool
Check if the storage of the address is empty.
Source§fn original_storage(&self, address: H160, key: H256) -> Option<H256>
fn original_storage(&self, address: H160, key: H256) -> Option<H256>
Get original storage value of address at index, if available.
Source§fn blob_gas_price(&self) -> Option<u128>
fn blob_gas_price(&self) -> Option<u128>
CANCUN hard fork
[EIP-4844]: Shard Blob Transactions
[EIP-7516]: BLOBBASEFEE instruction
Source§impl<'backend, 'config, B: Clone> Clone for MemoryStackState<'backend, 'config, B>
impl<'backend, 'config, B: Clone> Clone for MemoryStackState<'backend, 'config, B>
Source§fn clone(&self) -> MemoryStackState<'backend, 'config, B>
fn clone(&self) -> MemoryStackState<'backend, 'config, B>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'backend, 'config, B: Debug> Debug for MemoryStackState<'backend, 'config, B>
impl<'backend, 'config, B: Debug> Debug for MemoryStackState<'backend, 'config, B>
Source§impl<'config, B: Backend> StackState<'config> for MemoryStackState<'_, 'config, B>
impl<'config, B: Backend> StackState<'config> for MemoryStackState<'_, 'config, B>
EIP-7702 - check is authority cold.
Get authority target (EIP-7702) - delegated address. First we’re trying to get authority target from the cache recursively with parent state, if it’s not found we get code for the authority address and check if it’s delegation designator. If it’s true, we add result to cache and return delegated target address.
fn metadata(&self) -> &StackSubstateMetadata<'config>
fn metadata_mut(&mut self) -> &mut StackSubstateMetadata<'config>
fn enter(&mut self, gas_limit: u64, is_static: bool)
fn is_empty(&self, address: H160) -> bool
fn deleted(&self, address: H160) -> bool
fn is_cold(&self, address: H160) -> bool
fn is_storage_cold(&self, address: H160, key: H256) -> bool
fn set_storage(&mut self, address: H160, key: H256, value: H256)
fn reset_storage(&mut self, address: H160)
fn log(&mut self, address: H160, topics: Vec<H256>, data: Vec<u8>)
fn set_deleted(&mut self, address: H160)
fn set_created(&mut self, address: H160)
fn is_created(&self, address: H160) -> bool
fn set_code(&mut self, address: H160, code: Vec<u8>)
fn reset_balance(&mut self, address: H160)
fn touch(&mut self, address: H160)
Source§fn tload(&mut self, address: H160, index: H256) -> Result<U256, ExitError>
fn tload(&mut self, address: H160, index: H256) -> Result<U256, ExitError>
Get tstorage value of address at index.
EIP-1153: Transient storage Read more
Source§fn tstore(
&mut self,
address: H160,
index: H256,
value: U256,
) -> Result<(), ExitError>
fn tstore( &mut self, address: H160, index: H256, value: U256, ) -> Result<(), ExitError>
Set tstorage value of address at index.
EIP-1153: Transient storage Read more
Source§fn record_external_operation(
&mut self,
_op: ExternalOperation,
) -> Result<(), ExitError>
fn record_external_operation( &mut self, _op: ExternalOperation, ) -> Result<(), ExitError>
Errors Read more
Source§fn record_external_dynamic_opcode_cost(
&mut self,
_opcode: Opcode,
_gas_cost: GasCost,
_target: StorageTarget,
) -> Result<(), ExitError>
fn record_external_dynamic_opcode_cost( &mut self, _opcode: Opcode, _gas_cost: GasCost, _target: StorageTarget, ) -> Result<(), ExitError>
Errors Read more
Source§fn record_external_cost(
&mut self,
_ref_time: Option<u64>,
_proof_size: Option<u64>,
_storage_growth: Option<u64>,
) -> Result<(), ExitError>
fn record_external_cost( &mut self, _ref_time: Option<u64>, _proof_size: Option<u64>, _storage_growth: Option<u64>, ) -> Result<(), ExitError>
Errors Read more
fn refund_external_cost( &mut self, _ref_time: Option<u64>, _proof_size: Option<u64>, )
Auto Trait Implementations§
impl<'backend, 'config, B> Freeze for MemoryStackState<'backend, 'config, B>
impl<'backend, 'config, B> RefUnwindSafe for MemoryStackState<'backend, 'config, B>where
B: RefUnwindSafe,
impl<'backend, 'config, B> Send for MemoryStackState<'backend, 'config, B>where
B: Sync,
impl<'backend, 'config, B> Sync for MemoryStackState<'backend, 'config, B>where
B: Sync,
impl<'backend, 'config, B> Unpin for MemoryStackState<'backend, 'config, B>
impl<'backend, 'config, B> UnwindSafe for MemoryStackState<'backend, 'config, B>where
B: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more