Add initial gas cost for CREATE

This commit is contained in:
coffeepots 2018-11-08 15:47:48 +00:00
parent 7ba1cfaf13
commit 6b1e989ff0
1 changed files with 3 additions and 1 deletions

View File

@ -168,7 +168,9 @@ template gasCosts(FeeSchedule: GasFeeSchedule, prefix, ResultGasCostsName: untyp
result += static(FeeSchedule[GasExpByte]) * (1 + log256(value)) result += static(FeeSchedule[GasExpByte]) * (1 + log256(value))
func `prefix gasCreate`(currentMemSize, memOffset, memLength: Natural): GasInt {.nimcall.} = func `prefix gasCreate`(currentMemSize, memOffset, memLength: Natural): GasInt {.nimcall.} =
result = static(FeeSchedule[GasCodeDeposit]) * memLength result =
static(FeeSchedule[GasCreate]) +
static(FeeSchedule[GasCodeDeposit]) * memLength
func `prefix gasSha3`(currentMemSize, memOffset, memLength: Natural): GasInt {.nimcall.} = func `prefix gasSha3`(currentMemSize, memOffset, memLength: Natural): GasInt {.nimcall.} =