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:AAIFAAAAAAAAASYIAhIECgIICBoQCgFhEgtwcmVzZW5jZUtleRoPCgFiEgphYnNlbmNlS2V5Gg8KAWMSCnRvdGFsQ291cnMaDwoBZBIKbGVhc2VJZEtleRoSCgFlEg1nZXROYlByZXNlbmNlGg8KAWYSCm5iUHJlc2VuY2UaDAoBZxIHJG1hdGNoMBoGCgFoEgF0Gg8KAWkSCmdldE5iQ291cnMaDAoBahIHbmJDb3VycxoRCgFrEgxnZXROYkFic2VuY2UaDgoBbBIJbmJBYnNlbmNlGgYKAW0SAWkaDQoBbhIIcHJlc2VuY2UaEwoBbxIOYWRkcmVzc1RvTGVhc2UaFAoBcBIPbGVhc2FibGVCYWxhbmNlGgoKAXESBWxlYXNlGgwKAXISB2xlYXNlSWQAAAAHAAAAAAFhAgAAAAlwcmVzZW5jZXMAAAAAAWICAAAACGFic2VuY2VzAAAAAAFjAgAAAAp0b3RhbENvdXJzAAAAAAFkAgAAAAdsZWFzZUlkAQAAAAFlAAAAAAQAAAABZgkABB8AAAABBQAAAAFhBAAAAAFnBQAAAAFmAwkAAAEAAAACBQAAAA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mF0aXZlKDEwNTcpAAAAAQUAAAABZAUAAAADbmlsAAAAAFLM9Ng=", "height": 1907974, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DARecZWXwi87dcF5qMFiqDTWp1XXTG34A6rzGCRcfMMs Next: 4cofMhWoA4rz434cUyNdUj9VLBqUu3Wzachg73QLkKRp Diff:
OldNewDifferences
5252 let leasableBalance = (wavesBalance(this).available - 10000000)
5353 let lease = Lease(addressFromStringValue(addressToLease), leasableBalance)
5454 let leaseId = calculateLeaseId(lease)
55-[IntegerEntry(presenceKey, (nbPresence + 1)), IntegerEntry(totalCours, (nbCours + 1)), BinaryEntry(leaseIdKey, leaseId), IntegerEntry("balance", leasableBalance)]
55+[IntegerEntry(presenceKey, (nbPresence + 1)), IntegerEntry(totalCours, (nbCours + 1)), BinaryEntry(leaseIdKey, leaseId), lease]
5656 }
5757 else [IntegerEntry(absenceKey, (nbPresence + 1)), IntegerEntry(totalCours, (nbCours + 1)), LeaseCancel(getBinaryValue(leaseIdKey))]
5858 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let presenceKey = "presences"
55
66 let absenceKey = "absences"
77
88 let totalCours = "totalCours"
99
1010 let leaseIdKey = "leaseId"
1111
1212 func getNbPresence () = {
1313 let nbPresence = getInteger(presenceKey)
1414 match nbPresence {
1515 case t: Int =>
1616 t
1717 case _ =>
1818 0
1919 }
2020 }
2121
2222
2323 func getNbCours () = {
2424 let nbCours = getInteger(totalCours)
2525 match nbCours {
2626 case t: Int =>
2727 t
2828 case _ =>
2929 0
3030 }
3131 }
3232
3333
3434 func getNbAbsence () = {
3535 let nbAbsence = getInteger(absenceKey)
3636 match nbAbsence {
3737 case t: Int =>
3838 t
3939 case _ =>
4040 0
4141 }
4242 }
4343
4444
4545 @Callable(i)
4646 func validationPresence (presence,addressToLease) = {
4747 let nbPresence = getNbPresence()
4848 let nbCours = getNbCours()
4949 let nbAbsence = getNbAbsence()
5050 if ((presence == "présent"))
5151 then {
5252 let leasableBalance = (wavesBalance(this).available - 10000000)
5353 let lease = Lease(addressFromStringValue(addressToLease), leasableBalance)
5454 let leaseId = calculateLeaseId(lease)
55-[IntegerEntry(presenceKey, (nbPresence + 1)), IntegerEntry(totalCours, (nbCours + 1)), BinaryEntry(leaseIdKey, leaseId), IntegerEntry("balance", leasableBalance)]
55+[IntegerEntry(presenceKey, (nbPresence + 1)), IntegerEntry(totalCours, (nbCours + 1)), BinaryEntry(leaseIdKey, leaseId), lease]
5656 }
5757 else [IntegerEntry(absenceKey, (nbPresence + 1)), IntegerEntry(totalCours, (nbCours + 1)), LeaseCancel(getBinaryValue(leaseIdKey))]
5858 }
5959
6060

github/deemru/w8io/169f3d6 
27.01 ms