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:
OldNewDifferences
66 @Callable(i)
77 func getLock (lockName,until) = {
88 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")
1111 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")
1414 else true
1515 let canBeLocked = match getBinary(this, lockName) {
1616 case b: ByteVector =>
2424 case Unit =>
2525 0
2626 }
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)
3034 then WriteSet([DataEntry(lockName, i.caller.bytes), DataEntry(lockNameUntil, until)])
3135 else throw("Lock cant be locked")
3236 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let nameUntilSuffux = ":until"
55
66 @Callable(i)
77 func getLock (lockName,until) = {
88 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")
1111 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")
1414 else true
1515 let canBeLocked = match getBinary(this, lockName) {
1616 case b: ByteVector =>
1717 (b == i.caller.bytes)
1818 case Unit =>
1919 true
2020 }
2121 let lastLockTime = match getInteger(this, lockNameUntil) {
2222 case t: Int =>
2323 t
2424 case Unit =>
2525 0
2626 }
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)
3034 then WriteSet([DataEntry(lockName, i.caller.bytes), DataEntry(lockNameUntil, until)])
3135 else throw("Lock cant be locked")
3236 }
3337
3438

github/deemru/w8io/026f985 
27.68 ms