tx · 69LmamXizN3SjWjzB5BkfR8ib9gwxcGXYgzNTjBMyzzm 3MzfaHTFgjznN8zniycq5PZxaenTjwcYLXf: -0.01000000 Waves 2022.02.04 17:14 [1908977] smart account 3MzfaHTFgjznN8zniycq5PZxaenTjwcYLXf > SELF 0.00000000 Waves
{ "type": 13, "id": "69LmamXizN3SjWjzB5BkfR8ib9gwxcGXYgzNTjBMyzzm", "fee": 1000000, "feeAssetId": null, "timestamp": 1643984059098, "version": 2, "chainId": 84, "sender": "3MzfaHTFgjznN8zniycq5PZxaenTjwcYLXf", "senderPublicKey": "5ate1da9rhtGuHpuEAd28pTGh1GpM8SUthHy4JD2hPeL", "proofs": [ "2tz2vUidi8XcCpc82VAgENefLfyjcKQsCaQsKZnXtabtdHpQWnNSa5aYQ7L44E5d17fbp35VkvQ9LXMcKxjXuKgp" ], "script": "base64:AAIFAAAAAAAAABwIAhIECgIICBIDCgEIEgMKAQgSBAoCCBgSABIAAAAABgAAAAAKZXN0RW5Db3VycwIAAAAKZXN0RW5Db3VycwAAAAANY2xhc3NlRW5Db3VycwIAAAANY2xhc3NlRW5Db3VycwAAAAAPbm9kZVZhbGlkYXRyaWNlAgAAAA12YWxpZGF0b3JOb2RlAQAAAAxnZXRDbGFzc05hbWUAAAACAAAAA25vbQAAAApwcm9mZXNzZXVyCQABLAAAAAIJAAEsAAAAAgUAAAADbm9tAgAAAAFfCQAEJQAAAAEFAAAACnByb2Zlc3NldXIBAAAADHZhbGlkZXJFbGV2ZQAAAAIAAAADYWNjAAAAAWUEAAAADnN0dWRlbnRBZGRyZXNzCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABCQABLwAAAAIFAAAAAWUAAAAAAAAAACMEAAAADXN0dWRlbnRTdGF0dXMJAQAAAAl0YWtlUmlnaHQAAAACBQAAAAFlCQAAZQAAAAIJAAExAAAAAQUAAAABZQAAAAAAAAAAIgQAAAADcmVzCQAD/AAAAAQFAAAADnN0dWRlbnRBZGRyZXNzAgAAABJ2YW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2MikAAAABCQABLwAAAAIFAAAAAWUAAAAAAAAAACMEAAAADXN0dWRlbnRTdGF0dXMJAQAAAAl0YWtlUmlnaHQAAAACBQAAAAFlCQAAZQAAAAIJAAExAAAAAQUAAAABZQAAAAAAAAAAIgQAAAADcmVzCQAD/AAAAAQFAAAADnN0dWRlbnRBZGRyZXNzAgAAABJ2YWxpZGF0aW9uUHJlc2VuY2UJAARMAAAAAgUAAAANc3R1ZGVudFN0YXR1cwkABEwAAAACCQEAAAARQGV4dHJOYXRpdmUoMTA1OCkAAAABBQAAAA9ub2RlVmFsaWRhdHJpY2UFAAAAA25pbAUAAAADbmlsAwkAAAAAAAACBQAAAANyZXMFAAAAA3JlcwQAAAAHJG1hdGNoMAUAAAADcmVzAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAXQFAAAAByRtYXRjaDAFAAAAA25pbAkAAAIAAAABAgAAABdJbmNvcnJlY3QgaW52b2tlIHJlc3VsdAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABaQEAAAAMYXJyZXRlckNvdXJzAAAAAAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACBQAAAA1jbGFzc2VFbkNvdXJzAgAAAAAJAARMAAAAAgkBAAAADEJvb2xlYW5FbnRyeQAAAAIFAAAACmVzdEVuQ291cnMHBQAAAANuaWwAAAAA+wfFOg==", "height": 1908977, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7iA2pLjzCmVT3RJZzZ2rWD4djaMxWFHadmUc8j8k5Uy5 Next: 4AWG8csNWjarix7SEaPgPnNzBCZ1bVxvM616JsnFUjjK Diff:
Old | New | Differences | |
---|---|---|---|
73 | 73 | ||
74 | 74 | @Callable(i) | |
75 | 75 | func faireAppelEleve () = { | |
76 | - | let a = testValid("3N5RAMPJE4xs7mfEqKaHmhuWgVjXbK6dfGc_présent") | |
77 | - | nil | |
76 | + | let e = "3N5RAMPJE4xs7mfEqKaHmhuWgVjXbK6dfGc_présent" | |
77 | + | let studentAddress = addressFromStringValue(take(e, 35)) | |
78 | + | let studentStatus = takeRight(e, (size(e) - 34)) | |
79 | + | let res = invoke(studentAddress, "validationPresence", [studentStatus, getStringValue(nodeValidatrice)], nil) | |
80 | + | if ((res == res)) | |
81 | + | then match res { | |
82 | + | case t: Int => | |
83 | + | nil | |
84 | + | case _ => | |
85 | + | throw("Incorrect invoke result") | |
86 | + | } | |
87 | + | else throw("Strict value is not equal to itself.") | |
78 | 88 | } | |
79 | 89 | ||
80 | 90 |
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 match res { | |
29 | 29 | case t: Int => | |
30 | 30 | t | |
31 | 31 | case _ => | |
32 | 32 | throw("Incorrect invoke result") | |
33 | 33 | } | |
34 | 34 | else throw("Strict value is not equal to itself.") | |
35 | 35 | } | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | @Callable(i) | |
39 | 39 | func createOrModifyClass (nom,eleves) = [StringEntry(getClassName(nom, i.caller), eleves)] | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | ||
43 | 43 | @Callable(i) | |
44 | 44 | func deleteClass (nom) = [DeleteEntry(getClassName(nom, i.caller))] | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | ||
48 | 48 | @Callable(i) | |
49 | 49 | func ajouterValidateur (address) = [StringEntry(nodeValidatrice, address)] | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | ||
53 | 53 | @Callable(i) | |
54 | 54 | func faireAppel (classe,eleves) = { | |
55 | 55 | let leasedEtudiants = { | |
56 | 56 | let $l = eleves | |
57 | 57 | let $s = size($l) | |
58 | 58 | let $acc0 = nil | |
59 | 59 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
60 | 60 | then $a | |
61 | 61 | else validerEleve($a, $l[$i]) | |
62 | 62 | ||
63 | 63 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
64 | 64 | then $a | |
65 | 65 | else throw("List size exceeds 30") | |
66 | 66 | ||
67 | 67 | $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) | |
68 | 68 | } | |
69 | 69 | [StringEntry(classeEnCours, getClassName(classe, i.caller)), BooleanEntry(estEnCours, true)] | |
70 | 70 | } | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | ||
74 | 74 | @Callable(i) | |
75 | 75 | func faireAppelEleve () = { | |
76 | - | let a = testValid("3N5RAMPJE4xs7mfEqKaHmhuWgVjXbK6dfGc_présent") | |
77 | - | nil | |
76 | + | let e = "3N5RAMPJE4xs7mfEqKaHmhuWgVjXbK6dfGc_présent" | |
77 | + | let studentAddress = addressFromStringValue(take(e, 35)) | |
78 | + | let studentStatus = takeRight(e, (size(e) - 34)) | |
79 | + | let res = invoke(studentAddress, "validationPresence", [studentStatus, getStringValue(nodeValidatrice)], nil) | |
80 | + | if ((res == res)) | |
81 | + | then match res { | |
82 | + | case t: Int => | |
83 | + | nil | |
84 | + | case _ => | |
85 | + | throw("Incorrect invoke result") | |
86 | + | } | |
87 | + | else throw("Strict value is not equal to itself.") | |
78 | 88 | } | |
79 | 89 | ||
80 | 90 | ||
81 | 91 | ||
82 | 92 | @Callable(i) | |
83 | 93 | func arreterCours () = [StringEntry(classeEnCours, ""), BooleanEntry(estEnCours, false)] | |
84 | 94 | ||
85 | 95 |
github/deemru/w8io/169f3d6 23.89 ms ◑