tx · 3GGPJsUJoSxF9zhWFjYoEJKQKwMc2tA1zxPZ9uQ5HDRj 3MtV1AQ8fEPk76tjKgvrufuMe5aA3q4TviQ: -0.10000000 Waves 2020.12.01 17:16 [1289707] smart account 3MtV1AQ8fEPk76tjKgvrufuMe5aA3q4TviQ > SELF 0.00000000 Waves
{ "type": 13, "id": "3GGPJsUJoSxF9zhWFjYoEJKQKwMc2tA1zxPZ9uQ5HDRj", "fee": 10000000, "feeAssetId": null, "timestamp": 1606832163240, "version": 2, "chainId": 84, "sender": "3MtV1AQ8fEPk76tjKgvrufuMe5aA3q4TviQ", "senderPublicKey": "3Fjao2FW1JXSPd5EkP7C3uerW18HYacYsaMYALFMGA6N", "proofs": [ "4gHPqf7ysAoCdSuiuKsH3yQLyyeNSCxH8yQLgmhR7NSnvtMZzNQ37FqkpPHRCEQGoDN26Qc9BV8KjynBJ4pyDUKZ" ], "script": "base64:AAIDAAAAAAAAADMIARIDCgEIEgQKAggIEgQKAggBEgMKAQgSBAoCCAESAwoBCBIDCgEIEgMKAQgSBAoCCAgAAAAJAAAAAAZRVU9SVU0AAAAAAAAAAAEBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAADHRyeUdldFN0cmluZwAAAAEAAAADa2V5BAAAAAN2YWwEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWICAAAAAAUAAAADdmFsAAAAAAxtYWluQ29udHJhY3QFAAAABHRoaXMBAAAAB2lzT3duZXIAAAABAAAAB2FkZHJlc3MJAAAAAAAAAgUAAAAHYWRk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ANd29ya19maW5pc2hlZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAFX2FwcF8FAAAADnRlYW1JZGVudGlmaWVyAgAAAAdfcmVwb3J0BQAAAApyZXBvcnRMaW5rBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAAt0ZWFtQWRkcmVzcwUAAAAMcmV3YXJkQW1vdW50BQAAAAR1bml0BQAAAANuaWwAAAAAYSLyxw==", "height": 1289707, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5uBktXog3ByE1idHffyb4MYdrjQcr9nEfqceXndzDaVm Next: Hhn1n26oo6JW7YFJKRn1CqotunjTntxXRLESVw5ufRBH Diff:
Old | New | Differences | |
---|---|---|---|
90 | 90 | } | |
91 | 91 | (d > 0) | |
92 | 92 | } | |
93 | + | ||
94 | + | ||
95 | + | @Callable(p) | |
96 | + | func test (q) = WriteSet([DataEntry((("test_" + toBase58String(p.transactionId)) + "_title"), q)]) | |
97 | + | ||
93 | 98 | ||
94 | 99 | ||
95 | 100 | @Callable(p) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 1 | |
5 | 5 | ||
6 | 6 | func b (c) = { | |
7 | 7 | let d = { | |
8 | 8 | let e = getInteger(this, c) | |
9 | 9 | if ($isInstanceOf(e, "Int")) | |
10 | 10 | then { | |
11 | 11 | let f = e | |
12 | 12 | f | |
13 | 13 | } | |
14 | 14 | else 0 | |
15 | 15 | } | |
16 | 16 | d | |
17 | 17 | } | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func g (c) = { | |
21 | 21 | let d = { | |
22 | 22 | let e = getString(this, c) | |
23 | 23 | if ($isInstanceOf(e, "String")) | |
24 | 24 | then { | |
25 | 25 | let f = e | |
26 | 26 | f | |
27 | 27 | } | |
28 | 28 | else "" | |
29 | 29 | } | |
30 | 30 | d | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | let h = this | |
35 | 35 | ||
36 | 36 | func i (j) = (j == this) | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func k () = { | |
40 | 40 | let d = { | |
41 | 41 | let e = getString(h, "working_group_members") | |
42 | 42 | if ($isInstanceOf(e, "String")) | |
43 | 43 | then { | |
44 | 44 | let f = e | |
45 | 45 | f | |
46 | 46 | } | |
47 | 47 | else "" | |
48 | 48 | } | |
49 | 49 | d | |
50 | 50 | } | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func l () = { | |
54 | 54 | let d = { | |
55 | 55 | let e = getString(h, "dao_members") | |
56 | 56 | if ($isInstanceOf(e, "String")) | |
57 | 57 | then { | |
58 | 58 | let f = e | |
59 | 59 | f | |
60 | 60 | } | |
61 | 61 | else "" | |
62 | 62 | } | |
63 | 63 | d | |
64 | 64 | } | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func m (n) = { | |
68 | 68 | let d = { | |
69 | 69 | let e = getInteger(h, (("working_group_member_" + toString(n)) + "_weight")) | |
70 | 70 | if ($isInstanceOf(e, "Int")) | |
71 | 71 | then { | |
72 | 72 | let f = e | |
73 | 73 | f | |
74 | 74 | } | |
75 | 75 | else 0 | |
76 | 76 | } | |
77 | 77 | (d > 0) | |
78 | 78 | } | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func o (p) = { | |
82 | 82 | let d = { | |
83 | 83 | let e = getInteger(h, (("dao_member_" + toString(p.caller)) + "_weight")) | |
84 | 84 | if ($isInstanceOf(e, "Int")) | |
85 | 85 | then { | |
86 | 86 | let f = e | |
87 | 87 | f | |
88 | 88 | } | |
89 | 89 | else 0 | |
90 | 90 | } | |
91 | 91 | (d > 0) | |
92 | 92 | } | |
93 | + | ||
94 | + | ||
95 | + | @Callable(p) | |
96 | + | func test (q) = WriteSet([DataEntry((("test_" + toBase58String(p.transactionId)) + "_title"), q)]) | |
97 | + | ||
93 | 98 | ||
94 | 99 | ||
95 | 100 | @Callable(p) | |
96 | 101 | func addTask (q,r) = WriteSet([DataEntry((("tasks_" + toBase58String(p.transactionId)) + "_title"), q), DataEntry((("tasks_" + toBase58String(p.transactionId)) + "_link"), r)]) | |
97 | 102 | ||
98 | 103 | ||
99 | 104 | ||
100 | 105 | @Callable(p) | |
101 | 106 | func addTaskDetails (s,t) = { | |
102 | 107 | let u = getStringValue(this, (("tasks_" + s) + "_performer")) | |
103 | 108 | if ((toString(p.caller) != getStringValue(this, (((("tasks_" + s) + "_app_") + u) + "_leader")))) | |
104 | 109 | then throw("team leader only") | |
105 | 110 | else WriteSet([DataEntry((("tasks_" + s) + "_requestedreward"), t)]) | |
106 | 111 | } | |
107 | 112 | ||
108 | 113 | ||
109 | 114 | ||
110 | 115 | @Callable(p) | |
111 | 116 | func initTaskVoting (s) = if (!(m(p.caller))) | |
112 | 117 | then throw("grants working group access only") | |
113 | 118 | else WriteSet([DataEntry((("tasks_" + s) + "_status"), "voting_started")]) | |
114 | 119 | ||
115 | 120 | ||
116 | 121 | ||
117 | 122 | @Callable(p) | |
118 | 123 | func voteForTaskProposal (s,v) = if (!(o(p))) | |
119 | 124 | then throw("you can't vote") | |
120 | 125 | else if ((getStringValue(this, (("tasks_" + s) + "_status")) != "proposed")) | |
121 | 126 | then throw("voting is closed or not started") | |
122 | 127 | else if (if ((v != -1)) | |
123 | 128 | then (v != 1) | |
124 | 129 | else false) | |
125 | 130 | then throw("you need to vote 1 or -1") | |
126 | 131 | else { | |
127 | 132 | let w = ((("tasks_" + s) + "_voted_") + toString(p.caller)) | |
128 | 133 | let x = b(w) | |
129 | 134 | if (!((x == 0))) | |
130 | 135 | then throw("you have already voted") | |
131 | 136 | else { | |
132 | 137 | let y = (("tasks_" + s) + "_voting_state") | |
133 | 138 | let z = b(y) | |
134 | 139 | let A = (("tasks_" + s) + "_voting_amount") | |
135 | 140 | let B = (b(y) + 1) | |
136 | 141 | let C = (z + v) | |
137 | 142 | ScriptResult(WriteSet([DataEntry(y, C), DataEntry(w, v), DataEntry(A, B)]), TransferSet([ScriptTransfer(p.caller, 500000, unit)])) | |
138 | 143 | } | |
139 | 144 | } | |
140 | 145 | ||
141 | 146 | ||
142 | 147 | ||
143 | 148 | @Callable(p) | |
144 | 149 | func finishTaskProposalVoting (s) = if ((a > ((b((("tasks_" + s) + "_voting_amount")) * 100) / b("dao_size")))) | |
145 | 150 | then throw((("more than " + toString(a)) + "% members have to vote before finishing the voting")) | |
146 | 151 | else if (!(m(p.caller))) | |
147 | 152 | then throw("grants working group access only") | |
148 | 153 | else { | |
149 | 154 | let y = (("tasks_" + s) + "_voting_state") | |
150 | 155 | let z = b(y) | |
151 | 156 | if ((z > 0)) | |
152 | 157 | then { | |
153 | 158 | let D = "approved" | |
154 | 159 | WriteSet([DataEntry((("tasks_" + s) + "_status"), D)]) | |
155 | 160 | } | |
156 | 161 | else { | |
157 | 162 | let D = "rejected" | |
158 | 163 | WriteSet([DataEntry((("tasks_" + s) + "_status"), D)]) | |
159 | 164 | } | |
160 | 165 | } | |
161 | 166 | ||
162 | 167 | ||
163 | 168 | ||
164 | 169 | @Callable(p) | |
165 | 170 | func startWork (s) = { | |
166 | 171 | let u = getStringValue(this, (("tasks_" + s) + "_performer")) | |
167 | 172 | if ((toString(p.caller) != getStringValue(this, (((("tasks_" + s) + "_app_") + u) + "_leader")))) | |
168 | 173 | then throw("team leader only") | |
169 | 174 | else WriteSet([DataEntry((("tasks_" + s) + "_status"), "work_started")]) | |
170 | 175 | } | |
171 | 176 | ||
172 | 177 | ||
173 | 178 | ||
174 | 179 | @Callable(p) | |
175 | 180 | func rejectTask (s) = if (!(m(p.caller))) | |
176 | 181 | then throw("grants working group access only") | |
177 | 182 | else { | |
178 | 183 | let u = getStringValue(this, (("tasks_" + s) + "_performer")) | |
179 | 184 | WriteSet([DataEntry((("tasks_" + s) + "_status"), "rejected"), DataEntry((((("tasks_" + s) + "_app_") + u) + "_process"), "rejected")]) | |
180 | 185 | } | |
181 | 186 | ||
182 | 187 | ||
183 | 188 | ||
184 | 189 | @Callable(p) | |
185 | 190 | func acceptWorkResult (s,E) = if (!(m(p.caller))) | |
186 | 191 | then throw("grants working group access only") | |
187 | 192 | else { | |
188 | 193 | let F = b((("tasks_" + s) + "_reward")) | |
189 | 194 | let u = getStringValue(this, (("tasks_" + s) + "_performer")) | |
190 | 195 | let G = getStringValue(this, (((("tasks_" + s) + "_app_") + u) + "_leader")) | |
191 | 196 | ScriptResult(WriteSet([DataEntry((("tasks_" + s) + "_status"), "work_finished"), DataEntry((((("tasks_" + s) + "_app_") + u) + "_report"), E)]), TransferSet([ScriptTransfer(addressFromStringValue(G), F, unit)])) | |
192 | 197 | } | |
193 | 198 | ||
194 | 199 |
github/deemru/w8io/169f3d6 42.47 ms ◑