tx · GumCjFkMm5ghE2tdDhZqd3JbHqMmtMTo7X8SMPhLA2Uu 3MpLKSQezEyHJk8jn9ikzAaaGuRzy5STBLZ: -0.01900000 Waves 2024.11.08 23:54 [3362992] smart account 3MpLKSQezEyHJk8jn9ikzAaaGuRzy5STBLZ > SELF 0.00000000 Waves
{ "type": 13, "id": "GumCjFkMm5ghE2tdDhZqd3JbHqMmtMTo7X8SMPhLA2Uu", "fee": 1900000, "feeAssetId": null, "timestamp": 1731099289503, "version": 2, "chainId": 84, "sender": "3MpLKSQezEyHJk8jn9ikzAaaGuRzy5STBLZ", "senderPublicKey": "GhefFZdofgfUzRS6kfAZpyXdgER7eYvz5umnwJW1MWtc", "proofs": [ "4FHvTBEeyQPA6o4UxVC76n7LUvXxpvoUxsv5wyHQcvS6MSRMukRKHbYS8uPR7NedR1MCExAfPnEdfqrv6yYUwGQt" ], "script": "base64:BgIkCAISAwoBCBIAEgMKAQgSBQoDCAgBEgYKBAgIAQESAwoBCBIAPQEUdHJ5R2V0U3RyaW5nRXh0ZXJuYWwCB2FkZHJlc3MDa2V5BAckbWF0Y2gwCQCdCAIFB2FkZHJlc3MFA2tleQMJAAECBQckbWF0Y2gwAgZTdHJpbmcEAWEFByRtYXRjaDAFAWECAAEVdHJ5R2V0SW50ZWdlckV4dGVybmFsAgdhZGRyZXNzA2tleQQHJG1hdGNoMAkAmggCBQdhZGRyZXNzBQNrZXkDCQABAgUHJG1hdGNoMAIDSW50BAFiBQckbWF0Y2gwBQFiAAABDXRyeUdldEJvb2xlYW4BA2tleQQHJG1hdGNoMAkAoAgBBQNrZXkDCQABAgUHJG1hdGNoMAIHQm9vbGVhbgQBYgUHJG1hdGNoMAUBYgcBDHRyeUdldFN0cmluZwEDa2V5CQEUdHJ5R2V0U3RyaW5nRXh0ZXJuYWwCBQR0aGlzBQNrZXkBCWFzQm9vbGVhbgEFdmFsdWUEByRtYXRjaDAFBXZhbHVlAwkAAQIFByRtYXRjaDACB0Jvb2xlYW4EB2J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ZpcnN0VXNlcgABAAAEEHNlY29uZFVzZXJTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQpzZWNvbmRVc2VyAAEDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwABBQpzZWNvbmRVc2VyAAEDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwACBQpzZWNvbmRVc2VyAAEAAAQPdGhpcmRVc2VyU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUJdGhpcmRVc2VyAAEDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwABBQl0aGlyZFVzZXIAAQMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAIFCXRoaXJkVXNlcgABAAAED3NpZ25hdHVyZXNDb3VudAkAZAIJAGQCBQ9maXJzdFVzZXJTaWduZWQFEHNlY29uZFVzZXJTaWduZWQFD3RoaXJkVXNlclNpZ25lZAQHJG1hdGNoMAUCdHgJAGcCBQ9zaWduYXR1cmVzQ291bnQAArUktFY=", "height": 3362992, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CBrwz3KgCufGLQwWEBywDUhsvPkkikMp8Q7rw52zmqjM Next: E9RTSco73GeWnFBCgH4WnepQ6BbHXeJAfGugT6FGHDoN Diff:
Old | New | Differences | |
---|---|---|---|
388 | 388 | let topup = invoke(getTurtleStakingAddress(), "topUpReward", nil, [AttachedPayment(getSpiceAssetId(), (currentPayment / 2))]) | |
389 | 389 | if ((topup == topup)) | |
390 | 390 | then { | |
391 | - | let recordAction = if ((currentPayment >= 1000000000)) | |
392 | - | then invoke(getCouponsAddress(), "recordAction", ["FEEDDUCKLING10"], nil) | |
393 | - | else nil | |
394 | - | if ((recordAction == recordAction)) | |
395 | - | then if (if ((ducklingOwner != toString(i.caller))) | |
396 | - | then !(isTestEnv()) | |
397 | - | else false) | |
398 | - | then ([BooleanEntry(keyBlacklisted(realDucklingId), true)] ++ feeValidate) | |
399 | - | else ([IntegerEntry(kAddressNonce, (currentNonce + 1)), IntegerEntry(kTotalFeed, (totalFeed + currentPayment)), IntegerEntry(kTotalFeedUser, (totalFeedUser + currentPayment)), IntegerEntry(kFeedTxStats, currentPayment), StringEntry(kNewLevel, calculateResults._1), StringEntry((kFeedTxStats + "_debug"), makeString(calculateResults._2, ";")), Burn(getSpiceAssetId(), (currentPayment / 2))] ++ feeValidate) | |
391 | + | let topup2 = invoke(getMutantFarmingAddress(), "topUpReward", ["SPICE", 0], [AttachedPayment(getSpiceAssetId(), (currentPayment / 10))]) | |
392 | + | if ((topup2 == topup2)) | |
393 | + | then { | |
394 | + | let recordAction = if ((currentPayment >= 1000000000)) | |
395 | + | then invoke(getCouponsAddress(), "recordAction", ["FEEDDUCKLING10"], nil) | |
396 | + | else nil | |
397 | + | if ((recordAction == recordAction)) | |
398 | + | then if (if ((ducklingOwner != toString(i.caller))) | |
399 | + | then !(isTestEnv()) | |
400 | + | else false) | |
401 | + | then ([BooleanEntry(keyBlacklisted(realDucklingId), true)] ++ feeValidate) | |
402 | + | else ([IntegerEntry(kAddressNonce, (currentNonce + 1)), IntegerEntry(kTotalFeed, (totalFeed + currentPayment)), IntegerEntry(kTotalFeedUser, (totalFeedUser + currentPayment)), IntegerEntry(kFeedTxStats, currentPayment), StringEntry(kNewLevel, calculateResults._1), StringEntry((kFeedTxStats + "_debug"), makeString(calculateResults._2, ";")), Burn(getSpiceAssetId(), (currentPayment / 2))] ++ feeValidate) | |
403 | + | else throw("Strict value is not equal to itself.") | |
404 | + | } | |
400 | 405 | else throw("Strict value is not equal to itself.") | |
401 | 406 | } | |
402 | 407 | else throw("Strict value is not equal to itself.") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func tryGetStringExternal (address,key) = match getString(address, key) { | |
5 | 5 | case a: String => | |
6 | 6 | a | |
7 | 7 | case _ => | |
8 | 8 | "" | |
9 | 9 | } | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func tryGetIntegerExternal (address,key) = match getInteger(address, key) { | |
13 | 13 | case b: Int => | |
14 | 14 | b | |
15 | 15 | case _ => | |
16 | 16 | 0 | |
17 | 17 | } | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func tryGetBoolean (key) = match getBoolean(key) { | |
21 | 21 | case b: Boolean => | |
22 | 22 | b | |
23 | 23 | case _ => | |
24 | 24 | false | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func tryGetString (key) = tryGetStringExternal(this, key) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func asBoolean (value) = match value { | |
32 | 32 | case boolean: Boolean => | |
33 | 33 | boolean | |
34 | 34 | case _ => | |
35 | 35 | throw("BDA: wrong type, expected: Boolean") | |
36 | 36 | } | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func staticKey_oracleAddress () = "static_oracleAddress" | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func staticKey_ducklingPrice () = "static_ducklingPrice" | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func staticKey_eggAssetId () = "static_eggAssetId" | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func staticKey_spiceAssetId () = "static_spiceAssetId" | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func staticKey_rebirthAddress () = "static_rebirthAddress" | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func staticKey_incubatorAddress () = "static_incubatorAddress" | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func staticKey_couponsAddress () = "static_couponsAddress" | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func staticKey_burnAddress () = "static_burnAddress" | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func staticKey_refContractAddress () = "static_refContractAddress" | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func staticKey_backendPubKey () = "static_backendPubKey" | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func staticKey_extraFee () = "static_extraFee" | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func staticKey_feeAggregator () = "static_feeAggregator" | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func staticKey_turtleStakingAddress () = "static_turtleStakingAddress" | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func staticKey_mutantFarmingAddress () = "static_mutantFarmingAddress" | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func staticKey_canineRebirthAddress () = "static_canineRebirthAddress" | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func staticKey_felineRebirthAddress () = "static_felineRebirthAddress" | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func getOracle () = Address(fromBase58String(tryGetString(staticKey_oracleAddress()))) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func getDucklingPrice () = tryGetIntegerExternal(getOracle(), staticKey_ducklingPrice()) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func getEggAssetId () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_eggAssetId())) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func getSpiceAssetId () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_spiceAssetId())) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func getRebirthAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_rebirthAddress()))) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func getIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_incubatorAddress()))) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func getCouponsAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_couponsAddress()))) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func getBurnAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_burnAddress()))) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func getRefContractAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_refContractAddress()))) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func getFeeAggregator () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_feeAggregator()))) | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func getTurtleStakingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleStakingAddress()))) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func getMutantFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_mutantFarmingAddress()))) | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func getCanineRebirthAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_canineRebirthAddress()))) | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func getFelineRebirthAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_felineRebirthAddress()))) | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | let backendPubKey = fromBase58String(getStringValue(getOracle(), staticKey_backendPubKey())) | |
130 | 130 | ||
131 | 131 | let DUCKLINGPRICE = 100000000 | |
132 | 132 | ||
133 | 133 | let percentGrowthPrecision = 10000000000000000 | |
134 | 134 | ||
135 | 135 | let oneSpicePrecsion = 100000000000000 | |
136 | 136 | ||
137 | 137 | let KGlobalIssuedTimestamp = "global_issued_timestamp" | |
138 | 138 | ||
139 | 139 | let DUCKLINGPRICEOLD = 80000000 | |
140 | 140 | ||
141 | 141 | let percentGrowthPrecisionOld = 10000000000000000 | |
142 | 142 | ||
143 | 143 | func checkAdditionalPayment (payment) = if (isDefined(payment.assetId)) | |
144 | 144 | then throw("BDCAP: Please attach waves") | |
145 | 145 | else { | |
146 | 146 | let feeAmount = getIntegerValue(getOracle(), staticKey_extraFee()) | |
147 | 147 | if ((payment.amount != feeAmount)) | |
148 | 148 | then throw((("BDCAP: Please attach exactly " + toString(feeAmount)) + " amount of wavelets")) | |
149 | 149 | else [ScriptTransfer(getFeeAggregator(), feeAmount, unit)] | |
150 | 150 | } | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func keyTotalFeedOld (ducklingId) = (("duckling_" + ducklingId) + "_feed") | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func keyTotalFeed (ducklingId) = (("duckling_" + ducklingId) + "_feed_spice") | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func keyTotalFeedUser (address) = (("user_" + address) + "_feed") | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func keyAddressNonce (address) = (("address_" + address) + "_nonce") | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func keyDucklingLevel (ducklingId) = (("duckling_" + ducklingId) + "_level") | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func keyDucklingGrown (ducklingId) = (("duckling_" + ducklingId) + "_grown") | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func keyStartPercentage (ducklingId) = (("duckling_" + ducklingId) + "_startPercentage") | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func keyOwner (ducklingId) = (("duckling_" + ducklingId) + "_owner") | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func keyBlacklisted (ducklingId) = (("duckling_" + ducklingId) + "_blacklisted") | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | func keyAmountOfAdultDuckling () = "adult_ducklings" | |
181 | 181 | ||
182 | 182 | ||
183 | 183 | func tryGetInteger (key) = { | |
184 | 184 | let val = match getInteger(this, key) { | |
185 | 185 | case b: Int => | |
186 | 186 | b | |
187 | 187 | case _ => | |
188 | 188 | 0 | |
189 | 189 | } | |
190 | 190 | val | |
191 | 191 | } | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | func getBool (key) = match getBoolean(this, key) { | |
195 | 195 | case b: Boolean => | |
196 | 196 | b | |
197 | 197 | case _ => | |
198 | 198 | false | |
199 | 199 | } | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | func isTestEnv () = getBool("TESTENV") | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | func getDucklingPercentage (ducklingId) = { | |
206 | 206 | let percentageDuckling = tryGetInteger(keyStartPercentage(ducklingId)) | |
207 | 207 | let base = if ((percentageDuckling != 0)) | |
208 | 208 | then percentageDuckling | |
209 | 209 | else 5 | |
210 | 210 | toBigInt((base * oneSpicePrecsion)) | |
211 | 211 | } | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | func getCurrentLevelBigInt (ducklingId) = { | |
215 | 215 | let kDuckLevel = keyDucklingLevel(ducklingId) | |
216 | 216 | match getString(kDuckLevel) { | |
217 | 217 | case s: String => | |
218 | 218 | parseBigIntValue(s) | |
219 | 219 | case _ => | |
220 | 220 | match getBoolean((("duckling_" + ducklingId) + "_issuedByFeedCall")) { | |
221 | 221 | case b: Boolean => | |
222 | 222 | if (if ((b == true)) | |
223 | 223 | then (tryGetInteger(keyStartPercentage(ducklingId)) == 0) | |
224 | 224 | else false) | |
225 | 225 | then toBigInt(0) | |
226 | 226 | else getDucklingPercentage(ducklingId) | |
227 | 227 | case _ => | |
228 | 228 | getDucklingPercentage(ducklingId) | |
229 | 229 | } | |
230 | 230 | } | |
231 | 231 | } | |
232 | 232 | ||
233 | 233 | ||
234 | 234 | func calculateNewDucklingLevel (ducklingId,paymentAmount) = { | |
235 | 235 | let currentTs = lastBlock.timestamp | |
236 | 236 | let growth = (fraction(toBigInt(paymentAmount), toBigInt(percentGrowthPrecision), toBigInt(DUCKLINGPRICE)) / toBigInt(100)) | |
237 | 237 | let currentLevel = getCurrentLevelBigInt(ducklingId) | |
238 | 238 | let newLevel = (currentLevel + growth) | |
239 | 239 | let result = toString(newLevel) | |
240 | 240 | $Tuple2(result, [("currentLevel=" + toString(currentLevel)), ("newLevel=" + toString(newLevel)), ("growth=" + toString(growth))]) | |
241 | 241 | } | |
242 | 242 | ||
243 | 243 | ||
244 | 244 | func getBackendProof (maxFeedAmount,userNonce,address) = makeString([toString(maxFeedAmount), toString(userNonce), address], ";") | |
245 | 245 | ||
246 | 246 | ||
247 | 247 | func asInt (value) = match value { | |
248 | 248 | case int: Int => | |
249 | 249 | int | |
250 | 250 | case _ => | |
251 | 251 | throw("BAI: wrong type, expected: Int") | |
252 | 252 | } | |
253 | 253 | ||
254 | 254 | ||
255 | 255 | @Callable(i) | |
256 | 256 | func configureOracle (oracle) = if ((i.caller != this)) | |
257 | 257 | then throw("BCO: admin only") | |
258 | 258 | else [StringEntry(staticKey_oracleAddress(), oracle)] | |
259 | 259 | ||
260 | 260 | ||
261 | 261 | ||
262 | 262 | @Callable(i) | |
263 | 263 | func calculateDucklingPriceTwoDecimals () = { | |
264 | 264 | let x = tryGetInteger(keyAmountOfAdultDuckling()) | |
265 | 265 | let price = max([(1900 + pow(x, 0, 6, 1, 2, HALFUP)), 10000]) | |
266 | 266 | $Tuple2([StringEntry("DEBUG_PRICE", toString(price))], price) | |
267 | 267 | } | |
268 | 268 | ||
269 | 269 | ||
270 | 270 | ||
271 | 271 | @Callable(i) | |
272 | 272 | func buyDuckling (refererAddress) = { | |
273 | 273 | let feeValidate = checkAdditionalPayment(i.payments[0]) | |
274 | 274 | if ((feeValidate == feeValidate)) | |
275 | 275 | then { | |
276 | 276 | let exactPrice = getDucklingPrice() | |
277 | 277 | if ((50000000 > exactPrice)) | |
278 | 278 | then throw("BBD: Invalid price from oracle!") | |
279 | 279 | else { | |
280 | 280 | let amountPaidByCoupons = asInt(invoke(getCouponsAddress(), "useCoupons", [exactPrice], nil)) | |
281 | 281 | if ((amountPaidByCoupons == amountPaidByCoupons)) | |
282 | 282 | then { | |
283 | 283 | let leftToPay = (exactPrice - amountPaidByCoupons) | |
284 | 284 | let payment = if ((leftToPay != 0)) | |
285 | 285 | then { | |
286 | 286 | let firstPayment = value(i.payments[1]) | |
287 | 287 | if ((firstPayment.assetId != getEggAssetId())) | |
288 | 288 | then throw(("BBD: You can attach only EGG tokens with the following asset id: " + toBase58String(getEggAssetId()))) | |
289 | 289 | else if ((firstPayment.amount != leftToPay)) | |
290 | 290 | then throw(("BBD: To buy a perch you currently need the following amount of EGGlets: " + toString(leftToPay))) | |
291 | 291 | else { | |
292 | 292 | let refererRewardForPerch = fraction(leftToPay, 5, 100) | |
293 | 293 | let refCall = asBoolean(invoke(getRefContractAddress(), "refPayment", [refererAddress], [AttachedPayment(getEggAssetId(), refererRewardForPerch)])) | |
294 | 294 | if ((refCall == refCall)) | |
295 | 295 | then { | |
296 | 296 | let toBurn = if (refCall) | |
297 | 297 | then (leftToPay - refererRewardForPerch) | |
298 | 298 | else leftToPay | |
299 | 299 | let burnCall = invoke(getBurnAddress(), "burnAttachedPayments", nil, [AttachedPayment(getEggAssetId(), toBurn)]) | |
300 | 300 | if ((burnCall == burnCall)) | |
301 | 301 | then leftToPay | |
302 | 302 | else throw("Strict value is not equal to itself.") | |
303 | 303 | } | |
304 | 304 | else throw("Strict value is not equal to itself.") | |
305 | 305 | } | |
306 | 306 | } | |
307 | 307 | else 0 | |
308 | 308 | if ((payment == payment)) | |
309 | 309 | then { | |
310 | 310 | let ducklingAssetId = invoke(this, "issueFreeDuckling", [toString(i.originCaller), toBase58String(i.transactionId), 0], nil) | |
311 | 311 | if ((ducklingAssetId == ducklingAssetId)) | |
312 | 312 | then feeValidate | |
313 | 313 | else throw("Strict value is not equal to itself.") | |
314 | 314 | } | |
315 | 315 | else throw("Strict value is not equal to itself.") | |
316 | 316 | } | |
317 | 317 | else throw("Strict value is not equal to itself.") | |
318 | 318 | } | |
319 | 319 | } | |
320 | 320 | else throw("Strict value is not equal to itself.") | |
321 | 321 | } | |
322 | 322 | ||
323 | 323 | ||
324 | 324 | ||
325 | 325 | @Callable(i) | |
326 | 326 | func issueFreeDuckling (address,txIdStr,percentage) = if (if (if (if ((i.caller != this)) | |
327 | 327 | then (i.caller != getRebirthAddress()) | |
328 | 328 | else false) | |
329 | 329 | then (i.caller != getCanineRebirthAddress()) | |
330 | 330 | else false) | |
331 | 331 | then (i.caller != getFelineRebirthAddress()) | |
332 | 332 | else false) | |
333 | 333 | then throw("BIFD: You can't issue free duckling") | |
334 | 334 | else { | |
335 | 335 | let asset = Issue("BABY-11111111-GZ", "", 1, 0, false, unit, height) | |
336 | 336 | let assetId = calculateAssetId(asset) | |
337 | 337 | $Tuple2([StringEntry((((address + "_") + txIdStr) + "_di"), toBase58String(assetId)), IntegerEntry("stats_amount", (tryGetInteger("stats_amount") + 1)), IntegerEntry(keyStartPercentage(toBase58String(assetId)), percentage), StringEntry(keyOwner(toBase58String(assetId)), address), asset, ScriptTransfer(value(addressFromString(address)), 1, assetId)], toBase58String(assetId)) | |
338 | 338 | } | |
339 | 339 | ||
340 | 340 | ||
341 | 341 | ||
342 | 342 | @Callable(i) | |
343 | 343 | func feedDuckling (ducklingId,backendSignature,maxFeedAmount,userNonce) = { | |
344 | 344 | let feeValidate = checkAdditionalPayment(i.payments[1]) | |
345 | 345 | if ((feeValidate == feeValidate)) | |
346 | 346 | then { | |
347 | 347 | let addressString = toString(i.caller) | |
348 | 348 | let backendProof = getBackendProof(maxFeedAmount, userNonce, addressString) | |
349 | 349 | let kAddressNonce = keyAddressNonce(addressString) | |
350 | 350 | let currentNonce = tryGetInteger(kAddressNonce) | |
351 | 351 | let realDucklingId = if (!(sigVerify_8Kb(toBytes(backendProof), fromBase58String(backendSignature), backendPubKey))) | |
352 | 352 | then throw("BFD: Invalid proof from backend") | |
353 | 353 | else if (if ((size(i.payments) != 2)) | |
354 | 354 | then true | |
355 | 355 | else (value(i.payments[0]).assetId != getSpiceAssetId())) | |
356 | 356 | then throw("BFD: Bad payment attached (asset[s] or amount)") | |
357 | 357 | else if (getBool(keyDucklingGrown(ducklingId))) | |
358 | 358 | then throw("BFD: Duckling is already grown") | |
359 | 359 | else if ((userNonce != (currentNonce + 1))) | |
360 | 360 | then throw(((("BFD: User Nonce should be " + toString(currentNonce)) + " + 1, while received ") + toString(userNonce))) | |
361 | 361 | else { | |
362 | 362 | let blackListed = tryGetBoolean(keyBlacklisted(ducklingId)) | |
363 | 363 | if (blackListed) | |
364 | 364 | then throw("BFD: Can not feed blacklisted duckling!") | |
365 | 365 | else if ((ducklingId == "")) | |
366 | 366 | then throw("BFD: Please buy a duckling first!") | |
367 | 367 | else { | |
368 | 368 | let ducklingIdCheck = value(assetInfo(fromBase58String(ducklingId))) | |
369 | 369 | if ((assetBalance(i.caller, ducklingIdCheck.id) != 1)) | |
370 | 370 | then throw("BFD: You're not the owner of the duckling") | |
371 | 371 | else if ((ducklingIdCheck.issuer != this)) | |
372 | 372 | then throw("BFD: Cant find duckling with such id") | |
373 | 373 | else toBase58String(ducklingIdCheck.id) | |
374 | 374 | } | |
375 | 375 | } | |
376 | 376 | let currentPayment = value(i.payments[0]).amount | |
377 | 377 | let kNewLevel = keyDucklingLevel(realDucklingId) | |
378 | 378 | let kTotalFeed = keyTotalFeed(realDucklingId) | |
379 | 379 | let kTotalFeedUser = keyTotalFeedUser(addressString) | |
380 | 380 | let totalFeed = tryGetInteger(kTotalFeed) | |
381 | 381 | let totalFeedUser = tryGetInteger(kTotalFeedUser) | |
382 | 382 | let kFeedTxStats = ((("duckling_" + realDucklingId) + "_stat_") + toString(lastBlock.timestamp)) | |
383 | 383 | if ((currentPayment > maxFeedAmount)) | |
384 | 384 | then throw(("BFD: Cannot feed duckling for such amount, max feed amount is: " + toString(maxFeedAmount))) | |
385 | 385 | else { | |
386 | 386 | let calculateResults = calculateNewDucklingLevel(realDucklingId, currentPayment) | |
387 | 387 | let ducklingOwner = tryGetString(keyOwner(realDucklingId)) | |
388 | 388 | let topup = invoke(getTurtleStakingAddress(), "topUpReward", nil, [AttachedPayment(getSpiceAssetId(), (currentPayment / 2))]) | |
389 | 389 | if ((topup == topup)) | |
390 | 390 | then { | |
391 | - | let recordAction = if ((currentPayment >= 1000000000)) | |
392 | - | then invoke(getCouponsAddress(), "recordAction", ["FEEDDUCKLING10"], nil) | |
393 | - | else nil | |
394 | - | if ((recordAction == recordAction)) | |
395 | - | then if (if ((ducklingOwner != toString(i.caller))) | |
396 | - | then !(isTestEnv()) | |
397 | - | else false) | |
398 | - | then ([BooleanEntry(keyBlacklisted(realDucklingId), true)] ++ feeValidate) | |
399 | - | else ([IntegerEntry(kAddressNonce, (currentNonce + 1)), IntegerEntry(kTotalFeed, (totalFeed + currentPayment)), IntegerEntry(kTotalFeedUser, (totalFeedUser + currentPayment)), IntegerEntry(kFeedTxStats, currentPayment), StringEntry(kNewLevel, calculateResults._1), StringEntry((kFeedTxStats + "_debug"), makeString(calculateResults._2, ";")), Burn(getSpiceAssetId(), (currentPayment / 2))] ++ feeValidate) | |
391 | + | let topup2 = invoke(getMutantFarmingAddress(), "topUpReward", ["SPICE", 0], [AttachedPayment(getSpiceAssetId(), (currentPayment / 10))]) | |
392 | + | if ((topup2 == topup2)) | |
393 | + | then { | |
394 | + | let recordAction = if ((currentPayment >= 1000000000)) | |
395 | + | then invoke(getCouponsAddress(), "recordAction", ["FEEDDUCKLING10"], nil) | |
396 | + | else nil | |
397 | + | if ((recordAction == recordAction)) | |
398 | + | then if (if ((ducklingOwner != toString(i.caller))) | |
399 | + | then !(isTestEnv()) | |
400 | + | else false) | |
401 | + | then ([BooleanEntry(keyBlacklisted(realDucklingId), true)] ++ feeValidate) | |
402 | + | else ([IntegerEntry(kAddressNonce, (currentNonce + 1)), IntegerEntry(kTotalFeed, (totalFeed + currentPayment)), IntegerEntry(kTotalFeedUser, (totalFeedUser + currentPayment)), IntegerEntry(kFeedTxStats, currentPayment), StringEntry(kNewLevel, calculateResults._1), StringEntry((kFeedTxStats + "_debug"), makeString(calculateResults._2, ";")), Burn(getSpiceAssetId(), (currentPayment / 2))] ++ feeValidate) | |
403 | + | else throw("Strict value is not equal to itself.") | |
404 | + | } | |
400 | 405 | else throw("Strict value is not equal to itself.") | |
401 | 406 | } | |
402 | 407 | else throw("Strict value is not equal to itself.") | |
403 | 408 | } | |
404 | 409 | } | |
405 | 410 | else throw("Strict value is not equal to itself.") | |
406 | 411 | } | |
407 | 412 | ||
408 | 413 | ||
409 | 414 | ||
410 | 415 | @Callable(i) | |
411 | 416 | func fixLevels (ducklingIds) = if (if ((i.callerPublicKey != base58'GDxBbsDRmeY39quNrDsTXKJzFWbQVtjxHseF4ikxZ7n9')) | |
412 | 417 | then (i.caller != this) | |
413 | 418 | else false) | |
414 | 419 | then throw("BFL: Not authorized") | |
415 | 420 | else { | |
416 | 421 | let ducklingIdsList = value(split(ducklingIds, ",")) | |
417 | 422 | func handleId (acc,id) = { | |
418 | 423 | let kTotalFeed = keyTotalFeed(id) | |
419 | 424 | let totalFeed = tryGetInteger(kTotalFeed) | |
420 | 425 | let kTotalFeedOld = keyTotalFeedOld(id) | |
421 | 426 | let totalFeedOld = tryGetInteger(kTotalFeedOld) | |
422 | 427 | let kNewLevel = keyDucklingLevel(id) | |
423 | 428 | let startingLevel = match getBoolean((("duckling_" + id) + "_issuedByFeedCall")) { | |
424 | 429 | case b: Boolean => | |
425 | 430 | if (if ((b == true)) | |
426 | 431 | then (tryGetInteger(keyStartPercentage(id)) == 0) | |
427 | 432 | else false) | |
428 | 433 | then toBigInt(0) | |
429 | 434 | else getDucklingPercentage(id) | |
430 | 435 | case _ => | |
431 | 436 | getDucklingPercentage(id) | |
432 | 437 | } | |
433 | 438 | let growth = fraction(toBigInt((totalFeed / 100)), toBigInt(percentGrowthPrecision), toBigInt(DUCKLINGPRICE)) | |
434 | 439 | let growthOld = if ((totalFeedOld != 0)) | |
435 | 440 | then fraction(toBigInt(totalFeedOld), toBigInt(percentGrowthPrecisionOld), toBigInt(DUCKLINGPRICEOLD)) | |
436 | 441 | else toBigInt(0) | |
437 | 442 | (acc ++ [StringEntry(kNewLevel, toString(((startingLevel + growth) + growthOld))), StringEntry("DEBUG", ((((toString(startingLevel) + " ") + toString(growth)) + " ") + toString(growthOld)))]) | |
438 | 443 | } | |
439 | 444 | ||
440 | 445 | let $l = ducklingIdsList | |
441 | 446 | let $s = size($l) | |
442 | 447 | let $acc0 = nil | |
443 | 448 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
444 | 449 | then $a | |
445 | 450 | else handleId($a, $l[$i]) | |
446 | 451 | ||
447 | 452 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
448 | 453 | then $a | |
449 | 454 | else throw("List size exceeds 20") | |
450 | 455 | ||
451 | 456 | $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) | |
452 | 457 | } | |
453 | 458 | ||
454 | 459 | ||
455 | 460 | ||
456 | 461 | @Callable(i) | |
457 | 462 | func turnDucklingIntoDuck () = { | |
458 | 463 | let feeValidate = checkAdditionalPayment(i.payments[1]) | |
459 | 464 | if ((feeValidate == feeValidate)) | |
460 | 465 | then { | |
461 | 466 | let address = toString(i.caller) | |
462 | 467 | let txId = toBase58String(i.transactionId) | |
463 | 468 | let lastIssuedDucklingTs = tryGetInteger(KGlobalIssuedTimestamp) | |
464 | 469 | let fiveMinInMs = ((1 * 30) * 1000) | |
465 | 470 | let timeDiff = (lastBlock.timestamp - (lastIssuedDucklingTs + fiveMinInMs)) | |
466 | 471 | if (if ((lastIssuedDucklingTs > 0)) | |
467 | 472 | then (0 > timeDiff) | |
468 | 473 | else false) | |
469 | 474 | then throw((("BTD: Can issue ducklings only once per 30s, please wait for " + toString(fraction(timeDiff, 1, 1000))) + " sec.")) | |
470 | 475 | else if ((size(i.payments) != 2)) | |
471 | 476 | then throw("BTD: Bad payment attached (asset[s] or amount)") | |
472 | 477 | else if ((i.payments[0].amount != 1)) | |
473 | 478 | then throw("BTD: Please attach a nft!") | |
474 | 479 | else { | |
475 | 480 | let pmt = value(assetInfo(value(value(i.payments[0]).assetId))) | |
476 | 481 | let blackListed = tryGetBoolean(keyBlacklisted(toBase58String(pmt.id))) | |
477 | 482 | if (blackListed) | |
478 | 483 | then throw("BTD: Can not convert blacklisted duckling!") | |
479 | 484 | else { | |
480 | 485 | let adultPriceCall = asInt(invoke(this, "calculateDucklingPriceTwoDecimals", nil, nil)) | |
481 | 486 | if ((adultPriceCall == adultPriceCall)) | |
482 | 487 | then { | |
483 | 488 | let normalizedPrice = fraction(adultPriceCall, oneSpicePrecsion, 100) | |
484 | 489 | if ((toBigInt(normalizedPrice) > getCurrentLevelBigInt(toBase58String(pmt.id)))) | |
485 | 490 | then throw("BTD: Duckling is not grown yet...") | |
486 | 491 | else if ((pmt.issuer != this)) | |
487 | 492 | then throw("BTD: Can use only ducklings from this dApp") | |
488 | 493 | else { | |
489 | 494 | let call = invoke(getIncubatorAddress(), "startDuckHatching", [""], nil) | |
490 | 495 | if ((call == call)) | |
491 | 496 | then { | |
492 | 497 | let kDucklingGrown = keyDucklingGrown(toBase58String(pmt.id)) | |
493 | 498 | ([BooleanEntry(kDucklingGrown, true), IntegerEntry(KGlobalIssuedTimestamp, lastBlock.timestamp), IntegerEntry(keyAmountOfAdultDuckling(), (tryGetInteger(keyAmountOfAdultDuckling()) + 1))] ++ feeValidate) | |
494 | 499 | } | |
495 | 500 | else throw("Strict value is not equal to itself.") | |
496 | 501 | } | |
497 | 502 | } | |
498 | 503 | else throw("Strict value is not equal to itself.") | |
499 | 504 | } | |
500 | 505 | } | |
501 | 506 | } | |
502 | 507 | else throw("Strict value is not equal to itself.") | |
503 | 508 | } | |
504 | 509 | ||
505 | 510 | ||
506 | 511 | @Verifier(tx) | |
507 | 512 | func verify () = if (isTestEnv()) | |
508 | 513 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
509 | 514 | else { | |
510 | 515 | let firstUser = base58'6TdaXEfhnjYquvPf3yV7MFxt2CbgFmaqsvGwkKfXtKi4' | |
511 | 516 | let secondUser = base58'7DsP2WaMLocbHuUxux7pbXRjTrrZ1TFQPsi5QumS3gr8' | |
512 | 517 | let thirdUser = base58'BpFWP3p3JgYrrP45xfrKzeMcWMEXoinj4FVPPkUiA8D3' | |
513 | 518 | let firstUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], firstUser)) | |
514 | 519 | then 1 | |
515 | 520 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], firstUser)) | |
516 | 521 | then 1 | |
517 | 522 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], firstUser)) | |
518 | 523 | then 1 | |
519 | 524 | else 0 | |
520 | 525 | let secondUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], secondUser)) | |
521 | 526 | then 1 | |
522 | 527 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], secondUser)) | |
523 | 528 | then 1 | |
524 | 529 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], secondUser)) | |
525 | 530 | then 1 | |
526 | 531 | else 0 | |
527 | 532 | let thirdUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], thirdUser)) | |
528 | 533 | then 1 | |
529 | 534 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], thirdUser)) | |
530 | 535 | then 1 | |
531 | 536 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], thirdUser)) | |
532 | 537 | then 1 | |
533 | 538 | else 0 | |
534 | 539 | let signaturesCount = ((firstUserSigned + secondUserSigned) + thirdUserSigned) | |
535 | 540 | match tx { | |
536 | 541 | case _ => | |
537 | 542 | (signaturesCount >= 2) | |
538 | 543 | } | |
539 | 544 | } | |
540 | 545 |
github/deemru/w8io/026f985 75.06 ms ◑