tx · 2QxSwfAxNeqNLvYRPf5FwjKpBeQj7pLWhQgffx4WbdnC 3N2jsvVe7RDUfQyG4qacJ8cWCsf1TtsgLx8: -0.01000000 Waves 2022.04.11 19:07 [2004143] smart account 3N2jsvVe7RDUfQyG4qacJ8cWCsf1TtsgLx8 > SELF 0.00000000 Waves
{ "type": 13, "id": "2QxSwfAxNeqNLvYRPf5FwjKpBeQj7pLWhQgffx4WbdnC", "fee": 1000000, "feeAssetId": null, "timestamp": 1649693285192, "version": 2, "chainId": 84, "sender": "3N2jsvVe7RDUfQyG4qacJ8cWCsf1TtsgLx8", "senderPublicKey": "6KhGr8dbZADY1xuMXMi5A2tSMq3Rhd5dofJvu6qR38PW", "proofs": [ "3QfvHo1sdVWBV6u1LhAFeExT9xBKBMkbaELJDp882PdHLXaB3YBBpJ1cmiaqoiHqMvTHHgjqBcc7RyVZQjNKcz6o" ], "script": "base64:AAIFAAAAAAAAABoIAhIECgIICBIDCgEIEgMKAQgSBAoCCBgSAAAAAAQAAAAACmVzdEVuQ291cnMCAAAACmVzdEVuQ291cnMAAAAADWNsYXNzZUVuQ291cnMCAAAADWNsYXNzZUVuQ291cnMAAAAAD25vZGVWYWxpZGF0cmljZQIAAAANdmFsaWRhdG9yTm9kZQEAAAAMZ2V0Q2xhc3NOYW1lAAAAAgAAAANub20AAAAKcHJvZmVzc2V1cgkAASwAAAACCQABLAAAAAIFAAAAA25vbQIAAAABXwkABCUAAAABBQAAAApwcm9mZXNzZXVyAAAABQAAAAFpAQAAABNjcmVhdGVPck1vZGlmeUNsYXNzAAAAAgAAAANub20AAAAGZWxldmVzCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAQAAAAxnZXRDbGFzc05hbWUAAAACBQAAAANub20IBQAAAAFpAAAABmNhbGxlcgUAAAAGZWxldmVzBQAAAANuaWwAAAABaQEAAAALZGVsZXRlQ2xhc3MAAAABAAAAA25vbQkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAA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bGVhbkVudHJ5AAAAAgUAAAAKZXN0RW5Db3VycwYFAAAAA25pbAkAAAIAAAABAgAAABdJbmNvcnJlY3QgaW52b2tlIHJlc3VsdAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABaQEAAAAMYXJyZXRlckNvdXJzAAAAAAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACBQAAAA1jbGFzc2VFbkNvdXJzAgAAAAAJAARMAAAAAgkBAAAADEJvb2xlYW5FbnRyeQAAAAIFAAAACmVzdEVuQ291cnMHBQAAAANuaWwAAAAAO6VZEw==", "height": 2004143, "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 | + | @Callable(i) | |
14 | + | func createOrModifyClass (nom,eleves) = [StringEntry(getClassName(nom, i.caller), eleves)] | |
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | @Callable(i) | |
19 | + | func deleteClass (nom) = [DeleteEntry(getClassName(nom, i.caller))] | |
20 | + | ||
21 | + | ||
22 | + | ||
23 | + | @Callable(i) | |
24 | + | func ajouterValidateur (address) = [StringEntry(nodeValidatrice, address)] | |
25 | + | ||
26 | + | ||
27 | + | ||
28 | + | @Callable(i) | |
29 | + | func faireAppelEleve (classe,adresses) = { | |
30 | + | let e = adresses[0] | |
31 | + | let list = removeByIndex(adresses, 0) | |
32 | + | let studentAddress = addressFromStringValue(take(e, 35)) | |
33 | + | let studentStatus = takeRight(e, (size(e) - 36)) | |
34 | + | let res = invoke(studentAddress, "validationPresence", [studentStatus, getStringValue(nodeValidatrice), list], nil) | |
35 | + | if ((res == res)) | |
36 | + | then match res { | |
37 | + | case t: Int => | |
38 | + | [StringEntry(classeEnCours, getClassName(classe, i.caller)), BooleanEntry(estEnCours, true)] | |
39 | + | case _ => | |
40 | + | throw("Incorrect invoke result") | |
41 | + | } | |
42 | + | else throw("Strict value is not equal to itself.") | |
43 | + | } | |
44 | + | ||
45 | + | ||
46 | + | ||
47 | + | @Callable(i) | |
48 | + | func arreterCours () = [StringEntry(classeEnCours, ""), BooleanEntry(estEnCours, false)] | |
49 | + | ||
50 | + |
github/deemru/w8io/169f3d6 20.22 ms ◑