[][src]Trait ethereumvm_network::Patch

pub trait Patch {
    type Account: AccountPatch;
    fn account_patch(&self) -> &Self::Account;
fn code_deposit_limit(&self) -> Option<usize>;
fn callstack_limit(&self) -> usize;
fn gas_extcode(&self) -> Gas;
fn gas_balance(&self) -> Gas;
fn gas_sload(&self) -> Gas;
fn gas_suicide(&self) -> Gas;
fn gas_suicide_new_account(&self) -> Gas;
fn gas_call(&self) -> Gas;
fn gas_expbyte(&self) -> Gas;
fn gas_transaction_create(&self) -> Gas;
fn force_code_deposit(&self) -> bool;
fn has_delegate_call(&self) -> bool;
fn has_static_call(&self) -> bool;
fn has_revert(&self) -> bool;
fn has_return_data(&self) -> bool;
fn has_bitwise_shift(&self) -> bool;
fn has_create2(&self) -> bool;
fn has_extcodehash(&self) -> bool;
fn has_reduced_sstore_gas_metering(&self) -> bool;
fn err_on_call_with_more_gas(&self) -> bool;
fn call_create_l64_after_gas(&self) -> bool;
fn memory_limit(&self) -> usize;
fn is_precompiled_contract_enabled(&self, address: &H160) -> bool;
fn precompileds(&self) -> &[(H160, Option<&[u8]>, &dyn Precompiled)]; }

Represents different block range context.

Associated Types

type Account: AccountPatch

Account patch

Loading content...

Required methods

fn account_patch(&self) -> &Self::Account

Get account patch

fn code_deposit_limit(&self) -> Option<usize>

Maximum contract size.

fn callstack_limit(&self) -> usize

Limit of the call stack.

fn gas_extcode(&self) -> Gas

Gas paid for extcode.

fn gas_balance(&self) -> Gas

Gas paid for BALANCE opcode.

fn gas_sload(&self) -> Gas

Gas paid for SLOAD opcode.

fn gas_suicide(&self) -> Gas

Gas paid for SUICIDE opcode.

fn gas_suicide_new_account(&self) -> Gas

Gas paid for SUICIDE opcode when it hits a new account.

fn gas_call(&self) -> Gas

Gas paid for CALL opcode.

fn gas_expbyte(&self) -> Gas

Gas paid for EXP opcode for every byte.

fn gas_transaction_create(&self) -> Gas

Gas paid for a contract creation transaction.

fn force_code_deposit(&self) -> bool

Whether to force code deposit even if it does not have enough gas.

fn has_delegate_call(&self) -> bool

Whether the EVM has DELEGATECALL opcode.

fn has_static_call(&self) -> bool

Whether the EVM has STATICCALL opcode.

fn has_revert(&self) -> bool

Whether the EVM has REVERT opcode.

fn has_return_data(&self) -> bool

Whether the EVM has RETURNDATASIZE and RETURNDATACOPY opcode.

fn has_bitwise_shift(&self) -> bool

Whether the EVM has SHL, SHR and SAR

fn has_create2(&self) -> bool

Whether the EVM has CREATE2

fn has_extcodehash(&self) -> bool

Whether the EVM has EXTCODEHASH

fn has_reduced_sstore_gas_metering(&self) -> bool

Whether EVM should implement the EIP1283 gas metering scheme for SSTORE opcode

fn err_on_call_with_more_gas(&self) -> bool

Whether to throw out of gas error when CALL/CALLCODE/DELEGATECALL requires more than maximum amount of gas.

fn call_create_l64_after_gas(&self) -> bool

If true, only consume at maximum l64(after_gas) when CALL/CALLCODE/DELEGATECALL.

fn memory_limit(&self) -> usize

Maximum size of the memory, in bytes. NOTE: NOT runtime-configurable by block number

fn is_precompiled_contract_enabled(&self, address: &H160) -> bool

Check if the precompiled contract enabled

fn precompileds(&self) -> &[(H160, Option<&[u8]>, &dyn Precompiled)]

Precompiled contracts at given address, with required code, and its definition.

Loading content...

Implementations on Foreign Types

impl Patch for VMTestPatch[src]

impl Patch for EmbeddedPatch[src]

Loading content...

Implementors

Loading content...