tx · DcSYzuXELG3LanXCtDooYrWYPr2przwJHmKGffqBG7ee 3NAN9Bp8r6PqgX6VJhNFyoKjHEH8N7bGvBQ: -0.02700000 Waves 2025.01.27 08:49 [3477088] smart account 3NAN9Bp8r6PqgX6VJhNFyoKjHEH8N7bGvBQ > SELF 0.00000000 Waves
{ "type": 13, "id": "DcSYzuXELG3LanXCtDooYrWYPr2przwJHmKGffqBG7ee", "fee": 2700000, "feeAssetId": null, "timestamp": 1737957003476, "version": 2, "chainId": 84, "sender": "3NAN9Bp8r6PqgX6VJhNFyoKjHEH8N7bGvBQ", "senderPublicKey": "DWshrQo4HwumGTGgcyNoWUCy2gPN4GCRTMeBxNFgQft7", "proofs": [ "4NRvSWyYGH145Fkhj8jLnphxjupW4VEMLQYRV4HyRNqweNwjjEg8q6PNa5Dt2EErAxEntAv5m5WQCmunG6QnLK1W" ], "script": "base64:AAIFAAAAAAAAAC8IAhIAEgQKAggIEgMKAQgSBAoCCAgSBQoDCAgBEgMKAQgSAwoBCBIAEgASAwoBCAAAADcBAAAAB2dldEJvb2wAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBsAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAB0Jvb2xlYW4EAAAAAWIFAAAAByRtYXRjaDAFAAAAAWIHAQAAAAlpc1Rlc3RFbnYAAAAACQEAAAAHZ2V0Qm9vbAAAAAECAAAAB1RFU1RFTlYAAAAABVNjYWxlAAAAAAAF9eEAAQAAABR0cnlHZXRTdHJpbmdFeHRlcm5hbAAAAAIAAAAHYWRkcmVzcwAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWECAAAAAAEAAAAMdHJ5R2V0U3RyaW5nAAAAAQAAAANrZXkJAQAAABR0cnlHZXRTdHJpbmdF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Byb29mcwAAAAAAAAAAAQUAAAAKc2Vjb25kVXNlcgAAAAAAAAAAAQMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAACBQAAAApzZWNvbmRVc2VyAAAAAAAAAAABAAAAAAAAAAAABAAAAA90aGlyZFVzZXJTaWduZWQDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAJdGhpcmRVc2VyAAAAAAAAAAABAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEFAAAACXRoaXJkVXNlcgAAAAAAAAAAAQMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAACBQAAAAl0aGlyZFVzZXIAAAAAAAAAAAEAAAAAAAAAAAAEAAAAD3NpZ25hdHVyZXNDb3VudAkAAGQAAAACCQAAZAAAAAIFAAAAD2ZpcnN0VXNlclNpZ25lZAUAAAAQc2Vjb25kVXNlclNpZ25lZAUAAAAPdGhpcmRVc2VyU2lnbmVkBAAAAAckbWF0Y2gwBQAAAAJ0eAkAAGcAAAACBQAAAA9zaWduYXR1cmVzQ291bnQAAAAAAAAAAAJL1dPc", "height": 3477088, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6RjLHG1XMRkxM1T7rgvPV3WJjHLosasLMqJz4nVEEYEx Next: none Diff:
Old | New | Differences | |
---|---|---|---|
68 | 68 | func staticKey_canineRebirthAddress () = "static_canineRebirthAddress" | |
69 | 69 | ||
70 | 70 | ||
71 | + | func staticKey_wearablesAddress () = "static_wearablesAddress" | |
72 | + | ||
73 | + | ||
71 | 74 | func getOracle () = Address(fromBase58String(tryGetString(staticKey_oracleAddress()))) | |
72 | 75 | ||
73 | 76 | ||
99 | 102 | ||
100 | 103 | ||
101 | 104 | func getCanieRebirthAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_canineRebirthAddress()))) | |
105 | + | ||
106 | + | ||
107 | + | func getWearablesAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_wearablesAddress()))) | |
102 | 108 | ||
103 | 109 | ||
104 | 110 | func keyLastCheckInterest (address,asset) = (((("address_" + address) + "_asset_") + asset) + "_lastCheckInterest") | |
315 | 321 | then 8 | |
316 | 322 | else size(uniqueList) | |
317 | 323 | let power = pow(15, 1, totalGenes, 0, 2, DOWN) | |
318 | - | let multiplier = (((height - 2500000) * 100) / (((60 * 24) * 30) * 3)) | |
324 | + | let baseBlock = if (isTestEnv()) | |
325 | + | then 2500000 | |
326 | + | else 3750000 | |
327 | + | let multiplier = (((height - baseBlock) * 100) / (((60 * 24) * 30) * 3)) | |
319 | 328 | let basePower = tryGetInteger((assetId + "_basePower")) | |
320 | 329 | let finalPower = if ((basePower > 0)) | |
321 | 330 | then basePower | |
324 | 333 | let farmBoost = 0 | |
325 | 334 | if ((farmBoost == farmBoost)) | |
326 | 335 | then { | |
327 | - | let finalPowerRarityBoost = (finalPowerRarity + ((finalPowerRarity * farmBoost) / 100)) | |
328 | - | $Tuple2(nil, $Tuple2(finalPowerRarityBoost, finalPower)) | |
336 | + | let wearabledBoost = asInt(invoke(getWearablesAddress(), "calculateWearblesBoost", [assetId], nil)) | |
337 | + | if ((wearabledBoost == wearabledBoost)) | |
338 | + | then { | |
339 | + | let finalPowerRarityBoost = ((finalPowerRarity + ((finalPowerRarity * farmBoost) / 100)) + ((finalPowerRarity * wearabledBoost) / 1000)) | |
340 | + | $Tuple2(nil, $Tuple2(finalPowerRarityBoost, finalPower)) | |
341 | + | } | |
342 | + | else throw("Strict value is not equal to itself.") | |
329 | 343 | } | |
330 | 344 | else throw("Strict value is not equal to itself.") | |
331 | 345 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getBool (key) = match getBoolean(this, key) { | |
5 | 5 | case b: Boolean => | |
6 | 6 | b | |
7 | 7 | case _ => | |
8 | 8 | false | |
9 | 9 | } | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func isTestEnv () = getBool("TESTENV") | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | let Scale = 100000000 | |
16 | 16 | ||
17 | 17 | func tryGetStringExternal (address,key) = match getString(address, key) { | |
18 | 18 | case a: String => | |
19 | 19 | a | |
20 | 20 | case _ => | |
21 | 21 | "" | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func tryGetString (key) = tryGetStringExternal(this, key) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func staticKey_refContractAddress () = "static_refContractAddress" | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | let keyGlobalLastInterest = "global_lastCheck_interest" | |
32 | 32 | ||
33 | 33 | func staticKey_oracleAddress () = "static_oracleAddress" | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func staticKey_eggAssetId () = "static_eggAssetId" | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func staticKey_canineIncubatorAddress () = "static_canineIncubatorAddress" | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func staticKey_canineBreederAddress () = "static_canineBreederAddress" | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func staticKey_accBoosterAddress () = "static_accBoosterAddress" | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func staticKey_couponsAddress () = "static_couponsAddress" | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func staticKey_burnAddress () = "static_burnAddress" | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func staticKey_extraFee () = "static_extraFee" | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func staticKey_feeAggregator () = "static_feeAggregator" | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | let keyGlobalEarned = "global_earnings" | |
61 | 61 | ||
62 | 62 | func staticKey_perchFee () = "static_caninePerchFee" | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func totalStakedKey () = "total_staked" | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func staticKey_canineRebirthAddress () = "static_canineRebirthAddress" | |
69 | 69 | ||
70 | 70 | ||
71 | + | func staticKey_wearablesAddress () = "static_wearablesAddress" | |
72 | + | ||
73 | + | ||
71 | 74 | func getOracle () = Address(fromBase58String(tryGetString(staticKey_oracleAddress()))) | |
72 | 75 | ||
73 | 76 | ||
74 | 77 | func getEggAssetId () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_eggAssetId())) | |
75 | 78 | ||
76 | 79 | ||
77 | 80 | func getIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_canineIncubatorAddress()))) | |
78 | 81 | ||
79 | 82 | ||
80 | 83 | func getBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_canineBreederAddress()))) | |
81 | 84 | ||
82 | 85 | ||
83 | 86 | func getAccBoosterAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_accBoosterAddress()))) | |
84 | 87 | ||
85 | 88 | ||
86 | 89 | func getCouponsAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_couponsAddress()))) | |
87 | 90 | ||
88 | 91 | ||
89 | 92 | func getBurnAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_burnAddress()))) | |
90 | 93 | ||
91 | 94 | ||
92 | 95 | func getFeeAggregator () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_feeAggregator()))) | |
93 | 96 | ||
94 | 97 | ||
95 | 98 | func getRefContractAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_refContractAddress()))) | |
96 | 99 | ||
97 | 100 | ||
98 | 101 | func getNodeAccount () = addressFromStringValue(valueOrErrorMessage(getString(getOracle(), "static_nodeAddress"), "node_address not found!")) | |
99 | 102 | ||
100 | 103 | ||
101 | 104 | func getCanieRebirthAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_canineRebirthAddress()))) | |
105 | + | ||
106 | + | ||
107 | + | func getWearablesAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_wearablesAddress()))) | |
102 | 108 | ||
103 | 109 | ||
104 | 110 | func keyLastCheckInterest (address,asset) = (((("address_" + address) + "_asset_") + asset) + "_lastCheckInterest") | |
105 | 111 | ||
106 | 112 | ||
107 | 113 | func assetFarmingPower (address,asset) = (((("address_" + address) + "_asset_") + asset) + "_farmingPower") | |
108 | 114 | ||
109 | 115 | ||
110 | 116 | func rewardClaimedKey (address,asset) = (((address + "_asset_") + asset) + "_claimed") | |
111 | 117 | ||
112 | 118 | ||
113 | 119 | func totalStakedUserKey (address) = ("total_staked_" + address) | |
114 | 120 | ||
115 | 121 | ||
116 | 122 | let stakeId = tryGetString("last_stake_id") | |
117 | 123 | ||
118 | 124 | let RefererReward = 5 | |
119 | 125 | ||
120 | 126 | func checkAdditionalPayment (payment) = if (isDefined(payment.assetId)) | |
121 | 127 | then throw("FCAP: Please attach waves") | |
122 | 128 | else { | |
123 | 129 | let feeAmount = getIntegerValue(getOracle(), staticKey_extraFee()) | |
124 | 130 | if ((payment.amount != feeAmount)) | |
125 | 131 | then throw((("FCAP: Please attach exactly " + toString(feeAmount)) + " amount of wavelets")) | |
126 | 132 | else [ScriptTransfer(getFeeAggregator(), feeAmount, unit)] | |
127 | 133 | } | |
128 | 134 | ||
129 | 135 | ||
130 | 136 | func tryGetInteger (key) = match getInteger(this, key) { | |
131 | 137 | case b: Int => | |
132 | 138 | b | |
133 | 139 | case _ => | |
134 | 140 | 0 | |
135 | 141 | } | |
136 | 142 | ||
137 | 143 | ||
138 | 144 | func asInt (value) = match value { | |
139 | 145 | case int: Int => | |
140 | 146 | int | |
141 | 147 | case _ => | |
142 | 148 | throw("FAI: wrong type, expected: Int") | |
143 | 149 | } | |
144 | 150 | ||
145 | 151 | ||
146 | 152 | func asIntTuple (value) = match value { | |
147 | 153 | case int: (Int, Int) => | |
148 | 154 | int | |
149 | 155 | case _ => | |
150 | 156 | throw("FAI: wrong type, expected: (Int,Int)") | |
151 | 157 | } | |
152 | 158 | ||
153 | 159 | ||
154 | 160 | func asString (value) = match value { | |
155 | 161 | case string: String => | |
156 | 162 | string | |
157 | 163 | case _ => | |
158 | 164 | throw("FAS: wrong type, expected: String") | |
159 | 165 | } | |
160 | 166 | ||
161 | 167 | ||
162 | 168 | func tryGetBoolean (key) = match getBoolean(this, key) { | |
163 | 169 | case b: Boolean => | |
164 | 170 | b | |
165 | 171 | case _ => | |
166 | 172 | false | |
167 | 173 | } | |
168 | 174 | ||
169 | 175 | ||
170 | 176 | func tryGetBooleanExternal (address,key) = match getBoolean(address, key) { | |
171 | 177 | case b: Boolean => | |
172 | 178 | b | |
173 | 179 | case _ => | |
174 | 180 | false | |
175 | 181 | } | |
176 | 182 | ||
177 | 183 | ||
178 | 184 | func getAssetOrigin (generation) = if ((generation == "G")) | |
179 | 185 | then getIncubatorAddress() | |
180 | 186 | else getBreederAddress() | |
181 | 187 | ||
182 | 188 | ||
183 | 189 | func getAssetRarity (genotype,generation) = { | |
184 | 190 | let quantity = valueOrErrorMessage(getInteger(getAssetOrigin(generation), (("stats_" + genotype) + "_quantity")), (("stats_" + genotype) + "_quantity not found")) | |
185 | 191 | let power = pow((10000 / quantity), 4, 5, 1, 2, FLOOR) | |
186 | 192 | if ((power > 0)) | |
187 | 193 | then power | |
188 | 194 | else 2 | |
189 | 195 | } | |
190 | 196 | ||
191 | 197 | ||
192 | 198 | func getAssetRarityComplete (isJackpot,assetName) = { | |
193 | 199 | let rarity = if (isJackpot) | |
194 | 200 | then 100 | |
195 | 201 | else { | |
196 | 202 | let generation = take(takeRight(assetName, 2), 1) | |
197 | 203 | let farmGen = asString(invoke(getBreederAddress(), "getGenFromName", [assetName], nil)) | |
198 | 204 | if ((farmGen == farmGen)) | |
199 | 205 | then getAssetRarity(farmGen, generation) | |
200 | 206 | else throw("Strict value is not equal to itself.") | |
201 | 207 | } | |
202 | 208 | rarity | |
203 | 209 | } | |
204 | 210 | ||
205 | 211 | ||
206 | 212 | func updateFarmingPower (address,asset) = { | |
207 | 213 | let totalStaked = tryGetInteger(totalStakedKey()) | |
208 | 214 | let totalStakedUser = tryGetInteger(totalStakedUserKey(address)) | |
209 | 215 | let currentFP = tryGetInteger(assetFarmingPower(address, asset)) | |
210 | 216 | let newFP = asIntTuple(invoke(this, "calculateFarmPower", [asset, address], nil)) | |
211 | 217 | if ((currentFP != 0)) | |
212 | 218 | then [IntegerEntry(totalStakedKey(), ((totalStaked - currentFP) + newFP._1)), IntegerEntry(totalStakedUserKey(address), ((totalStakedUser - currentFP) + newFP._1)), IntegerEntry(assetFarmingPower(address, asset), newFP._1)] | |
213 | 219 | else nil | |
214 | 220 | } | |
215 | 221 | ||
216 | 222 | ||
217 | 223 | func claimStakingResult (address,asset,recalc) = { | |
218 | 224 | let currentInterest = tryGetInteger(keyGlobalLastInterest) | |
219 | 225 | let lastCheckInterest = tryGetInteger(keyLastCheckInterest(address, asset)) | |
220 | 226 | let stakedAmount = tryGetInteger(assetFarmingPower(address, asset)) | |
221 | 227 | let fpUpdate = if (recalc) | |
222 | 228 | then updateFarmingPower(address, asset) | |
223 | 229 | else nil | |
224 | 230 | if ((fpUpdate == fpUpdate)) | |
225 | 231 | then { | |
226 | 232 | let reward = if ((lastCheckInterest > 0)) | |
227 | 233 | then fraction((currentInterest - lastCheckInterest), stakedAmount, Scale) | |
228 | 234 | else 0 | |
229 | 235 | $Tuple2(([ScriptTransfer(addressFromStringValue(address), reward, unit), IntegerEntry(keyLastCheckInterest(address, asset), currentInterest), IntegerEntry(rewardClaimedKey(address, asset), (tryGetInteger(rewardClaimedKey(address, asset)) + reward))] ++ fpUpdate), reward) | |
230 | 236 | } | |
231 | 237 | else throw("Strict value is not equal to itself.") | |
232 | 238 | } | |
233 | 239 | ||
234 | 240 | ||
235 | 241 | func asBoolean (value) = match value { | |
236 | 242 | case boolean: Boolean => | |
237 | 243 | boolean | |
238 | 244 | case _ => | |
239 | 245 | throw("FAB: wrong type, expected: Boolean") | |
240 | 246 | } | |
241 | 247 | ||
242 | 248 | ||
243 | 249 | func calculatePerchPrice (address) = { | |
244 | 250 | let hasArtefactStaked = tryGetStringExternal(getAccBoosterAddress(), (("ART-XMISTL_" + address) + "_owner")) | |
245 | 251 | let perchPrice = getIntegerValue(getOracle(), staticKey_perchFee()) | |
246 | 252 | if ((hasArtefactStaked == "")) | |
247 | 253 | then perchPrice | |
248 | 254 | else ((perchPrice / 10) * 9) | |
249 | 255 | } | |
250 | 256 | ||
251 | 257 | ||
252 | 258 | func stakeUnstake (stake,amount) = if ((amount > 0)) | |
253 | 259 | then { | |
254 | 260 | let leasingAmount = valueOrElse(getInteger(this, "leasing_amount"), 0) | |
255 | 261 | let newLeaseAmount = if (stake) | |
256 | 262 | then (leasingAmount + amount) | |
257 | 263 | else (leasingAmount - amount) | |
258 | 264 | let newLease = Lease(getNodeAccount(), newLeaseAmount) | |
259 | 265 | let newLeaseId = calculateLeaseId(newLease) | |
260 | 266 | let data = [newLease, StringEntry("last_stake_id", toBase58String(newLeaseId)), IntegerEntry("leasing_amount", newLeaseAmount)] | |
261 | 267 | if ((stakeId != "")) | |
262 | 268 | then ([LeaseCancel(fromBase58String(stakeId))] ++ data) | |
263 | 269 | else data | |
264 | 270 | } | |
265 | 271 | else nil | |
266 | 272 | ||
267 | 273 | ||
268 | 274 | func handleStakingTopUp (totalAmount) = { | |
269 | 275 | let compoundAmount = (totalAmount / 2) | |
270 | 276 | let payoutAmount = (totalAmount - compoundAmount) | |
271 | 277 | let currentInterest = tryGetInteger(keyGlobalLastInterest) | |
272 | 278 | let totalStakedAmount = tryGetInteger(totalStakedKey()) | |
273 | 279 | let interestDelta = if ((totalStakedAmount > 0)) | |
274 | 280 | then fraction(payoutAmount, Scale, totalStakedAmount) | |
275 | 281 | else 0 | |
276 | 282 | ([IntegerEntry(keyGlobalEarned, (tryGetInteger(keyGlobalEarned) + payoutAmount)), IntegerEntry(keyGlobalLastInterest, (currentInterest + interestDelta)), IntegerEntry("global_WAVES_balance", (tryGetInteger("global_WAVES_balance") + compoundAmount))] ++ stakeUnstake(true, compoundAmount)) | |
277 | 283 | } | |
278 | 284 | ||
279 | 285 | ||
280 | 286 | @Callable(i) | |
281 | 287 | func stakeAll () = stakeUnstake(true, (tryGetInteger("global_WAVES_balance") - tryGetInteger("leasing_amount"))) | |
282 | 288 | ||
283 | 289 | ||
284 | 290 | ||
285 | 291 | @Callable(i) | |
286 | 292 | func calculateFarmPower (assetId,bonusAddress) = if (!(if ((value(assetInfo(fromBase58String(assetId))).issuer == getBreederAddress())) | |
287 | 293 | then true | |
288 | 294 | else (value(assetInfo(fromBase58String(assetId))).issuer == getIncubatorAddress()))) | |
289 | 295 | then throw("This does not seem like a valid Duck!") | |
290 | 296 | else { | |
291 | 297 | let assetName = value(assetInfo(fromBase58String(assetId))).name | |
292 | 298 | let gen = takeRight(assetName, 1) | |
293 | 299 | let isJackpot = (takeRight(assetName, 1) == "U") | |
294 | 300 | let rarity = getAssetRarityComplete(isJackpot, assetName) | |
295 | 301 | let genotype = split(dropRight(drop(assetName, 5), 3), "") | |
296 | 302 | func uniqueArrayFilter (accum,nextGen) = if (!(containsElement(accum, nextGen))) | |
297 | 303 | then (accum :+ nextGen) | |
298 | 304 | else accum | |
299 | 305 | ||
300 | 306 | let uniqueList = { | |
301 | 307 | let $l = genotype | |
302 | 308 | let $s = size($l) | |
303 | 309 | let $acc0 = nil | |
304 | 310 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
305 | 311 | then $a | |
306 | 312 | else uniqueArrayFilter($a, $l[$i]) | |
307 | 313 | ||
308 | 314 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
309 | 315 | then $a | |
310 | 316 | else throw("List size exceeds 8") | |
311 | 317 | ||
312 | 318 | $f0_2($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) | |
313 | 319 | } | |
314 | 320 | let totalGenes = if ((gen == "U")) | |
315 | 321 | then 8 | |
316 | 322 | else size(uniqueList) | |
317 | 323 | let power = pow(15, 1, totalGenes, 0, 2, DOWN) | |
318 | - | let multiplier = (((height - 2500000) * 100) / (((60 * 24) * 30) * 3)) | |
324 | + | let baseBlock = if (isTestEnv()) | |
325 | + | then 2500000 | |
326 | + | else 3750000 | |
327 | + | let multiplier = (((height - baseBlock) * 100) / (((60 * 24) * 30) * 3)) | |
319 | 328 | let basePower = tryGetInteger((assetId + "_basePower")) | |
320 | 329 | let finalPower = if ((basePower > 0)) | |
321 | 330 | then basePower | |
322 | 331 | else ((power * multiplier) / 100) | |
323 | 332 | let finalPowerRarity = ((finalPower * rarity) / 100) | |
324 | 333 | let farmBoost = 0 | |
325 | 334 | if ((farmBoost == farmBoost)) | |
326 | 335 | then { | |
327 | - | let finalPowerRarityBoost = (finalPowerRarity + ((finalPowerRarity * farmBoost) / 100)) | |
328 | - | $Tuple2(nil, $Tuple2(finalPowerRarityBoost, finalPower)) | |
336 | + | let wearabledBoost = asInt(invoke(getWearablesAddress(), "calculateWearblesBoost", [assetId], nil)) | |
337 | + | if ((wearabledBoost == wearabledBoost)) | |
338 | + | then { | |
339 | + | let finalPowerRarityBoost = ((finalPowerRarity + ((finalPowerRarity * farmBoost) / 100)) + ((finalPowerRarity * wearabledBoost) / 1000)) | |
340 | + | $Tuple2(nil, $Tuple2(finalPowerRarityBoost, finalPower)) | |
341 | + | } | |
342 | + | else throw("Strict value is not equal to itself.") | |
329 | 343 | } | |
330 | 344 | else throw("Strict value is not equal to itself.") | |
331 | 345 | } | |
332 | 346 | ||
333 | 347 | ||
334 | 348 | ||
335 | 349 | @Callable(i) | |
336 | 350 | func configureOracle (oracle) = if ((i.caller != this)) | |
337 | 351 | then throw("FCO: admin only") | |
338 | 352 | else [StringEntry(staticKey_oracleAddress(), oracle)] | |
339 | 353 | ||
340 | 354 | ||
341 | 355 | ||
342 | 356 | @Callable(i) | |
343 | 357 | func buyPerch (colorI,refererAddress) = { | |
344 | 358 | let validPayment = checkAdditionalPayment(i.payments[0]) | |
345 | 359 | if ((validPayment == validPayment)) | |
346 | 360 | then { | |
347 | 361 | let color = if ((colorI == "U")) | |
348 | 362 | then "B" | |
349 | 363 | else colorI | |
350 | 364 | if ((0 > value(indexOf(["A", "B", "C", "D"], color)))) | |
351 | 365 | then throw("you need to set color properly") | |
352 | 366 | else { | |
353 | 367 | let exactPrice = calculatePerchPrice(toString(i.caller)) | |
354 | 368 | let leftToPay = if ((i.originCaller == i.caller)) | |
355 | 369 | then { | |
356 | 370 | let amountPaidByCoupons = asInt(invoke(getCouponsAddress(), "useCoupons", [exactPrice], nil)) | |
357 | 371 | if ((amountPaidByCoupons == amountPaidByCoupons)) | |
358 | 372 | then (exactPrice - amountPaidByCoupons) | |
359 | 373 | else throw("Strict value is not equal to itself.") | |
360 | 374 | } | |
361 | 375 | else exactPrice | |
362 | 376 | let payment = if ((leftToPay != 0)) | |
363 | 377 | then { | |
364 | 378 | let firstPayment = if ((size(i.payments) == 2)) | |
365 | 379 | then value(i.payments[1]) | |
366 | 380 | else value(i.payments[0]) | |
367 | 381 | if ((firstPayment.assetId != getEggAssetId())) | |
368 | 382 | then throw(("FBP: You can attach only EGG tokens with the following asset id: " + toBase58String(getEggAssetId()))) | |
369 | 383 | else if ((firstPayment.amount != leftToPay)) | |
370 | 384 | then throw(((("FBP: To buy a perch you currently need the following amount of EGGlets: " + toString(leftToPay)) + " ") + toString(i.caller))) | |
371 | 385 | else { | |
372 | 386 | let refererRewardForPerch = fraction(leftToPay, 5, 100) | |
373 | 387 | let refCall = asBoolean(invoke(getRefContractAddress(), "refPayment", [refererAddress], [AttachedPayment(getEggAssetId(), refererRewardForPerch)])) | |
374 | 388 | if ((refCall == refCall)) | |
375 | 389 | then { | |
376 | 390 | let toBurn = if (refCall) | |
377 | 391 | then (leftToPay - refererRewardForPerch) | |
378 | 392 | else leftToPay | |
379 | 393 | let burnCall = invoke(getBurnAddress(), "burnAttachedPayments", nil, [AttachedPayment(getEggAssetId(), toBurn)]) | |
380 | 394 | if ((burnCall == burnCall)) | |
381 | 395 | then leftToPay | |
382 | 396 | else throw("Strict value is not equal to itself.") | |
383 | 397 | } | |
384 | 398 | else throw("Strict value is not equal to itself.") | |
385 | 399 | } | |
386 | 400 | } | |
387 | 401 | else 0 | |
388 | 402 | if ((payment == payment)) | |
389 | 403 | then { | |
390 | 404 | let perchAmountKey = ((("address_" + toString(i.caller)) + "_perchesAvailable_") + color) | |
391 | 405 | let perchAmount = tryGetInteger(perchAmountKey) | |
392 | 406 | ([IntegerEntry(perchAmountKey, (perchAmount + 1))] ++ validPayment) | |
393 | 407 | } | |
394 | 408 | else throw("Strict value is not equal to itself.") | |
395 | 409 | } | |
396 | 410 | } | |
397 | 411 | else throw("Strict value is not equal to itself.") | |
398 | 412 | } | |
399 | 413 | ||
400 | 414 | ||
401 | 415 | ||
402 | 416 | @Callable(i) | |
403 | 417 | func addFreePerch (address,color,amount) = if ((0 > value(indexOf(["A", "B", "C", "D"], color)))) | |
404 | 418 | then throw("you need to set color properly") | |
405 | 419 | else if (if ((i.caller != this)) | |
406 | 420 | then (i.caller != getCanieRebirthAddress()) | |
407 | 421 | else false) | |
408 | 422 | then throw("rebirth and admin only") | |
409 | 423 | else { | |
410 | 424 | let perchAmountKey = ((("address_" + address) + "_perchesAvailable_") + color) | |
411 | 425 | let perchAmount = tryGetInteger(perchAmountKey) | |
412 | 426 | $Tuple2([IntegerEntry(perchAmountKey, (perchAmount + amount))], "") | |
413 | 427 | } | |
414 | 428 | ||
415 | 429 | ||
416 | 430 | ||
417 | 431 | @Callable(i) | |
418 | 432 | func stakeNFT (jColor) = { | |
419 | 433 | let validPayment = checkAdditionalPayment(i.payments[0]) | |
420 | 434 | if ((validPayment == validPayment)) | |
421 | 435 | then { | |
422 | 436 | let pmt = value(i.payments[1]) | |
423 | 437 | let assetId = value(pmt.assetId) | |
424 | 438 | let assetName = value(value(assetInfo(assetId)).name) | |
425 | 439 | let isJackpot = (takeRight(assetName, 1) == "U") | |
426 | 440 | let address = toString(i.caller) | |
427 | 441 | let perchAddress = address | |
428 | 442 | let color = if (isJackpot) | |
429 | 443 | then jColor | |
430 | 444 | else takeRight(assetName, 1) | |
431 | 445 | let perches = { | |
432 | 446 | let availablePerches = tryGetInteger(((("address_" + perchAddress) + "_perchesAvailable_") + color)) | |
433 | 447 | if ((0 >= availablePerches)) | |
434 | 448 | then throw(("no perches available for the color " + color)) | |
435 | 449 | else [IntegerEntry(((("address_" + perchAddress) + "_perchesAvailable_") + color), (availablePerches - 1)), StringEntry((((("address_" + address) + "_asset_") + toBase58String(assetId)) + "_perchColor"), color)] | |
436 | 450 | } | |
437 | 451 | if ((perches == perches)) | |
438 | 452 | then if ((pmt.amount != 1)) | |
439 | 453 | then throw("NFT is not attached") | |
440 | 454 | else { | |
441 | 455 | let farmingPower = asIntTuple(invoke(this, "calculateFarmPower", [toBase58String(assetId), toString(i.originCaller)], nil)) | |
442 | 456 | if ((farmingPower == farmingPower)) | |
443 | 457 | then { | |
444 | 458 | let result = claimStakingResult(address, toBase58String(assetId), false) | |
445 | 459 | if ((result == result)) | |
446 | 460 | then ((([IntegerEntry(totalStakedKey(), (tryGetInteger(totalStakedKey()) + farmingPower._1)), IntegerEntry(totalStakedUserKey(address), (tryGetInteger(totalStakedUserKey(address)) + farmingPower._1)), StringEntry((toBase58String(assetId) + "_owner"), address), StringEntry((toBase58String(assetId) + "_original_caller"), toString(i.originCaller)), IntegerEntry(assetFarmingPower(address, toBase58String(assetId)), farmingPower._1), IntegerEntry((toBase58String(assetId) + "_basePower"), farmingPower._2)] ++ validPayment) ++ perches) ++ result._1) | |
447 | 461 | else throw("Strict value is not equal to itself.") | |
448 | 462 | } | |
449 | 463 | else throw("Strict value is not equal to itself.") | |
450 | 464 | } | |
451 | 465 | else throw("Strict value is not equal to itself.") | |
452 | 466 | } | |
453 | 467 | else throw("Strict value is not equal to itself.") | |
454 | 468 | } | |
455 | 469 | ||
456 | 470 | ||
457 | 471 | ||
458 | 472 | @Callable(i) | |
459 | 473 | func unstakeNFT (asset) = { | |
460 | 474 | let address = toString(i.caller) | |
461 | 475 | if ((tryGetString((asset + "_owner")) != toString(i.caller))) | |
462 | 476 | then throw("You don't own this duck!!") | |
463 | 477 | else { | |
464 | 478 | let result = claimStakingResult(address, asset, false) | |
465 | 479 | if ((result == result)) | |
466 | 480 | then { | |
467 | 481 | let validPayment = checkAdditionalPayment(i.payments[0]) | |
468 | 482 | if ((validPayment == validPayment)) | |
469 | 483 | then { | |
470 | 484 | let color = tryGetString((((("address_" + address) + "_asset_") + asset) + "_perchColor")) | |
471 | 485 | let assetFP = tryGetInteger(assetFarmingPower(address, asset)) | |
472 | 486 | if ((assetFP == assetFP)) | |
473 | 487 | then $Tuple2((([IntegerEntry(totalStakedKey(), (tryGetInteger(totalStakedKey()) - assetFP)), IntegerEntry(totalStakedUserKey(address), (tryGetInteger(totalStakedUserKey(address)) - assetFP)), DeleteEntry((asset + "_owner")), DeleteEntry(assetFarmingPower(address, asset)), DeleteEntry((((("address_" + address) + "_asset_") + asset) + "_perchColor")), DeleteEntry((asset + "_original_caller")), DeleteEntry((asset + "_use_origin")), DeleteEntry((asset + "_without_perch")), ScriptTransfer(Address(fromBase58String(address)), 1, fromBase58String(asset)), IntegerEntry(((("address_" + address) + "_perchesAvailable_") + color), (tryGetInteger(((("address_" + address) + "_perchesAvailable_") + color)) + 1))] ++ validPayment) ++ result._1), result._2) | |
474 | 488 | else throw("Strict value is not equal to itself.") | |
475 | 489 | } | |
476 | 490 | else throw("Strict value is not equal to itself.") | |
477 | 491 | } | |
478 | 492 | else throw("Strict value is not equal to itself.") | |
479 | 493 | } | |
480 | 494 | } | |
481 | 495 | ||
482 | 496 | ||
483 | 497 | ||
484 | 498 | @Callable(i) | |
485 | 499 | func topUpReward () = { | |
486 | 500 | let firstPayment = value(i.payments[0]) | |
487 | 501 | if ((firstPayment.assetId != unit)) | |
488 | 502 | then throw("FBP: You can attach only Waves") | |
489 | 503 | else { | |
490 | 504 | let resHandleStaking = handleStakingTopUp(firstPayment.amount) | |
491 | 505 | $Tuple2(resHandleStaking, true) | |
492 | 506 | } | |
493 | 507 | } | |
494 | 508 | ||
495 | 509 | ||
496 | 510 | ||
497 | 511 | @Callable(i) | |
498 | 512 | func addWavesAndStakeMore () = { | |
499 | 513 | let firstPayment = value(i.payments[0]) | |
500 | 514 | if ((firstPayment.assetId != unit)) | |
501 | 515 | then throw("FBP: You can attach only Waves") | |
502 | 516 | else ([IntegerEntry("global_WAVES_balance", (tryGetInteger("global_WAVES_balance") + firstPayment.amount))] ++ stakeUnstake(true, firstPayment.amount)) | |
503 | 517 | } | |
504 | 518 | ||
505 | 519 | ||
506 | 520 | ||
507 | 521 | @Callable(i) | |
508 | 522 | func claimReward (assetId) = { | |
509 | 523 | let validPayment = checkAdditionalPayment(i.payments[0]) | |
510 | 524 | if ((validPayment == validPayment)) | |
511 | 525 | then if ((tryGetString((assetId + "_owner")) != toString(i.caller))) | |
512 | 526 | then throw((("You don't own this duck (" + assetId) + ")!! ")) | |
513 | 527 | else if ((size(i.payments) > 1)) | |
514 | 528 | then throw("Please don't add extra payments") | |
515 | 529 | else { | |
516 | 530 | let owner = toString(i.caller) | |
517 | 531 | let result = claimStakingResult(owner, assetId, true) | |
518 | 532 | $Tuple2((validPayment ++ result._1), result._2) | |
519 | 533 | } | |
520 | 534 | else throw("Strict value is not equal to itself.") | |
521 | 535 | } | |
522 | 536 | ||
523 | 537 | ||
524 | 538 | @Verifier(tx) | |
525 | 539 | func verify () = if (isTestEnv()) | |
526 | 540 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
527 | 541 | else { | |
528 | 542 | let firstUser = base58'6TdaXEfhnjYquvPf3yV7MFxt2CbgFmaqsvGwkKfXtKi4' | |
529 | 543 | let secondUser = base58'7DsP2WaMLocbHuUxux7pbXRjTrrZ1TFQPsi5QumS3gr8' | |
530 | 544 | let thirdUser = base58'BpFWP3p3JgYrrP45xfrKzeMcWMEXoinj4FVPPkUiA8D3' | |
531 | 545 | let firstUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], firstUser)) | |
532 | 546 | then 1 | |
533 | 547 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], firstUser)) | |
534 | 548 | then 1 | |
535 | 549 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], firstUser)) | |
536 | 550 | then 1 | |
537 | 551 | else 0 | |
538 | 552 | let secondUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], secondUser)) | |
539 | 553 | then 1 | |
540 | 554 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], secondUser)) | |
541 | 555 | then 1 | |
542 | 556 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], secondUser)) | |
543 | 557 | then 1 | |
544 | 558 | else 0 | |
545 | 559 | let thirdUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], thirdUser)) | |
546 | 560 | then 1 | |
547 | 561 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], thirdUser)) | |
548 | 562 | then 1 | |
549 | 563 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], thirdUser)) | |
550 | 564 | then 1 | |
551 | 565 | else 0 | |
552 | 566 | let signaturesCount = ((firstUserSigned + secondUserSigned) + thirdUserSigned) | |
553 | 567 | match tx { | |
554 | 568 | case _ => | |
555 | 569 | (signaturesCount >= 2) | |
556 | 570 | } | |
557 | 571 | } | |
558 | 572 |
github/deemru/w8io/169f3d6 85.39 ms ◑