tx · DEgvJuaLBfz6tjxE1ob4HnVUai6YoeSqe9bXRHE8rvuL

3NAHxYPeLZCLoupsqC7wo6DMSmGSviHAsYR:  -0.01000000 Waves

2022.02.08 12:14 [1914451] smart account 3NAHxYPeLZCLoupsqC7wo6DMSmGSviHAsYR > SELF 0.00000000 Waves

{ "type": 13, "id": "DEgvJuaLBfz6tjxE1ob4HnVUai6YoeSqe9bXRHE8rvuL", "fee": 1000000, "feeAssetId": null, "timestamp": 1644311751123, "version": 2, "chainId": 84, "sender": "3NAHxYPeLZCLoupsqC7wo6DMSmGSviHAsYR", "senderPublicKey": "9QVBCe7xg4XAWJso36vyYCqP1rtKd6BrmF6a77VDRNeq", "proofs": [ "5c2C1v8gvRXaS8Ra8QjjBsVqn178cs6C5VbChT8ctrvdyMFWZKzXL1MV6LxpF1Y3NMqzCxJtHW6i7FQ4SJqeYwmF" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIICAAAAAcAAAAAC3ByZXNlbmNlS2V5AgAAAAlwcmVzZW5jZXMAAAAACmFic2VuY2VLZXkCAAAACGFic2VuY2VzAAAAAAp0b3RhbENvdXJzAgAAAAp0b3RhbENvdXJzAAAAAApsZWFzZUlkS2V5AgAAAAdsZWFzZUlkAQAAAA1nZXROYlByZXNlbmNlAAAAAAQAAAAKbmJQcmVzZW5jZQkABB8AAAABBQAAAAtwcmVzZW5jZUtleQQAAAAHJG1hdGNoMAUAAAAKbmJQcmVzZW5jZQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAF0BQAAAAckbWF0Y2gwBQAAAAF0AAAAAAAAAAAAAQAAAApnZXROYkNvdXJzAAAAAAQAAAAHbmJDb3VycwkABB8AAAABBQAAAAp0b3RhbENvdXJzBAAAAAckbWF0Y2gwBQAAAAduYkNvdXJzAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAXQFAAAAByRtYXRjaDAFAAAAAXQAAAAAAAAAAAABAAAADGdldE5iQWJzZW5jZQ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ZW5jZUtleQkAAGQAAAACBQAAAApuYlByZXNlbmNlAAAAAAAAAAABCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAAAp0b3RhbENvdXJzCQAAZAAAAAIFAAAAB25iQ291cnMAAAAAAAAAAAEJAARMAAAAAgkBAAAAC0xlYXNlQ2FuY2VsAAAAAQkBAAAAEUBleHRyTmF0aXZlKDEwNTcpAAAAAQUAAAAKbGVhc2VJZEtleQUAAAADbmlsAAAAAAAAAAAAAAAAAMS5gJs=", "height": 1914451, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let presenceKey = "presences"
5+
6+let absenceKey = "absences"
7+
8+let totalCours = "totalCours"
9+
10+let leaseIdKey = "leaseId"
11+
12+func getNbPresence () = {
13+ let nbPresence = getInteger(presenceKey)
14+ match nbPresence {
15+ case t: Int =>
16+ t
17+ case _ =>
18+ 0
19+ }
20+ }
21+
22+
23+func getNbCours () = {
24+ let nbCours = getInteger(totalCours)
25+ match nbCours {
26+ case t: Int =>
27+ t
28+ case _ =>
29+ 0
30+ }
31+ }
32+
33+
34+func getNbAbsence () = {
35+ let nbAbsence = getInteger(absenceKey)
36+ match nbAbsence {
37+ case t: Int =>
38+ t
39+ case _ =>
40+ 0
41+ }
42+ }
43+
44+
45+@Callable(i)
46+func validationPresence (presence,addressToLease) = {
47+ let nbPresence = getNbPresence()
48+ let nbCours = getNbCours()
49+ let nbAbsence = getNbAbsence()
50+ if ((presence == "présent"))
51+ then {
52+ let leasableBalance = (wavesBalance(this).available - 10000000)
53+ let lease = Lease(addressFromStringValue(addressToLease), leasableBalance)
54+ let leaseId = calculateLeaseId(lease)
55+ $Tuple2([IntegerEntry(presenceKey, (nbPresence + 1)), IntegerEntry(totalCours, (nbCours + 1)), BinaryEntry(leaseIdKey, leaseId), lease], 0)
56+ }
57+ else $Tuple2([IntegerEntry(absenceKey, (nbPresence + 1)), IntegerEntry(totalCours, (nbCours + 1)), LeaseCancel(getBinaryValue(leaseIdKey))], 0)
58+ }
59+
60+

github/deemru/w8io/026f985 
29.00 ms