tx · 9j1erjuqRedm4kpFs72FPiMEj4huGSuVaa3tz1BnWzEn 3N3KKAdUJj3ZyUCC6ST71jMFVevJhPh26Jz: -0.01600000 Waves 2024.10.03 12:24 [3310485] smart account 3N3KKAdUJj3ZyUCC6ST71jMFVevJhPh26Jz > SELF 0.00000000 Waves
{ "type": 13, "id": "9j1erjuqRedm4kpFs72FPiMEj4huGSuVaa3tz1BnWzEn", "fee": 1600000, "feeAssetId": null, "timestamp": 1727947492941, "version": 2, "chainId": 84, "sender": "3N3KKAdUJj3ZyUCC6ST71jMFVevJhPh26Jz", "senderPublicKey": "Vit9kcG7qwZ3PFkWXMCDXpAAiBrwToPbXYAuTZBaAaE", "proofs": [ "2twKJ1xHRqEnFFLUxkk94rTEYtv7HKStL6s9SNgYaPFWggm2FvD4gjg6oSKSWnCt3vxG4LrXqgNeqssiDec3R7UH" ], "script": "base64:BgITCAISAwoBCBIAEgMKAQgSAwoBCCkBFHRyeUdldFN0cmluZ0V4dGVybmFsAgdhZGRyZXNzA2tleQQHJG1hdGNoMAkAnQgCBQdhZGRyZXNzBQNrZXkDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAFhBQckbWF0Y2gwBQFhAgABDXRyeUdldEludGVnZXIBA2tleQQHJG1hdGNoMAkAmggCBQR0aGlzBQNrZXkDCQABAgUHJG1hdGNoMAIDSW50BAFiBQckbWF0Y2gwBQFiAAABDHRyeUdldFN0cmluZwEDa2V5CQEUdHJ5R2V0U3RyaW5nRXh0ZXJuYWwCBQR0aGlzBQNrZXkBBWFzSW50AQV2YWx1ZQQHJG1hdGNoMAUFdmFsdWUDCQABAgUHJG1hdGNoMAIDSW50BANpbnQFByRtYXRjaDAFA2ludAMJAAECBQckbWF0Y2gwAgZTdHJpbmcEBnN0cmluZwUHJG1hdGNoMAkAAgEJAKwCAgIpUkFJOiB3cm9uZyB0eXBlLCBleHBlY3RlZDogSW50LCBidXQgZ290OiAFBnN0cmluZwkAAgECHlJBSTogd3JvbmcgdHlwZSwg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EIBQFpBmNhbGxlcgkAkQMCCAUBaQhwYXltZW50cwAABwFpARNmaW5pc2hSZWJpcnRoRG91YmxlAQZpbml0VHgDCQEBIQEDCQAAAgkAkAMBCAUBaQhwYXltZW50cwACCQAAAggJAJEDAggFAWkIcGF5bWVudHMAAAZhbW91bnQAAQcJAAIBAg9JbnZhbGlkIHBheW1lbnQEB2Fzc2V0SWQJAQV2YWx1ZQEICQCRAwIIBQFpCHBheW1lbnRzAAAHYXNzZXRJZAQLYm9vc3RlclR5cGUJAQhhc1N0cmluZwEJAPwHBAkBD2dldEl0ZW1zQWRkcmVzcwACFGNoZWNrQXJ0ZWZhY3REZXRhaWxzCQDMCAIJANgEAQUHYXNzZXRJZAUDbmlsBQNuaWwDCQAAAgULYm9vc3RlclR5cGUFC2Jvb3N0ZXJUeXBlAwkAAAIFC2Jvb3N0ZXJUeXBlAg5BUlQtR0lGVF9ET1VCTAkAzggCCQDMCAIJAQRCdXJuAgUHYXNzZXRJZAABBQNuaWwJARVmaW5pc2hSZWJpcnRoSW50ZXJuYWwEBQZpbml0VHgJAKUIAQgFAWkGY2FsbGVyCQCRAwIIBQFpCHBheW1lbnRzAAEGCQACAQItRXJyb3IhIFdyb25nIGl0ZW0gYXR0YWNoZWQgdG8gZG91YmxlIHJld2FyZHMhCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAEsPWGg=", "height": 3310485, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: g4DMKLaS61e31ZZkjm9pWTaHkDgY1WAWcwJShZBCbpW Next: HETriUDQ31dw9DJ5mbim5GstMjcLdqEfBzaBaaKJGwjF 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_extraFee () = "static_extraFee" | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func staticKey_feeAggregator () = "static_feeAggregator" | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func staticKey_canineIncubatorAddress () = "static_felineIncubatorAddress" | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func staticKey_canineBreederAddress () = "static_felineBreederAddress" | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func staticKey_couponsAddress () = "static_couponsAddress" | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func staticKey_canineStakingAddress () = "static_felineStakingAddress" | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func staticKey_duckStakingAddress () = "static_farmingAddressNew" | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func staticKey_duckIncubatorAddress () = "static_incubatorAddress" | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func staticKey_itemsAddress () = "static_itemsAddress" | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func staticKey_canineWavesRebirthPrice () = "static_felinePeteRebirthPrice" | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func staticKey_turtleIncubatorAddress () = "static_turtleIncubatorAddress" | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func staticKey_babyDuckAddress () = "static_babyDuckAddress" | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func staticKey_peteAssetId () = "static_peteAssetId" | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func getOracle () = Address(fromBase58String(tryGetString(staticKey_oracleAddress()))) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func getFeeAggregator () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_feeAggregator()))) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func getCanineBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_canineBreederAddress()))) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func getCanineIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_canineIncubatorAddress()))) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func getCouponsAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_couponsAddress()))) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func getCanineStakingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_canineStakingAddress()))) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func getDuckStakingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_duckStakingAddress()))) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func getDuckIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_duckIncubatorAddress()))) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func getItemsAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_itemsAddress()))) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func getTurtleIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleIncubatorAddress()))) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func getBabyDuckAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_babyDuckAddress()))) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func getPeteAssetId () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_peteAssetId())) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func tryGetIntegerExternal (address,key) = match getInteger(address, key) { | |
132 | 132 | case b: Int => | |
133 | 133 | b | |
134 | 134 | case _ => | |
135 | 135 | throw("TR: Value not found in sc!") | |
136 | 136 | } | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | let wavesAmount = tryGetIntegerExternal(getOracle(), staticKey_canineWavesRebirthPrice()) | |
140 | 140 | ||
141 | 141 | let delayForHatching = 2 | |
142 | 142 | ||
143 | 143 | func checkReal (assetId) = if (if ((value(assetInfo(assetId)).issuer == getCanineBreederAddress())) | |
144 | 144 | then true | |
145 | 145 | else (value(assetInfo(assetId)).issuer == getCanineIncubatorAddress())) | |
146 | 146 | then value(assetInfo(assetId)).issuer | |
147 | 147 | else throw("not valid NFT") | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func checkAdditionalPayment (payment) = if (isDefined(payment.assetId)) | |
151 | 151 | then throw("RCAP: Please attach waves") | |
152 | 152 | else { | |
153 | 153 | let feeAmount = getIntegerValue(getOracle(), staticKey_extraFee()) | |
154 | 154 | if ((payment.amount != feeAmount)) | |
155 | 155 | then throw((("RCAP: Please attach exactly " + toString(feeAmount)) + " amount of wavelets")) | |
156 | 156 | else [ScriptTransfer(getFeeAggregator(), feeAmount, unit)] | |
157 | 157 | } | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func getRandomNumber (options,txId,hatchingFinishHeight,offset) = { | |
161 | 161 | let randomSeedBlock = value(blockInfoByHeight((hatchingFinishHeight - 1))) | |
162 | 162 | let randomHash = sha256((txId + value(randomSeedBlock.vrf))) | |
163 | 163 | (toInt(randomHash, (offset * 8)) % options) | |
164 | 164 | } | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | func tryGetBoolean (key) = match getBoolean(key) { | |
168 | 168 | case b: Boolean => | |
169 | 169 | b | |
170 | 170 | case _ => | |
171 | 171 | false | |
172 | 172 | } | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func getRandomWin (tx,finishHeight) = { | |
176 | 176 | let n = getRandomNumber(1000, tx, finishHeight, 0) | |
177 | 177 | let result = if ((100 > n)) | |
178 | 178 | then "battleground_A" | |
179 | 179 | else if ((200 > n)) | |
180 | 180 | then "battleground_B" | |
181 | 181 | else if ((300 > n)) | |
182 | 182 | then "battleground_C" | |
183 | 183 | else if ((400 > n)) | |
184 | 184 | then "battleground_D" | |
185 | 185 | else if ((450 > n)) | |
186 | 186 | then "incubator" | |
187 | 187 | else if ((490 > n)) | |
188 | 188 | then "duckling_40" | |
189 | 189 | else if ((540 > n)) | |
190 | 190 | then "duckling_20" | |
191 | 191 | else if ((640 > n)) | |
192 | 192 | then "item!ART-FEED5" | |
193 | 193 | else if ((710 > n)) | |
194 | 194 | then "item!ART-FEED10" | |
195 | 195 | else if ((740 > n)) | |
196 | 196 | then "item!ART-FEED15" | |
197 | 197 | else if ((770 > n)) | |
198 | 198 | then "item!ART-FEED20" | |
199 | 199 | else if ((790 > n)) | |
200 | 200 | then "item!ART-FEED25" | |
201 | 201 | else if ((810 > n)) | |
202 | 202 | then "item!ART-FEED50" | |
203 | 203 | else if ((830 > n)) | |
204 | 204 | then "item!ART-FEED100" | |
205 | 205 | else if ((860 > n)) | |
206 | 206 | then "item!ART-MUTARIUM-G" | |
207 | 207 | else if ((890 > n)) | |
208 | 208 | then "item!ART-MUTARIUM-D" | |
209 | 209 | else if ((910 > n)) | |
210 | 210 | then "item!ART-FREEGENE" | |
211 | 211 | else if ((930 > n)) | |
212 | 212 | then "item!ART-FIXGENE" | |
213 | 213 | else if ((980 > n)) | |
214 | 214 | then "trtl_incubator" | |
215 | 215 | else "item!ART-FEED500" | |
216 | 216 | $Tuple2(n, result) | |
217 | 217 | } | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | func finishRebirthInternal (initTx,address,additionalPayment,double) = { | |
221 | 221 | let finishBlock = tryGetInteger((((("address_" + address) + "_initTx_") + initTx) + "_finishBlock")) | |
222 | 222 | let status = tryGetString((((("address_" + address) + "_initTx_") + initTx) + "_status")) | |
223 | 223 | let validPayment = checkAdditionalPayment(additionalPayment) | |
224 | 224 | if ((validPayment == validPayment)) | |
225 | 225 | then if ((status != "open")) | |
226 | 226 | then throw("rebirth is finished or not open") | |
227 | 227 | else if ((finishBlock > height)) | |
228 | 228 | then throw("you cannot finish rebirth, yet") | |
229 | 229 | else { | |
230 | 230 | let output = getRandomWin(fromBase58String(initTx), finishBlock) | |
231 | 231 | let win = output._2 | |
232 | 232 | let random = output._1 | |
233 | 233 | let txId = initTx | |
234 | 234 | let result = if ((indexOf(win, "ground") != unit)) | |
235 | 235 | then { | |
236 | 236 | let color = takeRight(win, 1) | |
237 | 237 | let call = if (!(double)) | |
238 | 238 | then { | |
239 | 239 | let first = invoke(getCanineStakingAddress(), "addFreePerch", [address, color, 1], nil) | |
240 | 240 | if ((first == first)) | |
241 | 241 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))] | |
242 | 242 | else throw("Strict value is not equal to itself.") | |
243 | 243 | } | |
244 | 244 | else { | |
245 | 245 | let first = invoke(getCanineStakingAddress(), "addFreePerch", [address, color, 2], nil) | |
246 | 246 | if ((first == first)) | |
247 | 247 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result1"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win1"), win)] | |
248 | 248 | else throw("Strict value is not equal to itself.") | |
249 | 249 | } | |
250 | 250 | if ((call == call)) | |
251 | 251 | then call | |
252 | 252 | else throw("Strict value is not equal to itself.") | |
253 | 253 | } | |
254 | 254 | else if ((win == "incubator")) | |
255 | 255 | then { | |
256 | 256 | let call = if (!(double)) | |
257 | 257 | then { | |
258 | 258 | let first = invoke(getCanineIncubatorAddress(), "issueFree", [address, txId], nil) | |
259 | 259 | if ((first == first)) | |
260 | 260 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))] | |
261 | 261 | else throw("Strict value is not equal to itself.") | |
262 | 262 | } | |
263 | 263 | else { | |
264 | 264 | let first = invoke(getCanineIncubatorAddress(), "issueFree", [address, txId], nil) | |
265 | 265 | if ((first == first)) | |
266 | 266 | then { | |
267 | 267 | let second = invoke(getTurtleIncubatorAddress(), "issueFreeTurtle", [address, txId], nil) | |
268 | 268 | if ((second == second)) | |
269 | 269 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result1"), asString(second)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win1"), "incubator")] | |
270 | 270 | else throw("Strict value is not equal to itself.") | |
271 | 271 | } | |
272 | 272 | else throw("Strict value is not equal to itself.") | |
273 | 273 | } | |
274 | 274 | if ((call == call)) | |
275 | 275 | then call | |
276 | 276 | else throw("Strict value is not equal to itself.") | |
277 | 277 | } | |
278 | 278 | else if ((indexOf(win, "duckling") != unit)) | |
279 | 279 | then { | |
280 | 280 | let level = parseIntValue(split(win, "_")[1]) | |
281 | 281 | let levelFinal = if (double) | |
282 | 282 | then (2 * level) | |
283 | 283 | else level | |
284 | 284 | let call = invoke(getBabyDuckAddress(), "issueFreeDuckling", [address, txId, levelFinal], nil) | |
285 | 285 | if ((call == call)) | |
286 | 286 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(call))] | |
287 | 287 | else throw("Strict value is not equal to itself.") | |
288 | 288 | } | |
289 | 289 | else if ((win == "trtl_incubator")) | |
290 | 290 | then { | |
291 | 291 | let call = if (!(double)) | |
292 | 292 | then { | |
293 | 293 | let first = invoke(getTurtleIncubatorAddress(), "issueFreeTurtle", [address, txId], nil) | |
294 | 294 | if ((first == first)) | |
295 | 295 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))] | |
296 | 296 | else throw("Strict value is not equal to itself.") | |
297 | 297 | } | |
298 | 298 | else { | |
299 | 299 | let first = invoke(getTurtleIncubatorAddress(), "issueFreeTurtle", [address, txId], nil) | |
300 | 300 | if ((first == first)) | |
301 | 301 | then { | |
302 | 302 | let second = invoke(getCanineIncubatorAddress(), "issueFree", [address, txId], nil) | |
303 | 303 | if ((second == second)) | |
304 | 304 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result1"), asString(second)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win1"), "trtl_incubator")] | |
305 | 305 | else throw("Strict value is not equal to itself.") | |
306 | 306 | } | |
307 | 307 | else throw("Strict value is not equal to itself.") | |
308 | 308 | } | |
309 | 309 | if ((call == call)) | |
310 | 310 | then call | |
311 | 311 | else throw("Strict value is not equal to itself.") | |
312 | 312 | } | |
313 | 313 | else if ((indexOf(win, "item") != unit)) | |
314 | 314 | then { | |
315 | 315 | let itemName = split(win, "!")[1] | |
316 | 316 | let call = if (!(double)) | |
317 | 317 | then { | |
318 | 318 | let first = invoke(getItemsAddress(), "issueArtefactIndex", [itemName, address, 0], nil) | |
319 | 319 | if ((first == first)) | |
320 | 320 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))] | |
321 | 321 | else throw("Strict value is not equal to itself.") | |
322 | 322 | } | |
323 | 323 | else { | |
324 | 324 | let first = invoke(getItemsAddress(), "issueArtefactIndex", [itemName, address, 0], nil) | |
325 | 325 | if ((first == first)) | |
326 | 326 | then { | |
327 | 327 | let second = invoke(getItemsAddress(), "issueArtefactIndex", [itemName, address, 1], nil) | |
328 | 328 | if ((second == second)) | |
329 | 329 | then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result1"), asString(second)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win1"), win)] | |
330 | 330 | else throw("Strict value is not equal to itself.") | |
331 | 331 | } | |
332 | 332 | else throw("Strict value is not equal to itself.") | |
333 | 333 | } | |
334 | 334 | if ((call == call)) | |
335 | 335 | then call | |
336 | 336 | else throw("Strict value is not equal to itself.") | |
337 | 337 | } | |
338 | 338 | else throw(("RFB: Some error occured, please contact the admins! " + win)) | |
339 | 339 | if ((result == result)) | |
340 | 340 | then ((result ++ [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win"), win), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_status"), "finish"), IntegerEntry((((("address_" + address) + "_initTx_") + initTx) + "_random"), random)]) ++ validPayment) | |
341 | 341 | else throw("Strict value is not equal to itself.") | |
342 | 342 | } | |
343 | 343 | else throw("Strict value is not equal to itself.") | |
344 | 344 | } | |
345 | 345 | ||
346 | 346 | ||
347 | 347 | @Callable(i) | |
348 | 348 | func configureOracle (oracle) = if ((i.caller != this)) | |
349 | 349 | then throw("RCU: admin only") | |
350 | 350 | else [StringEntry("static_oracleAddress", oracle)] | |
351 | 351 | ||
352 | 352 | ||
353 | 353 | ||
354 | 354 | @Callable(i) | |
355 | 355 | func initRebirth () = { | |
356 | 356 | let pmtCanine = i.payments[0] | |
357 | 357 | let pmtPete = i.payments[1] | |
358 | 358 | let extra = checkAdditionalPayment(i.payments[2]) | |
359 | 359 | if ((extra == extra)) | |
360 | 360 | then { | |
361 | 361 | let assetId = value(pmtCanine.assetId) | |
362 | 362 | let initTx = toBase58String(i.transactionId) | |
363 | 363 | let address = toString(i.caller) | |
364 | 364 | if ((pmtCanine.amount != 1)) | |
365 | 365 | then throw("NFT is not attached") | |
366 | 366 | else if (if ((pmtPete.amount != wavesAmount)) | |
367 | 367 | then true | |
368 | 368 | else (pmtPete.assetId != getPeteAssetId())) | |
369 | 369 | then throw("Pete payment is not attached or wrong!") | |
370 | 370 | else { | |
371 | 371 | let sendToAggreGator = (pmtPete.amount / 4) | |
372 | 372 | let topup = (pmtPete.amount - sendToAggreGator) | |
373 | 373 | let addMore = invoke(getCanineStakingAddress(), "addPeteAndStakeMore", nil, [AttachedPayment(getPeteAssetId(), topup)]) | |
374 | 374 | if ((addMore == addMore)) | |
375 | 375 | then { | |
376 | 376 | let issuer = checkReal(assetId) | |
377 | 377 | let gen = asString(invoke(getCanineBreederAddress(), "getGenFromName", [value(assetInfo(assetId)).name], nil)) | |
378 | 378 | if ((gen == gen)) | |
379 | 379 | then { | |
380 | 380 | let call = invoke(issuer, "reduceRarity", [toBase58String(assetId), gen], nil) | |
381 | 381 | if ((call == call)) | |
382 | 382 | 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(), sendToAggreGator, getPeteAssetId())] ++ extra) | |
383 | 383 | else throw("Strict value is not equal to itself.") | |
384 | 384 | } | |
385 | 385 | else throw("Strict value is not equal to itself.") | |
386 | 386 | } | |
387 | 387 | else throw("Strict value is not equal to itself.") | |
388 | 388 | } | |
389 | 389 | } | |
390 | 390 | else throw("Strict value is not equal to itself.") | |
391 | 391 | } | |
392 | 392 | ||
393 | 393 | ||
394 | 394 | ||
395 | 395 | @Callable(i) | |
396 | 396 | func finishRebirth (initTx) = finishRebirthInternal(initTx, toString(i.caller), i.payments[0], false) | |
397 | 397 | ||
398 | 398 | ||
399 | 399 | ||
400 | 400 | @Callable(i) | |
401 | 401 | func finishRebirthDouble (initTx) = if (!(if ((size(i.payments) == 2)) | |
402 | 402 | then (i.payments[0].amount == 1) | |
403 | 403 | else false)) | |
404 | 404 | then throw("Invalid payment") | |
405 | 405 | else { | |
406 | 406 | let assetId = value(i.payments[0].assetId) | |
407 | 407 | let boosterType = asString(invoke(getItemsAddress(), "checkArtefactDetails", [toBase58String(assetId)], nil)) | |
408 | 408 | if ((boosterType == boosterType)) | |
409 | 409 | then if ((boosterType == "ART-GIFT_DOUBL")) | |
410 | 410 | then ([Burn(assetId, 1)] ++ finishRebirthInternal(initTx, toString(i.caller), i.payments[1], true)) | |
411 | 411 | else throw("Error! Wrong item attached to double rewards!") | |
412 | 412 | else throw("Strict value is not equal to itself.") | |
413 | 413 | } | |
414 | 414 | ||
415 | 415 |
github/deemru/w8io/026f985 56.14 ms ◑