tx · BKEj7jdrrE3NuCrEhHNewzpuoUR1Uo3jr1oxoBv8hkwv 3N1Nb8gVFi3S4Cvt2sBZj7XPkPiWYqKdTfp: -0.01900000 Waves 2024.10.03 13:16 [3310539] smart account 3N1Nb8gVFi3S4Cvt2sBZj7XPkPiWYqKdTfp > SELF 0.00000000 Waves
{ "type": 13, "id": "BKEj7jdrrE3NuCrEhHNewzpuoUR1Uo3jr1oxoBv8hkwv", "fee": 1900000, "feeAssetId": null, "timestamp": 1727950601603, "version": 2, "chainId": 84, "sender": "3N1Nb8gVFi3S4Cvt2sBZj7XPkPiWYqKdTfp", "senderPublicKey": "8FVyd1UAAKDWDWsLPFgQp4THUXha3DRBmZ9ceTQMMzFk", "proofs": [ "2tNzVwcgMfqYzLequbnfGkMAPeNgCNA5JQqxorEAoLzLTWirc44MoEKDxGMvi2sbdLe2RWNvxtcFgW36XQVkL5A3" ], "script": "base64:BgIWCAISAwoBCBIDCgEIEgMKAQgSAwoBCC8BFHRyeUdldFN0cmluZ0V4dGVybmFsAgdhZGRyZXNzA2tleQQHJG1hdGNoMAkAnQgCBQdhZGRyZXNzBQNrZXkDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAFhBQckbWF0Y2gwBQFhAgABDXRyeUdldEludGVnZXIBA2tleQQHJG1hdGNoMAkAmggCBQR0aGlzBQNrZXkDCQABAgUHJG1hdGNoMAIDSW50BAFiBQckbWF0Y2gwBQFiAAABDHRyeUdldFN0cmluZwEDa2V5CQEUdHJ5R2V0U3RyaW5nRXh0ZXJuYWwCBQR0aGlzBQNrZXkBBWFzSW50AQV2YWx1ZQQHJG1hdGNoMAUFdmFsdWUDCQABAgUHJG1hdGNoMAIDSW50BANpbnQFByRtYXRjaDAFA2ludAMJAAECBQckbWF0Y2gwAgZTdHJpbmcEBnN0cmluZwUHJG1hdGNoMAkAAgEJAKwCAgIpUkFJOiB3cm9uZyB0eXBlLCBleHBlY3RlZDogSW50LCBidXQgZ290OiAFBnN0cmluZwkAAgECHlJ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dWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BaQENZmluaXNoUmViaXJ0aAEGaW5pdFR4CQEVZmluaXNoUmViaXJ0aEludGVybmFsBAUGaW5pdFR4CQClCAEIBQFpBmNhbGxlcgkAkQMCCAUBaQhwYXltZW50cwAABwFpARNmaW5pc2hSZWJpcnRoRG91YmxlAQZpbml0VHgDCQEBIQEDCQAAAgkAkAMBCAUBaQhwYXltZW50cwACCQAAAggJAJEDAggFAWkIcGF5bWVudHMAAAZhbW91bnQAAQcJAAIBAg9JbnZhbGlkIHBheW1lbnQEB2Fzc2V0SWQJAQV2YWx1ZQEICQCRAwIIBQFpCHBheW1lbnRzAAAHYXNzZXRJZAQLYm9vc3RlclR5cGUJAQhhc1N0cmluZwEJAPwHBAkBD2dldEl0ZW1zQWRkcmVzcwACFGNoZWNrQXJ0ZWZhY3REZXRhaWxzCQDMCAIJANgEAQUHYXNzZXRJZAUDbmlsBQNuaWwDCQAAAgULYm9vc3RlclR5cGUFC2Jvb3N0ZXJUeXBlAwkAAAIFC2Jvb3N0ZXJUeXBlAg5BUlQtR0lGVF9ET1VCTAkAzggCCQDMCAIJAQRCdXJuAgUHYXNzZXRJZAABBQNuaWwJARVmaW5pc2hSZWJpcnRoSW50ZXJuYWwEBQZpbml0VHgJAKUIAQgFAWkGY2FsbGVyCQCRAwIIBQFpCHBheW1lbnRzAAEGCQACAQItRXJyb3IhIFdyb25nIGl0ZW0gYXR0YWNoZWQgdG8gZG91YmxlIHJld2FyZHMhCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAGNbbyk=", "height": 3310539, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4eNK2nKeRnFW6PuNpn6GrwLa73KAcy2gcjJ4RdouAyZv Next: CgPEPuT6JV6h9AsTkSL4MRX3ebWuwbQxz5iMuHXqvfxb Full:
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 tryGetInteger (key) = match getInteger(this, key) { | |
13 | 13 | case b: Int => | |
14 | 14 | b | |
15 | 15 | case _ => | |
16 | 16 | 0 | |
17 | 17 | } | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func tryGetString (key) = tryGetStringExternal(this, key) | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func asInt (value) = match value { | |
24 | 24 | case int: Int => | |
25 | 25 | int | |
26 | 26 | case string: String => | |
27 | 27 | throw(("RAI: wrong type, expected: Int, but got: " + string)) | |
28 | 28 | case _ => | |
29 | 29 | throw("RAI: wrong type, expected: Int") | |
30 | 30 | } | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func asBoolean (value) = match value { | |
34 | 34 | case boolean: Boolean => | |
35 | 35 | boolean | |
36 | 36 | case _ => | |
37 | 37 | throw("FAB: wrong type, expected: Boolean") | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func asString (value) = match value { | |
42 | 42 | case s: String => | |
43 | 43 | s | |
44 | 44 | case s: Int => | |
45 | 45 | throw("wrong type, expected: String, got: Int") | |
46 | 46 | case s: Unit => | |
47 | 47 | throw("wrong type, expected: String, got: Unit") | |
48 | 48 | case _ => | |
49 | 49 | throw("wrong type, expected: String") | |
50 | 50 | } | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func staticKey_oracleAddress () = "static_oracleAddress" | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func staticKey_eggAssetId () = "static_eggAssetId" | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func staticKey_burnAddress () = "static_burnAddress" | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func staticKey_extraFee () = "static_extraFee" | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func staticKey_feeAggregator () = "static_feeAggregator" | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func staticKey_turtleIncubatorAddress () = "static_turtleIncubatorAddress" | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func staticKey_turtleBreederAddress () = "static_turtleBreederAddress" | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func staticKey_spiceAssetId () = "static_spiceAssetId" | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func staticKey_refContractAddress () = "static_refContractAddress" | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func staticKey_couponsAddress () = "static_couponsAddress" | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func staticKey_turtleStakingAddress () = "static_turtleStakingAddress" | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func staticKey_duckStakingAddress () = "static_farmingAddressNew" | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func staticKey_duckIncubatorAddress () = "static_incubatorAddress" | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func staticKey_itemsAddress () = "static_itemsAddress" | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func staticKey_turtleSpiceRebirthPrice () = "static_turtleSpiceRebirthPrice" | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func staticKey_turtleWavesRebirthPrice () = "static_turtleWavesRebirthPrice" | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func staticKey_turtleEggRebirthPrice () = "static_turtleEggRebirthPrice" | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func getOracle () = Address(fromBase58String(tryGetString(staticKey_oracleAddress()))) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func getEggAssetId () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_eggAssetId())) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func getBurnAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_burnAddress()))) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func getFeeAggregator () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_feeAggregator()))) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func getTurtleBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleBreederAddress()))) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func getTurtleIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleIncubatorAddress()))) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func getSpiceAssetId () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_spiceAssetId())) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func getRefContractAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_refContractAddress()))) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func getCouponsAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_couponsAddress()))) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func getTurtleStakingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleStakingAddress()))) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func getDuckStakingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_duckStakingAddress()))) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func getDuckIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_duckIncubatorAddress()))) | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func getItemsAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_itemsAddress()))) | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func tryGetIntegerExternal (address,key) = match getInteger(address, key) { | |
144 | 144 | case b: Int => | |
145 | 145 | b | |
146 | 146 | case _ => | |
147 | 147 | throw("TR: Value not found in sc!") | |
148 | 148 | } | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | let spiceAmount = tryGetIntegerExternal(getOracle(), staticKey_turtleSpiceRebirthPrice()) | |
152 | 152 | ||
153 | 153 | let eggAmount = tryGetIntegerExternal(getOracle(), staticKey_turtleEggRebirthPrice()) | |
154 | 154 | ||
155 | 155 | let wavesAmount = tryGetIntegerExternal(getOracle(), staticKey_turtleWavesRebirthPrice()) | |
156 | 156 | ||
157 | 157 | let delayForHatching = 2 | |
158 | 158 | ||
159 | 159 | func checkRealTurtle (assetId) = if (if ((value(assetInfo(assetId)).issuer == getTurtleBreederAddress())) | |
160 | 160 | then true | |
161 | 161 | else (value(assetInfo(assetId)).issuer == getTurtleIncubatorAddress())) | |
162 | 162 | then true | |
163 | 163 | else throw("not valid NFT") | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func checkAdditionalPayment (payment) = if (isDefined(payment.assetId)) | |
167 | 167 | then throw("RCAP: Please attach waves") | |
168 | 168 | else { | |
169 | 169 | let feeAmount = getIntegerValue(getOracle(), staticKey_extraFee()) | |
170 | 170 | if ((payment.amount != feeAmount)) | |
171 | 171 | then throw((("RCAP: Please attach exactly " + toString(feeAmount)) + " amount of wavelets")) | |
172 | 172 | else [ScriptTransfer(getFeeAggregator(), feeAmount, unit)] | |
173 | 173 | } | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | func getRandomNumber (options,txId,hatchingFinishHeight,offset) = { | |
177 | 177 | let randomSeedBlock = value(blockInfoByHeight((hatchingFinishHeight - 1))) | |
178 | 178 | let randomHash = sha256((txId + value(randomSeedBlock.vrf))) | |
179 | 179 | (toInt(randomHash, (offset * 8)) % options) | |
180 | 180 | } | |
181 | 181 | ||
182 | 182 | ||
183 | 183 | func tryGetBoolean (key) = match getBoolean(key) { | |
184 | 184 | case b: Boolean => | |
185 | 185 | b | |
186 | 186 | case _ => | |
187 | 187 | false | |
188 | 188 | } | |
189 | 189 | ||
190 | 190 | ||
191 | 191 | func getRandomWin (tx,finishHeight) = { | |
192 | 192 | let jackpotEnabled = tryGetBoolean("JACKPOT_ENABLED") | |
193 | 193 | let jackpotRandom = getRandomNumber(300, tx, finishHeight, 1) | |
194 | 194 | if (if ((jackpotRandom == 1)) | |
195 | 195 | then jackpotEnabled | |
196 | 196 | else false) | |
197 | 197 | then $Tuple2(jackpotRandom, "jackpot") | |
198 | 198 | else { | |
199 | 199 | let n = getRandomNumber(1000, tx, finishHeight, 0) | |
200 | 200 | let result = if ((40 > n)) | |
201 | 201 | then "item!ART-FIRE_SHIELD" | |
202 | 202 | else if ((80 > n)) | |
203 | 203 | then "item!ART-FIRE_TAIL" | |
204 | 204 | else if ((100 > n)) | |
205 | 205 | then "item!ART-FREEGENE" | |
206 | 206 | else if ((150 > n)) | |
207 | 207 | then "beach_R" | |
208 | 208 | else if ((200 > n)) | |
209 | 209 | then "beach_S" | |
210 | 210 | else if ((250 > n)) | |
211 | 211 | then "beach_G" | |
212 | 212 | else if ((300 > n)) | |
213 | 213 | then "beach_D" | |
214 | 214 | else if ((380 > n)) | |
215 | 215 | then "item!ART-MUTARIUM-G" | |
216 | 216 | else if ((400 > n)) | |
217 | 217 | then "item!ART-FEED5" | |
218 | 218 | else if ((600 > n)) | |
219 | 219 | then "item!ART-FEED10" | |
220 | 220 | else if ((620 > n)) | |
221 | 221 | then "item!ART-FEED15" | |
222 | 222 | else if ((640 > n)) | |
223 | 223 | then "item!ART-FEED20" | |
224 | 224 | else if ((660 > n)) | |
225 | 225 | then "item!ART-FEED25" | |
226 | 226 | else if ((680 > n)) | |
227 | 227 | then "item!ART-FEED50" | |
228 | 228 | else if ((760 > n)) | |
229 | 229 | then "item!ART-FEED100" | |
230 | 230 | else if ((780 > n)) | |
231 | 231 | then "perch_G" | |
232 | 232 | else if ((800 > n)) | |
233 | 233 | then "perch_Y" | |
234 | 234 | else if ((820 > n)) | |
235 | 235 | then "perch_R" | |
236 | 236 | else if ((840 > n)) | |
237 | 237 | then "perch_B" | |
238 | 238 | else if ((880 > n)) | |
239 | 239 | then "item!ART-MUTARIUM-D" | |
240 | 240 | else if ((940 > n)) | |
241 | 241 | then "incubator" | |
242 | 242 | else "duck_incubator" | |
243 | 243 | $Tuple2(n, result) | |
244 | 244 | } | |
245 | 245 | } | |
246 | 246 | ||
247 | 247 | ||
248 | 248 | func finishRebirthInternal (initTx,address,additionalPayment,double) = { | |
249 | 249 | let finishBlock = tryGetInteger((((("address_" + address) + "_initTx_") + initTx) + "_finishBlock")) | |
250 | 250 | let status = tryGetString((((("address_" + address) + "_initTx_") + initTx) + "_status")) | |
251 | 251 | let validPayment = checkAdditionalPayment(additionalPayment) | |
252 | 252 | if ((validPayment == validPayment)) | |
253 | 253 | then { | |
254 | 254 | let recordAction = invoke(getCouponsAddress(), "recordAction", ["REBIRTHTURTLE"], nil) | |
255 | 255 | if ((recordAction == recordAction)) | |
256 | 256 | then if ((status != "open")) | |
257 | 257 | then throw("rebirth is finished or not open") | |
258 | 258 | else if ((finishBlock > height)) | |
259 | 259 | then throw("you cannot finish rebirth, yet") | |
260 | 260 | else { | |
261 | 261 | let output = getRandomWin(fromBase58String(initTx), finishBlock) | |
262 | 262 | let win = output._2 | |
263 | 263 | let random = output._1 | |
264 | 264 | let txId = initTx | |
265 | 265 | let result = if ((indexOf(win, "perch") != unit)) | |
266 | 266 | then { | |
267 | 267 | let color = takeRight(win, 1) | |
268 | 268 | let call = if (!(double)) | |
269 | 269 | then { | |
270 | 270 | let first = invoke(getDuckStakingAddress(), "addFreePerch", [address, color, 1], nil) | |
271 | 271 | if ((first == first)) | |
272 | 272 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))] | |
273 | 273 | else throw("Strict value is not equal to itself.") | |
274 | 274 | } | |
275 | 275 | else { | |
276 | 276 | let first = invoke(getDuckStakingAddress(), "addFreePerch", [address, color, 2], nil) | |
277 | 277 | if ((first == first)) | |
278 | 278 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result1"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win1"), win)] | |
279 | 279 | else throw("Strict value is not equal to itself.") | |
280 | 280 | } | |
281 | 281 | if ((call == call)) | |
282 | 282 | then call | |
283 | 283 | else throw("Strict value is not equal to itself.") | |
284 | 284 | } | |
285 | 285 | else if ((indexOf(win, "beach") != unit)) | |
286 | 286 | then { | |
287 | 287 | let color = takeRight(win, 1) | |
288 | 288 | let call = if (!(double)) | |
289 | 289 | then { | |
290 | 290 | let first = invoke(getTurtleStakingAddress(), "addFreeBeach", [address, color], nil) | |
291 | 291 | if ((first == first)) | |
292 | 292 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))] | |
293 | 293 | else throw("Strict value is not equal to itself.") | |
294 | 294 | } | |
295 | 295 | else { | |
296 | 296 | let first = invoke(getTurtleStakingAddress(), "addFreeBeach", [address, color], nil) | |
297 | 297 | if ((first == first)) | |
298 | 298 | then { | |
299 | 299 | let second = invoke(getTurtleStakingAddress(), "addFreeBeach", [address, color], nil) | |
300 | 300 | if ((second == second)) | |
301 | 301 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result1"), asString(second)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win1"), win)] | |
302 | 302 | else throw("Strict value is not equal to itself.") | |
303 | 303 | } | |
304 | 304 | else throw("Strict value is not equal to itself.") | |
305 | 305 | } | |
306 | 306 | if ((call == call)) | |
307 | 307 | then call | |
308 | 308 | else throw("Strict value is not equal to itself.") | |
309 | 309 | } | |
310 | 310 | else if ((win == "jackpot")) | |
311 | 311 | then { | |
312 | 312 | let call = invoke(getTurtleIncubatorAddress(), "issueJackpot", [address, txId, valueOrElse(getString("JACKPOT_NAME"), "WWWWXMAS")], nil) | |
313 | 313 | if ((call == call)) | |
314 | 314 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(call))] | |
315 | 315 | else throw("Strict value is not equal to itself.") | |
316 | 316 | } | |
317 | 317 | else if ((win == "incubator")) | |
318 | 318 | then { | |
319 | 319 | let call = if (!(double)) | |
320 | 320 | then { | |
321 | 321 | let first = invoke(getTurtleIncubatorAddress(), "issueFreeTurtle", [address, txId], nil) | |
322 | 322 | if ((first == first)) | |
323 | 323 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))] | |
324 | 324 | else throw("Strict value is not equal to itself.") | |
325 | 325 | } | |
326 | 326 | else { | |
327 | 327 | let first = invoke(getTurtleIncubatorAddress(), "issueFreeTurtle", [address, txId], nil) | |
328 | 328 | if ((first == first)) | |
329 | 329 | then { | |
330 | 330 | let second = invoke(getDuckIncubatorAddress(), "issueFreeDuckDefinedGenes", [address, txId, "ZZZZZZZZ"], nil) | |
331 | 331 | if ((second == second)) | |
332 | 332 | 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")] | |
333 | 333 | else throw("Strict value is not equal to itself.") | |
334 | 334 | } | |
335 | 335 | else throw("Strict value is not equal to itself.") | |
336 | 336 | } | |
337 | 337 | if ((call == call)) | |
338 | 338 | then call | |
339 | 339 | else throw("Strict value is not equal to itself.") | |
340 | 340 | } | |
341 | 341 | else if ((win == "duck_incubator")) | |
342 | 342 | then { | |
343 | 343 | let call = if (!(double)) | |
344 | 344 | then { | |
345 | 345 | let first = invoke(getDuckIncubatorAddress(), "issueFreeDuckDefinedGenes", [address, txId, "ZZZZZZZZ"], nil) | |
346 | 346 | if ((first == first)) | |
347 | 347 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))] | |
348 | 348 | else throw("Strict value is not equal to itself.") | |
349 | 349 | } | |
350 | 350 | else { | |
351 | 351 | let first = invoke(getDuckIncubatorAddress(), "issueFreeDuckDefinedGenes", [address, txId, "ZZZZZZZZ"], nil) | |
352 | 352 | if ((first == first)) | |
353 | 353 | then { | |
354 | 354 | let second = invoke(getTurtleIncubatorAddress(), "issueFreeTurtle", [address, txId], nil) | |
355 | 355 | if ((second == second)) | |
356 | 356 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result1"), asString(second)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win1"), "incubator")] | |
357 | 357 | else throw("Strict value is not equal to itself.") | |
358 | 358 | } | |
359 | 359 | else throw("Strict value is not equal to itself.") | |
360 | 360 | } | |
361 | 361 | if ((call == call)) | |
362 | 362 | then call | |
363 | 363 | else throw("Strict value is not equal to itself.") | |
364 | 364 | } | |
365 | 365 | else if ((indexOf(win, "item") != unit)) | |
366 | 366 | then { | |
367 | 367 | let itemName = split(win, "!")[1] | |
368 | 368 | let call = if (!(double)) | |
369 | 369 | then { | |
370 | 370 | let first = invoke(getItemsAddress(), "issueArtefactIndex", [itemName, address, 0], nil) | |
371 | 371 | if ((first == first)) | |
372 | 372 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))] | |
373 | 373 | else throw("Strict value is not equal to itself.") | |
374 | 374 | } | |
375 | 375 | else { | |
376 | 376 | let first = invoke(getItemsAddress(), "issueArtefactIndex", [itemName, address, 0], nil) | |
377 | 377 | if ((first == first)) | |
378 | 378 | then { | |
379 | 379 | let second = invoke(getItemsAddress(), "issueArtefactIndex", [itemName, address, 1], nil) | |
380 | 380 | if ((second == second)) | |
381 | 381 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result1"), asString(second)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win1"), win)] | |
382 | 382 | else throw("Strict value is not equal to itself.") | |
383 | 383 | } | |
384 | 384 | else throw("Strict value is not equal to itself.") | |
385 | 385 | } | |
386 | 386 | if ((call == call)) | |
387 | 387 | then call | |
388 | 388 | else throw("Strict value is not equal to itself.") | |
389 | 389 | } | |
390 | 390 | else throw("RFB: Some error occured, please contact the admins!") | |
391 | 391 | ((result ++ [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win"), win), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_status"), "finish"), IntegerEntry((((("address_" + address) + "_initTx_") + initTx) + "_random"), random)]) ++ validPayment) | |
392 | 392 | } | |
393 | 393 | else throw("Strict value is not equal to itself.") | |
394 | 394 | } | |
395 | 395 | else throw("Strict value is not equal to itself.") | |
396 | 396 | } | |
397 | 397 | ||
398 | 398 | ||
399 | 399 | @Callable(i) | |
400 | 400 | func configureOracle (oracle) = if ((i.caller != this)) | |
401 | 401 | then throw("RCU: admin only") | |
402 | 402 | else [StringEntry("static_oracleAddress", oracle)] | |
403 | 403 | ||
404 | 404 | ||
405 | 405 | ||
406 | 406 | @Callable(i) | |
407 | 407 | func initRebirth (refererAddress) = { | |
408 | 408 | let pmtTurtle = i.payments[0] | |
409 | 409 | let pmtWaves = i.payments[1] | |
410 | 410 | let pmtSpice = i.payments[2] | |
411 | 411 | let assetId = value(pmtTurtle.assetId) | |
412 | 412 | let initTx = toBase58String(i.transactionId) | |
413 | 413 | let address = toString(i.caller) | |
414 | 414 | if ((pmtTurtle.amount != 1)) | |
415 | 415 | then throw("NFT is not attached") | |
416 | 416 | else if (if ((pmtWaves.amount != wavesAmount)) | |
417 | 417 | then true | |
418 | 418 | else (pmtWaves.assetId != unit)) | |
419 | 419 | then throw("Wavespayment is not attached or wrong!") | |
420 | 420 | else if (if ((pmtSpice.amount != spiceAmount)) | |
421 | 421 | then true | |
422 | 422 | else (pmtSpice.assetId != getSpiceAssetId())) | |
423 | 423 | then throw("SpicePayment is not attached or wrong!") | |
424 | 424 | else { | |
425 | 425 | let amountPaidByCoupons = asInt(invoke(getCouponsAddress(), "useCoupons", [eggAmount], nil)) | |
426 | 426 | if ((amountPaidByCoupons == amountPaidByCoupons)) | |
427 | 427 | then { | |
428 | 428 | let leftToPay = (eggAmount - amountPaidByCoupons) | |
429 | 429 | let topup = invoke(getTurtleStakingAddress(), "topUpReward", nil, [AttachedPayment(getSpiceAssetId(), pmtSpice.amount)]) | |
430 | 430 | if ((topup == topup)) | |
431 | 431 | then { | |
432 | 432 | let payment = if ((leftToPay != 0)) | |
433 | 433 | then { | |
434 | 434 | let pmtEgg = i.payments[3] | |
435 | 435 | let feePayment = value(pmtEgg) | |
436 | 436 | if ((feePayment.assetId != getEggAssetId())) | |
437 | 437 | then throw("You need to attach EGG tokens as fee") | |
438 | 438 | else if ((feePayment.amount != leftToPay)) | |
439 | 439 | then throw(("You need to attach the following amount of EGG tokens as fee: 0." + toString(leftToPay))) | |
440 | 440 | else { | |
441 | 441 | let refererRewardForPerch = fraction(leftToPay, 5, 100) | |
442 | 442 | let refCall = asBoolean(invoke(getRefContractAddress(), "refPayment", [refererAddress], [AttachedPayment(getEggAssetId(), refererRewardForPerch)])) | |
443 | 443 | if ((refCall == refCall)) | |
444 | 444 | then { | |
445 | 445 | let toBurn = if (refCall) | |
446 | 446 | then (leftToPay - refererRewardForPerch) | |
447 | 447 | else leftToPay | |
448 | 448 | let burnCall = invoke(getBurnAddress(), "burnAttachedPayments", nil, [AttachedPayment(getEggAssetId(), toBurn)]) | |
449 | 449 | if ((burnCall == burnCall)) | |
450 | 450 | then leftToPay | |
451 | 451 | else throw("Strict value is not equal to itself.") | |
452 | 452 | } | |
453 | 453 | else throw("Strict value is not equal to itself.") | |
454 | 454 | } | |
455 | 455 | } | |
456 | 456 | else 0 | |
457 | 457 | if ((payment == payment)) | |
458 | 458 | then { | |
459 | 459 | let realTurtle = checkRealTurtle(assetId) | |
460 | 460 | if ((realTurtle == realTurtle)) | |
461 | 461 | 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)] | |
462 | 462 | else throw("Strict value is not equal to itself.") | |
463 | 463 | } | |
464 | 464 | else throw("Strict value is not equal to itself.") | |
465 | 465 | } | |
466 | 466 | else throw("Strict value is not equal to itself.") | |
467 | 467 | } | |
468 | 468 | else throw("Strict value is not equal to itself.") | |
469 | 469 | } | |
470 | 470 | } | |
471 | 471 | ||
472 | 472 | ||
473 | 473 | ||
474 | 474 | @Callable(i) | |
475 | 475 | func finishRebirth (initTx) = finishRebirthInternal(initTx, toString(i.caller), i.payments[0], false) | |
476 | 476 | ||
477 | 477 | ||
478 | 478 | ||
479 | 479 | @Callable(i) | |
480 | 480 | func finishRebirthDouble (initTx) = if (!(if ((size(i.payments) == 2)) | |
481 | 481 | then (i.payments[0].amount == 1) | |
482 | 482 | else false)) | |
483 | 483 | then throw("Invalid payment") | |
484 | 484 | else { | |
485 | 485 | let assetId = value(i.payments[0].assetId) | |
486 | 486 | let boosterType = asString(invoke(getItemsAddress(), "checkArtefactDetails", [toBase58String(assetId)], nil)) | |
487 | 487 | if ((boosterType == boosterType)) | |
488 | 488 | then if ((boosterType == "ART-GIFT_DOUBL")) | |
489 | 489 | then ([Burn(assetId, 1)] ++ finishRebirthInternal(initTx, toString(i.caller), i.payments[1], true)) | |
490 | 490 | else throw("Error! Wrong item attached to double rewards!") | |
491 | 491 | else throw("Strict value is not equal to itself.") | |
492 | 492 | } | |
493 | 493 | ||
494 | 494 |
github/deemru/w8io/026f985 41.54 ms ◑