tx · 6uZxAZLecYiN59Mf9kgAmyUXQD1QXNZ71BuJhEfQpVrK

3NB5aspKqF3QnFUwAHVRq6vk6v2UqBGMMDy:  -0.01000000 Waves

2022.02.09 10:45 [1915807] smart account 3NB5aspKqF3QnFUwAHVRq6vk6v2UqBGMMDy > SELF 0.00000000 Waves

{ "type": 13, "id": "6uZxAZLecYiN59Mf9kgAmyUXQD1QXNZ71BuJhEfQpVrK", "fee": 1000000, "feeAssetId": null, "timestamp": 1644392762171, "version": 2, "chainId": 84, "sender": "3NB5aspKqF3QnFUwAHVRq6vk6v2UqBGMMDy", "senderPublicKey": "4S8F79Me9f9R6fzGZZjKBNfF79og2MpdmnNgfxQpwNEF", "proofs": [ "2Q2NAgMoBn43XEvhpdzbNLuuFoaBBZ5qBp1Mr5ejHv4rSG5KWSbyFTu99x41GjLAFznaFxwUjWeVUMstFMmtPnjC" ], "script": "base64:AAIFAAAAAAAAABoIAhIECgIICBIDCgEIEgMKAQgSBAoCCBgSAAAAAAQAAAAACmVzdEVuQ291cnMCAAAACmVzdEVuQ291cnMAAAAADWNsYXNzZUVuQ291cnMCAAAADWNsYXNzZUVuQ291cnMAAAAAD25vZGVWYWxpZGF0cmljZQIAAAANdmFsaWRhdG9yTm9kZQEAAAAMZ2V0Q2xhc3NOYW1lAAAAAgAAAANub20AAAAKcHJvZmVzc2V1cgkAASwAAAACCQABLAAAAAIFAAAAA25vbQIAAAABXwkABCUAAAABBQAAAApwcm9mZXNzZXVyAAAABQAAAAFpAQAAABNjcmVhdGVPck1vZGlmeUNsYXNzAAAAAgAAAANub20AAAAGZWxldmVzCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAQAAAAxnZXRDbGFzc05hbWUAAAACBQAAAANub20IBQAAAAFpAAAABmNhbGxlcgUAAAAGZWxldmVzBQAAAANuaWwAAAABaQEAAAALZGVsZXRlQ2xhc3MAAAABAAAAA25vbQkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAAMZ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hbkVudHJ5AAAAAgUAAAAKZXN0RW5Db3VycwYFAAAAA25pbAkAAAIAAAABAgAAABdJbmNvcnJlY3QgaW52b2tlIHJlc3VsdAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABaQEAAAAMYXJyZXRlckNvdXJzAAAAAAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACBQAAAA1jbGFzc2VFbkNvdXJzAgAAAAAJAARMAAAAAgkBAAAADEJvb2xlYW5FbnRyeQAAAAIFAAAACmVzdEVuQ291cnMHBQAAAANuaWwAAAAAO6VZEw==", "height": 1915807, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4kaotRMjVT8amCvF1AVBv4JujqcnRUuLUfimaUsZR2my Next: 3xVt2MPndzepGCPcokDPg1ZBfGGEzQ98ZgZHCvofZ3EA Diff:
OldNewDifferences
88 let nodeValidatrice = "validatorNode"
99
1010 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-func testValid (e) = {
24- let studentAddress = addressFromStringValue(take(e, 35))
25- let studentStatus = takeRight(e, (size(e) - 36))
26- unit
27- }
2811
2912
3013 @Callable(i)
4326
4427
4528 @Callable(i)
46-func faireAppel (classe,eleves) = {
47- let leasedEtudiants = {
48- let $l = eleves
49- let $s = size($l)
50- let $acc0 = nil
51- func $f0_1 ($a,$i) = if (($i >= $s))
52- then $a
53- else validerEleve($a, $l[$i])
54-
55- func $f0_2 ($a,$i) = if (($i >= $s))
56- then $a
57- else throw("List size exceeds 30")
58-
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- }
61-[StringEntry(classeEnCours, getClassName(classe, i.caller)), BooleanEntry(estEnCours, true)]
62- }
63-
64-
65-
66-@Callable(i)
67-func faireAppelEleve () = {
68- let res = invoke(addressFromStringValue("3N9bnBDbTLpgTYvhezFE8rSJyMEBBTH927Q"), "validationPresence", ["présent", getStringValue(nodeValidatrice)], nil)
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)
6935 if ((res == res))
7036 then match res {
7137 case t: Int =>
72-[IntegerEntry("balance_available", t)]
38+[StringEntry(classeEnCours, getClassName(classe, i.caller)), BooleanEntry(estEnCours, true)]
7339 case _ =>
7440 throw("Incorrect invoke result")
7541 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let estEnCours = "estEnCours"
55
66 let classeEnCours = "classeEnCours"
77
88 let nodeValidatrice = "validatorNode"
99
1010 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-func testValid (e) = {
24- let studentAddress = addressFromStringValue(take(e, 35))
25- let studentStatus = takeRight(e, (size(e) - 36))
26- unit
27- }
2811
2912
3013 @Callable(i)
3114 func createOrModifyClass (nom,eleves) = [StringEntry(getClassName(nom, i.caller), eleves)]
3215
3316
3417
3518 @Callable(i)
3619 func deleteClass (nom) = [DeleteEntry(getClassName(nom, i.caller))]
3720
3821
3922
4023 @Callable(i)
4124 func ajouterValidateur (address) = [StringEntry(nodeValidatrice, address)]
4225
4326
4427
4528 @Callable(i)
46-func faireAppel (classe,eleves) = {
47- let leasedEtudiants = {
48- let $l = eleves
49- let $s = size($l)
50- let $acc0 = nil
51- func $f0_1 ($a,$i) = if (($i >= $s))
52- then $a
53- else validerEleve($a, $l[$i])
54-
55- func $f0_2 ($a,$i) = if (($i >= $s))
56- then $a
57- else throw("List size exceeds 30")
58-
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- }
61-[StringEntry(classeEnCours, getClassName(classe, i.caller)), BooleanEntry(estEnCours, true)]
62- }
63-
64-
65-
66-@Callable(i)
67-func faireAppelEleve () = {
68- let res = invoke(addressFromStringValue("3N9bnBDbTLpgTYvhezFE8rSJyMEBBTH927Q"), "validationPresence", ["présent", getStringValue(nodeValidatrice)], nil)
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)
6935 if ((res == res))
7036 then match res {
7137 case t: Int =>
72-[IntegerEntry("balance_available", t)]
38+[StringEntry(classeEnCours, getClassName(classe, i.caller)), BooleanEntry(estEnCours, true)]
7339 case _ =>
7440 throw("Incorrect invoke result")
7541 }
7642 else throw("Strict value is not equal to itself.")
7743 }
7844
7945
8046
8147 @Callable(i)
8248 func arreterCours () = [StringEntry(classeEnCours, ""), BooleanEntry(estEnCours, false)]
8349
8450

github/deemru/w8io/169f3d6 
37.73 ms