tx · A8cJVJWaQKwAxd4vujfAewoobad9cUH9QD22x2YBGzyV

3Mr1kq2Xf6MTBbXFoxF2giBr5DWjc1RZm9S:  -0.01600000 Waves

2024.10.03 15:19 [3310662] smart account 3Mr1kq2Xf6MTBbXFoxF2giBr5DWjc1RZm9S > SELF 0.00000000 Waves

{ "type": 13, "id": "A8cJVJWaQKwAxd4vujfAewoobad9cUH9QD22x2YBGzyV", "fee": 1600000, "feeAssetId": null, "timestamp": 1727958006639, "version": 2, "chainId": 84, "sender": "3Mr1kq2Xf6MTBbXFoxF2giBr5DWjc1RZm9S", "senderPublicKey": "6VfcgiUzfgdxbMEsGa5ZZ1vN8wDQxPGb4kUz8Kron4Pt", "proofs": [ "3gD1DKNSTX2mvF4W1PghXBi7CNx6Zk9yFE4XRJbqDdBHJJPkTENAY39NcHBvaPSz2qmQxb2sVuQDJfRH7Cxvpe9z" ], "script": "base64:BgIuCAISBAoCAQESBAoCAQESBAoCCAgSBAoCGAgSAwoBCBIDCgEIEgMKAQgSAwoBCCUBF3N0YXRpY0tleV9vcmFjbGVBZGRyZXNzAAIUc3RhdGljX29yYWNsZUFkZHJlc3MBFXN0YXRpY0tleV9odW50QWRkcmVzcwACEnN0YXRpY19odW50QWRkcmVzcwEYc3RhdGljS2V5X2JyZWVkZXJBZGRyZXNzAAIVc3RhdGljX2JyZWVkZXJBZGRyZXNzARRzdGF0aWNLZXlfZWdnQXNzZXRJZAACEXN0YXRpY19lZ2dBc3NldElkARdzdGF0aWNLZXlfbWluUGVyY2VudGFnZQACFHN0YXRpY19taW5QZXJjZW50YWdlARdzdGF0aWNLZXlfbWF4UGVyY2VudGFnZQACFHN0YXRpY19tYXhQZXJjZW50YWdlARtzdGF0aWNLZXlfYWNjZXNzSXRlbUFzc2V0SWQAAhhzdGF0aWNfYWNjZXNzSXRlbUFzc2V0SWQBGXN0YXRpY0tleV9hY2Nlc3NJdGVtUHJpY2UAAhZzdGF0aWNfYWNjZXNzSXRlbVByaWNlARZzdGF0a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RW50cnkCCQEac3RhdGljS2V5X3JlbnRTbG90c0dlbmVyYWwAAAUFA25pbABZ998O", "height": 3310662, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 1Mz7mwzezs2d338Rz2xSKHzeTQouTYDtwBNRdU2jdgP Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func staticKey_oracleAddress () = "static_oracleAddress"
55
66
77 func staticKey_huntAddress () = "static_huntAddress"
88
99
1010 func staticKey_breederAddress () = "static_breederAddress"
1111
1212
1313 func staticKey_eggAssetId () = "static_eggAssetId"
1414
1515
1616 func staticKey_minPercentage () = "static_minPercentage"
1717
1818
1919 func staticKey_maxPercentage () = "static_maxPercentage"
2020
2121
2222 func staticKey_accessItemAssetId () = "static_accessItemAssetId"
2323
2424
2525 func staticKey_accessItemPrice () = "static_accessItemPrice"
2626
2727
2828 func staticKey_depositSteps () = "static_depositSteps"
2929
3030
3131 func staticKey_rentSlotsGeneral () = "static_rentSlots"
3232
3333
3434 func key_getDuckOwner (duck) = (("duck_" + duck) + "_owner")
3535
3636
3737 func key_getDuckStatus (duck) = (("duck_" + duck) + "_status")
3838
3939
4040 func key_getDuckRentedBy (duck) = (("duck_" + duck) + "_rentedBy")
4141
4242
4343 func key_getDuckDuration (duck) = (("duck_" + duck) + "_duration")
4444
4545
4646 func key_getDuckRentstart (duck) = (("duck_" + duck) + "_start_ts")
4747
4848
4949 func key_getDuckPercentage (duck) = (("duck_" + duck) + "_percentage")
5050
5151
5252 func key_getDuckLastPaid (duck) = (("duck_" + duck) + "_lastPaid")
5353
5454
5555 func key_getTotalRented (user) = (("rented_" + user) + "_amount")
5656
5757
5858 func key_getTotalBoughtExtraSpots (user) = (("spots_" + user) + "_amount")
5959
6060
6161 func key_getRefundableFee (user,duck) = (((("refund_" + user) + "_") + duck) + "_amount")
6262
6363
6464 func key_gamePreFundedItemForDuck (duck) = ("access_funded_" + duck)
6565
6666
6767 func key_spotsBought (addressStr) = (("address_" + addressStr) + "_spotsBought")
6868
6969
7070 func key_spotsBusy (addressStr) = (("address_" + addressStr) + "_spotsBusy")
7171
7272
7373 func tryGetStringExternal (address,key) = match getString(address, key) {
7474 case a: String =>
7575 a
7676 case _ =>
7777 ""
7878 }
7979
8080
8181 func tryGetString (key) = tryGetStringExternal(this, key)
8282
8383
8484 func tryGetIntegerExternal (address,key) = match getInteger(address, key) {
8585 case b: Int =>
8686 b
8787 case _ =>
8888 0
8989 }
9090
9191
9292 func tryGetInteger (key) = tryGetIntegerExternal(this, key)
9393
9494
9595 func asInt (value) = match value {
9696 case int: Int =>
9797 int
9898 case _ =>
9999 throw("RAI: wrong type, expected: Int")
100100 }
101101
102102
103103 let Generations = ["G", "H", "I", "K", "L", "M", "N", "O"]
104104
105105 func getOracle () = Address(fromBase58String(tryGetString(staticKey_oracleAddress())))
106106
107107
108108 func getHuntAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_huntAddress())))
109109
110110
111111 func getBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_breederAddress())))
112112
113113
114114 func getEggAssetId () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_eggAssetId()))
115115
116116
117117 func getAccessItemAssetId () = fromBase58String(tryGetStringExternal(getHuntAddress(), staticKey_accessItemAssetId()))
118118
119119
120120 func getAccessItemPrice () = tryGetIntegerExternal(getHuntAddress(), staticKey_accessItemPrice())
121121
122122
123123 func putForRentInternal (i,durationInMs,percentage) = {
124124 let firstPayment = value(i.payments[0])
125125 let duckId = toBase58String(value(firstPayment.assetId))
126126 if ((firstPayment.amount != 1))
127127 then throw("RPFR: NFT is not attached")
128128 else {
129129 let children = asInt(invoke(getBreederAddress(), "validateAndGetChildren", [duckId], nil))
130130 if ((children == children))
131131 then {
132132 let boughtSpots = tryGetIntegerExternal(getHuntAddress(), key_spotsBought(toString(i.caller)))
133133 let busySpots = tryGetIntegerExternal(getHuntAddress(), key_spotsBusy(toString(i.caller)))
134134 if ((busySpots >= boughtSpots))
135135 then throw(((((((("RPFR: No free spots! " + toString(busySpots)) + " ") + toString(boughtSpots)) + " ") + toString(i.caller)) + " ") + toString(getHuntAddress())))
136136 else if (if ((percentage > getIntegerValue(this, staticKey_maxPercentage())))
137137 then true
138138 else (getIntegerValue(this, staticKey_minPercentage()) > percentage))
139139 then throw((((("RPFR: please pick a percentage between " + staticKey_minPercentage()) + " and ") + staticKey_maxPercentage()) + "%"))
140140 else [IntegerEntry(key_getDuckPercentage(duckId), percentage), IntegerEntry(key_getDuckDuration(duckId), durationInMs), StringEntry(key_getDuckOwner(duckId), toString(i.caller)), StringEntry(key_getDuckStatus(duckId), "IDLE")]
141141 }
142142 else throw("Strict value is not equal to itself.")
143143 }
144144 }
145145
146146
147147 func tryGetBoolean (key) = match getBoolean(key) {
148148 case b: Boolean =>
149149 b
150150 case _ =>
151151 false
152152 }
153153
154154
155155 @Callable(i)
156156 func putForRent (durationInMs,percentage) = putForRentInternal(i, durationInMs, percentage)
157157
158158
159159
160160 @Callable(i)
161161 func buyGlassesAndPutForRent (durationInMs,percentage) = {
162162 let buyGlasses = invoke(getHuntAddress(), "buyAccessItem", nil, [i.payments[1]])
163163 if ((buyGlasses == buyGlasses))
164164 then putForRentInternal(i, durationInMs, percentage)
165165 else throw("Strict value is not equal to itself.")
166166 }
167167
168168
169169
170170 @Callable(i)
171171 func rentDuckFromUser (duckId,game) = {
172172 let genes = split(value(assetInfo(fromBase58String(duckId))).name, "")
173173 let generation = genes[14]
174174 let multiplier = if ((generation == "J"))
175175 then 8
176176 else (value(indexOf(Generations, generation)) + 1)
177177 let fee = (multiplier * getIntegerValue(staticKey_depositSteps()))
178178 let pmt = value(i.payments[0])
179179 if ((value(pmt.assetId) != getEggAssetId()))
180180 then throw("TBT: Please attach the correct payment!")
181181 else if ((pmt.amount != fee))
182182 then throw("RRDFU: Please attach enough refundable deposits!")
183183 else {
184184 let duckStatus = tryGetString(key_getDuckStatus(duckId))
185185 if ((duckStatus != "IDLE"))
186186 then throw(("RRDFU: You can only rent ducks with IDLE status. Current status: " + duckStatus))
187187 else {
188188 let duckOwner = tryGetString(key_getDuckOwner(duckId))
189189 let boughtSpots = tryGetIntegerExternal(getHuntAddress(), key_spotsBought(duckOwner))
190190 let busySpots = tryGetIntegerExternal(getHuntAddress(), key_spotsBusy(duckOwner))
191191 let buySpotIfNeeded = if ((boughtSpots == busySpots))
192192 then {
193193 let call = invoke(getHuntAddress(), "buyAccessItemOther", [duckOwner], [AttachedPayment(fromBase58String(tryGetStringExternal(getHuntAddress(), staticKey_accessItemAssetId())), getIntegerValue(getHuntAddress(), staticKey_accessItemPrice()))])
194194 if ((call == call))
195195 then [BooleanEntry(key_gamePreFundedItemForDuck(duckId), true)]
196196 else throw("Strict value is not equal to itself.")
197197 }
198198 else nil
199199 if ((buySpotIfNeeded == buySpotIfNeeded))
200200 then if ((game != "HUNT"))
201201 then throw("RRDFU: Unsupported game!")
202202 else {
203203 let startTs = lastBlock.timestamp
204204 let sendToHuntData = invoke(getHuntAddress(), "lockDuckRenting", [duckOwner], [AttachedPayment(fromBase58String(duckId), 1)])
205205 if ((sendToHuntData == sendToHuntData))
206206 then {
207207 let amountRentedKey = key_getTotalRented(toString(i.caller))
208208 let boughtKey = key_getTotalBoughtExtraSpots(toString(i.caller))
209209 let newAmountRented = (tryGetInteger(amountRentedKey) + 1)
210210 let totalSpots = (tryGetInteger(boughtKey) + getIntegerValue(this, staticKey_rentSlotsGeneral()))
211211 if ((newAmountRented > totalSpots))
212212 then throw(("RRDFU: You already rented max amount of ducks! " + toString(totalSpots)))
213213 else ([IntegerEntry(key_getDuckRentstart(duckId), startTs), IntegerEntry(key_getRefundableFee(toString(i.caller), duckId), fee), IntegerEntry(amountRentedKey, newAmountRented), StringEntry(key_getDuckStatus(duckId), "RENTED"), StringEntry(key_getDuckRentedBy(duckId), toString(i.caller))] ++ buySpotIfNeeded)
214214 }
215215 else throw("Strict value is not equal to itself.")
216216 }
217217 else throw("Strict value is not equal to itself.")
218218 }
219219 }
220220 }
221221
222222
223223
224224 @Callable(i)
225225 func topUpRewards (duckIdAndAmountsList,assetId) = {
226226 func handleTopUp (acc,userAndAmount) = {
227227 let splitArray = split(userAndAmount, ":")
228228 let user = splitArray[0]
229229 let amount = parseIntValue(splitArray[1])
230230 let duckId = splitArray[2]
231231 [ScriptTransfer(addressFromStringValue(user), (amount * 100000), fromBase58String(assetId)), IntegerEntry(key_getDuckLastPaid(duckId), lastBlock.timestamp)]
232232 }
233233
234234 let $l = duckIdAndAmountsList
235235 let $s = size($l)
236236 let $acc0 = nil
237237 func $f0_1 ($a,$i) = if (($i >= $s))
238238 then $a
239239 else handleTopUp($a, $l[$i])
240240
241241 func $f0_2 ($a,$i) = if (($i >= $s))
242242 then $a
243243 else throw("List size exceeds 15")
244244
245245 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
246246 }
247247
248248
249249
250250 @Callable(i)
251251 func claimDuckBack (duckId) = {
252252 let duckOwner = tryGetString(key_getDuckOwner(duckId))
253253 if ((duckOwner != toString(i.caller)))
254254 then throw("RCDB: Please don't try to steal someone else duck!")
255255 else if (if (tryGetBoolean(key_gamePreFundedItemForDuck(duckId)))
256256 then if (if ((size(i.payments) != 1))
257257 then true
258258 else (i.payments[0].assetId != fromBase58String(tryGetStringExternal(getHuntAddress(), staticKey_accessItemAssetId()))))
259259 then true
260260 else (i.payments[0].amount != getIntegerValue(getHuntAddress(), staticKey_accessItemPrice()))
261261 else false)
262262 then throw(("Please make sure to attach enough funds to pay for your previous spot! " + toString(i.payments[0].amount)))
263263 else {
264264 let duckStatus = tryGetString(key_getDuckStatus(duckId))
265265 if ((duckStatus == "IDLE"))
266266 then [ScriptTransfer(i.caller, 1, fromBase58String(duckId)), DeleteEntry(key_getDuckStatus(duckId)), DeleteEntry(key_gamePreFundedItemForDuck(duckId))]
267267 else {
268268 let startTs = tryGetInteger(key_getDuckRentstart(duckId))
269269 if ((lastBlock.timestamp > (startTs + tryGetInteger(key_getDuckDuration(duckId)))))
270270 then {
271271 let player = tryGetString(key_getDuckRentedBy(duckId))
272272 let removeFromHunt = invoke(getHuntAddress(), "unlockDuckRenting", [duckId, duckOwner], nil)
273273 if ((removeFromHunt == removeFromHunt))
274274 then {
275275 let amountRentedKey = key_getTotalRented(player)
276276 let newAmountRented = (getIntegerValue(this, amountRentedKey) - 1)
277277 let refundFeeKey = key_getRefundableFee(player, duckId)
278278 [IntegerEntry(amountRentedKey, newAmountRented), ScriptTransfer(addressFromStringValue(player), tryGetInteger(refundFeeKey), getEggAssetId()), DeleteEntry(refundFeeKey), ScriptTransfer(addressFromStringValue(duckOwner), 1, fromBase58String(duckId)), DeleteEntry(key_getDuckStatus(duckId)), DeleteEntry(key_getDuckRentedBy(duckId)), DeleteEntry(key_gamePreFundedItemForDuck(duckId))]
279279 }
280280 else throw("Strict value is not equal to itself.")
281281 }
282282 else {
283283 let lastPayment = tryGetInteger(key_getDuckLastPaid(duckId))
284284 let threeDaysInMs = (((3 * 24) * 60) * 1000)
285285 if ((lastBlock.height > (lastPayment + threeDaysInMs)))
286286 then {
287287 let player = tryGetString(key_getDuckRentedBy(duckId))
288288 let unstake = invoke(getHuntAddress(), "unlockDuckRenting", [duckId, duckOwner], nil)
289289 if ((unstake == unstake))
290290 then {
291291 let amountRentedKey = key_getTotalRented(player)
292292 let newAmountRented = (getIntegerValue(this, amountRentedKey) - 1)
293293 [IntegerEntry(amountRentedKey, newAmountRented), ScriptTransfer(addressFromStringValue(duckOwner), 1, fromBase58String(duckId)), DeleteEntry(key_getDuckStatus(duckId)), DeleteEntry(key_getDuckRentedBy(duckId)), DeleteEntry(key_gamePreFundedItemForDuck(duckId))]
294294 }
295295 else throw("Strict value is not equal to itself.")
296296 }
297297 else throw("RCDB: Renting period is not over and player is active!")
298298 }
299299 }
300300 }
301301 }
302302
303303
304304
305305 @Callable(i)
306306 func sendDuckBack (duckId) = {
307307 let rentedBy = tryGetString(key_getDuckRentedBy(duckId))
308308 if ((rentedBy != toString(i.caller)))
309309 then throw("RSDB: You didn't rent this duck!")
310310 else {
311311 let duckOwner = tryGetString(key_getDuckOwner(duckId))
312312 let refundFeeKey = key_getRefundableFee(toString(i.caller), duckId)
313313 let amountRentedKey = key_getTotalRented(toString(i.caller))
314314 let newAmountRented = (getIntegerValue(this, amountRentedKey) - 1)
315315 let removeFromHunt = invoke(getHuntAddress(), "unlockDuckRenting", [duckId, duckOwner], nil)
316316 if ((removeFromHunt == removeFromHunt))
317317 then [ScriptTransfer(i.caller, tryGetInteger(refundFeeKey), getEggAssetId()), DeleteEntry(refundFeeKey), StringEntry(key_getDuckStatus(duckId), "IDLE"), DeleteEntry(key_getDuckRentedBy(duckId)), IntegerEntry(amountRentedKey, newAmountRented)]
318318 else throw("Strict value is not equal to itself.")
319319 }
320320 }
321321
322322
323323
324324 @Callable(i)
325325 func sendDuckBackOther (duckId) = if ((i.caller != this))
326326 then throw("RUO: admin only")
327327 else {
328328 let rentedBy = tryGetString(key_getDuckRentedBy(duckId))
329329 let duckOwner = tryGetString(key_getDuckOwner(duckId))
330330 let refundFeeKey = key_getRefundableFee(rentedBy, duckId)
331331 let amountRentedKey = key_getTotalRented(rentedBy)
332332 let newAmountRented = (getIntegerValue(this, amountRentedKey) - 1)
333333 [ScriptTransfer(addressFromStringValue(rentedBy), tryGetInteger(refundFeeKey), getEggAssetId()), DeleteEntry(refundFeeKey), StringEntry(key_getDuckStatus(duckId), "IDLE"), DeleteEntry(key_getDuckRentedBy(duckId)), IntegerEntry(amountRentedKey, newAmountRented)]
334334 }
335335
336336
337337
338338 @Callable(i)
339339 func configureOracle (oracle) = if ((i.caller != this))
340340 then throw("RCO: admin only")
341341 else [StringEntry(staticKey_oracleAddress(), oracle), IntegerEntry(staticKey_minPercentage(), 5), IntegerEntry(staticKey_maxPercentage(), 80), IntegerEntry(staticKey_depositSteps(), 50000000), IntegerEntry(staticKey_rentSlotsGeneral(), 5)]
342342
343343

github/deemru/w8io/026f985 
38.28 ms