From 0b68d093b45b71bf976f8cf37a6b917aa29ac4e3 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 8 Aug 2018 23:13:28 +0100 Subject: Move dataGas calculation helper to GasMeter --- libevmasm/GasMeter.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libevmasm/GasMeter.h') diff --git a/libevmasm/GasMeter.h b/libevmasm/GasMeter.h index fc3740d2..7cb8015f 100644 --- a/libevmasm/GasMeter.h +++ b/libevmasm/GasMeter.h @@ -136,6 +136,9 @@ public: /// change with EVM versions) static unsigned runGas(Instruction _instruction); + /// @returns the gas cost of the supplied data, depending whether it is in creation code, or not. + static u256 dataGas(bytes const& _data, bool _inCreation); + private: /// @returns _multiplier * (_value + 31) / 32, if _value is a known constant and infinite otherwise. GasConsumption wordGas(u256 const& _multiplier, ExpressionClasses::Id _value); -- cgit v1.2.3