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:BgITCAISAwoBCBIAEgMKAQgSAwoBCCkBFHRyeUdldFN0cmluZ0V4dGVybmFsAgdhZGRyZXNzA2tleQQHJG1hdGNoMAkAnQgCBQdhZGRyZXNzBQNrZXkDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAFhBQckbWF0Y2gwBQFhAgABDXRyeUdldEludGVnZXIBA2tleQQHJG1hdGNoMAkAmggCBQR0aGlzBQNrZXkDCQABAgUHJG1hdGNoMAIDSW50BAFiBQckbWF0Y2gwBQFiAAABDHRyeUdldFN0cmluZwEDa2V5CQEUdHJ5R2V0U3RyaW5nRXh0ZXJuYWwCBQR0aGlzBQNrZXkBBWFzSW50AQV2YWx1ZQQHJG1hdGNoMAUFdmFsdWUDCQABAgUHJG1hdGNoMAIDSW50BANpbnQFByRtYXRjaDAFA2ludAMJAAECBQckbWF0Y2gwAgZTdHJpbmcEBnN0cmluZwUHJG1hdGNoMAkAAgEJAKwCAgIpUkFJOiB3cm9uZyB0eXBlLCBleHBlY3RlZDogSW50LCBidXQgZ290OiAFBnN0cmluZwkAAgECHlJBSTogd3JvbmcgdHlwZSw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AEIBQFpBmNhbGxlcgkAkQMCCAUBaQhwYXltZW50cwAABwFpARNmaW5pc2hSZWJpcnRoRG91YmxlAQZpbml0VHgDCQEBIQEDCQAAAgkAkAMBCAUBaQhwYXltZW50cwACCQAAAggJAJEDAggFAWkIcGF5bWVudHMAAAZhbW91bnQAAQcJAAIBAg9JbnZhbGlkIHBheW1lbnQEB2Fzc2V0SWQJAQV2YWx1ZQEICQCRAwIIBQFpCHBheW1lbnRzAAAHYXNzZXRJZAQLYm9vc3RlclR5cGUJAQhhc1N0cmluZwEJAPwHBAkBD2dldEl0ZW1zQWRkcmVzcwACFGNoZWNrQXJ0ZWZhY3REZXRhaWxzCQDMCAIJANgEAQUHYXNzZXRJZAUDbmlsBQNuaWwDCQAAAgULYm9vc3RlclR5cGUFC2Jvb3N0ZXJUeXBlAwkAAAIFC2Jvb3N0ZXJUeXBlAg5BUlQtR0lGVF9ET1VCTAkAzggCCQDMCAIJAQRCdXJuAgUHYXNzZXRJZAABBQNuaWwJARVmaW5pc2hSZWJpcnRoSW50ZXJuYWwEBQZpbml0VHgJAKUIAQgFAWkGY2FsbGVyCQCRAwIIBQFpCHBheW1lbnRzAAEGCQACAQItRXJyb3IhIFdyb25nIGl0ZW0gYXR0YWNoZWQgdG8gZG91YmxlIHJld2FyZHMhCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAEsPWGg=", "height": 3310485, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: g4DMKLaS61e31ZZkjm9pWTaHkDgY1WAWcwJShZBCbpW Next: HETriUDQ31dw9DJ5mbim5GstMjcLdqEfBzaBaaKJGwjF Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func tryGetStringExternal (address,key) = match getString(address, key) {
55 case a: String =>
66 a
77 case _ =>
88 ""
99 }
1010
1111
1212 func tryGetInteger (key) = match getInteger(this, key) {
1313 case b: Int =>
1414 b
1515 case _ =>
1616 0
1717 }
1818
1919
2020 func tryGetString (key) = tryGetStringExternal(this, key)
2121
2222
2323 func asInt (value) = match value {
2424 case int: Int =>
2525 int
2626 case string: String =>
2727 throw(("RAI: wrong type, expected: Int, but got: " + string))
2828 case _ =>
2929 throw("RAI: wrong type, expected: Int")
3030 }
3131
3232
3333 func asBoolean (value) = match value {
3434 case boolean: Boolean =>
3535 boolean
3636 case _ =>
3737 throw("FAB: wrong type, expected: Boolean")
3838 }
3939
4040
4141 func asString (value) = match value {
4242 case s: String =>
4343 s
4444 case s: Int =>
4545 throw("wrong type, expected: String, got: Int")
4646 case s: Unit =>
4747 throw("wrong type, expected: String, got: Unit")
4848 case _ =>
4949 throw("wrong type, expected: String")
5050 }
5151
5252
5353 func staticKey_oracleAddress () = "static_oracleAddress"
5454
5555
5656 func staticKey_extraFee () = "static_extraFee"
5757
5858
5959 func staticKey_feeAggregator () = "static_feeAggregator"
6060
6161
6262 func staticKey_canineIncubatorAddress () = "static_felineIncubatorAddress"
6363
6464
6565 func staticKey_canineBreederAddress () = "static_felineBreederAddress"
6666
6767
6868 func staticKey_couponsAddress () = "static_couponsAddress"
6969
7070
7171 func staticKey_canineStakingAddress () = "static_felineStakingAddress"
7272
7373
7474 func staticKey_duckStakingAddress () = "static_farmingAddressNew"
7575
7676
7777 func staticKey_duckIncubatorAddress () = "static_incubatorAddress"
7878
7979
8080 func staticKey_itemsAddress () = "static_itemsAddress"
8181
8282
8383 func staticKey_canineWavesRebirthPrice () = "static_felinePeteRebirthPrice"
8484
8585
8686 func staticKey_turtleIncubatorAddress () = "static_turtleIncubatorAddress"
8787
8888
8989 func staticKey_babyDuckAddress () = "static_babyDuckAddress"
9090
9191
9292 func staticKey_peteAssetId () = "static_peteAssetId"
9393
9494
9595 func getOracle () = Address(fromBase58String(tryGetString(staticKey_oracleAddress())))
9696
9797
9898 func getFeeAggregator () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_feeAggregator())))
9999
100100
101101 func getCanineBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_canineBreederAddress())))
102102
103103
104104 func getCanineIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_canineIncubatorAddress())))
105105
106106
107107 func getCouponsAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_couponsAddress())))
108108
109109
110110 func getCanineStakingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_canineStakingAddress())))
111111
112112
113113 func getDuckStakingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_duckStakingAddress())))
114114
115115
116116 func getDuckIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_duckIncubatorAddress())))
117117
118118
119119 func getItemsAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_itemsAddress())))
120120
121121
122122 func getTurtleIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleIncubatorAddress())))
123123
124124
125125 func getBabyDuckAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_babyDuckAddress())))
126126
127127
128128 func getPeteAssetId () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_peteAssetId()))
129129
130130
131131 func tryGetIntegerExternal (address,key) = match getInteger(address, key) {
132132 case b: Int =>
133133 b
134134 case _ =>
135135 throw("TR: Value not found in sc!")
136136 }
137137
138138
139139 let wavesAmount = tryGetIntegerExternal(getOracle(), staticKey_canineWavesRebirthPrice())
140140
141141 let delayForHatching = 2
142142
143143 func checkReal (assetId) = if (if ((value(assetInfo(assetId)).issuer == getCanineBreederAddress()))
144144 then true
145145 else (value(assetInfo(assetId)).issuer == getCanineIncubatorAddress()))
146146 then value(assetInfo(assetId)).issuer
147147 else throw("not valid NFT")
148148
149149
150150 func checkAdditionalPayment (payment) = if (isDefined(payment.assetId))
151151 then throw("RCAP: Please attach waves")
152152 else {
153153 let feeAmount = getIntegerValue(getOracle(), staticKey_extraFee())
154154 if ((payment.amount != feeAmount))
155155 then throw((("RCAP: Please attach exactly " + toString(feeAmount)) + " amount of wavelets"))
156156 else [ScriptTransfer(getFeeAggregator(), feeAmount, unit)]
157157 }
158158
159159
160160 func getRandomNumber (options,txId,hatchingFinishHeight,offset) = {
161161 let randomSeedBlock = value(blockInfoByHeight((hatchingFinishHeight - 1)))
162162 let randomHash = sha256((txId + value(randomSeedBlock.vrf)))
163163 (toInt(randomHash, (offset * 8)) % options)
164164 }
165165
166166
167167 func tryGetBoolean (key) = match getBoolean(key) {
168168 case b: Boolean =>
169169 b
170170 case _ =>
171171 false
172172 }
173173
174174
175175 func getRandomWin (tx,finishHeight) = {
176176 let n = getRandomNumber(1000, tx, finishHeight, 0)
177177 let result = if ((100 > n))
178178 then "battleground_A"
179179 else if ((200 > n))
180180 then "battleground_B"
181181 else if ((300 > n))
182182 then "battleground_C"
183183 else if ((400 > n))
184184 then "battleground_D"
185185 else if ((450 > n))
186186 then "incubator"
187187 else if ((490 > n))
188188 then "duckling_40"
189189 else if ((540 > n))
190190 then "duckling_20"
191191 else if ((640 > n))
192192 then "item!ART-FEED5"
193193 else if ((710 > n))
194194 then "item!ART-FEED10"
195195 else if ((740 > n))
196196 then "item!ART-FEED15"
197197 else if ((770 > n))
198198 then "item!ART-FEED20"
199199 else if ((790 > n))
200200 then "item!ART-FEED25"
201201 else if ((810 > n))
202202 then "item!ART-FEED50"
203203 else if ((830 > n))
204204 then "item!ART-FEED100"
205205 else if ((860 > n))
206206 then "item!ART-MUTARIUM-G"
207207 else if ((890 > n))
208208 then "item!ART-MUTARIUM-D"
209209 else if ((910 > n))
210210 then "item!ART-FREEGENE"
211211 else if ((930 > n))
212212 then "item!ART-FIXGENE"
213213 else if ((980 > n))
214214 then "trtl_incubator"
215215 else "item!ART-FEED500"
216216 $Tuple2(n, result)
217217 }
218218
219219
220220 func finishRebirthInternal (initTx,address,additionalPayment,double) = {
221221 let finishBlock = tryGetInteger((((("address_" + address) + "_initTx_") + initTx) + "_finishBlock"))
222222 let status = tryGetString((((("address_" + address) + "_initTx_") + initTx) + "_status"))
223223 let validPayment = checkAdditionalPayment(additionalPayment)
224224 if ((validPayment == validPayment))
225225 then if ((status != "open"))
226226 then throw("rebirth is finished or not open")
227227 else if ((finishBlock > height))
228228 then throw("you cannot finish rebirth, yet")
229229 else {
230230 let output = getRandomWin(fromBase58String(initTx), finishBlock)
231231 let win = output._2
232232 let random = output._1
233233 let txId = initTx
234234 let result = if ((indexOf(win, "ground") != unit))
235235 then {
236236 let color = takeRight(win, 1)
237237 let call = if (!(double))
238238 then {
239239 let first = invoke(getCanineStakingAddress(), "addFreePerch", [address, color, 1], nil)
240240 if ((first == first))
241241 then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))]
242242 else throw("Strict value is not equal to itself.")
243243 }
244244 else {
245245 let first = invoke(getCanineStakingAddress(), "addFreePerch", [address, color, 2], nil)
246246 if ((first == first))
247247 then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result1"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win1"), win)]
248248 else throw("Strict value is not equal to itself.")
249249 }
250250 if ((call == call))
251251 then call
252252 else throw("Strict value is not equal to itself.")
253253 }
254254 else if ((win == "incubator"))
255255 then {
256256 let call = if (!(double))
257257 then {
258258 let first = invoke(getCanineIncubatorAddress(), "issueFree", [address, txId], nil)
259259 if ((first == first))
260260 then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))]
261261 else throw("Strict value is not equal to itself.")
262262 }
263263 else {
264264 let first = invoke(getCanineIncubatorAddress(), "issueFree", [address, txId], nil)
265265 if ((first == first))
266266 then {
267267 let second = invoke(getTurtleIncubatorAddress(), "issueFreeTurtle", [address, txId], nil)
268268 if ((second == second))
269269 then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result1"), asString(second)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win1"), "incubator")]
270270 else throw("Strict value is not equal to itself.")
271271 }
272272 else throw("Strict value is not equal to itself.")
273273 }
274274 if ((call == call))
275275 then call
276276 else throw("Strict value is not equal to itself.")
277277 }
278278 else if ((indexOf(win, "duckling") != unit))
279279 then {
280280 let level = parseIntValue(split(win, "_")[1])
281281 let levelFinal = if (double)
282282 then (2 * level)
283283 else level
284284 let call = invoke(getBabyDuckAddress(), "issueFreeDuckling", [address, txId, levelFinal], nil)
285285 if ((call == call))
286286 then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(call))]
287287 else throw("Strict value is not equal to itself.")
288288 }
289289 else if ((win == "trtl_incubator"))
290290 then {
291291 let call = if (!(double))
292292 then {
293293 let first = invoke(getTurtleIncubatorAddress(), "issueFreeTurtle", [address, txId], nil)
294294 if ((first == first))
295295 then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))]
296296 else throw("Strict value is not equal to itself.")
297297 }
298298 else {
299299 let first = invoke(getTurtleIncubatorAddress(), "issueFreeTurtle", [address, txId], nil)
300300 if ((first == first))
301301 then {
302302 let second = invoke(getCanineIncubatorAddress(), "issueFree", [address, txId], nil)
303303 if ((second == second))
304304 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")]
305305 else throw("Strict value is not equal to itself.")
306306 }
307307 else throw("Strict value is not equal to itself.")
308308 }
309309 if ((call == call))
310310 then call
311311 else throw("Strict value is not equal to itself.")
312312 }
313313 else if ((indexOf(win, "item") != unit))
314314 then {
315315 let itemName = split(win, "!")[1]
316316 let call = if (!(double))
317317 then {
318318 let first = invoke(getItemsAddress(), "issueArtefactIndex", [itemName, address, 0], nil)
319319 if ((first == first))
320320 then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first))]
321321 else throw("Strict value is not equal to itself.")
322322 }
323323 else {
324324 let first = invoke(getItemsAddress(), "issueArtefactIndex", [itemName, address, 0], nil)
325325 if ((first == first))
326326 then {
327327 let second = invoke(getItemsAddress(), "issueArtefactIndex", [itemName, address, 1], nil)
328328 if ((second == second))
329329 then [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result"), asString(first)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_result1"), asString(second)), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win1"), win)]
330330 else throw("Strict value is not equal to itself.")
331331 }
332332 else throw("Strict value is not equal to itself.")
333333 }
334334 if ((call == call))
335335 then call
336336 else throw("Strict value is not equal to itself.")
337337 }
338338 else throw(("RFB: Some error occured, please contact the admins! " + win))
339339 if ((result == result))
340340 then ((result ++ [StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_win"), win), StringEntry((((("address_" + address) + "_initTx_") + initTx) + "_status"), "finish"), IntegerEntry((((("address_" + address) + "_initTx_") + initTx) + "_random"), random)]) ++ validPayment)
341341 else throw("Strict value is not equal to itself.")
342342 }
343343 else throw("Strict value is not equal to itself.")
344344 }
345345
346346
347347 @Callable(i)
348348 func configureOracle (oracle) = if ((i.caller != this))
349349 then throw("RCU: admin only")
350350 else [StringEntry("static_oracleAddress", oracle)]
351351
352352
353353
354354 @Callable(i)
355355 func initRebirth () = {
356356 let pmtCanine = i.payments[0]
357357 let pmtPete = i.payments[1]
358358 let extra = checkAdditionalPayment(i.payments[2])
359359 if ((extra == extra))
360360 then {
361361 let assetId = value(pmtCanine.assetId)
362362 let initTx = toBase58String(i.transactionId)
363363 let address = toString(i.caller)
364364 if ((pmtCanine.amount != 1))
365365 then throw("NFT is not attached")
366366 else if (if ((pmtPete.amount != wavesAmount))
367367 then true
368368 else (pmtPete.assetId != getPeteAssetId()))
369369 then throw("Pete payment is not attached or wrong!")
370370 else {
371371 let sendToAggreGator = (pmtPete.amount / 4)
372372 let topup = (pmtPete.amount - sendToAggreGator)
373373 let addMore = invoke(getCanineStakingAddress(), "addPeteAndStakeMore", nil, [AttachedPayment(getPeteAssetId(), topup)])
374374 if ((addMore == addMore))
375375 then {
376376 let issuer = checkReal(assetId)
377377 let gen = asString(invoke(getCanineBreederAddress(), "getGenFromName", [value(assetInfo(assetId)).name], nil))
378378 if ((gen == gen))
379379 then {
380380 let call = invoke(issuer, "reduceRarity", [toBase58String(assetId), gen], nil)
381381 if ((call == call))
382382 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)
383383 else throw("Strict value is not equal to itself.")
384384 }
385385 else throw("Strict value is not equal to itself.")
386386 }
387387 else throw("Strict value is not equal to itself.")
388388 }
389389 }
390390 else throw("Strict value is not equal to itself.")
391391 }
392392
393393
394394
395395 @Callable(i)
396396 func finishRebirth (initTx) = finishRebirthInternal(initTx, toString(i.caller), i.payments[0], false)
397397
398398
399399
400400 @Callable(i)
401401 func finishRebirthDouble (initTx) = if (!(if ((size(i.payments) == 2))
402402 then (i.payments[0].amount == 1)
403403 else false))
404404 then throw("Invalid payment")
405405 else {
406406 let assetId = value(i.payments[0].assetId)
407407 let boosterType = asString(invoke(getItemsAddress(), "checkArtefactDetails", [toBase58String(assetId)], nil))
408408 if ((boosterType == boosterType))
409409 then if ((boosterType == "ART-GIFT_DOUBL"))
410410 then ([Burn(assetId, 1)] ++ finishRebirthInternal(initTx, toString(i.caller), i.payments[1], true))
411411 else throw("Error! Wrong item attached to double rewards!")
412412 else throw("Strict value is not equal to itself.")
413413 }
414414
415415

github/deemru/w8io/026f985 
56.14 ms