tx · Hua2f7BfCucfFYtafS3mFSNuAyAL5XH7BENnbNVpcMav

3Mp5JgVSHA9iziujC9Kmnf2rCN5SYFE97yC:  -0.01400000 Waves

2021.11.25 10:50 [1806286] smart account 3Mp5JgVSHA9iziujC9Kmnf2rCN5SYFE97yC > SELF 0.00000000 Waves

{ "type": 13, "id": "Hua2f7BfCucfFYtafS3mFSNuAyAL5XH7BENnbNVpcMav", "fee": 1400000, "feeAssetId": null, "timestamp": 1637826615073, "version": 2, "chainId": 84, "sender": "3Mp5JgVSHA9iziujC9Kmnf2rCN5SYFE97yC", "senderPublicKey": "CSx1y2ADZAi6KvFZT2LoqQmX5qBxDVVGGZ6heDAGngHM", "proofs": [ "2jWR4kPPcPkM4VQP4yzcfVveoseVX2oJMg6h5kjJPY1xiyC5qW9TznKzgZH2QvqXEzcWhbMcEXYhtcsBmaUB8nnn", "5KAYGsiBP8Cb3QcLantUhCTbmGvhe34fN6hduSETfVtQHghAJMkLto2Lx5REWLXrR6hEPgDStcRovBfLhacgE5kT" ], "script": "base64:AAIFAAAAAAAAABwIAhIHCgUBERgRGBIAEgMKAQgSBAoCAQgSABIAAAAAHQAAAAAJa2V5QWN0aXZlAgAAAAZhY3RpdmUAAAAADGtleUVuZEhlaWdodAIAAAAKZW5kX2hlaWdodAAAAAAPa2V5UHJpemVzUHJpY2VzAgAAAA1wcml6ZXNfcHJpY2VzAAAAAA1rZXlQcml6ZXNBSWRzAgAAABdwcml6ZXNfYWNoaWV2ZW1lbnRzX2lkcwAAAAAQa2V5UHJpemVzQW1vdW50cwIAAAANcHJpemVzX2Ftb3VudAAAAAAOa2V5TGV2ZWxQcmljZXMCAAAADGxldmVsX3ByaWNlcwAAAAAWa2V5TGV2ZWxBY2hpZXZlbW50c0lkcwIAAAAWbGV2ZWxfYWNoaWV2ZW1lbnRzX2lkcwAAAAAJa2V5U1dPUGlkAgAAAAdTV09QX2lkAAAAAA5rZXlUb3RhbEJ1cm5lZAIAAAAMdG90YWxfYnVybmVkA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AAAABnByb29mcwAAAAAAAAAAAAUAAAAMYWRtaW5QdWJLZXkyBgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADGFkbWluUHViS2V5MwYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAABJhZG1pblB1YktleVN0YWtpbmcEAAAAByRtYXRjaDAFAAAAAnR4BQAAABNtdWx0aVNpZ25lZEJ5QWRtaW5ziGV6CA==", "height": 1806286, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DT1EbBUsHk9546k8cPTECoPLn1dFiKAZn2gszBRqd319 Next: BNzWoHPCugXhU7QE7RYJd4ttoMy1soYdEnxHoE1pqdpJ Diff:
OldNewDifferences
168168 then throw("You can add only SWOP token")
169169 else {
170170 let newTotalBurned = (valueOrElse(getInteger(this, keyTotalBurned), 0) + pmtAmount)
171- let userTotalBurned = valueOrElse(getInteger(this, (toString(this) + keyUserTotalBurned)), 0)
171+ let userTotalBurned = valueOrElse(getInteger(this, (toString(i.caller) + keyUserTotalBurned)), 0)
172172 let prizesAmounts = {
173173 let $l = split(getStringValue(this, keyPrizesAmounts), ",")
174174 let $s = size($l)
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 $t016581683 = acc
7070 let total = $t016581683._1
7171 let result = $t016581683._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 }
9191 if ((levelPrices[3] >= burned))
9292 then 4
9393 else if ((levelPrices[2] >= burned))
9494 then 3
9595 else if ((levelPrices[1] >= burned))
9696 then 2
9797 else if ((levelPrices[0] >= burned))
9898 then 1
9999 else 0
100100 }
101101
102102
103103 @Callable(i)
104104 func init (endHeight,prizePrices,prizeAchievmentsIds,levelPrices,levelAchievmentsIds) = if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
105105 then throw("Only admin can call this function")
106106 else if (isDefined(getInteger(this, keyEndHeight)))
107107 then throw("DApp is already inited")
108108 else if ((height > endHeight))
109109 then throw("Burning ending must be greater than current height")
110110 else if (if ((size(prizePrices) != 5))
111111 then true
112112 else (size(prizeAchievmentsIds) != 5))
113113 then throw("Amount of prizes achievemts lists must equal to 5")
114114 else if (if ((size(levelPrices) != 4))
115115 then true
116116 else (size(levelAchievmentsIds) != 4))
117117 then throw("Amount of levels lists must equal to 4")
118118 else {
119119 let prizePricesStr = {
120120 let $l = prizePrices
121121 let $s = size($l)
122122 let $acc0 = ""
123123 func 1 ($a,$i) = if (($i >= $s))
124124 then $a
125125 else inListToStr($a, $l[$i])
126126
127127 func 2 ($a,$i) = if (($i >= $s))
128128 then $a
129129 else throw("List size exceeds 5")
130130
131131 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5)
132132 }
133133 let prizeAchievmentsIdsStr = makeString(prizeAchievmentsIds, ",")
134134 let levelPricesStr = {
135135 let $l = levelPrices
136136 let $s = size($l)
137137 let $acc0 = ""
138138 func 1 ($a,$i) = if (($i >= $s))
139139 then $a
140140 else inListToStr($a, $l[$i])
141141
142142 func 2 ($a,$i) = if (($i >= $s))
143143 then $a
144144 else throw("List size exceeds 5")
145145
146146 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5)
147147 }
148148 let levelAchievmentsIdsStr = makeString(levelAchievmentsIds, ",")
149149 let prizesAmountStr = "0,0,0,0,0"
150150 [IntegerEntry(keyEndHeight, endHeight), StringEntry(keyPrizesPrices, prizePricesStr), StringEntry(keyPrizesAIds, prizeAchievmentsIdsStr), StringEntry(keyLevelPrices, levelPricesStr), StringEntry(keyLevelAchievemntsIds, levelAchievmentsIdsStr), StringEntry(keyPrizesAmounts, prizesAmountStr)]
151151 }
152152
153153
154154
155155 @Callable(i)
156156 func add () = {
157157 let $t035323607 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
158158 let pmtAmount = $t035323607._1
159159 let pmtAssetId = $t035323607._2
160160 let endHeight = valueOrElse(getInteger(this, keyEndHeight), 0)
161161 if (!(isActive))
162162 then throw("DApp is inactive at this moment")
163163 else if (if ((height > endHeight))
164164 then true
165165 else (endHeight == 0))
166166 then throw("Swop burning are ended or not started yet")
167167 else if ((pmtAssetId != swopId))
168168 then throw("You can add only SWOP token")
169169 else {
170170 let newTotalBurned = (valueOrElse(getInteger(this, keyTotalBurned), 0) + pmtAmount)
171- let userTotalBurned = valueOrElse(getInteger(this, (toString(this) + keyUserTotalBurned)), 0)
171+ let userTotalBurned = valueOrElse(getInteger(this, (toString(i.caller) + keyUserTotalBurned)), 0)
172172 let prizesAmounts = {
173173 let $l = split(getStringValue(this, keyPrizesAmounts), ",")
174174 let $s = size($l)
175175 let $acc0 = nil
176176 func 1 ($a,$i) = if (($i >= $s))
177177 then $a
178178 else inListToInt($a, $l[$i])
179179
180180 func 2 ($a,$i) = if (($i >= $s))
181181 then $a
182182 else throw("List size exceeds 5")
183183
184184 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5)
185185 }
186186 let prizesPrices = {
187187 let $l = split(getStringValue(this, keyPrizesPrices), ",")
188188 let $s = size($l)
189189 let $acc0 = nil
190190 func 1 ($a,$i) = if (($i >= $s))
191191 then $a
192192 else inListToInt($a, $l[$i])
193193
194194 func 2 ($a,$i) = if (($i >= $s))
195195 then $a
196196 else throw("List size exceeds 5")
197197
198198 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5)
199199 }
200200 let prizesAchievementsIds = split(getStringValue(this, keyPrizesAIds), ",")
201201 let levelAchievementsIds = split(getStringValue(this, keyLevelAchievemntsIds), ",")
202202 let res = {
203203 let $l = prizesPrices
204204 let $s = size($l)
205205 let $acc0 = $Tuple2(newTotalBurned, nil)
206206 func 1 ($a,$i) = if (($i >= $s))
207207 then $a
208208 else calcPrizesAmounts($a, $l[$i])
209209
210210 func 2 ($a,$i) = if (($i >= $s))
211211 then $a
212212 else throw("List size exceeds 5")
213213
214214 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5)
215215 }
216216 let newPrizesAmounts = res._2
217217 let newPrizesAmountsStr = {
218218 let $l = newPrizesAmounts
219219 let $s = size($l)
220220 let $acc0 = ""
221221 func 1 ($a,$i) = if (($i >= $s))
222222 then $a
223223 else inListToStr($a, $l[$i])
224224
225225 func 2 ($a,$i) = if (($i >= $s))
226226 then $a
227227 else throw("List size exceeds 5")
228228
229229 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5)
230230 }
231231 let inv0 = if ((newPrizesAmounts[0] != prizesAmounts[0]))
232232 then {
233233 let achievementAmount = (newPrizesAmounts[0] - prizesAmounts[0])
234234 invoke(achievements, "add", [prizesAchievementsIds[0], achievementAmount], nil)
235235 }
236236 else 0
237237 if ((inv0 == inv0))
238238 then {
239239 let inv1 = if ((newPrizesAmounts[1] != prizesAmounts[1]))
240240 then {
241241 let achievementAmount = (newPrizesAmounts[1] - prizesAmounts[1])
242242 invoke(achievements, "add", [prizesAchievementsIds[1], achievementAmount], nil)
243243 }
244244 else 0
245245 if ((inv1 == inv1))
246246 then {
247247 let inv2 = if ((newPrizesAmounts[2] != prizesAmounts[2]))
248248 then {
249249 let achievementAmount = (newPrizesAmounts[2] - prizesAmounts[2])
250250 invoke(achievements, "add", [prizesAchievementsIds[2], achievementAmount], nil)
251251 }
252252 else 0
253253 if ((inv2 == inv2))
254254 then {
255255 let inv3 = if ((newPrizesAmounts[3] != prizesAmounts[3]))
256256 then {
257257 let achievementAmount = (newPrizesAmounts[3] - prizesAmounts[3])
258258 invoke(achievements, "add", [prizesAchievementsIds[3], achievementAmount], nil)
259259 }
260260 else 0
261261 if ((inv3 == inv3))
262262 then {
263263 let inv4 = if ((newPrizesAmounts[4] != prizesAmounts[4]))
264264 then {
265265 let achievementAmount = (newPrizesAmounts[4] - prizesAmounts[4])
266266 invoke(achievements, "add", [prizesAchievementsIds[4], achievementAmount], nil)
267267 }
268268 else 0
269269 if ((inv4 == inv4))
270270 then {
271271 let oldLevel = calcLevel(userTotalBurned)
272272 let newLevel = calcLevel((userTotalBurned + pmtAmount))
273273 let inv5 = if ((oldLevel != newLevel))
274274 then invoke(achievements, "add", [levelAchievementsIds[(newLevel - 1)], 1], nil)
275275 else 0
276276 [IntegerEntry(keyTotalBurned, newTotalBurned), IntegerEntry((toString(i.caller) + keyUserTotalBurned), (userTotalBurned + pmtAmount)), StringEntry(keyPrizesAmounts, newPrizesAmountsStr)]
277277 }
278278 else throw("Strict value is not equal to itself.")
279279 }
280280 else throw("Strict value is not equal to itself.")
281281 }
282282 else throw("Strict value is not equal to itself.")
283283 }
284284 else throw("Strict value is not equal to itself.")
285285 }
286286 else throw("Strict value is not equal to itself.")
287287 }
288288 }
289289
290290
291291
292292 @Callable(i)
293293 func hashingRandom (hash) = if (!(isActive))
294294 then throw("DApp is inactive at this moment")
295295 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
296296 then throw("Only admin can call this function")
297297 else [StringEntry(keyVerifyHash, hash)]
298298
299299
300300
301301 @Callable(i)
302302 func finalize (vrfHeight,secretWord) = {
303303 let savedHash = getStringValue(this, keyVerifyHash)
304304 let calcHash = toBase58String(sha256((toBytes(vrfHeight) + toBytes(secretWord))))
305305 if (!(isActive))
306306 then throw("DApp is inactive at this moment")
307307 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
308308 then throw("Only admin can call this function")
309309 else if ((calcHash != savedHash))
310310 then throw("vrf Height hash not matching")
311311 else {
312312 let burnAmount = getIntegerValue(this, keyTotalBurned)
313313 [Burn(swopId, burnAmount), IntegerEntry(keyFinalizeHeight, height)]
314314 }
315315 }
316316
317317
318318
319319 @Callable(i)
320320 func shutdown () = if (!(isActive))
321321 then throw("DApp already inactive")
322322 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
323323 then throw("Only admin can call this function")
324324 else [BooleanEntry(keyActive, false)]
325325
326326
327327
328328 @Callable(i)
329329 func activate () = if (isActive)
330330 then throw("DApp already active")
331331 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
332332 then throw("Only admin can call this function")
333333 else [BooleanEntry(keyActive, true)]
334334
335335
336336 @Verifier(tx)
337337 func verify () = {
338338 let multiSignedByAdmins = {
339339 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
340340 then 1
341341 else 0
342342 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
343343 then 1
344344 else 0
345345 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
346346 then 1
347347 else 0
348348 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
349349 }
350350 let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
351351 then true
352352 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2))
353353 then true
354354 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3))
355355 then true
356356 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyStaking)
357357 match tx {
358358 case _ =>
359359 multiSignedByAdmins
360360 }
361361 }
362362

github/deemru/w8io/169f3d6 
88.27 ms