tx · HPAhB4UqYkF3VhEhQECaCuhmiEjN8k8LhJAfg4RhvPtA

3MwFCBSWkWf9JMqmRyN5WEdoF2MCEPUB1Jx:  -0.01600000 Waves

2024.11.09 18:42 [3364107] smart account 3MwFCBSWkWf9JMqmRyN5WEdoF2MCEPUB1Jx > SELF 0.00000000 Waves

{ "type": 13, "id": "HPAhB4UqYkF3VhEhQECaCuhmiEjN8k8LhJAfg4RhvPtA", "fee": 1600000, "feeAssetId": null, "timestamp": 1731166965368, "version": 2, "chainId": 84, "sender": "3MwFCBSWkWf9JMqmRyN5WEdoF2MCEPUB1Jx", "senderPublicKey": "BVdzAdt4eF9ScXGp5dwKiwoMQXBwMDeVSxLhL4LT1ceu", "proofs": [ "29cQQChUe45dH8jkTHBfrAyiQ4CGB1BzbKCMd37XZ89YzGC2Li5NWGwKVLR6m836Vj4PLj3P8dndNo6SpE16F4Di" ], "script": "base64:BgIyCAISAwoBCBIECgIIARIDCgEIEgQKAggBEgMKAQgSBAoCCAESAwoBARIDCgEIEgMKAQg6AQlpc1Rlc3RFbnYABAd0ZXN0ZW52BAckbWF0Y2gwCQCbCAIFBHRoaXMCB1RFU1RFTlYDCQABAgUHJG1hdGNoMAIHQm9vbGVhbgQBeAUHJG1hdGNoMAUBeAcFB3Rlc3RlbnYBFHRyeUdldFN0cmluZ0V4dGVybmFsAgdhZGRyZXNzA2tleQQHJG1hdGNoMAkAnQgCBQdhZGRyZXNzBQNrZXkDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAFhBQckbWF0Y2gwBQFhAgABDXRyeUdldEJvb2xlYW4BA2tleQQHJG1hdGNoMAkAoAgBBQNrZXkDCQABAgUHJG1hdGNoMAIHQm9vbGVhbgQBYgUHJG1hdGNoMAUBYgcBDHRyeUdldFN0cmluZwEDa2V5CQEUdHJ5R2V0U3RyaW5nRXh0ZXJuYWwCBQR0aGlzBQNrZXkBDXRyeUdldEludGVnZXIBA2tleQQHJG1hdGNoMAkAmggCBQR0aGlzBQNrZXkD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QQc2Vjb25kVXNlclNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFCnNlY29uZFVzZXIAAQMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFCnNlY29uZFVzZXIAAQMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAIFCnNlY29uZFVzZXIAAQAABA90aGlyZFVzZXJTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQl0aGlyZFVzZXIAAQMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFCXRoaXJkVXNlcgABAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAgUJdGhpcmRVc2VyAAEAAAQPc2lnbmF0dXJlc0NvdW50CQBkAgkAZAIFD2ZpcnN0VXNlclNpZ25lZAUQc2Vjb25kVXNlclNpZ25lZAUPdGhpcmRVc2VyU2lnbmVkBAckbWF0Y2gwBQJ0eAkAZwIFD3NpZ25hdHVyZXNDb3VudAACDfmcpg==", "height": 3364107, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2TSPXaAHWVq8Qor35WL4FtbCcsrQXAJWYjfQLuagGBSn Next: none Diff:
OldNewDifferences
272272
273273
274274 @Callable(i)
275-func addCouponsFarming (user,amount) = if ((i.caller != getVeggFarmingAddress()))
275+func addCouponsFarming (user,amount) = if (if ((i.caller != getVeggFarmingAddress()))
276+ then (i.caller != getMutantFarmingAddress())
277+ else false)
276278 then throw("Method only for farming sc!")
277279 else addCouponsInternal(user, amount)
278280
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func isTestEnv () = {
55 let testenv = match getBoolean(this, "TESTENV") {
66 case x: Boolean =>
77 x
88 case _ =>
99 false
1010 }
1111 testenv
1212 }
1313
1414
1515 func tryGetStringExternal (address,key) = match getString(address, key) {
1616 case a: String =>
1717 a
1818 case _ =>
1919 ""
2020 }
2121
2222
2323 func tryGetBoolean (key) = match getBoolean(key) {
2424 case b: Boolean =>
2525 b
2626 case _ =>
2727 false
2828 }
2929
3030
3131 func tryGetString (key) = tryGetStringExternal(this, key)
3232
3333
3434 func tryGetInteger (key) = match getInteger(this, key) {
3535 case b: Int =>
3636 b
3737 case _ =>
3838 0
3939 }
4040
4141
4242 func getOracle () = Address(fromBase58String(tryGetString("static_oracleAddress")))
4343
4444
4545 func staticKey_turtleStakingAddress () = "static_turtleStakingAddress"
4646
4747
4848 func staticKey_turtleRebirthAddress () = "static_turtleRebirthAddress"
4949
5050
5151 func staticKey_ropeAddress () = "static_ropeAddress"
5252
5353
5454 func staticKey_levelSystemAddress () = "static_levelSystemAddress"
5555
5656
5757 func staticKey_spiceAssetId () = "static_spiceAssetId"
5858
5959
6060 func staticKey_marketplace () = "static_marketplaceAddress"
6161
6262
6363 func staticKey_capacityAddress () = "static_capacityAddress"
6464
6565
6666 func staticKey_veggFarmingAddress () = "static_veggFarmingAddress"
6767
6868
6969 func staticKey_itemsAddress () = "static_itemsAddress"
7070
7171
7272 func staticKey_mutantFarmingAddress () = "static_mutantFarmingAddress"
7373
7474
7575 func staticKey_canineBreederAddress () = "static_canineBreederAddress"
7676
7777
7878 func staticKey_felineBreederAddress () = "static_felineBreederAddress"
7979
8080
8181 func staticKey_turtleBreederAddress () = "static_turtleBreederAddress"
8282
8383
8484 func getRebirthAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_rebirthAddress")))
8585
8686
8787 func getIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_incubatorAddress")))
8888
8989
9090 func getFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_farmingAddressNew")))
9191
9292
9393 func getGameDappAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_gameDappAddress")))
9494
9595
9696 func getCapacityAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_capacityAddress())))
9797
9898
9999 func getBurnAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_burnAddress")))
100100
101101
102102 func getBabyduckAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_babyDuckAddress")))
103103
104104
105105 func getBreedingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_breederAddress")))
106106
107107
108108 func getMasterAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_cfMasterAddress")))
109109
110110
111111 func getTurtleStakingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleStakingAddress())))
112112
113113
114114 func getTurtleRebirthAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleRebirthAddress())))
115115
116116
117117 func getRopeAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_ropeAddress())))
118118
119119
120120 func getSpiceAssetId () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_spiceAssetId()))
121121
122122
123123 func getLevelSystemAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_levelSystemAddress())))
124124
125125
126126 func getMarketPlaceAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_marketplace())))
127127
128128
129129 func getVeggFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_veggFarmingAddress())))
130130
131131
132132 func getItemsAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_itemsAddress())))
133133
134134
135135 func getMutantFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_mutantFarmingAddress())))
136136
137137
138138 func getCanineFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_canineStakingAddress")))
139139
140140
141141 func getFelineFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_felineStakingAddress")))
142142
143143
144144 func getCanineBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_canineBreederAddress())))
145145
146146
147147 func getFelineBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_felineBreederAddress())))
148148
149149
150150 func getTurtleBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleBreederAddress())))
151151
152152
153153 let wAccPKey = fromBase58String(valueOrErrorMessage(getString(getOracle(), "static_warsPKey"), "static_warsPKey not defined"))
154154
155155 let scCanUseCoupons = [getRebirthAddress(), getIncubatorAddress(), getFarmingAddress(), getGameDappAddress(), getBabyduckAddress(), getBreedingAddress(), getTurtleStakingAddress(), getTurtleRebirthAddress(), getRopeAddress(), getLevelSystemAddress(), getMarketPlaceAddress(), getCapacityAddress(), getMutantFarmingAddress(), getCanineFarmingAddress(), getFelineFarmingAddress(), getCanineBreederAddress(), getFelineBreederAddress(), getTurtleBreederAddress(), this]
156156
157157 func couponsUserSpend (user) = (user + "_spend")
158158
159159
160160 func couponsUserActive (user) = (user + "_active")
161161
162162
163163 func couponsUserActiveOld (user) = (couponsUserActive(user) + "_old")
164164
165165
166166 func couponsSpendOnSc (sc) = (sc + "_spend_by_using")
167167
168168
169169 func actionPerAddressPerUserPerDay (user,action,dappAddress,day) = (((((((dappAddress + "_") + action) + "_") + user) + "_") + day) + "_actions")
170170
171171
172172 func actionPerAddressPerUserLastCheckDay (user,action) = (((action + "_") + user) + "_actions_check_day")
173173
174174
175175 func actionPerAddressPerUserAmountInARow (user,action) = (((action + "_") + user) + "_actions_amount_in_row")
176176
177177
178178 func userExperience (user) = (user + "_experience")
179179
180180
181181 func addCouponsInternal (user,amount) = {
182182 let keyOld = couponsUserActiveOld(user)
183183 let key = couponsUserActive(user)
184184 let couponsOld = tryGetInteger(key)
185185 let coupons = (couponsOld + amount)
186186 [IntegerEntry(keyOld, couponsOld), IntegerEntry(key, coupons)]
187187 }
188188
189189
190190 let startTsMs = 1695427200000
191191
192192 func calculateDaysSinceStart () = {
193193 let diff = (lastBlock.timestamp - startTsMs)
194194 let daysPassed = (diff / (86400 * 1000))
195195 daysPassed
196196 }
197197
198198
199199 func hasDoneTask7Days (day,address,actionName,rewardAmount,rewardAmountWeekly) = {
200200 let userExperienceKey = userExperience(address)
201201 let userExpTilldate = tryGetInteger(userExperienceKey)
202202 let checkDayKey = actionPerAddressPerUserLastCheckDay(address, actionName)
203203 let daysInRowKey = actionPerAddressPerUserAmountInARow(address, actionName)
204204 let lastCheckDay = tryGetInteger(checkDayKey)
205205 let daysInRow = tryGetInteger(daysInRowKey)
206206 let daysInRowUpdate = if ((lastCheckDay == (day - 1)))
207207 then (daysInRow + 1)
208208 else if (((day - 1) > lastCheckDay))
209209 then 1
210210 else 0
211211 let lastCheckDayUpdate = day
212212 let reward = if ((daysInRowUpdate == 7))
213213 then [ScriptTransfer(addressFromStringValue(address), rewardAmountWeekly, getSpiceAssetId()), IntegerEntry(daysInRowKey, 0)]
214214 else [IntegerEntry(daysInRowKey, daysInRowUpdate)]
215215 ([IntegerEntry(checkDayKey, lastCheckDayUpdate), ScriptTransfer(addressFromStringValue(address), rewardAmount, getSpiceAssetId()), IntegerEntry(userExperienceKey, (userExpTilldate + 1))] ++ reward)
216216 }
217217
218218
219219 func payAction (actionName,userAddress,amount,day) = {
220220 let composedKey = if (tryGetBoolean((("TASK_" + actionName) + "_EVERY")))
221221 then actionName
222222 else ((actionName + "_") + toString(amount))
223223 if (tryGetBoolean(("TASK_" + composedKey)))
224224 then hasDoneTask7Days(day, toString(userAddress), composedKey, tryGetInteger((("TASK_" + composedKey) + "_REWARD_DAILY")), tryGetInteger((("TASK_" + composedKey) + "_REWARD_WEEKLY")))
225225 else nil
226226 }
227227
228228
229229 func recordActionInternal (actionName,addressCaller,address) = if (!(containsElement(scCanUseCoupons, addressCaller)))
230230 then throw("CRA: Only certain smart contracts can use this reward module!")
231231 else {
232232 let day = calculateDaysSinceStart()
233233 let actionKey = actionPerAddressPerUserPerDay(toString(address), actionName, toString(addressCaller), toString(day))
234234 let totalActions = (tryGetInteger(actionKey) + 1)
235235 ([IntegerEntry(actionKey, totalActions)] ++ payAction(actionName, address, totalActions, day))
236236 }
237237
238238
239239 @Callable(i)
240240 func configureOracle (oracle) = if ((i.caller != this))
241241 then throw("CCO: admin only")
242242 else [StringEntry("static_oracleAddress", oracle)]
243243
244244
245245
246246 @Callable(i)
247247 func addCoupons (user,amount) = if (if ((i.caller != this))
248248 then (i.callerPublicKey != wAccPKey)
249249 else false)
250250 then throw("CAC: admin only")
251251 else if ((amount >= 10000000))
252252 then (recordActionInternal("VEGG10000000", this, addressFromStringValue(user)) ++ addCouponsInternal(user, amount))
253253 else if ((amount >= 500000))
254254 then (recordActionInternal("VEGG500000", this, addressFromStringValue(user)) ++ addCouponsInternal(user, amount))
255255 else addCouponsInternal(user, amount)
256256
257257
258258
259259 @Callable(i)
260260 func resetCheater (user) = if (if ((i.caller != this))
261261 then (i.callerPublicKey != wAccPKey)
262262 else false)
263263 then throw("CAC: admin only")
264264 else {
265265 let keyOld = couponsUserActiveOld(user)
266266 let key = couponsUserActive(user)
267267 let couponsOld = tryGetInteger(key)
268268 let coupons = -100000000
269269 [IntegerEntry(keyOld, couponsOld), IntegerEntry(key, coupons)]
270270 }
271271
272272
273273
274274 @Callable(i)
275-func addCouponsFarming (user,amount) = if ((i.caller != getVeggFarmingAddress()))
275+func addCouponsFarming (user,amount) = if (if ((i.caller != getVeggFarmingAddress()))
276+ then (i.caller != getMutantFarmingAddress())
277+ else false)
276278 then throw("Method only for farming sc!")
277279 else addCouponsInternal(user, amount)
278280
279281
280282
281283 @Callable(i)
282284 func addCouponsBatch (batch) = if (if ((i.caller != this))
283285 then (i.callerPublicKey != wAccPKey)
284286 else false)
285287 then throw("CAC: admin only")
286288 else {
287289 let couponsList = split(batch, ";")
288290 func handleCoupon (acc,coupon) = {
289291 let splitArray = split(coupon, ":")
290292 let user = splitArray[0]
291293 let amount = parseIntValue(splitArray[1])
292294 let burnCall = invoke(getBurnAddress(), "burnByInvoke", [amount], nil)
293295 if ((burnCall == burnCall))
294296 then if ((amount >= 10000000))
295297 then ((acc ++ recordActionInternal("VEGG10000000", this, addressFromStringValue(user))) ++ addCouponsInternal(user, amount))
296298 else if ((amount >= 500000))
297299 then ((acc ++ recordActionInternal("VEGG500000", this, addressFromStringValue(user))) ++ addCouponsInternal(user, amount))
298300 else (acc ++ addCouponsInternal(user, amount))
299301 else throw("Strict value is not equal to itself.")
300302 }
301303
302304 let $l = couponsList
303305 let $s = size($l)
304306 let $acc0 = nil
305307 func $f0_1 ($a,$i) = if (($i >= $s))
306308 then $a
307309 else handleCoupon($a, $l[$i])
308310
309311 func $f0_2 ($a,$i) = if (($i >= $s))
310312 then $a
311313 else throw("List size exceeds 20")
312314
313315 $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($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), 16), 17), 18), 19), 20)
314316 }
315317
316318
317319
318320 @Callable(i)
319321 func CFRefund (recipient,amount) = {
320322 let cfAddress = getStringValue(i.caller, "CF_ADDRESS")
321323 let key = (("f_" + cfAddress) + "_stake_address")
322324 let stakeAddress = getStringValue(getMasterAddress(), key)
323325 if ((stakeAddress != toString(i.caller)))
324326 then throw("CCR: This is something fishy going on!")
325327 else addCouponsInternal(recipient, amount)
326328 }
327329
328330
329331
330332 @Callable(i)
331333 func useCoupons (amountTryingToPay) = {
332334 let invokingSc = i.caller
333335 if ((0 > amountTryingToPay))
334336 then throw("CUC: Only positive amount of money can be paid!")
335337 else if (!(containsElement(scCanUseCoupons, invokingSc)))
336338 then throw("CUC: Only certain smart contracts can use this coupon module!")
337339 else {
338340 let user = toString(i.originCaller)
339341 let keyActive = couponsUserActive(user)
340342 let availableCoupons = tryGetInteger(keyActive)
341343 if ((0 > availableCoupons))
342344 then throw("CUC: Get rekt!")
343345 else {
344346 let leftToPay = if ((amountTryingToPay > availableCoupons))
345347 then (amountTryingToPay - availableCoupons)
346348 else 0
347349 let amountPaid = (amountTryingToPay - leftToPay)
348350 let availableCouponsLeft = (availableCoupons - amountPaid)
349351 if ((0 > availableCouponsLeft))
350352 then throw("CUC: You try to overspend!")
351353 else {
352354 let keySpend = couponsUserSpend(user)
353355 let keyOld = couponsUserActiveOld(user)
354356 let keySpendSc = couponsSpendOnSc(toString(i.caller))
355357 let topUp = invoke(getVeggFarmingAddress(), "topUpReward", [((amountPaid / 100) * 25)], nil)
356358 if ((topUp == topUp))
357359 then {
358360 let totalSpend = (tryGetInteger(keySpend) + amountPaid)
359361 let totalSpendSc = (tryGetInteger(keySpendSc) + amountPaid)
360362 $Tuple2([IntegerEntry(keySpend, totalSpend), IntegerEntry(keyOld, availableCoupons), IntegerEntry(keyActive, availableCouponsLeft), IntegerEntry(keySpendSc, totalSpendSc)], amountPaid)
361363 }
362364 else throw("Strict value is not equal to itself.")
363365 }
364366 }
365367 }
366368 }
367369
368370
369371
370372 @Callable(i)
371373 func recordAction (actionName) = recordActionInternal(actionName, i.caller, i.originCaller)
372374
373375
374376
375377 @Callable(i)
376378 func increaseExp (address) = if ((i.caller != getItemsAddress()))
377379 then nil
378380 else {
379381 let userExperienceKey = userExperience(address)
380382 let userExpTilldate = tryGetInteger(userExperienceKey)
381383 [IntegerEntry(userExperienceKey, (userExpTilldate + 1))]
382384 }
383385
384386
385387 @Verifier(tx)
386388 func verify () = if (isTestEnv())
387389 then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
388390 else {
389391 let firstUser = base58'6TdaXEfhnjYquvPf3yV7MFxt2CbgFmaqsvGwkKfXtKi4'
390392 let secondUser = base58'7DsP2WaMLocbHuUxux7pbXRjTrrZ1TFQPsi5QumS3gr8'
391393 let thirdUser = base58'BpFWP3p3JgYrrP45xfrKzeMcWMEXoinj4FVPPkUiA8D3'
392394 let firstUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], firstUser))
393395 then 1
394396 else if (sigVerify(tx.bodyBytes, tx.proofs[1], firstUser))
395397 then 1
396398 else if (sigVerify(tx.bodyBytes, tx.proofs[2], firstUser))
397399 then 1
398400 else 0
399401 let secondUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], secondUser))
400402 then 1
401403 else if (sigVerify(tx.bodyBytes, tx.proofs[1], secondUser))
402404 then 1
403405 else if (sigVerify(tx.bodyBytes, tx.proofs[2], secondUser))
404406 then 1
405407 else 0
406408 let thirdUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], thirdUser))
407409 then 1
408410 else if (sigVerify(tx.bodyBytes, tx.proofs[1], thirdUser))
409411 then 1
410412 else if (sigVerify(tx.bodyBytes, tx.proofs[2], thirdUser))
411413 then 1
412414 else 0
413415 let signaturesCount = ((firstUserSigned + secondUserSigned) + thirdUserSigned)
414416 match tx {
415417 case _ =>
416418 (signaturesCount >= 2)
417419 }
418420 }
419421

github/deemru/w8io/026f985 
46.72 ms