tx · Hm1Ap2jfar4vQHAev5M6zCN8jDBMLh2zHTgLU1ouNtUZ 3N8nB5XeXcXTUDeiH6657UHa3wHa2rbZfDk: -0.01400000 Waves 2021.05.25 21:44 [1541562] smart account 3N8nB5XeXcXTUDeiH6657UHa3wHa2rbZfDk > SELF 0.00000000 Waves
{ "type": 13, "id": "Hm1Ap2jfar4vQHAev5M6zCN8jDBMLh2zHTgLU1ouNtUZ", "fee": 1400000, "feeAssetId": null, "timestamp": 1621968359596, "version": 2, "chainId": 84, "sender": "3N8nB5XeXcXTUDeiH6657UHa3wHa2rbZfDk", "senderPublicKey": "BfXK2ez9xjdgWtoFNsnaGPRFjHcFixy3UUrQ2iN8wVfX", "proofs": [ "378bV6nC9wJsaK5QGS6Ko8fYYnmVAunoMrp54DcZKG9936hywURFB8vxNGaHynDAEffv9GDpruS8RaxgNyfye6nM" ], "script": "base64:AAIEAAAAAAAAABIIAhIFCgMIAQgSBwoFCAEBAQEAAAAAAAAAAgAAAAFpAQAAAA9yZW50UGFya2luZ1Nwb3QAAAADAAAADXBhcmtpbmdTcG90SWQAAAAJc3RhcnRUaW1lAAAABnJlbnRlcgQAAAAQcm91bmRlZFN0YXJ0VGltZQkAAGUAAAACBQAAAAlzdGFydFRpbWUJAABqAAAAAgUAAAAJc3RhcnRUaW1lAAAAAAAAAA4QBAAAABRwYXJraW5nU3BvdFN0YXJ0VGltZQkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAA1wYXJraW5nU3BvdElkAgAAAApfc3RhcnRUaW1lBAAAABJwYXJraW5nU3BvdEVuZFRpbWUJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMJAAEsAAAAAgUAAAANcGFya2luZ1Nwb3RJZAIAAAAIX2VuZFRpbWUDAwkAAGYAAAACBQAAABRwYXJraW5nU3BvdFN0YXJ0VGltZQUAAAAQcm91bmRlZFN0YXJ0VGltZQYJAABmAAAAAgkAA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AAABaQAAAA10cmFuc2FjdGlvbklkAgAAAApfc3RhcnRUaW1lBQAAABByb3VuZGVkU3RhcnRUaW1lCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAJYAAAAAQgFAAAAAWkAAAANdHJhbnNhY3Rpb25JZAIAAAAIX2VuZFRpbWUFAAAADnJvdW5kZWRFbmRUaW1lCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAJYAAAAAQgFAAAAAWkAAAANdHJhbnNhY3Rpb25JZAIAAAAEX2xhdAUAAAADbGF0CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAJYAAAAAQgFAAAAAWkAAAANdHJhbnNhY3Rpb25JZAIAAAAFX2xvbmcFAAAABGxvbmcFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5Z0dvQw==", "height": 1541562, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6t5rAim16oSqy9raqnfxxzPSEpFuiGm3RmBPMSjKcE7x Next: CrH3myUSA7kYZXEpoe5zzyCCM4GZ9Qi3RGX4K5ftyPjs Diff:
Old | New | Differences | |
---|---|---|---|
23 | 23 | ||
24 | 24 | ||
25 | 25 | @Callable(i) | |
26 | - | func createParkingSpot (owner,lat,long,startTime,endTime) = [StringEntry((toBase58String(i.transactionId) + "_owner"), owner), IntegerEntry((toBase58String(i.transactionId) + "_startTime"), startTime), IntegerEntry((toBase58String(i.transactionId) + "_endTime"), endTime), IntegerEntry((toBase58String(i.transactionId) + "_lat"), lat), IntegerEntry((toBase58String(i.transactionId) + "_long"), long)] | |
26 | + | func createParkingSpot (owner,lat,long,startTime,endTime) = { | |
27 | + | let roundedStartTime = (startTime - (startTime % 3600)) | |
28 | + | let roundedEndTime = (endTime - (endTime % 3600)) | |
29 | + | [StringEntry((toBase58String(i.transactionId) + "_owner"), owner), IntegerEntry((toBase58String(i.transactionId) + "_startTime"), roundedStartTime), IntegerEntry((toBase58String(i.transactionId) + "_endTime"), roundedEndTime), IntegerEntry((toBase58String(i.transactionId) + "_lat"), lat), IntegerEntry((toBase58String(i.transactionId) + "_long"), long)] | |
30 | + | } | |
27 | 31 | ||
28 | 32 | ||
29 | 33 | @Verifier(tx) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func rentParkingSpot (parkingSpotId,startTime,renter) = { | |
8 | 8 | let roundedStartTime = (startTime - (startTime % 3600)) | |
9 | 9 | let parkingSpotStartTime = getIntegerValue(this, (parkingSpotId + "_startTime")) | |
10 | 10 | let parkingSpotEndTime = getIntegerValue(this, (parkingSpotId + "_endTime")) | |
11 | 11 | if (if ((parkingSpotStartTime > roundedStartTime)) | |
12 | 12 | then true | |
13 | 13 | else ((roundedStartTime + 3600) > parkingSpotEndTime)) | |
14 | 14 | then throw("time is out of range for parking spot") | |
15 | 15 | else { | |
16 | 16 | let bookingEntry = getString(this, (((parkingSpotId + "_") + toString(roundedStartTime)) + "_booked")) | |
17 | 17 | if ((bookingEntry != unit)) | |
18 | 18 | then throw("timeslot has already been booked") | |
19 | 19 | else [StringEntry((((parkingSpotId + "_") + toString(roundedStartTime)) + "_booked"), renter)] | |
20 | 20 | } | |
21 | 21 | } | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | ||
25 | 25 | @Callable(i) | |
26 | - | func createParkingSpot (owner,lat,long,startTime,endTime) = [StringEntry((toBase58String(i.transactionId) + "_owner"), owner), IntegerEntry((toBase58String(i.transactionId) + "_startTime"), startTime), IntegerEntry((toBase58String(i.transactionId) + "_endTime"), endTime), IntegerEntry((toBase58String(i.transactionId) + "_lat"), lat), IntegerEntry((toBase58String(i.transactionId) + "_long"), long)] | |
26 | + | func createParkingSpot (owner,lat,long,startTime,endTime) = { | |
27 | + | let roundedStartTime = (startTime - (startTime % 3600)) | |
28 | + | let roundedEndTime = (endTime - (endTime % 3600)) | |
29 | + | [StringEntry((toBase58String(i.transactionId) + "_owner"), owner), IntegerEntry((toBase58String(i.transactionId) + "_startTime"), roundedStartTime), IntegerEntry((toBase58String(i.transactionId) + "_endTime"), roundedEndTime), IntegerEntry((toBase58String(i.transactionId) + "_lat"), lat), IntegerEntry((toBase58String(i.transactionId) + "_long"), long)] | |
30 | + | } | |
27 | 31 | ||
28 | 32 | ||
29 | 33 | @Verifier(tx) | |
30 | 34 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
31 | 35 |
github/deemru/w8io/026f985 31.99 ms ◑