Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
gas_tracker.hpp
Go to the documentation of this file.
1#pragma once
2
11
12namespace bb::avm2::simulation {
13
14class GasTracker final : public GasTrackerInterface {
15 public:
21
22 void consume_gas(const Gas& dynamic_gas_factor = { 0, 0 }) override;
23 Gas compute_gas_limit_for_call(const Gas& allocated_gas) override;
24
25 private:
30};
31
32} // namespace bb::avm2::simulation
Gas compute_gas_limit_for_call(const Gas &allocated_gas) override
Computes the gas limit for a call (CALL and STATICCALL opcodes) as the minimum between the gas alloca...
GreaterThanInterface & greater_than
const ExecInstructionSpec & spec
void consume_gas(const Gas &dynamic_gas_factor={ 0, 0 }) override
Consumes gas for the current instruction.
InstructionInfoDB instruction_info_db
Instruction instruction