Skip to main content

Module gas

Module gas 

Source
Expand description

Gas counter: a non-negative u64 representing remaining budget.

The execution engine decrements the counter per instruction (or per ecall, etc.) and reports ExitReason::OutOfGas when it would go negative. The actual gas-per-instruction cost table lives at a higher layer (v3 spec: per-instruction debit happens against the active Instance’s gas slot’s meter; the engine just receives a single counter to decrement).

Structs§

GasCounter
Mutable gas counter with structured charge / check semantics.
OutOfGas
Sentinel returned by GasCounter::charge on exhaustion.

Type Aliases§

Gas
Gas type: u64 remaining budget.