tx · 62NBkKVzVyUedufzyNsFtHM357jdfRBtFDi9joAtSvA3
3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN: -0.01400000 Waves
2020.02.02 17:50 [881677] smart account 3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN > SELF 0.00000000 Waves
{
"type": 13,
"id": "62NBkKVzVyUedufzyNsFtHM357jdfRBtFDi9joAtSvA3",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1580655016240,
"version": 1,
"sender": "3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN",
"senderPublicKey": "8PUyJHGVRUxhY118c4H5isGCGLYgRBmcSzNYooDAqwh",
"proofs": [
"ixYaypaZUruwtAmdjCC1ZdmxH5Q2E2TSa4ymTWgG6XTpBMa5JcPFjLBqFWYPwu3MU7YjiEYw4F1xQ47oZQXBFk1"
],
"script": "base64:AAIDAAAAAAAAAAgIARIECgIIAQAAAAEAAAAAD25hbWVVbnRpbFN1ZmZ1eAIAAAAGOnVudGlsAAAAAQAAAAFpAQAAAAdnZXRMb2NrAAAAAgAAAAhsb2NrTmFtZQAAAAV1bnRpbAQAAAANbG9ja05hbWVVbnRpbAkAASwAAAACBQAAAAhsb2NrTmFtZQUAAAAPbmFtZVVudGlsU3VmZnV4BAAAAAlibG9ja0luZm8JAAPtAAAAAQUAAAAGaGVpZ2h0BAAAAANub3cEAAAAByRtYXRjaDAFAAAACWJsb2NrSW5mbwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAJQmxvY2tJbmZvBAAAAAF0BQAAAAckbWF0Y2gwCAUAAAABdAAAAAl0aW1lc3RhbXAJAAACAAAAAQIAAAAUQ2Fubm90IGdldCBibG9ja2luZm8EAAAACW5vdFRvb0xvdwMJAABnAAAAAgUAAAADbm93BQAAAAV1bnRpbAkAAAIAAAABAgAAAB9TdXBwbGllZCB1bnRpbCB2YWx1ZSBpcyB0b28gbG93BgQAAAAKbm90VG9vSGlnaAMJAABmAAAAAgUAAAAFdW50aWwJAABkAAAAAgUAAAADbm93AAAAAAAACSfACQAAAgAAAAECAAAAIFN1cHBsaWVkIHVudGlsIHZhbHVlIGlzIHRvbyBoaWdoBgQAAAALY2FuQmVMb2NrZWQEAAAAByRtYXRjaDAJAAQcAAAAAgUAAAAEdGhpcwUAAAAIbG9ja05hbWUDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAWIFAAAAByRtYXRjaDAJAAAAAAAAAgUAAAABYggIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAEVW5pdAUAAAAHJG1hdGNoMAYEAAAADGxhc3RMb2NrVGltZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAA1sb2NrTmFtZVVudGlsAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAXQFAAAAByRtYXRjaDAFAAAAAXQEAAAABFVuaXQFAAAAByRtYXRjaDAAAAAAAAAAAAADAwMFAAAACW5vdFRvb0xvdwUAAAAKbm90VG9vSGlnaAcDBQAAAAtjYW5CZUxvY2tlZAYJAABnAAAAAgUAAAAGaGVpZ2h0BQAAAAxsYXN0TG9ja1RpbWUHCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAAhsb2NrTmFtZQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAANbG9ja05hbWVVbnRpbAUAAAAFdW50aWwFAAAAA25pbAkAAAIAAAABAgAAABNMb2NrIGNhbnQgYmUgbG9ja2VkAAAAAJgisl0=",
"chainId": 84,
"height": 881677,
"spentComplexity": 0
}
View: original | compacted
Prev: CHkHT3EvitFJfbZy4NJ7PiCV8cwoZkCTYSjhE6ow8gqz
Next: 8DRYuJaQCiMYgsWw4YpNMtQN7QfKKrmMVkxaTqYB8L2w
Diff:
Old | New | | Differences |
---|
16 | 16 | | let notTooLow = if ((now >= until)) |
---|
17 | 17 | | then throw("Supplied until value is too low") |
---|
18 | 18 | | else true |
---|
19 | | - | let notTooHigh = if ((until > (now + 600))) |
---|
| 19 | + | let notTooHigh = if ((until > (now + 600000))) |
---|
20 | 20 | | then throw("Supplied until value is too high") |
---|
21 | 21 | | else true |
---|
22 | 22 | | let canBeLocked = match getBinary(this, lockName) { |
---|
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 | 9 | | let blockInfo = blockInfoByHeight(height) |
---|
10 | 10 | | let now = match blockInfo { |
---|
11 | 11 | | case t: BlockInfo => |
---|
12 | 12 | | t.timestamp |
---|
13 | 13 | | case _ => |
---|
14 | 14 | | throw("Cannot get blockinfo") |
---|
15 | 15 | | } |
---|
16 | 16 | | let notTooLow = if ((now >= until)) |
---|
17 | 17 | | then throw("Supplied until value is too low") |
---|
18 | 18 | | else true |
---|
19 | | - | let notTooHigh = if ((until > (now + 600))) |
---|
| 19 | + | let notTooHigh = if ((until > (now + 600000))) |
---|
20 | 20 | | then throw("Supplied until value is too high") |
---|
21 | 21 | | else true |
---|
22 | 22 | | let canBeLocked = match getBinary(this, lockName) { |
---|
23 | 23 | | case b: ByteVector => |
---|
24 | 24 | | (b == i.caller.bytes) |
---|
25 | 25 | | case Unit => |
---|
26 | 26 | | true |
---|
27 | 27 | | } |
---|
28 | 28 | | let lastLockTime = match getInteger(this, lockNameUntil) { |
---|
29 | 29 | | case t: Int => |
---|
30 | 30 | | t |
---|
31 | 31 | | case Unit => |
---|
32 | 32 | | 0 |
---|
33 | 33 | | } |
---|
34 | 34 | | if (if (if (notTooLow) |
---|
35 | 35 | | then notTooHigh |
---|
36 | 36 | | else false) |
---|
37 | 37 | | then if (canBeLocked) |
---|
38 | 38 | | then true |
---|
39 | 39 | | else (height >= lastLockTime) |
---|
40 | 40 | | else false) |
---|
41 | 41 | | then WriteSet([DataEntry(lockName, i.caller.bytes), DataEntry(lockNameUntil, until)]) |
---|
42 | 42 | | else throw("Lock cant be locked") |
---|
43 | 43 | | } |
---|
44 | 44 | | |
---|
45 | 45 | | |
---|