GasCost

Enum GasCost 

Source
pub enum GasCost {
Show 25 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, }, TLoad, TStore,
}
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

Gas cost for EXTCODESIZE.

Fields

§target_is_cold: bool

True if address has not been previously accessed in this transaction

§

Balance

Gas cost for BALANCE.

Fields

§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

§target_is_cold: bool

True if address has not been previously accessed in this transaction

§

Call

Gas cost for 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.

§

CallCode

Gas cost for `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.

§

DelegateCall

Gas cost for 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.

§

StaticCall

Gas cost for 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.

§

Suicide

Gas cost for 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.

§

SStore

Gas cost for 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

§

Sha3

Gas cost for SHA3.

Fields

§len: U256

Length of the data.

§

Log

Gas cost for LOG.

Fields

§n: u8

Topic length.

§len: U256

Data length.

§

ExtCodeCopy

Gas cost for EXTCODECOPY.

Fields

§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

§len: U256

Length.

§

Exp

Gas cost for EXP.

Fields

§power: U256

Power of EXP.

§

Create

Gas cost for CREATE.

§

Create2

Gas cost for CREATE2.

Fields

§len: U256

Length.

§

SLoad

Gas cost for SLOAD.

Fields

§target_is_cold: bool

True if target has not been previously accessed in this transaction

§

TLoad

Gas cost for TLOAD.

§

TStore

Gas cost for TSTORE.

Trait Implementations§

Source§

impl Clone for GasCost

Source§

fn clone(&self) -> GasCost

Returns a duplicate 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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

Source§

type Output = T

Should always be Self
Source§

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

Source§

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>,

Source§

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>,

Source§

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

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

Source§

fn vzip(self) -> V