Skip to content

Commit fe6e507

Browse files
committed
Clarify calldata cost calculation for InitcodeTransactions
1 parent 7bc77d8 commit fe6e507

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spec/eof.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ For these reasons, define cost of `initcodes` bytes same as calldata: formula fo
121121
STANDARD_TOKEN_COST = 4
122122
TOTAL_COST_FLOOR_PER_TOKEN = 10
123123

124-
tokens_in_initcodes = zero_bytes_in_initcodes + nonzero_bytes_in_initcodes * 4
124+
tokens_in_initcodes = 0
125+
for initcode in initcodes:
126+
tokens_in_initcodes += zero_bytes_in_initcode + nonzero_bytes_in_initcode * 4
125127
tx.gasUsed = (
126128
21000
127129
+

0 commit comments

Comments
 (0)