Trait sputnikvm::Patch
[−]
[src]
pub trait Patch { type Account: AccountPatch; fn callstack_limit() -> usize; fn gas_extcode() -> Gas; fn gas_balance() -> Gas; fn gas_sload() -> Gas; fn gas_suicide() -> Gas; fn gas_suicide_new_account() -> Gas; fn gas_call() -> Gas; fn gas_expbyte() -> Gas; fn gas_transaction_create() -> Gas; fn force_code_deposit() -> bool; fn has_delegate_call() -> bool; fn err_on_call_with_more_gas() -> bool; fn call_create_l64_after_gas() -> bool; fn memory_limit() -> usize; fn precompileds(
) -> &'static [(Address, Option<&'static [u8]>, &'static Precompiled)]; }
Represents different block range context.
Associated Types
type Account: AccountPatch
Account patch
Required Methods
fn callstack_limit() -> usize
Limit of the call stack.
fn gas_extcode() -> Gas
Gas paid for extcode.
fn gas_balance() -> Gas
Gas paid for BALANCE opcode.
fn gas_sload() -> Gas
Gas paid for SLOAD opcode.
fn gas_suicide() -> Gas
Gas paid for SUICIDE opcode.
fn gas_suicide_new_account() -> Gas
Gas paid for SUICIDE opcode when it hits a new account.
fn gas_call() -> Gas
Gas paid for CALL opcode.
fn gas_expbyte() -> Gas
Gas paid for EXP opcode for every byte.
fn gas_transaction_create() -> Gas
Gas paid for a contract creation transaction.
fn force_code_deposit() -> bool
Whether to force code deposit even if it does not have enough gas.
fn has_delegate_call() -> bool
Whether the EVM has DELEGATECALL opcode.
fn err_on_call_with_more_gas() -> 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() -> bool
If true, only consume at maximum l64(after_gas) when CALL/CALLCODE/DELEGATECALL.
fn memory_limit() -> usize
Maximum size of the memory, in bytes.
fn precompileds(
) -> &'static [(Address, Option<&'static [u8]>, &'static Precompiled)]
) -> &'static [(Address, Option<&'static [u8]>, &'static Precompiled)]
Precompiled contracts at given address, with required code, and its definition.
Implementors
impl<A: AccountPatch> Patch for FrontierPatch<A> type Account = A;
impl<A: AccountPatch> Patch for HomesteadPatch<A> type Account = A;
impl Patch for VMTestPatch type Account = MainnetAccountPatch;
impl<A: AccountPatch> Patch for EIP150Patch<A> type Account = A;
impl<A: AccountPatch> Patch for EIP160Patch<A> type Account = A;
impl<A: AccountPatch> Patch for EmbeddedPatch<A> type Account = A;