Enum evm_gasometer::GasCost[][src]

pub enum GasCost {
Show 23 variants Zero, Base, VeryLow, Low, Invalid, ExtCodeSize { target_is_cold: bool, }, Balance { target_is_cold: bool, }, BlockHash, ExtCodeHash { target_is_cold: bool, }, Call { value: U256, gas: U256, target_is_cold: bool, target_exists: bool, }, CallCode { value: U256, gas: U256, target_is_cold: bool, target_exists: bool, }, DelegateCall { gas: U256, target_is_cold: bool, target_exists: bool, }, StaticCall { gas: U256, target_is_cold: bool, target_exists: bool, }, Suicide { value: U256, target_is_cold: bool, target_exists: bool, already_removed: bool, }, SStore { original: H256, current: H256, new: H256, target_is_cold: bool, }, Sha3 { len: U256, }, Log { n: u8, len: U256, }, ExtCodeCopy { target_is_cold: bool, len: U256, }, VeryLowCopy { len: U256, }, Exp { power: U256, }, Create, Create2 { len: U256, }, SLoad { target_is_cold: bool, },
}
Expand description

Gas cost.

Variants

Zero

Zero gas cost.

Base

Base gas cost.

VeryLow

Very low gas cost.

Low

Low gas cost.

Invalid

Fail the gasometer.

ExtCodeSize

Gas cost for EXTCODESIZE.

Fields of ExtCodeSize

target_is_cold: bool

True if address has not been previously accessed in this transaction

Balance

Gas cost for BALANCE.

Fields of Balance

target_is_cold: bool

True if address has not been previously accessed in this transaction

BlockHash

Gas cost for BLOCKHASH.

ExtCodeHash

Gas cost for EXTBLOCKHASH.

Fields of ExtCodeHash

target_is_cold: bool

True if address has not been previously accessed in this transaction

Call

Gas cost for CALL.

Fields of Call

value: U256

Call value.

gas: U256

Call gas.

target_is_cold: bool

True if target has not been previously accessed in this transaction

target_exists: bool

Whether the target exists.

CallCode

Gas cost for `CALLCODE.

Fields of CallCode

value: U256

Call value.

gas: U256

Call gas.

target_is_cold: bool

True if target has not been previously accessed in this transaction

target_exists: bool

Whether the target exists.

DelegateCall

Gas cost for DELEGATECALL.

Fields of DelegateCall

gas: U256

Call gas.

target_is_cold: bool

True if target has not been previously accessed in this transaction

target_exists: bool

Whether the target exists.

StaticCall

Gas cost for STATICCALL.

Fields of StaticCall

gas: U256

Call gas.

target_is_cold: bool

True if target has not been previously accessed in this transaction

target_exists: bool

Whether the target exists.

Suicide

Gas cost for SUICIDE.

Fields of Suicide

value: U256

Value.

target_is_cold: bool

True if target has not been previously accessed in this transaction

target_exists: bool

Whether the target exists.

already_removed: bool

Whether the target has already been removed.

SStore

Gas cost for SSTORE.

Fields of SStore

original: H256

Original value.

current: H256

Current value.

new: H256

New value.

target_is_cold: bool

True if target has not been previously accessed in this transaction

Sha3

Gas cost for SHA3.

Fields of Sha3

len: U256

Length of the data.

Log

Gas cost for LOG.

Fields of Log

n: u8

Topic length.

len: U256

Data length.

ExtCodeCopy

Gas cost for EXTCODECOPY.

Fields of ExtCodeCopy

target_is_cold: bool

True if target has not been previously accessed in this transaction

len: U256

Length.

VeryLowCopy

Gas cost for some copy opcodes that is documented as VERYLOW.

Fields of VeryLowCopy

len: U256

Length.

Exp

Gas cost for EXP.

Fields of Exp

power: U256

Power of EXP.

Create

Gas cost for CREATE.

Create2

Gas cost for CREATE2.

Fields of Create2

len: U256

Length.

SLoad

Gas cost for SLOAD.

Fields of SLoad

target_is_cold: bool

True if target has not been previously accessed in this transaction

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.