tx · BTzdbzoKAKgq1AAGSxPMMBhwK2h8pRLMa6s8vpgkqkNx

3N8nB5XeXcXTUDeiH6657UHa3wHa2rbZfDk:  -0.01500000 Waves

2021.06.07 20:50 [1560262] smart account 3N8nB5XeXcXTUDeiH6657UHa3wHa2rbZfDk > SELF 0.00000000 Waves

{ "type": 13, "id": "BTzdbzoKAKgq1AAGSxPMMBhwK2h8pRLMa6s8vpgkqkNx", "fee": 1500000, "feeAssetId": null, "timestamp": 1623088323904, "version": 2, "chainId": 84, "sender": "3N8nB5XeXcXTUDeiH6657UHa3wHa2rbZfDk", "senderPublicKey": "BfXK2ez9xjdgWtoFNsnaGPRFjHcFixy3UUrQ2iN8wVfX", "proofs": [ "4KSRzdNegxuSkchFMR1HRC3dJY517ax4J3ftHJR867CcARuNK3vx3GwebK9H2jxcopq56XgvtZbkzNMAJmVgtNKT" ], "script": "base64:AAIEAAAAAAAAABUIAhIICgYICAgBAQESBwoFCAEBAQgAAAABAQAAABZjcmVhdGVQYXJraW5nU3BvdFNsaWNlAAAABAAAAA1wYXJraW5nU3BvdElkAAAACXN0YXJ0VGltZQAAAAdlbmRUaW1lAAAABXNsaWNlCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAA1wYXJraW5nU3BvdElkAgAAAAdfc2xpY2VfCQABpAAAAAEFAAAABXNsaWNlAgAAAApfc3RhcnRUaW1lBQAAAAlzdGFydFRpbWUJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAADXBhcmtpbmdTcG90SWQCAAAAB19zbGljZV8JAAGkAAAAAQUAAAAFc2xpY2UCAAAACF9lbmRUaW1lBQAAAAdlbmRUaW1lBQAAAANuaWwAAAACAAAAAWkBAAAAEWNyZWF0ZVBhcmtpbmdTcG90AAAABgAAAAVvd25lcgAAAANsYXQAAAAEbG9uZwAAAAlzdGFydFRpbWUAAA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AZAAAAAIFAAAADWV4aXN0aW5nU2xpY2UAAAAAAAAAAAIAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleWvGkRU=", "height": 1560262, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: G5eLGAUyeZSV4jCMkrBL4HsKZkH5vNUp14X5sGKPW3Cg Next: BBhgcyYAbKiXFLBvzvdyRJ4ghxpR1WeAcTMemDH5q9GX Diff:
OldNewDifferences
1919 let cost = getIntegerValue(this, (parkingSpotId + "_cost"))
2020 if (!(isDefined(payment)))
2121 then throw("missing payment")
22- else if (isDefined(payment.assetId))
22+ else if ((payment.assetId != unit))
2323 then throw("payment should be in waves")
2424 else if ((cost != cost))
2525 then throw(((("payment is less than required, sent: " + toString(cost)) + " , required: ") + toString(cost)))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func createParkingSpotSlice (parkingSpotId,startTime,endTime,slice) = [IntegerEntry((((parkingSpotId + "_slice_") + toString(slice)) + "_startTime"), startTime), IntegerEntry((((parkingSpotId + "_slice_") + toString(slice)) + "_endTime"), endTime)]
55
66
77 @Callable(i)
88 func createParkingSpot (owner,lat,long,startTime,endTime,cost) = {
99 let roundedStartTime = (startTime - (startTime % 3600))
1010 let roundedEndTime = (endTime - (endTime % 3600))
1111 ([StringEntry((toBase64String(i.transactionId) + "_owner"), owner), StringEntry((toBase64String(i.transactionId) + "_lat"), lat), StringEntry((toBase64String(i.transactionId) + "_long"), long), IntegerEntry((toBase64String(i.transactionId) + "_cost"), cost), IntegerEntry((toBase64String(i.transactionId) + "_slice"), 0)] ++ createParkingSpotSlice(toBase64String(i.transactionId), roundedStartTime, roundedEndTime, 0))
1212 }
1313
1414
1515
1616 @Callable(i)
1717 func bookParkingSpotSlice (parkingSpotId,desiredSlice,startTime,endTime,renter) = {
1818 let payment = i.payments[0]
1919 let cost = getIntegerValue(this, (parkingSpotId + "_cost"))
2020 if (!(isDefined(payment)))
2121 then throw("missing payment")
22- else if (isDefined(payment.assetId))
22+ else if ((payment.assetId != unit))
2323 then throw("payment should be in waves")
2424 else if ((cost != cost))
2525 then throw(((("payment is less than required, sent: " + toString(cost)) + " , required: ") + toString(cost)))
2626 else {
2727 let bookedStartTime = (startTime - (startTime % 3600))
2828 let bookedEndTime = (endTime - (endTime % 3600))
2929 let parkingSpotStartTime = getIntegerValue(this, (((parkingSpotId + "_slice_") + toString(desiredSlice)) + "_startTime"))
3030 let parkingSpotEndTime = getIntegerValue(this, (((parkingSpotId + "_slice_") + toString(desiredSlice)) + "_endTime"))
3131 let existingSlice = getIntegerValue(this, (parkingSpotId + "_slice"))
3232 if (if ((parkingSpotStartTime > bookedStartTime))
3333 then true
3434 else (bookedEndTime > parkingSpotEndTime))
3535 then throw("time is out of range for parking spot")
3636 else {
3737 let existingRenter = getString(this, (((parkingSpotId + "_slice_") + toString(desiredSlice)) + "_renter"))
3838 if ((existingRenter != unit))
3939 then throw("parking spot has already been booked")
4040 else if (if ((bookedStartTime == parkingSpotStartTime))
4141 then (bookedEndTime == parkingSpotEndTime)
4242 else false)
4343 then [StringEntry((((parkingSpotId + "_slice_") + toString(desiredSlice)) + "_renter"), renter), IntegerEntry((((parkingSpotId + "_slice_") + toString(desiredSlice)) + "_slicetest0"), desiredSlice)]
4444 else if (if ((bookedStartTime == parkingSpotStartTime))
4545 then (bookedEndTime != parkingSpotEndTime)
4646 else false)
4747 then ([StringEntry((((parkingSpotId + "_slice_") + toString(desiredSlice)) + "_renter"), renter), IntegerEntry((((parkingSpotId + "_slice_") + toString(desiredSlice)) + "_startTime"), bookedStartTime), IntegerEntry((((parkingSpotId + "_slice_") + toString(desiredSlice)) + "_endTime"), bookedEndTime), IntegerEntry((parkingSpotId + "_slice"), (existingSlice + 1))] ++ createParkingSpotSlice(parkingSpotId, bookedEndTime, parkingSpotEndTime, (existingSlice + 1)))
4848 else if (if ((bookedEndTime == parkingSpotEndTime))
4949 then (bookedStartTime != parkingSpotStartTime)
5050 else false)
5151 then ([StringEntry((((parkingSpotId + "_slice_") + toString(desiredSlice)) + "_renter"), renter), IntegerEntry((((parkingSpotId + "_slice_") + toString(desiredSlice)) + "_startTime"), bookedStartTime), IntegerEntry((((parkingSpotId + "_slice_") + toString(desiredSlice)) + "_endTime"), bookedEndTime), IntegerEntry((parkingSpotId + "_slice"), (existingSlice + 1))] ++ createParkingSpotSlice(parkingSpotId, parkingSpotStartTime, bookedStartTime, (existingSlice + 1)))
5252 else (([StringEntry((((parkingSpotId + "_slice_") + toString(desiredSlice)) + "_renter"), renter), IntegerEntry((((parkingSpotId + "_slice_") + toString(desiredSlice)) + "_startTime"), bookedStartTime), IntegerEntry((((parkingSpotId + "_slice_") + toString(desiredSlice)) + "_endTime"), bookedEndTime), IntegerEntry((parkingSpotId + "_slice"), (existingSlice + 2))] ++ createParkingSpotSlice(parkingSpotId, parkingSpotStartTime, bookedStartTime, (existingSlice + 1))) ++ createParkingSpotSlice(parkingSpotId, bookedEndTime, parkingSpotEndTime, (existingSlice + 2)))
5353 }
5454 }
5555 }
5656
5757
5858 @Verifier(tx)
5959 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
6060

github/deemru/w8io/026f985 
27.97 ms