aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm/PathGasMeter.h
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-09-18 23:16:21 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-09-26 21:25:40 +0800
commitd64be90497bd9cb519d7146f49e6861fee060383 (patch)
treef131f50a92014ca051191ebbb55c5e43a3c81319 /libevmasm/PathGasMeter.h
parent9be058eb70be20d379d48a8902d112ba491aae2d (diff)
downloaddexon-solidity-d64be90497bd9cb519d7146f49e6861fee060383.tar.gz
dexon-solidity-d64be90497bd9cb519d7146f49e6861fee060383.tar.zst
dexon-solidity-d64be90497bd9cb519d7146f49e6861fee060383.zip
Add PathGasMeter.estimateMax helper
Diffstat (limited to 'libevmasm/PathGasMeter.h')
-rw-r--r--libevmasm/PathGasMeter.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libevmasm/PathGasMeter.h b/libevmasm/PathGasMeter.h
index 9537b176..fb821684 100644
--- a/libevmasm/PathGasMeter.h
+++ b/libevmasm/PathGasMeter.h
@@ -57,6 +57,16 @@ public:
GasMeter::GasConsumption estimateMax(size_t _startIndex, std::shared_ptr<KnownState> const& _state);
+ static GasMeter::GasConsumption estimateMax(
+ AssemblyItems const& _items,
+ solidity::EVMVersion _evmVersion,
+ size_t _startIndex,
+ std::shared_ptr<KnownState> const& _state
+ )
+ {
+ return PathGasMeter(_items, _evmVersion).estimateMax(_startIndex, _state);
+ }
+
private:
/// Adds a new path item to the queue, but only if we do not already have
/// a higher gas usage at that point.