hermez-node/test/sets.go
test/sets.goRaw
1package test
2
3// sets of instructions to use in tests of other packages
4
5// line can be Deposit:
6// A (1): 10
7// (deposit to A, TokenID 1, 10 units)
8// or Transfer:
9// A-B (1): 6 1
10// (transfer from A to B, TokenID 1, 6 units, with fee 1)
11// or Withdraw:
12// A (1) E: 4
13// exit to A, TokenID 1, 4 units)
14// or NextBatch:
15// > and here the comment
16// move one batch forward
17
18// Set0 has 3 batches, 29 different accounts, with:
19// - 3 TokenIDs
20// - 29+5+10 L1 txs (deposits & exits)
21// - 21+53+7 L2 transactions
22var SetTest0 = `
23 // deposits TokenID: 1
24 A (1): 50
25 B (1): 5
26 C (1): 20
27 D (1): 25
28 E (1): 25
29 F (1): 25
30 G (1): 25
31 H (1): 25
32 I (1): 25
33 J (1): 25
34 K (1): 25
35 L (1): 25
36 M (1): 25
37 N (1): 25
38 O (1): 25
39 P (1): 25
40 Q (1): 25
41 R (1): 25
42 S (1): 25
43 T (1): 25
44 U (1): 25
45 V (1): 25
46 W (1): 25
47 X (1): 25
48 Y (1): 25
49 Z (1): 25
50
51 // deposits TokenID: 2
52 B (2): 5
53 A (2): 20
54
55 // deposits TokenID: 3
56 B (3): 100
57
58 // transactions TokenID: 1
59 A-B (1): 5 1
60 A-L (1): 10 1
61 A-M (1): 5 1
62 A-N (1): 5 1
63 A-O (1): 5 1
64 B-C (1): 3 1
65 C-A (1): 3 255
66 D-A (1): 5 1
67 D-Z (1): 5 1
68 D-Y (1): 5 1
69 D-X (1): 5 1
70 E-Z (1): 5 2
71 E-Y (1): 5 1
72 E-X (1): 5 1
73 F-Z (1): 5 1
74 G-K (1): 3 1
75 G-K (1): 3 1
76 G-K (1): 3 1
77 H-K (1): 3 2
78 H-K (1): 3 1
79 H-K (1): 3 1
80
81 > batch1
82
83 // A (3) still does not exist, coordinator should create new L1Tx to create the account
84 B-A (3): 5 1
85
86 A-B (2): 5 1
87 I-K (1): 3 1
88 I-K (1): 3 1
89 I-K (1): 3 1
90 J-K (1): 3 1
91 J-K (1): 3 1
92 J-K (1): 3 1
93 K-J (1): 3 1
94 L-A (1): 5 1
95 L-Z (1): 5 1
96 L-Y (1): 5 1
97 L-X (1): 5 1
98 M-A (1): 5 1
99 M-Z (1): 5 1
100 M-Y (1): 5 1
101 N-A (1): 5 1
102 N-Z (1): 5 2
103 N-Y (1): 5 1
104 O-T (1): 3 1
105 O-U (1): 3 1
106 O-V (1): 3 1
107 P-T (1): 3 1
108 P-U (1): 3 1
109 P-V (1): 3 5
110 Q-O (1): 3 1
111 Q-P (1): 3 1
112 R-O (1): 3 1
113 R-P (1): 3 1
114 R-Q (1): 3 1
115 S-O (1): 3 1
116 S-P (1): 3 1
117 S-Q (1): 3 1
118 T-O (1): 3 1
119 T-P (1): 3 1
120 T-Q (1): 3 1
121 U-Z (1): 5 3
122 U-Y (1): 5 1
123 U-T (1): 3 1
124 V-Z (1): 5 0
125 V-Y (1): 6 1
126 V-T (1): 3 1
127 W-K (1): 3 1
128 W-J (1): 3 1
129 W-A (1): 5 1
130 W-Z (1): 5 1
131 X-B (1): 5 1
132 X-C (1): 5 50
133 X-D (1): 5 1
134 X-E (1): 5 1
135 Y-B (1): 5 1
136 Y-C (1): 5 1
137 Y-D (1): 5 1
138 Y-E (1): 5 1
139 Z-A (1): 5 1
140
141 // exits
142 A (1) E: 5
143 K (1) E: 5
144 X (1) E: 5
145 Y (1) E: 5
146 Z (1) E: 5
147
148 > batch2
149 A (1): 50
150 B (1): 5
151 C (1): 20
152 D (1): 25
153 E (1): 25
154 F (1): 25
155 G (1): 25
156 H (1): 25
157 I (1): 25
158 A-B (1): 5 1
159 A-L (1): 10 1
160 A-M (1): 5 1
161 B-N (1): 5 1
162 C-O (1): 5 1
163 H-O (1): 5 1
164 I-H (1): 5 1
165 A (1) E: 5
166`