tx · CzQdFC8Jgby7TGx9RC4etUx8dAJxFEuTisYotwjC2mHr

3N4LDmQyyacXR4aj9sv9gvqDKEPr8HXSgUc:  -0.01700000 Waves

2024.10.03 14:08 [3310593] smart account 3N4LDmQyyacXR4aj9sv9gvqDKEPr8HXSgUc > SELF 0.00000000 Waves

{ "type": 13, "id": "CzQdFC8Jgby7TGx9RC4etUx8dAJxFEuTisYotwjC2mHr", "fee": 1700000, "feeAssetId": null, "timestamp": 1727953742517, "version": 2, "chainId": 84, "sender": "3N4LDmQyyacXR4aj9sv9gvqDKEPr8HXSgUc", "senderPublicKey": "sgw6jdLvT9EaXXCX3CR6vbRCHa3NhyHDAMvucr6MMuE", "proofs": [ "42UusGu6q4LnEk9nfEAs2huz3pVrDKkzcTvVByDjwaSHoPt1aRbaF2YjZqqh7ZnDT4wFtnU4mrgaS8cFUUL66C28" ], "script": "base64:BgI8CAISAwoBCBIGCgQICAgIEgMKAQgSABIAEgMKAQgSABIDCgEIEgMKAQgSBAoCCAgSAwoBCBIGCgQIAQQIOAENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAEVa2V5RHVja1BsYXlVbmxvY2tUaW1lAQdhc3NldElkCQCsAgIJAKwCAgIFZHVja18JANgEAQUHYXNzZXRJZAILX3VubG9ja1RpbWUBF2tleUR1Y2tGaW5pc2hVbmxvY2tUaW1lAQdhc3NldElkCQCsAgIJAKwCAgIFZHVja18JANgEAQUHYXNzZXRJZAIRZmluaXNoX3VubG9ja1RpbWUBDGtleUR1Y2tPd25lcgEHYXNzZXRJZAkArAICCQCsAgICBWR1Y2tfCQDYBAEFB2Fzc2V0SWQCBl9vd25lcgEOa2V5U3BvdHNCb3VnaHQBCmFkZHJlc3NTdHIJAKwCAgkArAICAghhZGRyZXNzXwUKYWRkcmVzc1N0cgIMX3Nwb3RzQm91Z2h0AQxrZXlT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YmFja2VuZCBrZXkJANgEAQkBEGdldEJhY2tlbmRQdWJLZXkAAgEgBQR0ZXh0BAx2YWxpZFBheW1lbnQJARZjaGVja0FkZGl0aW9uYWxQYXltZW50AQkAkQMCCAUBaQhwYXltZW50cwAAAwkAAAIFDHZhbGlkUGF5bWVudAUMdmFsaWRQYXltZW50CQDOCAIJAQt1bnN0YWtlRHVjawMFCmFzc2V0SWRTdHIFCmFkZHJlc3NTdHIFCmFkZHJlc3NTdHIFDHZhbGlkUGF5bWVudAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgA+YhOg", "height": 3310593, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HRBQwMVUKf3iwrXWgrEvPg1u7Pc47xXUWe9VHdgrXxHD Next: 39eRuB9TpVod3c7k271jeMmAspdFBBcZiJZxSubzdfYX Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func tryGetInteger (key) = match getInteger(this, key) {
55 case b: Int =>
66 b
77 case _ =>
88 0
99 }
1010
1111
1212 func keyDuckPlayUnlockTime (assetId) = (("duck_" + toBase58String(assetId)) + "_unlockTime")
1313
1414
1515 func keyDuckFinishUnlockTime (assetId) = (("duck_" + toBase58String(assetId)) + "finish_unlockTime")
1616
1717
1818 func keyDuckOwner (assetId) = (("duck_" + toBase58String(assetId)) + "_owner")
1919
2020
2121 func keySpotsBought (addressStr) = (("address_" + addressStr) + "_spotsBought")
2222
2323
2424 func keySpotsBusy (addressStr) = (("address_" + addressStr) + "_spotsBusy")
2525
2626
2727 func keyLockedDuckStatus (addressStr,assetIdStr) = (((("address_" + addressStr) + "_lockedDuck_") + assetIdStr) + "_status")
2828
2929
3030 func keyDuckV2 (addressStr,assetIdStr) = (((("address_" + addressStr) + "_lockedDuck_") + assetIdStr) + "_v2")
3131
3232
3333 func getDuckDetails (assetId) = {
3434 let assetName = value(value(assetInfo(assetId)).name)
3535 let assetNameParts = split(assetName, "")
3636 let isJackpot = (assetNameParts[(size(assetNameParts) - 2)] == "J")
3737 let assetColor = if (isJackpot)
3838 then "B"
3939 else assetNameParts[(size(assetNameParts) - 1)]
4040 $Tuple2(assetColor, isJackpot)
4141 }
4242
4343
4444 func tryGetStringExternal (address,key) = match getString(address, key) {
4545 case a: String =>
4646 a
4747 case _ =>
4848 ""
4949 }
5050
5151
5252 func tryGetBoolean (key) = match getBoolean(key) {
5353 case b: Boolean =>
5454 b
5555 case _ =>
5656 false
5757 }
5858
5959
6060 func tryGetString (key) = tryGetStringExternal(this, key)
6161
6262
6363 func staticKey_oracleAddress () = "static_oracleAddress"
6464
6565
6666 func staticKey_eggAssetId () = "static_eggAssetId"
6767
6868
6969 func staticKey_incubatorAddress () = "static_incubatorAddress"
7070
7171
7272 func staticKey_breederAddress () = "static_breederAddress"
7373
7474
7575 func staticKey_farmingAddress () = "static_farmingAddress"
7676
7777
7878 func staticKey_rentingAddress () = "static_rentingAddress"
7979
8080
8181 func staticKey_shortGameName () = "static_shortGameName"
8282
8383
8484 func staticKey_longGameName () = "static_longGameName"
8585
8686
8787 func staticKey_nftName () = "static_nftName"
8888
8989
9090 func staticKey_backendPubKey () = "static_backendPubKey"
9191
9292
9393 func staticKey_accessItemAssetId () = "static_accessItemAssetId"
9494
9595
9696 func staticKey_accessItemPrice () = "static_accessItemPrice"
9797
9898
9999 func staticKey_minLockDuration () = "static_minLockDuration"
100100
101101
102102 func staticKey_UnlockDuration () = "static_UnlockDuration"
103103
104104
105105 func staticKey_boosterBuyAssetId () = "static_boosterBuyAssetId"
106106
107107
108108 func staticKey_extraFee () = "static_extraFee"
109109
110110
111111 func staticKey_feeAggregator () = "static_feeAggregator"
112112
113113
114114 func staticKey_boosterPriceLevel (level) = ("static_boosterPriceLevel_" + level)
115115
116116
117117 func staticKey_boosterName (level) = ("static_boosterName_" + level)
118118
119119
120120 func staticKey_burnAddress () = "static_burnAddress"
121121
122122
123123 func getOracle () = Address(fromBase58String(tryGetString(staticKey_oracleAddress())))
124124
125125
126126 func getGameName () = valueOrErrorMessage(getString(staticKey_shortGameName()), "3GGN: There is no game name defined!")
127127
128128
129129 func getLongGameName () = valueOrErrorMessage(getString(staticKey_longGameName()), "3GLGN: There is no long game name defined!")
130130
131131
132132 func getNFTName () = valueOrErrorMessage(getString(staticKey_nftName()), "3GNN: There is no nft name defined!")
133133
134134
135135 func getIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_incubatorAddress())))
136136
137137
138138 func getBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_breederAddress())))
139139
140140
141141 func getRentingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_rentingAddress())))
142142
143143
144144 func getFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_farmingAddress())))
145145
146146
147147 func getEggAssetId () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_eggAssetId()))
148148
149149
150150 func getBackendPubKey () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_backendPubKey()))
151151
152152
153153 func getFeeAggregator () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_feeAggregator())))
154154
155155
156156 func getBurnAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_burnAddress())))
157157
158158
159159 func getAccessItemAssetId () = fromBase58String(tryGetString(staticKey_accessItemAssetId()))
160160
161161
162162 func getAccessItemPrice () = tryGetInteger(staticKey_accessItemPrice())
163163
164164
165165 func getMinLockDuration () = tryGetInteger(staticKey_minLockDuration())
166166
167167
168168 func getUnlockDuration () = tryGetInteger(staticKey_UnlockDuration())
169169
170170
171171 func getBosterBuyAssetId () = fromBase58String(tryGetString(staticKey_boosterBuyAssetId()))
172172
173173
174174 func getBosterPriceForLevel (level) = valueOrErrorMessage(getInteger(staticKey_boosterPriceLevel(toString(level))), "3GBPFL: There is no price value for this level of booster")
175175
176176
177177 func getBosterNameForLevel (level) = valueOrErrorMessage(getString(staticKey_boosterName(toString(level))), "3GBNFL: There is no such booster")
178178
179179
180180 func checkAdditionalPayment (payment) = if (isDefined(payment.assetId))
181181 then throw("RCAP: Please attach waves")
182182 else {
183183 let feeAmount = getIntegerValue(getOracle(), staticKey_extraFee())
184184 if ((payment.amount != feeAmount))
185185 then throw((("RCAP: Please attach exactly " + toString(feeAmount)) + " amount of wavelets"))
186186 else [ScriptTransfer(getFeeAggregator(), feeAmount, unit)]
187187 }
188188
189189
190190 func asString (value) = match value {
191191 case string: String =>
192192 string
193193 case _ =>
194194 throw("3AS: wrong type, expected: String")
195195 }
196196
197197
198198 func lockDuckInternal (addressStr,takeSpotsFrom,pmt) = {
199199 let assetId = value(pmt.assetId)
200200 let assetIssuer = value(assetInfo(assetId)).issuer
201201 let tDuckDetails = getDuckDetails(assetId)
202202 let assetColor = tDuckDetails._1
203203 let isJackpot = tDuckDetails._2
204204 let kSpotsBusy = keySpotsBusy(takeSpotsFrom)
205205 let spotsBusy = tryGetInteger(kSpotsBusy)
206206 let kSpotsBought = keySpotsBought(takeSpotsFrom)
207207 let addressSpotsAvailable = (tryGetInteger(kSpotsBought) - spotsBusy)
208208 if ((pmt.amount != 1))
209209 then throw("NFT is not attached")
210210 else if (if ((assetIssuer != getIncubatorAddress()))
211211 then (assetIssuer != getBreederAddress())
212212 else false)
213213 then throw("ivalid NFT attached")
214214 else if ((0 >= addressSpotsAvailable))
215215 then throw(("No spots available in hunt for: " + takeSpotsFrom))
216216 else {
217217 let kPerchesAvailable = ((("address_" + toString(this)) + "_perchesAvailable_") + assetColor)
218218 let perchesAvailable = match getInteger(getFarmingAddress(), kPerchesAvailable) {
219219 case b: Int =>
220220 b
221221 case _ =>
222222 0
223223 }
224224 if ((perchesAvailable == perchesAvailable))
225225 then {
226226 let eggAssetId = getEggAssetId()
227227 [IntegerEntry(kSpotsBusy, (spotsBusy + 1)), StringEntry(keyDuckOwner(assetId), addressStr), BooleanEntry(keyLockedDuckStatus(addressStr, toBase58String(assetId)), true), IntegerEntry(keyDuckPlayUnlockTime(assetId), (lastBlock.timestamp + getMinLockDuration())), BooleanEntry(keyDuckV2(addressStr, toBase58String(assetId)), true)]
228228 }
229229 else throw("Strict value is not equal to itself.")
230230 }
231231 }
232232
233233
234234 func initUnlockDuck (assetIdStr,addressStr) = {
235235 let assetId = fromBase58String(assetIdStr)
236236 let tDuckDetails = getDuckDetails(assetId)
237237 let assetColor = tDuckDetails._1
238238 let isJackpot = tDuckDetails._2
239239 let kSpotsBusy = keySpotsBusy(addressStr)
240240 let kDuckOwner = keyDuckOwner(assetId)
241241 let remainingForUnlock = (tryGetInteger(keyDuckPlayUnlockTime(assetId)) - lastBlock.timestamp)
242242 if ((tryGetString(kDuckOwner) != addressStr))
243243 then throw("3IULD: The duck is not yours")
244244 else if ((remainingForUnlock > 0))
245245 then throw((("3IUL: You need to wait to unlock " + toString((remainingForUnlock / 1000))) + " seconds"))
246246 else [IntegerEntry(keyDuckFinishUnlockTime(assetId), (lastBlock.timestamp + getUnlockDuration()))]
247247 }
248248
249249
250250 func unstakeDuck (assetIdStr,addressStr,addSpotsTowards) = {
251251 let assetId = fromBase58String(assetIdStr)
252252 let tDuckDetails = getDuckDetails(assetId)
253253 let assetColor = tDuckDetails._1
254254 let isJackpot = tDuckDetails._2
255255 let kSpotsBusy = keySpotsBusy(addSpotsTowards)
256256 let kDuckOwner = keyDuckOwner(assetId)
257257 let remainingForUnlock = (tryGetInteger(keyDuckFinishUnlockTime(assetId)) - lastBlock.timestamp)
258258 if ((tryGetString(kDuckOwner) != addressStr))
259259 then throw("3UD: The duck is not yours")
260260 else if ((remainingForUnlock > 0))
261261 then throw((("3UD: You need to wait to unlock " + toString((remainingForUnlock / 1000))) + " seconds"))
262262 else [ScriptTransfer(Address(fromBase58String(addressStr)), 1, assetId), DeleteEntry(keyLockedDuckStatus(addressStr, assetIdStr)), DeleteEntry(kDuckOwner), IntegerEntry(kSpotsBusy, (tryGetInteger(kSpotsBusy) - 1))]
263263 }
264264
265265
266266 @Callable(i)
267267 func buyAccessItemInternal (addressStr) = if ((i.caller != this))
268268 then throw("3BAII: internal use only")
269269 else {
270270 let issueAccessItem = Issue(("ACCESS-" + getGameName()), ((("[Access] " + getLongGameName()) + " access NFT for ") + getNFTName()), 1, 0, false)
271271 let accessRaceAssetId = toBase58String(calculateAssetId(issueAccessItem))
272272 let kSpotsBought = keySpotsBought(addressStr)
273273 $Tuple2([issueAccessItem, StringEntry((("accessItem_" + accessRaceAssetId) + "_owner"), addressStr), StringEntry((("address_" + addressStr) + "_owning"), accessRaceAssetId), IntegerEntry(kSpotsBought, (tryGetInteger(kSpotsBought) + 1))], accessRaceAssetId)
274274 }
275275
276276
277277
278278 @Callable(i)
279279 func configureOracle (oracle,shortname,longname,nftName) = if ((i.caller != this))
280280 then throw("3CO: admin only")
281281 else [StringEntry("static_oracleAddress", oracle), StringEntry("static_shortGameName", shortname), StringEntry("static_longGameName", longname), StringEntry("static_nftName", nftName)]
282282
283283
284284
285285 @Callable(i)
286286 func deleteSetting (key) = if ((i.caller != this))
287287 then throw("3DS: Only administrator can call this method")
288288 else [DeleteEntry(key)]
289289
290290
291291
292292 @Callable(i)
293293 func buyAccessItemAndLockDuck () = {
294294 let eggPayment = value(i.payments[0])
295295 let duckPayment = value(i.payments[1])
296296 let addressStr = toString(i.originCaller)
297297 if ((eggPayment.assetId != getAccessItemAssetId()))
298298 then throw("3BAI: Wrong asset attached")
299299 else if ((eggPayment.amount != getAccessItemPrice()))
300300 then throw("3BAI: Wrong amount of assets attached")
301301 else {
302302 let accessItemData = asString(invoke(this, "buyAccessItemInternal", [addressStr], nil))
303303 if ((accessItemData == accessItemData))
304304 then {
305305 let burnCall = invoke(getBurnAddress(), "burnAttachedPayments", nil, [AttachedPayment(getEggAssetId(), eggPayment.amount)])
306306 if ((burnCall == burnCall))
307307 then {
308308 let validPayment = if ((i.caller == getRentingAddress()))
309309 then nil
310310 else checkAdditionalPayment(i.payments[2])
311311 if ((validPayment == validPayment))
312312 then {
313313 let lockData = (lockDuckInternal(addressStr, addressStr, duckPayment) ++ validPayment)
314314 $Tuple2(lockData, accessItemData)
315315 }
316316 else throw("Strict value is not equal to itself.")
317317 }
318318 else throw("Strict value is not equal to itself.")
319319 }
320320 else throw("Strict value is not equal to itself.")
321321 }
322322 }
323323
324324
325325
326326 @Callable(i)
327327 func buyAccessItem () = {
328328 let addressStr = toString(i.originCaller)
329329 let eggPayment = value(i.payments[0])
330330 if ((eggPayment.assetId != getAccessItemAssetId()))
331331 then throw(("3BAI: Wrong asset attached " + toBase58String(getAccessItemAssetId())))
332332 else if ((eggPayment.amount != getAccessItemPrice()))
333333 then throw("3BAI: Wrong amount of assets attached")
334334 else {
335335 let accessItemData = asString(invoke(this, "buyAccessItemInternal", [addressStr], nil))
336336 if ((accessItemData == accessItemData))
337337 then {
338338 let burnCall = invoke(getBurnAddress(), "burnAttachedPayments", nil, [AttachedPayment(getEggAssetId(), eggPayment.amount)])
339339 if ((burnCall == burnCall))
340340 then {
341341 let validPayment = if ((i.caller == getRentingAddress()))
342342 then nil
343343 else checkAdditionalPayment(i.payments[1])
344344 if ((validPayment == validPayment))
345345 then $Tuple2(validPayment, accessItemData)
346346 else throw("Strict value is not equal to itself.")
347347 }
348348 else throw("Strict value is not equal to itself.")
349349 }
350350 else throw("Strict value is not equal to itself.")
351351 }
352352 }
353353
354354
355355
356356 @Callable(i)
357357 func buyAccessItemOther (addressOther) = {
358358 let eggPayment = value(i.payments[0])
359359 if ((eggPayment.assetId != getAccessItemAssetId()))
360360 then throw("3BAI: Wrong asset attached")
361361 else if ((eggPayment.amount != getAccessItemPrice()))
362362 then throw("3BAI: Wrong amount of assets attached")
363363 else {
364364 let accessItemData = asString(invoke(this, "buyAccessItemInternal", [addressOther], nil))
365365 if ((accessItemData == accessItemData))
366366 then {
367367 let burnCall = invoke(getBurnAddress(), "burnAttachedPayments", nil, [AttachedPayment(getEggAssetId(), eggPayment.amount)])
368368 if ((burnCall == burnCall))
369369 then $Tuple2(nil, accessItemData)
370370 else throw("Strict value is not equal to itself.")
371371 }
372372 else throw("Strict value is not equal to itself.")
373373 }
374374 }
375375
376376
377377
378378 @Callable(i)
379379 func lockDuck () = {
380380 let addressStr = toString(i.originCaller)
381381 let duckPayment = value(i.payments[0])
382382 let validPayment = checkAdditionalPayment(i.payments[1])
383383 if ((validPayment == validPayment))
384384 then (lockDuckInternal(addressStr, addressStr, duckPayment) ++ validPayment)
385385 else throw("Strict value is not equal to itself.")
386386 }
387387
388388
389389
390390 @Callable(i)
391391 func initUnlock (assetIdStr) = {
392392 let addressStr = toString(i.caller)
393393 let validPayment = checkAdditionalPayment(i.payments[0])
394394 if ((validPayment == validPayment))
395395 then (initUnlockDuck(assetIdStr, addressStr) ++ validPayment)
396396 else throw("Strict value is not equal to itself.")
397397 }
398398
399399
400400
401401 @Callable(i)
402402 func lockDuckRenting (addressTakeSpotsFrom) = if ((i.caller != getRentingAddress()))
403403 then throw("3UDO: Renting only!")
404404 else {
405405 let addressStr = toString(i.caller)
406406 let duckPayment = value(i.payments[0])
407407 lockDuckInternal(addressStr, addressTakeSpotsFrom, duckPayment)
408408 }
409409
410410
411411
412412 @Callable(i)
413413 func unlockDuckRenting (assetIdStr,addSpotsTowards) = if ((i.caller != getRentingAddress()))
414414 then throw("3UDO: Renting only!")
415415 else {
416416 let addressStr = toString(i.caller)
417417 unstakeDuck(assetIdStr, addressStr, addSpotsTowards)
418418 }
419419
420420
421421
422422 @Callable(i)
423423 func unlockDuckOther (assetIdStr) = if ((i.caller != this))
424424 then throw("3UDO: Admin only!")
425425 else {
426426 let ownerKey = tryGetString(keyDuckOwner(fromBase58String(assetIdStr)))
427427 unstakeDuck(assetIdStr, ownerKey, ownerKey)
428428 }
429429
430430
431431
432432 @Callable(i)
433433 func unlockDuck (assetIdStr,ts,allowed,signature) = if ((allowed != true))
434434 then throw("3UD: Not allowed to unlock the duck!")
435435 else {
436436 let MSINHOUR = 3600000
437437 let currentTs = lastBlock.timestamp
438438 if ((currentTs > (ts + MSINHOUR)))
439439 then throw("3UD: Outdated signature!")
440440 else {
441441 let addressStr = toString(i.caller)
442442 let text = makeString([assetIdStr, toString(ts), toString(allowed)], ";")
443443 if (!(sigVerify_8Kb(toBytes(text), fromBase58String(signature), getBackendPubKey())))
444444 then throw(((("3UD: Invalid proof from backend key" + toBase58String(getBackendPubKey())) + " ") + text))
445445 else {
446446 let validPayment = checkAdditionalPayment(i.payments[0])
447447 if ((validPayment == validPayment))
448448 then (unstakeDuck(assetIdStr, addressStr, addressStr) ++ validPayment)
449449 else throw("Strict value is not equal to itself.")
450450 }
451451 }
452452 }
453453
454454

github/deemru/w8io/026f985 
33.10 ms