Trait evmil::analysis::EvmStorage

source ·
pub trait EvmStorage: Debug {
    type Word: EvmWord;

    // Required methods
    fn get(&mut self, address: Self::Word) -> Self::Word;
    fn put(&mut self, address: Self::Word, item: Self::Word);
}
Expand description

Abstraction of peristent storage within an EVM. This provides the minimal set of operations required to implement the semantics of a given bytecode instruction. For example, reading/writing from storage.

Required Associated Types§

source

type Word: EvmWord

Defines what constitutes a word in this EVM. For example, a concrete evm will use a w256 here whilst an abstract evm will use something that can, for example, describe unknown values.

Required Methods§

source

fn get(&mut self, address: Self::Word) -> Self::Word

Get the word at a given location in storage.

source

fn put(&mut self, address: Self::Word, item: Self::Word)

Put a given value at a given location in storage.

Implementors§