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.
Balance
Gas cost for BALANCE.
BlockHash
Gas cost for BLOCKHASH.
ExtCodeHash
Gas cost for EXTBLOCKHASH.
Call
Gas cost for CALL.
Fields
CallCode
Gas cost for `CALLCODE.
Fields
DelegateCall
Gas cost for DELEGATECALL.
Fields
StaticCall
Gas cost for STATICCALL.
Fields
Suicide
Gas cost for SUICIDE.
Fields
SStore
Gas cost for SSTORE.
Fields
Sha3
Gas cost for SHA3.
Log
Gas cost for LOG.
ExtCodeCopy
Gas cost for EXTCODECOPY.
Fields
VeryLowCopy
Gas cost for some copy opcodes that is documented as VERYLOW.
Exp
Gas cost for EXP.
Create
Gas cost for CREATE.
Create2
Gas cost for CREATE2.
SLoad
Gas cost for SLOAD.
TLoad
Gas cost for TLOAD.
TStore
Gas cost for TSTORE.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GasCost
impl RefUnwindSafe for GasCost
impl Send for GasCost
impl Sync for GasCost
impl Unpin for GasCost
impl UnwindSafe for GasCost
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more