Conversation
| { | ||
| Gas gas = GasEstimator::functionalEstimation(*items); | ||
| u256 bytecodeSize(m_compiler->runtimeObject(_contract).bytecode.size()); | ||
| u256 bytecodeSize(m_compiler->object(_contract).bytecode.size()); |
There was a problem hiding this comment.
I think this was correct. The part after the + is the costs of code deployment. The cost of the transaction is not visible here at all.
There was a problem hiding this comment.
The cost of the transaction is the cost of deployment. The creation code only does a return. Am I missing something?
There was a problem hiding this comment.
After the return, you still have to pay a fee that is linear with the code deposit size.
There was a problem hiding this comment.
True, found it in the YP:
If the initialization code completes successfully, a fi-
nal contract-creation cost is paid, the code-deposit cost,
c, proportional to the size of the created contract’s code:
(96) c ≡ Gcodedeposit × |o
codeDepositCost seems appropriate then to keep in line with the YP.
It should take the size of the creation code in consideration and not the deployed one.