tx · 4kaotRMjVT8amCvF1AVBv4JujqcnRUuLUfimaUsZR2my 3NB5aspKqF3QnFUwAHVRq6vk6v2UqBGMMDy: -0.01000000 Waves 2022.02.08 13:24 [1914523] smart account 3NB5aspKqF3QnFUwAHVRq6vk6v2UqBGMMDy > SELF 0.00000000 Waves
{ "type": 13, "id": "4kaotRMjVT8amCvF1AVBv4JujqcnRUuLUfimaUsZR2my", "fee": 1000000, "feeAssetId": null, "timestamp": 1644315895826, "version": 2, "chainId": 84, "sender": "3NB5aspKqF3QnFUwAHVRq6vk6v2UqBGMMDy", "senderPublicKey": "4S8F79Me9f9R6fzGZZjKBNfF79og2MpdmnNgfxQpwNEF", "proofs": [ "5oGZ89RhdXdCdfP8FeZY7xZzMqN8rTurpUS1EpK6kKxB5DXHSCW3kUX3NkMq4K9WwQGsmZvmGaecNo9V8yjt4uQX" ], "script": "base64:AAIFAAAAAAAAABwIAhIECgIICBIDCgEIEgMKAQgSBAoCCBgSABIAAAAABgAAAAAKZXN0RW5Db3VycwIAAAAKZXN0RW5Db3VycwAAAAANY2xhc3NlRW5Db3VycwIAAAANY2xhc3NlRW5Db3VycwAAAAAPbm9kZVZhbGlkYXRyaWNlAgAAAA12YWxpZGF0b3JOb2RlAQAAAAxnZXRDbGFzc05hbWUAAAACAAAAA25vbQAAAApwcm9mZXNzZXVyCQABLAAAAAIJAAEsAAAAAgUAAAADbm9tAgAAAAFfCQAEJQAAAAEFAAAACnByb2Zlc3NldXIBAAAADHZhbGlkZXJFbGV2ZQAAAAIAAAADYWNjAAAAAWUEAAAADnN0dWRlbnRBZGRyZXNzCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABCQABLwAAAAIFAAAAAWUAAAAAAAAAACMEAAAADXN0dWRlbnRTdGF0dXMJAQAAAAl0YWtlUmlnaHQAAAACBQAAAAFlCQAAZQAAAAIJAAExAAAAAQUAAAABZQAAAAAAAAAAIgQAAAADcmVzCQAD/AAAAAQFAAAADnN0dWRlbnRBZGRyZXNz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UgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABaQEAAAAMYXJyZXRlckNvdXJzAAAAAAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACBQAAAA1jbGFzc2VFbkNvdXJzAgAAAAAJAARMAAAAAgkBAAAADEJvb2xlYW5FbnRyeQAAAAIFAAAACmVzdEVuQ291cnMHBQAAAANuaWwAAAAAtypc4Q==", "height": 1914523, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4p8iLQAAyAJczK9CkkLCE6oB8Rsjx91GvrVF6vbJojMq Next: 6uZxAZLecYiN59Mf9kgAmyUXQD1QXNZ71BuJhEfQpVrK 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 | 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("3N9bnBDbTLpgTYvhezFE8rSJyMEBBTH927Q"), "validationPresence", ["présent", getStringValue(nodeValidatrice)], nil) | |
69 | 69 | if ((res == res)) | |
70 | 70 | then match res { | |
71 | 71 | case t: Int => | |
72 | 72 | [IntegerEntry("balance_available", t)] | |
73 | 73 | case _ => | |
74 | 74 | throw("Incorrect invoke result") | |
75 | 75 | } | |
76 | 76 | else throw("Strict value is not equal to itself.") | |
77 | 77 | } | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | ||
81 | 81 | @Callable(i) | |
82 | 82 | func arreterCours () = [StringEntry(classeEnCours, ""), BooleanEntry(estEnCours, false)] | |
83 | 83 | ||
84 | 84 |
github/deemru/w8io/169f3d6 36.09 ms ◑