Enum evm_gasometer::GasCost
source · 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
Gas cost for EXTCODESIZE
.
Balance
Gas cost for BALANCE
.
BlockHash
Gas cost for BLOCKHASH
.
ExtCodeHash
Gas cost for EXTBLOCKHASH
.
Call
Fields
Gas cost for CALL
.
CallCode
Fields
Gas cost for `CALLCODE.
DelegateCall
Fields
Gas cost for DELEGATECALL
.
StaticCall
Fields
Gas cost for STATICCALL
.
Suicide
Fields
Gas cost for SUICIDE
.
SStore
Fields
Gas cost for SSTORE
.
Sha3
Gas cost for SHA3
.
Log
Gas cost for LOG
.
ExtCodeCopy
Fields
Gas cost for EXTCODECOPY
.
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
.
Trait Implementations§
Auto Trait Implementations§
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