tx · BKPqmGGSaD6Wi3XvpKMLX3mGEyXHtvsDQUYCtioJuMFc
3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN: -0.01400000 Waves
2020.02.02 17:45 [881671] smart account 3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN > SELF 0.00000000 Waves
{
"type": 13,
"id": "BKPqmGGSaD6Wi3XvpKMLX3mGEyXHtvsDQUYCtioJuMFc",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1580654679351,
"version": 1,
"sender": "3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN",
"senderPublicKey": "8PUyJHGVRUxhY118c4H5isGCGLYgRBmcSzNYooDAqwh",
"proofs": [
"5cHRZ9YXMLPiQycactKs9i6fnUsbk3QRgby1SGLChfueMfm5za29SVF6A5FVhXdVSsYzNmd4pEUg2QU8DTPNphzR"
],
"script": "base64:AAIDAAAAAAAAAAgIARIECgIIAQAAAAEAAAAAD25hbWVVbnRpbFN1ZmZ1eAIAAAAGOnVudGlsAAAAAQAAAAFpAQAAAAdnZXRMb2NrAAAAAgAAAAhsb2NrTmFtZQAAAAV1bnRpbAQAAAANbG9ja05hbWVVbnRpbAkAASwAAAACBQAAAAhsb2NrTmFtZQUAAAAPbmFtZVVudGlsU3VmZnV4BAAAAAlub3RUb29Mb3cDCQAAZwAAAAIFAAAABmhlaWdodAUAAAAFdW50aWwJAAACAAAAAQIAAAAfU3VwcGxpZWQgdW50aWwgdmFsdWUgaXMgdG9vIGxvdwYEAAAACm5vdFRvb0hpZ2gDCQAAZgAAAAIFAAAABXVudGlsCQAAZAAAAAIFAAAABmhlaWdodAAAAAAAAAAACgkAAAIAAAABAgAAACBTdXBwbGllZCB1bnRpbCB2YWx1ZSBpcyB0b28gaGlnaAYEAAAAC2NhbkJlTG9ja2VkBAAAAAckbWF0Y2gwCQAEHAAAAAIFAAAABHRoaXMFAAAACGxvY2tOYW1lAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAFiBQAAAAckbWF0Y2gwCQAAAAAAAAIFAAAAAWIICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAABFVuaXQFAAAAByRtYXRjaDAGBAAAAAxsYXN0TG9ja1RpbWUEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAANbG9ja05hbWVVbnRpbAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAF0BQAAAAckbWF0Y2gwBQAAAAF0BAAAAARVbml0BQAAAAckbWF0Y2gwAAAAAAAAAAAAAwMDBQAAAAlub3RUb29Mb3cFAAAACm5vdFRvb0hpZ2gHAwUAAAALY2FuQmVMb2NrZWQGCQAAZwAAAAIFAAAABmhlaWdodAUAAAAMbGFzdExvY2tUaW1lBwkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAIbG9ja05hbWUICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAADWxvY2tOYW1lVW50aWwFAAAABXVudGlsBQAAAANuaWwJAAACAAAAAQIAAAATTG9jayBjYW50IGJlIGxvY2tlZAAAAADQmFt5",
"chainId": 84,
"height": 881671,
"spentComplexity": 0
}
View: original | compacted
Prev: Masa2LZG6gbvvEtfuM7UhBkbgBxiwrFvZ4FPrHDEtWX
Next: CHkHT3EvitFJfbZy4NJ7PiCV8cwoZkCTYSjhE6ow8gqz
Diff:
Old | New | | Differences |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func getLock (lockName,until) = { |
---|
8 | 8 | | let lockNameUntil = (lockName + nameUntilSuffux) |
---|
9 | | - | let q = if ((height >= until)) |
---|
10 | | - | then throw("Supplied until is too low") |
---|
| 9 | + | let notTooLow = if ((height >= until)) |
---|
| 10 | + | then throw("Supplied until value is too low") |
---|
11 | 11 | | else true |
---|
12 | | - | let qq = if ((until > (height + 10))) |
---|
13 | | - | then throw("Supplied until is too high") |
---|
| 12 | + | let notTooHigh = if ((until > (height + 10))) |
---|
| 13 | + | then throw("Supplied until value is too high") |
---|
14 | 14 | | else true |
---|
15 | 15 | | let canBeLocked = match getBinary(this, lockName) { |
---|
16 | 16 | | case b: ByteVector => |
---|
|
24 | 24 | | case Unit => |
---|
25 | 25 | | 0 |
---|
26 | 26 | | } |
---|
27 | | - | if (if (canBeLocked) |
---|
28 | | - | then true |
---|
29 | | - | else (height >= lastLockTime)) |
---|
| 27 | + | if (if (if (notTooLow) |
---|
| 28 | + | then notTooHigh |
---|
| 29 | + | else false) |
---|
| 30 | + | then if (canBeLocked) |
---|
| 31 | + | then true |
---|
| 32 | + | else (height >= lastLockTime) |
---|
| 33 | + | else false) |
---|
30 | 34 | | then WriteSet([DataEntry(lockName, i.caller.bytes), DataEntry(lockNameUntil, until)]) |
---|
31 | 35 | | else throw("Lock cant be locked") |
---|
32 | 36 | | } |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let nameUntilSuffux = ":until" |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func getLock (lockName,until) = { |
---|
8 | 8 | | let lockNameUntil = (lockName + nameUntilSuffux) |
---|
9 | | - | let q = if ((height >= until)) |
---|
10 | | - | then throw("Supplied until is too low") |
---|
| 9 | + | let notTooLow = if ((height >= until)) |
---|
| 10 | + | then throw("Supplied until value is too low") |
---|
11 | 11 | | else true |
---|
12 | | - | let qq = if ((until > (height + 10))) |
---|
13 | | - | then throw("Supplied until is too high") |
---|
| 12 | + | let notTooHigh = if ((until > (height + 10))) |
---|
| 13 | + | then throw("Supplied until value is too high") |
---|
14 | 14 | | else true |
---|
15 | 15 | | let canBeLocked = match getBinary(this, lockName) { |
---|
16 | 16 | | case b: ByteVector => |
---|
17 | 17 | | (b == i.caller.bytes) |
---|
18 | 18 | | case Unit => |
---|
19 | 19 | | true |
---|
20 | 20 | | } |
---|
21 | 21 | | let lastLockTime = match getInteger(this, lockNameUntil) { |
---|
22 | 22 | | case t: Int => |
---|
23 | 23 | | t |
---|
24 | 24 | | case Unit => |
---|
25 | 25 | | 0 |
---|
26 | 26 | | } |
---|
27 | | - | if (if (canBeLocked) |
---|
28 | | - | then true |
---|
29 | | - | else (height >= lastLockTime)) |
---|
| 27 | + | if (if (if (notTooLow) |
---|
| 28 | + | then notTooHigh |
---|
| 29 | + | else false) |
---|
| 30 | + | then if (canBeLocked) |
---|
| 31 | + | then true |
---|
| 32 | + | else (height >= lastLockTime) |
---|
| 33 | + | else false) |
---|
30 | 34 | | then WriteSet([DataEntry(lockName, i.caller.bytes), DataEntry(lockNameUntil, until)]) |
---|
31 | 35 | | else throw("Lock cant be locked") |
---|
32 | 36 | | } |
---|
33 | 37 | | |
---|
34 | 38 | | |
---|