Skip to content

Commit aefcb97

Browse files
committed
transaction tests and refund tests
1 parent ccbf120 commit aefcb97

File tree

4 files changed

+677
-148
lines changed

4 files changed

+677
-148
lines changed

StateTests/stRefundTest.json

Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,252 @@
1+
{
2+
"refund_NoOOG_1" : {
3+
"env" : {
4+
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
5+
"currentDifficulty" : "256",
6+
"currentGasLimit" : "1000000",
7+
"currentNumber" : "0",
8+
"currentTimestamp" : 1,
9+
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
10+
},
11+
"logs" : [
12+
],
13+
"out" : "0x",
14+
"post" : {
15+
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
16+
"balance" : "1000000000000000000",
17+
"code" : "0x6000600155",
18+
"nonce" : "0",
19+
"storage" : {
20+
}
21+
},
22+
"2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : {
23+
"balance" : "402",
24+
"code" : "0x",
25+
"nonce" : "0",
26+
"storage" : {
27+
}
28+
},
29+
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
30+
"balance" : "100",
31+
"code" : "0x",
32+
"nonce" : "1",
33+
"storage" : {
34+
}
35+
}
36+
},
37+
"pre" : {
38+
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
39+
"balance" : "1000000000000000000",
40+
"code" : "0x6000600155",
41+
"nonce" : "0",
42+
"storage" : {
43+
"0x01" : "0x01"
44+
}
45+
},
46+
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
47+
"balance" : "502",
48+
"code" : "0x",
49+
"nonce" : "0",
50+
"storage" : {
51+
}
52+
}
53+
},
54+
"transaction" : {
55+
"data" : "",
56+
"gasLimit" : "502",
57+
"gasPrice" : "1",
58+
"nonce" : "0",
59+
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
60+
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
61+
"value" : "0"
62+
}
63+
},
64+
"refund_OOG" : {
65+
"env" : {
66+
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
67+
"currentDifficulty" : "256",
68+
"currentGasLimit" : "1000000",
69+
"currentNumber" : "0",
70+
"currentTimestamp" : 1,
71+
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
72+
},
73+
"logs" : [
74+
],
75+
"out" : "0x",
76+
"post" : {
77+
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
78+
"balance" : "1000000000000000000",
79+
"code" : "0x6000600155",
80+
"nonce" : "0",
81+
"storage" : {
82+
"0x01" : "0x01"
83+
}
84+
},
85+
"2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : {
86+
"balance" : "500",
87+
"code" : "0x",
88+
"nonce" : "0",
89+
"storage" : {
90+
}
91+
},
92+
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
93+
"balance" : "0",
94+
"code" : "0x",
95+
"nonce" : "1",
96+
"storage" : {
97+
}
98+
}
99+
},
100+
"pre" : {
101+
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
102+
"balance" : "1000000000000000000",
103+
"code" : "0x6000600155",
104+
"nonce" : "0",
105+
"storage" : {
106+
"0x01" : "0x01"
107+
}
108+
},
109+
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
110+
"balance" : "500",
111+
"code" : "0x",
112+
"nonce" : "0",
113+
"storage" : {
114+
}
115+
}
116+
},
117+
"transaction" : {
118+
"data" : "",
119+
"gasLimit" : "500",
120+
"gasPrice" : "1",
121+
"nonce" : "0",
122+
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
123+
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
124+
"value" : "0"
125+
}
126+
},
127+
"refund_changeNonZeroStorage" : {
128+
"env" : {
129+
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
130+
"currentDifficulty" : "256",
131+
"currentGasLimit" : "1000000",
132+
"currentNumber" : "0",
133+
"currentTimestamp" : 1,
134+
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
135+
},
136+
"logs" : [
137+
],
138+
"out" : "0x",
139+
"post" : {
140+
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
141+
"balance" : "1000000000000000010",
142+
"code" : "0x6017600155",
143+
"nonce" : "0",
144+
"storage" : {
145+
"0x01" : "0x17"
146+
}
147+
},
148+
"2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : {
149+
"balance" : "602",
150+
"code" : "0x",
151+
"nonce" : "0",
152+
"storage" : {
153+
}
154+
},
155+
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
156+
"balance" : "388",
157+
"code" : "0x",
158+
"nonce" : "1",
159+
"storage" : {
160+
}
161+
}
162+
},
163+
"pre" : {
164+
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
165+
"balance" : "1000000000000000000",
166+
"code" : "0x6017600155",
167+
"nonce" : "0",
168+
"storage" : {
169+
"0x01" : "0x01"
170+
}
171+
},
172+
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
173+
"balance" : "1000",
174+
"code" : "0x",
175+
"nonce" : "0",
176+
"storage" : {
177+
}
178+
}
179+
},
180+
"transaction" : {
181+
"data" : "",
182+
"gasLimit" : "850",
183+
"gasPrice" : "1",
184+
"nonce" : "0",
185+
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
186+
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
187+
"value" : "10"
188+
}
189+
},
190+
"refund_getEtherBack" : {
191+
"env" : {
192+
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
193+
"currentDifficulty" : "256",
194+
"currentGasLimit" : "1000000",
195+
"currentNumber" : "0",
196+
"currentTimestamp" : 1,
197+
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
198+
},
199+
"logs" : [
200+
],
201+
"out" : "0x",
202+
"post" : {
203+
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
204+
"balance" : "1000000000000000010",
205+
"code" : "0x6000600155",
206+
"nonce" : "0",
207+
"storage" : {
208+
}
209+
},
210+
"2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : {
211+
"balance" : "402",
212+
"code" : "0x",
213+
"nonce" : "0",
214+
"storage" : {
215+
}
216+
},
217+
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
218+
"balance" : "588",
219+
"code" : "0x",
220+
"nonce" : "1",
221+
"storage" : {
222+
}
223+
}
224+
},
225+
"pre" : {
226+
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
227+
"balance" : "1000000000000000000",
228+
"code" : "0x6000600155",
229+
"nonce" : "0",
230+
"storage" : {
231+
"0x01" : "0x01"
232+
}
233+
},
234+
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
235+
"balance" : "1000",
236+
"code" : "0x",
237+
"nonce" : "0",
238+
"storage" : {
239+
}
240+
}
241+
},
242+
"transaction" : {
243+
"data" : "",
244+
"gasLimit" : "850",
245+
"gasPrice" : "1",
246+
"nonce" : "0",
247+
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
248+
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
249+
"value" : "10"
250+
}
251+
}
252+
}

StateTests/stSystemOperationsTest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5827,4 +5827,4 @@
58275827
"value" : "100000"
58285828
}
58295829
}
5830-
}
5830+
}

0 commit comments

Comments
 (0)