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:BgIyCAISAwoBCBIECgIIARIDCgEIEgQKAggBEgMKAQgSBAoCCAESAwoBARIDCgEIEgMKAQg6AQlpc1Rlc3RFbnYABAd0ZXN0ZW52BAckbWF0Y2gwCQCbCAIFBHRoaXMCB1RFU1RFTlYDCQABAgUHJG1hdGNoMAIHQm9vbGVhbgQBeAUHJG1hdGNoMAUBeAcFB3Rlc3RlbnYBFHRyeUdldFN0cmluZ0V4dGVybmFsAgdhZGRyZXNzA2tleQQHJG1hdGNoMAkAnQgCBQdhZGRyZXNzBQNrZXkDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAFhBQckbWF0Y2gwBQFhAgABDXRyeUdldEJvb2xlYW4BA2tleQQHJG1hdGNoMAkAoAgBBQNrZXkDCQABAgUHJG1hdGNoMAIHQm9vbGVhbgQBYgUHJG1hdGNoMAUBYgcBDHRyeUdldFN0cmluZwEDa2V5CQEUdHJ5R2V0U3RyaW5nRXh0ZXJuYWwCBQR0aGlzBQNrZXkBDXRyeUdldEludGVnZXIBA2tleQQHJG1hdGNoMAkAmggCBQR0aGlzBQNrZXkDC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Qc2Vjb25kVXNlclNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFCnNlY29uZFVzZXIAAQMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFCnNlY29uZFVzZXIAAQMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAIFCnNlY29uZFVzZXIAAQAABA90aGlyZFVzZXJTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQl0aGlyZFVzZXIAAQMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFCXRoaXJkVXNlcgABAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAgUJdGhpcmRVc2VyAAEAAAQPc2lnbmF0dXJlc0NvdW50CQBkAgkAZAIFD2ZpcnN0VXNlclNpZ25lZAUQc2Vjb25kVXNlclNpZ25lZAUPdGhpcmRVc2VyU2lnbmVkBAckbWF0Y2gwBQJ0eAkAZwIFD3NpZ25hdHVyZXNDb3VudAACDfmcpg==", "height": 3364107, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2TSPXaAHWVq8Qor35WL4FtbCcsrQXAJWYjfQLuagGBSn Next: none Diff:
Old | New | Differences | |
---|---|---|---|
272 | 272 | ||
273 | 273 | ||
274 | 274 | @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) | |
276 | 278 | then throw("Method only for farming sc!") | |
277 | 279 | else addCouponsInternal(user, amount) | |
278 | 280 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func isTestEnv () = { | |
5 | 5 | let testenv = match getBoolean(this, "TESTENV") { | |
6 | 6 | case x: Boolean => | |
7 | 7 | x | |
8 | 8 | case _ => | |
9 | 9 | false | |
10 | 10 | } | |
11 | 11 | testenv | |
12 | 12 | } | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func tryGetStringExternal (address,key) = match getString(address, key) { | |
16 | 16 | case a: String => | |
17 | 17 | a | |
18 | 18 | case _ => | |
19 | 19 | "" | |
20 | 20 | } | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func tryGetBoolean (key) = match getBoolean(key) { | |
24 | 24 | case b: Boolean => | |
25 | 25 | b | |
26 | 26 | case _ => | |
27 | 27 | false | |
28 | 28 | } | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func tryGetString (key) = tryGetStringExternal(this, key) | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func tryGetInteger (key) = match getInteger(this, key) { | |
35 | 35 | case b: Int => | |
36 | 36 | b | |
37 | 37 | case _ => | |
38 | 38 | 0 | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func getOracle () = Address(fromBase58String(tryGetString("static_oracleAddress"))) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func staticKey_turtleStakingAddress () = "static_turtleStakingAddress" | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func staticKey_turtleRebirthAddress () = "static_turtleRebirthAddress" | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func staticKey_ropeAddress () = "static_ropeAddress" | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func staticKey_levelSystemAddress () = "static_levelSystemAddress" | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func staticKey_spiceAssetId () = "static_spiceAssetId" | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func staticKey_marketplace () = "static_marketplaceAddress" | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func staticKey_capacityAddress () = "static_capacityAddress" | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func staticKey_veggFarmingAddress () = "static_veggFarmingAddress" | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func staticKey_itemsAddress () = "static_itemsAddress" | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func staticKey_mutantFarmingAddress () = "static_mutantFarmingAddress" | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func staticKey_canineBreederAddress () = "static_canineBreederAddress" | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func staticKey_felineBreederAddress () = "static_felineBreederAddress" | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func staticKey_turtleBreederAddress () = "static_turtleBreederAddress" | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func getRebirthAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_rebirthAddress"))) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func getIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_incubatorAddress"))) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func getFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_farmingAddressNew"))) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func getGameDappAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_gameDappAddress"))) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func getCapacityAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_capacityAddress()))) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func getBurnAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_burnAddress"))) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func getBabyduckAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_babyDuckAddress"))) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func getBreedingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_breederAddress"))) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func getMasterAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_cfMasterAddress"))) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func getTurtleStakingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleStakingAddress()))) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func getTurtleRebirthAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleRebirthAddress()))) | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func getRopeAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_ropeAddress()))) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func getSpiceAssetId () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_spiceAssetId())) | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func getLevelSystemAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_levelSystemAddress()))) | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func getMarketPlaceAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_marketplace()))) | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func getVeggFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_veggFarmingAddress()))) | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func getItemsAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_itemsAddress()))) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func getMutantFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_mutantFarmingAddress()))) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func getCanineFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_canineStakingAddress"))) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func getFelineFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), "static_felineStakingAddress"))) | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func getCanineBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_canineBreederAddress()))) | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func getFelineBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_felineBreederAddress()))) | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func getTurtleBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleBreederAddress()))) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | let wAccPKey = fromBase58String(valueOrErrorMessage(getString(getOracle(), "static_warsPKey"), "static_warsPKey not defined")) | |
154 | 154 | ||
155 | 155 | let scCanUseCoupons = [getRebirthAddress(), getIncubatorAddress(), getFarmingAddress(), getGameDappAddress(), getBabyduckAddress(), getBreedingAddress(), getTurtleStakingAddress(), getTurtleRebirthAddress(), getRopeAddress(), getLevelSystemAddress(), getMarketPlaceAddress(), getCapacityAddress(), getMutantFarmingAddress(), getCanineFarmingAddress(), getFelineFarmingAddress(), getCanineBreederAddress(), getFelineBreederAddress(), getTurtleBreederAddress(), this] | |
156 | 156 | ||
157 | 157 | func couponsUserSpend (user) = (user + "_spend") | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func couponsUserActive (user) = (user + "_active") | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func couponsUserActiveOld (user) = (couponsUserActive(user) + "_old") | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func couponsSpendOnSc (sc) = (sc + "_spend_by_using") | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func actionPerAddressPerUserPerDay (user,action,dappAddress,day) = (((((((dappAddress + "_") + action) + "_") + user) + "_") + day) + "_actions") | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func actionPerAddressPerUserLastCheckDay (user,action) = (((action + "_") + user) + "_actions_check_day") | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func actionPerAddressPerUserAmountInARow (user,action) = (((action + "_") + user) + "_actions_amount_in_row") | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func userExperience (user) = (user + "_experience") | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func addCouponsInternal (user,amount) = { | |
182 | 182 | let keyOld = couponsUserActiveOld(user) | |
183 | 183 | let key = couponsUserActive(user) | |
184 | 184 | let couponsOld = tryGetInteger(key) | |
185 | 185 | let coupons = (couponsOld + amount) | |
186 | 186 | [IntegerEntry(keyOld, couponsOld), IntegerEntry(key, coupons)] | |
187 | 187 | } | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | let startTsMs = 1695427200000 | |
191 | 191 | ||
192 | 192 | func calculateDaysSinceStart () = { | |
193 | 193 | let diff = (lastBlock.timestamp - startTsMs) | |
194 | 194 | let daysPassed = (diff / (86400 * 1000)) | |
195 | 195 | daysPassed | |
196 | 196 | } | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | func hasDoneTask7Days (day,address,actionName,rewardAmount,rewardAmountWeekly) = { | |
200 | 200 | let userExperienceKey = userExperience(address) | |
201 | 201 | let userExpTilldate = tryGetInteger(userExperienceKey) | |
202 | 202 | let checkDayKey = actionPerAddressPerUserLastCheckDay(address, actionName) | |
203 | 203 | let daysInRowKey = actionPerAddressPerUserAmountInARow(address, actionName) | |
204 | 204 | let lastCheckDay = tryGetInteger(checkDayKey) | |
205 | 205 | let daysInRow = tryGetInteger(daysInRowKey) | |
206 | 206 | let daysInRowUpdate = if ((lastCheckDay == (day - 1))) | |
207 | 207 | then (daysInRow + 1) | |
208 | 208 | else if (((day - 1) > lastCheckDay)) | |
209 | 209 | then 1 | |
210 | 210 | else 0 | |
211 | 211 | let lastCheckDayUpdate = day | |
212 | 212 | let reward = if ((daysInRowUpdate == 7)) | |
213 | 213 | then [ScriptTransfer(addressFromStringValue(address), rewardAmountWeekly, getSpiceAssetId()), IntegerEntry(daysInRowKey, 0)] | |
214 | 214 | else [IntegerEntry(daysInRowKey, daysInRowUpdate)] | |
215 | 215 | ([IntegerEntry(checkDayKey, lastCheckDayUpdate), ScriptTransfer(addressFromStringValue(address), rewardAmount, getSpiceAssetId()), IntegerEntry(userExperienceKey, (userExpTilldate + 1))] ++ reward) | |
216 | 216 | } | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | func payAction (actionName,userAddress,amount,day) = { | |
220 | 220 | let composedKey = if (tryGetBoolean((("TASK_" + actionName) + "_EVERY"))) | |
221 | 221 | then actionName | |
222 | 222 | else ((actionName + "_") + toString(amount)) | |
223 | 223 | if (tryGetBoolean(("TASK_" + composedKey))) | |
224 | 224 | then hasDoneTask7Days(day, toString(userAddress), composedKey, tryGetInteger((("TASK_" + composedKey) + "_REWARD_DAILY")), tryGetInteger((("TASK_" + composedKey) + "_REWARD_WEEKLY"))) | |
225 | 225 | else nil | |
226 | 226 | } | |
227 | 227 | ||
228 | 228 | ||
229 | 229 | func recordActionInternal (actionName,addressCaller,address) = if (!(containsElement(scCanUseCoupons, addressCaller))) | |
230 | 230 | then throw("CRA: Only certain smart contracts can use this reward module!") | |
231 | 231 | else { | |
232 | 232 | let day = calculateDaysSinceStart() | |
233 | 233 | let actionKey = actionPerAddressPerUserPerDay(toString(address), actionName, toString(addressCaller), toString(day)) | |
234 | 234 | let totalActions = (tryGetInteger(actionKey) + 1) | |
235 | 235 | ([IntegerEntry(actionKey, totalActions)] ++ payAction(actionName, address, totalActions, day)) | |
236 | 236 | } | |
237 | 237 | ||
238 | 238 | ||
239 | 239 | @Callable(i) | |
240 | 240 | func configureOracle (oracle) = if ((i.caller != this)) | |
241 | 241 | then throw("CCO: admin only") | |
242 | 242 | else [StringEntry("static_oracleAddress", oracle)] | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | ||
246 | 246 | @Callable(i) | |
247 | 247 | func addCoupons (user,amount) = if (if ((i.caller != this)) | |
248 | 248 | then (i.callerPublicKey != wAccPKey) | |
249 | 249 | else false) | |
250 | 250 | then throw("CAC: admin only") | |
251 | 251 | else if ((amount >= 10000000)) | |
252 | 252 | then (recordActionInternal("VEGG10000000", this, addressFromStringValue(user)) ++ addCouponsInternal(user, amount)) | |
253 | 253 | else if ((amount >= 500000)) | |
254 | 254 | then (recordActionInternal("VEGG500000", this, addressFromStringValue(user)) ++ addCouponsInternal(user, amount)) | |
255 | 255 | else addCouponsInternal(user, amount) | |
256 | 256 | ||
257 | 257 | ||
258 | 258 | ||
259 | 259 | @Callable(i) | |
260 | 260 | func resetCheater (user) = if (if ((i.caller != this)) | |
261 | 261 | then (i.callerPublicKey != wAccPKey) | |
262 | 262 | else false) | |
263 | 263 | then throw("CAC: admin only") | |
264 | 264 | else { | |
265 | 265 | let keyOld = couponsUserActiveOld(user) | |
266 | 266 | let key = couponsUserActive(user) | |
267 | 267 | let couponsOld = tryGetInteger(key) | |
268 | 268 | let coupons = -100000000 | |
269 | 269 | [IntegerEntry(keyOld, couponsOld), IntegerEntry(key, coupons)] | |
270 | 270 | } | |
271 | 271 | ||
272 | 272 | ||
273 | 273 | ||
274 | 274 | @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) | |
276 | 278 | then throw("Method only for farming sc!") | |
277 | 279 | else addCouponsInternal(user, amount) | |
278 | 280 | ||
279 | 281 | ||
280 | 282 | ||
281 | 283 | @Callable(i) | |
282 | 284 | func addCouponsBatch (batch) = if (if ((i.caller != this)) | |
283 | 285 | then (i.callerPublicKey != wAccPKey) | |
284 | 286 | else false) | |
285 | 287 | then throw("CAC: admin only") | |
286 | 288 | else { | |
287 | 289 | let couponsList = split(batch, ";") | |
288 | 290 | func handleCoupon (acc,coupon) = { | |
289 | 291 | let splitArray = split(coupon, ":") | |
290 | 292 | let user = splitArray[0] | |
291 | 293 | let amount = parseIntValue(splitArray[1]) | |
292 | 294 | let burnCall = invoke(getBurnAddress(), "burnByInvoke", [amount], nil) | |
293 | 295 | if ((burnCall == burnCall)) | |
294 | 296 | then if ((amount >= 10000000)) | |
295 | 297 | then ((acc ++ recordActionInternal("VEGG10000000", this, addressFromStringValue(user))) ++ addCouponsInternal(user, amount)) | |
296 | 298 | else if ((amount >= 500000)) | |
297 | 299 | then ((acc ++ recordActionInternal("VEGG500000", this, addressFromStringValue(user))) ++ addCouponsInternal(user, amount)) | |
298 | 300 | else (acc ++ addCouponsInternal(user, amount)) | |
299 | 301 | else throw("Strict value is not equal to itself.") | |
300 | 302 | } | |
301 | 303 | ||
302 | 304 | let $l = couponsList | |
303 | 305 | let $s = size($l) | |
304 | 306 | let $acc0 = nil | |
305 | 307 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
306 | 308 | then $a | |
307 | 309 | else handleCoupon($a, $l[$i]) | |
308 | 310 | ||
309 | 311 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
310 | 312 | then $a | |
311 | 313 | else throw("List size exceeds 20") | |
312 | 314 | ||
313 | 315 | $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) | |
314 | 316 | } | |
315 | 317 | ||
316 | 318 | ||
317 | 319 | ||
318 | 320 | @Callable(i) | |
319 | 321 | func CFRefund (recipient,amount) = { | |
320 | 322 | let cfAddress = getStringValue(i.caller, "CF_ADDRESS") | |
321 | 323 | let key = (("f_" + cfAddress) + "_stake_address") | |
322 | 324 | let stakeAddress = getStringValue(getMasterAddress(), key) | |
323 | 325 | if ((stakeAddress != toString(i.caller))) | |
324 | 326 | then throw("CCR: This is something fishy going on!") | |
325 | 327 | else addCouponsInternal(recipient, amount) | |
326 | 328 | } | |
327 | 329 | ||
328 | 330 | ||
329 | 331 | ||
330 | 332 | @Callable(i) | |
331 | 333 | func useCoupons (amountTryingToPay) = { | |
332 | 334 | let invokingSc = i.caller | |
333 | 335 | if ((0 > amountTryingToPay)) | |
334 | 336 | then throw("CUC: Only positive amount of money can be paid!") | |
335 | 337 | else if (!(containsElement(scCanUseCoupons, invokingSc))) | |
336 | 338 | then throw("CUC: Only certain smart contracts can use this coupon module!") | |
337 | 339 | else { | |
338 | 340 | let user = toString(i.originCaller) | |
339 | 341 | let keyActive = couponsUserActive(user) | |
340 | 342 | let availableCoupons = tryGetInteger(keyActive) | |
341 | 343 | if ((0 > availableCoupons)) | |
342 | 344 | then throw("CUC: Get rekt!") | |
343 | 345 | else { | |
344 | 346 | let leftToPay = if ((amountTryingToPay > availableCoupons)) | |
345 | 347 | then (amountTryingToPay - availableCoupons) | |
346 | 348 | else 0 | |
347 | 349 | let amountPaid = (amountTryingToPay - leftToPay) | |
348 | 350 | let availableCouponsLeft = (availableCoupons - amountPaid) | |
349 | 351 | if ((0 > availableCouponsLeft)) | |
350 | 352 | then throw("CUC: You try to overspend!") | |
351 | 353 | else { | |
352 | 354 | let keySpend = couponsUserSpend(user) | |
353 | 355 | let keyOld = couponsUserActiveOld(user) | |
354 | 356 | let keySpendSc = couponsSpendOnSc(toString(i.caller)) | |
355 | 357 | let topUp = invoke(getVeggFarmingAddress(), "topUpReward", [((amountPaid / 100) * 25)], nil) | |
356 | 358 | if ((topUp == topUp)) | |
357 | 359 | then { | |
358 | 360 | let totalSpend = (tryGetInteger(keySpend) + amountPaid) | |
359 | 361 | let totalSpendSc = (tryGetInteger(keySpendSc) + amountPaid) | |
360 | 362 | $Tuple2([IntegerEntry(keySpend, totalSpend), IntegerEntry(keyOld, availableCoupons), IntegerEntry(keyActive, availableCouponsLeft), IntegerEntry(keySpendSc, totalSpendSc)], amountPaid) | |
361 | 363 | } | |
362 | 364 | else throw("Strict value is not equal to itself.") | |
363 | 365 | } | |
364 | 366 | } | |
365 | 367 | } | |
366 | 368 | } | |
367 | 369 | ||
368 | 370 | ||
369 | 371 | ||
370 | 372 | @Callable(i) | |
371 | 373 | func recordAction (actionName) = recordActionInternal(actionName, i.caller, i.originCaller) | |
372 | 374 | ||
373 | 375 | ||
374 | 376 | ||
375 | 377 | @Callable(i) | |
376 | 378 | func increaseExp (address) = if ((i.caller != getItemsAddress())) | |
377 | 379 | then nil | |
378 | 380 | else { | |
379 | 381 | let userExperienceKey = userExperience(address) | |
380 | 382 | let userExpTilldate = tryGetInteger(userExperienceKey) | |
381 | 383 | [IntegerEntry(userExperienceKey, (userExpTilldate + 1))] | |
382 | 384 | } | |
383 | 385 | ||
384 | 386 | ||
385 | 387 | @Verifier(tx) | |
386 | 388 | func verify () = if (isTestEnv()) | |
387 | 389 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
388 | 390 | else { | |
389 | 391 | let firstUser = base58'6TdaXEfhnjYquvPf3yV7MFxt2CbgFmaqsvGwkKfXtKi4' | |
390 | 392 | let secondUser = base58'7DsP2WaMLocbHuUxux7pbXRjTrrZ1TFQPsi5QumS3gr8' | |
391 | 393 | let thirdUser = base58'BpFWP3p3JgYrrP45xfrKzeMcWMEXoinj4FVPPkUiA8D3' | |
392 | 394 | let firstUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], firstUser)) | |
393 | 395 | then 1 | |
394 | 396 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], firstUser)) | |
395 | 397 | then 1 | |
396 | 398 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], firstUser)) | |
397 | 399 | then 1 | |
398 | 400 | else 0 | |
399 | 401 | let secondUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], secondUser)) | |
400 | 402 | then 1 | |
401 | 403 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], secondUser)) | |
402 | 404 | then 1 | |
403 | 405 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], secondUser)) | |
404 | 406 | then 1 | |
405 | 407 | else 0 | |
406 | 408 | let thirdUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], thirdUser)) | |
407 | 409 | then 1 | |
408 | 410 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], thirdUser)) | |
409 | 411 | then 1 | |
410 | 412 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], thirdUser)) | |
411 | 413 | then 1 | |
412 | 414 | else 0 | |
413 | 415 | let signaturesCount = ((firstUserSigned + secondUserSigned) + thirdUserSigned) | |
414 | 416 | match tx { | |
415 | 417 | case _ => | |
416 | 418 | (signaturesCount >= 2) | |
417 | 419 | } | |
418 | 420 | } | |
419 | 421 |
github/deemru/w8io/026f985 46.72 ms ◑