1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let boss = addressFromStringValue("3PRE5KH9oPGfFPs7fGnQcJ4wNshEDUPGj1t") |
---|
5 | 5 | | |
---|
6 | 6 | | let usdtAssetIdString = "34N9YcEETLWn93qYQ64EsP1x89tSruJU44RrEMSXXEPJ" |
---|
7 | 7 | | |
---|
8 | 8 | | let usdcAssetIdString = "6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ" |
---|
9 | 9 | | |
---|
10 | 10 | | func getStringByKey (key) = valueOrElse(getString(this, key), "") |
---|
11 | 11 | | |
---|
12 | 12 | | |
---|
13 | 13 | | func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 25) |
---|
14 | 14 | | |
---|
15 | 15 | | |
---|
16 | 16 | | let a = getIntegerByKey("montant") |
---|
17 | 17 | | |
---|
18 | 18 | | let decimals_multi = [10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000] |
---|
19 | 19 | | |
---|
20 | 20 | | func getBase (func_name) = { |
---|
21 | 21 | | let data = split(getStringByKey(func_name), "_") |
---|
22 | 22 | | let p1 = addressFromStringValue(data[0]) |
---|
23 | 23 | | let p2 = addressFromStringValue(data[1]) |
---|
24 | 24 | | let lp = fromBase58String(data[2]) |
---|
25 | 25 | | let aid = fromBase58String(data[3]) |
---|
26 | 26 | | let aid2 = fromBase58String(data[4]) |
---|
27 | 27 | | let waid = unit |
---|
28 | 28 | | let aids = if ((data[3] == "WAVES")) |
---|
29 | 29 | | then "WAVES" |
---|
30 | 30 | | else data[3] |
---|
31 | 31 | | let aid2s = if ((data[4] == "WAVES")) |
---|
32 | 32 | | then "WAVES" |
---|
33 | 33 | | else data[4] |
---|
34 | 34 | | $Tuple8(p1, p2, lp, aid, aid2, waid, aids, aid2s) |
---|
35 | 35 | | } |
---|
36 | 36 | | |
---|
37 | 37 | | |
---|
38 | 38 | | func getBaseBal (aid,aids,aid2,aid2s) = { |
---|
39 | 39 | | let aid2bb = if ((aid2s == "WAVES")) |
---|
40 | 40 | | then wavesBalance(this).available |
---|
41 | 41 | | else assetBalance(this, aid2) |
---|
42 | 42 | | if ((aid2bb == aid2bb)) |
---|
43 | 43 | | then { |
---|
44 | 44 | | let aidbb = if ((aids == "WAVES")) |
---|
45 | 45 | | then wavesBalance(this).available |
---|
46 | 46 | | else assetBalance(this, aid) |
---|
47 | 47 | | if ((aidbb == aidbb)) |
---|
48 | 48 | | then $Tuple2(aidbb, aid2bb) |
---|
49 | 49 | | else throw("Strict value is not equal to itself.") |
---|
50 | 50 | | } |
---|
51 | 51 | | else throw("Strict value is not equal to itself.") |
---|
52 | 52 | | } |
---|
53 | 53 | | |
---|
54 | 54 | | |
---|
55 | 55 | | func getPutGet (aids) = { |
---|
56 | 56 | | let putFunc = if (if ((usdtAssetIdString == aids)) |
---|
57 | 57 | | then true |
---|
58 | 58 | | else (usdcAssetIdString == aids)) |
---|
59 | 59 | | then "putOneTknV2" |
---|
60 | 60 | | else "putOneTkn" |
---|
61 | 61 | | let getFunc = if (if ((usdtAssetIdString == aids)) |
---|
62 | 62 | | then true |
---|
63 | 63 | | else (usdcAssetIdString == aids)) |
---|
64 | 64 | | then "getOneTknV2" |
---|
65 | 65 | | else "getOneTkn" |
---|
66 | 66 | | $Tuple2(putFunc, getFunc) |
---|
67 | 67 | | } |
---|
68 | 68 | | |
---|
69 | 69 | | |
---|
70 | 70 | | func finalize (aid2bb,aid2s,aid2,err_str,decimal) = { |
---|
71 | 71 | | let aid2ba = if ((aid2s == "WAVES")) |
---|
72 | 72 | | then wavesBalance(this).available |
---|
73 | 73 | | else assetBalance(this, aid2) |
---|
74 | 74 | | if ((aid2ba == aid2ba)) |
---|
75 | 75 | | then if ((0 >= (aid2ba - aid2bb))) |
---|
76 | 76 | | then throw(err_str) |
---|
77 | 77 | | else { |
---|
78 | 78 | | let amount = (aid2ba - (a * decimal)) |
---|
79 | 79 | | if ((amount == amount)) |
---|
80 | 80 | | then [ScriptTransfer(boss, amount, if ((aid2s == "WAVES")) |
---|
81 | 81 | | then unit |
---|
82 | 82 | | else aid2)] |
---|
83 | 83 | | else throw("Strict value is not equal to itself.") |
---|
84 | 84 | | } |
---|
85 | 85 | | else throw("Strict value is not equal to itself.") |
---|
86 | 86 | | } |
---|
87 | 87 | | |
---|
88 | 88 | | |
---|
89 | 89 | | func getBalToSwap (aid_str,aidbb,aid) = if ((aid_str == "WAVES")) |
---|
90 | 90 | | then (wavesBalance(this).available - aidbb) |
---|
91 | 91 | | else (assetBalance(this, aid) - aidbb) |
---|
92 | 92 | | |
---|
93 | 93 | | |
---|
94 | 94 | | func getAssetDecimal (aid) = { |
---|
95 | 95 | | let x = match assetInfo(aid) { |
---|
96 | 96 | | case asset: Asset => |
---|
97 | 97 | | decimals_multi[(asset.decimals - 1)] |
---|
98 | 98 | | case _ => |
---|
99 | 99 | | decimals_multi[7] |
---|
100 | 100 | | } |
---|
101 | 101 | | x |
---|
102 | 102 | | } |
---|
103 | 103 | | |
---|
104 | 104 | | |
---|
105 | 105 | | func pw (i,func_name) = { |
---|
106 | 106 | | let $t025542621 = getBase(func_name) |
---|
107 | 107 | | let p1 = $t025542621._1 |
---|
108 | 108 | | let p2 = $t025542621._2 |
---|
109 | 109 | | let lp = $t025542621._3 |
---|
110 | 110 | | let aid = $t025542621._4 |
---|
111 | 111 | | let aid2 = $t025542621._5 |
---|
112 | 112 | | let waid = $t025542621._6 |
---|
113 | 113 | | let aids = $t025542621._7 |
---|
114 | 114 | | let aid2s = $t025542621._8 |
---|
115 | 115 | | let aid2_decimal = getAssetDecimal(aid2) |
---|
116 | 116 | | if (if ((i.caller != this)) |
---|
117 | 117 | | then (i.caller != boss) |
---|
118 | 118 | | else false) |
---|
119 | 119 | | then throw("you are not allowed to arb!") |
---|
120 | 120 | | else { |
---|
121 | 121 | | let $t027642823 = getBaseBal(aid, aids, aid2, aid2s) |
---|
122 | 122 | | if (($t027642823 == $t027642823)) |
---|
123 | 123 | | then { |
---|
124 | 124 | | let aid2bb = $t027642823._2 |
---|
125 | 125 | | let aidbb = $t027642823._1 |
---|
126 | 126 | | let swap = invoke(p1, "swap", [aids, 1], [AttachedPayment(aid2, (a * aid2_decimal))]) |
---|
127 | 127 | | if ((swap == swap)) |
---|
128 | 128 | | then { |
---|
129 | 129 | | let balToSwap = getBalToSwap(aids, aidbb, aid) |
---|
130 | 130 | | let $t029783018 = getPutGet(aids) |
---|
131 | 131 | | let putFunc = $t029783018._1 |
---|
132 | 132 | | let getFunc = $t029783018._2 |
---|
133 | 133 | | let put = invoke(p2, putFunc, [1, false], [AttachedPayment(if ((aids == "WAVES")) |
---|
134 | 134 | | then waid |
---|
135 | 135 | | else aid, balToSwap)]) |
---|
136 | 136 | | if ((put == put)) |
---|
137 | 137 | | then { |
---|
138 | 138 | | let lpb = assetBalance(this, lp) |
---|
139 | 139 | | if ((lpb == lpb)) |
---|
140 | 140 | | then { |
---|
141 | 141 | | let get = invoke(p2, getFunc, [aid2s, 1], [AttachedPayment(lp, lpb)]) |
---|
142 | 142 | | if ((get == get)) |
---|
143 | 143 | | then finalize(aid2bb, aid2s, aid2, func_name, aid2_decimal) |
---|
144 | 144 | | else throw("Strict value is not equal to itself.") |
---|
145 | 145 | | } |
---|
146 | 146 | | else throw("Strict value is not equal to itself.") |
---|
147 | 147 | | } |
---|
148 | 148 | | else throw("Strict value is not equal to itself.") |
---|
149 | 149 | | } |
---|
150 | 150 | | else throw("Strict value is not equal to itself.") |
---|
151 | 151 | | } |
---|
152 | 152 | | else throw("Strict value is not equal to itself.") |
---|
153 | 153 | | } |
---|
154 | 154 | | } |
---|
155 | 155 | | |
---|
156 | 156 | | |
---|
157 | 157 | | func wp (i,func_name) = { |
---|
158 | 158 | | let $t033873454 = getBase(func_name) |
---|
159 | 159 | | let p1 = $t033873454._1 |
---|
160 | 160 | | let p2 = $t033873454._2 |
---|
161 | 161 | | let lp = $t033873454._3 |
---|
162 | 162 | | let aid = $t033873454._4 |
---|
163 | 163 | | let aid2 = $t033873454._5 |
---|
164 | 164 | | let waid = $t033873454._6 |
---|
165 | 165 | | let aids = $t033873454._7 |
---|
166 | 166 | | let aid2s = $t033873454._8 |
---|
167 | 167 | | let aid2_decimal = getAssetDecimal(aid2) |
---|
168 | 168 | | if (if ((i.caller != this)) |
---|
169 | 169 | | then (i.caller != boss) |
---|
170 | 170 | | else false) |
---|
171 | 171 | | then throw("you are not allowed to arb!") |
---|
172 | 172 | | else { |
---|
173 | 173 | | let $t035973656 = getBaseBal(aid, aids, aid2, aid2s) |
---|
174 | 174 | | if (($t035973656 == $t035973656)) |
---|
175 | 175 | | then { |
---|
176 | 176 | | let aid2bb = $t035973656._2 |
---|
177 | 177 | | let aidbb = $t035973656._1 |
---|
178 | 178 | | let $t036613701 = getPutGet(aids) |
---|
179 | 179 | | let putFunc = $t036613701._1 |
---|
180 | 180 | | let getFunc = $t036613701._2 |
---|
181 | 181 | | let put = invoke(p1, putFunc, [1, false], [AttachedPayment(aid2, (a * aid2_decimal))]) |
---|
182 | 182 | | if ((put == put)) |
---|
183 | 183 | | then { |
---|
184 | 184 | | let lpb = assetBalance(this, lp) |
---|
185 | 185 | | if ((lpb == lpb)) |
---|
186 | 186 | | then { |
---|
187 | 187 | | let get = invoke(p1, getFunc, [aids, 1], [AttachedPayment(lp, lpb)]) |
---|
188 | 188 | | if ((get == get)) |
---|
189 | 189 | | then { |
---|
190 | 190 | | let balToSwap = getBalToSwap(aids, aidbb, aid) |
---|
191 | 191 | | let swap = invoke(p2, "swap", [aid2s, 1], [AttachedPayment(if ((aids == "WAVES")) |
---|
192 | 192 | | then waid |
---|
193 | 193 | | else aid, balToSwap)]) |
---|
194 | 194 | | if ((swap == swap)) |
---|
195 | 195 | | then finalize(aid2bb, aid2s, aid2, func_name, aid2_decimal) |
---|
196 | 196 | | else throw("Strict value is not equal to itself.") |
---|
197 | 197 | | } |
---|
198 | 198 | | else throw("Strict value is not equal to itself.") |
---|
199 | 199 | | } |
---|
200 | 200 | | else throw("Strict value is not equal to itself.") |
---|
201 | 201 | | } |
---|
202 | 202 | | else throw("Strict value is not equal to itself.") |
---|
203 | 203 | | } |
---|
204 | 204 | | else throw("Strict value is not equal to itself.") |
---|
205 | 205 | | } |
---|
206 | 206 | | } |
---|
207 | 207 | | |
---|
208 | 208 | | |
---|
209 | 209 | | func ps (i,func_name) = { |
---|
210 | 210 | | let $t042224289 = getBase(func_name) |
---|
211 | 211 | | let p1 = $t042224289._1 |
---|
212 | 212 | | let p2 = $t042224289._2 |
---|
213 | 213 | | let lp = $t042224289._3 |
---|
214 | 214 | | let aid = $t042224289._4 |
---|
215 | 215 | | let aid2 = $t042224289._5 |
---|
216 | 216 | | let waid = $t042224289._6 |
---|
217 | 217 | | let aids = $t042224289._7 |
---|
218 | 218 | | let aid2s = $t042224289._8 |
---|
219 | 219 | | let aid2_decimal = getAssetDecimal(aid2) |
---|
220 | 220 | | if (if ((i.caller != this)) |
---|
221 | 221 | | then (i.caller != boss) |
---|
222 | 222 | | else false) |
---|
223 | 223 | | then throw("you are not allowed to arb!") |
---|
224 | 224 | | else { |
---|
225 | 225 | | let $t044324491 = getBaseBal(aid, aids, aid2, aid2s) |
---|
226 | 226 | | if (($t044324491 == $t044324491)) |
---|
227 | 227 | | then { |
---|
228 | 228 | | let aid2bb = $t044324491._2 |
---|
229 | 229 | | let aidbb = $t044324491._1 |
---|
230 | 230 | | let swap = invoke(p1, "swap", [aids, 1], [AttachedPayment(aid2, (a * aid2_decimal))]) |
---|
231 | 231 | | if ((swap == swap)) |
---|
232 | 232 | | then { |
---|
233 | 233 | | let balToSwap = getBalToSwap(aids, aidbb, aid) |
---|
234 | 234 | | let swap2 = invoke(p2, "exchange", [1], [AttachedPayment(if ((aids == "WAVES")) |
---|
235 | 235 | | then waid |
---|
236 | 236 | | else aid, balToSwap)]) |
---|
237 | 237 | | if ((swap2 == swap2)) |
---|
238 | 238 | | then finalize(aid2bb, aid2s, aid2, func_name, aid2_decimal) |
---|
239 | 239 | | else throw("Strict value is not equal to itself.") |
---|
240 | 240 | | } |
---|
241 | 241 | | else throw("Strict value is not equal to itself.") |
---|
242 | 242 | | } |
---|
243 | 243 | | else throw("Strict value is not equal to itself.") |
---|
244 | 244 | | } |
---|
245 | 245 | | } |
---|
246 | 246 | | |
---|
247 | 247 | | |
---|
248 | 248 | | func sp (i,func_name) = { |
---|
249 | 249 | | let $t048874954 = getBase(func_name) |
---|
250 | 250 | | let p1 = $t048874954._1 |
---|
251 | 251 | | let p2 = $t048874954._2 |
---|
252 | 252 | | let lp = $t048874954._3 |
---|
253 | 253 | | let aid = $t048874954._4 |
---|
254 | 254 | | let aid2 = $t048874954._5 |
---|
255 | 255 | | let waid = $t048874954._6 |
---|
256 | 256 | | let aids = $t048874954._7 |
---|
257 | 257 | | let aid2s = $t048874954._8 |
---|
258 | 258 | | let aid2_decimal = getAssetDecimal(aid2) |
---|
259 | 259 | | if (if ((i.caller != this)) |
---|
260 | 260 | | then (i.caller != boss) |
---|
261 | 261 | | else false) |
---|
262 | 262 | | then throw("you are not allowed to arb!") |
---|
263 | 263 | | else { |
---|
264 | 264 | | let $t050975156 = getBaseBal(aid, aids, aid2, aid2s) |
---|
265 | 265 | | if (($t050975156 == $t050975156)) |
---|
266 | 266 | | then { |
---|
267 | 267 | | let aid2bb = $t050975156._2 |
---|
268 | 268 | | let aidbb = $t050975156._1 |
---|
269 | 269 | | let swap = invoke(p1, "exchange", [1], [AttachedPayment(aid2, (a * aid2_decimal))]) |
---|
270 | 270 | | if ((swap == swap)) |
---|
271 | 271 | | then { |
---|
272 | 272 | | let balToSwap = getBalToSwap(aids, aidbb, aid) |
---|
273 | 273 | | let swap2 = invoke(p2, "swap", [aid2s, 1], [AttachedPayment(if ((aids == "WAVES")) |
---|
274 | 274 | | then waid |
---|
275 | 275 | | else aid, balToSwap)]) |
---|
276 | 276 | | if ((swap2 == swap2)) |
---|
277 | 277 | | then finalize(aid2bb, aid2s, aid2, func_name, aid2_decimal) |
---|
278 | 278 | | else throw("Strict value is not equal to itself.") |
---|
279 | 279 | | } |
---|
280 | 280 | | else throw("Strict value is not equal to itself.") |
---|
281 | 281 | | } |
---|
282 | 282 | | else throw("Strict value is not equal to itself.") |
---|
283 | 283 | | } |
---|
284 | 284 | | } |
---|
285 | 285 | | |
---|
286 | 286 | | |
---|
287 | 287 | | func ws (i,func_name) = { |
---|
288 | 288 | | let $t055495616 = getBase(func_name) |
---|
289 | 289 | | let p1 = $t055495616._1 |
---|
290 | 290 | | let p2 = $t055495616._2 |
---|
291 | 291 | | let lp = $t055495616._3 |
---|
292 | 292 | | let aid = $t055495616._4 |
---|
293 | 293 | | let aid2 = $t055495616._5 |
---|
294 | 294 | | let waid = $t055495616._6 |
---|
295 | 295 | | let aids = $t055495616._7 |
---|
296 | 296 | | let aid2s = $t055495616._8 |
---|
297 | 297 | | let aid2_decimal = getAssetDecimal(aid2) |
---|
298 | 298 | | if (if ((i.caller != this)) |
---|
299 | 299 | | then (i.caller != boss) |
---|
300 | 300 | | else false) |
---|
301 | 301 | | then throw("you are not allowed to arb!") |
---|
302 | 302 | | else { |
---|
303 | 303 | | let $t057595818 = getBaseBal(aid, aids, aid2, aid2s) |
---|
304 | 304 | | if (($t057595818 == $t057595818)) |
---|
305 | 305 | | then { |
---|
306 | 306 | | let aid2bb = $t057595818._2 |
---|
307 | 307 | | let aidbb = $t057595818._1 |
---|
308 | 308 | | let $t058235863 = getPutGet(aids) |
---|
309 | 309 | | let putFunc = $t058235863._1 |
---|
310 | 310 | | let getFunc = $t058235863._2 |
---|
311 | 311 | | let put = invoke(p1, putFunc, [1, false], [AttachedPayment(aid2, (a * aid2_decimal))]) |
---|
312 | 312 | | if ((put == put)) |
---|
313 | 313 | | then { |
---|
314 | 314 | | let lpb = assetBalance(this, lp) |
---|
315 | 315 | | if ((lpb == lpb)) |
---|
316 | 316 | | then { |
---|
317 | 317 | | let get = invoke(p1, getFunc, [aids, 1], [AttachedPayment(lp, lpb)]) |
---|
318 | 318 | | if ((get == get)) |
---|
319 | 319 | | then { |
---|
320 | 320 | | let balToSwap = getBalToSwap(aids, aidbb, aid) |
---|
321 | 321 | | let swap = invoke(p2, "exchange", [1], [AttachedPayment(if ((aids == "WAVES")) |
---|
322 | 322 | | then waid |
---|
323 | 323 | | else aid, balToSwap)]) |
---|
324 | 324 | | if ((swap == swap)) |
---|
325 | 325 | | then finalize(aid2bb, aid2s, aid2, func_name, aid2_decimal) |
---|
326 | 326 | | else throw("Strict value is not equal to itself.") |
---|
327 | 327 | | } |
---|
328 | 328 | | else throw("Strict value is not equal to itself.") |
---|
329 | 329 | | } |
---|
330 | 330 | | else throw("Strict value is not equal to itself.") |
---|
331 | 331 | | } |
---|
332 | 332 | | else throw("Strict value is not equal to itself.") |
---|
333 | 333 | | } |
---|
334 | 334 | | else throw("Strict value is not equal to itself.") |
---|
335 | 335 | | } |
---|
336 | 336 | | } |
---|
337 | 337 | | |
---|
338 | 338 | | |
---|
339 | 339 | | func sw (i,func_name) = { |
---|
340 | 340 | | let $t063716438 = getBase(func_name) |
---|
341 | 341 | | let p1 = $t063716438._1 |
---|
342 | 342 | | let p2 = $t063716438._2 |
---|
343 | 343 | | let lp = $t063716438._3 |
---|
344 | 344 | | let aid = $t063716438._4 |
---|
345 | 345 | | let aid2 = $t063716438._5 |
---|
346 | 346 | | let waid = $t063716438._6 |
---|
347 | 347 | | let aids = $t063716438._7 |
---|
348 | 348 | | let aid2s = $t063716438._8 |
---|
349 | 349 | | let aid2_decimal = getAssetDecimal(aid2) |
---|
350 | 350 | | if (if ((i.caller != this)) |
---|
351 | 351 | | then (i.caller != boss) |
---|
352 | 352 | | else false) |
---|
353 | 353 | | then throw("you are not allowed to arb!") |
---|
354 | 354 | | else { |
---|
355 | 355 | | let $t065816640 = getBaseBal(aid, aids, aid2, aid2s) |
---|
356 | 356 | | if (($t065816640 == $t065816640)) |
---|
357 | 357 | | then { |
---|
358 | 358 | | let aid2bb = $t065816640._2 |
---|
359 | 359 | | let aidbb = $t065816640._1 |
---|
360 | 360 | | let $t066456685 = getPutGet(aids) |
---|
361 | 361 | | let putFunc = $t066456685._1 |
---|
362 | 362 | | let getFunc = $t066456685._2 |
---|
363 | 363 | | let swap = invoke(p1, "exchange", [1], [AttachedPayment(aid2, (a * aid2_decimal))]) |
---|
364 | 364 | | if ((swap == swap)) |
---|
365 | 365 | | then { |
---|
366 | 366 | | let balToSwap = getBalToSwap(aids, aidbb, aid) |
---|
367 | 367 | | let put = invoke(p2, putFunc, [1, false], [AttachedPayment(if ((aids == "WAVES")) |
---|
368 | 368 | | then waid |
---|
369 | 369 | | else aid, balToSwap)]) |
---|
370 | 370 | | if ((put == put)) |
---|
371 | 371 | | then { |
---|
372 | 372 | | let lpb = assetBalance(this, lp) |
---|
373 | 373 | | if ((lpb == lpb)) |
---|
374 | 374 | | then { |
---|
375 | 375 | | let get = invoke(p2, getFunc, [aid2s, 1], [AttachedPayment(lp, lpb)]) |
---|
376 | 376 | | if ((get == get)) |
---|
377 | 377 | | then finalize(aid2bb, aid2s, aid2, func_name, aid2_decimal) |
---|
378 | 378 | | else throw("Strict value is not equal to itself.") |
---|
379 | 379 | | } |
---|
380 | 380 | | else throw("Strict value is not equal to itself.") |
---|
381 | 381 | | } |
---|
382 | 382 | | else throw("Strict value is not equal to itself.") |
---|
383 | 383 | | } |
---|
384 | 384 | | else throw("Strict value is not equal to itself.") |
---|
385 | 385 | | } |
---|
386 | 386 | | else throw("Strict value is not equal to itself.") |
---|
387 | 387 | | } |
---|
388 | 388 | | } |
---|
389 | 389 | | |
---|
390 | 390 | | |
---|
391 | 391 | | @Callable(i) |
---|
392 | 392 | | func setAmout (a) = if ((i.caller != this)) |
---|
393 | 393 | | then throw("you are not allowed to set!") |
---|
394 | 394 | | else [IntegerEntry("montant", a)] |
---|
395 | 395 | | |
---|
396 | 396 | | |
---|
397 | 397 | | |
---|
398 | 398 | | @Callable(i) |
---|
399 | 399 | | func setKeyValString (key,val) = if ((i.caller != this)) |
---|
400 | 400 | | then throw("you are not allowed to set!") |
---|
401 | 401 | | else [StringEntry(key, val)] |
---|
402 | 402 | | |
---|
403 | 403 | | |
---|
404 | 404 | | |
---|
405 | 405 | | @Callable(i) |
---|
406 | 406 | | func a1 () = pw(i, "a1") |
---|
407 | 407 | | |
---|
408 | 408 | | |
---|
409 | 409 | | |
---|
410 | 410 | | @Callable(i) |
---|
411 | 411 | | func a2 () = wp(i, "a2") |
---|
412 | 412 | | |
---|
413 | 413 | | |
---|
414 | 414 | | |
---|
415 | 415 | | @Callable(i) |
---|
416 | 416 | | func a3 () = ps(i, "a3") |
---|
417 | 417 | | |
---|
418 | 418 | | |
---|
419 | 419 | | |
---|
420 | 420 | | @Callable(i) |
---|
421 | 421 | | func a4 () = sp(i, "a4") |
---|
422 | 422 | | |
---|
423 | 423 | | |
---|
424 | 424 | | |
---|
425 | 425 | | @Callable(i) |
---|
426 | 426 | | func a5 () = ws(i, "a5") |
---|
427 | 427 | | |
---|
428 | 428 | | |
---|
429 | 429 | | |
---|
430 | 430 | | @Callable(i) |
---|
431 | 431 | | func a6 () = sw(i, "a6") |
---|
432 | 432 | | |
---|
433 | 433 | | |
---|
434 | 434 | | |
---|
435 | 435 | | @Callable(i) |
---|
436 | 436 | | func a7 () = pw(i, "a7") |
---|
437 | 437 | | |
---|
438 | 438 | | |
---|
439 | 439 | | |
---|
440 | 440 | | @Callable(i) |
---|
441 | 441 | | func a8 () = wp(i, "a8") |
---|
442 | 442 | | |
---|
443 | 443 | | |
---|
444 | 444 | | |
---|
445 | 445 | | @Callable(i) |
---|
446 | 446 | | func a9 () = pw(i, "a9") |
---|
447 | 447 | | |
---|
448 | 448 | | |
---|
449 | 449 | | |
---|
450 | 450 | | @Callable(i) |
---|
451 | 451 | | func a10 () = wp(i, "a10") |
---|
452 | 452 | | |
---|
453 | 453 | | |
---|
454 | 454 | | |
---|
455 | 455 | | @Callable(i) |
---|
456 | 456 | | func a11 () = pw(i, "a11") |
---|
457 | 457 | | |
---|
458 | 458 | | |
---|
459 | 459 | | |
---|
460 | 460 | | @Callable(i) |
---|
461 | 461 | | func a12 () = wp(i, "a12") |
---|
462 | 462 | | |
---|
463 | 463 | | |
---|
464 | 464 | | |
---|
465 | 465 | | @Callable(i) |
---|
466 | 466 | | func a13 () = ws(i, "a13") |
---|
467 | 467 | | |
---|
468 | 468 | | |
---|
469 | 469 | | |
---|
470 | 470 | | @Callable(i) |
---|
471 | 471 | | func a14 () = sw(i, "a14") |
---|
472 | 472 | | |
---|
473 | 473 | | |
---|
474 | 474 | | |
---|
475 | 475 | | @Callable(i) |
---|
476 | 476 | | func a15 () = ws(i, "a15") |
---|
477 | 477 | | |
---|
478 | 478 | | |
---|
479 | 479 | | |
---|
480 | 480 | | @Callable(i) |
---|
481 | 481 | | func a16 () = sw(i, "a16") |
---|
482 | 482 | | |
---|
483 | 483 | | |
---|
484 | 484 | | |
---|
485 | 485 | | @Callable(i) |
---|
486 | 486 | | func a17 () = ws(i, "a17") |
---|
487 | 487 | | |
---|
488 | 488 | | |
---|
489 | 489 | | |
---|
490 | 490 | | @Callable(i) |
---|
491 | 491 | | func a18 () = sw(i, "a18") |
---|
492 | 492 | | |
---|
493 | 493 | | |
---|
494 | 494 | | |
---|
495 | 495 | | @Callable(i) |
---|
496 | 496 | | func a19 () = ws(i, "a19") |
---|
497 | 497 | | |
---|
498 | 498 | | |
---|
499 | 499 | | |
---|
500 | 500 | | @Callable(i) |
---|
501 | 501 | | func a20 () = sw(i, "a20") |
---|
502 | 502 | | |
---|
503 | 503 | | |
---|
504 | 504 | | |
---|
505 | 505 | | @Callable(i) |
---|
506 | 506 | | func a21 () = ws(i, "a21") |
---|
507 | 507 | | |
---|
508 | 508 | | |
---|
509 | 509 | | |
---|
510 | 510 | | @Callable(i) |
---|
511 | 511 | | func a22 () = sw(i, "a22") |
---|
512 | 512 | | |
---|
513 | 513 | | |
---|
514 | 514 | | |
---|
515 | 515 | | @Callable(i) |
---|
516 | 516 | | func a23 () = ps(i, "a23") |
---|
517 | 517 | | |
---|
518 | 518 | | |
---|
519 | 519 | | |
---|
520 | 520 | | @Callable(i) |
---|
521 | 521 | | func a24 () = sp(i, "a24") |
---|
522 | 522 | | |
---|
523 | 523 | | |
---|
524 | 524 | | |
---|
525 | 525 | | @Callable(i) |
---|
526 | 526 | | func a25 () = ps(i, "a25") |
---|
527 | 527 | | |
---|
528 | 528 | | |
---|
529 | 529 | | |
---|
530 | 530 | | @Callable(i) |
---|
531 | 531 | | func a26 () = sp(i, "a26") |
---|
532 | 532 | | |
---|
533 | 533 | | |
---|
534 | 534 | | |
---|
535 | 535 | | @Callable(i) |
---|
536 | 536 | | func a27 () = ws(i, "a27") |
---|
537 | 537 | | |
---|
538 | 538 | | |
---|
539 | 539 | | |
---|
540 | 540 | | @Callable(i) |
---|
541 | 541 | | func a28 () = sw(i, "a28") |
---|
542 | 542 | | |
---|
543 | 543 | | |
---|
544 | 544 | | |
---|
545 | 545 | | @Callable(i) |
---|
546 | 546 | | func a29 () = ps(i, "a29") |
---|
547 | 547 | | |
---|
548 | 548 | | |
---|
549 | 549 | | |
---|
550 | 550 | | @Callable(i) |
---|
551 | 551 | | func a30 () = sp(i, "a30") |
---|
552 | 552 | | |
---|
553 | 553 | | |
---|
554 | 554 | | |
---|
555 | 555 | | @Callable(i) |
---|
556 | 556 | | func a31 () = pw(i, "a31") |
---|
557 | 557 | | |
---|
558 | 558 | | |
---|
559 | 559 | | |
---|
560 | 560 | | @Callable(i) |
---|
561 | 561 | | func a32 () = wp(i, "a32") |
---|
562 | 562 | | |
---|
563 | 563 | | |
---|
564 | 564 | | |
---|
565 | 565 | | @Callable(i) |
---|
566 | 566 | | func a33 () = pw(i, "a33") |
---|
567 | 567 | | |
---|
568 | 568 | | |
---|
569 | 569 | | |
---|
570 | 570 | | @Callable(i) |
---|
571 | 571 | | func a34 () = wp(i, "a34") |
---|
572 | 572 | | |
---|
573 | 573 | | |
---|