tx · 9SPGBQaFBQysmYGTTy9FH8C6SS1vvA7Xyds74WvoZitx

3N42qQ7BkB2WcuDQzYPsWXipsyrtgf5RM77:  -0.01900000 Waves

2024.10.03 13:02 [3310523] smart account 3N42qQ7BkB2WcuDQzYPsWXipsyrtgf5RM77 > SELF 0.00000000 Waves

{ "type": 13, "id": "9SPGBQaFBQysmYGTTy9FH8C6SS1vvA7Xyds74WvoZitx", "fee": 1900000, "feeAssetId": null, "timestamp": 1727949770487, "version": 2, "chainId": 84, "sender": "3N42qQ7BkB2WcuDQzYPsWXipsyrtgf5RM77", "senderPublicKey": "HN1yN1QNf9gfvY9PWDHX74JTzGHSv5T97G7s4ab3hfjB", "proofs": [ "5ym5czkrLPj4EqjpTRU31M3BJwc8ms4FxnpdKWpMArKztUhPWbPz3P2hdMpxLGG1iNRa4BJnRvQPQLvTFPCZiGMS" ], "script": "base64:AAIFAAAAAAAAACMIAhIDCgEIEgUKAwgICBIECgIICBIDCgEBEgMKAQgSAwoBCAAAACMBAAAAFHRyeUdldFN0cmluZ0V4dGVybmFsAAAAAgAAAAdhZGRyZXNzAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAdhZGRyZXNzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQIAAAAAAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQkBAAAAFHRyeUdldFN0cmluZ0V4dGVybmFsAAAAAgUAAAAEdGhpcwUAAAADa2V5AQAAABdzdGF0aWNLZXlfb3JhY2xlQWRkcmVzcwAAAAACAAAAFHN0YXRpY19vcmFjbGVBZGRyZXNzAQAAABJzdGF0aWNLZXlfZXh0cmFGZWUAAAAAAgAAAA9zdGF0aWNfZXh0cmFGZWUBAAAAF3N0YXRpY0tleV9mZWVBZ2dyZWdhdG9yAAAAAAIAAAAUc3RhdGljX2ZlZUFnZ3JlZ2F0b3IBAAAAFHN0YXRpY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W50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAGc3RhdHNfBQAAAAdmYXJtR2VuAgAAAAlfcXVhbnRpdHkJAABkAAAAAgkBAAAADXRyeUdldEludGVnZXIAAAABCQABLAAAAAIJAAEsAAAAAgIAAAAGc3RhdHNfBQAAAAdmYXJtR2VuAgAAAAlfcXVhbnRpdHkAAAAAAAAAAAEJAARMAAAAAgUAAAAFYXNzZXQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyAAAAAAAAAAABBQAAAAdhc3NldElkBQAAAANuaWwFAAAAC2ZlZVZhbGlkYXRlCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5jjTkAg==", "height": 3310523, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HqH1TB7k7xAyPg4SaVvQvNy27xs8TbunyBDxXL2hCLsf Next: 5JxA5xGxSigZre316JD3xM6UURg4zhn7CiBi4ZGvDqmM Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
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_oracleAddress () = "static_oracleAddress"
1616
1717
1818 func staticKey_extraFee () = "static_extraFee"
1919
2020
2121 func staticKey_feeAggregator () = "static_feeAggregator"
2222
2323
2424 func staticKey_eggAssetId () = "static_eggAssetId"
2525
2626
2727 func staticKey_refContractAddress () = "static_refContractAddress"
2828
2929
3030 func staticKey_turtleRebirthAddress () = "static_turtleRebirthAddress"
3131
3232
3333 func staticKey_canisRebirthAddress () = "static_canineRebirthAddress"
3434
3535
3636 func staticKey_felineRebirthAddress () = "static_felineRebirthAddress"
3737
3838
3939 func getOracle () = Address(fromBase58String(tryGetString(staticKey_oracleAddress())))
4040
4141
4242 func getFeeAggregator () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_feeAggregator())))
4343
4444
4545 func getEggAssetId () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_eggAssetId()))
4646
4747
4848 func getBurnAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_burnAddress")))
4949
5050
5151 func getRefContractAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_refContractAddress())))
5252
5353
5454 func getTurtleRebirthAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleRebirthAddress())))
5555
5656
5757 func getCanisRebirthAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_canisRebirthAddress())))
5858
5959
6060 func getFelineRebirthAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_felineRebirthAddress())))
6161
6262
6363 func checkAdditionalPayment (payment) = if (isDefined(payment.assetId))
6464 then throw("BDCAP: Please attach waves")
6565 else {
6666 let feeAmount = getIntegerValue(getOracle(), staticKey_extraFee())
6767 if ((payment.amount != feeAmount))
6868 then throw((("BDCAP: Please attach exactly " + toString(feeAmount)) + " amount of wavelets"))
6969 else [ScriptTransfer(getFeeAggregator(), feeAmount, unit)]
7070 }
7171
7272
7373 let delayForHatching = 2
7474
7575 let HatchingStarted = "HATCHING_STARTED"
7676
7777 let HatchingFinished = "HATCHING_FINISHED"
7878
7979 func isLocked () = {
8080 let masterAddress = Address(base58'3PEPftf2kWZDmAaWBjs6BUJa9957kiA2PkU')
8181 match getInteger(masterAddress, "egglock") {
8282 case b: Int =>
8383 b
8484 case _ =>
8585 0
8686 }
8787 }
8888
8989
9090 func getHatchingStatusKey (address,txId) = (((address + "_") + toBase58String(txId)) + "_status")
9191
9292
9393 func getHatchingFinishHeightKey (address,txId) = (((address + "_") + toBase58String(txId)) + "_fh")
9494
9595
9696 func getTRTLIdKey (address,txId) = (((address + "_") + toBase58String(txId)) + "_di")
9797
9898
9999 func getTRTLStatsKey (genString) = (("stats_" + genString) + "_amount")
100100
101101
102102 func tryGetInteger (key) = {
103103 let val = match getInteger(this, key) {
104104 case b: Int =>
105105 b
106106 case _ =>
107107 0
108108 }
109109 val
110110 }
111111
112112
113113 let discountCoefficient = tryGetInteger("discountCoefficient")
114114
115115 func getRandomNumber (variants,txId,hatchingFinishHeight,offset) = {
116116 let randomSeedBlock = value(blockInfoByHeight((hatchingFinishHeight - 1)))
117117 let randomHash = sha256((txId + value(randomSeedBlock.vrf)))
118118 (toInt(randomHash, (offset * 8)) % variants)
119119 }
120120
121121
122122 func select (color) = {
123123 let oldGenes = [$Tuple2(("TRTL-AAAAAAAA-G" + color), "8A-G"), $Tuple2(("TRTL-BBBBBBBB-G" + color), "8B-G"), $Tuple2(("TRTL-CCCCCCCC-G" + color), "8C-G"), $Tuple2(("TRTL-DDDDDDDD-G" + color), "8D-G")]
124124 let newGenes = [$Tuple2(("TRTL-EEEEEEEE-G" + color), "8E-G"), $Tuple2(("TRTL-FFFFFFFF-G" + color), "8F-G"), $Tuple2(("TRTL-GGGGGGGG-G" + color), "8G-G"), $Tuple2(("TRTL-HHHHHHHH-G" + color), "8H-G")]
125125 $Tuple2((oldGenes ++ newGenes), newGenes)
126126 }
127127
128128
129129 func getRandomName (txId,hatchingFinishHeight,all) = {
130130 let colorRandom = getRandomNumber(4, txId, hatchingFinishHeight, 1)
131131 let color = ["R", "D", "S", "G"][colorRandom]
132132 let colorSelect = select(color)
133133 let toPickFrom = if (all)
134134 then colorSelect._1
135135 else colorSelect._2
136136 let typeRandom = getRandomNumber(size(toPickFrom), txId, hatchingFinishHeight, 0)
137137 toPickFrom[typeRandom]
138138 }
139139
140140
141141 let typesAmount = (size(select("R")._1) - 1)
142142
143143 func countEggsNeededAmount (totalTRTLsAmount) = {
144144 let n = totalTRTLsAmount
145145 let g = discountCoefficient
146146 let t = typesAmount
147147 let price = pow((100 + ((n * g) / (10 * t))), 2, 5, 1, 2, DOWN)
148148 (price * 1500000)
149149 }
150150
151151
152152 func asBoolean (value) = match value {
153153 case boolean: Boolean =>
154154 boolean
155155 case _ =>
156156 throw("TI: wrong type, expected: Boolean")
157157 }
158158
159159
160160 @Callable(i)
161161 func configureOracle (oracle) = if ((i.caller != this))
162162 then throw("ICU: admin only")
163163 else [StringEntry("static_oracleAddress", oracle)]
164164
165165
166166
167167 @Callable(i)
168168 func issueJackpot (address,txIdStr,gen) = if (if ((i.caller != getTurtleRebirthAddress()))
169169 then (i.caller != this)
170170 else false)
171171 then throw("ISJ: admin or rebirth only")
172172 else {
173173 let txId = fromBase58String(txIdStr)
174174 let hatchingStatusKey = getHatchingStatusKey(address, txId)
175175 let finishHeightKey = getHatchingFinishHeightKey(address, txId)
176176 let totalDucksAmount = tryGetInteger("turtle_amount")
177177 let eggsNeeded = countEggsNeededAmount(totalDucksAmount)
178178 let $t057805832 = $Tuple2((("TRTL-" + gen) + "-JU"), "8W-J")
179179 let duckGen = $t057805832._1
180180 let farmGen = $t057805832._2
181181 let description = (("{\"genotype\": \"" + duckGen) + "\", \"crossbreeding\": true}")
182182 let asset = Issue(duckGen, description, 1, 0, false, unit, height)
183183 let assetId = calculateAssetId(asset)
184184 let duckIdKey = getTRTLIdKey(address, txId)
185185 let valueDuckIdKeyExits = tryGetString(duckIdKey)
186186 if ((valueDuckIdKeyExits != ""))
187187 then throw((("ISJ: You will override following duckId :" + duckIdKey) + " make sure that your txId is unique!"))
188188 else $Tuple2([IntegerEntry(getHatchingFinishHeightKey(address, txId), height), IntegerEntry("turtle_amount", (totalDucksAmount + 1)), IntegerEntry("turtle_last_price", (eggsNeeded / 1000000)), StringEntry(hatchingStatusKey, HatchingFinished), StringEntry(duckIdKey, toBase58String(assetId)), StringEntry(toBase58String(assetId), duckIdKey), IntegerEntry(getTRTLStatsKey(duckGen), (tryGetInteger(getTRTLStatsKey(duckGen)) + 1)), IntegerEntry((("stats_" + farmGen) + "_quantity"), (tryGetInteger((("stats_" + farmGen) + "_quantity")) + 1)), asset, ScriptTransfer(value(addressFromString(address)), 1, assetId)], toBase58String(assetId))
189189 }
190190
191191
192192
193193 @Callable(i)
194194 func issueFreeTurtle (address,txIdStr) = if (if (if ((i.caller != getTurtleRebirthAddress()))
195195 then (i.caller != getCanisRebirthAddress())
196196 else false)
197197 then (i.caller != getFelineRebirthAddress())
198198 else false)
199199 then throw("TISFT: rebirth only")
200200 else {
201201 let txId = fromBase58String(txIdStr)
202202 let hatchingStatusKey = getHatchingStatusKey(address, txId)
203203 let finishHeightKey = getHatchingFinishHeightKey(address, txId)
204204 let totalDucksAmount = tryGetInteger("turtle_amount")
205205 let eggsNeeded = countEggsNeededAmount(totalDucksAmount)
206206 let $t075117659 = getRandomName(txId, (valueOrErrorMessage(transactionHeightById(txId), ((txIdStr + " not found ") + toBase58String(txId))) + 1), true)
207207 let TRTLGen = $t075117659._1
208208 let farmGen = $t075117659._2
209209 let description = (("{\"genotype\": \"" + TRTLGen) + "\", \"crossbreeding\": true}")
210210 let asset = Issue(TRTLGen, description, 1, 0, false, unit, height)
211211 let assetId = calculateAssetId(asset)
212212 let amount = (tryGetInteger(getTRTLStatsKey(TRTLGen)) + 1)
213213 let duckIdKey = getTRTLIdKey(address, txId)
214214 $Tuple2([IntegerEntry(getHatchingFinishHeightKey(address, txId), height), IntegerEntry("turtle_amount", (totalDucksAmount + 1)), IntegerEntry("turtle_last_price", (eggsNeeded / 1500000)), StringEntry(hatchingStatusKey, HatchingFinished), StringEntry(duckIdKey, toBase58String(assetId)), StringEntry(toBase58String(assetId), duckIdKey), IntegerEntry(getTRTLStatsKey(TRTLGen), amount), IntegerEntry((("stats_" + farmGen) + "_quantity"), (tryGetInteger((("stats_" + farmGen) + "_quantity")) + 1)), asset, ScriptTransfer(value(addressFromString(address)), 1, assetId)], toBase58String(assetId))
215215 }
216216
217217
218218
219219 @Callable(i)
220220 func setDiscount (val) = if ((i.caller != this))
221221 then throw("admin_only")
222222 else [IntegerEntry("discountCoefficient", val)]
223223
224224
225225
226226 @Callable(i)
227227 func startTRTLHatching (refererAddress) = {
228228 let feeValidate = checkAdditionalPayment(i.payments[0])
229229 if ((feeValidate == feeValidate))
230230 then if ((isLocked() > 0))
231231 then throw("EGG operations are temporarily locked")
232232 else {
233233 let totalTurtleAmount = tryGetInteger("turtle_amount")
234234 let eggsNeeded = countEggsNeededAmount(totalTurtleAmount)
235235 let results = [StringEntry(getHatchingStatusKey(toString(i.originCaller), i.transactionId), HatchingStarted), IntegerEntry(getHatchingFinishHeightKey(toString(i.originCaller), i.transactionId), (height + delayForHatching)), IntegerEntry("turtle_amount", (totalTurtleAmount + 1)), IntegerEntry("turtle_last_price", (eggsNeeded / 1500000))]
236236 let leftToPay = eggsNeeded
237237 let payment = if ((leftToPay != 0))
238238 then {
239239 let firstPayment = value(i.payments[1])
240240 if ((firstPayment.assetId != getEggAssetId()))
241241 then throw(("TI: You can attach only EGG tokens with the following asset id: " + toBase58String(getEggAssetId())))
242242 else if ((leftToPay > firstPayment.amount))
243243 then throw(((("TI: To buy a beach you currently need the following amount of EGGlets: " + toString(leftToPay)) + " ") + toString(i.caller)))
244244 else {
245245 let refererRewardForbeach = fraction(leftToPay, 5, 100)
246246 let refCall = asBoolean(invoke(getRefContractAddress(), "refPayment", [refererAddress], [AttachedPayment(getEggAssetId(), refererRewardForbeach)]))
247247 if ((refCall == refCall))
248248 then {
249249 let toBurn = if (refCall)
250250 then (leftToPay - refererRewardForbeach)
251251 else leftToPay
252252 let burnCall = invoke(getBurnAddress(), "burnAttachedPayments", nil, [AttachedPayment(getEggAssetId(), toBurn)])
253253 if ((burnCall == burnCall))
254254 then leftToPay
255255 else throw("Strict value is not equal to itself.")
256256 }
257257 else throw("Strict value is not equal to itself.")
258258 }
259259 }
260260 else 0
261261 if ((payment == payment))
262262 then {
263263 let refund = if ((size(i.payments) == 2))
264264 then [ScriptTransfer(i.caller, (i.payments[1].amount - leftToPay), getEggAssetId())]
265265 else nil
266266 ((results ++ refund) ++ feeValidate)
267267 }
268268 else throw("Strict value is not equal to itself.")
269269 }
270270 else throw("Strict value is not equal to itself.")
271271 }
272272
273273
274274
275275 @Callable(i)
276276 func finishTRTLHatching (txIdStr) = {
277277 let feeValidate = checkAdditionalPayment(i.payments[0])
278278 if ((feeValidate == feeValidate))
279279 then {
280280 let txId = fromBase58String(txIdStr)
281281 let hatchingStatusKey = getHatchingStatusKey(toString(i.caller), txId)
282282 let finishHeightKey = getHatchingFinishHeightKey(toString(i.caller), txId)
283283 let TRTLIdKey = getTRTLIdKey(toString(i.caller), txId)
284284 let hatchingTxStatus = getStringValue(this, hatchingStatusKey)
285285 let hatchingFinishHeight = getIntegerValue(this, finishHeightKey)
286286 if ((hatchingTxStatus == HatchingFinished))
287287 then {
288288 let TRTLId = getStringValue(this, getTRTLIdKey(toString(i.caller), txId))
289289 throw(("The Turtle was hatched and claimed already, here is the folowing: " + TRTLId))
290290 }
291291 else if ((hatchingFinishHeight > height))
292292 then throw((((("Hatching is not finished yet " + toString((hatchingFinishHeight - height))) + " blocks remaining, it will take around ") + toString((hatchingFinishHeight - height))) + " minutes"))
293293 else {
294294 let $t01175611829 = getRandomName(txId, hatchingFinishHeight, false)
295295 let TRTLGen = $t01175611829._1
296296 let farmGen = $t01175611829._2
297297 let description = (("{\"genotype\": \"" + TRTLGen) + "\", \"crossbreeding\": true}")
298298 let asset = Issue(TRTLGen, description, 1, 0, false, unit, hatchingFinishHeight)
299299 let assetId = calculateAssetId(asset)
300300 let amount = (tryGetInteger(getTRTLStatsKey(TRTLGen)) + 1)
301301 ([StringEntry(hatchingStatusKey, HatchingFinished), StringEntry(TRTLIdKey, toBase58String(assetId)), StringEntry(toBase58String(assetId), TRTLIdKey), IntegerEntry(getTRTLStatsKey(TRTLGen), amount), IntegerEntry((("stats_" + farmGen) + "_quantity"), (tryGetInteger((("stats_" + farmGen) + "_quantity")) + 1)), asset, ScriptTransfer(i.caller, 1, assetId)] ++ feeValidate)
302302 }
303303 }
304304 else throw("Strict value is not equal to itself.")
305305 }
306306
307307
308308 @Verifier(tx)
309309 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
310310

github/deemru/w8io/026f985 
32.52 ms