tx · 8NJ8iKQHbbmDSqzgDbyDUgB7Bt8k5xz1SwVVbGEzdqi7 3MzYJ5tJs1rdz6Pzr7zvyfezTLPuVxFSRvT: -0.01800000 Waves 2024.11.21 02:00 [3380401] smart account 3MzYJ5tJs1rdz6Pzr7zvyfezTLPuVxFSRvT > SELF 0.00000000 Waves
{ "type": 13, "id": "8NJ8iKQHbbmDSqzgDbyDUgB7Bt8k5xz1SwVVbGEzdqi7", "fee": 1800000, "feeAssetId": null, "timestamp": 1732143622222, "version": 2, "chainId": 84, "sender": "3MzYJ5tJs1rdz6Pzr7zvyfezTLPuVxFSRvT", "senderPublicKey": "FvkktUPDqYCGhXKDauJAZkkkVp1b5yKhS6NUf7vhP3tR", "proofs": [ "4C1LqarBitXvB72R8Q51NeD112ksePAKD8A19axJC41fWvmU92HSNzy8o2jfRvaTu8BFAevX91ikjWDoat9y4xjM" ], "script": "base64:BgI8CAISAwoBCBIGCgQICAgIEgMKAQgSABIAEgMKAQgSABIDCgEIEgMKAQgSBAoCCAgSAwoBCBIGCgQIAQQIOQENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAEJaXNUZXN0RW52AAQHdGVzdGVudgQHJG1hdGNoMAkAmwgCBQR0aGlzAgdURVNURU5WAwkAAQIFByRtYXRjaDACB0Jvb2xlYW4EAXgFByRtYXRjaDAFAXgHBQd0ZXN0ZW52ARVrZXlEdWNrUGxheVVubG9ja1RpbWUBB2Fzc2V0SWQJAKwCAgkArAICAgVkdWNrXwkA2AQBBQdhc3NldElkAgtfdW5sb2NrVGltZQEXa2V5RHVja0ZpbmlzaFVubG9ja1RpbWUBB2Fzc2V0SWQJAKwCAgkArAICAgVkdWNrXwkA2AQBBQdhc3NldElkAhFmaW5pc2hfdW5sb2NrVGltZQEMa2V5RHVja093bmVyAQdhc3NldElkCQCsAgIJAKwCAgIFZHVja18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D0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwABBQpzZWNvbmRVc2VyAAEDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwACBQpzZWNvbmRVc2VyAAEAAAQPdGhpcmRVc2VyU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUJdGhpcmRVc2VyAAEDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwABBQl0aGlyZFVzZXIAAQMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAIFCXRoaXJkVXNlcgABAAAED3NpZ25hdHVyZXNDb3VudAkAZAIJAGQCBQ9maXJzdFVzZXJTaWduZWQFEHNlY29uZFVzZXJTaWduZWQFD3RoaXJkVXNlclNpZ25lZAQHJG1hdGNoMAUCdHgJAGcCBQ9zaWduYXR1cmVzQ291bnQAAiS2xRI=", "height": 3380401, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Ae1tuMekqp2Bkcwyxm1gMK5jhNZ8PRuazWjp21kbD9Wv Next: E2n6qHrmu3kzuQ7FatbZ2UAsLH1Mr5tQ3wohjSGByAQN Diff:
Old | New | Differences | |
---|---|---|---|
12 | 12 | } | |
13 | 13 | ||
14 | 14 | ||
15 | - | func e (f) = (("duck_" + toBase58String(f)) + "_unlockTime") | |
16 | - | ||
17 | - | ||
18 | - | func g (f) = (("duck_" + toBase58String(f)) + "finish_unlockTime") | |
19 | - | ||
20 | - | ||
21 | - | func h (f) = (("duck_" + toBase58String(f)) + "_owner") | |
22 | - | ||
23 | - | ||
24 | - | func i (j) = (("address_" + j) + "_spotsBought") | |
25 | - | ||
26 | - | ||
27 | - | func k (j) = (("address_" + j) + "_spotsBusy") | |
28 | - | ||
29 | - | ||
30 | - | func l (j,m) = (((("address_" + j) + "_lockedDuck_") + m) + "_status") | |
31 | - | ||
32 | - | ||
33 | - | func n (j,m) = (((("address_" + j) + "_lockedDuck_") + m) + "_v2") | |
34 | - | ||
35 | - | ||
36 | - | func o (f) = { | |
37 | - | let p = value(value(assetInfo(f)).name) | |
38 | - | let q = split(p, "") | |
39 | - | let r = (q[(size(q) - 2)] == "J") | |
40 | - | let s = if (r) | |
41 | - | then "B" | |
42 | - | else q[(size(q) - 1)] | |
43 | - | $Tuple2(s, r) | |
15 | + | func e () = { | |
16 | + | let f = { | |
17 | + | let c = getBoolean(this, "TESTENV") | |
18 | + | if ($isInstanceOf(c, "Boolean")) | |
19 | + | then { | |
20 | + | let g = c | |
21 | + | g | |
22 | + | } | |
23 | + | else false | |
24 | + | } | |
25 | + | f | |
44 | 26 | } | |
45 | 27 | ||
46 | 28 | ||
47 | - | func t (u,b) = { | |
48 | - | let c = getString(u, b) | |
29 | + | func h (i) = (("duck_" + toBase58String(i)) + "_unlockTime") | |
30 | + | ||
31 | + | ||
32 | + | func j (i) = (("duck_" + toBase58String(i)) + "finish_unlockTime") | |
33 | + | ||
34 | + | ||
35 | + | func k (i) = (("duck_" + toBase58String(i)) + "_owner") | |
36 | + | ||
37 | + | ||
38 | + | func l (m) = (("address_" + m) + "_spotsBought") | |
39 | + | ||
40 | + | ||
41 | + | func n (m) = (("address_" + m) + "_spotsBusy") | |
42 | + | ||
43 | + | ||
44 | + | func o (m,p) = (((("address_" + m) + "_lockedDuck_") + p) + "_status") | |
45 | + | ||
46 | + | ||
47 | + | func q (m,p) = (((("address_" + m) + "_lockedDuck_") + p) + "_v2") | |
48 | + | ||
49 | + | ||
50 | + | func r (i) = { | |
51 | + | let s = value(value(assetInfo(i)).name) | |
52 | + | let t = split(s, "") | |
53 | + | let u = (t[(size(t) - 2)] == "J") | |
54 | + | let v = if (u) | |
55 | + | then "B" | |
56 | + | else t[(size(t) - 1)] | |
57 | + | $Tuple2(v, u) | |
58 | + | } | |
59 | + | ||
60 | + | ||
61 | + | func w (x,b) = { | |
62 | + | let c = getString(x, b) | |
49 | 63 | if ($isInstanceOf(c, "String")) | |
50 | 64 | then { | |
51 | - | let | |
52 | - | | |
65 | + | let y = c | |
66 | + | y | |
53 | 67 | } | |
54 | 68 | else "" | |
55 | 69 | } | |
56 | 70 | ||
57 | 71 | ||
58 | - | func | |
72 | + | func z (b) = { | |
59 | 73 | let c = getBoolean(b) | |
60 | 74 | if ($isInstanceOf(c, "Boolean")) | |
61 | 75 | then { | |
66 | 80 | } | |
67 | 81 | ||
68 | 82 | ||
69 | - | func | |
83 | + | func A (b) = w(this, b) | |
70 | 84 | ||
71 | 85 | ||
72 | - | func | |
86 | + | func B () = "static_oracleAddress" | |
73 | 87 | ||
74 | 88 | ||
75 | - | func | |
89 | + | func C () = "static_eggAssetId" | |
76 | 90 | ||
77 | 91 | ||
78 | - | func | |
92 | + | func D () = "static_incubatorAddress" | |
79 | 93 | ||
80 | 94 | ||
81 | - | func | |
95 | + | func E () = "static_breederAddress" | |
82 | 96 | ||
83 | 97 | ||
84 | - | func | |
98 | + | func F () = "static_farmingAddress" | |
85 | 99 | ||
86 | 100 | ||
87 | - | func | |
101 | + | func G () = "static_rentingAddress" | |
88 | 102 | ||
89 | 103 | ||
90 | - | func | |
104 | + | func H () = "static_shortGameName" | |
91 | 105 | ||
92 | 106 | ||
93 | - | func | |
107 | + | func I () = "static_longGameName" | |
94 | 108 | ||
95 | 109 | ||
96 | - | func | |
110 | + | func J () = "static_nftName" | |
97 | 111 | ||
98 | 112 | ||
99 | - | func | |
113 | + | func K () = "static_backendPubKey" | |
100 | 114 | ||
101 | 115 | ||
102 | - | func | |
116 | + | func L () = "static_accessItemAssetId" | |
103 | 117 | ||
104 | 118 | ||
105 | - | func | |
119 | + | func M () = "static_accessItemPrice" | |
106 | 120 | ||
107 | 121 | ||
108 | - | func | |
122 | + | func N () = "static_minLockDuration" | |
109 | 123 | ||
110 | 124 | ||
111 | - | func | |
125 | + | func O () = "static_UnlockDuration" | |
112 | 126 | ||
113 | 127 | ||
114 | - | func | |
128 | + | func P () = "static_boosterBuyAssetId" | |
115 | 129 | ||
116 | 130 | ||
117 | - | func | |
131 | + | func Q () = "static_extraFee" | |
118 | 132 | ||
119 | 133 | ||
120 | - | func | |
134 | + | func R () = "static_feeAggregator" | |
121 | 135 | ||
122 | 136 | ||
123 | - | func | |
137 | + | func S (T) = ("static_boosterPriceLevel_" + T) | |
124 | 138 | ||
125 | 139 | ||
126 | - | func | |
140 | + | func U (T) = ("static_boosterName_" + T) | |
127 | 141 | ||
128 | 142 | ||
129 | - | func | |
143 | + | func V () = "static_burnAddress" | |
130 | 144 | ||
131 | 145 | ||
132 | - | func | |
146 | + | func W () = Address(fromBase58String(A(B()))) | |
133 | 147 | ||
134 | 148 | ||
135 | - | func | |
149 | + | func X () = valueOrErrorMessage(getString(H()), "3GGN: There is no game name defined!") | |
136 | 150 | ||
137 | 151 | ||
138 | - | func | |
152 | + | func Y () = valueOrErrorMessage(getString(I()), "3GLGN: There is no long game name defined!") | |
139 | 153 | ||
140 | 154 | ||
141 | - | func | |
155 | + | func Z () = valueOrErrorMessage(getString(J()), "3GNN: There is no nft name defined!") | |
142 | 156 | ||
143 | 157 | ||
144 | - | func | |
158 | + | func aa () = Address(fromBase58String(w(W(), D()))) | |
145 | 159 | ||
146 | 160 | ||
147 | - | func | |
161 | + | func ab () = Address(fromBase58String(w(W(), E()))) | |
148 | 162 | ||
149 | 163 | ||
150 | - | func | |
164 | + | func ac () = Address(fromBase58String(w(W(), G()))) | |
151 | 165 | ||
152 | 166 | ||
153 | - | func | |
167 | + | func ad () = Address(fromBase58String(w(W(), F()))) | |
154 | 168 | ||
155 | 169 | ||
156 | - | func | |
170 | + | func ae () = fromBase58String(w(W(), C())) | |
157 | 171 | ||
158 | 172 | ||
159 | - | func | |
173 | + | func af () = fromBase58String(w(W(), K())) | |
160 | 174 | ||
161 | 175 | ||
162 | - | func | |
176 | + | func ag () = Address(fromBase58String(w(W(), R()))) | |
163 | 177 | ||
164 | 178 | ||
165 | - | func | |
179 | + | func ah () = Address(fromBase58String(w(W(), V()))) | |
166 | 180 | ||
167 | 181 | ||
168 | - | func | |
182 | + | func ai () = fromBase58String(A(L())) | |
169 | 183 | ||
170 | 184 | ||
171 | - | func | |
185 | + | func aj () = a(M()) | |
172 | 186 | ||
173 | 187 | ||
174 | - | func | |
188 | + | func ak () = a(N()) | |
175 | 189 | ||
176 | 190 | ||
177 | - | func | |
191 | + | func al () = a(O()) | |
178 | 192 | ||
179 | 193 | ||
180 | - | func | |
194 | + | func am () = fromBase58String(A(P())) | |
181 | 195 | ||
182 | 196 | ||
183 | - | func | |
197 | + | func an (T) = valueOrErrorMessage(getInteger(S(toString(T))), "3GBPFL: There is no price value for this level of booster") | |
184 | 198 | ||
185 | 199 | ||
186 | - | func | |
200 | + | func ao (T) = valueOrErrorMessage(getString(U(toString(T))), "3GBNFL: There is no such booster") | |
187 | 201 | ||
188 | 202 | ||
189 | - | func | |
203 | + | func ap (aq) = if (isDefined(aq.assetId)) | |
190 | 204 | then throw("RCAP: Please attach waves") | |
191 | 205 | else { | |
192 | - | let | |
193 | - | if (( | |
194 | - | then throw((("RCAP: Please attach exactly " + toString( | |
195 | - | else [ScriptTransfer( | |
206 | + | let ar = getIntegerValue(W(), Q()) | |
207 | + | if ((aq.amount != ar)) | |
208 | + | then throw((("RCAP: Please attach exactly " + toString(ar)) + " amount of wavelets")) | |
209 | + | else [ScriptTransfer(ag(), ar, unit)] | |
196 | 210 | } | |
197 | 211 | ||
198 | 212 | ||
199 | - | func | |
200 | - | let c = | |
213 | + | func as (at) = { | |
214 | + | let c = at | |
201 | 215 | if ($isInstanceOf(c, "String")) | |
202 | 216 | then { | |
203 | - | let | |
204 | - | | |
217 | + | let au = c | |
218 | + | au | |
205 | 219 | } | |
206 | 220 | else throw("3AS: wrong type, expected: String") | |
207 | 221 | } | |
208 | 222 | ||
209 | 223 | ||
210 | - | func | |
211 | - | let | |
212 | - | let | |
213 | - | let | |
214 | - | let | |
215 | - | let | |
216 | - | let | |
217 | - | let | |
218 | - | let | |
219 | - | let | |
220 | - | if (( | |
224 | + | func av (m,aw,ax) = { | |
225 | + | let i = value(ax.assetId) | |
226 | + | let ay = value(assetInfo(i)).issuer | |
227 | + | let az = r(i) | |
228 | + | let v = az._1 | |
229 | + | let u = az._2 | |
230 | + | let aA = n(aw) | |
231 | + | let aB = a(aA) | |
232 | + | let aC = l(aw) | |
233 | + | let aD = (a(aC) - aB) | |
234 | + | if ((ax.amount != 1)) | |
221 | 235 | then throw("NFT is not attached") | |
222 | - | else if (if (( | |
223 | - | then ( | |
236 | + | else if (if ((ay != aa())) | |
237 | + | then (ay != ab()) | |
224 | 238 | else false) | |
225 | 239 | then throw("ivalid NFT attached") | |
226 | - | else if ((0 >= | |
227 | - | then throw(("No spots available in hunt for: " + | |
240 | + | else if ((0 >= aD)) | |
241 | + | then throw(("No spots available in hunt for: " + aw)) | |
228 | 242 | else { | |
229 | - | let | |
230 | - | let | |
231 | - | let c = getInteger( | |
243 | + | let aE = ((("address_" + toString(this)) + "_perchesAvailable_") + v) | |
244 | + | let aF = { | |
245 | + | let c = getInteger(ad(), aE) | |
232 | 246 | if ($isInstanceOf(c, "Int")) | |
233 | 247 | then { | |
234 | 248 | let d = c | |
236 | 250 | } | |
237 | 251 | else 0 | |
238 | 252 | } | |
239 | - | if (( | |
253 | + | if ((aF == aF)) | |
240 | 254 | then { | |
241 | - | let | |
242 | - | [IntegerEntry( | |
255 | + | let aG = ae() | |
256 | + | [IntegerEntry(aA, (aB + 1)), StringEntry(k(i), m), BooleanEntry(o(m, toBase58String(i)), true), IntegerEntry(h(i), (lastBlock.timestamp + ak())), BooleanEntry(q(m, toBase58String(i)), true)] | |
243 | 257 | } | |
244 | 258 | else throw("Strict value is not equal to itself.") | |
245 | 259 | } | |
246 | 260 | } | |
247 | 261 | ||
248 | 262 | ||
249 | - | func | |
250 | - | let | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | let | |
255 | - | let | |
256 | - | let | |
257 | - | if (( | |
263 | + | func aH (p,m) = { | |
264 | + | let i = fromBase58String(p) | |
265 | + | let az = r(i) | |
266 | + | let v = az._1 | |
267 | + | let u = az._2 | |
268 | + | let aA = n(m) | |
269 | + | let aI = k(i) | |
270 | + | let aJ = (a(h(i)) - lastBlock.timestamp) | |
271 | + | if ((A(aI) != m)) | |
258 | 272 | then throw("3IULD: The duck is not yours") | |
259 | - | else if (( | |
260 | - | then throw((("3IUL: You need to wait to unlock " + toString(( | |
261 | - | else [IntegerEntry( | |
273 | + | else if ((aJ > 0)) | |
274 | + | then throw((("3IUL: You need to wait to unlock " + toString((aJ / 1000))) + " seconds")) | |
275 | + | else [IntegerEntry(j(i), (lastBlock.timestamp + al()))] | |
262 | 276 | } | |
263 | 277 | ||
264 | 278 | ||
265 | - | func | |
266 | - | let | |
267 | - | let | |
268 | - | let | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | if (( | |
279 | + | func aK (p,m,aL) = { | |
280 | + | let i = fromBase58String(p) | |
281 | + | let az = r(i) | |
282 | + | let v = az._1 | |
283 | + | let u = az._2 | |
284 | + | let aA = n(aL) | |
285 | + | let aI = k(i) | |
286 | + | let aJ = (a(j(i)) - lastBlock.timestamp) | |
287 | + | if ((A(aI) != m)) | |
274 | 288 | then throw("3UD: The duck is not yours") | |
275 | - | else if (( | |
276 | - | then throw((("3UD: You need to wait to unlock " + toString(( | |
277 | - | else [ScriptTransfer(Address(fromBase58String( | |
289 | + | else if ((aJ > 0)) | |
290 | + | then throw((("3UD: You need to wait to unlock " + toString((aJ / 1000))) + " seconds")) | |
291 | + | else [ScriptTransfer(Address(fromBase58String(m)), 1, i), DeleteEntry(o(m, p)), DeleteEntry(aI), IntegerEntry(aA, (a(aA) - 1))] | |
278 | 292 | } | |
279 | 293 | ||
280 | 294 | ||
281 | - | @Callable( | |
282 | - | func buyAccessItemInternal ( | |
295 | + | @Callable(aM) | |
296 | + | func buyAccessItemInternal (m) = if ((aM.caller != this)) | |
283 | 297 | then throw("3BAII: internal use only") | |
284 | 298 | else { | |
285 | - | let | |
286 | - | let | |
287 | - | let | |
288 | - | $Tuple2([ | |
299 | + | let aN = Issue(("ACCESS-" + X()), ((("[Access] " + Y()) + " access NFT for ") + Z()), 1, 0, false) | |
300 | + | let aO = toBase58String(calculateAssetId(aN)) | |
301 | + | let aC = l(m) | |
302 | + | $Tuple2([aN, StringEntry((("accessItem_" + aO) + "_owner"), m), StringEntry((("address_" + m) + "_owning"), aO), IntegerEntry(aC, (a(aC) + 1))], aO) | |
289 | 303 | } | |
290 | 304 | ||
291 | 305 | ||
292 | 306 | ||
293 | - | @Callable( | |
294 | - | func configureOracle ( | |
307 | + | @Callable(aM) | |
308 | + | func configureOracle (aP,aQ,aR,aS) = if ((aM.caller != this)) | |
295 | 309 | then throw("3CO: admin only") | |
296 | - | else [StringEntry("static_oracleAddress", | |
310 | + | else [StringEntry("static_oracleAddress", aP), StringEntry("static_shortGameName", aQ), StringEntry("static_longGameName", aR), StringEntry("static_nftName", aS)] | |
297 | 311 | ||
298 | 312 | ||
299 | 313 | ||
300 | - | @Callable( | |
301 | - | func deleteSetting (b) = if (( | |
314 | + | @Callable(aM) | |
315 | + | func deleteSetting (b) = if ((aM.caller != this)) | |
302 | 316 | then throw("3DS: Only administrator can call this method") | |
303 | 317 | else [DeleteEntry(b)] | |
304 | 318 | ||
305 | 319 | ||
306 | 320 | ||
307 | - | @Callable( | |
321 | + | @Callable(aM) | |
308 | 322 | func buyAccessItemAndLockDuck () = { | |
309 | - | let | |
310 | - | let | |
311 | - | let | |
312 | - | if (( | |
323 | + | let aT = value(aM.payments[0]) | |
324 | + | let aU = value(aM.payments[1]) | |
325 | + | let m = toString(aM.originCaller) | |
326 | + | if ((aT.assetId != ai())) | |
313 | 327 | then throw("3BAI: Wrong asset attached") | |
314 | - | else if (( | |
328 | + | else if ((aT.amount != aj())) | |
315 | 329 | then throw("3BAI: Wrong amount of assets attached") | |
316 | 330 | else { | |
317 | - | let | |
318 | - | if (( | |
331 | + | let aV = as(invoke(this, "buyAccessItemInternal", [m], nil)) | |
332 | + | if ((aV == aV)) | |
319 | 333 | then { | |
320 | - | let | |
321 | - | if (( | |
334 | + | let aW = invoke(ah(), "burnAttachedPayments", nil, [AttachedPayment(ae(), aT.amount)]) | |
335 | + | if ((aW == aW)) | |
322 | 336 | then { | |
323 | - | let | |
337 | + | let aX = if ((aM.caller == ac())) | |
324 | 338 | then nil | |
325 | - | else | |
326 | - | if (( | |
339 | + | else ap(aM.payments[2]) | |
340 | + | if ((aX == aX)) | |
327 | 341 | then { | |
328 | - | let | |
329 | - | $Tuple2( | |
342 | + | let aY = (av(m, m, aU) ++ aX) | |
343 | + | $Tuple2(aY, aV) | |
330 | 344 | } | |
331 | 345 | else throw("Strict value is not equal to itself.") | |
332 | 346 | } | |
338 | 352 | ||
339 | 353 | ||
340 | 354 | ||
341 | - | @Callable( | |
355 | + | @Callable(aM) | |
342 | 356 | func buyAccessItem () = { | |
343 | - | let | |
344 | - | let | |
345 | - | if (( | |
346 | - | then throw(("3BAI: Wrong asset attached " + toBase58String( | |
347 | - | else if (( | |
357 | + | let m = toString(aM.originCaller) | |
358 | + | let aT = value(aM.payments[0]) | |
359 | + | if ((aT.assetId != ai())) | |
360 | + | then throw(("3BAI: Wrong asset attached " + toBase58String(ai()))) | |
361 | + | else if ((aT.amount != aj())) | |
348 | 362 | then throw("3BAI: Wrong amount of assets attached") | |
349 | 363 | else { | |
350 | - | let | |
351 | - | if (( | |
364 | + | let aV = as(invoke(this, "buyAccessItemInternal", [m], nil)) | |
365 | + | if ((aV == aV)) | |
352 | 366 | then { | |
353 | - | let | |
354 | - | if (( | |
367 | + | let aW = invoke(ah(), "burnAttachedPayments", nil, [AttachedPayment(ae(), aT.amount)]) | |
368 | + | if ((aW == aW)) | |
355 | 369 | then { | |
356 | - | let | |
370 | + | let aX = if ((aM.caller == ac())) | |
357 | 371 | then nil | |
358 | - | else | |
359 | - | if (( | |
360 | - | then $Tuple2( | |
372 | + | else ap(aM.payments[1]) | |
373 | + | if ((aX == aX)) | |
374 | + | then $Tuple2(aX, aV) | |
361 | 375 | else throw("Strict value is not equal to itself.") | |
362 | 376 | } | |
363 | 377 | else throw("Strict value is not equal to itself.") | |
368 | 382 | ||
369 | 383 | ||
370 | 384 | ||
371 | - | @Callable( | |
372 | - | func buyAccessItemOther ( | |
373 | - | let | |
374 | - | if (( | |
385 | + | @Callable(aM) | |
386 | + | func buyAccessItemOther (aZ) = { | |
387 | + | let aT = value(aM.payments[0]) | |
388 | + | if ((aT.assetId != ai())) | |
375 | 389 | then throw("3BAI: Wrong asset attached") | |
376 | - | else if (( | |
390 | + | else if ((aT.amount != aj())) | |
377 | 391 | then throw("3BAI: Wrong amount of assets attached") | |
378 | 392 | else { | |
379 | - | let | |
380 | - | if (( | |
393 | + | let aV = as(invoke(this, "buyAccessItemInternal", [aZ], nil)) | |
394 | + | if ((aV == aV)) | |
381 | 395 | then { | |
382 | - | let | |
383 | - | if (( | |
384 | - | then $Tuple2(nil, | |
396 | + | let aW = invoke(ah(), "burnAttachedPayments", nil, [AttachedPayment(ae(), aT.amount)]) | |
397 | + | if ((aW == aW)) | |
398 | + | then $Tuple2(nil, aV) | |
385 | 399 | else throw("Strict value is not equal to itself.") | |
386 | 400 | } | |
387 | 401 | else throw("Strict value is not equal to itself.") | |
390 | 404 | ||
391 | 405 | ||
392 | 406 | ||
393 | - | @Callable( | |
407 | + | @Callable(aM) | |
394 | 408 | func lockDuck () = { | |
395 | - | let | |
396 | - | let | |
397 | - | let | |
398 | - | if (( | |
399 | - | then ( | |
409 | + | let m = toString(aM.originCaller) | |
410 | + | let aU = value(aM.payments[0]) | |
411 | + | let aX = ap(aM.payments[1]) | |
412 | + | if ((aX == aX)) | |
413 | + | then (av(m, m, aU) ++ aX) | |
400 | 414 | else throw("Strict value is not equal to itself.") | |
401 | 415 | } | |
402 | 416 | ||
403 | 417 | ||
404 | 418 | ||
405 | - | @Callable( | |
406 | - | func initUnlock ( | |
407 | - | let | |
408 | - | let | |
409 | - | if (( | |
410 | - | then ( | |
419 | + | @Callable(aM) | |
420 | + | func initUnlock (p) = { | |
421 | + | let m = toString(aM.caller) | |
422 | + | let aX = ap(aM.payments[0]) | |
423 | + | if ((aX == aX)) | |
424 | + | then (aH(p, m) ++ aX) | |
411 | 425 | else throw("Strict value is not equal to itself.") | |
412 | 426 | } | |
413 | 427 | ||
414 | 428 | ||
415 | 429 | ||
416 | - | @Callable( | |
417 | - | func lockDuckRenting ( | |
430 | + | @Callable(aM) | |
431 | + | func lockDuckRenting (ba) = if ((aM.caller != ac())) | |
418 | 432 | then throw("3UDO: Renting only!") | |
419 | 433 | else { | |
420 | - | let | |
421 | - | let | |
422 | - | | |
434 | + | let m = toString(aM.caller) | |
435 | + | let aU = value(aM.payments[0]) | |
436 | + | av(m, ba, aU) | |
423 | 437 | } | |
424 | 438 | ||
425 | 439 | ||
426 | 440 | ||
427 | - | @Callable( | |
428 | - | func unlockDuckRenting ( | |
441 | + | @Callable(aM) | |
442 | + | func unlockDuckRenting (p,aL) = if ((aM.caller != ac())) | |
429 | 443 | then throw("3UDO: Renting only!") | |
430 | 444 | else { | |
431 | - | let | |
432 | - | | |
445 | + | let m = toString(aM.caller) | |
446 | + | aK(p, m, aL) | |
433 | 447 | } | |
434 | 448 | ||
435 | 449 | ||
436 | 450 | ||
437 | - | @Callable( | |
438 | - | func unlockDuckOther ( | |
451 | + | @Callable(aM) | |
452 | + | func unlockDuckOther (p) = if ((aM.caller != this)) | |
439 | 453 | then throw("3UDO: Admin only!") | |
440 | 454 | else { | |
441 | - | let | |
442 | - | | |
455 | + | let bb = A(k(fromBase58String(p))) | |
456 | + | aK(p, bb, bb) | |
443 | 457 | } | |
444 | 458 | ||
445 | 459 | ||
446 | 460 | ||
447 | - | @Callable( | |
448 | - | func unlockDuck ( | |
461 | + | @Callable(aM) | |
462 | + | func unlockDuck (p,bc,bd,be) = if ((bd != true)) | |
449 | 463 | then throw("3UD: Not allowed to unlock the duck!") | |
450 | 464 | else { | |
451 | - | let | |
452 | - | let | |
453 | - | if (( | |
465 | + | let bf = 3600000 | |
466 | + | let bg = lastBlock.timestamp | |
467 | + | if ((bg > (bc + bf))) | |
454 | 468 | then throw("3UD: Outdated signature!") | |
455 | 469 | else { | |
456 | - | let | |
457 | - | let | |
458 | - | if (!(sigVerify_8Kb(toBytes( | |
459 | - | then throw(((("3UD: Invalid proof from backend key" + toBase58String( | |
470 | + | let m = toString(aM.caller) | |
471 | + | let bh = makeString([p, toString(bc), toString(bd)], ";") | |
472 | + | if (!(sigVerify_8Kb(toBytes(bh), fromBase58String(be), af()))) | |
473 | + | then throw(((("3UD: Invalid proof from backend key" + toBase58String(af())) + " ") + bh)) | |
460 | 474 | else { | |
461 | - | let | |
462 | - | if (( | |
463 | - | then ( | |
475 | + | let aX = ap(aM.payments[0]) | |
476 | + | if ((aX == aX)) | |
477 | + | then (aK(p, m, m) ++ aX) | |
464 | 478 | else throw("Strict value is not equal to itself.") | |
465 | 479 | } | |
466 | 480 | } | |
467 | 481 | } | |
468 | 482 | ||
469 | 483 | ||
484 | + | @Verifier(bi) | |
485 | + | func bj () = if (e()) | |
486 | + | then sigVerify(bi.bodyBytes, bi.proofs[0], bi.senderPublicKey) | |
487 | + | else { | |
488 | + | let bk = base58'6TdaXEfhnjYquvPf3yV7MFxt2CbgFmaqsvGwkKfXtKi4' | |
489 | + | let bl = base58'7DsP2WaMLocbHuUxux7pbXRjTrrZ1TFQPsi5QumS3gr8' | |
490 | + | let bm = base58'BpFWP3p3JgYrrP45xfrKzeMcWMEXoinj4FVPPkUiA8D3' | |
491 | + | let bn = if (sigVerify(bi.bodyBytes, bi.proofs[0], bk)) | |
492 | + | then 1 | |
493 | + | else if (sigVerify(bi.bodyBytes, bi.proofs[1], bk)) | |
494 | + | then 1 | |
495 | + | else if (sigVerify(bi.bodyBytes, bi.proofs[2], bk)) | |
496 | + | then 1 | |
497 | + | else 0 | |
498 | + | let bo = if (sigVerify(bi.bodyBytes, bi.proofs[0], bl)) | |
499 | + | then 1 | |
500 | + | else if (sigVerify(bi.bodyBytes, bi.proofs[1], bl)) | |
501 | + | then 1 | |
502 | + | else if (sigVerify(bi.bodyBytes, bi.proofs[2], bl)) | |
503 | + | then 1 | |
504 | + | else 0 | |
505 | + | let bp = if (sigVerify(bi.bodyBytes, bi.proofs[0], bm)) | |
506 | + | then 1 | |
507 | + | else if (sigVerify(bi.bodyBytes, bi.proofs[1], bm)) | |
508 | + | then 1 | |
509 | + | else if (sigVerify(bi.bodyBytes, bi.proofs[2], bm)) | |
510 | + | then 1 | |
511 | + | else 0 | |
512 | + | let bq = ((bn + bo) + bp) | |
513 | + | let c = bi | |
514 | + | (bq >= 2) | |
515 | + | } | |
516 | + |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = { | |
5 | 5 | let c = getInteger(this, b) | |
6 | 6 | if ($isInstanceOf(c, "Int")) | |
7 | 7 | then { | |
8 | 8 | let d = c | |
9 | 9 | d | |
10 | 10 | } | |
11 | 11 | else 0 | |
12 | 12 | } | |
13 | 13 | ||
14 | 14 | ||
15 | - | func e (f) = (("duck_" + toBase58String(f)) + "_unlockTime") | |
16 | - | ||
17 | - | ||
18 | - | func g (f) = (("duck_" + toBase58String(f)) + "finish_unlockTime") | |
19 | - | ||
20 | - | ||
21 | - | func h (f) = (("duck_" + toBase58String(f)) + "_owner") | |
22 | - | ||
23 | - | ||
24 | - | func i (j) = (("address_" + j) + "_spotsBought") | |
25 | - | ||
26 | - | ||
27 | - | func k (j) = (("address_" + j) + "_spotsBusy") | |
28 | - | ||
29 | - | ||
30 | - | func l (j,m) = (((("address_" + j) + "_lockedDuck_") + m) + "_status") | |
31 | - | ||
32 | - | ||
33 | - | func n (j,m) = (((("address_" + j) + "_lockedDuck_") + m) + "_v2") | |
34 | - | ||
35 | - | ||
36 | - | func o (f) = { | |
37 | - | let p = value(value(assetInfo(f)).name) | |
38 | - | let q = split(p, "") | |
39 | - | let r = (q[(size(q) - 2)] == "J") | |
40 | - | let s = if (r) | |
41 | - | then "B" | |
42 | - | else q[(size(q) - 1)] | |
43 | - | $Tuple2(s, r) | |
15 | + | func e () = { | |
16 | + | let f = { | |
17 | + | let c = getBoolean(this, "TESTENV") | |
18 | + | if ($isInstanceOf(c, "Boolean")) | |
19 | + | then { | |
20 | + | let g = c | |
21 | + | g | |
22 | + | } | |
23 | + | else false | |
24 | + | } | |
25 | + | f | |
44 | 26 | } | |
45 | 27 | ||
46 | 28 | ||
47 | - | func t (u,b) = { | |
48 | - | let c = getString(u, b) | |
29 | + | func h (i) = (("duck_" + toBase58String(i)) + "_unlockTime") | |
30 | + | ||
31 | + | ||
32 | + | func j (i) = (("duck_" + toBase58String(i)) + "finish_unlockTime") | |
33 | + | ||
34 | + | ||
35 | + | func k (i) = (("duck_" + toBase58String(i)) + "_owner") | |
36 | + | ||
37 | + | ||
38 | + | func l (m) = (("address_" + m) + "_spotsBought") | |
39 | + | ||
40 | + | ||
41 | + | func n (m) = (("address_" + m) + "_spotsBusy") | |
42 | + | ||
43 | + | ||
44 | + | func o (m,p) = (((("address_" + m) + "_lockedDuck_") + p) + "_status") | |
45 | + | ||
46 | + | ||
47 | + | func q (m,p) = (((("address_" + m) + "_lockedDuck_") + p) + "_v2") | |
48 | + | ||
49 | + | ||
50 | + | func r (i) = { | |
51 | + | let s = value(value(assetInfo(i)).name) | |
52 | + | let t = split(s, "") | |
53 | + | let u = (t[(size(t) - 2)] == "J") | |
54 | + | let v = if (u) | |
55 | + | then "B" | |
56 | + | else t[(size(t) - 1)] | |
57 | + | $Tuple2(v, u) | |
58 | + | } | |
59 | + | ||
60 | + | ||
61 | + | func w (x,b) = { | |
62 | + | let c = getString(x, b) | |
49 | 63 | if ($isInstanceOf(c, "String")) | |
50 | 64 | then { | |
51 | - | let | |
52 | - | | |
65 | + | let y = c | |
66 | + | y | |
53 | 67 | } | |
54 | 68 | else "" | |
55 | 69 | } | |
56 | 70 | ||
57 | 71 | ||
58 | - | func | |
72 | + | func z (b) = { | |
59 | 73 | let c = getBoolean(b) | |
60 | 74 | if ($isInstanceOf(c, "Boolean")) | |
61 | 75 | then { | |
62 | 76 | let d = c | |
63 | 77 | d | |
64 | 78 | } | |
65 | 79 | else false | |
66 | 80 | } | |
67 | 81 | ||
68 | 82 | ||
69 | - | func | |
83 | + | func A (b) = w(this, b) | |
70 | 84 | ||
71 | 85 | ||
72 | - | func | |
86 | + | func B () = "static_oracleAddress" | |
73 | 87 | ||
74 | 88 | ||
75 | - | func | |
89 | + | func C () = "static_eggAssetId" | |
76 | 90 | ||
77 | 91 | ||
78 | - | func | |
92 | + | func D () = "static_incubatorAddress" | |
79 | 93 | ||
80 | 94 | ||
81 | - | func | |
95 | + | func E () = "static_breederAddress" | |
82 | 96 | ||
83 | 97 | ||
84 | - | func | |
98 | + | func F () = "static_farmingAddress" | |
85 | 99 | ||
86 | 100 | ||
87 | - | func | |
101 | + | func G () = "static_rentingAddress" | |
88 | 102 | ||
89 | 103 | ||
90 | - | func | |
104 | + | func H () = "static_shortGameName" | |
91 | 105 | ||
92 | 106 | ||
93 | - | func | |
107 | + | func I () = "static_longGameName" | |
94 | 108 | ||
95 | 109 | ||
96 | - | func | |
110 | + | func J () = "static_nftName" | |
97 | 111 | ||
98 | 112 | ||
99 | - | func | |
113 | + | func K () = "static_backendPubKey" | |
100 | 114 | ||
101 | 115 | ||
102 | - | func | |
116 | + | func L () = "static_accessItemAssetId" | |
103 | 117 | ||
104 | 118 | ||
105 | - | func | |
119 | + | func M () = "static_accessItemPrice" | |
106 | 120 | ||
107 | 121 | ||
108 | - | func | |
122 | + | func N () = "static_minLockDuration" | |
109 | 123 | ||
110 | 124 | ||
111 | - | func | |
125 | + | func O () = "static_UnlockDuration" | |
112 | 126 | ||
113 | 127 | ||
114 | - | func | |
128 | + | func P () = "static_boosterBuyAssetId" | |
115 | 129 | ||
116 | 130 | ||
117 | - | func | |
131 | + | func Q () = "static_extraFee" | |
118 | 132 | ||
119 | 133 | ||
120 | - | func | |
134 | + | func R () = "static_feeAggregator" | |
121 | 135 | ||
122 | 136 | ||
123 | - | func | |
137 | + | func S (T) = ("static_boosterPriceLevel_" + T) | |
124 | 138 | ||
125 | 139 | ||
126 | - | func | |
140 | + | func U (T) = ("static_boosterName_" + T) | |
127 | 141 | ||
128 | 142 | ||
129 | - | func | |
143 | + | func V () = "static_burnAddress" | |
130 | 144 | ||
131 | 145 | ||
132 | - | func | |
146 | + | func W () = Address(fromBase58String(A(B()))) | |
133 | 147 | ||
134 | 148 | ||
135 | - | func | |
149 | + | func X () = valueOrErrorMessage(getString(H()), "3GGN: There is no game name defined!") | |
136 | 150 | ||
137 | 151 | ||
138 | - | func | |
152 | + | func Y () = valueOrErrorMessage(getString(I()), "3GLGN: There is no long game name defined!") | |
139 | 153 | ||
140 | 154 | ||
141 | - | func | |
155 | + | func Z () = valueOrErrorMessage(getString(J()), "3GNN: There is no nft name defined!") | |
142 | 156 | ||
143 | 157 | ||
144 | - | func | |
158 | + | func aa () = Address(fromBase58String(w(W(), D()))) | |
145 | 159 | ||
146 | 160 | ||
147 | - | func | |
161 | + | func ab () = Address(fromBase58String(w(W(), E()))) | |
148 | 162 | ||
149 | 163 | ||
150 | - | func | |
164 | + | func ac () = Address(fromBase58String(w(W(), G()))) | |
151 | 165 | ||
152 | 166 | ||
153 | - | func | |
167 | + | func ad () = Address(fromBase58String(w(W(), F()))) | |
154 | 168 | ||
155 | 169 | ||
156 | - | func | |
170 | + | func ae () = fromBase58String(w(W(), C())) | |
157 | 171 | ||
158 | 172 | ||
159 | - | func | |
173 | + | func af () = fromBase58String(w(W(), K())) | |
160 | 174 | ||
161 | 175 | ||
162 | - | func | |
176 | + | func ag () = Address(fromBase58String(w(W(), R()))) | |
163 | 177 | ||
164 | 178 | ||
165 | - | func | |
179 | + | func ah () = Address(fromBase58String(w(W(), V()))) | |
166 | 180 | ||
167 | 181 | ||
168 | - | func | |
182 | + | func ai () = fromBase58String(A(L())) | |
169 | 183 | ||
170 | 184 | ||
171 | - | func | |
185 | + | func aj () = a(M()) | |
172 | 186 | ||
173 | 187 | ||
174 | - | func | |
188 | + | func ak () = a(N()) | |
175 | 189 | ||
176 | 190 | ||
177 | - | func | |
191 | + | func al () = a(O()) | |
178 | 192 | ||
179 | 193 | ||
180 | - | func | |
194 | + | func am () = fromBase58String(A(P())) | |
181 | 195 | ||
182 | 196 | ||
183 | - | func | |
197 | + | func an (T) = valueOrErrorMessage(getInteger(S(toString(T))), "3GBPFL: There is no price value for this level of booster") | |
184 | 198 | ||
185 | 199 | ||
186 | - | func | |
200 | + | func ao (T) = valueOrErrorMessage(getString(U(toString(T))), "3GBNFL: There is no such booster") | |
187 | 201 | ||
188 | 202 | ||
189 | - | func | |
203 | + | func ap (aq) = if (isDefined(aq.assetId)) | |
190 | 204 | then throw("RCAP: Please attach waves") | |
191 | 205 | else { | |
192 | - | let | |
193 | - | if (( | |
194 | - | then throw((("RCAP: Please attach exactly " + toString( | |
195 | - | else [ScriptTransfer( | |
206 | + | let ar = getIntegerValue(W(), Q()) | |
207 | + | if ((aq.amount != ar)) | |
208 | + | then throw((("RCAP: Please attach exactly " + toString(ar)) + " amount of wavelets")) | |
209 | + | else [ScriptTransfer(ag(), ar, unit)] | |
196 | 210 | } | |
197 | 211 | ||
198 | 212 | ||
199 | - | func | |
200 | - | let c = | |
213 | + | func as (at) = { | |
214 | + | let c = at | |
201 | 215 | if ($isInstanceOf(c, "String")) | |
202 | 216 | then { | |
203 | - | let | |
204 | - | | |
217 | + | let au = c | |
218 | + | au | |
205 | 219 | } | |
206 | 220 | else throw("3AS: wrong type, expected: String") | |
207 | 221 | } | |
208 | 222 | ||
209 | 223 | ||
210 | - | func | |
211 | - | let | |
212 | - | let | |
213 | - | let | |
214 | - | let | |
215 | - | let | |
216 | - | let | |
217 | - | let | |
218 | - | let | |
219 | - | let | |
220 | - | if (( | |
224 | + | func av (m,aw,ax) = { | |
225 | + | let i = value(ax.assetId) | |
226 | + | let ay = value(assetInfo(i)).issuer | |
227 | + | let az = r(i) | |
228 | + | let v = az._1 | |
229 | + | let u = az._2 | |
230 | + | let aA = n(aw) | |
231 | + | let aB = a(aA) | |
232 | + | let aC = l(aw) | |
233 | + | let aD = (a(aC) - aB) | |
234 | + | if ((ax.amount != 1)) | |
221 | 235 | then throw("NFT is not attached") | |
222 | - | else if (if (( | |
223 | - | then ( | |
236 | + | else if (if ((ay != aa())) | |
237 | + | then (ay != ab()) | |
224 | 238 | else false) | |
225 | 239 | then throw("ivalid NFT attached") | |
226 | - | else if ((0 >= | |
227 | - | then throw(("No spots available in hunt for: " + | |
240 | + | else if ((0 >= aD)) | |
241 | + | then throw(("No spots available in hunt for: " + aw)) | |
228 | 242 | else { | |
229 | - | let | |
230 | - | let | |
231 | - | let c = getInteger( | |
243 | + | let aE = ((("address_" + toString(this)) + "_perchesAvailable_") + v) | |
244 | + | let aF = { | |
245 | + | let c = getInteger(ad(), aE) | |
232 | 246 | if ($isInstanceOf(c, "Int")) | |
233 | 247 | then { | |
234 | 248 | let d = c | |
235 | 249 | d | |
236 | 250 | } | |
237 | 251 | else 0 | |
238 | 252 | } | |
239 | - | if (( | |
253 | + | if ((aF == aF)) | |
240 | 254 | then { | |
241 | - | let | |
242 | - | [IntegerEntry( | |
255 | + | let aG = ae() | |
256 | + | [IntegerEntry(aA, (aB + 1)), StringEntry(k(i), m), BooleanEntry(o(m, toBase58String(i)), true), IntegerEntry(h(i), (lastBlock.timestamp + ak())), BooleanEntry(q(m, toBase58String(i)), true)] | |
243 | 257 | } | |
244 | 258 | else throw("Strict value is not equal to itself.") | |
245 | 259 | } | |
246 | 260 | } | |
247 | 261 | ||
248 | 262 | ||
249 | - | func | |
250 | - | let | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | let | |
255 | - | let | |
256 | - | let | |
257 | - | if (( | |
263 | + | func aH (p,m) = { | |
264 | + | let i = fromBase58String(p) | |
265 | + | let az = r(i) | |
266 | + | let v = az._1 | |
267 | + | let u = az._2 | |
268 | + | let aA = n(m) | |
269 | + | let aI = k(i) | |
270 | + | let aJ = (a(h(i)) - lastBlock.timestamp) | |
271 | + | if ((A(aI) != m)) | |
258 | 272 | then throw("3IULD: The duck is not yours") | |
259 | - | else if (( | |
260 | - | then throw((("3IUL: You need to wait to unlock " + toString(( | |
261 | - | else [IntegerEntry( | |
273 | + | else if ((aJ > 0)) | |
274 | + | then throw((("3IUL: You need to wait to unlock " + toString((aJ / 1000))) + " seconds")) | |
275 | + | else [IntegerEntry(j(i), (lastBlock.timestamp + al()))] | |
262 | 276 | } | |
263 | 277 | ||
264 | 278 | ||
265 | - | func | |
266 | - | let | |
267 | - | let | |
268 | - | let | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | if (( | |
279 | + | func aK (p,m,aL) = { | |
280 | + | let i = fromBase58String(p) | |
281 | + | let az = r(i) | |
282 | + | let v = az._1 | |
283 | + | let u = az._2 | |
284 | + | let aA = n(aL) | |
285 | + | let aI = k(i) | |
286 | + | let aJ = (a(j(i)) - lastBlock.timestamp) | |
287 | + | if ((A(aI) != m)) | |
274 | 288 | then throw("3UD: The duck is not yours") | |
275 | - | else if (( | |
276 | - | then throw((("3UD: You need to wait to unlock " + toString(( | |
277 | - | else [ScriptTransfer(Address(fromBase58String( | |
289 | + | else if ((aJ > 0)) | |
290 | + | then throw((("3UD: You need to wait to unlock " + toString((aJ / 1000))) + " seconds")) | |
291 | + | else [ScriptTransfer(Address(fromBase58String(m)), 1, i), DeleteEntry(o(m, p)), DeleteEntry(aI), IntegerEntry(aA, (a(aA) - 1))] | |
278 | 292 | } | |
279 | 293 | ||
280 | 294 | ||
281 | - | @Callable( | |
282 | - | func buyAccessItemInternal ( | |
295 | + | @Callable(aM) | |
296 | + | func buyAccessItemInternal (m) = if ((aM.caller != this)) | |
283 | 297 | then throw("3BAII: internal use only") | |
284 | 298 | else { | |
285 | - | let | |
286 | - | let | |
287 | - | let | |
288 | - | $Tuple2([ | |
299 | + | let aN = Issue(("ACCESS-" + X()), ((("[Access] " + Y()) + " access NFT for ") + Z()), 1, 0, false) | |
300 | + | let aO = toBase58String(calculateAssetId(aN)) | |
301 | + | let aC = l(m) | |
302 | + | $Tuple2([aN, StringEntry((("accessItem_" + aO) + "_owner"), m), StringEntry((("address_" + m) + "_owning"), aO), IntegerEntry(aC, (a(aC) + 1))], aO) | |
289 | 303 | } | |
290 | 304 | ||
291 | 305 | ||
292 | 306 | ||
293 | - | @Callable( | |
294 | - | func configureOracle ( | |
307 | + | @Callable(aM) | |
308 | + | func configureOracle (aP,aQ,aR,aS) = if ((aM.caller != this)) | |
295 | 309 | then throw("3CO: admin only") | |
296 | - | else [StringEntry("static_oracleAddress", | |
310 | + | else [StringEntry("static_oracleAddress", aP), StringEntry("static_shortGameName", aQ), StringEntry("static_longGameName", aR), StringEntry("static_nftName", aS)] | |
297 | 311 | ||
298 | 312 | ||
299 | 313 | ||
300 | - | @Callable( | |
301 | - | func deleteSetting (b) = if (( | |
314 | + | @Callable(aM) | |
315 | + | func deleteSetting (b) = if ((aM.caller != this)) | |
302 | 316 | then throw("3DS: Only administrator can call this method") | |
303 | 317 | else [DeleteEntry(b)] | |
304 | 318 | ||
305 | 319 | ||
306 | 320 | ||
307 | - | @Callable( | |
321 | + | @Callable(aM) | |
308 | 322 | func buyAccessItemAndLockDuck () = { | |
309 | - | let | |
310 | - | let | |
311 | - | let | |
312 | - | if (( | |
323 | + | let aT = value(aM.payments[0]) | |
324 | + | let aU = value(aM.payments[1]) | |
325 | + | let m = toString(aM.originCaller) | |
326 | + | if ((aT.assetId != ai())) | |
313 | 327 | then throw("3BAI: Wrong asset attached") | |
314 | - | else if (( | |
328 | + | else if ((aT.amount != aj())) | |
315 | 329 | then throw("3BAI: Wrong amount of assets attached") | |
316 | 330 | else { | |
317 | - | let | |
318 | - | if (( | |
331 | + | let aV = as(invoke(this, "buyAccessItemInternal", [m], nil)) | |
332 | + | if ((aV == aV)) | |
319 | 333 | then { | |
320 | - | let | |
321 | - | if (( | |
334 | + | let aW = invoke(ah(), "burnAttachedPayments", nil, [AttachedPayment(ae(), aT.amount)]) | |
335 | + | if ((aW == aW)) | |
322 | 336 | then { | |
323 | - | let | |
337 | + | let aX = if ((aM.caller == ac())) | |
324 | 338 | then nil | |
325 | - | else | |
326 | - | if (( | |
339 | + | else ap(aM.payments[2]) | |
340 | + | if ((aX == aX)) | |
327 | 341 | then { | |
328 | - | let | |
329 | - | $Tuple2( | |
342 | + | let aY = (av(m, m, aU) ++ aX) | |
343 | + | $Tuple2(aY, aV) | |
330 | 344 | } | |
331 | 345 | else throw("Strict value is not equal to itself.") | |
332 | 346 | } | |
333 | 347 | else throw("Strict value is not equal to itself.") | |
334 | 348 | } | |
335 | 349 | else throw("Strict value is not equal to itself.") | |
336 | 350 | } | |
337 | 351 | } | |
338 | 352 | ||
339 | 353 | ||
340 | 354 | ||
341 | - | @Callable( | |
355 | + | @Callable(aM) | |
342 | 356 | func buyAccessItem () = { | |
343 | - | let | |
344 | - | let | |
345 | - | if (( | |
346 | - | then throw(("3BAI: Wrong asset attached " + toBase58String( | |
347 | - | else if (( | |
357 | + | let m = toString(aM.originCaller) | |
358 | + | let aT = value(aM.payments[0]) | |
359 | + | if ((aT.assetId != ai())) | |
360 | + | then throw(("3BAI: Wrong asset attached " + toBase58String(ai()))) | |
361 | + | else if ((aT.amount != aj())) | |
348 | 362 | then throw("3BAI: Wrong amount of assets attached") | |
349 | 363 | else { | |
350 | - | let | |
351 | - | if (( | |
364 | + | let aV = as(invoke(this, "buyAccessItemInternal", [m], nil)) | |
365 | + | if ((aV == aV)) | |
352 | 366 | then { | |
353 | - | let | |
354 | - | if (( | |
367 | + | let aW = invoke(ah(), "burnAttachedPayments", nil, [AttachedPayment(ae(), aT.amount)]) | |
368 | + | if ((aW == aW)) | |
355 | 369 | then { | |
356 | - | let | |
370 | + | let aX = if ((aM.caller == ac())) | |
357 | 371 | then nil | |
358 | - | else | |
359 | - | if (( | |
360 | - | then $Tuple2( | |
372 | + | else ap(aM.payments[1]) | |
373 | + | if ((aX == aX)) | |
374 | + | then $Tuple2(aX, aV) | |
361 | 375 | else throw("Strict value is not equal to itself.") | |
362 | 376 | } | |
363 | 377 | else throw("Strict value is not equal to itself.") | |
364 | 378 | } | |
365 | 379 | else throw("Strict value is not equal to itself.") | |
366 | 380 | } | |
367 | 381 | } | |
368 | 382 | ||
369 | 383 | ||
370 | 384 | ||
371 | - | @Callable( | |
372 | - | func buyAccessItemOther ( | |
373 | - | let | |
374 | - | if (( | |
385 | + | @Callable(aM) | |
386 | + | func buyAccessItemOther (aZ) = { | |
387 | + | let aT = value(aM.payments[0]) | |
388 | + | if ((aT.assetId != ai())) | |
375 | 389 | then throw("3BAI: Wrong asset attached") | |
376 | - | else if (( | |
390 | + | else if ((aT.amount != aj())) | |
377 | 391 | then throw("3BAI: Wrong amount of assets attached") | |
378 | 392 | else { | |
379 | - | let | |
380 | - | if (( | |
393 | + | let aV = as(invoke(this, "buyAccessItemInternal", [aZ], nil)) | |
394 | + | if ((aV == aV)) | |
381 | 395 | then { | |
382 | - | let | |
383 | - | if (( | |
384 | - | then $Tuple2(nil, | |
396 | + | let aW = invoke(ah(), "burnAttachedPayments", nil, [AttachedPayment(ae(), aT.amount)]) | |
397 | + | if ((aW == aW)) | |
398 | + | then $Tuple2(nil, aV) | |
385 | 399 | else throw("Strict value is not equal to itself.") | |
386 | 400 | } | |
387 | 401 | else throw("Strict value is not equal to itself.") | |
388 | 402 | } | |
389 | 403 | } | |
390 | 404 | ||
391 | 405 | ||
392 | 406 | ||
393 | - | @Callable( | |
407 | + | @Callable(aM) | |
394 | 408 | func lockDuck () = { | |
395 | - | let | |
396 | - | let | |
397 | - | let | |
398 | - | if (( | |
399 | - | then ( | |
409 | + | let m = toString(aM.originCaller) | |
410 | + | let aU = value(aM.payments[0]) | |
411 | + | let aX = ap(aM.payments[1]) | |
412 | + | if ((aX == aX)) | |
413 | + | then (av(m, m, aU) ++ aX) | |
400 | 414 | else throw("Strict value is not equal to itself.") | |
401 | 415 | } | |
402 | 416 | ||
403 | 417 | ||
404 | 418 | ||
405 | - | @Callable( | |
406 | - | func initUnlock ( | |
407 | - | let | |
408 | - | let | |
409 | - | if (( | |
410 | - | then ( | |
419 | + | @Callable(aM) | |
420 | + | func initUnlock (p) = { | |
421 | + | let m = toString(aM.caller) | |
422 | + | let aX = ap(aM.payments[0]) | |
423 | + | if ((aX == aX)) | |
424 | + | then (aH(p, m) ++ aX) | |
411 | 425 | else throw("Strict value is not equal to itself.") | |
412 | 426 | } | |
413 | 427 | ||
414 | 428 | ||
415 | 429 | ||
416 | - | @Callable( | |
417 | - | func lockDuckRenting ( | |
430 | + | @Callable(aM) | |
431 | + | func lockDuckRenting (ba) = if ((aM.caller != ac())) | |
418 | 432 | then throw("3UDO: Renting only!") | |
419 | 433 | else { | |
420 | - | let | |
421 | - | let | |
422 | - | | |
434 | + | let m = toString(aM.caller) | |
435 | + | let aU = value(aM.payments[0]) | |
436 | + | av(m, ba, aU) | |
423 | 437 | } | |
424 | 438 | ||
425 | 439 | ||
426 | 440 | ||
427 | - | @Callable( | |
428 | - | func unlockDuckRenting ( | |
441 | + | @Callable(aM) | |
442 | + | func unlockDuckRenting (p,aL) = if ((aM.caller != ac())) | |
429 | 443 | then throw("3UDO: Renting only!") | |
430 | 444 | else { | |
431 | - | let | |
432 | - | | |
445 | + | let m = toString(aM.caller) | |
446 | + | aK(p, m, aL) | |
433 | 447 | } | |
434 | 448 | ||
435 | 449 | ||
436 | 450 | ||
437 | - | @Callable( | |
438 | - | func unlockDuckOther ( | |
451 | + | @Callable(aM) | |
452 | + | func unlockDuckOther (p) = if ((aM.caller != this)) | |
439 | 453 | then throw("3UDO: Admin only!") | |
440 | 454 | else { | |
441 | - | let | |
442 | - | | |
455 | + | let bb = A(k(fromBase58String(p))) | |
456 | + | aK(p, bb, bb) | |
443 | 457 | } | |
444 | 458 | ||
445 | 459 | ||
446 | 460 | ||
447 | - | @Callable( | |
448 | - | func unlockDuck ( | |
461 | + | @Callable(aM) | |
462 | + | func unlockDuck (p,bc,bd,be) = if ((bd != true)) | |
449 | 463 | then throw("3UD: Not allowed to unlock the duck!") | |
450 | 464 | else { | |
451 | - | let | |
452 | - | let | |
453 | - | if (( | |
465 | + | let bf = 3600000 | |
466 | + | let bg = lastBlock.timestamp | |
467 | + | if ((bg > (bc + bf))) | |
454 | 468 | then throw("3UD: Outdated signature!") | |
455 | 469 | else { | |
456 | - | let | |
457 | - | let | |
458 | - | if (!(sigVerify_8Kb(toBytes( | |
459 | - | then throw(((("3UD: Invalid proof from backend key" + toBase58String( | |
470 | + | let m = toString(aM.caller) | |
471 | + | let bh = makeString([p, toString(bc), toString(bd)], ";") | |
472 | + | if (!(sigVerify_8Kb(toBytes(bh), fromBase58String(be), af()))) | |
473 | + | then throw(((("3UD: Invalid proof from backend key" + toBase58String(af())) + " ") + bh)) | |
460 | 474 | else { | |
461 | - | let | |
462 | - | if (( | |
463 | - | then ( | |
475 | + | let aX = ap(aM.payments[0]) | |
476 | + | if ((aX == aX)) | |
477 | + | then (aK(p, m, m) ++ aX) | |
464 | 478 | else throw("Strict value is not equal to itself.") | |
465 | 479 | } | |
466 | 480 | } | |
467 | 481 | } | |
468 | 482 | ||
469 | 483 | ||
484 | + | @Verifier(bi) | |
485 | + | func bj () = if (e()) | |
486 | + | then sigVerify(bi.bodyBytes, bi.proofs[0], bi.senderPublicKey) | |
487 | + | else { | |
488 | + | let bk = base58'6TdaXEfhnjYquvPf3yV7MFxt2CbgFmaqsvGwkKfXtKi4' | |
489 | + | let bl = base58'7DsP2WaMLocbHuUxux7pbXRjTrrZ1TFQPsi5QumS3gr8' | |
490 | + | let bm = base58'BpFWP3p3JgYrrP45xfrKzeMcWMEXoinj4FVPPkUiA8D3' | |
491 | + | let bn = if (sigVerify(bi.bodyBytes, bi.proofs[0], bk)) | |
492 | + | then 1 | |
493 | + | else if (sigVerify(bi.bodyBytes, bi.proofs[1], bk)) | |
494 | + | then 1 | |
495 | + | else if (sigVerify(bi.bodyBytes, bi.proofs[2], bk)) | |
496 | + | then 1 | |
497 | + | else 0 | |
498 | + | let bo = if (sigVerify(bi.bodyBytes, bi.proofs[0], bl)) | |
499 | + | then 1 | |
500 | + | else if (sigVerify(bi.bodyBytes, bi.proofs[1], bl)) | |
501 | + | then 1 | |
502 | + | else if (sigVerify(bi.bodyBytes, bi.proofs[2], bl)) | |
503 | + | then 1 | |
504 | + | else 0 | |
505 | + | let bp = if (sigVerify(bi.bodyBytes, bi.proofs[0], bm)) | |
506 | + | then 1 | |
507 | + | else if (sigVerify(bi.bodyBytes, bi.proofs[1], bm)) | |
508 | + | then 1 | |
509 | + | else if (sigVerify(bi.bodyBytes, bi.proofs[2], bm)) | |
510 | + | then 1 | |
511 | + | else 0 | |
512 | + | let bq = ((bn + bo) + bp) | |
513 | + | let c = bi | |
514 | + | (bq >= 2) | |
515 | + | } | |
516 | + |
github/deemru/w8io/169f3d6 158.58 ms ◑