tx · CHkHT3EvitFJfbZy4NJ7PiCV8cwoZkCTYSjhE6ow8gqz

3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN:  -0.01400000 Waves

2020.02.02 17:48 [881676] smart account 3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN > SELF 0.00000000 Waves

{ "type": 13, "id": "CHkHT3EvitFJfbZy4NJ7PiCV8cwoZkCTYSjhE6ow8gqz", "fee": 1400000, "feeAssetId": null, "timestamp": 1580654917639, "version": 1, "sender": "3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN", "senderPublicKey": "8PUyJHGVRUxhY118c4H5isGCGLYgRBmcSzNYooDAqwh", "proofs": [ "2aHqwuJCpD3fSDahe6HjsNvXSF72UqCX7QZnu1FQktcqafhtuX2UugDsPGX8KNxjecLjyDQNQHkxdzh4CWBoN9n7" ], "script": "base64:AAIDAAAAAAAAAAgIARIECgIIAQAAAAEAAAAAD25hbWVVbnRpbFN1ZmZ1eAIAAAAGOnVudGlsAAAAAQAAAAFpAQAAAAdnZXRMb2NrAAAAAgAAAAhsb2NrTmFtZQAAAAV1bnRpbAQAAAANbG9ja05hbWVVbnRpbAkAASwAAAACBQAAAAhsb2NrTmFtZQUAAAAPbmFtZVVudGlsU3VmZnV4BAAAAAlibG9ja0luZm8JAAPtAAAAAQUAAAAGaGVpZ2h0BAAAAANub3cEAAAAByRtYXRjaDAFAAAACWJsb2NrSW5mbwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAJQmxvY2tJbmZvBAAAAAF0BQAAAAckbWF0Y2gwCAUAAAABdAAAAAl0aW1lc3RhbXAJAAACAAAAAQIAAAAUQ2Fubm90IGdldCBibG9ja2luZm8EAAAACW5vdFRvb0xvdwMJAABnAAAAAgUAAAADbm93BQAAAAV1bnRpbAkAAAIAAAABAgAAAB9TdXBwbGllZCB1bnRpbCB2YWx1ZSBpcyB0b28gbG93BgQAAAAKbm90VG9vSGlnaAMJAABmAAAAAgUAAAAFdW50aWwJAABkAAAAAgUAAAADbm93AAAAAAAAAAJYCQAAAgAAAAECAAAAIFN1cHBsaWVkIHVudGlsIHZhbHVlIGlzIHRvbyBoaWdoBgQAAAALY2FuQmVMb2NrZWQEAAAAByRtYXRjaDAJAAQcAAAAAgUAAAAEdGhpcwUAAAAIbG9ja05hbWUDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAWIFAAAAByRtYXRjaDAJAAAAAAAAAgUAAAABYggIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAEVW5pdAUAAAAHJG1hdGNoMAYEAAAADGxhc3RMb2NrVGltZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAA1sb2NrTmFtZVVudGlsAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAXQFAAAAByRtYXRjaDAFAAAAAXQEAAAABFVuaXQFAAAAByRtYXRjaDAAAAAAAAAAAAADAwMFAAAACW5vdFRvb0xvdwUAAAAKbm90VG9vSGlnaAcDBQAAAAtjYW5CZUxvY2tlZAYJAABnAAAAAgUAAAAGaGVpZ2h0BQAAAAxsYXN0TG9ja1RpbWUHCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAAhsb2NrTmFtZQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAANbG9ja05hbWVVbnRpbAUAAAAFdW50aWwFAAAAA25pbAkAAAIAAAABAgAAABNMb2NrIGNhbnQgYmUgbG9ja2VkAAAAAHm9VgM=", "chainId": 84, "height": 881676, "spentComplexity": 0 } View: original | compacted Prev: BKPqmGGSaD6Wi3XvpKMLX3mGEyXHtvsDQUYCtioJuMFc Next: 62NBkKVzVyUedufzyNsFtHM357jdfRBtFDi9joAtSvA3 Diff:
OldNewDifferences
66 @Callable(i)
77 func getLock (lockName,until) = {
88 let lockNameUntil = (lockName + nameUntilSuffux)
9- let notTooLow = if ((height >= until))
9+ let blockInfo = blockInfoByHeight(height)
10+ let now = match blockInfo {
11+ case t: BlockInfo =>
12+ t.timestamp
13+ case _ =>
14+ throw("Cannot get blockinfo")
15+ }
16+ let notTooLow = if ((now >= until))
1017 then throw("Supplied until value is too low")
1118 else true
12- let notTooHigh = if ((until > (height + 10)))
19+ let notTooHigh = if ((until > (now + 600)))
1320 then throw("Supplied until value is too high")
1421 else true
1522 let canBeLocked = match getBinary(this, lockName) {
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 notTooLow = if ((height >= until))
9+ let blockInfo = blockInfoByHeight(height)
10+ let now = match blockInfo {
11+ case t: BlockInfo =>
12+ t.timestamp
13+ case _ =>
14+ throw("Cannot get blockinfo")
15+ }
16+ let notTooLow = if ((now >= until))
1017 then throw("Supplied until value is too low")
1118 else true
12- let notTooHigh = if ((until > (height + 10)))
19+ let notTooHigh = if ((until > (now + 600)))
1320 then throw("Supplied until value is too high")
1421 else true
1522 let canBeLocked = match getBinary(this, lockName) {
1623 case b: ByteVector =>
1724 (b == i.caller.bytes)
1825 case Unit =>
1926 true
2027 }
2128 let lastLockTime = match getInteger(this, lockNameUntil) {
2229 case t: Int =>
2330 t
2431 case Unit =>
2532 0
2633 }
2734 if (if (if (notTooLow)
2835 then notTooHigh
2936 else false)
3037 then if (canBeLocked)
3138 then true
3239 else (height >= lastLockTime)
3340 else false)
3441 then WriteSet([DataEntry(lockName, i.caller.bytes), DataEntry(lockNameUntil, until)])
3542 else throw("Lock cant be locked")
3643 }
3744
3845

github/deemru/w8io/026f985 
25.05 ms