tx · DstErzo7hWsPT2amPyfWnfRe5jy2SnNpHbc3Yd8oxn8F 3MyytsRPxYr48we6CPWAQ1z4x6cmEbHWtFq: -0.01400000 Waves 2021.04.01 19:34 [1463626] smart account 3MyytsRPxYr48we6CPWAQ1z4x6cmEbHWtFq > SELF 0.00000000 Waves
{ "type": 13, "id": "DstErzo7hWsPT2amPyfWnfRe5jy2SnNpHbc3Yd8oxn8F", "fee": 1400000, "feeAssetId": null, "timestamp": 1617294930415, "version": 2, "chainId": 84, "sender": "3MyytsRPxYr48we6CPWAQ1z4x6cmEbHWtFq", "senderPublicKey": "551T51u5CXgqTybnycyVjFjM9tKkqVEenm7ZrxxC7gLe", "proofs": [ "f8SQEdFBoyHFzTWq4hKZgnSezLxoxTk2FiBrtTBEDdPzpqmLvebfSoP4TcnZUtGHgUCichce1MaPxZbSugq1aJm" ], "script": "base64:AAIDAAAAAAAAACwIARIHCgUICAgICBIECgIICBIDCgEIEgMKAQgSAwoBCBIAEgMKAQESAwoBAQAAABoAAAAABnVwVm90ZQIAAAAGdXB2b3RlAAAAAA1hZG1pbkFkZHJlc3MxAQAAABoBVGx6nhB9WGGjnofF5YsTbL8z35oL0vs2fAAAAAANYWRtaW5BZGRyZXNzMgEAAAAaAVTlj1A9878YQ058BBZUI9QC+LwgFva37DoAAAAADWFkbWluQWRkcmVzczMBAAAAGgFUPo0bC5weIFiGP3KzAhxqwrizqd9EMgoVAAAAAAVkeXpJZAEAAAAgFZsfdOZJuZHuLptIBwOCMHYpnDoPtCAZD6J+T/NJGW4BAAAAD2dldFN0YWtlUG9vbEtleQAAAAACAAAACnN0YWtlX3Bvb2wBAAAADGdldFN0YWtlUG9vbAAAAAAEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwkBAAAAD2dldFN0YWtlUG9vbEtleQAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAEAAAAQZ2V0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AAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAICAAAADmNsYWltZWRfdG90YWxfBQAAAAZzdGFrZXIJAABkAAAAAgUAAAAPY2xhaW1lZEJ5U3Rha2VyBQAAAAZyZXdhcmQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAADWNsYWltZWRfdG90YWwJAABkAAAAAgUAAAARY2xhaW1lZFRvdGFsU29GYXIFAAAABnJld2FyZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACAgAAAAtsYXN0X2NsYWltXwUAAAAGc3Rha2VyBQAAAA1jdXJyZW50SGVpZ2h0CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAAMZ2V0U3Rha2VyS2V5AAAAAQUAAAAGc3Rha2VyBQAAAA5uZXdTdGFrZUFtb3VudAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAD2dldFN0YWtlUG9vbEtleQAAAAAFAAAADG5ld1N0YWtlUG9vbAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGcmV3YXJkBQAAAAVkeXpJZAUAAAADbmlsAAAAAIJ2Tk4=", "height": 1463626, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EBDzAgWRr5pAfdHPpAxy25C2BXNm3oWH1nYaMmDogrEp Next: 5Dg8wXaUWSSPG4FTTnj3QNqvHpM3zKX28Wt6qrrsobxQ Diff:
Old | New | Differences | |
---|---|---|---|
157 | 157 | } | |
158 | 158 | ||
159 | 159 | ||
160 | - | @Callable(I) | |
161 | - | func addEntrepreneurProfile (J,K,L,M,N) = if (if (if ((I.caller.bytes == b)) | |
160 | + | func I () = "_stake" | |
161 | + | ||
162 | + | ||
163 | + | func J () = { | |
164 | + | let h = getInteger(this, I()) | |
165 | + | if ($isInstanceOf(h, "Int")) | |
166 | + | then { | |
167 | + | let i = h | |
168 | + | i | |
169 | + | } | |
170 | + | else 0 | |
171 | + | } | |
172 | + | ||
173 | + | ||
174 | + | @Callable(K) | |
175 | + | func addEntrepreneurProfile (L,M,N,O,P) = if (if (if ((K.caller.bytes == b)) | |
162 | 176 | then true | |
163 | - | else ( | |
177 | + | else (K.caller.bytes == c)) | |
164 | 178 | then true | |
165 | - | else ( | |
179 | + | else (K.caller.bytes == d)) | |
166 | 180 | then { | |
167 | - | let | |
168 | - | WriteSet([DataEntry(p( | |
181 | + | let Q = toBase58String(K.transactionId) | |
182 | + | WriteSet([DataEntry(p(Q), ((((((((L + "_") + M) + "_") + N) + "_") + O) + "_") + P)), DataEntry(r(Q, "upvote"), 0), DataEntry(j(Q, "upvote"), 0), DataEntry(q(Q), "open")]) | |
169 | 183 | } | |
170 | 184 | else throw("Only Dyzrupt Admin can call this dApp function") | |
171 | 185 | ||
172 | 186 | ||
173 | 187 | ||
174 | - | @Callable( | |
188 | + | @Callable(K) | |
175 | 189 | func vote (u,x) = { | |
176 | - | let | |
177 | - | let F = toBase58String( | |
178 | - | if (( | |
190 | + | let R = extract(K.payment) | |
191 | + | let F = toBase58String(K.caller.bytes) | |
192 | + | if ((R.amount == 0)) | |
179 | 193 | then throw("You cannot vote without paying voting fee") | |
180 | - | else if (( | |
194 | + | else if ((R.assetId != e)) | |
181 | 195 | then throw("You can only vote with DYZRUPT token") | |
182 | - | else if (E(toBase58String( | |
196 | + | else if (E(toBase58String(K.caller.bytes), u)) | |
183 | 197 | then if (s(u)) | |
184 | 198 | then if ((t(u) == "open")) | |
185 | 199 | then if ((x == a)) | |
186 | 200 | then { | |
187 | - | let | |
188 | - | let | |
189 | - | let | |
190 | - | let | |
191 | - | ScriptResult(WriteSet([DataEntry(r(u, x), | |
201 | + | let S = A(u, x) | |
202 | + | let T = w(u, x) | |
203 | + | let U = (S + 1) | |
204 | + | let V = (T + R.amount) | |
205 | + | ScriptResult(WriteSet([DataEntry(r(u, x), U), DataEntry(B(F, u), u), DataEntry(v(F, u), R.amount), DataEntry(j(u, x), V)]), TransferSet([ScriptTransfer(this, R.amount, e)])) | |
192 | 206 | } | |
193 | 207 | else throw("Not a valid vote value") | |
194 | 208 | else throw("This profile is not open for voting") | |
198 | 212 | ||
199 | 213 | ||
200 | 214 | ||
201 | - | @Callable( | |
202 | - | func openVote (u) = if (if (if (( | |
215 | + | @Callable(K) | |
216 | + | func openVote (u) = if (if (if ((K.caller.bytes == b)) | |
203 | 217 | then true | |
204 | - | else ( | |
218 | + | else (K.caller.bytes == c)) | |
205 | 219 | then true | |
206 | - | else ( | |
220 | + | else (K.caller.bytes == d)) | |
207 | 221 | then if (s(u)) | |
208 | 222 | then WriteSet([DataEntry(q(u), "open")]) | |
209 | 223 | else throw("Invalid ID") | |
211 | 225 | ||
212 | 226 | ||
213 | 227 | ||
214 | - | @Callable( | |
215 | - | func closeVote (u) = if (if (if (( | |
228 | + | @Callable(K) | |
229 | + | func closeVote (u) = if (if (if ((K.caller.bytes == b)) | |
216 | 230 | then true | |
217 | - | else ( | |
231 | + | else (K.caller.bytes == c)) | |
218 | 232 | then true | |
219 | - | else ( | |
233 | + | else (K.caller.bytes == d)) | |
220 | 234 | then if (s(u)) | |
221 | 235 | then WriteSet([DataEntry(q(u), "closed")]) | |
222 | 236 | else throw("Invalid ID") | |
224 | 238 | ||
225 | 239 | ||
226 | 240 | ||
227 | - | @Callable( | |
241 | + | @Callable(K) | |
228 | 242 | func withdraw (u) = { | |
229 | - | let F = toBase58String( | |
243 | + | let F = toBase58String(K.caller.bytes) | |
230 | 244 | if ((D(F, u) != "")) | |
231 | 245 | then if ((t(u) == "closed")) | |
232 | 246 | then { | |
233 | - | let | |
234 | - | let | |
235 | - | let h = getInteger(this, | |
247 | + | let W = v(F, u) | |
248 | + | let X = { | |
249 | + | let h = getInteger(this, W) | |
236 | 250 | if ($isInstanceOf(h, "Int")) | |
237 | 251 | then { | |
238 | 252 | let i = h | |
240 | 254 | } | |
241 | 255 | else throw("You didn't vote for this entrepreneur") | |
242 | 256 | } | |
243 | - | if (( | |
257 | + | if ((X == 0)) | |
244 | 258 | then throw("Seems you have previously withdrawn.") | |
245 | - | else ScriptResult(WriteSet([DataEntry( | |
259 | + | else ScriptResult(WriteSet([DataEntry(W, 0)]), TransferSet([ScriptTransfer(K.caller, X, e)])) | |
246 | 260 | } | |
247 | 261 | else throw("Can't withdraw vote amount while voting is still open.") | |
248 | 262 | else throw("You didn't vote for this entrepreneur") | |
250 | 264 | ||
251 | 265 | ||
252 | 266 | ||
253 | - | @Callable( | |
267 | + | @Callable(K) | |
254 | 268 | func stake () = { | |
255 | - | let n = toBase58String( | |
256 | - | let | |
257 | - | if (( | |
269 | + | let n = toBase58String(K.caller.bytes) | |
270 | + | let R = extract(K.payment) | |
271 | + | if ((R.amount == 0)) | |
258 | 272 | then throw("Stake amount too low") | |
259 | - | else if (( | |
273 | + | else if ((R.assetId != e)) | |
260 | 274 | then throw("You can only stake with DYZRUPT token") | |
261 | 275 | else { | |
262 | - | let | |
263 | - | let | |
264 | - | let | |
265 | - | let | |
266 | - | let | |
267 | - | let | |
268 | - | ScriptResult(WriteSet([DataEntry(m(n), | |
276 | + | let Y = o(n) | |
277 | + | let Z = fraction(R.amount, 5, 100) | |
278 | + | let aa = (R.amount - Z) | |
279 | + | let ab = (Y + aa) | |
280 | + | let ac = g() | |
281 | + | let ad = (ac + Z) | |
282 | + | ScriptResult(WriteSet([DataEntry(m(n), ab), DataEntry(f(), ad)]), TransferSet(nil)) | |
269 | 283 | } | |
270 | 284 | } | |
271 | 285 | ||
272 | 286 | ||
273 | 287 | ||
274 | - | @Callable( | |
275 | - | func unstake ( | |
276 | - | let n = toBase58String( | |
277 | - | let | |
278 | - | if (( | |
288 | + | @Callable(K) | |
289 | + | func unstake (ae) = { | |
290 | + | let n = toBase58String(K.caller.bytes) | |
291 | + | let Y = o(n) | |
292 | + | if ((Y == 0)) | |
279 | 293 | then throw("You don't have any stakes") | |
280 | - | else if (( | |
294 | + | else if ((ae > Y)) | |
281 | 295 | then throw("You can't withdraw an amount higher than you staked") | |
282 | 296 | else { | |
283 | - | let | |
284 | - | let | |
285 | - | let | |
286 | - | let | |
287 | - | let | |
288 | - | ScriptResult(WriteSet([DataEntry(m(n), | |
297 | + | let af = fraction(ae, 10, 100) | |
298 | + | let ag = (ae - af) | |
299 | + | let ah = (Y - ae) | |
300 | + | let ac = g() | |
301 | + | let ad = (ac + af) | |
302 | + | ScriptResult(WriteSet([DataEntry(m(n), ah), DataEntry(f(), ad)]), TransferSet([ScriptTransfer(K.caller, ag, e)])) | |
289 | 303 | } | |
290 | 304 | } | |
291 | 305 | ||
292 | 306 | ||
293 | 307 | ||
294 | - | @Callable( | |
295 | - | func claimDailyStakeReward ( | |
296 | - | let n = toBase58String( | |
297 | - | let | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | if (( | |
308 | + | @Callable(K) | |
309 | + | func claimDailyStakeReward (ai) = { | |
310 | + | let n = toBase58String(K.caller.bytes) | |
311 | + | let Y = o(n) | |
312 | + | let ac = g() | |
313 | + | let aj = height | |
314 | + | let ak = y(n) | |
315 | + | let al = G() | |
316 | + | let am = H(n) | |
317 | + | if ((Y == 0)) | |
304 | 318 | then throw("You don't have any stakes") | |
305 | - | else if (( | |
319 | + | else if ((ac == 0)) | |
306 | 320 | then throw("Nothing in Stake pool at this time. Try again later") | |
307 | - | else if (( | |
321 | + | else if ((ai > ac)) | |
308 | 322 | then throw("No rewards at this time") | |
309 | - | else if ((( | |
310 | - | then throw( | |
323 | + | else if (((ak + 1440) > aj)) | |
324 | + | then throw(toString(J())) | |
311 | 325 | else { | |
312 | - | let | |
313 | - | let | |
314 | - | ScriptResult(WriteSet([DataEntry(("claimed_total_" + n), ( | |
326 | + | let ad = (ac - ai) | |
327 | + | let an = Y | |
328 | + | ScriptResult(WriteSet([DataEntry(("claimed_total_" + n), (am + ai)), DataEntry("claimed_total", (al + ai)), DataEntry(("last_claim_" + n), aj), DataEntry(m(n), an), DataEntry(f(), ad)]), TransferSet([ScriptTransfer(K.caller, ai, e)])) | |
315 | 329 | } | |
316 | 330 | } | |
317 | 331 |
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 = base58'3MyofeFJ29LLoVcHYtYgkLP7EUuYYGKBB4P' | |
7 | 7 | ||
8 | 8 | let c = base58'3NAqtCScgFynCuRLUoXm2BHTdu8suatCe7b' | |
9 | 9 | ||
10 | 10 | let d = base58'3Mucpi1K4FMVrZKnYEgjxQf5DkkBX7QrHoJ' | |
11 | 11 | ||
12 | 12 | let e = base58'2TLkgUERqF1y21ShjiFVVTVYtP1BL8wvc6BGLZvt4fND' | |
13 | 13 | ||
14 | 14 | func f () = "stake_pool" | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func g () = { | |
18 | 18 | let h = getInteger(this, f()) | |
19 | 19 | if ($isInstanceOf(h, "Int")) | |
20 | 20 | then { | |
21 | 21 | let i = h | |
22 | 22 | i | |
23 | 23 | } | |
24 | 24 | else 0 | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func j (k,l) = if ((l == "upvote")) | |
29 | 29 | then (((k + "_") + l) + "_amount") | |
30 | 30 | else throw("Invalid vote type") | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func m (n) = (n + "_stake") | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func o (n) = { | |
37 | 37 | let h = getInteger(this, m(n)) | |
38 | 38 | if ($isInstanceOf(h, "Int")) | |
39 | 39 | then { | |
40 | 40 | let i = h | |
41 | 41 | i | |
42 | 42 | } | |
43 | 43 | else 0 | |
44 | 44 | } | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func p (k) = (k + "_entrepreneurProfile") | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func q (k) = (k + "_status") | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func r (k,l) = if ((l == "upvote")) | |
54 | 54 | then (k + "_upvote") | |
55 | 55 | else throw("Invalid vote type") | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func s (k) = { | |
59 | 59 | let h = getString(this, p(k)) | |
60 | 60 | if ($isInstanceOf(h, "String")) | |
61 | 61 | then { | |
62 | 62 | let i = h | |
63 | 63 | true | |
64 | 64 | } | |
65 | 65 | else false | |
66 | 66 | } | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func t (u) = { | |
70 | 70 | let h = getString(this, q(u)) | |
71 | 71 | if ($isInstanceOf(h, "String")) | |
72 | 72 | then { | |
73 | 73 | let i = h | |
74 | 74 | i | |
75 | 75 | } | |
76 | 76 | else false | |
77 | 77 | } | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func v (k,u) = (((k + "_") + u) + "_amount") | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func w (u,x) = { | |
84 | 84 | let h = getInteger(this, j(u, x)) | |
85 | 85 | if ($isInstanceOf(h, "Int")) | |
86 | 86 | then { | |
87 | 87 | let i = h | |
88 | 88 | i | |
89 | 89 | } | |
90 | 90 | else 0 | |
91 | 91 | } | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func y (z) = { | |
95 | 95 | let h = getInteger(this, ("last_claim_" + z)) | |
96 | 96 | if ($isInstanceOf(h, "Int")) | |
97 | 97 | then { | |
98 | 98 | let i = h | |
99 | 99 | i | |
100 | 100 | } | |
101 | 101 | else 0 | |
102 | 102 | } | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func A (u,x) = { | |
106 | 106 | let h = getInteger(this, r(u, x)) | |
107 | 107 | if ($isInstanceOf(h, "Int")) | |
108 | 108 | then { | |
109 | 109 | let i = h | |
110 | 110 | i | |
111 | 111 | } | |
112 | 112 | else throw("Not a valid vote ID") | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func B (C,u) = ((((C + "_") + u) + "_") + "vote") | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func D (C,u) = { | |
120 | 120 | let h = getString(this, B(C, u)) | |
121 | 121 | if ($isInstanceOf(h, "String")) | |
122 | 122 | then { | |
123 | 123 | let i = h | |
124 | 124 | i | |
125 | 125 | } | |
126 | 126 | else "" | |
127 | 127 | } | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func E (C,u) = { | |
131 | 131 | let F = D(C, u) | |
132 | 132 | if ((F == "")) | |
133 | 133 | then true | |
134 | 134 | else false | |
135 | 135 | } | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func G () = { | |
139 | 139 | let h = getInteger(this, "claimed_total") | |
140 | 140 | if ($isInstanceOf(h, "Int")) | |
141 | 141 | then { | |
142 | 142 | let i = h | |
143 | 143 | i | |
144 | 144 | } | |
145 | 145 | else 0 | |
146 | 146 | } | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func H (C) = { | |
150 | 150 | let h = getInteger(this, ("claimed_total_" + C)) | |
151 | 151 | if ($isInstanceOf(h, "Int")) | |
152 | 152 | then { | |
153 | 153 | let i = h | |
154 | 154 | i | |
155 | 155 | } | |
156 | 156 | else 0 | |
157 | 157 | } | |
158 | 158 | ||
159 | 159 | ||
160 | - | @Callable(I) | |
161 | - | func addEntrepreneurProfile (J,K,L,M,N) = if (if (if ((I.caller.bytes == b)) | |
160 | + | func I () = "_stake" | |
161 | + | ||
162 | + | ||
163 | + | func J () = { | |
164 | + | let h = getInteger(this, I()) | |
165 | + | if ($isInstanceOf(h, "Int")) | |
166 | + | then { | |
167 | + | let i = h | |
168 | + | i | |
169 | + | } | |
170 | + | else 0 | |
171 | + | } | |
172 | + | ||
173 | + | ||
174 | + | @Callable(K) | |
175 | + | func addEntrepreneurProfile (L,M,N,O,P) = if (if (if ((K.caller.bytes == b)) | |
162 | 176 | then true | |
163 | - | else ( | |
177 | + | else (K.caller.bytes == c)) | |
164 | 178 | then true | |
165 | - | else ( | |
179 | + | else (K.caller.bytes == d)) | |
166 | 180 | then { | |
167 | - | let | |
168 | - | WriteSet([DataEntry(p( | |
181 | + | let Q = toBase58String(K.transactionId) | |
182 | + | WriteSet([DataEntry(p(Q), ((((((((L + "_") + M) + "_") + N) + "_") + O) + "_") + P)), DataEntry(r(Q, "upvote"), 0), DataEntry(j(Q, "upvote"), 0), DataEntry(q(Q), "open")]) | |
169 | 183 | } | |
170 | 184 | else throw("Only Dyzrupt Admin can call this dApp function") | |
171 | 185 | ||
172 | 186 | ||
173 | 187 | ||
174 | - | @Callable( | |
188 | + | @Callable(K) | |
175 | 189 | func vote (u,x) = { | |
176 | - | let | |
177 | - | let F = toBase58String( | |
178 | - | if (( | |
190 | + | let R = extract(K.payment) | |
191 | + | let F = toBase58String(K.caller.bytes) | |
192 | + | if ((R.amount == 0)) | |
179 | 193 | then throw("You cannot vote without paying voting fee") | |
180 | - | else if (( | |
194 | + | else if ((R.assetId != e)) | |
181 | 195 | then throw("You can only vote with DYZRUPT token") | |
182 | - | else if (E(toBase58String( | |
196 | + | else if (E(toBase58String(K.caller.bytes), u)) | |
183 | 197 | then if (s(u)) | |
184 | 198 | then if ((t(u) == "open")) | |
185 | 199 | then if ((x == a)) | |
186 | 200 | then { | |
187 | - | let | |
188 | - | let | |
189 | - | let | |
190 | - | let | |
191 | - | ScriptResult(WriteSet([DataEntry(r(u, x), | |
201 | + | let S = A(u, x) | |
202 | + | let T = w(u, x) | |
203 | + | let U = (S + 1) | |
204 | + | let V = (T + R.amount) | |
205 | + | ScriptResult(WriteSet([DataEntry(r(u, x), U), DataEntry(B(F, u), u), DataEntry(v(F, u), R.amount), DataEntry(j(u, x), V)]), TransferSet([ScriptTransfer(this, R.amount, e)])) | |
192 | 206 | } | |
193 | 207 | else throw("Not a valid vote value") | |
194 | 208 | else throw("This profile is not open for voting") | |
195 | 209 | else throw("Invalid Profile") | |
196 | 210 | else throw("You can't vote twice") | |
197 | 211 | } | |
198 | 212 | ||
199 | 213 | ||
200 | 214 | ||
201 | - | @Callable( | |
202 | - | func openVote (u) = if (if (if (( | |
215 | + | @Callable(K) | |
216 | + | func openVote (u) = if (if (if ((K.caller.bytes == b)) | |
203 | 217 | then true | |
204 | - | else ( | |
218 | + | else (K.caller.bytes == c)) | |
205 | 219 | then true | |
206 | - | else ( | |
220 | + | else (K.caller.bytes == d)) | |
207 | 221 | then if (s(u)) | |
208 | 222 | then WriteSet([DataEntry(q(u), "open")]) | |
209 | 223 | else throw("Invalid ID") | |
210 | 224 | else throw("Only Dyzrupt Admin can call this dApp function") | |
211 | 225 | ||
212 | 226 | ||
213 | 227 | ||
214 | - | @Callable( | |
215 | - | func closeVote (u) = if (if (if (( | |
228 | + | @Callable(K) | |
229 | + | func closeVote (u) = if (if (if ((K.caller.bytes == b)) | |
216 | 230 | then true | |
217 | - | else ( | |
231 | + | else (K.caller.bytes == c)) | |
218 | 232 | then true | |
219 | - | else ( | |
233 | + | else (K.caller.bytes == d)) | |
220 | 234 | then if (s(u)) | |
221 | 235 | then WriteSet([DataEntry(q(u), "closed")]) | |
222 | 236 | else throw("Invalid ID") | |
223 | 237 | else throw("Only Dyzrupt Admin can call this dApp function") | |
224 | 238 | ||
225 | 239 | ||
226 | 240 | ||
227 | - | @Callable( | |
241 | + | @Callable(K) | |
228 | 242 | func withdraw (u) = { | |
229 | - | let F = toBase58String( | |
243 | + | let F = toBase58String(K.caller.bytes) | |
230 | 244 | if ((D(F, u) != "")) | |
231 | 245 | then if ((t(u) == "closed")) | |
232 | 246 | then { | |
233 | - | let | |
234 | - | let | |
235 | - | let h = getInteger(this, | |
247 | + | let W = v(F, u) | |
248 | + | let X = { | |
249 | + | let h = getInteger(this, W) | |
236 | 250 | if ($isInstanceOf(h, "Int")) | |
237 | 251 | then { | |
238 | 252 | let i = h | |
239 | 253 | i | |
240 | 254 | } | |
241 | 255 | else throw("You didn't vote for this entrepreneur") | |
242 | 256 | } | |
243 | - | if (( | |
257 | + | if ((X == 0)) | |
244 | 258 | then throw("Seems you have previously withdrawn.") | |
245 | - | else ScriptResult(WriteSet([DataEntry( | |
259 | + | else ScriptResult(WriteSet([DataEntry(W, 0)]), TransferSet([ScriptTransfer(K.caller, X, e)])) | |
246 | 260 | } | |
247 | 261 | else throw("Can't withdraw vote amount while voting is still open.") | |
248 | 262 | else throw("You didn't vote for this entrepreneur") | |
249 | 263 | } | |
250 | 264 | ||
251 | 265 | ||
252 | 266 | ||
253 | - | @Callable( | |
267 | + | @Callable(K) | |
254 | 268 | func stake () = { | |
255 | - | let n = toBase58String( | |
256 | - | let | |
257 | - | if (( | |
269 | + | let n = toBase58String(K.caller.bytes) | |
270 | + | let R = extract(K.payment) | |
271 | + | if ((R.amount == 0)) | |
258 | 272 | then throw("Stake amount too low") | |
259 | - | else if (( | |
273 | + | else if ((R.assetId != e)) | |
260 | 274 | then throw("You can only stake with DYZRUPT token") | |
261 | 275 | else { | |
262 | - | let | |
263 | - | let | |
264 | - | let | |
265 | - | let | |
266 | - | let | |
267 | - | let | |
268 | - | ScriptResult(WriteSet([DataEntry(m(n), | |
276 | + | let Y = o(n) | |
277 | + | let Z = fraction(R.amount, 5, 100) | |
278 | + | let aa = (R.amount - Z) | |
279 | + | let ab = (Y + aa) | |
280 | + | let ac = g() | |
281 | + | let ad = (ac + Z) | |
282 | + | ScriptResult(WriteSet([DataEntry(m(n), ab), DataEntry(f(), ad)]), TransferSet(nil)) | |
269 | 283 | } | |
270 | 284 | } | |
271 | 285 | ||
272 | 286 | ||
273 | 287 | ||
274 | - | @Callable( | |
275 | - | func unstake ( | |
276 | - | let n = toBase58String( | |
277 | - | let | |
278 | - | if (( | |
288 | + | @Callable(K) | |
289 | + | func unstake (ae) = { | |
290 | + | let n = toBase58String(K.caller.bytes) | |
291 | + | let Y = o(n) | |
292 | + | if ((Y == 0)) | |
279 | 293 | then throw("You don't have any stakes") | |
280 | - | else if (( | |
294 | + | else if ((ae > Y)) | |
281 | 295 | then throw("You can't withdraw an amount higher than you staked") | |
282 | 296 | else { | |
283 | - | let | |
284 | - | let | |
285 | - | let | |
286 | - | let | |
287 | - | let | |
288 | - | ScriptResult(WriteSet([DataEntry(m(n), | |
297 | + | let af = fraction(ae, 10, 100) | |
298 | + | let ag = (ae - af) | |
299 | + | let ah = (Y - ae) | |
300 | + | let ac = g() | |
301 | + | let ad = (ac + af) | |
302 | + | ScriptResult(WriteSet([DataEntry(m(n), ah), DataEntry(f(), ad)]), TransferSet([ScriptTransfer(K.caller, ag, e)])) | |
289 | 303 | } | |
290 | 304 | } | |
291 | 305 | ||
292 | 306 | ||
293 | 307 | ||
294 | - | @Callable( | |
295 | - | func claimDailyStakeReward ( | |
296 | - | let n = toBase58String( | |
297 | - | let | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | if (( | |
308 | + | @Callable(K) | |
309 | + | func claimDailyStakeReward (ai) = { | |
310 | + | let n = toBase58String(K.caller.bytes) | |
311 | + | let Y = o(n) | |
312 | + | let ac = g() | |
313 | + | let aj = height | |
314 | + | let ak = y(n) | |
315 | + | let al = G() | |
316 | + | let am = H(n) | |
317 | + | if ((Y == 0)) | |
304 | 318 | then throw("You don't have any stakes") | |
305 | - | else if (( | |
319 | + | else if ((ac == 0)) | |
306 | 320 | then throw("Nothing in Stake pool at this time. Try again later") | |
307 | - | else if (( | |
321 | + | else if ((ai > ac)) | |
308 | 322 | then throw("No rewards at this time") | |
309 | - | else if ((( | |
310 | - | then throw( | |
323 | + | else if (((ak + 1440) > aj)) | |
324 | + | then throw(toString(J())) | |
311 | 325 | else { | |
312 | - | let | |
313 | - | let | |
314 | - | ScriptResult(WriteSet([DataEntry(("claimed_total_" + n), ( | |
326 | + | let ad = (ac - ai) | |
327 | + | let an = Y | |
328 | + | ScriptResult(WriteSet([DataEntry(("claimed_total_" + n), (am + ai)), DataEntry("claimed_total", (al + ai)), DataEntry(("last_claim_" + n), aj), DataEntry(m(n), an), DataEntry(f(), ad)]), TransferSet([ScriptTransfer(K.caller, ai, e)])) | |
315 | 329 | } | |
316 | 330 | } | |
317 | 331 | ||
318 | 332 |
github/deemru/w8io/169f3d6 84.18 ms ◑