tx · 4ifFs1hma11qpSNjM9owrNeG6CUKCx2thg1xVuyKn3Mf 3MsmgWBZKrHwbVbSQiqmStRiFyg5hkfxxa2: -0.00200000 Waves 2022.08.16 16:48 [2187109] smart account 3MsmgWBZKrHwbVbSQiqmStRiFyg5hkfxxa2 > SELF 0.00000000 Waves
{ "type": 13, "id": "4ifFs1hma11qpSNjM9owrNeG6CUKCx2thg1xVuyKn3Mf", "fee": 200000, "feeAssetId": null, "timestamp": 1660657753251, "version": 2, "chainId": 84, "sender": "3MsmgWBZKrHwbVbSQiqmStRiFyg5hkfxxa2", "senderPublicKey": "9TejtrnvgE7MvzMR4DcLbf3dqUzovyt4BKEmCsqha2z", "proofs": [ "2X7KPeXuzgKLq3QrEDYZMMTnKJxzeb8sLwQmGAVoBCdfySXey6bjpTroHWEU3EtKwEEEw8LSKsjd1xTVkH9eHb34" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAABwAAAAAJaGVpZ2h0RW5kCQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwIAAAAKaGVpZ2h0X2VuZAIAAAAkaGVpZ2h0X2VuZCBpcyBub3Qgc3BlY2lmaWVkIGluIHN0YXRlAAAAAAxhc3NldHNTdHJpbmcJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACBQAAAAR0aGlzAgAAABBhdmFpbGFibGVfYXNzZXRzAgAAACVBc3NldHMgbGlzdCBpcyBub3Qgc3BlY2lmaWVkIGluIHN0YXRlAQAAABJhc1N3YXBQYXJhbXNTVFJVQ1QAAAABAAAAA3ZhbAQAAAAHJG1hdGNoMAUAAAADdmFsAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABkoSW50LCBJbnQsIEludCwgSW50LCBJbnQpBAAAAAZzdHJ1Y3QFAAAAByRtYXRjaDAFAAAABnN0cnVjdAkAAAIAAAABAgAAABVmYWlsIHRvIGNhc3QgaW50byBJbnQAAAAAEG5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QAAAAskdDAxMTAwMTI5NAAAAAJfMQQAAAAKbGltaXRTcGVudAgFAAAACyR0MDExMDAxMjk0AAAAAl8yBAAAAA5ibGNrczJMbXRSZXNldAgFAAAACyR0MDExMDAxMjk0AAAAAl8zBAAAAAhnbnNidEFtdAgFAAAACyR0MDExMDAxMjk0AAAAAl80BAAAAA1nbnNidEFtdFRvdGFsCAUAAAALJHQwMTEwMDEyOTQAAAACXzUEAAAAEHVzZXJWb3RpbmdBbW91bnQFAAAACGduc2J0QW10BAAAAA92b3RlVG90YWxBbW91bnQJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwUAAAAMdG90YWxWb3RlS2V5AAAAAAAAAAAABAAAABB2b3RlQnlVc2VyQW1vdW50CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIFAAAABHRoaXMFAAAAC3VzZXJWb3RlS2V5AAAAAAAAAAAAAwkAAGcAAAACBQAAAAZoZWlnaHQFAAAACWhlaWdodEVuZAkAAAIAAAABAgAAAA12b3RlIGZpbmlzaGVkCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAAAx0b3RhbFZvdGVLZXkJAABlAAAAAgkAAGQAAAACBQAAAA92b3RlVG90YWxBbW91bnQFAAAAEHVzZXJWb3RpbmdBbW91bnQFAAAAEHZvdGVCeVVzZXJBbW91bnQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAAC3VzZXJWb3RlS2V5BQAAABB1c2VyVm90aW5nQW1vdW50BQAAAANuaWwAAAAAAa649w==", "height": 2187109, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4wUrHpc4f9uftsjdXaUrGAPpJYzmpX5NzgcuQaxVigj7 Next: 7NGKFAHdZ1brP6G6FAX3RxEQmivcHsJLUspdPX6NJZhJ Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = valueOrErrorMessage(getInteger(this, "height_end"), "height_end is not specified in state") | |
5 | 5 | ||
6 | 6 | let b = valueOrErrorMessage(getString(this, "available_assets"), "Assets list is not specified in state") | |
7 | 7 | ||
8 | 8 | func c (d) = { | |
9 | 9 | let e = d | |
10 | 10 | if ($isInstanceOf(e, "(Int, Int, Int, Int, Int)")) | |
11 | 11 | then { | |
12 | 12 | let f = e | |
13 | 13 | f | |
14 | 14 | } | |
15 | 15 | else throw("fail to cast into Int") | |
16 | 16 | } | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | let g = Address(base58'3N9be2mwrA52WJho6DiesZkk4351GvpnWuj') | |
20 | 20 | ||
21 | 21 | let h = split(b, ",") | |
22 | 22 | ||
23 | 23 | func i (j) = makeString(["balance", toString(j)], "_") | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func k (j,l) = makeString(["vote", j, l], "_") | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | @Callable(m) | |
30 | 30 | func castVote (l) = if ((containsElement(h, l) == false)) | |
31 | 31 | then throw("Incorrect vote!") | |
32 | 32 | else { | |
33 | 33 | let n = makeString(["vote", l], "_") | |
34 | 34 | let o = k(toString(m.caller), l) | |
35 | 35 | let p = c(invoke(g, "swapParamsByUserSYSREADONLY", [toString(m.caller), 0], nil)) | |
36 | 36 | let q = p._1 | |
37 | 37 | let r = p._2 | |
38 | 38 | let s = p._3 | |
39 | 39 | let t = p._4 | |
40 | 40 | let u = p._5 | |
41 | 41 | let v = t | |
42 | 42 | let w = valueOrElse(getInteger(this, n), 0) | |
43 | 43 | let x = valueOrElse(getInteger(this, o), 0) | |
44 | 44 | if ((height >= a)) | |
45 | 45 | then throw("vote finished") | |
46 | 46 | else [IntegerEntry(n, ((w + v) - x)), IntegerEntry(o, v)] | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 |
github/deemru/w8io/026f985 32.90 ms ◑