tx · 2Khfz5bxogDPT8iQBGiZsTkSYBAY86U3nJ1ggqTzmnig 3N9bnBDbTLpgTYvhezFE8rSJyMEBBTH927Q: -0.01000000 Waves 2022.02.04 00:32 [1907974] smart account 3N9bnBDbTLpgTYvhezFE8rSJyMEBBTH927Q > SELF 0.00000000 Waves
{ "type": 13, "id": "2Khfz5bxogDPT8iQBGiZsTkSYBAY86U3nJ1ggqTzmnig", "fee": 1000000, "feeAssetId": null, "timestamp": 1643924031692, "version": 2, "chainId": 84, "sender": "3N9bnBDbTLpgTYvhezFE8rSJyMEBBTH927Q", "senderPublicKey": "5tuiuQhSLUFHipVYrx5LHsWSRaDfEFeJCoXdGBKeuwr1", "proofs": [ "1hmAqcdBSExQV3Ja5cp1iL6vy7TKwFn7zr8UWAG1jRPmFUkXDGngFjMHcpWuhu4CkmYt244gmwqTbLLGQu9Xn8t" ], "script": "base64:AAIFAAAAAAAAASYIAhIECgIICBoQCgFhEgtwcmVzZW5jZUtleRoPCgFiEgphYnNlbmNlS2V5Gg8KAWMSCnRvdGFsQ291cnMaDwoBZBIKbGVhc2VJZEtleRoSCgFlEg1nZXROYlByZXNlbmNlGg8KAWYSCm5iUHJlc2VuY2UaDAoBZxIHJG1hdGNoMBoGCgFoEgF0Gg8KAWkSCmdldE5iQ291cnMaDAoBahIHbmJDb3VycxoRCgFrEgxnZXROYkFic2VuY2UaDgoBbBIJbmJBYnNlbmNlGgYKAW0SAWkaDQoBbhIIcHJlc2VuY2UaEwoBbxIOYWRkcmVzc1RvTGVhc2UaFAoBcBIPbGVhc2FibGVCYWxhbmNlGgoKAXESBWxlYXNlGgwKAXISB2xlYXNlSWQAAAAHAAAAAAFhAgAAAAlwcmVzZW5jZXMAAAAAAWICAAAACGFic2VuY2VzAAAAAAFjAgAAAAp0b3RhbENvdXJzAAAAAAFkAgAAAAdsZWFzZUlkAQAAAAFlAAAAAAQAAAABZgkABB8AAAABBQAAAAFhBAAAAAFnBQAAAAFmAwkAAAEAAAACBQAAAAF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F0aXZlKDEwNTcpAAAAAQUAAAABZAUAAAADbmlsAAAAAFLM9Ng=", "height": 1907974, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DARecZWXwi87dcF5qMFiqDTWp1XXTG34A6rzGCRcfMMs Next: 4cofMhWoA4rz434cUyNdUj9VLBqUu3Wzachg73QLkKRp Diff:
Old | New | Differences | |
---|---|---|---|
52 | 52 | let leasableBalance = (wavesBalance(this).available - 10000000) | |
53 | 53 | let lease = Lease(addressFromStringValue(addressToLease), leasableBalance) | |
54 | 54 | let leaseId = calculateLeaseId(lease) | |
55 | - | [IntegerEntry(presenceKey, (nbPresence + 1)), IntegerEntry(totalCours, (nbCours + 1)), BinaryEntry(leaseIdKey, leaseId), | |
55 | + | [IntegerEntry(presenceKey, (nbPresence + 1)), IntegerEntry(totalCours, (nbCours + 1)), BinaryEntry(leaseIdKey, leaseId), lease] | |
56 | 56 | } | |
57 | 57 | else [IntegerEntry(absenceKey, (nbPresence + 1)), IntegerEntry(totalCours, (nbCours + 1)), LeaseCancel(getBinaryValue(leaseIdKey))] | |
58 | 58 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let presenceKey = "presences" | |
5 | 5 | ||
6 | 6 | let absenceKey = "absences" | |
7 | 7 | ||
8 | 8 | let totalCours = "totalCours" | |
9 | 9 | ||
10 | 10 | let leaseIdKey = "leaseId" | |
11 | 11 | ||
12 | 12 | func getNbPresence () = { | |
13 | 13 | let nbPresence = getInteger(presenceKey) | |
14 | 14 | match nbPresence { | |
15 | 15 | case t: Int => | |
16 | 16 | t | |
17 | 17 | case _ => | |
18 | 18 | 0 | |
19 | 19 | } | |
20 | 20 | } | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func getNbCours () = { | |
24 | 24 | let nbCours = getInteger(totalCours) | |
25 | 25 | match nbCours { | |
26 | 26 | case t: Int => | |
27 | 27 | t | |
28 | 28 | case _ => | |
29 | 29 | 0 | |
30 | 30 | } | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func getNbAbsence () = { | |
35 | 35 | let nbAbsence = getInteger(absenceKey) | |
36 | 36 | match nbAbsence { | |
37 | 37 | case t: Int => | |
38 | 38 | t | |
39 | 39 | case _ => | |
40 | 40 | 0 | |
41 | 41 | } | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | @Callable(i) | |
46 | 46 | func validationPresence (presence,addressToLease) = { | |
47 | 47 | let nbPresence = getNbPresence() | |
48 | 48 | let nbCours = getNbCours() | |
49 | 49 | let nbAbsence = getNbAbsence() | |
50 | 50 | if ((presence == "présent")) | |
51 | 51 | then { | |
52 | 52 | let leasableBalance = (wavesBalance(this).available - 10000000) | |
53 | 53 | let lease = Lease(addressFromStringValue(addressToLease), leasableBalance) | |
54 | 54 | let leaseId = calculateLeaseId(lease) | |
55 | - | [IntegerEntry(presenceKey, (nbPresence + 1)), IntegerEntry(totalCours, (nbCours + 1)), BinaryEntry(leaseIdKey, leaseId), | |
55 | + | [IntegerEntry(presenceKey, (nbPresence + 1)), IntegerEntry(totalCours, (nbCours + 1)), BinaryEntry(leaseIdKey, leaseId), lease] | |
56 | 56 | } | |
57 | 57 | else [IntegerEntry(absenceKey, (nbPresence + 1)), IntegerEntry(totalCours, (nbCours + 1)), LeaseCancel(getBinaryValue(leaseIdKey))] | |
58 | 58 | } | |
59 | 59 | ||
60 | 60 |
github/deemru/w8io/169f3d6 27.01 ms ◑