Skip to content

Commit 6b0d614

Browse files
starknet_os_flow_tests: fuzz test initial contracts
1 parent 7030f05 commit 6b0d614

14 files changed

Lines changed: 1555 additions & 7 deletions

File tree

crates/blockifier_test_utils/resources/feature_contracts/cairo0/compiled/fuzz_revert_compiled.json

Lines changed: 988 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
%lang starknet
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"prime": "0x800000000000011000000000000000000000000000000000000000000000001",
3+
"compiler_version": "2.16.0",
4+
"bytecode": [],
5+
"bytecode_segment_lengths": 0,
6+
"hints": [],
7+
"entry_points_by_type": {
8+
"EXTERNAL": [],
9+
"L1_HANDLER": [],
10+
"CONSTRUCTOR": []
11+
}
12+
}
Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
{
2+
"prime": "0x800000000000011000000000000000000000000000000000000000000000001",
3+
"compiler_version": "2.16.0",
4+
"bytecode": [
5+
"0xa0680017fff8000",
6+
"0x7",
7+
"0x482680017ffa8000",
8+
"0x100000000000000000000000000000000",
9+
"0x400280007ff97fff",
10+
"0x10780017fff7fff",
11+
"0x3c",
12+
"0x4825800180007ffa",
13+
"0x0",
14+
"0x400280007ff97fff",
15+
"0x48297ffc80007ffd",
16+
"0x20680017fff7fff",
17+
"0x4",
18+
"0x10780017fff7fff",
19+
"0xd",
20+
"0x1104800180018000",
21+
"0x40",
22+
"0x482680017ff98000",
23+
"0x1",
24+
"0x48127ff57fff8000",
25+
"0x480a7ffb7fff8000",
26+
"0x480680017fff8000",
27+
"0x1",
28+
"0x48127ffa7fff8000",
29+
"0x48127ffa7fff8000",
30+
"0x208b7fff7fff7ffe",
31+
"0x1104800180018000",
32+
"0x46",
33+
"0x482480017fff8000",
34+
"0x45",
35+
"0x480080007fff8000",
36+
"0xa0680017fff8000",
37+
"0x9",
38+
"0x4824800180007ff9",
39+
"0x0",
40+
"0x482480017fff8000",
41+
"0x100000000000000000000000000000000",
42+
"0x400280017ff97fff",
43+
"0x10780017fff7fff",
44+
"0x15",
45+
"0x4824800180007ff9",
46+
"0x0",
47+
"0x400280017ff97fff",
48+
"0x40780017fff7fff",
49+
"0x1",
50+
"0x480680017fff8000",
51+
"0x64",
52+
"0x400080007ffe7fff",
53+
"0x482680017ff98000",
54+
"0x2",
55+
"0x482480017ffc8000",
56+
"0x1dec",
57+
"0x480a7ffb7fff8000",
58+
"0x480680017fff8000",
59+
"0x0",
60+
"0x48127ffa7fff8000",
61+
"0x482480017ff98000",
62+
"0x1",
63+
"0x208b7fff7fff7ffe",
64+
"0x482680017ff98000",
65+
"0x2",
66+
"0x482480017ff68000",
67+
"0x19a0",
68+
"0x10780017fff7fff",
69+
"0x6",
70+
"0x482680017ff98000",
71+
"0x1",
72+
"0x482680017ffa8000",
73+
"0x1e96",
74+
"0x1104800180018000",
75+
"0xf",
76+
"0x48127ff67fff8000",
77+
"0x48127ff67fff8000",
78+
"0x480a7ffb7fff8000",
79+
"0x480680017fff8000",
80+
"0x1",
81+
"0x48127ffa7fff8000",
82+
"0x48127ffa7fff8000",
83+
"0x208b7fff7fff7ffe",
84+
"0x480680017fff8000",
85+
"0x496e70757420746f6f206c6f6e6720666f7220617267756d656e7473",
86+
"0x1104800180018000",
87+
"0x8",
88+
"0x208b7fff7fff7ffe",
89+
"0x480680017fff8000",
90+
"0x4f7574206f6620676173",
91+
"0x1104800180018000",
92+
"0x3",
93+
"0x208b7fff7fff7ffe",
94+
"0x40780017fff7fff",
95+
"0x1",
96+
"0x400180007fff7ffd",
97+
"0x48127fff7fff8000",
98+
"0x482480017ffe8000",
99+
"0x1",
100+
"0x208b7fff7fff7ffe"
101+
],
102+
"bytecode_segment_lengths": [
103+
79,
104+
5,
105+
5,
106+
7
107+
],
108+
"hints": [
109+
[
110+
0,
111+
[
112+
{
113+
"TestLessThanOrEqual": {
114+
"lhs": {
115+
"Immediate": "0x0"
116+
},
117+
"rhs": {
118+
"Deref": {
119+
"register": "FP",
120+
"offset": -6
121+
}
122+
},
123+
"dst": {
124+
"register": "AP",
125+
"offset": 0
126+
}
127+
}
128+
}
129+
]
130+
],
131+
[
132+
31,
133+
[
134+
{
135+
"TestLessThanOrEqual": {
136+
"lhs": {
137+
"Immediate": "0x0"
138+
},
139+
"rhs": {
140+
"Deref": {
141+
"register": "AP",
142+
"offset": -6
143+
}
144+
},
145+
"dst": {
146+
"register": "AP",
147+
"offset": 0
148+
}
149+
}
150+
}
151+
]
152+
],
153+
[
154+
43,
155+
[
156+
{
157+
"AllocSegment": {
158+
"dst": {
159+
"register": "AP",
160+
"offset": 0
161+
}
162+
}
163+
}
164+
]
165+
],
166+
[
167+
89,
168+
[
169+
{
170+
"AllocSegment": {
171+
"dst": {
172+
"register": "AP",
173+
"offset": 0
174+
}
175+
}
176+
}
177+
]
178+
]
179+
],
180+
"entry_points_by_type": {
181+
"EXTERNAL": [
182+
{
183+
"selector": "0x19ac281f66e21c726742b3901eea60fab9fd080a92fbde532b936ab462dd09",
184+
"offset": 0,
185+
"builtins": [
186+
"range_check"
187+
]
188+
}
189+
],
190+
"L1_HANDLER": [],
191+
"CONSTRUCTOR": []
192+
}
193+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"prime": "0x800000000000011000000000000000000000000000000000000000000000001",
3+
"compiler_version": "2.16.0",
4+
"bytecode": [],
5+
"bytecode_segment_lengths": 0,
6+
"hints": [],
7+
"entry_points_by_type": {
8+
"EXTERNAL": [],
9+
"L1_HANDLER": [],
10+
"CONSTRUCTOR": []
11+
}
12+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#[starknet::contract]
2+
mod FuzzRevertContract {
3+
#[storage]
4+
struct Storage {}
5+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// This contract is auto-generated. To regenerate, run:
2+
// `UPDATE_EXPECT=1 cargo test -p blockifier_test_utils test_fuzz_revert_2_almost_identical`
3+
#[starknet::contract]
4+
mod FuzzRevertContract {
5+
#[storage]
6+
struct Storage {}
7+
8+
/// This function is here to make this contract's class hash different from the main fuzz
9+
/// revert contract.
10+
#[external(v0)]
11+
fn dummy_function(ref self: ContractState) -> felt252 {
12+
return 100;
13+
}
14+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#[starknet::contract]
2+
mod FuzzRevertOrchestratorContract {
3+
#[storage]
4+
struct Storage {}
5+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"sierra_program": [
3+
"0x1",
4+
"0x7",
5+
"0x0",
6+
"0x2",
7+
"0x10",
8+
"0x0",
9+
"0x1",
10+
"0xff",
11+
"0x0",
12+
"0x4",
13+
"0x0"
14+
],
15+
"sierra_program_debug_info": {
16+
"type_names": [],
17+
"libfunc_names": [],
18+
"user_func_names": []
19+
},
20+
"contract_class_version": "0.1.0",
21+
"entry_points_by_type": {
22+
"EXTERNAL": [],
23+
"L1_HANDLER": [],
24+
"CONSTRUCTOR": []
25+
},
26+
"abi": [
27+
{
28+
"type": "event",
29+
"name": "fuzz_revert::fuzz_revert::FuzzRevertContract::Event",
30+
"kind": "enum",
31+
"variants": []
32+
}
33+
]
34+
}

0 commit comments

Comments
 (0)