|
37 | 37 | calculate_blob_gas_price, |
38 | 38 | calculate_gas_extend_memory, |
39 | 39 | charge_gas, |
40 | | - check_gas, |
41 | 40 | ) |
42 | 41 | from ..stack import pop, push |
43 | 42 |
|
@@ -81,9 +80,9 @@ def balance(evm: Evm) -> None: |
81 | 80 | # GAS |
82 | 81 | is_cold_access = address not in evm.accessed_addresses |
83 | 82 | gas_cost = GAS_COLD_ACCOUNT_ACCESS if is_cold_access else GAS_WARM_ACCESS |
84 | | - check_gas(evm, gas_cost) |
85 | 83 | if is_cold_access: |
86 | 84 | evm.accessed_addresses.add(address) |
| 85 | + |
87 | 86 | charge_gas(evm, gas_cost) |
88 | 87 |
|
89 | 88 | # OPERATION |
@@ -351,9 +350,9 @@ def extcodesize(evm: Evm) -> None: |
351 | 350 | access_gas_cost = ( |
352 | 351 | GAS_COLD_ACCOUNT_ACCESS if is_cold_access else GAS_WARM_ACCESS |
353 | 352 | ) |
354 | | - check_gas(evm, access_gas_cost) |
355 | 353 | if is_cold_access: |
356 | 354 | evm.accessed_addresses.add(address) |
| 355 | + |
357 | 356 | charge_gas(evm, access_gas_cost) |
358 | 357 |
|
359 | 358 | # OPERATION |
@@ -397,9 +396,9 @@ def extcodecopy(evm: Evm) -> None: |
397 | 396 | ) |
398 | 397 | total_gas_cost = access_gas_cost + copy_gas_cost + extend_memory.cost |
399 | 398 |
|
400 | | - check_gas(evm, total_gas_cost) |
401 | 399 | if is_cold_access: |
402 | 400 | evm.accessed_addresses.add(address) |
| 401 | + |
403 | 402 | charge_gas(evm, total_gas_cost) |
404 | 403 |
|
405 | 404 | # OPERATION |
@@ -491,9 +490,9 @@ def extcodehash(evm: Evm) -> None: |
491 | 490 | access_gas_cost = ( |
492 | 491 | GAS_COLD_ACCOUNT_ACCESS if is_cold_access else GAS_WARM_ACCESS |
493 | 492 | ) |
494 | | - check_gas(evm, access_gas_cost) |
495 | 493 | if is_cold_access: |
496 | 494 | evm.accessed_addresses.add(address) |
| 495 | + |
497 | 496 | charge_gas(evm, access_gas_cost) |
498 | 497 |
|
499 | 498 | # OPERATION |
|
0 commit comments