tx · 5jNGR4nEG9Qo9e9m1wdhb3LiqJKeFp5cQ2KUEtnuMUhg 3MzYJ5tJs1rdz6Pzr7zvyfezTLPuVxFSRvT: -0.01800000 Waves 2024.12.24 04:05 [3427943] smart account 3MzYJ5tJs1rdz6Pzr7zvyfezTLPuVxFSRvT > SELF 0.00000000 Waves
{ "type": 13, "id": "5jNGR4nEG9Qo9e9m1wdhb3LiqJKeFp5cQ2KUEtnuMUhg", "fee": 1800000, "feeAssetId": null, "timestamp": 1735002425303, "version": 2, "chainId": 84, "sender": "3MzYJ5tJs1rdz6Pzr7zvyfezTLPuVxFSRvT", "senderPublicKey": "FvkktUPDqYCGhXKDauJAZkkkVp1b5yKhS6NUf7vhP3tR", "proofs": [ "2EQzHYH3exvZ5mX9qmei2kVgDziNGEC5peXRT22tNVAJ8Lz283QRvqtEk7DuUSJrePH6QouTyczfZUTv9rNShWQK" ], "script": "base64:BgI8CAISAwoBCBIGCgQICAgIEgMKAQgSABIAEgMKAQgSABIDCgEIEgMKAQgSBAoCCAgSAwoBCBIGCgQIAQQIOQENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAEJaXNUZXN0RW52AAQHdGVzdGVudgQHJG1hdGNoMAkAmwgCBQR0aGlzAgdURVNURU5WAwkAAQIFByRtYXRjaDACB0Jvb2xlYW4EAXgFByRtYXRjaDAFAXgHBQd0ZXN0ZW52ARVrZXlEdWNrUGxheVVubG9ja1RpbWUBB2Fzc2V0SWQJAKwCAgkArAICAgVkdWNrXwkA2AQBBQdhc3NldElkAgtfdW5sb2NrVGltZQEXa2V5RHVja0ZpbmlzaFVubG9ja1RpbWUBB2Fzc2V0SWQJAKwCAgkArAICAgVkdWNrXwkA2AQBBQdhc3NldElkAhFmaW5pc2hfdW5sb2NrVGltZQEMa2V5RHVja093bmVyAQdhc3NldElkCQCsAgIJAKwCAgIF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AEDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwABBQpzZWNvbmRVc2VyAAEDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwACBQpzZWNvbmRVc2VyAAEAAAQPdGhpcmRVc2VyU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUJdGhpcmRVc2VyAAEDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwABBQl0aGlyZFVzZXIAAQMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAIFCXRoaXJkVXNlcgABAAAED3NpZ25hdHVyZXNDb3VudAkAZAIJAGQCBQ9maXJzdFVzZXJTaWduZWQFEHNlY29uZFVzZXJTaWduZWQFD3RoaXJkVXNlclNpZ25lZAQHJG1hdGNoMAUCdHgJAGcCBQ9zaWduYXR1cmVzQ291bnQAAiS2xRI=", "height": 3427943, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4YgrLUgFrVEYeR7UgTyYooR9rGyL9zQBC7JRHGuJd6GG Next: yMgF7fgiwDqXDeXVKw4vdaMjRcR3UCyMWn6RE3uqfB7 Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func tryGetInteger (key) = match getInteger(this, key) { | |
5 | 5 | case b: Int => | |
6 | 6 | b | |
7 | 7 | case _ => | |
8 | 8 | 0 | |
9 | 9 | } | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func isTestEnv () = { | |
13 | 13 | let testenv = match getBoolean(this, "TESTENV") { | |
14 | 14 | case x: Boolean => | |
15 | 15 | x | |
16 | 16 | case _ => | |
17 | 17 | false | |
18 | 18 | } | |
19 | 19 | testenv | |
20 | 20 | } | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func keyDuckPlayUnlockTime (assetId) = (("duck_" + toBase58String(assetId)) + "_unlockTime") | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func keyDuckFinishUnlockTime (assetId) = (("duck_" + toBase58String(assetId)) + "finish_unlockTime") | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func keyDuckOwner (assetId) = (("duck_" + toBase58String(assetId)) + "_owner") | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func keySpotsBought (addressStr) = (("address_" + addressStr) + "_spotsBought") | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func keySpotsBusy (addressStr) = (("address_" + addressStr) + "_spotsBusy") | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func keyLockedDuckStatus (addressStr,assetIdStr) = (((("address_" + addressStr) + "_lockedDuck_") + assetIdStr) + "_status") | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func keyDuckV2 (addressStr,assetIdStr) = (((("address_" + addressStr) + "_lockedDuck_") + assetIdStr) + "_v2") | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func getDuckDetails (assetId) = { | |
45 | 45 | let assetName = value(value(assetInfo(assetId)).name) | |
46 | 46 | let assetNameParts = split(assetName, "") | |
47 | 47 | let isJackpot = (assetNameParts[(size(assetNameParts) - 2)] == "J") | |
48 | 48 | let assetColor = if (isJackpot) | |
49 | 49 | then "B" | |
50 | 50 | else assetNameParts[(size(assetNameParts) - 1)] | |
51 | 51 | $Tuple2(assetColor, isJackpot) | |
52 | 52 | } | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func tryGetStringExternal (address,key) = match getString(address, key) { | |
56 | 56 | case a: String => | |
57 | 57 | a | |
58 | 58 | case _ => | |
59 | 59 | "" | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func tryGetBoolean (key) = match getBoolean(key) { | |
64 | 64 | case b: Boolean => | |
65 | 65 | b | |
66 | 66 | case _ => | |
67 | 67 | false | |
68 | 68 | } | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func tryGetString (key) = tryGetStringExternal(this, key) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func staticKey_oracleAddress () = "static_oracleAddress" | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func staticKey_eggAssetId () = "static_eggAssetId" | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func staticKey_incubatorAddress () = "static_incubatorAddress" | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func staticKey_breederAddress () = "static_breederAddress" | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func staticKey_farmingAddress () = "static_farmingAddress" | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func staticKey_rentingAddress () = "static_rentingAddress" | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func staticKey_shortGameName () = "static_shortGameName" | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func staticKey_longGameName () = "static_longGameName" | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func staticKey_nftName () = "static_nftName" | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func staticKey_backendPubKey () = "static_backendPubKey" | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func staticKey_accessItemAssetId () = "static_accessItemAssetId" | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func staticKey_accessItemPrice () = "static_accessItemPrice" | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func staticKey_minLockDuration () = "static_minLockDuration" | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func staticKey_UnlockDuration () = "static_UnlockDuration" | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func staticKey_boosterBuyAssetId () = "static_boosterBuyAssetId" | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func staticKey_extraFee () = "static_extraFee" | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func staticKey_feeAggregator () = "static_feeAggregator" | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func staticKey_boosterPriceLevel (level) = ("static_boosterPriceLevel_" + level) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func staticKey_boosterName (level) = ("static_boosterName_" + level) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func staticKey_burnAddress () = "static_burnAddress" | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func getOracle () = Address(fromBase58String(tryGetString(staticKey_oracleAddress()))) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func getGameName () = valueOrErrorMessage(getString(staticKey_shortGameName()), "3GGN: There is no game name defined!") | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func getLongGameName () = valueOrErrorMessage(getString(staticKey_longGameName()), "3GLGN: There is no long game name defined!") | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func getNFTName () = valueOrErrorMessage(getString(staticKey_nftName()), "3GNN: There is no nft name defined!") | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | func getIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_incubatorAddress()))) | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func getBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_breederAddress()))) | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func getRentingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_rentingAddress()))) | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func getFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_farmingAddress()))) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func getEggAssetId () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_eggAssetId())) | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func getBackendPubKey () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_backendPubKey())) | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | func getFeeAggregator () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_feeAggregator()))) | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | func getBurnAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_burnAddress()))) | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | func getAccessItemAssetId () = fromBase58String(tryGetString(staticKey_accessItemAssetId())) | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | func getAccessItemPrice () = tryGetInteger(staticKey_accessItemPrice()) | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | func getMinLockDuration () = tryGetInteger(staticKey_minLockDuration()) | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | func getUnlockDuration () = tryGetInteger(staticKey_UnlockDuration()) | |
180 | 180 | ||
181 | 181 | ||
182 | 182 | func getBosterBuyAssetId () = fromBase58String(tryGetString(staticKey_boosterBuyAssetId())) | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | func getBosterPriceForLevel (level) = valueOrErrorMessage(getInteger(staticKey_boosterPriceLevel(toString(level))), "3GBPFL: There is no price value for this level of booster") | |
186 | 186 | ||
187 | 187 | ||
188 | 188 | func getBosterNameForLevel (level) = valueOrErrorMessage(getString(staticKey_boosterName(toString(level))), "3GBNFL: There is no such booster") | |
189 | 189 | ||
190 | 190 | ||
191 | 191 | func checkAdditionalPayment (payment) = if (isDefined(payment.assetId)) | |
192 | 192 | then throw("RCAP: Please attach waves") | |
193 | 193 | else { | |
194 | 194 | let feeAmount = getIntegerValue(getOracle(), staticKey_extraFee()) | |
195 | 195 | if ((payment.amount != feeAmount)) | |
196 | 196 | then throw((("RCAP: Please attach exactly " + toString(feeAmount)) + " amount of wavelets")) | |
197 | 197 | else [ScriptTransfer(getFeeAggregator(), feeAmount, unit)] | |
198 | 198 | } | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | func asString (value) = match value { | |
202 | 202 | case string: String => | |
203 | 203 | string | |
204 | 204 | case _ => | |
205 | 205 | throw("3AS: wrong type, expected: String") | |
206 | 206 | } | |
207 | 207 | ||
208 | 208 | ||
209 | 209 | func lockDuckInternal (addressStr,takeSpotsFrom,pmt) = { | |
210 | 210 | let assetId = value(pmt.assetId) | |
211 | 211 | let assetIssuer = value(assetInfo(assetId)).issuer | |
212 | 212 | let tDuckDetails = getDuckDetails(assetId) | |
213 | 213 | let assetColor = tDuckDetails._1 | |
214 | 214 | let isJackpot = tDuckDetails._2 | |
215 | 215 | let kSpotsBusy = keySpotsBusy(takeSpotsFrom) | |
216 | 216 | let spotsBusy = tryGetInteger(kSpotsBusy) | |
217 | 217 | let kSpotsBought = keySpotsBought(takeSpotsFrom) | |
218 | 218 | let addressSpotsAvailable = (tryGetInteger(kSpotsBought) - spotsBusy) | |
219 | 219 | if ((pmt.amount != 1)) | |
220 | 220 | then throw("NFT is not attached") | |
221 | 221 | else if (if ((assetIssuer != getIncubatorAddress())) | |
222 | 222 | then (assetIssuer != getBreederAddress()) | |
223 | 223 | else false) | |
224 | 224 | then throw("ivalid NFT attached") | |
225 | 225 | else if ((0 >= addressSpotsAvailable)) | |
226 | 226 | then throw(("No spots available in hunt for: " + takeSpotsFrom)) | |
227 | 227 | else { | |
228 | 228 | let kPerchesAvailable = ((("address_" + toString(this)) + "_perchesAvailable_") + assetColor) | |
229 | 229 | let perchesAvailable = match getInteger(getFarmingAddress(), kPerchesAvailable) { | |
230 | 230 | case b: Int => | |
231 | 231 | b | |
232 | 232 | case _ => | |
233 | 233 | 0 | |
234 | 234 | } | |
235 | 235 | if ((perchesAvailable == perchesAvailable)) | |
236 | 236 | then { | |
237 | 237 | let eggAssetId = getEggAssetId() | |
238 | 238 | [IntegerEntry(kSpotsBusy, (spotsBusy + 1)), StringEntry(keyDuckOwner(assetId), addressStr), BooleanEntry(keyLockedDuckStatus(addressStr, toBase58String(assetId)), true), IntegerEntry(keyDuckPlayUnlockTime(assetId), (lastBlock.timestamp + getMinLockDuration())), BooleanEntry(keyDuckV2(addressStr, toBase58String(assetId)), true)] | |
239 | 239 | } | |
240 | 240 | else throw("Strict value is not equal to itself.") | |
241 | 241 | } | |
242 | 242 | } | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | func initUnlockDuck (assetIdStr,addressStr) = { | |
246 | 246 | let assetId = fromBase58String(assetIdStr) | |
247 | 247 | let tDuckDetails = getDuckDetails(assetId) | |
248 | 248 | let assetColor = tDuckDetails._1 | |
249 | 249 | let isJackpot = tDuckDetails._2 | |
250 | 250 | let kSpotsBusy = keySpotsBusy(addressStr) | |
251 | 251 | let kDuckOwner = keyDuckOwner(assetId) | |
252 | 252 | let remainingForUnlock = (tryGetInteger(keyDuckPlayUnlockTime(assetId)) - lastBlock.timestamp) | |
253 | 253 | if ((tryGetString(kDuckOwner) != addressStr)) | |
254 | 254 | then throw("3IULD: The duck is not yours") | |
255 | 255 | else if ((remainingForUnlock > 0)) | |
256 | 256 | then throw((("3IUL: You need to wait to unlock " + toString((remainingForUnlock / 1000))) + " seconds")) | |
257 | 257 | else [IntegerEntry(keyDuckFinishUnlockTime(assetId), (lastBlock.timestamp + getUnlockDuration()))] | |
258 | 258 | } | |
259 | 259 | ||
260 | 260 | ||
261 | 261 | func unstakeDuck (assetIdStr,addressStr,addSpotsTowards) = { | |
262 | 262 | let assetId = fromBase58String(assetIdStr) | |
263 | 263 | let tDuckDetails = getDuckDetails(assetId) | |
264 | 264 | let assetColor = tDuckDetails._1 | |
265 | 265 | let isJackpot = tDuckDetails._2 | |
266 | 266 | let kSpotsBusy = keySpotsBusy(addSpotsTowards) | |
267 | 267 | let kDuckOwner = keyDuckOwner(assetId) | |
268 | 268 | let remainingForUnlock = (tryGetInteger(keyDuckFinishUnlockTime(assetId)) - lastBlock.timestamp) | |
269 | 269 | if ((tryGetString(kDuckOwner) != addressStr)) | |
270 | 270 | then throw("3UD: The duck is not yours") | |
271 | 271 | else if ((remainingForUnlock > 0)) | |
272 | 272 | then throw((("3UD: You need to wait to unlock " + toString((remainingForUnlock / 1000))) + " seconds")) | |
273 | 273 | else [ScriptTransfer(Address(fromBase58String(addressStr)), 1, assetId), DeleteEntry(keyLockedDuckStatus(addressStr, assetIdStr)), DeleteEntry(kDuckOwner), IntegerEntry(kSpotsBusy, (tryGetInteger(kSpotsBusy) - 1))] | |
274 | 274 | } | |
275 | 275 | ||
276 | 276 | ||
277 | 277 | @Callable(i) | |
278 | 278 | func buyAccessItemInternal (addressStr) = if ((i.caller != this)) | |
279 | 279 | then throw("3BAII: internal use only") | |
280 | 280 | else { | |
281 | 281 | let issueAccessItem = Issue(("ACCESS-" + getGameName()), ((("[Access] " + getLongGameName()) + " access NFT for ") + getNFTName()), 1, 0, false) | |
282 | 282 | let accessRaceAssetId = toBase58String(calculateAssetId(issueAccessItem)) | |
283 | 283 | let kSpotsBought = keySpotsBought(addressStr) | |
284 | 284 | $Tuple2([issueAccessItem, StringEntry((("accessItem_" + accessRaceAssetId) + "_owner"), addressStr), StringEntry((("address_" + addressStr) + "_owning"), accessRaceAssetId), IntegerEntry(kSpotsBought, (tryGetInteger(kSpotsBought) + 1))], accessRaceAssetId) | |
285 | 285 | } | |
286 | 286 | ||
287 | 287 | ||
288 | 288 | ||
289 | 289 | @Callable(i) | |
290 | 290 | func configureOracle (oracle,shortname,longname,nftName) = if ((i.caller != this)) | |
291 | 291 | then throw("3CO: admin only") | |
292 | 292 | else [StringEntry("static_oracleAddress", oracle), StringEntry("static_shortGameName", shortname), StringEntry("static_longGameName", longname), StringEntry("static_nftName", nftName)] | |
293 | 293 | ||
294 | 294 | ||
295 | 295 | ||
296 | 296 | @Callable(i) | |
297 | 297 | func deleteSetting (key) = if ((i.caller != this)) | |
298 | 298 | then throw("3DS: Only administrator can call this method") | |
299 | 299 | else [DeleteEntry(key)] | |
300 | 300 | ||
301 | 301 | ||
302 | 302 | ||
303 | 303 | @Callable(i) | |
304 | 304 | func buyAccessItemAndLockDuck () = { | |
305 | 305 | let eggPayment = value(i.payments[0]) | |
306 | 306 | let duckPayment = value(i.payments[1]) | |
307 | 307 | let addressStr = toString(i.originCaller) | |
308 | 308 | if ((eggPayment.assetId != getAccessItemAssetId())) | |
309 | 309 | then throw("3BAI: Wrong asset attached") | |
310 | 310 | else if ((eggPayment.amount != getAccessItemPrice())) | |
311 | 311 | then throw("3BAI: Wrong amount of assets attached") | |
312 | 312 | else { | |
313 | 313 | let accessItemData = asString(invoke(this, "buyAccessItemInternal", [addressStr], nil)) | |
314 | 314 | if ((accessItemData == accessItemData)) | |
315 | 315 | then { | |
316 | 316 | let burnCall = invoke(getBurnAddress(), "burnAttachedPayments", nil, [AttachedPayment(getEggAssetId(), eggPayment.amount)]) | |
317 | 317 | if ((burnCall == burnCall)) | |
318 | 318 | then { | |
319 | 319 | let validPayment = if ((i.caller == getRentingAddress())) | |
320 | 320 | then nil | |
321 | 321 | else checkAdditionalPayment(i.payments[2]) | |
322 | 322 | if ((validPayment == validPayment)) | |
323 | 323 | then { | |
324 | 324 | let lockData = (lockDuckInternal(addressStr, addressStr, duckPayment) ++ validPayment) | |
325 | 325 | $Tuple2(lockData, accessItemData) | |
326 | 326 | } | |
327 | 327 | else throw("Strict value is not equal to itself.") | |
328 | 328 | } | |
329 | 329 | else throw("Strict value is not equal to itself.") | |
330 | 330 | } | |
331 | 331 | else throw("Strict value is not equal to itself.") | |
332 | 332 | } | |
333 | 333 | } | |
334 | 334 | ||
335 | 335 | ||
336 | 336 | ||
337 | 337 | @Callable(i) | |
338 | 338 | func buyAccessItem () = { | |
339 | 339 | let addressStr = toString(i.originCaller) | |
340 | 340 | let eggPayment = value(i.payments[0]) | |
341 | 341 | if ((eggPayment.assetId != getAccessItemAssetId())) | |
342 | 342 | then throw(("3BAI: Wrong asset attached " + toBase58String(getAccessItemAssetId()))) | |
343 | 343 | else if ((eggPayment.amount != getAccessItemPrice())) | |
344 | 344 | then throw("3BAI: Wrong amount of assets attached") | |
345 | 345 | else { | |
346 | 346 | let accessItemData = asString(invoke(this, "buyAccessItemInternal", [addressStr], nil)) | |
347 | 347 | if ((accessItemData == accessItemData)) | |
348 | 348 | then { | |
349 | 349 | let burnCall = invoke(getBurnAddress(), "burnAttachedPayments", nil, [AttachedPayment(getEggAssetId(), eggPayment.amount)]) | |
350 | 350 | if ((burnCall == burnCall)) | |
351 | 351 | then { | |
352 | 352 | let validPayment = if ((i.caller == getRentingAddress())) | |
353 | 353 | then nil | |
354 | 354 | else checkAdditionalPayment(i.payments[1]) | |
355 | 355 | if ((validPayment == validPayment)) | |
356 | 356 | then $Tuple2(validPayment, accessItemData) | |
357 | 357 | else throw("Strict value is not equal to itself.") | |
358 | 358 | } | |
359 | 359 | else throw("Strict value is not equal to itself.") | |
360 | 360 | } | |
361 | 361 | else throw("Strict value is not equal to itself.") | |
362 | 362 | } | |
363 | 363 | } | |
364 | 364 | ||
365 | 365 | ||
366 | 366 | ||
367 | 367 | @Callable(i) | |
368 | 368 | func buyAccessItemOther (addressOther) = { | |
369 | 369 | let eggPayment = value(i.payments[0]) | |
370 | 370 | if ((eggPayment.assetId != getAccessItemAssetId())) | |
371 | 371 | then throw("3BAI: Wrong asset attached") | |
372 | 372 | else if ((eggPayment.amount != getAccessItemPrice())) | |
373 | 373 | then throw("3BAI: Wrong amount of assets attached") | |
374 | 374 | else { | |
375 | 375 | let accessItemData = asString(invoke(this, "buyAccessItemInternal", [addressOther], nil)) | |
376 | 376 | if ((accessItemData == accessItemData)) | |
377 | 377 | then { | |
378 | 378 | let burnCall = invoke(getBurnAddress(), "burnAttachedPayments", nil, [AttachedPayment(getEggAssetId(), eggPayment.amount)]) | |
379 | 379 | if ((burnCall == burnCall)) | |
380 | 380 | then $Tuple2(nil, accessItemData) | |
381 | 381 | else throw("Strict value is not equal to itself.") | |
382 | 382 | } | |
383 | 383 | else throw("Strict value is not equal to itself.") | |
384 | 384 | } | |
385 | 385 | } | |
386 | 386 | ||
387 | 387 | ||
388 | 388 | ||
389 | 389 | @Callable(i) | |
390 | 390 | func lockDuck () = { | |
391 | 391 | let addressStr = toString(i.originCaller) | |
392 | 392 | let duckPayment = value(i.payments[0]) | |
393 | 393 | let validPayment = checkAdditionalPayment(i.payments[1]) | |
394 | 394 | if ((validPayment == validPayment)) | |
395 | 395 | then (lockDuckInternal(addressStr, addressStr, duckPayment) ++ validPayment) | |
396 | 396 | else throw("Strict value is not equal to itself.") | |
397 | 397 | } | |
398 | 398 | ||
399 | 399 | ||
400 | 400 | ||
401 | 401 | @Callable(i) | |
402 | 402 | func initUnlock (assetIdStr) = { | |
403 | 403 | let addressStr = toString(i.caller) | |
404 | 404 | let validPayment = checkAdditionalPayment(i.payments[0]) | |
405 | 405 | if ((validPayment == validPayment)) | |
406 | 406 | then (initUnlockDuck(assetIdStr, addressStr) ++ validPayment) | |
407 | 407 | else throw("Strict value is not equal to itself.") | |
408 | 408 | } | |
409 | 409 | ||
410 | 410 | ||
411 | 411 | ||
412 | 412 | @Callable(i) | |
413 | 413 | func lockDuckRenting (addressTakeSpotsFrom) = if ((i.caller != getRentingAddress())) | |
414 | 414 | then throw("3UDO: Renting only!") | |
415 | 415 | else { | |
416 | 416 | let addressStr = toString(i.caller) | |
417 | 417 | let duckPayment = value(i.payments[0]) | |
418 | 418 | lockDuckInternal(addressStr, addressTakeSpotsFrom, duckPayment) | |
419 | 419 | } | |
420 | 420 | ||
421 | 421 | ||
422 | 422 | ||
423 | 423 | @Callable(i) | |
424 | 424 | func unlockDuckRenting (assetIdStr,addSpotsTowards) = if ((i.caller != getRentingAddress())) | |
425 | 425 | then throw("3UDO: Renting only!") | |
426 | 426 | else { | |
427 | 427 | let addressStr = toString(i.caller) | |
428 | 428 | unstakeDuck(assetIdStr, addressStr, addSpotsTowards) | |
429 | 429 | } | |
430 | 430 | ||
431 | 431 | ||
432 | 432 | ||
433 | 433 | @Callable(i) | |
434 | 434 | func unlockDuckOther (assetIdStr) = if ((i.caller != this)) | |
435 | 435 | then throw("3UDO: Admin only!") | |
436 | 436 | else { | |
437 | 437 | let ownerKey = tryGetString(keyDuckOwner(fromBase58String(assetIdStr))) | |
438 | 438 | unstakeDuck(assetIdStr, ownerKey, ownerKey) | |
439 | 439 | } | |
440 | 440 | ||
441 | 441 | ||
442 | 442 | ||
443 | 443 | @Callable(i) | |
444 | 444 | func unlockDuck (assetIdStr,ts,allowed,signature) = if ((allowed != true)) | |
445 | 445 | then throw("3UD: Not allowed to unlock the duck!") | |
446 | 446 | else { | |
447 | 447 | let MSINHOUR = 3600000 | |
448 | 448 | let currentTs = lastBlock.timestamp | |
449 | 449 | if ((currentTs > (ts + MSINHOUR))) | |
450 | 450 | then throw("3UD: Outdated signature!") | |
451 | 451 | else { | |
452 | 452 | let addressStr = toString(i.caller) | |
453 | 453 | let text = makeString([assetIdStr, toString(ts), toString(allowed)], ";") | |
454 | 454 | if (!(sigVerify_8Kb(toBytes(text), fromBase58String(signature), getBackendPubKey()))) | |
455 | 455 | then throw(((("3UD: Invalid proof from backend key" + toBase58String(getBackendPubKey())) + " ") + text)) | |
456 | 456 | else { | |
457 | 457 | let validPayment = checkAdditionalPayment(i.payments[0]) | |
458 | 458 | if ((validPayment == validPayment)) | |
459 | 459 | then (unstakeDuck(assetIdStr, addressStr, addressStr) ++ validPayment) | |
460 | 460 | else throw("Strict value is not equal to itself.") | |
461 | 461 | } | |
462 | 462 | } | |
463 | 463 | } | |
464 | 464 | ||
465 | 465 | ||
466 | 466 | @Verifier(tx) | |
467 | 467 | func verify () = if (isTestEnv()) | |
468 | 468 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
469 | 469 | else { | |
470 | 470 | let firstUser = base58'6TdaXEfhnjYquvPf3yV7MFxt2CbgFmaqsvGwkKfXtKi4' | |
471 | 471 | let secondUser = base58'7DsP2WaMLocbHuUxux7pbXRjTrrZ1TFQPsi5QumS3gr8' | |
472 | 472 | let thirdUser = base58'BpFWP3p3JgYrrP45xfrKzeMcWMEXoinj4FVPPkUiA8D3' | |
473 | 473 | let firstUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], firstUser)) | |
474 | 474 | then 1 | |
475 | 475 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], firstUser)) | |
476 | 476 | then 1 | |
477 | 477 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], firstUser)) | |
478 | 478 | then 1 | |
479 | 479 | else 0 | |
480 | 480 | let secondUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], secondUser)) | |
481 | 481 | then 1 | |
482 | 482 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], secondUser)) | |
483 | 483 | then 1 | |
484 | 484 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], secondUser)) | |
485 | 485 | then 1 | |
486 | 486 | else 0 | |
487 | 487 | let thirdUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], thirdUser)) | |
488 | 488 | then 1 | |
489 | 489 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], thirdUser)) | |
490 | 490 | then 1 | |
491 | 491 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], thirdUser)) | |
492 | 492 | then 1 | |
493 | 493 | else 0 | |
494 | 494 | let signaturesCount = ((firstUserSigned + secondUserSigned) + thirdUserSigned) | |
495 | 495 | match tx { | |
496 | 496 | case _ => | |
497 | 497 | (signaturesCount >= 2) | |
498 | 498 | } | |
499 | 499 | } | |
500 | 500 |
github/deemru/w8io/169f3d6 49.27 ms ◑