pub enum GasCost {
Show 23 variants Zero, Base, VeryLow, Low, Invalid(Opcode), 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(Opcode)

Fail the gasometer.

§

ExtCodeSize

Fields

§target_is_cold: bool

True if address has not been previously accessed in this transaction

Gas cost for EXTCODESIZE.

§

Balance

Fields

§target_is_cold: bool

True if address has not been previously accessed in this transaction

Gas cost for BALANCE.

§

BlockHash

Gas cost for BLOCKHASH.

§

ExtCodeHash

Fields

§target_is_cold: bool

True if address has not been previously accessed in this transaction

Gas cost for EXTBLOCKHASH.

§

Call

Fields

§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.

Gas cost for CALL.

§

CallCode

Fields

§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.

Gas cost for `CALLCODE.

§

DelegateCall

Fields

§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.

Gas cost for DELEGATECALL.

§

StaticCall

Fields

§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.

Gas cost for STATICCALL.

§

Suicide

Fields

§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.

Gas cost for SUICIDE.

§

SStore

Fields

§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

Gas cost for SSTORE.

§

Sha3

Fields

§len: U256

Length of the data.

Gas cost for SHA3.

§

Log

Fields

§n: u8

Topic length.

§len: U256

Data length.

Gas cost for LOG.

§

ExtCodeCopy

Fields

§target_is_cold: bool

True if target has not been previously accessed in this transaction

§len: U256

Length.

Gas cost for EXTCODECOPY.

§

VeryLowCopy

Fields

§len: U256

Length.

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

§

Exp

Fields

§power: U256

Power of EXP.

Gas cost for EXP.

§

Create

Gas cost for CREATE.

§

Create2

Fields

§len: U256

Length.

Gas cost for CREATE2.

§

SLoad

Fields

§target_is_cold: bool

True if target has not been previously accessed in this transaction

Gas cost for SLOAD.

Trait Implementations§

source§

impl Clone for GasCost

source§

fn clone(&self) -> GasCost

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GasCost

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for GasCost

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V