tx · 5EPJnNx2cbQgkC2DJrXD9R4HsXZbvJwPoP8MRGKZybmv

3Mp5JgVSHA9iziujC9Kmnf2rCN5SYFE97yC:  -0.01400000 Waves

2021.11.30 19:28 [1814015] smart account 3Mp5JgVSHA9iziujC9Kmnf2rCN5SYFE97yC > SELF 0.00000000 Waves

{ "type": 13, "id": "5EPJnNx2cbQgkC2DJrXD9R4HsXZbvJwPoP8MRGKZybmv", "fee": 1400000, "feeAssetId": null, "timestamp": 1638289766037, "version": 2, "chainId": 84, "sender": "3Mp5JgVSHA9iziujC9Kmnf2rCN5SYFE97yC", "senderPublicKey": "CSx1y2ADZAi6KvFZT2LoqQmX5qBxDVVGGZ6heDAGngHM", "proofs": [ "66JMjGagwjQD8Z2fD6ZSexv6sGFbcbaFXQNQcR61h351uv6S2c4o1ARK5qrkZg5qeZk4rbEN224fPDeJ1wCcfASa", "CHRpUC8sUKUGE5BFUvYukFLLQ5HxRTYHgZvLAnWXQEkjzN6oqD2Ua7Yj86zKe2ogm5A9REUT7c82nZWpmLHntLY" ], "script": "base64:AAIFAAAAAAAAABwIAhIHCgUBERgRGBIAEgMKAQgSBAoCAQgSABIAAAAAHQAAAAAJa2V5QWN0aXZlAgAAAAZhY3RpdmUAAAAADGtleUVuZEhlaWdodAIAAAAKZW5kX2hlaWdodAAAAAAPa2V5UHJpemVzUHJpY2VzAgAAAA1wcml6ZXNfcHJpY2VzAAAAAA1rZXlQcml6ZXNBSWRzAgAAABdwcml6ZXNfYWNoaWV2ZW1lbnRzX2lkcwAAAAAQa2V5UHJpemVzQW1vdW50cwIAAAANcHJpemVzX2Ftb3VudAAAAAAOa2V5TGV2ZWxQcmljZXMCAAAADGxldmVsX3ByaWNlcwAAAAAWa2V5TGV2ZWxBY2hpZXZlbW50c0lkcwIAAAAWbGV2ZWxfYWNoaWV2ZW1lbnRzX2lkcwAAAAAJa2V5U1dPUGlkAgAAAAdTV09QX2lkAAAAAA5rZXlUb3RhbEJ1cm5lZAIAAAAMdG90YW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25lZEJ5QWRtaW4DAwMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAxhZG1pblB1YktleTEGCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAMYWRtaW5QdWJLZXkyBgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADGFkbWluUHViS2V5MwYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAABJhZG1pblB1YktleVN0YWtpbmcEAAAAByRtYXRjaDAFAAAAAnR4BQAAABNtdWx0aVNpZ25lZEJ5QWRtaW5z5F+qGA==", "height": 1814015, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FDAMNwPMzBuVvi3QhTRwJWztDnCeuhCVPTjNB1zUL31k Next: DyfVjne47oHXsdn2Dw7xEYVD7ZGDUmFVx62haxzJSMcc Diff:
OldNewDifferences
8888
8989 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5)
9090 }
91- let lvlthree = levelPrices[3]
92- let lvltwo = levelPrices[2]
93- let lvlone = levelPrices[1]
94- let lvlzero = levelPrices[0]
95- if ((burned >= lvlthree))
91+ if ((burned >= levelPrices[3]))
9692 then 4
97- else if ((burned >= lvlthree))
93+ else if ((burned >= levelPrices[2]))
9894 then 3
99- else if ((burned >= lvltwo))
95+ else if ((burned >= levelPrices[1]))
10096 then 2
101- else if ((burned >= lvlone))
97+ else if ((burned >= levelPrices[0]))
10298 then 1
10399 else 0
104100 }
158154
159155 @Callable(i)
160156 func add () = {
161- let $t036213696 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
162- let pmtAmount = $t036213696._1
163- let pmtAssetId = $t036213696._2
157+ let $t035253600 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
158+ let pmtAmount = $t035253600._1
159+ let pmtAssetId = $t035253600._2
164160 let endHeight = valueOrElse(getInteger(this, keyEndHeight), 0)
165161 if (!(isActive))
166162 then throw("DApp is inactive at this moment")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let keyActive = "active"
55
66 let keyEndHeight = "end_height"
77
88 let keyPrizesPrices = "prizes_prices"
99
1010 let keyPrizesAIds = "prizes_achievements_ids"
1111
1212 let keyPrizesAmounts = "prizes_amount"
1313
1414 let keyLevelPrices = "level_prices"
1515
1616 let keyLevelAchievemntsIds = "level_achievements_ids"
1717
1818 let keySWOPid = "SWOP_id"
1919
2020 let keyTotalBurned = "total_burned"
2121
2222 let keyVerifyHash = "verify_hash"
2323
2424 let keyFinalizeHeight = "finalize_height"
2525
2626 let keyUserTotalBurned = "_total_burned"
2727
2828 let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
2929
3030 let farming = Address(base58'3MsxHxruYWoddB4HRiPBYAWtMXMtCF1V9XT')
3131
3232 let achievements = Address(base58'3N3HtdnBkqSSc16DaydiwtrMBUv3DfqKjSW')
3333
3434 let keyAdminPubKey1 = "admin_pub_1"
3535
3636 let keyAdminPubKey2 = "admin_pub_2"
3737
3838 let keyAdminPubKey3 = "admin_pub_3"
3939
4040 func getAdminPub (keyAdminPub) = match getString(oracle, keyAdminPub) {
4141 case string: String =>
4242 fromBase58String(string)
4343 case nothing =>
4444 throw("Admin public key is empty")
4545 }
4646
4747
4848 let adminPubKey1 = getAdminPub(keyAdminPubKey1)
4949
5050 let adminPubKey2 = getAdminPub(keyAdminPubKey2)
5151
5252 let adminPubKey3 = getAdminPub(keyAdminPubKey3)
5353
5454 let adminPubKeyStaking = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
5555
5656 let swopId = fromBase58String(getStringValue(farming, keySWOPid))
5757
5858 let isActive = valueOrElse(getBoolean(this, keyActive), true)
5959
6060 func inListToStr (acc,next) = if ((acc == ""))
6161 then (acc + toString(next))
6262 else ((acc + ",") + toString(next))
6363
6464
6565 func inListToInt (acc,next) = (acc :+ parseIntValue(next))
6666
6767
6868 func calcPrizesAmounts (acc,next) = {
6969 let $t016511676 = acc
7070 let total = $t016511676._1
7171 let result = $t016511676._2
7272 $Tuple2(total, (result :+ (total / next)))
7373 }
7474
7575
7676 func calcLevel (burned) = {
7777 let levelPrices = {
7878 let $l = split(getStringValue(this, keyLevelPrices), ",")
7979 let $s = size($l)
8080 let $acc0 = nil
8181 func 1 ($a,$i) = if (($i >= $s))
8282 then $a
8383 else inListToInt($a, $l[$i])
8484
8585 func 2 ($a,$i) = if (($i >= $s))
8686 then $a
8787 else throw("List size exceeds 5")
8888
8989 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5)
9090 }
91- let lvlthree = levelPrices[3]
92- let lvltwo = levelPrices[2]
93- let lvlone = levelPrices[1]
94- let lvlzero = levelPrices[0]
95- if ((burned >= lvlthree))
91+ if ((burned >= levelPrices[3]))
9692 then 4
97- else if ((burned >= lvlthree))
93+ else if ((burned >= levelPrices[2]))
9894 then 3
99- else if ((burned >= lvltwo))
95+ else if ((burned >= levelPrices[1]))
10096 then 2
101- else if ((burned >= lvlone))
97+ else if ((burned >= levelPrices[0]))
10298 then 1
10399 else 0
104100 }
105101
106102
107103 @Callable(i)
108104 func init (endHeight,prizePrices,prizeAchievmentsIds,levelPrices,levelAchievmentsIds) = if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
109105 then throw("Only admin can call this function")
110106 else if (isDefined(getInteger(this, keyEndHeight)))
111107 then throw("DApp is already inited")
112108 else if ((height > endHeight))
113109 then throw("Burning ending must be greater than current height")
114110 else if (if ((size(prizePrices) != 5))
115111 then true
116112 else (size(prizeAchievmentsIds) != 5))
117113 then throw("Amount of prizes achievemts lists must equal to 5")
118114 else if (if ((size(levelPrices) != 4))
119115 then true
120116 else (size(levelAchievmentsIds) != 4))
121117 then throw("Amount of levels lists must equal to 4")
122118 else {
123119 let prizePricesStr = {
124120 let $l = prizePrices
125121 let $s = size($l)
126122 let $acc0 = ""
127123 func 1 ($a,$i) = if (($i >= $s))
128124 then $a
129125 else inListToStr($a, $l[$i])
130126
131127 func 2 ($a,$i) = if (($i >= $s))
132128 then $a
133129 else throw("List size exceeds 5")
134130
135131 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5)
136132 }
137133 let prizeAchievmentsIdsStr = makeString(prizeAchievmentsIds, ",")
138134 let levelPricesStr = {
139135 let $l = levelPrices
140136 let $s = size($l)
141137 let $acc0 = ""
142138 func 1 ($a,$i) = if (($i >= $s))
143139 then $a
144140 else inListToStr($a, $l[$i])
145141
146142 func 2 ($a,$i) = if (($i >= $s))
147143 then $a
148144 else throw("List size exceeds 5")
149145
150146 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5)
151147 }
152148 let levelAchievmentsIdsStr = makeString(levelAchievmentsIds, ",")
153149 let prizesAmountStr = "0,0,0,0,0"
154150 [IntegerEntry(keyEndHeight, endHeight), StringEntry(keyPrizesPrices, prizePricesStr), StringEntry(keyPrizesAIds, prizeAchievmentsIdsStr), StringEntry(keyLevelPrices, levelPricesStr), StringEntry(keyLevelAchievemntsIds, levelAchievmentsIdsStr), StringEntry(keyPrizesAmounts, prizesAmountStr)]
155151 }
156152
157153
158154
159155 @Callable(i)
160156 func add () = {
161- let $t036213696 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
162- let pmtAmount = $t036213696._1
163- let pmtAssetId = $t036213696._2
157+ let $t035253600 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
158+ let pmtAmount = $t035253600._1
159+ let pmtAssetId = $t035253600._2
164160 let endHeight = valueOrElse(getInteger(this, keyEndHeight), 0)
165161 if (!(isActive))
166162 then throw("DApp is inactive at this moment")
167163 else if (if ((height > endHeight))
168164 then true
169165 else (endHeight == 0))
170166 then throw("Swop burning are ended or not started yet")
171167 else if ((pmtAssetId != swopId))
172168 then throw("You can add only SWOP token")
173169 else {
174170 let newTotalBurned = (valueOrElse(getInteger(this, keyTotalBurned), 0) + pmtAmount)
175171 let userTotalBurned = valueOrElse(getInteger(this, (toString(i.caller) + keyUserTotalBurned)), 0)
176172 let prizesAmounts = {
177173 let $l = split(getStringValue(this, keyPrizesAmounts), ",")
178174 let $s = size($l)
179175 let $acc0 = nil
180176 func 1 ($a,$i) = if (($i >= $s))
181177 then $a
182178 else inListToInt($a, $l[$i])
183179
184180 func 2 ($a,$i) = if (($i >= $s))
185181 then $a
186182 else throw("List size exceeds 5")
187183
188184 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5)
189185 }
190186 let prizesPrices = {
191187 let $l = split(getStringValue(this, keyPrizesPrices), ",")
192188 let $s = size($l)
193189 let $acc0 = nil
194190 func 1 ($a,$i) = if (($i >= $s))
195191 then $a
196192 else inListToInt($a, $l[$i])
197193
198194 func 2 ($a,$i) = if (($i >= $s))
199195 then $a
200196 else throw("List size exceeds 5")
201197
202198 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5)
203199 }
204200 let prizesAchievementsIds = split(getStringValue(this, keyPrizesAIds), ",")
205201 let levelAchievementsIds = split(getStringValue(this, keyLevelAchievemntsIds), ",")
206202 let res = {
207203 let $l = prizesPrices
208204 let $s = size($l)
209205 let $acc0 = $Tuple2(newTotalBurned, nil)
210206 func 1 ($a,$i) = if (($i >= $s))
211207 then $a
212208 else calcPrizesAmounts($a, $l[$i])
213209
214210 func 2 ($a,$i) = if (($i >= $s))
215211 then $a
216212 else throw("List size exceeds 5")
217213
218214 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5)
219215 }
220216 let newPrizesAmounts = res._2
221217 let newPrizesAmountsStr = {
222218 let $l = newPrizesAmounts
223219 let $s = size($l)
224220 let $acc0 = ""
225221 func 1 ($a,$i) = if (($i >= $s))
226222 then $a
227223 else inListToStr($a, $l[$i])
228224
229225 func 2 ($a,$i) = if (($i >= $s))
230226 then $a
231227 else throw("List size exceeds 5")
232228
233229 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5)
234230 }
235231 let inv0 = if ((newPrizesAmounts[0] != prizesAmounts[0]))
236232 then {
237233 let achievementAmount = (newPrizesAmounts[0] - prizesAmounts[0])
238234 invoke(achievements, "add", [prizesAchievementsIds[0], achievementAmount], nil)
239235 }
240236 else 0
241237 if ((inv0 == inv0))
242238 then {
243239 let inv1 = if ((newPrizesAmounts[1] != prizesAmounts[1]))
244240 then {
245241 let achievementAmount = (newPrizesAmounts[1] - prizesAmounts[1])
246242 invoke(achievements, "add", [prizesAchievementsIds[1], achievementAmount], nil)
247243 }
248244 else 0
249245 if ((inv1 == inv1))
250246 then {
251247 let inv2 = if ((newPrizesAmounts[2] != prizesAmounts[2]))
252248 then {
253249 let achievementAmount = (newPrizesAmounts[2] - prizesAmounts[2])
254250 invoke(achievements, "add", [prizesAchievementsIds[2], achievementAmount], nil)
255251 }
256252 else 0
257253 if ((inv2 == inv2))
258254 then {
259255 let inv3 = if ((newPrizesAmounts[3] != prizesAmounts[3]))
260256 then {
261257 let achievementAmount = (newPrizesAmounts[3] - prizesAmounts[3])
262258 invoke(achievements, "add", [prizesAchievementsIds[3], achievementAmount], nil)
263259 }
264260 else 0
265261 if ((inv3 == inv3))
266262 then {
267263 let inv4 = if ((newPrizesAmounts[4] != prizesAmounts[4]))
268264 then {
269265 let achievementAmount = (newPrizesAmounts[4] - prizesAmounts[4])
270266 invoke(achievements, "add", [prizesAchievementsIds[4], achievementAmount], nil)
271267 }
272268 else 0
273269 if ((inv4 == inv4))
274270 then {
275271 let baseEntry = [IntegerEntry(keyTotalBurned, newTotalBurned), IntegerEntry((toString(i.caller) + keyUserTotalBurned), (userTotalBurned + pmtAmount)), StringEntry(keyPrizesAmounts, newPrizesAmountsStr)]
276272 let oldLevel = calcLevel(userTotalBurned)
277273 let newLevel = calcLevel(newTotalBurned)
278274 let levelDiff = (newLevel - oldLevel)
279275 if ((levelDiff > 0))
280276 then {
281277 let inv5 = if ((levelDiff == 1))
282278 then invoke(achievements, "add", [levelAchievementsIds[(newLevel - 1)], 1], nil)
283279 else 0
284280 if ((inv5 == inv5))
285281 then {
286282 let inv6 = if ((levelDiff >= 2))
287283 then invoke(achievements, "add", [levelAchievementsIds[(newLevel - 2)], 1], nil)
288284 else 0
289285 if ((inv6 == inv6))
290286 then {
291287 let inv7 = if ((levelDiff >= 3))
292288 then invoke(achievements, "add", [levelAchievementsIds[(newLevel - 3)], 1], nil)
293289 else 0
294290 if ((inv7 == inv7))
295291 then {
296292 let inv8 = if ((levelDiff == 4))
297293 then invoke(achievements, "add", [levelAchievementsIds[(newLevel - 4)], 1], nil)
298294 else 0
299295 if ((inv8 == inv8))
300296 then baseEntry
301297 else throw("Strict value is not equal to itself.")
302298 }
303299 else throw("Strict value is not equal to itself.")
304300 }
305301 else throw("Strict value is not equal to itself.")
306302 }
307303 else throw("Strict value is not equal to itself.")
308304 }
309305 else baseEntry
310306 }
311307 else throw("Strict value is not equal to itself.")
312308 }
313309 else throw("Strict value is not equal to itself.")
314310 }
315311 else throw("Strict value is not equal to itself.")
316312 }
317313 else throw("Strict value is not equal to itself.")
318314 }
319315 else throw("Strict value is not equal to itself.")
320316 }
321317 }
322318
323319
324320
325321 @Callable(i)
326322 func hashingRandom (hash) = if (!(isActive))
327323 then throw("DApp is inactive at this moment")
328324 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
329325 then throw("Only admin can call this function")
330326 else [StringEntry(keyVerifyHash, hash)]
331327
332328
333329
334330 @Callable(i)
335331 func finalize (vrfHeight,secretWord) = {
336332 let savedHash = getStringValue(this, keyVerifyHash)
337333 let calcHash = toBase58String(sha256((toBytes(vrfHeight) + toBytes(secretWord))))
338334 if (!(isActive))
339335 then throw("DApp is inactive at this moment")
340336 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
341337 then throw("Only admin can call this function")
342338 else if ((calcHash != savedHash))
343339 then throw("vrf Height hash not matching")
344340 else {
345341 let burnAmount = getIntegerValue(this, keyTotalBurned)
346342 [Burn(swopId, burnAmount), IntegerEntry(keyFinalizeHeight, height)]
347343 }
348344 }
349345
350346
351347
352348 @Callable(i)
353349 func shutdown () = if (!(isActive))
354350 then throw("DApp already inactive")
355351 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
356352 then throw("Only admin can call this function")
357353 else [BooleanEntry(keyActive, false)]
358354
359355
360356
361357 @Callable(i)
362358 func activate () = if (isActive)
363359 then throw("DApp already active")
364360 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
365361 then throw("Only admin can call this function")
366362 else [BooleanEntry(keyActive, true)]
367363
368364
369365 @Verifier(tx)
370366 func verify () = {
371367 let multiSignedByAdmins = {
372368 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
373369 then 1
374370 else 0
375371 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
376372 then 1
377373 else 0
378374 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
379375 then 1
380376 else 0
381377 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
382378 }
383379 let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
384380 then true
385381 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2))
386382 then true
387383 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3))
388384 then true
389385 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyStaking)
390386 match tx {
391387 case _ =>
392388 multiSignedByAdmins
393389 }
394390 }
395391

github/deemru/w8io/169f3d6 
59.68 ms