tx · 2hqLBjMjQiUBMheEZRrqugtQLKxhucdDV9Tp6eQ4dhna 3N6PvAL6whpaLE48xjeZbmU7vRWQmuz8AA5: -0.02100000 Waves 2024.11.27 20:33 [3390126] smart account 3N6PvAL6whpaLE48xjeZbmU7vRWQmuz8AA5 > SELF 0.00000000 Waves
{ "type": 13, "id": "2hqLBjMjQiUBMheEZRrqugtQLKxhucdDV9Tp6eQ4dhna", "fee": 2100000, "feeAssetId": null, "timestamp": 1732728832061, "version": 2, "chainId": 84, "sender": "3N6PvAL6whpaLE48xjeZbmU7vRWQmuz8AA5", "senderPublicKey": "3ZB9kd3fTB7j5xvuxZe67A7aT4cNTs2gUk1tyFaCdWJ6", "proofs": [ "4gadYedrPR5CUezLpySWKpQfKcC5pECq9TexQ87SNXrBFLjEQDWYQie25U27wQBp2TMHFtbE8fbMLqXLW5wZsUxz" ], "script": "base64:BgIcCAISAwoBCBIDCgEIEgMKAQgSAwoBCBIECgIICDIBFHRyeUdldFN0cmluZ0V4dGVybmFsAgdhZGRyZXNzA2tleQQHJG1hdGNoMAkAnQgCBQdhZGRyZXNzBQNrZXkDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAFhBQckbWF0Y2gwBQFhAgABEXRyeUdldEludEV4dGVybmFsAgdhZGRyZXNzA2tleQQHJG1hdGNoMAkAmggCBQdhZGRyZXNzBQNrZXkDCQABAgUHJG1hdGNoMAIDSW50BAFhBQckbWF0Y2gwBQFhCQACAQIbUlRHSUU6IFNvbWV0aGluZyB3ZW50IHdyb25nAQlhc0Jvb2xlYW4BBXZhbHVlBAckbWF0Y2gwBQV2YWx1ZQMJAAECBQckbWF0Y2gwAgdCb29sZWFuBAdib29sZWFuBQckbWF0Y2gwBQdib29sZWFuCQACAQIiRkFCOiB3cm9uZyB0eXBlLCBleHBlY3RlZDogQm9vbGVhbgEMdHJ5R2V0U3RyaW5nAQNrZXkJARR0cnlHZXRTdHJpbmdFeHRlcm5hbAIFBHRoaXMFA2tleQAQZGVsYXlGb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CdHgGcHJvb2ZzAAIFCXRoaXJkVXNlcgABAAAED3NpZ25hdHVyZXNDb3VudAkAZAIJAGQCBQ9maXJzdFVzZXJTaWduZWQFEHNlY29uZFVzZXJTaWduZWQFD3RoaXJkVXNlclNpZ25lZAQHJG1hdGNoMAUCdHgJAGcCBQ9zaWduYXR1cmVzQ291bnQAAam7lJY=", "height": 3390126, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 56XrT1RJsvEiWBSyi8XFbe73xbnuVTuEp1weMNWgpuSj Next: none Diff:
Old | New | Differences | |
---|---|---|---|
111 | 111 | func getFeeAggregator () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_feeAggregator()))) | |
112 | 112 | ||
113 | 113 | ||
114 | + | func checkReal (assetId) = if (if ((value(assetInfo(assetId)).issuer == getBreederAddress())) | |
115 | + | then true | |
116 | + | else (value(assetInfo(assetId)).issuer == getIncubatorAddress())) | |
117 | + | then value(assetInfo(assetId)).issuer | |
118 | + | else throw("not valid NFT") | |
119 | + | ||
120 | + | ||
114 | 121 | func checkAdditionalPayment (payment) = if (isDefined(payment.assetId)) | |
115 | 122 | then throw("RCAP: Please attach waves") | |
116 | 123 | else { | |
185 | 192 | } | |
186 | 193 | ||
187 | 194 | ||
188 | - | func getRandomWin (tx,finishHeight,assetRarity) = { | |
189 | - | let jackpotRandom = getRandomNumber(200, tx, finishHeight, 1) | |
195 | + | func getRandomWin (tx,finishHeight,assetRarity,blacklistCode) = { | |
196 | + | let phoenixOptions = (PHOENIXBASEOPTIONS - fraction((PHOENIXBASEOPTIONS / 2), assetRarity, 100)) | |
197 | + | let jackpotRandom = getRandomNumber(phoenixOptions, tx, finishHeight, 1) | |
190 | 198 | if ((jackpotRandom == 1)) | |
191 | 199 | then "phoenix" | |
192 | 200 | else { | |
193 | 201 | let n = getRandomNumber(1000, tx, finishHeight, 0) | |
194 | - | if ((500 > n)) | |
195 | - | then "item!ART-MUTARIUM-D" | |
196 | - | else "item!ART-MUTARIUM-G" | |
202 | + | if (if ((10 > n)) | |
203 | + | then (blacklistCode != "item!ART-FREEGENE") | |
204 | + | else false) | |
205 | + | then "item!ART-FREEGENE" | |
206 | + | else if (if ((126 > n)) | |
207 | + | then (blacklistCode != "ar") | |
208 | + | else false) | |
209 | + | then "ar" | |
210 | + | else if (if ((186 > n)) | |
211 | + | then (blacklistCode != "item!ART-FIRE_ARMOUR") | |
212 | + | else false) | |
213 | + | then "item!ART-FIRE_ARMOUR" | |
214 | + | else if (if ((206 > n)) | |
215 | + | then (blacklistCode != "item!ART-FEED5") | |
216 | + | else false) | |
217 | + | then "item!ART-FEED5" | |
218 | + | else if (if ((226 > n)) | |
219 | + | then (blacklistCode != "item!ART-FEED10") | |
220 | + | else false) | |
221 | + | then "item!ART-FEED10" | |
222 | + | else if (if ((246 > n)) | |
223 | + | then (blacklistCode != "item!ART-FEED15") | |
224 | + | else false) | |
225 | + | then "item!ART-FEED15" | |
226 | + | else if (if ((266 > n)) | |
227 | + | then (blacklistCode != "item!ART-FEED20") | |
228 | + | else false) | |
229 | + | then "item!ART-FEED20" | |
230 | + | else if (if ((286 > n)) | |
231 | + | then (blacklistCode != "item!ART-FEED25") | |
232 | + | else false) | |
233 | + | then "item!ART-FEED25" | |
234 | + | else if (if ((296 > n)) | |
235 | + | then (blacklistCode != "item!ART-FEED50") | |
236 | + | else false) | |
237 | + | then "item!ART-FEED50" | |
238 | + | else if (if ((300 > n)) | |
239 | + | then (blacklistCode != "item!ART-FEED100") | |
240 | + | else false) | |
241 | + | then "item!ART-FEED100" | |
242 | + | else if (if ((310 > n)) | |
243 | + | then (blacklistCode != "item!ART-CROWN") | |
244 | + | else false) | |
245 | + | then "item!ART-CROWN" | |
246 | + | else if (if ((350 > n)) | |
247 | + | then (blacklistCode != "incubator") | |
248 | + | else false) | |
249 | + | then "incubator" | |
250 | + | else if (if ((460 > n)) | |
251 | + | then (blacklistCode != "item!ART-BUILTBODY") | |
252 | + | else false) | |
253 | + | then if ((50 > assetRarity)) | |
254 | + | then "item!ART-BUILTBODY" | |
255 | + | else "item!ART-MUTARIUM-D" | |
256 | + | else if (if ((480 > n)) | |
257 | + | then (blacklistCode != "item!ART-SNAKE") | |
258 | + | else false) | |
259 | + | then "item!ART-SNAKE" | |
260 | + | else if (if ((510 > n)) | |
261 | + | then (blacklistCode != "item!ART-ROBODUCK") | |
262 | + | else false) | |
263 | + | then "item!ART-ROBODUCK" | |
264 | + | else if (if ((600 > n)) | |
265 | + | then (blacklistCode != "item!ART-KATANA") | |
266 | + | else false) | |
267 | + | then "item!ART-KATANA" | |
268 | + | else if (if ((650 > n)) | |
269 | + | then (blacklistCode != "item!ART-SCEPTER") | |
270 | + | else false) | |
271 | + | then if ((50 > assetRarity)) | |
272 | + | then "item!ART-SCEPTER" | |
273 | + | else "item!ART-MUTARIUM-D" | |
274 | + | else if (if ((710 > n)) | |
275 | + | then (blacklistCode != "item!ART-MUTARIUM-D") | |
276 | + | else false) | |
277 | + | then "item!ART-MUTARIUM-D" | |
278 | + | else if (if ((720 > n)) | |
279 | + | then (blacklistCode != "item!ART-MUTARIUM-G") | |
280 | + | else false) | |
281 | + | then "item!ART-MUTARIUM-G" | |
282 | + | else if (if ((890 > n)) | |
283 | + | then (blacklistCode != "duckling_10") | |
284 | + | else false) | |
285 | + | then "duckling_10" | |
286 | + | else if (if ((960 > n)) | |
287 | + | then (blacklistCode != "duckling_20") | |
288 | + | else false) | |
289 | + | then "duckling_20" | |
290 | + | else "duckling_40" | |
197 | 291 | } | |
292 | + | } | |
293 | + | ||
294 | + | ||
295 | + | func getRandomReturn (tx,finishHeight) = { | |
296 | + | let n = getRandomNumber(2, tx, finishHeight, 1) | |
297 | + | if ((n == 0)) | |
298 | + | then true | |
299 | + | else false | |
198 | 300 | } | |
199 | 301 | ||
200 | 302 | ||
230 | 332 | func isTestEnv () = getBool("TESTENV") | |
231 | 333 | ||
232 | 334 | ||
233 | - | func finishRebirthInternal (initTx,address, | |
335 | + | func finishRebirthInternal (initTx,address,additionalPayment,double,blacklistCode,rescue) = { | |
234 | 336 | let finishBlock = tryGetInteger((((("address_" + address) + "_initTx_") + initTx) + "_finishBlock")) | |
235 | 337 | let assetRarity = tryGetInteger((((("address_" + address) + "_initTx_") + initTx) + "_assetRarity")) | |
236 | 338 | let status = tryGetString((((("address_" + address) + "_initTx_") + initTx) + "_status")) | |
237 | - | let validPayment = checkAdditionalPayment( | |
339 | + | let validPayment = checkAdditionalPayment(additionalPayment) | |
238 | 340 | if ((validPayment == validPayment)) | |
239 | 341 | then { | |
240 | 342 | let recordAction = invoke(getCouponsAddress(), "recordAction", ["REBIRTH"], nil) | |
249 | 351 | else if ((finishBlock > height)) | |
250 | 352 | then throw("you cannot finish rebirth, yet") | |
251 | 353 | else { | |
252 | - | let win = getRandomWin(fromBase58String(initTx), finishBlock, assetRarity) | |
354 | + | let win = getRandomWin(fromBase58String(initTx), finishBlock, assetRarity, blacklistCode) | |
253 | 355 | let txId = initTx | |
254 | 356 | let result = if ((indexOf(win, "perch") != unit)) | |
255 | 357 | then { | |
306 | 408 | } | |
307 | 409 | else if ((win == "phoenix")) | |
308 | 410 | then { | |
309 | - | let call = invoke(getIncubatorAddress(), "issueJackpot", [address, txId, " | |
411 | + | let call = invoke(getIncubatorAddress(), "issueJackpot", [address, txId, "WWWWWWWP"], nil) | |
310 | 412 | if ((call == call)) | |
311 | 413 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(call))] | |
312 | 414 | else throw("Strict value is not equal to itself.") | |
348 | 450 | else throw("Strict value is not equal to itself.") | |
349 | 451 | } | |
350 | 452 | else throw("RFB: Some error occured, please contact the admins!") | |
453 | + | let returnToSender = if (rescue) | |
454 | + | then getRandomReturn(fromBase58String(initTx), finishBlock) | |
455 | + | else false | |
456 | + | let returnPayload = if (returnToSender) | |
457 | + | then { | |
458 | + | let assetId = fromBase58String(getStringValue((((("address_" + address) + "_initTx_") + initTx) + "_assetId"))) | |
459 | + | let issuer = checkReal(assetId) | |
460 | + | let gen = asString(invoke(getBreederAddress(), "getGenFromName", [value(assetInfo(assetId)).name], nil)) | |
461 | + | if ((gen == gen)) | |
462 | + | then { | |
463 | + | let call = invoke(issuer, "increaseRarity", [toBase58String(assetId), gen], nil) | |
464 | + | if ((call == call)) | |
465 | + | then [ScriptTransfer(addressFromStringValue(address), 1, assetId)] | |
466 | + | else throw("Strict value is not equal to itself.") | |
467 | + | } | |
468 | + | else throw("Strict value is not equal to itself.") | |
469 | + | } | |
470 | + | else nil | |
351 | 471 | ((result ++ [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win"), win), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_status"), "finish")]) ++ validPayment) | |
352 | 472 | } | |
353 | 473 | } | |
406 | 526 | else 0 | |
407 | 527 | if ((payment == payment)) | |
408 | 528 | then { | |
409 | - | let $ | |
410 | - | let gen = $ | |
411 | - | let rarity = $ | |
529 | + | let $t01575315802 = getAssetFarmingPower(assetId) | |
530 | + | let gen = $t01575315802._1 | |
531 | + | let rarity = $t01575315802._2 | |
412 | 532 | let call = invoke(getOrigin(assetId), "reduceRarity", [toBase58String(assetId), gen], nil) | |
413 | 533 | if ((call == call)) | |
414 | 534 | then ([IntegerEntry((((("address_" + address) + "_initTx_") + initTx) + "_finishBlock"), (height + delayForHatching)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_status"), "open"), IntegerEntry((((("address_" + address) + "_initTx_") + initTx) + "_assetRarity"), rarity), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_assetId"), toBase58String(assetId))] ++ validPayment) | |
425 | 545 | ||
426 | 546 | ||
427 | 547 | @Callable(i) | |
428 | - | func finishRebirth (initTx) = finishRebirthInternal(initTx, toString(i.caller), i.payments[0], false) | |
548 | + | func finishRebirth (initTx) = finishRebirthInternal(initTx, toString(i.caller), i.payments[0], false, "", false) | |
429 | 549 | ||
430 | 550 | ||
431 | 551 | ||
439 | 559 | let boosterType = asString(invoke(getItemsAddress(), "checkArtefactDetails", [toBase58String(assetId)], nil)) | |
440 | 560 | if ((boosterType == boosterType)) | |
441 | 561 | then if ((boosterType == "ART-GIFT_DOUBL")) | |
442 | - | then ([Burn(assetId, 1)] ++ finishRebirthInternal(initTx, toString(i.caller), i.payments[1], true)) | |
562 | + | then ([Burn(assetId, 1)] ++ finishRebirthInternal(initTx, toString(i.caller), i.payments[1], true, "", false)) | |
443 | 563 | else throw("Error! Wrong item attached to double rewards!") | |
444 | 564 | else throw("Strict value is not equal to itself.") | |
445 | 565 | } | |
566 | + | ||
567 | + | ||
568 | + | ||
569 | + | @Callable(i) | |
570 | + | func finishRebirthItem (initTx,itemCode) = if (if ((size(i.payments) == 2)) | |
571 | + | then (i.payments[0].amount == 1) | |
572 | + | else false) | |
573 | + | then { | |
574 | + | let assetId = value(i.payments[0].assetId) | |
575 | + | let boosterType = asString(invoke(getItemsAddress(), "checkArtefactDetails", [toBase58String(assetId)], nil)) | |
576 | + | if ((boosterType == boosterType)) | |
577 | + | then if ((boosterType == "ART-HWERASE")) | |
578 | + | then ([Burn(assetId, 1)] ++ finishRebirthInternal(initTx, toString(i.caller), i.payments[1], false, itemCode, false)) | |
579 | + | else if ((boosterType == "ART-HWRESCUE")) | |
580 | + | then ([Burn(assetId, 1)] ++ finishRebirthInternal(initTx, toString(i.caller), i.payments[1], false, "", true)) | |
581 | + | else if ((boosterType == "ART-GIFT_DOUBL")) | |
582 | + | then ([Burn(assetId, 1)] ++ finishRebirthInternal(initTx, toString(i.caller), i.payments[1], true, "", false)) | |
583 | + | else throw("Error! Wrong item attached ") | |
584 | + | else throw("Strict value is not equal to itself.") | |
585 | + | } | |
586 | + | else if ((size(i.payments) == 1)) | |
587 | + | then finishRebirthInternal(initTx, toString(i.caller), i.payments[0], false, "", false) | |
588 | + | else throw("Invalid payments") | |
446 | 589 | ||
447 | 590 | ||
448 | 591 | @Verifier(tx) | |
476 | 619 | let signaturesCount = ((firstUserSigned + secondUserSigned) + thirdUserSigned) | |
477 | 620 | match tx { | |
478 | 621 | case _ => | |
479 | - | (signaturesCount >= | |
622 | + | (signaturesCount >= 1) | |
480 | 623 | } | |
481 | 624 | } | |
482 | 625 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func tryGetStringExternal (address,key) = match getString(address, key) { | |
5 | 5 | case a: String => | |
6 | 6 | a | |
7 | 7 | case _ => | |
8 | 8 | "" | |
9 | 9 | } | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func tryGetIntExternal (address,key) = match getInteger(address, key) { | |
13 | 13 | case a: Int => | |
14 | 14 | a | |
15 | 15 | case _ => | |
16 | 16 | throw("RTGIE: Something went wrong") | |
17 | 17 | } | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func asBoolean (value) = match value { | |
21 | 21 | case boolean: Boolean => | |
22 | 22 | boolean | |
23 | 23 | case _ => | |
24 | 24 | throw("FAB: wrong type, expected: Boolean") | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func tryGetString (key) = tryGetStringExternal(this, key) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | let delayForHatching = 2 | |
32 | 32 | ||
33 | 33 | func staticKey_oracleAddress () = "static_oracleAddress" | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func staticKey_eggAssetId () = "static_eggAssetId" | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func staticKey_incubatorAddress () = "static_incubatorAddress" | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func staticKey_breederAddress () = "static_breederAddress" | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func staticKey_farmingAddress () = "static_farmingAddressNew" | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func staticKey_babyDuckAddress () = "static_babyDuckAddress" | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func staticKey_gameDappAddress () = "static_gameDappAddress" | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func staticKey_itemsAddress () = "static_itemsAddress" | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func staticKey_couponsAddress () = "static_couponsAddress" | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func staticKey_huntAddress () = "static_huntAddress" | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func staticKey_burnAddress () = "static_burnAddress" | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func staticKey_refContractAddress () = "static_refContractAddress" | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func staticKey_extraFee () = "static_extraFee" | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func staticKey_feeAggregator () = "static_feeAggregator" | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func getOracle () = Address(fromBase58String(tryGetString(staticKey_oracleAddress()))) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func getEggAssetId () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_eggAssetId())) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func getIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_incubatorAddress()))) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func getBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_breederAddress()))) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func getFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_farmingAddress()))) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func getBabyDuckAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_babyDuckAddress()))) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func getGameDappAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_gameDappAddress()))) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func getItemsAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_itemsAddress()))) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func getCouponsAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_couponsAddress()))) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func getHuntAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_huntAddress()))) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func getBurnAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_burnAddress()))) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func getRefContractAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_refContractAddress()))) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func getFeeAggregator () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_feeAggregator()))) | |
112 | 112 | ||
113 | 113 | ||
114 | + | func checkReal (assetId) = if (if ((value(assetInfo(assetId)).issuer == getBreederAddress())) | |
115 | + | then true | |
116 | + | else (value(assetInfo(assetId)).issuer == getIncubatorAddress())) | |
117 | + | then value(assetInfo(assetId)).issuer | |
118 | + | else throw("not valid NFT") | |
119 | + | ||
120 | + | ||
114 | 121 | func checkAdditionalPayment (payment) = if (isDefined(payment.assetId)) | |
115 | 122 | then throw("RCAP: Please attach waves") | |
116 | 123 | else { | |
117 | 124 | let feeAmount = getIntegerValue(getOracle(), staticKey_extraFee()) | |
118 | 125 | if ((payment.amount != feeAmount)) | |
119 | 126 | then throw((("RCAP: Please attach exactly " + toString(feeAmount)) + " amount of wavelets")) | |
120 | 127 | else [ScriptTransfer(getFeeAggregator(), feeAmount, unit)] | |
121 | 128 | } | |
122 | 129 | ||
123 | 130 | ||
124 | 131 | let PHOENIXBASEOPTIONS = 1000 | |
125 | 132 | ||
126 | 133 | func tryGetInteger (key) = match getInteger(this, key) { | |
127 | 134 | case b: Int => | |
128 | 135 | b | |
129 | 136 | case _ => | |
130 | 137 | 0 | |
131 | 138 | } | |
132 | 139 | ||
133 | 140 | ||
134 | 141 | func asString (value) = match value { | |
135 | 142 | case s: String => | |
136 | 143 | s | |
137 | 144 | case s: Int => | |
138 | 145 | throw("wrong type, expected: String, got: Int") | |
139 | 146 | case s: Unit => | |
140 | 147 | throw("wrong type, expected: String, got: Unit") | |
141 | 148 | case _ => | |
142 | 149 | throw("wrong type, expected: String") | |
143 | 150 | } | |
144 | 151 | ||
145 | 152 | ||
146 | 153 | let feeAmount = tryGetInteger("currentPrice") | |
147 | 154 | ||
148 | 155 | func getAmountOrClear (amount) = if (contains(amount, "0")) | |
149 | 156 | then "" | |
150 | 157 | else amount | |
151 | 158 | ||
152 | 159 | ||
153 | 160 | func getAssetOrigin (generation) = if ((generation == "G")) | |
154 | 161 | then getIncubatorAddress() | |
155 | 162 | else getBreederAddress() | |
156 | 163 | ||
157 | 164 | ||
158 | 165 | func getAssetRarity (genotype,generation) = { | |
159 | 166 | let quantity = getIntegerValue(getAssetOrigin(generation), (("stats_" + genotype) + "_quantity")) | |
160 | 167 | let power = pow((10000 / quantity), 4, 5, 1, 2, FLOOR) | |
161 | 168 | if ((power > 0)) | |
162 | 169 | then power | |
163 | 170 | else 2 | |
164 | 171 | } | |
165 | 172 | ||
166 | 173 | ||
167 | 174 | func getAssetFarmingPower (assetId) = if (if ((value(assetInfo(assetId)).issuer == getBreederAddress())) | |
168 | 175 | then true | |
169 | 176 | else (value(assetInfo(assetId)).issuer == getIncubatorAddress())) | |
170 | 177 | then { | |
171 | 178 | let assetName = value(assetInfo(assetId)).name | |
172 | 179 | let generation = take(takeRight(assetName, 2), 1) | |
173 | 180 | let farmGen = asString(invoke(getBreederAddress(), "getGenFromName", [assetName], nil)) | |
174 | 181 | if ((farmGen == farmGen)) | |
175 | 182 | then $Tuple2(farmGen, getAssetRarity(farmGen, generation)) | |
176 | 183 | else throw("Strict value is not equal to itself.") | |
177 | 184 | } | |
178 | 185 | else throw("not valid NFT") | |
179 | 186 | ||
180 | 187 | ||
181 | 188 | func getRandomNumber (options,txId,hatchingFinishHeight,offset) = { | |
182 | 189 | let randomSeedBlock = value(blockInfoByHeight((hatchingFinishHeight - 1))) | |
183 | 190 | let randomHash = sha256((txId + value(randomSeedBlock.vrf))) | |
184 | 191 | (toInt(randomHash, (offset * 8)) % options) | |
185 | 192 | } | |
186 | 193 | ||
187 | 194 | ||
188 | - | func getRandomWin (tx,finishHeight,assetRarity) = { | |
189 | - | let jackpotRandom = getRandomNumber(200, tx, finishHeight, 1) | |
195 | + | func getRandomWin (tx,finishHeight,assetRarity,blacklistCode) = { | |
196 | + | let phoenixOptions = (PHOENIXBASEOPTIONS - fraction((PHOENIXBASEOPTIONS / 2), assetRarity, 100)) | |
197 | + | let jackpotRandom = getRandomNumber(phoenixOptions, tx, finishHeight, 1) | |
190 | 198 | if ((jackpotRandom == 1)) | |
191 | 199 | then "phoenix" | |
192 | 200 | else { | |
193 | 201 | let n = getRandomNumber(1000, tx, finishHeight, 0) | |
194 | - | if ((500 > n)) | |
195 | - | then "item!ART-MUTARIUM-D" | |
196 | - | else "item!ART-MUTARIUM-G" | |
202 | + | if (if ((10 > n)) | |
203 | + | then (blacklistCode != "item!ART-FREEGENE") | |
204 | + | else false) | |
205 | + | then "item!ART-FREEGENE" | |
206 | + | else if (if ((126 > n)) | |
207 | + | then (blacklistCode != "ar") | |
208 | + | else false) | |
209 | + | then "ar" | |
210 | + | else if (if ((186 > n)) | |
211 | + | then (blacklistCode != "item!ART-FIRE_ARMOUR") | |
212 | + | else false) | |
213 | + | then "item!ART-FIRE_ARMOUR" | |
214 | + | else if (if ((206 > n)) | |
215 | + | then (blacklistCode != "item!ART-FEED5") | |
216 | + | else false) | |
217 | + | then "item!ART-FEED5" | |
218 | + | else if (if ((226 > n)) | |
219 | + | then (blacklistCode != "item!ART-FEED10") | |
220 | + | else false) | |
221 | + | then "item!ART-FEED10" | |
222 | + | else if (if ((246 > n)) | |
223 | + | then (blacklistCode != "item!ART-FEED15") | |
224 | + | else false) | |
225 | + | then "item!ART-FEED15" | |
226 | + | else if (if ((266 > n)) | |
227 | + | then (blacklistCode != "item!ART-FEED20") | |
228 | + | else false) | |
229 | + | then "item!ART-FEED20" | |
230 | + | else if (if ((286 > n)) | |
231 | + | then (blacklistCode != "item!ART-FEED25") | |
232 | + | else false) | |
233 | + | then "item!ART-FEED25" | |
234 | + | else if (if ((296 > n)) | |
235 | + | then (blacklistCode != "item!ART-FEED50") | |
236 | + | else false) | |
237 | + | then "item!ART-FEED50" | |
238 | + | else if (if ((300 > n)) | |
239 | + | then (blacklistCode != "item!ART-FEED100") | |
240 | + | else false) | |
241 | + | then "item!ART-FEED100" | |
242 | + | else if (if ((310 > n)) | |
243 | + | then (blacklistCode != "item!ART-CROWN") | |
244 | + | else false) | |
245 | + | then "item!ART-CROWN" | |
246 | + | else if (if ((350 > n)) | |
247 | + | then (blacklistCode != "incubator") | |
248 | + | else false) | |
249 | + | then "incubator" | |
250 | + | else if (if ((460 > n)) | |
251 | + | then (blacklistCode != "item!ART-BUILTBODY") | |
252 | + | else false) | |
253 | + | then if ((50 > assetRarity)) | |
254 | + | then "item!ART-BUILTBODY" | |
255 | + | else "item!ART-MUTARIUM-D" | |
256 | + | else if (if ((480 > n)) | |
257 | + | then (blacklistCode != "item!ART-SNAKE") | |
258 | + | else false) | |
259 | + | then "item!ART-SNAKE" | |
260 | + | else if (if ((510 > n)) | |
261 | + | then (blacklistCode != "item!ART-ROBODUCK") | |
262 | + | else false) | |
263 | + | then "item!ART-ROBODUCK" | |
264 | + | else if (if ((600 > n)) | |
265 | + | then (blacklistCode != "item!ART-KATANA") | |
266 | + | else false) | |
267 | + | then "item!ART-KATANA" | |
268 | + | else if (if ((650 > n)) | |
269 | + | then (blacklistCode != "item!ART-SCEPTER") | |
270 | + | else false) | |
271 | + | then if ((50 > assetRarity)) | |
272 | + | then "item!ART-SCEPTER" | |
273 | + | else "item!ART-MUTARIUM-D" | |
274 | + | else if (if ((710 > n)) | |
275 | + | then (blacklistCode != "item!ART-MUTARIUM-D") | |
276 | + | else false) | |
277 | + | then "item!ART-MUTARIUM-D" | |
278 | + | else if (if ((720 > n)) | |
279 | + | then (blacklistCode != "item!ART-MUTARIUM-G") | |
280 | + | else false) | |
281 | + | then "item!ART-MUTARIUM-G" | |
282 | + | else if (if ((890 > n)) | |
283 | + | then (blacklistCode != "duckling_10") | |
284 | + | else false) | |
285 | + | then "duckling_10" | |
286 | + | else if (if ((960 > n)) | |
287 | + | then (blacklistCode != "duckling_20") | |
288 | + | else false) | |
289 | + | then "duckling_20" | |
290 | + | else "duckling_40" | |
197 | 291 | } | |
292 | + | } | |
293 | + | ||
294 | + | ||
295 | + | func getRandomReturn (tx,finishHeight) = { | |
296 | + | let n = getRandomNumber(2, tx, finishHeight, 1) | |
297 | + | if ((n == 0)) | |
298 | + | then true | |
299 | + | else false | |
198 | 300 | } | |
199 | 301 | ||
200 | 302 | ||
201 | 303 | func getOrigin (assetId) = { | |
202 | 304 | let assetName = value(assetInfo(assetId)).name | |
203 | 305 | let generation = take(takeRight(assetName, 2), 1) | |
204 | 306 | if (if ((generation == "G")) | |
205 | 307 | then true | |
206 | 308 | else (generation == "J")) | |
207 | 309 | then getIncubatorAddress() | |
208 | 310 | else getBreederAddress() | |
209 | 311 | } | |
210 | 312 | ||
211 | 313 | ||
212 | 314 | func asInt (value) = match value { | |
213 | 315 | case int: Int => | |
214 | 316 | int | |
215 | 317 | case string: String => | |
216 | 318 | throw(("RAI: wrong type, expected: Int, but got: " + string)) | |
217 | 319 | case _ => | |
218 | 320 | throw("RAI: wrong type, expected: Int") | |
219 | 321 | } | |
220 | 322 | ||
221 | 323 | ||
222 | 324 | func getBool (key) = match getBoolean(this, key) { | |
223 | 325 | case b: Boolean => | |
224 | 326 | b | |
225 | 327 | case _ => | |
226 | 328 | false | |
227 | 329 | } | |
228 | 330 | ||
229 | 331 | ||
230 | 332 | func isTestEnv () = getBool("TESTENV") | |
231 | 333 | ||
232 | 334 | ||
233 | - | func finishRebirthInternal (initTx,address, | |
335 | + | func finishRebirthInternal (initTx,address,additionalPayment,double,blacklistCode,rescue) = { | |
234 | 336 | let finishBlock = tryGetInteger((((("address_" + address) + "_initTx_") + initTx) + "_finishBlock")) | |
235 | 337 | let assetRarity = tryGetInteger((((("address_" + address) + "_initTx_") + initTx) + "_assetRarity")) | |
236 | 338 | let status = tryGetString((((("address_" + address) + "_initTx_") + initTx) + "_status")) | |
237 | - | let validPayment = checkAdditionalPayment( | |
339 | + | let validPayment = checkAdditionalPayment(additionalPayment) | |
238 | 340 | if ((validPayment == validPayment)) | |
239 | 341 | then { | |
240 | 342 | let recordAction = invoke(getCouponsAddress(), "recordAction", ["REBIRTH"], nil) | |
241 | 343 | if ((recordAction == recordAction)) | |
242 | 344 | then { | |
243 | 345 | func getAccessItemAssetId (address) = fromBase58String(tryGetStringExternal(address, "static_accessItemAssetId")) | |
244 | 346 | ||
245 | 347 | func getAccessItemPrice (address) = tryGetIntExternal(address, "static_accessItemPrice") | |
246 | 348 | ||
247 | 349 | if ((status != "open")) | |
248 | 350 | then throw("rebirth is finished or not open") | |
249 | 351 | else if ((finishBlock > height)) | |
250 | 352 | then throw("you cannot finish rebirth, yet") | |
251 | 353 | else { | |
252 | - | let win = getRandomWin(fromBase58String(initTx), finishBlock, assetRarity) | |
354 | + | let win = getRandomWin(fromBase58String(initTx), finishBlock, assetRarity, blacklistCode) | |
253 | 355 | let txId = initTx | |
254 | 356 | let result = if ((indexOf(win, "perch") != unit)) | |
255 | 357 | then { | |
256 | 358 | let color = takeRight(win, 1) | |
257 | 359 | let result = if (!(double)) | |
258 | 360 | then { | |
259 | 361 | let first = invoke(getFarmingAddress(), "addFreePerch", [address, color, 1], nil) | |
260 | 362 | if ((first == first)) | |
261 | 363 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))] | |
262 | 364 | else throw("Strict value is not equal to itself.") | |
263 | 365 | } | |
264 | 366 | else { | |
265 | 367 | let first = invoke(getFarmingAddress(), "addFreePerch", [address, color, 2], nil) | |
266 | 368 | if ((first == first)) | |
267 | 369 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result1"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win1"), win)] | |
268 | 370 | else throw("Strict value is not equal to itself.") | |
269 | 371 | } | |
270 | 372 | if ((result == result)) | |
271 | 373 | then result | |
272 | 374 | else throw("Strict value is not equal to itself.") | |
273 | 375 | } | |
274 | 376 | else if ((win == "incubator")) | |
275 | 377 | then { | |
276 | 378 | let result = if (!(double)) | |
277 | 379 | then { | |
278 | 380 | let first = invoke(getIncubatorAddress(), "issueFreeDuck", [address, txId], nil) | |
279 | 381 | if ((first == first)) | |
280 | 382 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))] | |
281 | 383 | else throw("Strict value is not equal to itself.") | |
282 | 384 | } | |
283 | 385 | else { | |
284 | 386 | let first = invoke(getIncubatorAddress(), "issueFreeDuck", [address, txId], nil) | |
285 | 387 | if ((first == first)) | |
286 | 388 | then { | |
287 | 389 | let second = invoke(getBabyDuckAddress(), "issueFreeDuckling", [address, txId, 100], nil) | |
288 | 390 | if ((second == second)) | |
289 | 391 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result1"), asString(second)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win1"), "duckling_100")] | |
290 | 392 | else throw("Strict value is not equal to itself.") | |
291 | 393 | } | |
292 | 394 | else throw("Strict value is not equal to itself.") | |
293 | 395 | } | |
294 | 396 | if ((result == result)) | |
295 | 397 | then result | |
296 | 398 | else throw("Strict value is not equal to itself.") | |
297 | 399 | } | |
298 | 400 | else if ((win == "ar")) | |
299 | 401 | then { | |
300 | 402 | let assetId = getAccessItemAssetId(getHuntAddress()) | |
301 | 403 | let price = getAccessItemPrice(getHuntAddress()) | |
302 | 404 | let call = invoke(getHuntAddress(), "buyAccessItemOther", [address], [AttachedPayment(assetId, price)]) | |
303 | 405 | if ((call == call)) | |
304 | 406 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(call))] | |
305 | 407 | else throw("Strict value is not equal to itself.") | |
306 | 408 | } | |
307 | 409 | else if ((win == "phoenix")) | |
308 | 410 | then { | |
309 | - | let call = invoke(getIncubatorAddress(), "issueJackpot", [address, txId, " | |
411 | + | let call = invoke(getIncubatorAddress(), "issueJackpot", [address, txId, "WWWWWWWP"], nil) | |
310 | 412 | if ((call == call)) | |
311 | 413 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(call))] | |
312 | 414 | else throw("Strict value is not equal to itself.") | |
313 | 415 | } | |
314 | 416 | else if ((indexOf(win, "duckling") != unit)) | |
315 | 417 | then { | |
316 | 418 | let level = parseIntValue(split(win, "_")[1]) | |
317 | 419 | let levelFinal = if (double) | |
318 | 420 | then (2 * level) | |
319 | 421 | else level | |
320 | 422 | let call = invoke(getBabyDuckAddress(), "issueFreeDuckling", [address, txId, levelFinal], nil) | |
321 | 423 | if ((call == call)) | |
322 | 424 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(call))] | |
323 | 425 | else throw("Strict value is not equal to itself.") | |
324 | 426 | } | |
325 | 427 | else if ((indexOf(win, "item") != unit)) | |
326 | 428 | then { | |
327 | 429 | let itemName = split(win, "!")[1] | |
328 | 430 | let result = if (!(double)) | |
329 | 431 | then { | |
330 | 432 | let first = invoke(getItemsAddress(), "issueArtefactIndex", [itemName, address, 0], nil) | |
331 | 433 | if ((first == first)) | |
332 | 434 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))] | |
333 | 435 | else throw("Strict value is not equal to itself.") | |
334 | 436 | } | |
335 | 437 | else { | |
336 | 438 | let first = invoke(getItemsAddress(), "issueArtefactIndex", [itemName, address, 0], nil) | |
337 | 439 | if ((first == first)) | |
338 | 440 | then { | |
339 | 441 | let second = invoke(getItemsAddress(), "issueArtefactIndex", [itemName, address, 1], nil) | |
340 | 442 | if ((second == second)) | |
341 | 443 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(second)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win1"), win)] | |
342 | 444 | else throw("Strict value is not equal to itself.") | |
343 | 445 | } | |
344 | 446 | else throw("Strict value is not equal to itself.") | |
345 | 447 | } | |
346 | 448 | if ((result == result)) | |
347 | 449 | then result | |
348 | 450 | else throw("Strict value is not equal to itself.") | |
349 | 451 | } | |
350 | 452 | else throw("RFB: Some error occured, please contact the admins!") | |
453 | + | let returnToSender = if (rescue) | |
454 | + | then getRandomReturn(fromBase58String(initTx), finishBlock) | |
455 | + | else false | |
456 | + | let returnPayload = if (returnToSender) | |
457 | + | then { | |
458 | + | let assetId = fromBase58String(getStringValue((((("address_" + address) + "_initTx_") + initTx) + "_assetId"))) | |
459 | + | let issuer = checkReal(assetId) | |
460 | + | let gen = asString(invoke(getBreederAddress(), "getGenFromName", [value(assetInfo(assetId)).name], nil)) | |
461 | + | if ((gen == gen)) | |
462 | + | then { | |
463 | + | let call = invoke(issuer, "increaseRarity", [toBase58String(assetId), gen], nil) | |
464 | + | if ((call == call)) | |
465 | + | then [ScriptTransfer(addressFromStringValue(address), 1, assetId)] | |
466 | + | else throw("Strict value is not equal to itself.") | |
467 | + | } | |
468 | + | else throw("Strict value is not equal to itself.") | |
469 | + | } | |
470 | + | else nil | |
351 | 471 | ((result ++ [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win"), win), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_status"), "finish")]) ++ validPayment) | |
352 | 472 | } | |
353 | 473 | } | |
354 | 474 | else throw("Strict value is not equal to itself.") | |
355 | 475 | } | |
356 | 476 | else throw("Strict value is not equal to itself.") | |
357 | 477 | } | |
358 | 478 | ||
359 | 479 | ||
360 | 480 | @Callable(i) | |
361 | 481 | func configureOracle (oracle) = if ((i.caller != this)) | |
362 | 482 | then throw("RCU: admin only") | |
363 | 483 | else [StringEntry("static_oracleAddress", oracle)] | |
364 | 484 | ||
365 | 485 | ||
366 | 486 | ||
367 | 487 | @Callable(i) | |
368 | 488 | func initRebirth (refererAddress) = { | |
369 | 489 | let pmt = i.payments[0] | |
370 | 490 | let assetId = value(pmt.assetId) | |
371 | 491 | let initTx = toBase58String(i.transactionId) | |
372 | 492 | let address = toString(i.caller) | |
373 | 493 | if ((pmt.amount != 1)) | |
374 | 494 | then throw("NFT is not attached") | |
375 | 495 | else { | |
376 | 496 | let amountPaidByCoupons = asInt(invoke(getCouponsAddress(), "useCoupons", [feeAmount], nil)) | |
377 | 497 | if ((amountPaidByCoupons == amountPaidByCoupons)) | |
378 | 498 | then { | |
379 | 499 | let leftToPay = (feeAmount - amountPaidByCoupons) | |
380 | 500 | let validPayment = checkAdditionalPayment(i.payments[1]) | |
381 | 501 | if ((validPayment == validPayment)) | |
382 | 502 | then { | |
383 | 503 | let payment = if ((leftToPay != 0)) | |
384 | 504 | then { | |
385 | 505 | let feePayment = value(i.payments[2]) | |
386 | 506 | if ((feePayment.assetId != getEggAssetId())) | |
387 | 507 | then throw("You need to attach EGG tokens as fee") | |
388 | 508 | else if ((leftToPay > feePayment.amount)) | |
389 | 509 | then throw(("You need to attach the following amount of EGG tokens as fee: 0." + toString(leftToPay))) | |
390 | 510 | else { | |
391 | 511 | let refererRewardForPerch = fraction(leftToPay, 5, 100) | |
392 | 512 | let refCall = asBoolean(invoke(getRefContractAddress(), "refPayment", [refererAddress], [AttachedPayment(getEggAssetId(), refererRewardForPerch)])) | |
393 | 513 | if ((refCall == refCall)) | |
394 | 514 | then { | |
395 | 515 | let toBurn = if (refCall) | |
396 | 516 | then (leftToPay - refererRewardForPerch) | |
397 | 517 | else leftToPay | |
398 | 518 | let burnCall = invoke(getBurnAddress(), "burnAttachedPayments", nil, [AttachedPayment(getEggAssetId(), toBurn)]) | |
399 | 519 | if ((burnCall == burnCall)) | |
400 | 520 | then leftToPay | |
401 | 521 | else throw("Strict value is not equal to itself.") | |
402 | 522 | } | |
403 | 523 | else throw("Strict value is not equal to itself.") | |
404 | 524 | } | |
405 | 525 | } | |
406 | 526 | else 0 | |
407 | 527 | if ((payment == payment)) | |
408 | 528 | then { | |
409 | - | let $ | |
410 | - | let gen = $ | |
411 | - | let rarity = $ | |
529 | + | let $t01575315802 = getAssetFarmingPower(assetId) | |
530 | + | let gen = $t01575315802._1 | |
531 | + | let rarity = $t01575315802._2 | |
412 | 532 | let call = invoke(getOrigin(assetId), "reduceRarity", [toBase58String(assetId), gen], nil) | |
413 | 533 | if ((call == call)) | |
414 | 534 | then ([IntegerEntry((((("address_" + address) + "_initTx_") + initTx) + "_finishBlock"), (height + delayForHatching)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_status"), "open"), IntegerEntry((((("address_" + address) + "_initTx_") + initTx) + "_assetRarity"), rarity), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_assetId"), toBase58String(assetId))] ++ validPayment) | |
415 | 535 | else throw("Strict value is not equal to itself.") | |
416 | 536 | } | |
417 | 537 | else throw("Strict value is not equal to itself.") | |
418 | 538 | } | |
419 | 539 | else throw("Strict value is not equal to itself.") | |
420 | 540 | } | |
421 | 541 | else throw("Strict value is not equal to itself.") | |
422 | 542 | } | |
423 | 543 | } | |
424 | 544 | ||
425 | 545 | ||
426 | 546 | ||
427 | 547 | @Callable(i) | |
428 | - | func finishRebirth (initTx) = finishRebirthInternal(initTx, toString(i.caller), i.payments[0], false) | |
548 | + | func finishRebirth (initTx) = finishRebirthInternal(initTx, toString(i.caller), i.payments[0], false, "", false) | |
429 | 549 | ||
430 | 550 | ||
431 | 551 | ||
432 | 552 | @Callable(i) | |
433 | 553 | func finishRebirthDouble (initTx) = if (!(if ((size(i.payments) == 2)) | |
434 | 554 | then (i.payments[0].amount == 1) | |
435 | 555 | else false)) | |
436 | 556 | then throw("Invalid payment") | |
437 | 557 | else { | |
438 | 558 | let assetId = value(i.payments[0].assetId) | |
439 | 559 | let boosterType = asString(invoke(getItemsAddress(), "checkArtefactDetails", [toBase58String(assetId)], nil)) | |
440 | 560 | if ((boosterType == boosterType)) | |
441 | 561 | then if ((boosterType == "ART-GIFT_DOUBL")) | |
442 | - | then ([Burn(assetId, 1)] ++ finishRebirthInternal(initTx, toString(i.caller), i.payments[1], true)) | |
562 | + | then ([Burn(assetId, 1)] ++ finishRebirthInternal(initTx, toString(i.caller), i.payments[1], true, "", false)) | |
443 | 563 | else throw("Error! Wrong item attached to double rewards!") | |
444 | 564 | else throw("Strict value is not equal to itself.") | |
445 | 565 | } | |
566 | + | ||
567 | + | ||
568 | + | ||
569 | + | @Callable(i) | |
570 | + | func finishRebirthItem (initTx,itemCode) = if (if ((size(i.payments) == 2)) | |
571 | + | then (i.payments[0].amount == 1) | |
572 | + | else false) | |
573 | + | then { | |
574 | + | let assetId = value(i.payments[0].assetId) | |
575 | + | let boosterType = asString(invoke(getItemsAddress(), "checkArtefactDetails", [toBase58String(assetId)], nil)) | |
576 | + | if ((boosterType == boosterType)) | |
577 | + | then if ((boosterType == "ART-HWERASE")) | |
578 | + | then ([Burn(assetId, 1)] ++ finishRebirthInternal(initTx, toString(i.caller), i.payments[1], false, itemCode, false)) | |
579 | + | else if ((boosterType == "ART-HWRESCUE")) | |
580 | + | then ([Burn(assetId, 1)] ++ finishRebirthInternal(initTx, toString(i.caller), i.payments[1], false, "", true)) | |
581 | + | else if ((boosterType == "ART-GIFT_DOUBL")) | |
582 | + | then ([Burn(assetId, 1)] ++ finishRebirthInternal(initTx, toString(i.caller), i.payments[1], true, "", false)) | |
583 | + | else throw("Error! Wrong item attached ") | |
584 | + | else throw("Strict value is not equal to itself.") | |
585 | + | } | |
586 | + | else if ((size(i.payments) == 1)) | |
587 | + | then finishRebirthInternal(initTx, toString(i.caller), i.payments[0], false, "", false) | |
588 | + | else throw("Invalid payments") | |
446 | 589 | ||
447 | 590 | ||
448 | 591 | @Verifier(tx) | |
449 | 592 | func verify () = if (isTestEnv()) | |
450 | 593 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
451 | 594 | else { | |
452 | 595 | let firstUser = base58'6TdaXEfhnjYquvPf3yV7MFxt2CbgFmaqsvGwkKfXtKi4' | |
453 | 596 | let secondUser = base58'7DsP2WaMLocbHuUxux7pbXRjTrrZ1TFQPsi5QumS3gr8' | |
454 | 597 | let thirdUser = base58'BpFWP3p3JgYrrP45xfrKzeMcWMEXoinj4FVPPkUiA8D3' | |
455 | 598 | let firstUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], firstUser)) | |
456 | 599 | then 1 | |
457 | 600 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], firstUser)) | |
458 | 601 | then 1 | |
459 | 602 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], firstUser)) | |
460 | 603 | then 1 | |
461 | 604 | else 0 | |
462 | 605 | let secondUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], secondUser)) | |
463 | 606 | then 1 | |
464 | 607 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], secondUser)) | |
465 | 608 | then 1 | |
466 | 609 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], secondUser)) | |
467 | 610 | then 1 | |
468 | 611 | else 0 | |
469 | 612 | let thirdUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], thirdUser)) | |
470 | 613 | then 1 | |
471 | 614 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], thirdUser)) | |
472 | 615 | then 1 | |
473 | 616 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], thirdUser)) | |
474 | 617 | then 1 | |
475 | 618 | else 0 | |
476 | 619 | let signaturesCount = ((firstUserSigned + secondUserSigned) + thirdUserSigned) | |
477 | 620 | match tx { | |
478 | 621 | case _ => | |
479 | - | (signaturesCount >= | |
622 | + | (signaturesCount >= 1) | |
480 | 623 | } | |
481 | 624 | } | |
482 | 625 |
github/deemru/w8io/026f985 63.04 ms ◑