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