tx · BXYV9dLYWj9GKmZDF1MwFQGz7D8p6AQVjycfHtwUh69e 3MzfaHTFgjznN8zniycq5PZxaenTjwcYLXf: -0.01000000 Waves 2022.02.04 11:46 [1908642] smart account 3MzfaHTFgjznN8zniycq5PZxaenTjwcYLXf > SELF 0.00000000 Waves
{ "type": 13, "id": "BXYV9dLYWj9GKmZDF1MwFQGz7D8p6AQVjycfHtwUh69e", "fee": 1000000, "feeAssetId": null, "timestamp": 1643964445923, "version": 2, "chainId": 84, "sender": "3MzfaHTFgjznN8zniycq5PZxaenTjwcYLXf", "senderPublicKey": "5ate1da9rhtGuHpuEAd28pTGh1GpM8SUthHy4JD2hPeL", "proofs": [ "21v3pMZzeXUPgJ6xsa1gBj7VpuYyA9myEssyrvctAcX5PiC2HHsWMNEhJ7AFahXMH61Ay2n4GALDMBc5pzgFnMHG" ], "script": "base64:AAIFAAAAAAAAAZEIAhIECgIICBIDCgEIEgMKAQgSBAoCCBgSABIAGgYKAUESAXQaDwoBYRIKZXN0RW5Db3VycxoSCgFiEg1jbGFzc2VFbkNvdXJzGhQKAWMSD25vZGVWYWxpZGF0cmljZRoRCgFkEgxnZXRDbGFzc05hbWUaCAoBZRIDbm9tGg8KAWYSCnByb2Zlc3NldXIaEQoBZxIMdmFsaWRlckVsZXZlGggKAWgSA2FjYxoGCgFpEgFlGhMKAWoSDnN0dWRlbnRBZGRyZXNzGhIKAWsSDXN0dWRlbnRTdGF0dXMaCAoBbBIDcmVzGg4KAW0SCXRlc3RWYWxpZBoGCgFuEgFpGgsKAW8SBmVsZXZlcxoMCgFwEgdhZGRyZXNzGgsKAXESBmNsYXNzZRoUCgFyEg9sZWFzZWRFdHVkaWFudHMaBwoBcxICJGwaBwoBdBICJHMaCgoBdRIFJGFjYzAaCgoBdhIFJGYwXzEaBwoBdxICJGEaBwoBeBICJGkaCgoBeRIFJGYwXzIaDAoBehIHJG1hdGNoMAAAAAYAAAAAAWECAAAACmVzdEVuQ291cnMAAAAAAWICAAAADWNsY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908642, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: F9Xq7XH2jHHLA5MJzDmLw5r8wy3iDdcqUpL7pq5weWP7 Next: GhNdUeasmbK7oWCNytN3hBHaNhEt1dS8VLEnvaKCujKz Diff:
Old | New | Differences | |
---|---|---|---|
67 | 67 | func faireAppelEleve () = { | |
68 | 68 | let res = invoke(addressFromStringValue("3N7at66kMSR66wPkY8pvnAcRg711XKkRmW7"), "validationPresence", ["présent", getStringValue(nodeValidatrice)], nil) | |
69 | 69 | if ((res == res)) | |
70 | - | then [IntegerEntry("balance_available", wavesBalance(this).available)] | |
70 | + | then match res { | |
71 | + | case t: Int => | |
72 | + | [IntegerEntry("balance_available", t)] | |
73 | + | case _ => | |
74 | + | throw("Incorrect invoke result") | |
75 | + | } | |
71 | 76 | else throw("Strict value is not equal to itself.") | |
72 | 77 | } | |
73 | 78 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let estEnCours = "estEnCours" | |
5 | 5 | ||
6 | 6 | let classeEnCours = "classeEnCours" | |
7 | 7 | ||
8 | 8 | let nodeValidatrice = "validatorNode" | |
9 | 9 | ||
10 | 10 | func getClassName (nom,professeur) = ((nom + "_") + toString(professeur)) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func validerEleve (acc,e) = { | |
14 | 14 | let studentAddress = addressFromStringValue(take(e, 35)) | |
15 | 15 | let studentStatus = takeRight(e, (size(e) - 34)) | |
16 | 16 | let res = invoke(studentAddress, "validationPresence", [studentStatus, getStringValue(nodeValidatrice)], nil) | |
17 | 17 | if ((res == res)) | |
18 | 18 | then true | |
19 | 19 | else throw("Strict value is not equal to itself.") | |
20 | 20 | } | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func testValid (e) = { | |
24 | 24 | let studentAddress = addressFromStringValue(take(e, 35)) | |
25 | 25 | let studentStatus = takeRight(e, (size(e) - 36)) | |
26 | 26 | unit | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | @Callable(i) | |
31 | 31 | func createOrModifyClass (nom,eleves) = [StringEntry(getClassName(nom, i.caller), eleves)] | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | ||
35 | 35 | @Callable(i) | |
36 | 36 | func deleteClass (nom) = [DeleteEntry(getClassName(nom, i.caller))] | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | ||
40 | 40 | @Callable(i) | |
41 | 41 | func ajouterValidateur (address) = [StringEntry(nodeValidatrice, address)] | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | ||
45 | 45 | @Callable(i) | |
46 | 46 | func faireAppel (classe,eleves) = { | |
47 | 47 | let leasedEtudiants = { | |
48 | 48 | let $l = eleves | |
49 | 49 | let $s = size($l) | |
50 | 50 | let $acc0 = nil | |
51 | 51 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
52 | 52 | then $a | |
53 | 53 | else validerEleve($a, $l[$i]) | |
54 | 54 | ||
55 | 55 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
56 | 56 | then $a | |
57 | 57 | else throw("List size exceeds 30") | |
58 | 58 | ||
59 | 59 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30) | |
60 | 60 | } | |
61 | 61 | [StringEntry(classeEnCours, getClassName(classe, i.caller)), BooleanEntry(estEnCours, true)] | |
62 | 62 | } | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | ||
66 | 66 | @Callable(i) | |
67 | 67 | func faireAppelEleve () = { | |
68 | 68 | let res = invoke(addressFromStringValue("3N7at66kMSR66wPkY8pvnAcRg711XKkRmW7"), "validationPresence", ["présent", getStringValue(nodeValidatrice)], nil) | |
69 | 69 | if ((res == res)) | |
70 | - | then [IntegerEntry("balance_available", wavesBalance(this).available)] | |
70 | + | then match res { | |
71 | + | case t: Int => | |
72 | + | [IntegerEntry("balance_available", t)] | |
73 | + | case _ => | |
74 | + | throw("Incorrect invoke result") | |
75 | + | } | |
71 | 76 | else throw("Strict value is not equal to itself.") | |
72 | 77 | } | |
73 | 78 | ||
74 | 79 | ||
75 | 80 | ||
76 | 81 | @Callable(i) | |
77 | 82 | func arreterCours () = [StringEntry(classeEnCours, ""), BooleanEntry(estEnCours, false)] | |
78 | 83 | ||
79 | 84 |
github/deemru/w8io/169f3d6 24.14 ms ◑