tx · 4m7YTvePdAzignJRoWbXYNKoukdLpP5znYQdjjDXgJDc 3N5rNyYSAsaP9QL2eQq286RhevB8msHFffu: -0.01400000 Waves 2020.08.27 12:47 [1150952] smart account 3N5rNyYSAsaP9QL2eQq286RhevB8msHFffu > SELF 0.00000000 Waves
{ "type": 13, "id": "4m7YTvePdAzignJRoWbXYNKoukdLpP5znYQdjjDXgJDc", "fee": 1400000, "feeAssetId": null, "timestamp": 1598521740658, "version": 1, "sender": "3N5rNyYSAsaP9QL2eQq286RhevB8msHFffu", "senderPublicKey": "CBTEuFN6ku1LNaPuGHHTMh2CBb3kPa5D73XXTJvKydun", "proofs": [ "43kktb3Thy8cKXeHE46nCbaPdH6hBAbTGJKkNM6LVuPbCV8oBxJWXPHG4Se5ZAPC21RpYrphJxkaRprQpeiNZLAc" ], "script": "base64:AAIDAAAAAAAAABsIARIHCgUICAgICBIECgIICBIDCgEIEgMKAQgAAAAJAAAAAAZ1cFZvdGUCAAAABnVwdm90ZQAAAAAIZG93blZvdGUCAAAACGRvd252b3RlAAAAAAxhZG1pbkFkZHJlc3MBAAAAGgFUOLYhWIA2WAg9IJQBVCmgZJeEnZPD9jSLAQAAAA1nZXRQcm9maWxlS2V5AAAAAQAAAAJpZAkAASwAAAACBQAAAAJpZAIAAAAUX2VudHJlcHJlbmV1clByb2ZpbGUBAAAADGdldFN0YXR1c0tleQAAAAEAAAACaWQJAAEsAAAAAgUAAAACaWQCAAAAB19zdGF0dXMBAAAACmdldFZvdGVLZXkAAAACAAAAAmlkAAAABHR5cGUDCQAAAAAAAAIFAAAABHR5cGUCAAAABnVwdm90ZQkAASwAAAACBQAAAAJpZAIAAAAHX3Vwdm90ZQMJAAAAAAAAAgUAAAAEdHlwZQIAAAAIZG93bnZvdGUJAAEsAAAAAgUAAAACaWQCAAAACV9kb3dudm90ZQkAAAIAAAABAgAAABFJbnZhbGlkIHZvdGUgdHlwZQEAAAAMcHJvZmlsZUV4aXN0AAAAAQAAAAJpZAQAAAAHJ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VlCQAAAgAAAAECAAAAI1RoaXMgcHJvZmlsZSBpcyBub3Qgb3BlbiBmb3Igdm90aW5nCQAAAgAAAAECAAAAD0ludmFsaWQgUHJvZmlsZQAAAAFpAQAAAAhvcGVuVm90ZQAAAAEAAAAGdm90ZUlkAwkBAAAAAiE9AAAAAggIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwUAAAAMYWRtaW5BZGRyZXNzCQAAAgAAAAECAAAALk9ubHkgRHl6cnVwdCBBZG1pbiBjYW4gY2FsbCB0aGlzIGRBcHAgZnVuY3Rpb24DCQEAAAAMcHJvZmlsZUV4aXN0AAAAAQUAAAAGdm90ZUlkCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAAMZ2V0U3RhdHVzS2V5AAAAAQUAAAAGdm90ZUlkAgAAAARvcGVuBQAAAANuaWwJAAACAAAAAQIAAAAKSW52YWxpZCBJRAAAAAFpAQAAAAljbG9zZVZvdGUAAAABAAAABnZvdGVJZAMJAQAAAAIhPQAAAAIICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMFAAAADGFkbWluQWRkcmVzcwkAAAIAAAABAgAAAC5Pbmx5IER5enJ1cHQgQWRtaW4gY2FuIGNhbGwgdGhpcyBkQXBwIGZ1bmN0aW9uAwkBAAAADHByb2ZpbGVFeGlzdAAAAAEFAAAABnZvdGVJZAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAADGdldFN0YXR1c0tleQAAAAEFAAAABnZvdGVJZAIAAAAGY2xvc2VkBQAAAANuaWwJAAACAAAAAQIAAAAKSW52YWxpZCBJRAAAAAAAUuya", "chainId": 84, "height": 1150952, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4azDtZGzz29TmKxoHG6P9q3Y8s8EBe7etozL8iwaXD2a Next: 9YWZEUdaZisAJ7AvsaToWskp7nGe4j4RcQqL5iih8Rjo Diff:
Old | New | Differences | |
---|---|---|---|
5 | 5 | ||
6 | 6 | let b = "downvote" | |
7 | 7 | ||
8 | - | let c = base58' | |
8 | + | let c = base58'3Mu5woJ54s7vHJgaeNcJ4C9ByfdmMF2jpjC' | |
9 | 9 | ||
10 | 10 | func d (e) = (e + "_entrepreneurProfile") | |
11 | 11 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "upvote" | |
5 | 5 | ||
6 | 6 | let b = "downvote" | |
7 | 7 | ||
8 | - | let c = base58' | |
8 | + | let c = base58'3Mu5woJ54s7vHJgaeNcJ4C9ByfdmMF2jpjC' | |
9 | 9 | ||
10 | 10 | func d (e) = (e + "_entrepreneurProfile") | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func f (e) = (e + "_status") | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func g (e,h) = if ((h == "upvote")) | |
17 | 17 | then (e + "_upvote") | |
18 | 18 | else if ((h == "downvote")) | |
19 | 19 | then (e + "_downvote") | |
20 | 20 | else throw("Invalid vote type") | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func i (e) = { | |
24 | 24 | let j = getString(this, d(e)) | |
25 | 25 | if ($isInstanceOf(j, "String")) | |
26 | 26 | then { | |
27 | 27 | let k = j | |
28 | 28 | true | |
29 | 29 | } | |
30 | 30 | else false | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func l (m) = { | |
35 | 35 | let j = getString(this, f(m)) | |
36 | 36 | if ($isInstanceOf(j, "String")) | |
37 | 37 | then { | |
38 | 38 | let k = j | |
39 | 39 | k | |
40 | 40 | } | |
41 | 41 | else false | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func n (m,o) = { | |
46 | 46 | let j = getInteger(this, g(m, o)) | |
47 | 47 | if ($isInstanceOf(j, "Int")) | |
48 | 48 | then { | |
49 | 49 | let k = j | |
50 | 50 | k | |
51 | 51 | } | |
52 | 52 | else throw("Not a valid vote ID") | |
53 | 53 | } | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | @Callable(p) | |
57 | 57 | func addEntrepreneurProfile (q,r,s,t,u) = if ((p.caller.bytes != c)) | |
58 | 58 | then throw("Only Dyzrupt Admin can call this dApp function") | |
59 | 59 | else { | |
60 | 60 | let v = toBase58String(p.transactionId) | |
61 | 61 | WriteSet([DataEntry(d(v), ((((((((q + "_") + r) + "_") + s) + "_") + t) + "_") + u)), DataEntry(g(v, "upvote"), 0), DataEntry(f(v), "open"), DataEntry(g(v, "downvote"), 0)]) | |
62 | 62 | } | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | ||
66 | 66 | @Callable(p) | |
67 | 67 | func vote (m,o) = if (i(m)) | |
68 | 68 | then if ((l(m) == "open")) | |
69 | 69 | then if (if ((o == a)) | |
70 | 70 | then true | |
71 | 71 | else (o == b)) | |
72 | 72 | then { | |
73 | 73 | let w = n(m, o) | |
74 | 74 | let x = (w + 1) | |
75 | 75 | WriteSet([DataEntry(g(m, o), x)]) | |
76 | 76 | } | |
77 | 77 | else throw("Not a valid vote value") | |
78 | 78 | else throw("This profile is not open for voting") | |
79 | 79 | else throw("Invalid Profile") | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | ||
83 | 83 | @Callable(p) | |
84 | 84 | func openVote (m) = if ((p.caller.bytes != c)) | |
85 | 85 | then throw("Only Dyzrupt Admin can call this dApp function") | |
86 | 86 | else if (i(m)) | |
87 | 87 | then WriteSet([DataEntry(f(m), "open")]) | |
88 | 88 | else throw("Invalid ID") | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | ||
92 | 92 | @Callable(p) | |
93 | 93 | func closeVote (m) = if ((p.caller.bytes != c)) | |
94 | 94 | then throw("Only Dyzrupt Admin can call this dApp function") | |
95 | 95 | else if (i(m)) | |
96 | 96 | then WriteSet([DataEntry(f(m), "closed")]) | |
97 | 97 | else throw("Invalid ID") | |
98 | 98 | ||
99 | 99 |
github/deemru/w8io/169f3d6 35.31 ms ◑