22
22
a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 = accounts [:10 ]
23
23
24
24
base_alloc = {}
25
+ minimal_alloc = {}
25
26
for a in accounts :
26
27
base_alloc [a ] = {'balance' : 10 ** 18 }
27
- for i in range (16 ):
28
+ for i in range (8 ):
28
29
base_alloc [int_to_addr (i )] = {'balance' : 1 }
30
+ minimal_alloc [int_to_addr (i )] = {'balance' : 1 }
31
+ minimal_alloc [accounts [0 ]] = {'balance' : 10 ** 18 }
29
32
30
33
# Initialize languages
31
34
languages = {}
@@ -190,7 +193,7 @@ def mk_state_test_prefill(c):
190
193
pre = c .head_state .to_dict ()
191
194
return {"env" : env , "pre" : pre }
192
195
193
- def mk_state_test_postfill (c , prefill ):
196
+ def mk_state_test_postfill (c , prefill , filler_mode = False ):
194
197
txdata = c .last_tx .to_dict ()
195
198
modified_tx_data = {
196
199
"data" : [ txdata ["data" ] ],
@@ -213,9 +216,13 @@ def mk_state_test_postfill(c, prefill):
213
216
config = 'Metropolis'
214
217
else :
215
218
raise Exception ("Cannot get config" )
216
- return {
219
+ o = {
217
220
"env" : prefill ["env" ],
218
221
"pre" : prefill ["pre" ],
219
222
"transaction" : modified_tx_data ,
220
- "post" : {config : [ { "hash" : postStateHash , "indexes" : {"data" : 0 , "gas" : 0 , "value" : 0 } } ] }
221
223
}
224
+ if not filler_mode :
225
+ o ["post" ] = {config : [ { "hash" : postStateHash , "indexes" : {"data" : 0 , "gas" : 0 , "value" : 0 } } ] }
226
+ else :
227
+ o ["expect" ] = [ {"indexes" : {"data" : 0 , "gas" : 0 , "value" : 0 }, "network" : ["Metropolis" ], "result" : c .head_state .to_dict () } ]
228
+ return o
0 commit comments