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