aboutsummaryrefslogtreecommitdiffstats
path: root/GasEstimator.h
diff options
context:
space:
mode:
Diffstat (limited to 'GasEstimator.h')
-rw-r--r--GasEstimator.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/GasEstimator.h b/GasEstimator.h
index 32e95fac..4020d60b 100644
--- a/GasEstimator.h
+++ b/GasEstimator.h
@@ -65,6 +65,15 @@ public:
std::string const& _signature = ""
);
+ /// @returns the estimated gas consumption by the given function which starts at the given
+ /// offset into the list of assembly items.
+ /// @note this does not work correctly for recursive functions.
+ static GasConsumption functionalEstimation(
+ eth::AssemblyItems const& _items,
+ size_t const& _offset,
+ FunctionDefinition const& _function
+ );
+
private:
/// @returns the set of AST nodes which are the finest nodes at their location.
static std::set<ASTNode const*> finestNodesAtLocation(std::vector<ASTNode const*> const& _roots);