Skip to content

Commit f55fa52

Browse files
committed
refactor: correct GAS_OPCODE_DUP_N to GAS_OPCODE_DUP
1 parent 570e2f7 commit f55fa52

50 files changed

Lines changed: 51 additions & 51 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/testing/src/execution_testing/forks/forks/forks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def gas_costs(
238238
GAS_OPCODE_MSTORE=GAS_VERY_LOW,
239239
GAS_OPCODE_MSTORE8=GAS_VERY_LOW,
240240
GAS_OPCODE_PUSH_N=GAS_VERY_LOW,
241-
GAS_OPCODE_DUP_N=GAS_VERY_LOW,
241+
GAS_OPCODE_DUP=GAS_VERY_LOW,
242242
GAS_OPCODE_SWAP_N=GAS_VERY_LOW,
243243
)
244244

@@ -483,7 +483,7 @@ def opcode_gas_map(
483483
},
484484
# Dup operations (DUP1 through DUP16)
485485
**{
486-
getattr(Opcodes, f"DUP{i}"): gas_costs.GAS_OPCODE_DUP_N
486+
getattr(Opcodes, f"DUP{i}"): gas_costs.GAS_OPCODE_DUP
487487
for i in range(1, 17)
488488
},
489489
# Swap operations (SWAP1 through SWAP16)

packages/testing/src/execution_testing/forks/gas_costs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class GasCosts:
129129
GAS_OPCODE_MSTORE: int
130130
GAS_OPCODE_MSTORE8: int
131131
GAS_OPCODE_PUSH_N: int
132-
GAS_OPCODE_DUP_N: int
132+
GAS_OPCODE_DUP: int
133133
GAS_OPCODE_SWAP_N: int
134134

135135
# Defined post-Frontier

src/ethereum/forks/amsterdam/vm/gas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
GAS_OPCODE_MSTORE8 = GAS_VERY_LOW
125125
GAS_OPCODE_MCOPY = GAS_VERY_LOW
126126
GAS_OPCODE_PUSH_N = GAS_VERY_LOW
127-
GAS_OPCODE_DUP_N = GAS_VERY_LOW
127+
GAS_OPCODE_DUP = GAS_VERY_LOW
128128
GAS_OPCODE_SWAP_N = GAS_VERY_LOW
129129

130130

src/ethereum/forks/amsterdam/vm/instructions/stack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def dup_n(evm: Evm, item_number: int) -> None:
9898
pass
9999

100100
# GAS
101-
charge_gas(evm, gas.GAS_OPCODE_DUP_N)
101+
charge_gas(evm, gas.GAS_OPCODE_DUP)
102102
if item_number >= len(evm.stack):
103103
raise StackUnderflowError
104104
data_to_duplicate = evm.stack[len(evm.stack) - 1 - item_number]

src/ethereum/forks/arrow_glacier/vm/gas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
GAS_OPCODE_MSTORE = GAS_VERY_LOW
100100
GAS_OPCODE_MSTORE8 = GAS_VERY_LOW
101101
GAS_OPCODE_PUSH_N = GAS_VERY_LOW
102-
GAS_OPCODE_DUP_N = GAS_VERY_LOW
102+
GAS_OPCODE_DUP = GAS_VERY_LOW
103103
GAS_OPCODE_SWAP_N = GAS_VERY_LOW
104104

105105

src/ethereum/forks/arrow_glacier/vm/instructions/stack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def dup_n(evm: Evm, item_number: int) -> None:
9595
pass
9696

9797
# GAS
98-
charge_gas(evm, gas.GAS_OPCODE_DUP_N)
98+
charge_gas(evm, gas.GAS_OPCODE_DUP)
9999
if item_number >= len(evm.stack):
100100
raise StackUnderflowError
101101
data_to_duplicate = evm.stack[len(evm.stack) - 1 - item_number]

src/ethereum/forks/berlin/vm/gas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
GAS_OPCODE_MSTORE = GAS_VERY_LOW
101101
GAS_OPCODE_MSTORE8 = GAS_VERY_LOW
102102
GAS_OPCODE_PUSH_N = GAS_VERY_LOW
103-
GAS_OPCODE_DUP_N = GAS_VERY_LOW
103+
GAS_OPCODE_DUP = GAS_VERY_LOW
104104
GAS_OPCODE_SWAP_N = GAS_VERY_LOW
105105

106106

src/ethereum/forks/berlin/vm/instructions/stack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def dup_n(evm: Evm, item_number: int) -> None:
9595
pass
9696

9797
# GAS
98-
charge_gas(evm, gas.GAS_OPCODE_DUP_N)
98+
charge_gas(evm, gas.GAS_OPCODE_DUP)
9999
if item_number >= len(evm.stack):
100100
raise StackUnderflowError
101101
data_to_duplicate = evm.stack[len(evm.stack) - 1 - item_number]

src/ethereum/forks/bpo1/vm/gas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
GAS_OPCODE_MSTORE8 = GAS_VERY_LOW
122122
GAS_OPCODE_MCOPY = GAS_VERY_LOW
123123
GAS_OPCODE_PUSH_N = GAS_VERY_LOW
124-
GAS_OPCODE_DUP_N = GAS_VERY_LOW
124+
GAS_OPCODE_DUP = GAS_VERY_LOW
125125
GAS_OPCODE_SWAP_N = GAS_VERY_LOW
126126

127127

src/ethereum/forks/bpo1/vm/instructions/stack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def dup_n(evm: Evm, item_number: int) -> None:
9898
pass
9999

100100
# GAS
101-
charge_gas(evm, gas.GAS_OPCODE_DUP_N)
101+
charge_gas(evm, gas.GAS_OPCODE_DUP)
102102
if item_number >= len(evm.stack):
103103
raise StackUnderflowError
104104
data_to_duplicate = evm.stack[len(evm.stack) - 1 - item_number]

0 commit comments

Comments
 (0)