Trait zksync_vm2::World
source · pub trait World<T: Tracer>: StorageInterface + Sized {
// Required methods
fn decommit(&mut self, hash: U256) -> Program<T, Self>;
fn decommit_code(&mut self, hash: U256) -> Vec<u8> ⓘ;
}
Expand description
Encapsulates VM interaction with the external world. This includes VM storage and decomitting (loading) bytecodes for execution.
Required Methods§
sourcefn decommit(&mut self, hash: U256) -> Program<T, Self>
fn decommit(&mut self, hash: U256) -> Program<T, Self>
Loads a bytecode with the specified hash.
This method will be called every time a contract is called. Caching and decoding is the world implementor’s job.
sourcefn decommit_code(&mut self, hash: U256) -> Vec<u8> ⓘ
fn decommit_code(&mut self, hash: U256) -> Vec<u8> ⓘ
Loads bytecode bytes for the decommit
opcode.
Object Safety§
This trait is not object safe.