tx · 2SsxzudNM3TZCE5U21PVGA9LkbdNS6WHnJWcHYZRUjp7

3MyqTsfqF7ZTosxWkLAErhbSEqf7gjzghQG:  -0.01700000 Waves

2024.10.03 11:44 [3310447] smart account 3MyqTsfqF7ZTosxWkLAErhbSEqf7gjzghQG > SELF 0.00000000 Waves

{ "type": 13, "id": "2SsxzudNM3TZCE5U21PVGA9LkbdNS6WHnJWcHYZRUjp7", "fee": 1700000, "feeAssetId": null, "timestamp": 1727945159273, "version": 2, "chainId": 84, "sender": "3MyqTsfqF7ZTosxWkLAErhbSEqf7gjzghQG", "senderPublicKey": "CEabakZcAXzkDyQPwVBM4SL5QELx4LZJ9cm8nsoRLfDk", "proofs": [ "mMdSuRveXj6RkpZHp8Ds46kDzpRnujhBWB5fgYGu9bkgeNSdrr9yBaSaJd9oYWFfdaXe86D3da1CYHQsPDCqk4V" ], "script": "base64:BgJACAISAwoBCBIDCgEBEgMKAQESAwoBCBIDCgEIEgMKAQgSBAoCCAgSBQoDCAgIEgUKAwgICBIECgIICBIECgIICCABFHRyeUdldFN0cmluZ0V4dGVybmFsAgdhZGRyZXNzA2tleQQHJG1hdGNoMAkAnQgCBQdhZGRyZXNzBQNrZXkDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAFhBQckbWF0Y2gwBQFhAgABDHRyeUdldFN0cmluZwEDa2V5CQEUdHJ5R2V0U3RyaW5nRXh0ZXJuYWwCBQR0aGlzBQNrZXkBHnN0YXRpY0tleV90dXJ0bGVSZWJpcnRoQWRkcmVzcwACG3N0YXRpY190dXJ0bGVSZWJpcnRoQWRkcmVzcwEJZ2V0T3JhY2xlAAkBB0FkZHJlc3MBCQDZBAEJAQx0cnlHZXRTdHJpbmcBAhRzdGF0aWNfb3JhY2xlQWRkcmVzcwENZ2V0RWdnQXNzZXRJZAAJANkEAQkBFHRyeUdldFN0cmluZ0V4dGVybmFsAgkBCWdldE9yYWNsZQACEXN0YXRpY19lZ2dBc3NldElkARFnZXRSZWJpcnRoQWRkc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gGcHJvb2ZzAAEFCnNlY29uZFVzZXIAAQMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAIFCnNlY29uZFVzZXIAAQAABA90aGlyZFVzZXJTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQl0aGlyZFVzZXIAAQMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFCXRoaXJkVXNlcgABAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAgUJdGhpcmRVc2VyAAEAAAQPc2lnbmF0dXJlc0NvdW50CQBkAgkAZAIFD2ZpcnN0VXNlclNpZ25lZAUQc2Vjb25kVXNlclNpZ25lZAUPdGhpcmRVc2VyU2lnbmVkBAckbWF0Y2gwBQJ0eAkAZwIFD3NpZ25hdHVyZXNDb3VudAACjfrPag==", "height": 3310447, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8YAXSrPFTATRhhf6hkhfR1Us5B6Zk682qRgEgQCSPsh4 Next: HA5yLS1XoQ5yR1sF2RTzmq6d8oYnAgMfGJZUR5eYSDMJ 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 tryGetString (key) = tryGetStringExternal(this, key)
1313
1414
1515 func staticKey_turtleRebirthAddress () = "static_turtleRebirthAddress"
1616
1717
1818 func getOracle () = Address(fromBase58String(tryGetString("static_oracleAddress")))
1919
2020
2121 func getEggAssetId () = fromBase58String(tryGetStringExternal(getOracle(), "static_eggAssetId"))
2222
2323
2424 func getRebirthAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_rebirthAddress")))
2525
2626
2727 func getBabyDuckAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_babyDuckAddress")))
2828
2929
3030 func getRefContractAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_refContractAddress")))
3131
3232
3333 func getCouponsAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_couponsAddress")))
3434
3535
3636 func getBurnAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_burnAddress")))
3737
3838
3939 func getTurtleRebirthAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleRebirthAddress())))
4040
4141
4242 let delayForHatching = 2
4343
4444 let typesAmount = 10
4545
4646 let RefererReward = 5
4747
4848 let HatchingStarted = "HATCHING_STARTED"
4949
5050 let HatchingFinished = "HATCHING_FINISHED"
5151
5252 func isLocked () = {
5353 let masterAddress = Address(base58'3PEPftf2kWZDmAaWBjs6BUJa9957kiA2PkU')
5454 match getInteger(masterAddress, "egglock") {
5555 case b: Int =>
5656 b
5757 case _ =>
5858 0
5959 }
6060 }
6161
6262
6363 func getHatchingStatusKey (address,txId) = (((address + "_") + toBase58String(txId)) + "_status")
6464
6565
6666 func getHatchingFinishHeightKey (address,txId) = (((address + "_") + toBase58String(txId)) + "_fh")
6767
6868
6969 func getDuckIdKey (address,txId) = (((address + "_") + toBase58String(txId)) + "_di")
7070
7171
7272 func getDuckStatsKey (genString) = (("stats_" + genString) + "_amount")
7373
7474
7575 func tryGetInteger (key) = {
7676 let val = match getInteger(this, key) {
7777 case b: Int =>
7878 b
7979 case _ =>
8080 0
8181 }
8282 val
8383 }
8484
8585
8686 let discountCoefficient = tryGetInteger("discountCoefficient")
8787
8888 let saleCoefficient = tryGetInteger("saleCoefficient")
8989
9090 func getRandomNumber (variants,txId,hatchingFinishHeight,offset) = {
9191 let randomSeedBlock = value(blockInfoByHeight((hatchingFinishHeight - 1)))
9292 let randomHash = sha256(((base58'incubator' + txId) + value(randomSeedBlock.vrf)))
9393 (toInt(randomHash, offset) % variants)
9494 }
9595
9696
9797 func wasUniqueBorn (gen) = tryGetInteger(getDuckStatsKey(gen))
9898
9999
100100 func getRandomName (txId,hatchingFinishHeight) = {
101101 let jackpotRandom = getRandomNumber(200, txId, hatchingFinishHeight, 4)
102102 let entry = IntegerEntry("last_jackpot_random", jackpotRandom)
103103 let typeRandom = getRandomNumber(4, txId, hatchingFinishHeight, 5)
104104 let colorRandom = getRandomNumber(4, txId, hatchingFinishHeight, 6)
105105 let color = if ((colorRandom == 0))
106106 then "Y"
107107 else if ((colorRandom == 1))
108108 then "G"
109109 else if ((colorRandom == 2))
110110 then "B"
111111 else "R"
112112 if ((typeRandom == 0))
113113 then $Tuple3(("DUCK-MMMMMMMM-G" + color), "8M-G", entry)
114114 else if ((typeRandom == 1))
115115 then $Tuple3(("DUCK-NNNNNNNN-G" + color), "8N-G", entry)
116116 else if ((typeRandom == 2))
117117 then $Tuple3(("DUCK-OOOOOOOO-G" + color), "8O-G", entry)
118118 else $Tuple3(("DUCK-PPPPPPPP-G" + color), "8P-G", entry)
119119 }
120120
121121
122122 func countEggsNeededAmount (totalDucksAmount) = {
123123 let n = totalDucksAmount
124124 let g = discountCoefficient
125125 let s = saleCoefficient
126126 let t = typesAmount
127127 let price = pow((100 + ((n * g) / (10 * t))), 2, 5, 1, 2, DOWN)
128128 if ((saleCoefficient == 0))
129129 then (price * 1000000)
130130 else (((price * 1000000) / 100) * (100 - saleCoefficient))
131131 }
132132
133133
134134 func asInt (value) = match value {
135135 case int: Int =>
136136 int
137137 case _ =>
138138 throw("IAI: wrong type, expected: Int")
139139 }
140140
141141
142142 func finishHatchingInternal (txIdStr,owner) = {
143143 let txId = fromBase58String(txIdStr)
144144 let hatchingStatusKey = getHatchingStatusKey(owner, txId)
145145 let finishHeightKey = getHatchingFinishHeightKey(owner, txId)
146146 let duckIdKey = getDuckIdKey(owner, txId)
147147 let duckFromBaby = match getBoolean((("hatching_" + txIdStr) + "_babyDuck")) {
148148 case t: Boolean =>
149149 t
150150 case _ =>
151151 false
152152 }
153153 let hatchingTxStatus = getStringValue(this, hatchingStatusKey)
154154 let hatchingFinishHeight = getIntegerValue(this, finishHeightKey)
155155 if ((hatchingTxStatus == HatchingFinished))
156156 then {
157157 let duckId = getStringValue(this, getDuckIdKey(owner, txId))
158158 throw(("IFDH: The duck was hatched and claimed already, here is the folowing: " + duckId))
159159 }
160160 else if ((hatchingFinishHeight > height))
161161 then throw((((("Hatching is not finished yet " + toString((hatchingFinishHeight - height))) + " blocks remaining, it will take around ") + toString((hatchingFinishHeight - height))) + " minutes"))
162162 else {
163163 let $t055055591 = getRandomName(txId, hatchingFinishHeight)
164164 let duckGen = $t055055591._1
165165 let farmGen = $t055055591._2
166166 let jackpotRandomEntry = $t055055591._3
167167 let description = (("{\"genotype\": \"" + duckGen) + "\", \"crossbreeding\": true}")
168168 let asset = Issue(duckGen, description, 1, 0, false, unit, hatchingFinishHeight)
169169 let assetId = calculateAssetId(asset)
170170 let amount = (tryGetInteger(getDuckStatsKey(duckGen)) + 1)
171171 [StringEntry(hatchingStatusKey, HatchingFinished), StringEntry(duckIdKey, toBase58String(assetId)), StringEntry(toBase58String(assetId), duckIdKey), BooleanEntry((("duck_" + toBase58String(assetId)) + "_grown"), duckFromBaby), IntegerEntry(getDuckStatsKey(duckGen), amount), jackpotRandomEntry, IntegerEntry((("stats_" + farmGen) + "_quantity"), (tryGetInteger((("stats_" + farmGen) + "_quantity")) + 1)), asset, ScriptTransfer(Address(fromBase58String(owner)), 1, assetId)]
172172 }
173173 }
174174
175175
176176 func getBool (key) = match getBoolean(this, key) {
177177 case b: Boolean =>
178178 b
179179 case _ =>
180180 false
181181 }
182182
183183
184184 func isTestEnv () = getBool("TESTENV")
185185
186186
187187 @Callable(i)
188188 func configureOracle (oracle) = if ((i.caller != this))
189189 then throw("ICU: admin only")
190190 else [StringEntry("static_oracleAddress", oracle)]
191191
192192
193193
194194 @Callable(i)
195195 func setDiscount (val) = if ((i.caller != this))
196196 then throw("ISD: admin_only")
197197 else [IntegerEntry("discountCoefficient", val)]
198198
199199
200200
201201 @Callable(i)
202202 func setSale (val) = if ((i.caller != this))
203203 then throw("ISS: admin_only")
204204 else [IntegerEntry("saleCoefficient", val)]
205205
206206
207207
208208 @Callable(i)
209209 func startDuckHatching (refererAddress) = if ((getBabyDuckAddress() != i.caller))
210210 then throw("ISDHFA: From now on this is only possible through ducklings!")
211211 else if ((isLocked() > 0))
212212 then throw("ISDH: EGG operations are temporarily locked")
213213 else {
214214 let totalDucksAmount = tryGetInteger("ducks_amount")
215215 let eggsNeeded = countEggsNeededAmount(totalDucksAmount)
216216 [StringEntry(getHatchingStatusKey(toString(i.originCaller), i.transactionId), HatchingStarted), IntegerEntry(getHatchingFinishHeightKey(toString(i.originCaller), i.transactionId), (height + delayForHatching)), IntegerEntry("ducks_amount", (totalDucksAmount + 1)), IntegerEntry("ducks_last_price", (eggsNeeded / 1000000)), BooleanEntry((("hatching_" + toBase58String(i.transactionId)) + "_babyDuck"), true)]
217217 }
218218
219219
220220
221221 @Callable(i)
222222 func startDuckHatchingForAddress (address) = if ((isLocked() > 0))
223223 then throw("ISDHFA: EGG operations are temporarily locked")
224224 else if ((i.caller != this))
225225 then throw("ISDHFA: Permission denied")
226226 else {
227227 let totalDucksAmount = tryGetInteger("ducks_amount")
228228 let eggsNeeded = countEggsNeededAmount(totalDucksAmount)
229229 [StringEntry(getHatchingStatusKey(address, i.transactionId), HatchingStarted), IntegerEntry(getHatchingFinishHeightKey(address, i.transactionId), (height + delayForHatching)), IntegerEntry("ducks_amount", (totalDucksAmount + 1)), IntegerEntry("ducks_last_price", (eggsNeeded / 1000000)), BooleanEntry((("hatching_" + toBase58String(i.transactionId)) + "_promo"), true)]
230230 }
231231
232232
233233
234234 @Callable(i)
235235 func finishDuckHatching (txIdStr) = {
236236 let owner = toString(i.originCaller)
237237 finishHatchingInternal(txIdStr, owner)
238238 }
239239
240240
241241
242242 @Callable(i)
243243 func issueFreeDuck (address,txIdStr) = if ((i.caller != getRebirthAddress()))
244244 then throw("ISFD: rebirth only")
245245 else {
246246 let txId = fromBase58String(txIdStr)
247247 let hatchingStatusKey = getHatchingStatusKey(address, txId)
248248 let finishHeightKey = getHatchingFinishHeightKey(address, txId)
249249 let totalDucksAmount = tryGetInteger("ducks_amount")
250250 let eggsNeeded = countEggsNeededAmount(totalDucksAmount)
251251 let $t093379499 = getRandomName(txId, (valueOrErrorMessage(transactionHeightById(txId), ((txIdStr + " not found ") + toBase58String(txId))) + 1))
252252 let duckGen = $t093379499._1
253253 let farmGen = $t093379499._2
254254 let jackpotRandomEntry = $t093379499._3
255255 let description = (("{\"genotype\": \"" + duckGen) + "\", \"crossbreeding\": true}")
256256 let asset = Issue(duckGen, description, 1, 0, false, unit, height)
257257 let assetId = calculateAssetId(asset)
258258 let amount = (tryGetInteger(getDuckStatsKey(duckGen)) + 1)
259259 let duckIdKey = getDuckIdKey(address, txId)
260260 $Tuple2([IntegerEntry(getHatchingFinishHeightKey(address, txId), height), IntegerEntry("ducks_amount", (totalDucksAmount + 1)), IntegerEntry("ducks_last_price", (eggsNeeded / 1000000)), jackpotRandomEntry, StringEntry(hatchingStatusKey, HatchingFinished), StringEntry(duckIdKey, toBase58String(assetId)), StringEntry(toBase58String(assetId), duckIdKey), IntegerEntry(getDuckStatsKey(duckGen), amount), IntegerEntry((("stats_" + farmGen) + "_quantity"), (tryGetInteger((("stats_" + farmGen) + "_quantity")) + 1)), asset, ScriptTransfer(value(addressFromString(address)), 1, assetId)], toBase58String(assetId))
261261 }
262262
263263
264264
265265 @Callable(i)
266266 func issueFreeDuckDefinedGenes (address,txIdStr,genes) = if (if ((i.caller != this))
267267 then (i.caller != getTurtleRebirthAddress())
268268 else false)
269269 then throw("IIFDDG: Admin only!")
270270 else {
271271 let txId = fromBase58String(txIdStr)
272272 let hatchingStatusKey = getHatchingStatusKey(address, txId)
273273 let finishHeightKey = getHatchingFinishHeightKey(address, txId)
274274 let totalDucksAmount = tryGetInteger("ducks_amount")
275275 let eggsNeeded = countEggsNeededAmount(totalDucksAmount)
276276 let colorRandom = getRandomNumber(4, txId, height, 6)
277277 let color = if ((colorRandom == 0))
278278 then "Y"
279279 else if ((colorRandom == 1))
280280 then "G"
281281 else if ((colorRandom == 2))
282282 then "B"
283283 else "R"
284284 let $t01119611273 = $Tuple2(((("DUCK-" + genes) + "-G") + color), (("8" + take(genes, 1)) + "-G"))
285285 let duckGen = $t01119611273._1
286286 let farmGen = $t01119611273._2
287287 let description = (("{\"genotype\": \"" + duckGen) + "\", \"crossbreeding\": true}")
288288 let asset = Issue(duckGen, description, 1, 0, false, unit, height)
289289 let assetId = calculateAssetId(asset)
290290 let amount = (tryGetInteger(getDuckStatsKey(duckGen)) + 1)
291291 let duckIdKey = getDuckIdKey(address, txId)
292292 $Tuple2([IntegerEntry(getHatchingFinishHeightKey(address, txId), height), IntegerEntry("ducks_amount", (totalDucksAmount + 1)), IntegerEntry("ducks_last_price", (eggsNeeded / 1000000)), StringEntry(hatchingStatusKey, HatchingFinished), StringEntry(duckIdKey, toBase58String(assetId)), StringEntry(toBase58String(assetId), duckIdKey), IntegerEntry(getDuckStatsKey(duckGen), amount), IntegerEntry((("stats_" + farmGen) + "_quantity"), (tryGetInteger((("stats_" + farmGen) + "_quantity")) + 1)), asset, ScriptTransfer(value(addressFromString(address)), 1, assetId)], toBase58String(assetId))
293293 }
294294
295295
296296
297297 @Callable(i)
298298 func issueJackpot (address,txIdStr,gen) = if (if ((i.caller != getRebirthAddress()))
299299 then (i.caller != this)
300300 else false)
301301 then throw("ISJ: admin or rebirth only")
302302 else {
303303 let txId = fromBase58String(txIdStr)
304304 let hatchingStatusKey = getHatchingStatusKey(address, txId)
305305 let finishHeightKey = getHatchingFinishHeightKey(address, txId)
306306 let totalDucksAmount = tryGetInteger("ducks_amount")
307307 let eggsNeeded = countEggsNeededAmount(totalDucksAmount)
308308 let $t01272212774 = $Tuple2((("DUCK-" + gen) + "-JU"), "8W-J")
309309 let duckGen = $t01272212774._1
310310 let farmGen = $t01272212774._2
311311 let description = (("{\"genotype\": \"" + duckGen) + "\", \"crossbreeding\": true}")
312312 let asset = Issue(duckGen, description, 1, 0, false, unit, height)
313313 let assetId = calculateAssetId(asset)
314314 let duckIdKey = getDuckIdKey(address, txId)
315315 let valueDuckIdKeyExits = tryGetString(duckIdKey)
316316 if ((valueDuckIdKeyExits != ""))
317317 then throw((("ISJ: You will override following duckId :" + duckIdKey) + " make sure that your txId is unique!"))
318318 else $Tuple2([IntegerEntry(getHatchingFinishHeightKey(address, txId), height), IntegerEntry("ducks_amount", (totalDucksAmount + 1)), IntegerEntry("ducks_last_price", (eggsNeeded / 1000000)), StringEntry(hatchingStatusKey, HatchingFinished), StringEntry(duckIdKey, toBase58String(assetId)), StringEntry(toBase58String(assetId), duckIdKey), IntegerEntry(getDuckStatsKey(duckGen), (tryGetInteger(getDuckStatsKey(duckGen)) + 1)), IntegerEntry((("stats_" + farmGen) + "_quantity"), (tryGetInteger((("stats_" + farmGen) + "_quantity")) + 1)), asset, ScriptTransfer(value(addressFromString(address)), 1, assetId)], toBase58String(assetId))
319319 }
320320
321321
322322
323323 @Callable(i)
324324 func reduceRarity (assetId,fGen) = {
325325 let asset = fromBase58String(assetId)
326326 if (if ((i.caller != getRebirthAddress()))
327327 then (i.caller != this)
328328 else false)
329329 then throw("IRR: admin or rebirth only")
330330 else {
331331 let duckGen = value(assetInfo(asset)).name
332332 let letter = takeRight(take(duckGen, 6), 1)
333333 let farmGen = (("8" + letter) + "-G")
334334 [IntegerEntry(getDuckStatsKey(duckGen), (tryGetInteger(getDuckStatsKey(duckGen)) - 1)), IntegerEntry((("stats_" + farmGen) + "_quantity"), (tryGetInteger((("stats_" + farmGen) + "_quantity")) - 1))]
335335 }
336336 }
337337
338338
339339
340340 @Callable(i)
341341 func finishDuckHatchingAdmin (txIdStr,owner) = if ((i.caller != this))
342342 then throw("IFDHA: Only admins can run this!")
343343 else finishHatchingInternal(txIdStr, owner)
344344
345345
346346 @Verifier(tx)
347347 func verify () = if (isTestEnv())
348348 then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
349349 else {
350350 let firstUser = base58'6TdaXEfhnjYquvPf3yV7MFxt2CbgFmaqsvGwkKfXtKi4'
351351 let secondUser = base58'E23yUg8eun5nXB1nZRDf7RTyRADKxQhGNXdpTYonEvtU'
352352 let thirdUser = base58'Ga8WEBTPXbHuoXRD355mQ6ms8PsM2RFYKeA1mEP32CFe'
353353 let firstUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], firstUser))
354354 then 1
355355 else if (sigVerify(tx.bodyBytes, tx.proofs[1], firstUser))
356356 then 1
357357 else if (sigVerify(tx.bodyBytes, tx.proofs[2], firstUser))
358358 then 1
359359 else 0
360360 let secondUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], secondUser))
361361 then 1
362362 else if (sigVerify(tx.bodyBytes, tx.proofs[1], secondUser))
363363 then 1
364364 else if (sigVerify(tx.bodyBytes, tx.proofs[2], secondUser))
365365 then 1
366366 else 0
367367 let thirdUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], thirdUser))
368368 then 1
369369 else if (sigVerify(tx.bodyBytes, tx.proofs[1], thirdUser))
370370 then 1
371371 else if (sigVerify(tx.bodyBytes, tx.proofs[2], thirdUser))
372372 then 1
373373 else 0
374374 let signaturesCount = ((firstUserSigned + secondUserSigned) + thirdUserSigned)
375375 match tx {
376376 case _ =>
377377 (signaturesCount >= 2)
378378 }
379379 }
380380

github/deemru/w8io/026f985 
37.99 ms