Expand description
Gas calculation utilities.
Macros§
- tri 🔒
const
Option?
.
Structs§
- Gas
- Represents the state of gas during execution.
- Initial
AndFloor Gas - Init and floor gas from transaction
Constants§
- ACCESS_
LIST_ ADDRESS - ACCESS_
LIST_ STORAGE_ KEY - BASE
- BLOCKHASH
- CALLVALUE
- CALL_
STIPEND - CODEDEPOSIT
- COLD_
ACCOUNT_ ACCESS_ COST - COLD_
SLOAD_ COST - CONDITION_
JUMP_ GAS - COPY
- CREATE
- DATA_
LOADN_ GAS - DATA_
LOAD_ GAS - EOF_
CREATE_ GAS - EXP
- HIGH
- INITCODE_
WORD_ COST - EIP-3860 : Limit and meter initcode
- INSTANBUL_
SLOAD_ GAS - EIP-1884: Repricing for trie-size-dependent opcodes
- JUMPDEST
- KECCA
K256 - KECCA
K256WORD - LOG
- LOGDATA
- LOGTOPIC
- LOW
- MEMORY
- MID
- MIN_
CALLEE_ GAS - NEWACCOUNT
- NON_
ZERO_ BYTE_ DATA_ COST - The cost of a non-zero byte in calldata.
- NON_
ZERO_ BYTE_ DATA_ COST_ ISTANBUL - The cost of a non-zero byte in calldata adjusted by EIP-2028.
- NON_
ZERO_ BYTE_ MULTIPLIER - The multiplier for a non zero byte in calldata.
- NON_
ZERO_ BYTE_ MULTIPLIER_ ISTANBUL - The multiplier for a non zero byte in calldata adjusted by EIP-2028.
- REFUND_
SSTORE_ CLEARS - RETF_
GAS - SELFDESTRUCT
- SSTORE_
RESET - SSTORE_
SET - STANDARD_
TOKEN_ COST - The standard cost of calldata token.
- TOTAL_
COST_ FLOOR_ PER_ TOKEN - VERYLOW
- WARM_
SSTORE_ RESET - WARM_
STORAGE_ READ_ COST - ZERO
Functions§
- calc_
tx_ floor_ cost - Calculate the transaction cost floor as specified in EIP-7623.
- calculate_
initial_ tx_ gas - Initial gas that is deducted for transaction to be included. Initial gas contains initial stipend gas, gas for access list and input data.
- call_
cost - Calculate call gas cost for the call instruction.
- cost_
per_ word - Calculate the cost of buffer per word.
- create2_
cost CREATE2
opcode cost calculation.- dyn_
exp_ cost EXP
opcode cost calculation.- dyn_
keccak256_ cost KECCAK256
opcode cost calculation.- dyn_
log_ cost LOG
opcode cost calculation.- dyn_
verylowcopy_ cost *COPY
opcodes cost calculation.- exp_
cost EXP
opcode cost calculation.- extcodecopy_
cost EXTCODECOPY
opcode cost calculation.- get_
tokens_ in_ calldata - Retrieve the total number of tokens in calldata.
- initcode_
cost - EIP-3860: Limit and meter initcode
- keccak256_
cost KECCAK256
opcode cost calculation.- log_
cost LOG
opcode cost calculation.- memory_
gas - Memory expansion cost calculation for a given number of words.
- memory_
gas_ for_ len - Memory expansion cost calculation for a given memory length.
- selfdestruct_
cost SELFDESTRUCT
opcode cost calculation.- sload_
cost SLOAD
opcode cost calculation.- sstore_
cost SSTORE
opcode cost calculation.- sstore_
refund SSTORE
opcode refund calculation.- verylowcopy_
cost *COPY
opcodes cost calculation.- warm_
cold_ cost - Berlin warm and cold storage access cost for account access.
- warm_
cold_ cost_ with_ delegation - Berlin warm and cold storage access cost for account access.