File tree 3 files changed +50
-0
lines changed
3 files changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ import copy
2
+
3
+ from eth_utils .toolz import merge
4
+
5
+ from eth import constants
6
+ from eth .vm import (
7
+ mnemonics ,
8
+ opcode_values ,
9
+ )
10
+ from eth .vm .opcode import as_opcode
11
+ from eth .vm .forks .istanbul .opcodes import ISTANBUL_OPCODES
12
+
13
+
14
+ UPDATED_OPCODES = {
15
+ opcode_values .BEGINSUB : as_opcode (
16
+ logic_fn = ...,
17
+ mnemonic = mnemonics .BEGINSUB ,
18
+ gas_cost = constants .GAS_BASE ,
19
+ ),
20
+ opcode_values .JUMPSUB : as_opcode (
21
+ logic_fn = ...,
22
+ mnemonic = mnemonics .JUMPSUB ,
23
+ gas_cost = constants .GAS_MID ,
24
+ ),
25
+ opcode_values .ENDSUB : as_opcode (
26
+ logic_fn = ...,
27
+ mnemonic = mnemonics .ENDSUB ,
28
+ gas_cost = constants .GAS_VERYLOW ,
29
+ ),
30
+ }
31
+
32
+
33
+ BERLIN_OPCODES = merge (
34
+ copy .deepcopy (ISTANBUL_OPCODES ),
35
+ UPDATED_OPCODES ,
36
+ )
Original file line number Diff line number Diff line change 162
162
LOG3 = 'LOG3'
163
163
LOG4 = 'LOG4'
164
164
#
165
+ # Subroutines
166
+ #
167
+ BEGINSUB = 'BEGINSUB'
168
+ JUMPSUB = 'JUMPSUB'
169
+ ENDSUB = 'ENDSUB'
170
+ #
165
171
# System
166
172
#
167
173
CREATE = 'CREATE'
Original file line number Diff line number Diff line change 182
182
LOG4 = 0xa4
183
183
184
184
185
+ #
186
+ # Subroutines
187
+ #
188
+ BEGINSUB = 0xb2
189
+ JUMPSUB = 0xb3
190
+ ENDSUB = 0xb7
191
+
192
+
185
193
#
186
194
# System
187
195
#
You can’t perform that action at this time.
0 commit comments