tx · 3cC6ZKYXwLmGipt6hNmRAqGPmJMgh2NGSrD4Am4PxX6Q

3N26gCrijWPWiTMtJnMTr6w7aYjTHvFrb9W:  -0.01600000 Waves

2024.10.07 20:22 [3316717] smart account 3N26gCrijWPWiTMtJnMTr6w7aYjTHvFrb9W > SELF 0.00000000 Waves

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

github/deemru/w8io/026f985 
27.87 ms