mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #5113 from ethereum/compilerstack-datagas
Use GasEstimator::dataGas in CompilerStack
This commit is contained in:
commit
5ae32b24a6
@ -988,8 +988,7 @@ Json::Value CompilerStack::gasEstimates(string const& _contractName) const
|
||||
if (eth::AssemblyItems const* items = assemblyItems(_contractName))
|
||||
{
|
||||
Gas executionGas = gasEstimator.functionalEstimation(*items);
|
||||
u256 bytecodeSize(runtimeObject(_contractName).bytecode.size());
|
||||
Gas codeDepositGas = bytecodeSize * eth::GasCosts::createDataGas;
|
||||
Gas codeDepositGas{eth::GasMeter::dataGas(runtimeObject(_contractName).bytecode, false)};
|
||||
|
||||
Json::Value creation(Json::objectValue);
|
||||
creation["codeDepositCost"] = gasToJson(codeDepositGas);
|
||||
|
Loading…
Reference in New Issue
Block a user