tx · BLCEiUSstwCFJa95zPT7UaabQcwY4oQVRFEbqqQe3Qxy 3N82Eb4mgHvfJRC8hmyxPGcK3opRRpVvDu9: -0.01000000 Waves 2022.02.03 17:56 [1907568] smart account 3N82Eb4mgHvfJRC8hmyxPGcK3opRRpVvDu9 > SELF 0.00000000 Waves
{ "type": 13, "id": "BLCEiUSstwCFJa95zPT7UaabQcwY4oQVRFEbqqQe3Qxy", "fee": 1000000, "feeAssetId": null, "timestamp": 1643900178292, "version": 2, "chainId": 84, "sender": "3N82Eb4mgHvfJRC8hmyxPGcK3opRRpVvDu9", "senderPublicKey": "2zHW9aZiW1xoKVRsWs6kLRvC2Sm2TnmygRDPvhcexK81", "proofs": [ "3fJvLKaYwnsHvvRdq6mw6zWhFbU4UoADNC2JDSwg4HUAaPWN3ntPwW721ficCGRzZyK1tXz9e6e6i5C3PUna4Zxp" ], "script": "base64:AAIFAAAAAAAAAWkIAhIECgIICBIDCgEIEgMKAQgSBAoCCBgSABoPCgFhEgplc3RFbkNvdXJzGhIKAWISDWNsYXNzZUVuQ291cnMaFAoBYxIPbm9kZVZhbGlkYXRyaWNlGhEKAWQSDGdldENsYXNzTmFtZRoICgFlEgNub20aDwoBZhIKcHJvZmVzc2V1choRCgFnEgx2YWxpZGVyRWxldmUaCAoBaBIDYWNjGgYKAWkSAWUaEwoBahIOc3R1ZGVudEFkZHJlc3MaEgoBaxINc3R1ZGVudFN0YXR1cxoICgFsEgNyZXMaBgoBbRIBaRoLCgFuEgZlbGV2ZXMaDAoBbxIHYWRkcmVzcxoLCgFwEgZjbGFzc2UaFAoBcRIPbGVhc2VkRXR1ZGlhbnRzGgcKAXISAiRsGgcKAXMSAiRzGgoKAXQSBSRhY2MwGgoKAXUSBSRmMF8xGgcKAXYSAiRhGgcKAXcSAiRpGgoKAXgSBSRmMF8yAAAABQAAAAABYQIAAAAKZXN0RW5Db3VycwAAAAABYgIAAAANY2xhc3NlRW5Db3VycwAAAAABYwIAAAANdmFsaWRhdG9yTm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AAgUAAAABYgkBAAAAAWQAAAACBQAAAAFwCAUAAAABbQAAAAZjYWxsZXIJAARMAAAAAgkBAAAADEJvb2xlYW5FbnRyeQAAAAIFAAAAAWEGBQAAAANuaWwAAAABbQEAAAAMYXJyZXRlckNvdXJzAAAAAAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACBQAAAAFiAgAAAAAJAARMAAAAAgkBAAAADEJvb2xlYW5FbnRyeQAAAAIFAAAAAWEHBQAAAANuaWwAAAAAURXxMg==", "height": 1907568, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let estEnCours = "estEnCours" | |
5 | + | ||
6 | + | let classeEnCours = "classeEnCours" | |
7 | + | ||
8 | + | let nodeValidatrice = "validatorNode" | |
9 | + | ||
10 | + | func getClassName (nom,professeur) = ((nom + "_") + toString(professeur)) | |
11 | + | ||
12 | + | ||
13 | + | func validerEleve (acc,e) = { | |
14 | + | let studentAddress = addressFromStringValue(take(e, 35)) | |
15 | + | let studentStatus = takeRight(e, (size(e) - 34)) | |
16 | + | let res = invoke(studentAddress, "validationPresence", [studentStatus, getStringValue(nodeValidatrice)], nil) | |
17 | + | if ((res == res)) | |
18 | + | then true | |
19 | + | else throw("Strict value is not equal to itself.") | |
20 | + | } | |
21 | + | ||
22 | + | ||
23 | + | @Callable(i) | |
24 | + | func createOrModifyClass (nom,eleves) = [StringEntry(getClassName(nom, i.caller), eleves)] | |
25 | + | ||
26 | + | ||
27 | + | ||
28 | + | @Callable(i) | |
29 | + | func deleteClass (nom) = [DeleteEntry(getClassName(nom, i.caller))] | |
30 | + | ||
31 | + | ||
32 | + | ||
33 | + | @Callable(i) | |
34 | + | func ajouterValidateur (address) = [StringEntry(nodeValidatrice, address)] | |
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | @Callable(i) | |
39 | + | func faireAppel (classe,eleves) = { | |
40 | + | let leasedEtudiants = { | |
41 | + | let $l = eleves | |
42 | + | let $s = size($l) | |
43 | + | let $acc0 = nil | |
44 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
45 | + | then $a | |
46 | + | else validerEleve($a, $l[$i]) | |
47 | + | ||
48 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
49 | + | then $a | |
50 | + | else throw("List size exceeds 30") | |
51 | + | ||
52 | + | $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) | |
53 | + | } | |
54 | + | [StringEntry(classeEnCours, getClassName(classe, i.caller)), BooleanEntry(estEnCours, true)] | |
55 | + | } | |
56 | + | ||
57 | + | ||
58 | + | ||
59 | + | @Callable(i) | |
60 | + | func arreterCours () = [StringEntry(classeEnCours, ""), BooleanEntry(estEnCours, false)] | |
61 | + | ||
62 | + |
github/deemru/w8io/026f985 22.86 ms ◑