tx · EUh9Qx5FboNKj7Y3uHWj7pChHc73nWJmu7JZEmvi2Fz4 3MzfaHTFgjznN8zniycq5PZxaenTjwcYLXf: -0.01000000 Waves 2022.02.04 00:41 [1907983] smart account 3MzfaHTFgjznN8zniycq5PZxaenTjwcYLXf > SELF 0.00000000 Waves
{ "type": 13, "id": "EUh9Qx5FboNKj7Y3uHWj7pChHc73nWJmu7JZEmvi2Fz4", "fee": 1000000, "feeAssetId": null, "timestamp": 1643924527629, "version": 2, "chainId": 84, "sender": "3MzfaHTFgjznN8zniycq5PZxaenTjwcYLXf", "senderPublicKey": "5ate1da9rhtGuHpuEAd28pTGh1GpM8SUthHy4JD2hPeL", "proofs": [ "4LShJ5JMiCrZPU2j7boGSrk1bJ7gEQDCwatQT2c4CYrqCBqUmxzpyVV1LLTQy5wb5dUeaVw7xe6t9HHeaN6GhoJk" ], "script": "base64:AAIFAAAAAAAAAYcIAhIECgIICBIDCgEIEgMKAQgSBAoCCBgSABIAGg8KAWESCmVzdEVuQ291cnMaEgoBYhINY2xhc3NlRW5Db3VycxoUCgFjEg9ub2RlVmFsaWRhdHJpY2UaEQoBZBIMZ2V0Q2xhc3NOYW1lGggKAWUSA25vbRoPCgFmEgpwcm9mZXNzZXVyGhEKAWcSDHZhbGlkZXJFbGV2ZRoICgFoEgNhY2MaBgoBaRIBZRoTCgFqEg5zdHVkZW50QWRkcmVzcxoSCgFrEg1zdHVkZW50U3RhdHVzGggKAWwSA3JlcxoOCgFtEgl0ZXN0VmFsaWQaBgoBbhIBaRoLCgFvEgZlbGV2ZXMaDAoBcBIHYWRkcmVzcxoLCgFxEgZjbGFzc2UaFAoBchIPbGVhc2VkRXR1ZGlhbnRzGgcKAXMSAiRsGgcKAXQSAiRzGgoKAXUSBSRhY2MwGgoKAXYSBSRmMF8xGgcKAXcSAiRhGgcKAXgSAiRpGgoKAXkSBSRmMF8yGgoKAXoSBWVsZXZlAAAABgAAAAABYQIAAAAKZXN0RW5Db3VycwAAAAABYgIAAAAN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AAF2AAAAAgkBAAAAAXYAAAACCQEAAAABdgAAAAIJAQAAAAF2AAAAAgUAAAABdQAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAgAAAAAAAAAAAwAAAAAAAAAABAAAAAAAAAAABQAAAAAAAAAABgAAAAAAAAAABwAAAAAAAAAACAAAAAAAAAAACQAAAAAAAAAACgAAAAAAAAAACwAAAAAAAAAADAAAAAAAAAAADQAAAAAAAAAADgAAAAAAAAAADwAAAAAAAAAAEAAAAAAAAAAAEQAAAAAAAAAAEgAAAAAAAAAAEwAAAAAAAAAAFAAAAAAAAAAAFQAAAAAAAAAAFgAAAAAAAAAAFwAAAAAAAAAAGAAAAAAAAAAAGQAAAAAAAAAAGgAAAAAAAAAAGwAAAAAAAAAAHAAAAAAAAAAAHQAAAAAAAAAAHgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACBQAAAAFiCQEAAAABZAAAAAIFAAAAAXEIBQAAAAFuAAAABmNhbGxlcgkABEwAAAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgUAAAABYQYFAAAAA25pbAAAAAFuAQAAAA9mYWlyZUFwcGVsRWxldmUAAAAABAAAAAF6CQEAAAABbQAAAAECAAAALDNON2F0NjZrTVNSNjZ3UGtZOHB2bkFjUmc3MTFYS2tSbVc3X3Byw6lzZW50CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAABFiYWxhbmNlX2F2YWlsYWJsZQgJAAPvAAAAAQUAAAAEdGhpcwAAAAlhdmFpbGFibGUFAAAAA25pbAAAAAFuAQAAAAxhcnJldGVyQ291cnMAAAAACQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIFAAAAAWICAAAAAAkABEwAAAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgUAAAABYQcFAAAAA25pbAAAAACbIr2v", "height": 1907983, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: J1cHcUs86eUiuDbX1SehqrPzsERJShxfWi7PGWcQvwC9 Next: F9Xq7XH2jHHLA5MJzDmLw5r8wy3iDdcqUpL7pq5weWP7 Full:
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 | let res = invoke(studentAddress, "validationPresence", [studentStatus, getStringValue(nodeValidatrice)], nil) | |
27 | 27 | if ((res == res)) | |
28 | 28 | then unit | |
29 | 29 | else throw("Strict value is not equal to itself.") | |
30 | 30 | } | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | @Callable(i) | |
34 | 34 | func createOrModifyClass (nom,eleves) = [StringEntry(getClassName(nom, i.caller), eleves)] | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | ||
38 | 38 | @Callable(i) | |
39 | 39 | func deleteClass (nom) = [DeleteEntry(getClassName(nom, i.caller))] | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | ||
43 | 43 | @Callable(i) | |
44 | 44 | func ajouterValidateur (address) = [StringEntry(nodeValidatrice, address)] | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | ||
48 | 48 | @Callable(i) | |
49 | 49 | func faireAppel (classe,eleves) = { | |
50 | 50 | let leasedEtudiants = { | |
51 | 51 | let $l = eleves | |
52 | 52 | let $s = size($l) | |
53 | 53 | let $acc0 = nil | |
54 | 54 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
55 | 55 | then $a | |
56 | 56 | else validerEleve($a, $l[$i]) | |
57 | 57 | ||
58 | 58 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
59 | 59 | then $a | |
60 | 60 | else throw("List size exceeds 30") | |
61 | 61 | ||
62 | 62 | $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) | |
63 | 63 | } | |
64 | 64 | [StringEntry(classeEnCours, getClassName(classe, i.caller)), BooleanEntry(estEnCours, true)] | |
65 | 65 | } | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | ||
69 | 69 | @Callable(i) | |
70 | 70 | func faireAppelEleve () = { | |
71 | 71 | let eleve = testValid("3N7at66kMSR66wPkY8pvnAcRg711XKkRmW7_présent") | |
72 | 72 | [IntegerEntry("balance_available", wavesBalance(this).available)] | |
73 | 73 | } | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | ||
77 | 77 | @Callable(i) | |
78 | 78 | func arreterCours () = [StringEntry(classeEnCours, ""), BooleanEntry(estEnCours, false)] | |
79 | 79 | ||
80 | 80 |
github/deemru/w8io/169f3d6 32.53 ms ◑