tx · Masa2LZG6gbvvEtfuM7UhBkbgBxiwrFvZ4FPrHDEtWX

3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN:  -0.01400000 Waves

2020.02.02 17:40 [881667] smart account 3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN > SELF 0.00000000 Waves

{ "type": 13, "id": "Masa2LZG6gbvvEtfuM7UhBkbgBxiwrFvZ4FPrHDEtWX", "fee": 1400000, "feeAssetId": null, "timestamp": 1580654481290, "version": 1, "sender": "3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN", "senderPublicKey": "8PUyJHGVRUxhY118c4H5isGCGLYgRBmcSzNYooDAqwh", "proofs": [ "4Yyk2MeMver1PY7Yo49Pbd4Bu4j11LiJFhMzmG6ZrpXN6Lm1k87gGtcQ6nrMA3tJSJtDD5ZPHn55SG4RK3WmBWoX" ], "script": "base64:AAIDAAAAAAAAAAgIARIECgIIAQAAAAEAAAAAD25hbWVVbnRpbFN1ZmZ1eAIAAAAGOnVudGlsAAAAAQAAAAFpAQAAAAdnZXRMb2NrAAAAAgAAAAhsb2NrTmFtZQAAAAV1bnRpbAQAAAANbG9ja05hbWVVbnRpbAkAASwAAAACBQAAAAhsb2NrTmFtZQUAAAAPbmFtZVVudGlsU3VmZnV4BAAAAAFxAwkAAGcAAAACBQAAAAZoZWlnaHQFAAAABXVudGlsCQAAAgAAAAECAAAAGVN1cHBsaWVkIHVudGlsIGlzIHRvbyBsb3cGBAAAAAJxcQMJAABmAAAAAgUAAAAFdW50aWwJAABkAAAAAgUAAAAGaGVpZ2h0AAAAAAAAAAAKCQAAAgAAAAECAAAAGlN1cHBsaWVkIHVudGlsIGlzIHRvbyBoaWdoBgQAAAALY2FuQmVMb2NrZWQEAAAAByRtYXRjaDAJAAQcAAAAAgUAAAAEdGhpcwUAAAAIbG9ja05hbWUDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAWIFAAAAByRtYXRjaDAJAAAAAAAAAgUAAAABYggIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAEVW5pdAUAAAAHJG1hdGNoMAYEAAAADGxhc3RMb2NrVGltZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAA1sb2NrTmFtZVVudGlsAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAXQFAAAAByRtYXRjaDAFAAAAAXQEAAAABFVuaXQFAAAAByRtYXRjaDAAAAAAAAAAAAADAwUAAAALY2FuQmVMb2NrZWQGCQAAZwAAAAIFAAAABmhlaWdodAUAAAAMbGFzdExvY2tUaW1lCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAAhsb2NrTmFtZQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAANbG9ja05hbWVVbnRpbAUAAAAFdW50aWwFAAAAA25pbAkAAAIAAAABAgAAABNMb2NrIGNhbnQgYmUgbG9ja2VkAAAAABFM6lI=", "chainId": 84, "height": 881667, "spentComplexity": 0 } View: original | compacted Prev: B4E4HJiNJNr8FV3HJs9AChh1j7Ry2vTGr7aaw7FqGNrs Next: BKPqmGGSaD6Wi3XvpKMLX3mGEyXHtvsDQUYCtioJuMFc Diff:
OldNewDifferences
66 @Callable(i)
77 func getLock (lockName,until) = {
88 let lockNameUntil = (lockName + nameUntilSuffux)
9- let nowUnion = blockInfoByHeight(height)
10- let now = match nowUnion {
11- case t: BlockInfo =>
12- t
13- case _ =>
14- throw("Cannot get last block")
15- }
16- let q = if ((now.timestamp >= until))
9+ let q = if ((height >= until))
1710 then throw("Supplied until is too low")
1811 else true
19- let qq = if ((until > (now.timestamp + 600000)))
12+ let qq = if ((until > (height + 10)))
2013 then throw("Supplied until is too high")
2114 else true
2215 let canBeLocked = match getBinary(this, lockName) {
3326 }
3427 if (if (canBeLocked)
3528 then true
36- else (now.timestamp >= lastLockTime))
29+ else (height >= lastLockTime))
3730 then WriteSet([DataEntry(lockName, i.caller.bytes), DataEntry(lockNameUntil, until)])
3831 else throw("Lock cant be locked")
3932 }
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 nowUnion = blockInfoByHeight(height)
10- let now = match nowUnion {
11- case t: BlockInfo =>
12- t
13- case _ =>
14- throw("Cannot get last block")
15- }
16- let q = if ((now.timestamp >= until))
9+ let q = if ((height >= until))
1710 then throw("Supplied until is too low")
1811 else true
19- let qq = if ((until > (now.timestamp + 600000)))
12+ let qq = if ((until > (height + 10)))
2013 then throw("Supplied until is too high")
2114 else true
2215 let canBeLocked = match getBinary(this, lockName) {
2316 case b: ByteVector =>
2417 (b == i.caller.bytes)
2518 case Unit =>
2619 true
2720 }
2821 let lastLockTime = match getInteger(this, lockNameUntil) {
2922 case t: Int =>
3023 t
3124 case Unit =>
3225 0
3326 }
3427 if (if (canBeLocked)
3528 then true
36- else (now.timestamp >= lastLockTime))
29+ else (height >= lastLockTime))
3730 then WriteSet([DataEntry(lockName, i.caller.bytes), DataEntry(lockNameUntil, until)])
3831 else throw("Lock cant be locked")
3932 }
4033
4134

github/deemru/w8io/026f985 
96.77 ms