tx · 6t5rAim16oSqy9raqnfxxzPSEpFuiGm3RmBPMSjKcE7x
3N8nB5XeXcXTUDeiH6657UHa3wHa2rbZfDk: -0.01400000 Waves
2021.05.25 21:36 [1541552] smart account 3N8nB5XeXcXTUDeiH6657UHa3wHa2rbZfDk > SELF 0.00000000 Waves
{
"type": 13,
"id": "6t5rAim16oSqy9raqnfxxzPSEpFuiGm3RmBPMSjKcE7x",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1621967844377,
"version": 2,
"chainId": 84,
"sender": "3N8nB5XeXcXTUDeiH6657UHa3wHa2rbZfDk",
"senderPublicKey": "BfXK2ez9xjdgWtoFNsnaGPRFjHcFixy3UUrQ2iN8wVfX",
"proofs": [
"4dY8GKkzWdUcr5vBt62AoWbiTua9XenUzFVYBUCaeSp1yp3SVu2p6xbKkv2HaHNDcgMEAHgmTo71UfCR3AziJZTK"
],
"script": "base64:AAIEAAAAAAAAABIIAhIFCgMIAQgSBwoFCAEBAQEAAAAAAAAAAgAAAAFpAQAAAA9yZW50UGFya2luZ1Nwb3QAAAADAAAADXBhcmtpbmdTcG90SWQAAAAJc3RhcnRUaW1lAAAABnJlbnRlcgQAAAAQcm91bmRlZFN0YXJ0VGltZQkAAGUAAAACBQAAAAlzdGFydFRpbWUJAABqAAAAAgUAAAAJc3RhcnRUaW1lAAAAAAAAAA4QBAAAABRwYXJraW5nU3BvdFN0YXJ0VGltZQkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAA1wYXJraW5nU3BvdElkAgAAAApfc3RhcnRUaW1lBAAAABJwYXJraW5nU3BvdEVuZFRpbWUJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMJAAEsAAAAAgUAAAANcGFya2luZ1Nwb3RJZAIAAAAIX2VuZFRpbWUDAwkAAGYAAAACBQAAABRwYXJraW5nU3BvdFN0YXJ0VGltZQUAAAAQcm91bmRlZFN0YXJ0VGltZQYJAABm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RUaW1lCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAJYAAAAAQgFAAAAAWkAAAANdHJhbnNhY3Rpb25JZAIAAAAEX2xhdAUAAAADbGF0CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAJYAAAAAQgFAAAAAWkAAAANdHJhbnNhY3Rpb25JZAIAAAAFX2xvbmcFAAAABGxvbmcFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5Sbir7g==",
"height": 1541552,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 5pdiHKfA49puPhFXimJjdv2zZYzMQgSqCS7wqZ5merQY
Next: Hm1Ap2jfar4vQHAev5M6zCN8jDBMLh2zHTgLU1ouNtUZ
Diff:
Old | New | | Differences |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(a) |
---|
7 | 7 | | func rentParkingSpot (b,c,d) = { |
---|
8 | | - | let e = getIntegerValue(this, (b + "_startTime")) |
---|
9 | | - | let f = getIntegerValue(this, (b + "_endTime")) |
---|
10 | | - | if (if ((e > c)) |
---|
| 8 | + | let e = (c - (c % 3600)) |
---|
| 9 | + | let f = getIntegerValue(this, (b + "_startTime")) |
---|
| 10 | + | let g = getIntegerValue(this, (b + "_endTime")) |
---|
| 11 | + | if (if ((f > e)) |
---|
11 | 12 | | then true |
---|
12 | | - | else ((c + 6) > f)) |
---|
| 13 | + | else ((e + 3600) > g)) |
---|
13 | 14 | | then throw("time is out of range for parking spot") |
---|
14 | 15 | | else { |
---|
15 | | - | let g = getString(this, (((b + "_") + toString(c)) + "_booked")) |
---|
16 | | - | if ((g != unit)) |
---|
| 16 | + | let h = getString(this, (((b + "_") + toString(e)) + "_booked")) |
---|
| 17 | + | if ((h != unit)) |
---|
17 | 18 | | then throw("timeslot has already been booked") |
---|
18 | | - | else [StringEntry((((b + "_") + toString(c)) + "_booked"), d)] |
---|
| 19 | + | else [StringEntry((((b + "_") + toString(e)) + "_booked"), d)] |
---|
19 | 20 | | } |
---|
20 | 21 | | } |
---|
21 | 22 | | |
---|
22 | 23 | | |
---|
23 | 24 | | |
---|
24 | 25 | | @Callable(a) |
---|
25 | | - | func createParkingSpot (h,i,j,c,k) = [StringEntry((toBase58String(a.transactionId) + "_owner"), h), IntegerEntry((toBase58String(a.transactionId) + "_startTime"), c), IntegerEntry((toBase58String(a.transactionId) + "_endTime"), k), IntegerEntry((toBase58String(a.transactionId) + "_lat"), i), IntegerEntry((toBase58String(a.transactionId) + "_long"), j)] |
---|
| 26 | + | func createParkingSpot (i,j,k,c,l) = [StringEntry((toBase58String(a.transactionId) + "_owner"), i), IntegerEntry((toBase58String(a.transactionId) + "_startTime"), c), IntegerEntry((toBase58String(a.transactionId) + "_endTime"), l), IntegerEntry((toBase58String(a.transactionId) + "_lat"), j), IntegerEntry((toBase58String(a.transactionId) + "_long"), k)] |
---|
26 | 27 | | |
---|
27 | 28 | | |
---|
28 | | - | @Verifier(l) |
---|
29 | | - | func m () = sigVerify(l.bodyBytes, l.proofs[0], l.senderPublicKey) |
---|
| 29 | + | @Verifier(m) |
---|
| 30 | + | func n () = sigVerify(m.bodyBytes, m.proofs[0], m.senderPublicKey) |
---|
30 | 31 | | |
---|
Full:
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(a) |
---|
7 | 7 | | func rentParkingSpot (b,c,d) = { |
---|
8 | | - | let e = getIntegerValue(this, (b + "_startTime")) |
---|
9 | | - | let f = getIntegerValue(this, (b + "_endTime")) |
---|
10 | | - | if (if ((e > c)) |
---|
| 8 | + | let e = (c - (c % 3600)) |
---|
| 9 | + | let f = getIntegerValue(this, (b + "_startTime")) |
---|
| 10 | + | let g = getIntegerValue(this, (b + "_endTime")) |
---|
| 11 | + | if (if ((f > e)) |
---|
11 | 12 | | then true |
---|
12 | | - | else ((c + 6) > f)) |
---|
| 13 | + | else ((e + 3600) > g)) |
---|
13 | 14 | | then throw("time is out of range for parking spot") |
---|
14 | 15 | | else { |
---|
15 | | - | let g = getString(this, (((b + "_") + toString(c)) + "_booked")) |
---|
16 | | - | if ((g != unit)) |
---|
| 16 | + | let h = getString(this, (((b + "_") + toString(e)) + "_booked")) |
---|
| 17 | + | if ((h != unit)) |
---|
17 | 18 | | then throw("timeslot has already been booked") |
---|
18 | | - | else [StringEntry((((b + "_") + toString(c)) + "_booked"), d)] |
---|
| 19 | + | else [StringEntry((((b + "_") + toString(e)) + "_booked"), d)] |
---|
19 | 20 | | } |
---|
20 | 21 | | } |
---|
21 | 22 | | |
---|
22 | 23 | | |
---|
23 | 24 | | |
---|
24 | 25 | | @Callable(a) |
---|
25 | | - | func createParkingSpot (h,i,j,c,k) = [StringEntry((toBase58String(a.transactionId) + "_owner"), h), IntegerEntry((toBase58String(a.transactionId) + "_startTime"), c), IntegerEntry((toBase58String(a.transactionId) + "_endTime"), k), IntegerEntry((toBase58String(a.transactionId) + "_lat"), i), IntegerEntry((toBase58String(a.transactionId) + "_long"), j)] |
---|
| 26 | + | func createParkingSpot (i,j,k,c,l) = [StringEntry((toBase58String(a.transactionId) + "_owner"), i), IntegerEntry((toBase58String(a.transactionId) + "_startTime"), c), IntegerEntry((toBase58String(a.transactionId) + "_endTime"), l), IntegerEntry((toBase58String(a.transactionId) + "_lat"), j), IntegerEntry((toBase58String(a.transactionId) + "_long"), k)] |
---|
26 | 27 | | |
---|
27 | 28 | | |
---|
28 | | - | @Verifier(l) |
---|
29 | | - | func m () = sigVerify(l.bodyBytes, l.proofs[0], l.senderPublicKey) |
---|
| 29 | + | @Verifier(m) |
---|
| 30 | + | func n () = sigVerify(m.bodyBytes, m.proofs[0], m.senderPublicKey) |
---|
30 | 31 | | |
---|