Struct zksync_vm2::testonly::TestWorld  
source · pub struct TestWorld<T> { /* private fields */ }Expand description
Test World implementation.
Implementations§
Trait Implementations§
source§impl<T> StorageInterface for TestWorld<T>
 
impl<T> StorageInterface for TestWorld<T>
source§fn read_storage(&mut self, contract: H160, key: U256) -> StorageSlot
 
fn read_storage(&mut self, contract: H160, key: U256) -> StorageSlot
Reads the specified slot from the storage. Read more
source§fn cost_of_writing_storage(
    &mut self,
    _initial_slot: StorageSlot,
    _new_value: U256,
) -> u32
 
fn cost_of_writing_storage( &mut self, _initial_slot: StorageSlot, _new_value: U256, ) -> u32
Computes the cost of writing a storage slot.
source§fn is_free_storage_slot(&self, _contract: &H160, _key: &U256) -> bool
 
fn is_free_storage_slot(&self, _contract: &H160, _key: &U256) -> bool
Returns if the storage slot is free both in terms of gas and pubdata.
source§fn read_storage_value(&mut self, contract: H160, key: U256) -> U256
 
fn read_storage_value(&mut self, contract: H160, key: U256) -> U256
Same as 
Self::read_storage(), but doesn’t request the initialness flag for the read slot. Read moresource§impl<T: Tracer> World<T> for TestWorld<T>
 
impl<T: Tracer> World<T> for TestWorld<T>
source§fn decommit(&mut self, hash: U256) -> Program<T, Self>
 
fn decommit(&mut self, hash: U256) -> Program<T, Self>
Loads a bytecode with the specified hash. Read more
source§fn decommit_code(&mut self, hash: U256) -> Vec<u8> ⓘ
 
fn decommit_code(&mut self, hash: U256) -> Vec<u8> ⓘ
Loads bytecode bytes for the 
decommit opcode.source§fn precompiles(&self) -> &impl Precompiles
 
fn precompiles(&self) -> &impl Precompiles
Returns precompiles to be used.
Auto Trait Implementations§
impl<T> Freeze for TestWorld<T>
impl<T> RefUnwindSafe for TestWorld<T>
impl<T> Send for TestWorld<T>
impl<T> Sync for TestWorld<T>
impl<T> Unpin for TestWorld<T>
impl<T> UnwindSafe for TestWorld<T>
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