Skip to content

Commit 1c9af18

Browse files
committed
refactor: correct GAS_OPCODE_SWAP_N to GAS_OPCODE_SWAP
1 parent f55fa52 commit 1c9af18

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
@@ -239,7 +239,7 @@ def gas_costs(
239239
GAS_OPCODE_MSTORE8=GAS_VERY_LOW,
240240
GAS_OPCODE_PUSH_N=GAS_VERY_LOW,
241241
GAS_OPCODE_DUP=GAS_VERY_LOW,
242-
GAS_OPCODE_SWAP_N=GAS_VERY_LOW,
242+
GAS_OPCODE_SWAP=GAS_VERY_LOW,
243243
)
244244

245245
@classmethod
@@ -488,7 +488,7 @@ def opcode_gas_map(
488488
},
489489
# Swap operations (SWAP1 through SWAP16)
490490
**{
491-
getattr(Opcodes, f"SWAP{i}"): gas_costs.GAS_OPCODE_SWAP_N
491+
getattr(Opcodes, f"SWAP{i}"): gas_costs.GAS_OPCODE_SWAP
492492
for i in range(1, 17)
493493
},
494494
# Logging operations

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class GasCosts:
130130
GAS_OPCODE_MSTORE8: int
131131
GAS_OPCODE_PUSH_N: int
132132
GAS_OPCODE_DUP: int
133-
GAS_OPCODE_SWAP_N: int
133+
GAS_OPCODE_SWAP: int
134134

135135
# Defined post-Frontier
136136
GAS_OPCODE_SHL: int = 0

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
GAS_OPCODE_MCOPY = GAS_VERY_LOW
126126
GAS_OPCODE_PUSH_N = GAS_VERY_LOW
127127
GAS_OPCODE_DUP = GAS_VERY_LOW
128-
GAS_OPCODE_SWAP_N = GAS_VERY_LOW
128+
GAS_OPCODE_SWAP = GAS_VERY_LOW
129129

130130

131131
@dataclass

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def swap_n(evm: Evm, item_number: int) -> None:
130130
pass
131131

132132
# GAS
133-
charge_gas(evm, gas.GAS_OPCODE_SWAP_N)
133+
charge_gas(evm, gas.GAS_OPCODE_SWAP)
134134
if item_number >= len(evm.stack):
135135
raise StackUnderflowError
136136
evm.stack[-1], 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
@@ -100,7 +100,7 @@
100100
GAS_OPCODE_MSTORE8 = GAS_VERY_LOW
101101
GAS_OPCODE_PUSH_N = GAS_VERY_LOW
102102
GAS_OPCODE_DUP = GAS_VERY_LOW
103-
GAS_OPCODE_SWAP_N = GAS_VERY_LOW
103+
GAS_OPCODE_SWAP = GAS_VERY_LOW
104104

105105

106106
@dataclass

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def swap_n(evm: Evm, item_number: int) -> None:
127127
pass
128128

129129
# GAS
130-
charge_gas(evm, gas.GAS_OPCODE_SWAP_N)
130+
charge_gas(evm, gas.GAS_OPCODE_SWAP)
131131
if item_number >= len(evm.stack):
132132
raise StackUnderflowError
133133
evm.stack[-1], 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
@@ -101,7 +101,7 @@
101101
GAS_OPCODE_MSTORE8 = GAS_VERY_LOW
102102
GAS_OPCODE_PUSH_N = GAS_VERY_LOW
103103
GAS_OPCODE_DUP = GAS_VERY_LOW
104-
GAS_OPCODE_SWAP_N = GAS_VERY_LOW
104+
GAS_OPCODE_SWAP = GAS_VERY_LOW
105105

106106

107107
@dataclass

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def swap_n(evm: Evm, item_number: int) -> None:
127127
pass
128128

129129
# GAS
130-
charge_gas(evm, gas.GAS_OPCODE_SWAP_N)
130+
charge_gas(evm, gas.GAS_OPCODE_SWAP)
131131
if item_number >= len(evm.stack):
132132
raise StackUnderflowError
133133
evm.stack[-1], 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
@@ -122,7 +122,7 @@
122122
GAS_OPCODE_MCOPY = GAS_VERY_LOW
123123
GAS_OPCODE_PUSH_N = GAS_VERY_LOW
124124
GAS_OPCODE_DUP = GAS_VERY_LOW
125-
GAS_OPCODE_SWAP_N = GAS_VERY_LOW
125+
GAS_OPCODE_SWAP = GAS_VERY_LOW
126126

127127

128128
@dataclass

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def swap_n(evm: Evm, item_number: int) -> None:
130130
pass
131131

132132
# GAS
133-
charge_gas(evm, gas.GAS_OPCODE_SWAP_N)
133+
charge_gas(evm, gas.GAS_OPCODE_SWAP)
134134
if item_number >= len(evm.stack):
135135
raise StackUnderflowError
136136
evm.stack[-1], evm.stack[-1 - item_number] = (

0 commit comments

Comments
 (0)