tx · 2vVyrh4qeGrLf1nyytKgEopjPkhMQSwuCSa4myN5F6oM 3Mp5JgVSHA9iziujC9Kmnf2rCN5SYFE97yC: -0.01400000 Waves 2021.11.12 12:16 [1787592] smart account 3Mp5JgVSHA9iziujC9Kmnf2rCN5SYFE97yC > SELF 0.00000000 Waves
{ "type": 13, "id": "2vVyrh4qeGrLf1nyytKgEopjPkhMQSwuCSa4myN5F6oM", "fee": 1400000, "feeAssetId": null, "timestamp": 1636708688723, "version": 2, "chainId": 84, "sender": "3Mp5JgVSHA9iziujC9Kmnf2rCN5SYFE97yC", "senderPublicKey": "CSx1y2ADZAi6KvFZT2LoqQmX5qBxDVVGGZ6heDAGngHM", "proofs": [ "2hNHXcZwadJToRhnfjJdDBsYbu1J3tCFhcYiH2fmisZJ7MN9XXoQq6sSrqd9hAem51jh7wdWTQxjaxm8XiEkoiVe", "4rrUvTTunYSKgrLHrSWf7UAEC1o69bKuDxt6QGGgkShRpfFpuSPcbXukazMcPR3xDGE5Mx6ktNeihzq3fP5rN27w" ], "script": "base64:AAIFAAAAAAAAABwIAhIHCgUBERgRGBIAEgMKAQgSBAoCAQgSABIAAAAAHgAAAAAJa2V5QWN0aXZlAgAAAAZhY3RpdmUAAAAADGtleUVuZEhlaWdodAIAAAAKZW5kX2hlaWdodAAAAAAPa2V5UHJpemVzUHJpY2VzAgAAAA1wcml6ZXNfcHJpY2VzAAAAAAxrZXlQcml6ZXNJZHMCAAAACnByaXplc19pZHMAAAAAEGtleVByaXplc0Ftb3VudHMCAAAADXByaXplc19hbW91bnQAAAAADmtleUxldmVsUHJpY2VzAgAAAAxsZXZlbF9wcmljZXMAAAAAC2tleUxldmVsSWRzAgAAAAlsZXZlbF9pZHMAAAAACWtleVNXT1BpZAIAAAAHU1dPUF9pZAAAAAAOa2V5VG90YWxCdXJuZWQCAAAADHRvdGFsX2J1cm5lZAAAAAANa2V5VmVyaWZ5SGFzaAIAAAALdmVyaWZ5X2hhc2gAAAAAEWtleUZpbmFsaX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icationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: JCwDdfoHgzJUMMFp9hNaRMurUfSicX2RrqBFKcNi6DYJ Next: 7oCh7fHPcS1P3JKrXndGXbZ34u99ZEosar2WUSbkzb3n Diff:
Old | New | Differences | |
---|---|---|---|
282 | 282 | ||
283 | 283 | ||
284 | 284 | @Callable(i) | |
285 | - | func | |
285 | + | func finalize (vrfHeight,secretWord) = { | |
286 | 286 | let savedHash = getStringValue(this, keyVerifyHash) | |
287 | 287 | let calcHash = toBase58String(sha256((toBytes(vrfHeight) + toBytes(secretWord)))) | |
288 | 288 | if (!(isActive)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let keyActive = "active" | |
5 | 5 | ||
6 | 6 | let keyEndHeight = "end_height" | |
7 | 7 | ||
8 | 8 | let keyPrizesPrices = "prizes_prices" | |
9 | 9 | ||
10 | 10 | let keyPrizesIds = "prizes_ids" | |
11 | 11 | ||
12 | 12 | let keyPrizesAmounts = "prizes_amount" | |
13 | 13 | ||
14 | 14 | let keyLevelPrices = "level_prices" | |
15 | 15 | ||
16 | 16 | let keyLevelIds = "level_ids" | |
17 | 17 | ||
18 | 18 | let keySWOPid = "SWOP_id" | |
19 | 19 | ||
20 | 20 | let keyTotalBurned = "total_burned" | |
21 | 21 | ||
22 | 22 | let keyVerifyHash = "verify_hash" | |
23 | 23 | ||
24 | 24 | let keyFinalizeHeight = "finalize_height" | |
25 | 25 | ||
26 | 26 | let keyUserTotalBurned = "_total_burned" | |
27 | 27 | ||
28 | 28 | let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
29 | 29 | ||
30 | 30 | let farming = Address(base58'3MsxHxruYWoddB4HRiPBYAWtMXMtCF1V9XT') | |
31 | 31 | ||
32 | 32 | let achievements = Address(base58'3Ms2TXzth4DtrGcKh5sXRtyQWBeokpXtj1p') | |
33 | 33 | ||
34 | 34 | let keyAdminPubKey1 = "admin_pub_1" | |
35 | 35 | ||
36 | 36 | let keyAdminPubKey2 = "admin_pub_2" | |
37 | 37 | ||
38 | 38 | let keyAdminPubKey3 = "admin_pub_3" | |
39 | 39 | ||
40 | 40 | func getAdminPub (keyAdminPub) = match getString(oracle, keyAdminPub) { | |
41 | 41 | case string: String => | |
42 | 42 | fromBase58String(string) | |
43 | 43 | case nothing => | |
44 | 44 | throw("Admin public key is empty") | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | let adminPubKey1 = getAdminPub(keyAdminPubKey1) | |
49 | 49 | ||
50 | 50 | let adminPubKey2 = getAdminPub(keyAdminPubKey2) | |
51 | 51 | ||
52 | 52 | let adminPubKey3 = getAdminPub(keyAdminPubKey3) | |
53 | 53 | ||
54 | 54 | let adminPubKeyStaking = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
55 | 55 | ||
56 | 56 | let swopId = fromBase58String(getStringValue(farming, keySWOPid)) | |
57 | 57 | ||
58 | 58 | let isActive = valueOrElse(getBoolean(this, keyActive), true) | |
59 | 59 | ||
60 | 60 | let totalBurned = valueOrElse(getInteger(this, keyTotalBurned), 0) | |
61 | 61 | ||
62 | 62 | func inListToStr (acc,next) = if ((acc == "")) | |
63 | 63 | then (acc + toString(next)) | |
64 | 64 | else ((acc + ",") + toString(next)) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func inListToInt (acc,next) = (acc :+ parseIntValue(next)) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func calcPrizesAmounts (acc,next) = (acc :+ (totalBurned / next)) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func calcLevel (burned) = { | |
74 | 74 | let levelPrices = { | |
75 | 75 | let $l = split(getStringValue(this, keyLevelPrices), ",") | |
76 | 76 | let $s = size($l) | |
77 | 77 | let $acc0 = nil | |
78 | 78 | func 1 ($a,$i) = if (($i >= $s)) | |
79 | 79 | then $a | |
80 | 80 | else inListToInt($a, $l[$i]) | |
81 | 81 | ||
82 | 82 | func 2 ($a,$i) = if (($i >= $s)) | |
83 | 83 | then $a | |
84 | 84 | else throw("List size exceeds 5") | |
85 | 85 | ||
86 | 86 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
87 | 87 | } | |
88 | 88 | if ((levelPrices[3] >= burned)) | |
89 | 89 | then 4 | |
90 | 90 | else if ((levelPrices[2] >= burned)) | |
91 | 91 | then 3 | |
92 | 92 | else if ((levelPrices[1] >= burned)) | |
93 | 93 | then 2 | |
94 | 94 | else if ((levelPrices[0] >= burned)) | |
95 | 95 | then 1 | |
96 | 96 | else 0 | |
97 | 97 | } | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | @Callable(i) | |
101 | 101 | func init (endHeight,prizePrices,prizeIds,levelPrices,levelIds) = if (isDefined(getInteger(this, keyEndHeight))) | |
102 | 102 | then throw("DApp is already inited") | |
103 | 103 | else { | |
104 | 104 | let prizePricesStr = { | |
105 | 105 | let $l = prizePrices | |
106 | 106 | let $s = size($l) | |
107 | 107 | let $acc0 = "" | |
108 | 108 | func 1 ($a,$i) = if (($i >= $s)) | |
109 | 109 | then $a | |
110 | 110 | else inListToStr($a, $l[$i]) | |
111 | 111 | ||
112 | 112 | func 2 ($a,$i) = if (($i >= $s)) | |
113 | 113 | then $a | |
114 | 114 | else throw("List size exceeds 5") | |
115 | 115 | ||
116 | 116 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
117 | 117 | } | |
118 | 118 | let prizeIdsStr = makeString(prizeIds, ",") | |
119 | 119 | let levelPricesStr = { | |
120 | 120 | let $l = levelPrices | |
121 | 121 | let $s = size($l) | |
122 | 122 | let $acc0 = "" | |
123 | 123 | func 1 ($a,$i) = if (($i >= $s)) | |
124 | 124 | then $a | |
125 | 125 | else inListToStr($a, $l[$i]) | |
126 | 126 | ||
127 | 127 | func 2 ($a,$i) = if (($i >= $s)) | |
128 | 128 | then $a | |
129 | 129 | else throw("List size exceeds 5") | |
130 | 130 | ||
131 | 131 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
132 | 132 | } | |
133 | 133 | let levelIdsStr = makeString(levelIds, ",") | |
134 | 134 | let prizesAmountStr = "0,0,0,0,0" | |
135 | 135 | [IntegerEntry(keyEndHeight, endHeight), StringEntry(keyPrizesPrices, prizePricesStr), StringEntry(keyPrizesIds, prizeIdsStr), StringEntry(keyLevelPrices, levelPricesStr), StringEntry(keyLevelIds, levelIdsStr), StringEntry(keyPrizesAmounts, prizesAmountStr)] | |
136 | 136 | } | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | ||
140 | 140 | @Callable(i) | |
141 | 141 | func add () = { | |
142 | 142 | let $t029313006 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
143 | 143 | let pmtAmount = $t029313006._1 | |
144 | 144 | let pmtAssetId = $t029313006._2 | |
145 | 145 | let endHeight = valueOrElse(getInteger(this, keyEndHeight), 0) | |
146 | 146 | if (!(isActive)) | |
147 | 147 | then throw("DApp is inactive at this moment") | |
148 | 148 | else if (if ((endHeight > height)) | |
149 | 149 | then true | |
150 | 150 | else (endHeight == 0)) | |
151 | 151 | then throw("Swop burning are ended or not started yet") | |
152 | 152 | else if ((pmtAssetId != swopId)) | |
153 | 153 | then throw("You can add only SWOP token") | |
154 | 154 | else { | |
155 | 155 | let userTotalBurned = valueOrElse(getInteger(this, (toString(this) + keyUserTotalBurned)), 0) | |
156 | 156 | let prizesAmounts = { | |
157 | 157 | let $l = split(getStringValue(this, keyPrizesAmounts), ",") | |
158 | 158 | let $s = size($l) | |
159 | 159 | let $acc0 = nil | |
160 | 160 | func 1 ($a,$i) = if (($i >= $s)) | |
161 | 161 | then $a | |
162 | 162 | else inListToInt($a, $l[$i]) | |
163 | 163 | ||
164 | 164 | func 2 ($a,$i) = if (($i >= $s)) | |
165 | 165 | then $a | |
166 | 166 | else throw("List size exceeds 5") | |
167 | 167 | ||
168 | 168 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
169 | 169 | } | |
170 | 170 | let prizesPrices = { | |
171 | 171 | let $l = split(getStringValue(this, keyPrizesPrices), ",") | |
172 | 172 | let $s = size($l) | |
173 | 173 | let $acc0 = nil | |
174 | 174 | func 1 ($a,$i) = if (($i >= $s)) | |
175 | 175 | then $a | |
176 | 176 | else inListToInt($a, $l[$i]) | |
177 | 177 | ||
178 | 178 | func 2 ($a,$i) = if (($i >= $s)) | |
179 | 179 | then $a | |
180 | 180 | else throw("List size exceeds 5") | |
181 | 181 | ||
182 | 182 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
183 | 183 | } | |
184 | 184 | let prizesIds = split(getStringValue(this, keyPrizesIds), ",") | |
185 | 185 | let levelIds = split(getStringValue(this, keyLevelIds), ",") | |
186 | 186 | let newPrizesAmounts = { | |
187 | 187 | let $l = prizesPrices | |
188 | 188 | let $s = size($l) | |
189 | 189 | let $acc0 = nil | |
190 | 190 | func 1 ($a,$i) = if (($i >= $s)) | |
191 | 191 | then $a | |
192 | 192 | else calcPrizesAmounts($a, $l[$i]) | |
193 | 193 | ||
194 | 194 | func 2 ($a,$i) = if (($i >= $s)) | |
195 | 195 | then $a | |
196 | 196 | else throw("List size exceeds 5") | |
197 | 197 | ||
198 | 198 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
199 | 199 | } | |
200 | 200 | let newPrizesAmountsStr = { | |
201 | 201 | let $l = newPrizesAmounts | |
202 | 202 | let $s = size($l) | |
203 | 203 | let $acc0 = "" | |
204 | 204 | func 1 ($a,$i) = if (($i >= $s)) | |
205 | 205 | then $a | |
206 | 206 | else inListToStr($a, $l[$i]) | |
207 | 207 | ||
208 | 208 | func 2 ($a,$i) = if (($i >= $s)) | |
209 | 209 | then $a | |
210 | 210 | else throw("List size exceeds 5") | |
211 | 211 | ||
212 | 212 | 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5) | |
213 | 213 | } | |
214 | 214 | let inv0 = if ((newPrizesAmounts[0] != prizesAmounts[0])) | |
215 | 215 | then { | |
216 | 216 | let achievementAmount = (newPrizesAmounts[0] - prizesAmounts[0]) | |
217 | 217 | invoke(achievements, "add", [prizesIds[0], achievementAmount], nil) | |
218 | 218 | } | |
219 | 219 | else 0 | |
220 | 220 | if ((inv0 == inv0)) | |
221 | 221 | then { | |
222 | 222 | let inv1 = if ((newPrizesAmounts[1] != prizesAmounts[1])) | |
223 | 223 | then { | |
224 | 224 | let achievementAmount = (newPrizesAmounts[1] - prizesAmounts[1]) | |
225 | 225 | invoke(achievements, "add", [prizesIds[1], achievementAmount], nil) | |
226 | 226 | } | |
227 | 227 | else 0 | |
228 | 228 | if ((inv1 == inv1)) | |
229 | 229 | then { | |
230 | 230 | let inv2 = if ((newPrizesAmounts[2] != prizesAmounts[2])) | |
231 | 231 | then { | |
232 | 232 | let achievementAmount = (newPrizesAmounts[2] - prizesAmounts[2]) | |
233 | 233 | invoke(achievements, "add", [prizesIds[2], achievementAmount], nil) | |
234 | 234 | } | |
235 | 235 | else 0 | |
236 | 236 | if ((inv2 == inv2)) | |
237 | 237 | then { | |
238 | 238 | let inv3 = if ((newPrizesAmounts[3] != prizesAmounts[3])) | |
239 | 239 | then { | |
240 | 240 | let achievementAmount = (newPrizesAmounts[3] - prizesAmounts[3]) | |
241 | 241 | invoke(achievements, "add", [prizesIds[3], achievementAmount], nil) | |
242 | 242 | } | |
243 | 243 | else 0 | |
244 | 244 | if ((inv3 == inv3)) | |
245 | 245 | then { | |
246 | 246 | let inv4 = if ((newPrizesAmounts[4] != prizesAmounts[4])) | |
247 | 247 | then { | |
248 | 248 | let achievementAmount = (newPrizesAmounts[4] - prizesAmounts[4]) | |
249 | 249 | invoke(achievements, "add", [prizesIds[4], achievementAmount], nil) | |
250 | 250 | } | |
251 | 251 | else 0 | |
252 | 252 | if ((inv4 == inv4)) | |
253 | 253 | then { | |
254 | 254 | let oldLevel = calcLevel(userTotalBurned) | |
255 | 255 | let newLevel = calcLevel((userTotalBurned + pmtAmount)) | |
256 | 256 | let inv5 = if ((oldLevel != newLevel)) | |
257 | 257 | then invoke(achievements, "add", [levelIds[(newLevel - 1)], 1], nil) | |
258 | 258 | else 0 | |
259 | 259 | [IntegerEntry(keyTotalBurned, (totalBurned + pmtAmount)), IntegerEntry((toString(this) + keyUserTotalBurned), (userTotalBurned + pmtAmount)), StringEntry(keyPrizesAmounts, newPrizesAmountsStr)] | |
260 | 260 | } | |
261 | 261 | else throw("Strict value is not equal to itself.") | |
262 | 262 | } | |
263 | 263 | else throw("Strict value is not equal to itself.") | |
264 | 264 | } | |
265 | 265 | else throw("Strict value is not equal to itself.") | |
266 | 266 | } | |
267 | 267 | else throw("Strict value is not equal to itself.") | |
268 | 268 | } | |
269 | 269 | else throw("Strict value is not equal to itself.") | |
270 | 270 | } | |
271 | 271 | } | |
272 | 272 | ||
273 | 273 | ||
274 | 274 | ||
275 | 275 | @Callable(i) | |
276 | 276 | func hashingRandom (hash) = if (!(isActive)) | |
277 | 277 | then throw("DApp is inactive at this moment") | |
278 | 278 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
279 | 279 | then throw("Only admin can call this function") | |
280 | 280 | else [StringEntry(keyVerifyHash, hash)] | |
281 | 281 | ||
282 | 282 | ||
283 | 283 | ||
284 | 284 | @Callable(i) | |
285 | - | func | |
285 | + | func finalize (vrfHeight,secretWord) = { | |
286 | 286 | let savedHash = getStringValue(this, keyVerifyHash) | |
287 | 287 | let calcHash = toBase58String(sha256((toBytes(vrfHeight) + toBytes(secretWord)))) | |
288 | 288 | if (!(isActive)) | |
289 | 289 | then throw("DApp is inactive at this moment") | |
290 | 290 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
291 | 291 | then throw("Only admin can call this function") | |
292 | 292 | else if ((calcHash != savedHash)) | |
293 | 293 | then throw("vrf Height hash not matching") | |
294 | 294 | else { | |
295 | 295 | let burnAmount = getIntegerValue(this, keyTotalBurned) | |
296 | 296 | [Burn(swopId, burnAmount), IntegerEntry(keyFinalizeHeight, height)] | |
297 | 297 | } | |
298 | 298 | } | |
299 | 299 | ||
300 | 300 | ||
301 | 301 | ||
302 | 302 | @Callable(i) | |
303 | 303 | func shutdown () = if (!(isActive)) | |
304 | 304 | then throw("DApp already inactive") | |
305 | 305 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
306 | 306 | then throw("Only admin can call this function") | |
307 | 307 | else [BooleanEntry(keyActive, false)] | |
308 | 308 | ||
309 | 309 | ||
310 | 310 | ||
311 | 311 | @Callable(i) | |
312 | 312 | func activate () = if (isActive) | |
313 | 313 | then throw("DApp already active") | |
314 | 314 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
315 | 315 | then throw("Only admin can call this function") | |
316 | 316 | else [BooleanEntry(keyActive, true)] | |
317 | 317 | ||
318 | 318 | ||
319 | 319 | @Verifier(tx) | |
320 | 320 | func verify () = { | |
321 | 321 | let multiSignedByAdmins = { | |
322 | 322 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
323 | 323 | then 1 | |
324 | 324 | else 0 | |
325 | 325 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
326 | 326 | then 1 | |
327 | 327 | else 0 | |
328 | 328 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
329 | 329 | then 1 | |
330 | 330 | else 0 | |
331 | 331 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
332 | 332 | } | |
333 | 333 | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
334 | 334 | then true | |
335 | 335 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2)) | |
336 | 336 | then true | |
337 | 337 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3)) | |
338 | 338 | then true | |
339 | 339 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyStaking) | |
340 | 340 | match tx { | |
341 | 341 | case _ => | |
342 | 342 | multiSignedByAdmins | |
343 | 343 | } | |
344 | 344 | } | |
345 | 345 |
github/deemru/w8io/169f3d6 38.83 ms ◑