tx · D1cnBVk7CdnsmhyNrbEjWpwDUCZv5dkzSMefLHCd4M7Z
3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN: -0.01400000 Waves
2020.02.06 13:10 [887206] smart account 3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN > SELF 0.00000000 Waves
{
"type": 13,
"id": "D1cnBVk7CdnsmhyNrbEjWpwDUCZv5dkzSMefLHCd4M7Z",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1580983786857,
"version": 1,
"sender": "3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN",
"senderPublicKey": "8PUyJHGVRUxhY118c4H5isGCGLYgRBmcSzNYooDAqwh",
"proofs": [
"5sq9dKpQs3ofEu4fhD3bz4KRZD5vWjHdAPuzLwTEF9evBG6ASHjjedoHh2xGdniP1wdfHS3MMY36LMt8J59z1PLP"
],
"script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAAAQAAAAAQYWxsb3dlZEFkZHJlc3NlcwkABEwAAAACAgAAACMzTkNFblc1aFRuUlE3SjlURlFzSFM0VzkyZjU0UENDV1F2TgkABEwAAAACAgAAACMzTjdqaDJIenJBR2hYTkN0Nml2V0NlSjMyNW95N3hmVVZtRwUAAAADbmlsAAAAAQAAAAFpAQAAABR0cnlHZXQ2MDBTZWNvbmRzTG9jawAAAAEAAAAIbG9ja05hbWUEAAAADWxvY2tVbnRpbE5hbWUJAAEsAAAAAgUAAAAIbG9ja05hbWUCAAAABi91bnRpbAoBAAAAHmNoZWNrT25lQWxsb3dlZEFkZGVyZXNzZXNFbnRyeQAAAAIAAAAFZm91bmQAAAAHYWRkcmVzcwMFAAAABWZvdW5kBgkAAAAAAAACCAkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAAdhZGRyZXNzAAAABWJ5dGVzCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAA1pbkFsbG93ZWRMaXN0BAAAAAskbGlzdDQ2NzU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UAAAAHJG1hdGNoMAUAAAABYggIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAALbG9ja2VkVW50aWwEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAANbG9ja1VudGlsTmFtZQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAV1bnRpbAUAAAAHJG1hdGNoMAUAAAAFdW50aWwAAAAAAAAAAAAEAAAAB2NhbkxvY2sDCQAAZgAAAAIFAAAAA25vdwUAAAALbG9ja2VkVW50aWwGCQAAAAAAAAIFAAAACGxvY2tlZEJ5CAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAwUAAAAHY2FuTG9jawkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAIbG9ja05hbWUICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAADWxvY2tVbnRpbE5hbWUJAABkAAAAAgUAAAADbm93AAAAAAAACSfABQAAAANuaWwJAAACAAAAAQIAAAAZQWxyZWFkeSBsb2NrZWQgYnkgYW5vdGhlcgAAAAAJ3ZAC",
"chainId": 84,
"height": 887206,
"spentComplexity": 0
}
View: original | compacted
Prev: W8MCsbjMoyEDj4vhLsWUZRoSHm6CNzo6doWc9v5WCZ2
Next: none
Diff:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
| 4 | + | let a = ["3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN", "3N7jh2HzrAGhXNCt6ivWCeJ325oy7xfUVmG"] |
---|
4 | 5 | | |
---|
| 6 | + | @Callable(b) |
---|
| 7 | + | func tryGet600SecondsLock (c) = { |
---|
| 8 | + | let d = (c + "/until") |
---|
| 9 | + | func e (f,g) = if (f) |
---|
| 10 | + | then true |
---|
| 11 | + | else (addressFromStringValue(g).bytes == b.caller.bytes) |
---|
5 | 12 | | |
---|
6 | | - | @Callable(a) |
---|
7 | | - | func tryGet600SecondsLock (b) = { |
---|
8 | | - | let c = (b + "/until") |
---|
9 | | - | let d = { |
---|
10 | | - | let e = blockInfoByHeight(height) |
---|
11 | | - | if ($isInstanceOf(e, "BlockInfo")) |
---|
| 13 | + | let h = { |
---|
| 14 | + | let i = a |
---|
| 15 | + | let j = size(i) |
---|
| 16 | + | let k = false |
---|
| 17 | + | if ((j == 0)) |
---|
| 18 | + | then k |
---|
| 19 | + | else { |
---|
| 20 | + | let l = e(k, i[0]) |
---|
| 21 | + | if ((j == 1)) |
---|
| 22 | + | then l |
---|
| 23 | + | else { |
---|
| 24 | + | let m = e(l, i[1]) |
---|
| 25 | + | if ((j == 2)) |
---|
| 26 | + | then m |
---|
| 27 | + | else { |
---|
| 28 | + | let n = e(m, i[2]) |
---|
| 29 | + | throw("List size exceed 2") |
---|
| 30 | + | } |
---|
| 31 | + | } |
---|
| 32 | + | } |
---|
| 33 | + | } |
---|
| 34 | + | let o = { |
---|
| 35 | + | let p = blockInfoByHeight(height) |
---|
| 36 | + | if ($isInstanceOf(p, "BlockInfo")) |
---|
12 | 37 | | then { |
---|
13 | | - | let f = e |
---|
14 | | - | f.timestamp |
---|
| 38 | + | let q = p |
---|
| 39 | + | q.timestamp |
---|
15 | 40 | | } |
---|
16 | 41 | | else 0 |
---|
17 | 42 | | } |
---|
18 | | - | let g = { |
---|
19 | | - | let e = getBinary(this, b) |
---|
20 | | - | if ($isInstanceOf(e, "ByteVector")) |
---|
| 43 | + | let r = { |
---|
| 44 | + | let p = getBinary(this, c) |
---|
| 45 | + | if ($isInstanceOf(p, "ByteVector")) |
---|
21 | 46 | | then { |
---|
22 | | - | let f = e |
---|
23 | | - | f |
---|
| 47 | + | let q = p |
---|
| 48 | + | q |
---|
24 | 49 | | } |
---|
25 | | - | else a.caller.bytes |
---|
| 50 | + | else b.caller.bytes |
---|
26 | 51 | | } |
---|
27 | | - | let h = { |
---|
28 | | - | let e = getInteger(this, c) |
---|
29 | | - | if ($isInstanceOf(e, "Int")) |
---|
| 52 | + | let s = { |
---|
| 53 | + | let p = getInteger(this, d) |
---|
| 54 | + | if ($isInstanceOf(p, "Int")) |
---|
30 | 55 | | then { |
---|
31 | | - | let i = e |
---|
32 | | - | i |
---|
| 56 | + | let t = p |
---|
| 57 | + | t |
---|
33 | 58 | | } |
---|
34 | 59 | | else 0 |
---|
35 | 60 | | } |
---|
36 | | - | let j = if ((d > h)) |
---|
| 61 | + | let u = if ((o > s)) |
---|
37 | 62 | | then true |
---|
38 | | - | else (g == a.caller.bytes) |
---|
39 | | - | if (j) |
---|
40 | | - | then WriteSet([DataEntry(b, a.caller.bytes), DataEntry(c, (d + 600000))]) |
---|
| 63 | + | else (r == b.caller.bytes) |
---|
| 64 | + | if (u) |
---|
| 65 | + | then WriteSet([DataEntry(c, b.caller.bytes), DataEntry(d, (o + 600000))]) |
---|
41 | 66 | | else throw("Already locked by another") |
---|
42 | 67 | | } |
---|
43 | 68 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
| 4 | + | let a = ["3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN", "3N7jh2HzrAGhXNCt6ivWCeJ325oy7xfUVmG"] |
---|
4 | 5 | | |
---|
| 6 | + | @Callable(b) |
---|
| 7 | + | func tryGet600SecondsLock (c) = { |
---|
| 8 | + | let d = (c + "/until") |
---|
| 9 | + | func e (f,g) = if (f) |
---|
| 10 | + | then true |
---|
| 11 | + | else (addressFromStringValue(g).bytes == b.caller.bytes) |
---|
5 | 12 | | |
---|
6 | | - | @Callable(a) |
---|
7 | | - | func tryGet600SecondsLock (b) = { |
---|
8 | | - | let c = (b + "/until") |
---|
9 | | - | let d = { |
---|
10 | | - | let e = blockInfoByHeight(height) |
---|
11 | | - | if ($isInstanceOf(e, "BlockInfo")) |
---|
| 13 | + | let h = { |
---|
| 14 | + | let i = a |
---|
| 15 | + | let j = size(i) |
---|
| 16 | + | let k = false |
---|
| 17 | + | if ((j == 0)) |
---|
| 18 | + | then k |
---|
| 19 | + | else { |
---|
| 20 | + | let l = e(k, i[0]) |
---|
| 21 | + | if ((j == 1)) |
---|
| 22 | + | then l |
---|
| 23 | + | else { |
---|
| 24 | + | let m = e(l, i[1]) |
---|
| 25 | + | if ((j == 2)) |
---|
| 26 | + | then m |
---|
| 27 | + | else { |
---|
| 28 | + | let n = e(m, i[2]) |
---|
| 29 | + | throw("List size exceed 2") |
---|
| 30 | + | } |
---|
| 31 | + | } |
---|
| 32 | + | } |
---|
| 33 | + | } |
---|
| 34 | + | let o = { |
---|
| 35 | + | let p = blockInfoByHeight(height) |
---|
| 36 | + | if ($isInstanceOf(p, "BlockInfo")) |
---|
12 | 37 | | then { |
---|
13 | | - | let f = e |
---|
14 | | - | f.timestamp |
---|
| 38 | + | let q = p |
---|
| 39 | + | q.timestamp |
---|
15 | 40 | | } |
---|
16 | 41 | | else 0 |
---|
17 | 42 | | } |
---|
18 | | - | let g = { |
---|
19 | | - | let e = getBinary(this, b) |
---|
20 | | - | if ($isInstanceOf(e, "ByteVector")) |
---|
| 43 | + | let r = { |
---|
| 44 | + | let p = getBinary(this, c) |
---|
| 45 | + | if ($isInstanceOf(p, "ByteVector")) |
---|
21 | 46 | | then { |
---|
22 | | - | let f = e |
---|
23 | | - | f |
---|
| 47 | + | let q = p |
---|
| 48 | + | q |
---|
24 | 49 | | } |
---|
25 | | - | else a.caller.bytes |
---|
| 50 | + | else b.caller.bytes |
---|
26 | 51 | | } |
---|
27 | | - | let h = { |
---|
28 | | - | let e = getInteger(this, c) |
---|
29 | | - | if ($isInstanceOf(e, "Int")) |
---|
| 52 | + | let s = { |
---|
| 53 | + | let p = getInteger(this, d) |
---|
| 54 | + | if ($isInstanceOf(p, "Int")) |
---|
30 | 55 | | then { |
---|
31 | | - | let i = e |
---|
32 | | - | i |
---|
| 56 | + | let t = p |
---|
| 57 | + | t |
---|
33 | 58 | | } |
---|
34 | 59 | | else 0 |
---|
35 | 60 | | } |
---|
36 | | - | let j = if ((d > h)) |
---|
| 61 | + | let u = if ((o > s)) |
---|
37 | 62 | | then true |
---|
38 | | - | else (g == a.caller.bytes) |
---|
39 | | - | if (j) |
---|
40 | | - | then WriteSet([DataEntry(b, a.caller.bytes), DataEntry(c, (d + 600000))]) |
---|
| 63 | + | else (r == b.caller.bytes) |
---|
| 64 | + | if (u) |
---|
| 65 | + | then WriteSet([DataEntry(c, b.caller.bytes), DataEntry(d, (o + 600000))]) |
---|
41 | 66 | | else throw("Already locked by another") |
---|
42 | 67 | | } |
---|
43 | 68 | | |
---|
44 | 69 | | |
---|