diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-08-09 06:13:28 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-09-18 21:47:53 +0800 |
commit | 0b68d093b45b71bf976f8cf37a6b917aa29ac4e3 (patch) | |
tree | 958526e30f790578847c5500235262c7a6efe010 /libevmasm/GasMeter.h | |
parent | 47b8d998d13ad7365a897fc52496bf5fa1222040 (diff) | |
download | dexon-solidity-0b68d093b45b71bf976f8cf37a6b917aa29ac4e3.tar.gz dexon-solidity-0b68d093b45b71bf976f8cf37a6b917aa29ac4e3.tar.zst dexon-solidity-0b68d093b45b71bf976f8cf37a6b917aa29ac4e3.zip |
Move dataGas calculation helper to GasMeter
Diffstat (limited to 'libevmasm/GasMeter.h')
-rw-r--r-- | libevmasm/GasMeter.h | 3 |
1 files changed, 3 insertions, 0 deletions
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); |