tx · 3t6nwNCUtoKAnLsmFiEFAaR4VXsNf3GbBh75aNBj28i5 3MtHYn3dDpoVUf6FNzwXU8k1cqH3KMxgNFP: -0.01400000 Waves 2021.12.27 05:41 [1852075] smart account 3MtHYn3dDpoVUf6FNzwXU8k1cqH3KMxgNFP > SELF 0.00000000 Waves
{ "type": 13, "id": "3t6nwNCUtoKAnLsmFiEFAaR4VXsNf3GbBh75aNBj28i5", "fee": 1400000, "feeAssetId": null, "timestamp": 1640572935328, "version": 2, "chainId": 84, "sender": "3MtHYn3dDpoVUf6FNzwXU8k1cqH3KMxgNFP", "senderPublicKey": "CERNwqnHFnGf66rmS4s5mpWEPxv5RMqg2rSKPJCCgTbQ", "proofs": [ "fKtaLArom8VxjtLYM7MCWNHGhEPXPvtwhonti1GuXfptZxgnwq6mzMTWKruvX2nTfjTsuaTWpQSPhTX2BNc95Qt" ], "script": "base64:AAIFAAAAAAAAABwIAhIMCgoICAEBAQEYCAgIEgMKAQgSBQoDCAgIAAAAGQAAAAASc3lzdGVtQXNzZXRJZEJ5dGVzAQAAACBl2/7IbWHpVuwmUYs5w8vx8CJaoK7/XpSEcwFpn5187QAAAAAbZmFjdG9yeUNvbnRyYWN0QWRkcmVzc0J5dGVzAQAAABoBVKSIz4/LrUrKgYcmdcl3OfutIPleSLVTRQAAAAAiY3JlYXRlRXZlbnRNaW5pbWFsU2VydmljZUZlZUFtb3VudAAAAAAAAAAACgAAAAAgZWRpdEV2ZW50TWluaW1hbFNlcnZpY2VGZWVBbW91bnQAAAAAAAAAABQAAAAAEGtleURhdGFTZXBhcmF0b3ICAAAAAToAAAAAEnZhbHVlRGF0YVNlcGFyYXRvcgIAAAACX18BAAAAEnVuc2FmZUdldEFzc2V0QnlJZAAAAAEAAAAHYXNzZXRJZAQAAAAHJG1hdGNoMAkAA+wAAAABBQAAAAdhc3NldElkAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAVBc3NldAQAAAAFYXNzZXQFAAAAByRtYXRjaDAFAAAAB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TdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tledfA9Kg=", "height": 1852075, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BYeDwbUtqHoSEJiGELua9fcbtxzLq4PHc6rQGsNkjeW8 Next: 3zk2Wuz5T6cJzBPxtXF52Jfq6jSnT6B14SpXR2V87M7G Diff:
Old | New | Differences | |
---|---|---|---|
71 | 71 | ||
72 | 72 | func C (D,E,F,G,H,I,J,K,L,M,N) = { | |
73 | 73 | let O = { | |
74 | - | let i = | |
75 | - | if ($isInstanceOf(i, " | |
74 | + | let i = L | |
75 | + | if ($isInstanceOf(i, "String")) | |
76 | 76 | then { | |
77 | 77 | let O = i | |
78 | - | | |
78 | + | O | |
79 | 79 | } | |
80 | 80 | else "" | |
81 | 81 | } | |
82 | 82 | let P = { | |
83 | - | let i = | |
83 | + | let i = M | |
84 | 84 | if ($isInstanceOf(i, "String")) | |
85 | 85 | then { | |
86 | 86 | let P = i | |
89 | 89 | else "" | |
90 | 90 | } | |
91 | 91 | let Q = { | |
92 | - | let i = | |
92 | + | let i = N | |
93 | 93 | if ($isInstanceOf(i, "String")) | |
94 | 94 | then { | |
95 | 95 | let Q = i | |
97 | 97 | } | |
98 | 98 | else "" | |
99 | 99 | } | |
100 | - | let R = { | |
101 | - | let i = M | |
102 | - | if ($isInstanceOf(i, "String")) | |
103 | - | then { | |
104 | - | let R = i | |
105 | - | R | |
106 | - | } | |
107 | - | else "" | |
108 | - | } | |
109 | - | let S = { | |
110 | - | let i = N | |
111 | - | if ($isInstanceOf(i, "Int")) | |
112 | - | then { | |
113 | - | let S = i | |
114 | - | toString(S) | |
115 | - | } | |
116 | - | else "" | |
117 | - | } | |
118 | - | makeString([toString(D), E, F, toString(G), toString(H), makeString(I, ","), O, P, Q, R, S], f) | |
100 | + | makeString([toString(D), E, F, toString(G), toString(H), toString(I), toString(J), makeString(K, ","), O, P, Q], f) | |
119 | 101 | } | |
120 | 102 | ||
121 | 103 | ||
122 | - | func T (U) = { | |
123 | - | let V = split(U, f) | |
124 | - | let D = addressFromString(V[0]) | |
125 | - | let E = V[1] | |
126 | - | let F = V[2] | |
127 | - | let G = parseIntValue(V[3]) | |
128 | - | let H = parseIntValue(V[4]) | |
129 | - | let I = split(V[5], ",") | |
130 | - | let J = parseInt(V[6]) | |
131 | - | let K = if ((V[7] == "")) | |
104 | + | func R (S) = { | |
105 | + | let T = split(S, f) | |
106 | + | let D = addressFromString(T[0]) | |
107 | + | let E = T[1] | |
108 | + | let F = T[2] | |
109 | + | let G = parseIntValue(T[3]) | |
110 | + | let H = parseInt(T[4]) | |
111 | + | let I = parseIntValue(T[5]) | |
112 | + | let J = parseIntValue(T[6]) | |
113 | + | let K = split(T[7], ",") | |
114 | + | let L = if ((T[8] == "")) | |
132 | 115 | then unit | |
133 | - | else | |
134 | - | let | |
116 | + | else T[8] | |
117 | + | let M = if ((T[9] == "")) | |
135 | 118 | then unit | |
136 | - | else | |
137 | - | let | |
119 | + | else T[9] | |
120 | + | let N = if ((T[10] == "")) | |
138 | 121 | then unit | |
139 | - | else V[9] | |
140 | - | let N = parseInt(V[10]) | |
122 | + | else T[10] | |
141 | 123 | $Tuple11(D, E, F, G, H, I, J, K, L, M, N) | |
142 | 124 | } | |
143 | 125 | ||
144 | 126 | ||
145 | - | func | |
146 | - | let | |
147 | - | let | |
148 | - | let i = getString( | |
127 | + | func U (B) = { | |
128 | + | let V = A(B) | |
129 | + | let T = { | |
130 | + | let i = getString(V) | |
149 | 131 | if ($isInstanceOf(i, "String")) | |
150 | 132 | then { | |
151 | - | let | |
152 | - | | |
133 | + | let W = i | |
134 | + | W | |
153 | 135 | } | |
154 | 136 | else throw("Specified event not found") | |
155 | 137 | } | |
156 | - | T | |
138 | + | R(T) | |
157 | 139 | } | |
158 | 140 | ||
159 | 141 | ||
160 | - | func | |
142 | + | func X (B) = makeString(["event", B, "ticket_count"], e) | |
161 | 143 | ||
162 | 144 | ||
163 | - | func | |
145 | + | func Y (B,Z) = makeString(["ticket", B, toString(Z)], e) | |
164 | 146 | ||
165 | 147 | ||
166 | - | func | |
148 | + | func aa (ab) = makeString(["ticket", ab, "data"], f) | |
167 | 149 | ||
168 | 150 | ||
169 | - | func | |
170 | - | then toBase58String(value( | |
171 | - | else "", if (isDefined( | |
172 | - | then toBase58String(value( | |
151 | + | func ac (ad,ae,af,ag) = makeString([toBase58String(ad), toString(ae), if (isDefined(af)) | |
152 | + | then toBase58String(value(af)) | |
153 | + | else "", if (isDefined(ag)) | |
154 | + | then toBase58String(value(ag)) | |
173 | 155 | else ""], f) | |
174 | 156 | ||
175 | 157 | ||
176 | - | func | |
177 | - | let | |
178 | - | let | |
179 | - | let | |
180 | - | let | |
181 | - | let i = | |
158 | + | func ah (S) = { | |
159 | + | let ai = split(S, f) | |
160 | + | let ad = fromBase58String(ai[0]) | |
161 | + | let ae = parseIntValue(ai[1]) | |
162 | + | let aj = { | |
163 | + | let i = ai[2] | |
182 | 164 | if ($isInstanceOf(i, "String")) | |
183 | 165 | then { | |
184 | - | let | |
185 | - | fromBase58String( | |
166 | + | let W = i | |
167 | + | fromBase58String(W) | |
186 | 168 | } | |
187 | 169 | else unit | |
188 | 170 | } | |
189 | - | let | |
190 | - | let i = | |
171 | + | let ak = { | |
172 | + | let i = ai[3] | |
191 | 173 | if ($isInstanceOf(i, "String")) | |
192 | 174 | then { | |
193 | - | let | |
194 | - | fromBase58String( | |
175 | + | let W = i | |
176 | + | fromBase58String(W) | |
195 | 177 | } | |
196 | 178 | else unit | |
197 | 179 | } | |
198 | - | $Tuple4( | |
180 | + | $Tuple4(ad, ae, aj, ak) | |
199 | 181 | } | |
200 | 182 | ||
201 | 183 | ||
202 | - | func | |
203 | - | let | |
204 | - | let | |
205 | - | let i = getString( | |
184 | + | func al (ab) = { | |
185 | + | let am = aa(ab) | |
186 | + | let ai = { | |
187 | + | let i = getString(am) | |
206 | 188 | if ($isInstanceOf(i, "String")) | |
207 | 189 | then { | |
208 | - | let | |
209 | - | | |
190 | + | let W = i | |
191 | + | W | |
210 | 192 | } | |
211 | 193 | else throw("Specified ticket not found") | |
212 | 194 | } | |
213 | - | | |
195 | + | ah(ai) | |
214 | 196 | } | |
215 | 197 | ||
216 | 198 | ||
217 | - | func | |
218 | - | let | |
219 | - | addressFromStringValue( | |
199 | + | func an (ab) = { | |
200 | + | let ao = split(ab, e) | |
201 | + | addressFromStringValue(ao[3]) | |
220 | 202 | } | |
221 | 203 | ||
222 | 204 | ||
223 | - | func | |
205 | + | func ap (j) = if (if ((j.decimals == 0)) | |
224 | 206 | then true | |
225 | 207 | else (j.quantity == 1)) | |
226 | 208 | then true | |
228 | 210 | ||
229 | 211 | ||
230 | 212 | @Callable(w) | |
231 | - | func createEvent (E,F,G, | |
232 | - | let | |
213 | + | func createEvent (E,F,G,aq,I,J,K,O,P,Q) = { | |
214 | + | let ar = g(a) | |
233 | 215 | if ((1 > size(w.payments))) | |
234 | 216 | then throw("You have to send service fee as payment") | |
235 | 217 | else { | |
237 | 219 | if (isDefined(o("Create event", q, c))) | |
238 | 220 | then throw("Reached unreachable state") | |
239 | 221 | else { | |
240 | - | let | |
241 | - | let | |
222 | + | let as = x(w.caller) | |
223 | + | let at = y(w.caller, as) | |
242 | 224 | if ((G > height)) | |
243 | 225 | then throw("Event start height has to be from the future") | |
244 | - | else if ((0 > H)) | |
245 | - | then throw("Ticket price has to be zero or positive number") | |
246 | - | else { | |
247 | - | let aw = { | |
248 | - | let i = as | |
249 | - | if ($isInstanceOf(i, "Int")) | |
250 | - | then { | |
251 | - | let ax = i | |
252 | - | if ((1 > ax)) | |
253 | - | then throw("Event duration has to be positive number") | |
254 | - | else ax | |
255 | - | } | |
256 | - | else unit | |
257 | - | } | |
258 | - | let ay = { | |
259 | - | let i = S | |
260 | - | if ($isInstanceOf(i, "Int")) | |
261 | - | then { | |
262 | - | let az = i | |
263 | - | if ((1 > az)) | |
264 | - | then throw("Event ticket count has to be positive number") | |
265 | - | else az | |
266 | - | } | |
267 | - | else unit | |
268 | - | } | |
269 | - | [IntegerEntry(t(w.caller), au), StringEntry(A(av), C(w.caller, E, F, G, H, I, aw, P, Q, R, ay))] | |
270 | - | } | |
226 | + | else if ((1 > aq)) | |
227 | + | then throw("Event duration has to be positive number") | |
228 | + | else if ((0 > I)) | |
229 | + | then throw("Ticket price has to be zero or positive number") | |
230 | + | else if ((1 > J)) | |
231 | + | then throw("Ticket count has to be positive number") | |
232 | + | else [IntegerEntry(t(w.caller), as), StringEntry(A(at), C(w.caller, E, F, G, aq, I, J, K, O, P, Q))] | |
271 | 233 | } | |
272 | 234 | } | |
273 | 235 | } | |
276 | 238 | ||
277 | 239 | @Callable(w) | |
278 | 240 | func buyTicket (B) = { | |
279 | - | let | |
241 | + | let ar = g(a) | |
280 | 242 | if ((1 > size(w.payments))) | |
281 | 243 | then throw("You have to attach the ticket payment") | |
282 | 244 | else { | |
283 | - | let | |
284 | - | let s = toBase58String( | |
285 | - | if (!(k( | |
245 | + | let au = w.payments[0] | |
246 | + | let s = toBase58String(ar.id) | |
247 | + | if (!(k(au.assetId, s))) | |
286 | 248 | then throw(("Ticket payment has to be in system asset " + s)) | |
287 | 249 | else { | |
288 | - | let | |
289 | - | let | |
290 | - | let | |
291 | - | let i = getInteger( | |
250 | + | let T = U(B) | |
251 | + | let av = X(B) | |
252 | + | let aw = { | |
253 | + | let i = getInteger(av) | |
292 | 254 | if ($isInstanceOf(i, "Int")) | |
293 | 255 | then { | |
294 | - | let | |
295 | - | | |
256 | + | let ax = i | |
257 | + | ax | |
296 | 258 | } | |
297 | 259 | else 0 | |
298 | 260 | } | |
299 | - | let N = V._11 | |
300 | - | if (if (isDefined(N)) | |
301 | - | then (aC >= value(N)) | |
302 | - | else false) | |
261 | + | let J = T._7 | |
262 | + | if ((aw >= J)) | |
303 | 263 | then throw("All the tickets are sold out") | |
304 | 264 | else { | |
305 | - | let | |
306 | - | if (isDefined(getString( | |
265 | + | let ay = Y(B, w.caller) | |
266 | + | if (isDefined(getString(ay))) | |
307 | 267 | then throw("You already have a ticket") | |
308 | 268 | else { | |
309 | - | let | |
310 | - | if (( | |
311 | - | then throw(("Attached ticket payment amount is less then event ticket price " + toString( | |
312 | - | else [IntegerEntry( | |
269 | + | let az = T._6 | |
270 | + | if ((az > au.amount)) | |
271 | + | then throw(("Attached ticket payment amount is less then event ticket price " + toString(az))) | |
272 | + | else [IntegerEntry(av, (aw + 1)), StringEntry(ay, ac(w.transactionId, au.amount, unit, unit))] | |
313 | 273 | } | |
314 | 274 | } | |
315 | 275 | } | |
319 | 279 | ||
320 | 280 | ||
321 | 281 | @Callable(w) | |
322 | - | func giveBitographForTicket ( | |
282 | + | func giveBitographForTicket (ab,aA,aB) = if (!(isDefined(getString(ab)))) | |
323 | 283 | then throw("Ticket does not exists") | |
324 | 284 | else { | |
325 | - | let | |
326 | - | let | |
327 | - | if (isDefined( | |
328 | - | then throw((("There is bitograph " + toBase58String(value( | |
285 | + | let ai = al(ab) | |
286 | + | let ak = ai._4 | |
287 | + | if (isDefined(ak)) | |
288 | + | then throw((("There is bitograph " + toBase58String(value(ak))) + " that has already been given for the ticket")) | |
329 | 289 | else { | |
330 | - | let | |
331 | - | let | |
332 | - | if (( | |
290 | + | let aC = an(ab) | |
291 | + | let aD = invoke(Address(b), "createBitograph", [aA, aB], nil) | |
292 | + | if ((aD == aD)) | |
333 | 293 | then { | |
334 | - | let | |
335 | - | let i = | |
294 | + | let aE = { | |
295 | + | let i = aD | |
336 | 296 | if ($isInstanceOf(i, "ByteVector")) | |
337 | 297 | then { | |
338 | - | let | |
339 | - | | |
298 | + | let aF = i | |
299 | + | aF | |
340 | 300 | } | |
341 | 301 | else throw("Error occurred while creating a bitograph") | |
342 | 302 | } | |
343 | - | [ScriptTransfer( | |
303 | + | [ScriptTransfer(aC, 1, aE), StringEntry(ab, ac(ai._1, ai._2, w.transactionId, aE))] | |
344 | 304 | } | |
345 | 305 | else throw("Strict value is not equal to itself.") | |
346 | 306 | } | |
347 | 307 | } | |
348 | 308 | ||
349 | 309 | ||
350 | - | @Verifier( | |
351 | - | func | |
310 | + | @Verifier(aG) | |
311 | + | func aH () = sigVerify(aG.bodyBytes, aG.proofs[0], aG.senderPublicKey) | |
352 | 312 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'7rck4P88F6QZEjJdU5uN56xCudCSAPYhoQJ4PJ9Wrnkc' | |
5 | 5 | ||
6 | 6 | let b = base58'3N4v4VAHbK5das4wB5QGripYbQFJ3PaB75e' | |
7 | 7 | ||
8 | 8 | let c = 10 | |
9 | 9 | ||
10 | 10 | let d = 20 | |
11 | 11 | ||
12 | 12 | let e = ":" | |
13 | 13 | ||
14 | 14 | let f = "__" | |
15 | 15 | ||
16 | 16 | func g (h) = { | |
17 | 17 | let i = assetInfo(h) | |
18 | 18 | if ($isInstanceOf(i, "Asset")) | |
19 | 19 | then { | |
20 | 20 | let j = i | |
21 | 21 | j | |
22 | 22 | } | |
23 | 23 | else throw("Specified asset does not exist") | |
24 | 24 | } | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func k (l,m) = { | |
28 | 28 | let n = if (isDefined(l)) | |
29 | 29 | then toBase58String(value(l)) | |
30 | 30 | else "WAVES" | |
31 | 31 | if ((n != m)) | |
32 | 32 | then false | |
33 | 33 | else true | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func o (p,q,r) = { | |
38 | 38 | let s = toBase58String(a) | |
39 | 39 | if (!(k(q.assetId, s))) | |
40 | 40 | then throw(((p + " requires service fee payment in the system asset ") + s)) | |
41 | 41 | else if (if ((r > q.amount)) | |
42 | 42 | then true | |
43 | 43 | else (q.amount > r)) | |
44 | 44 | then throw((("Attached service fee payment amount is not equal to required service fee (" + toString(r)) + ")")) | |
45 | 45 | else unit | |
46 | 46 | } | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func t (u) = makeString([toString(u), "last_event_idx"], e) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func v (u) = { | |
53 | 53 | let i = getInteger(this, t(u)) | |
54 | 54 | if ($isInstanceOf(i, "Int")) | |
55 | 55 | then { | |
56 | 56 | let w = i | |
57 | 57 | w | |
58 | 58 | } | |
59 | 59 | else 1 | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func x (u) = (v(u) + 1) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func y (u,z) = makeString([toString(u), toString(z)], e) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func A (B) = makeString(["event", B, "data"], e) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func C (D,E,F,G,H,I,J,K,L,M,N) = { | |
73 | 73 | let O = { | |
74 | - | let i = | |
75 | - | if ($isInstanceOf(i, " | |
74 | + | let i = L | |
75 | + | if ($isInstanceOf(i, "String")) | |
76 | 76 | then { | |
77 | 77 | let O = i | |
78 | - | | |
78 | + | O | |
79 | 79 | } | |
80 | 80 | else "" | |
81 | 81 | } | |
82 | 82 | let P = { | |
83 | - | let i = | |
83 | + | let i = M | |
84 | 84 | if ($isInstanceOf(i, "String")) | |
85 | 85 | then { | |
86 | 86 | let P = i | |
87 | 87 | P | |
88 | 88 | } | |
89 | 89 | else "" | |
90 | 90 | } | |
91 | 91 | let Q = { | |
92 | - | let i = | |
92 | + | let i = N | |
93 | 93 | if ($isInstanceOf(i, "String")) | |
94 | 94 | then { | |
95 | 95 | let Q = i | |
96 | 96 | Q | |
97 | 97 | } | |
98 | 98 | else "" | |
99 | 99 | } | |
100 | - | let R = { | |
101 | - | let i = M | |
102 | - | if ($isInstanceOf(i, "String")) | |
103 | - | then { | |
104 | - | let R = i | |
105 | - | R | |
106 | - | } | |
107 | - | else "" | |
108 | - | } | |
109 | - | let S = { | |
110 | - | let i = N | |
111 | - | if ($isInstanceOf(i, "Int")) | |
112 | - | then { | |
113 | - | let S = i | |
114 | - | toString(S) | |
115 | - | } | |
116 | - | else "" | |
117 | - | } | |
118 | - | makeString([toString(D), E, F, toString(G), toString(H), makeString(I, ","), O, P, Q, R, S], f) | |
100 | + | makeString([toString(D), E, F, toString(G), toString(H), toString(I), toString(J), makeString(K, ","), O, P, Q], f) | |
119 | 101 | } | |
120 | 102 | ||
121 | 103 | ||
122 | - | func T (U) = { | |
123 | - | let V = split(U, f) | |
124 | - | let D = addressFromString(V[0]) | |
125 | - | let E = V[1] | |
126 | - | let F = V[2] | |
127 | - | let G = parseIntValue(V[3]) | |
128 | - | let H = parseIntValue(V[4]) | |
129 | - | let I = split(V[5], ",") | |
130 | - | let J = parseInt(V[6]) | |
131 | - | let K = if ((V[7] == "")) | |
104 | + | func R (S) = { | |
105 | + | let T = split(S, f) | |
106 | + | let D = addressFromString(T[0]) | |
107 | + | let E = T[1] | |
108 | + | let F = T[2] | |
109 | + | let G = parseIntValue(T[3]) | |
110 | + | let H = parseInt(T[4]) | |
111 | + | let I = parseIntValue(T[5]) | |
112 | + | let J = parseIntValue(T[6]) | |
113 | + | let K = split(T[7], ",") | |
114 | + | let L = if ((T[8] == "")) | |
132 | 115 | then unit | |
133 | - | else | |
134 | - | let | |
116 | + | else T[8] | |
117 | + | let M = if ((T[9] == "")) | |
135 | 118 | then unit | |
136 | - | else | |
137 | - | let | |
119 | + | else T[9] | |
120 | + | let N = if ((T[10] == "")) | |
138 | 121 | then unit | |
139 | - | else V[9] | |
140 | - | let N = parseInt(V[10]) | |
122 | + | else T[10] | |
141 | 123 | $Tuple11(D, E, F, G, H, I, J, K, L, M, N) | |
142 | 124 | } | |
143 | 125 | ||
144 | 126 | ||
145 | - | func | |
146 | - | let | |
147 | - | let | |
148 | - | let i = getString( | |
127 | + | func U (B) = { | |
128 | + | let V = A(B) | |
129 | + | let T = { | |
130 | + | let i = getString(V) | |
149 | 131 | if ($isInstanceOf(i, "String")) | |
150 | 132 | then { | |
151 | - | let | |
152 | - | | |
133 | + | let W = i | |
134 | + | W | |
153 | 135 | } | |
154 | 136 | else throw("Specified event not found") | |
155 | 137 | } | |
156 | - | T | |
138 | + | R(T) | |
157 | 139 | } | |
158 | 140 | ||
159 | 141 | ||
160 | - | func | |
142 | + | func X (B) = makeString(["event", B, "ticket_count"], e) | |
161 | 143 | ||
162 | 144 | ||
163 | - | func | |
145 | + | func Y (B,Z) = makeString(["ticket", B, toString(Z)], e) | |
164 | 146 | ||
165 | 147 | ||
166 | - | func | |
148 | + | func aa (ab) = makeString(["ticket", ab, "data"], f) | |
167 | 149 | ||
168 | 150 | ||
169 | - | func | |
170 | - | then toBase58String(value( | |
171 | - | else "", if (isDefined( | |
172 | - | then toBase58String(value( | |
151 | + | func ac (ad,ae,af,ag) = makeString([toBase58String(ad), toString(ae), if (isDefined(af)) | |
152 | + | then toBase58String(value(af)) | |
153 | + | else "", if (isDefined(ag)) | |
154 | + | then toBase58String(value(ag)) | |
173 | 155 | else ""], f) | |
174 | 156 | ||
175 | 157 | ||
176 | - | func | |
177 | - | let | |
178 | - | let | |
179 | - | let | |
180 | - | let | |
181 | - | let i = | |
158 | + | func ah (S) = { | |
159 | + | let ai = split(S, f) | |
160 | + | let ad = fromBase58String(ai[0]) | |
161 | + | let ae = parseIntValue(ai[1]) | |
162 | + | let aj = { | |
163 | + | let i = ai[2] | |
182 | 164 | if ($isInstanceOf(i, "String")) | |
183 | 165 | then { | |
184 | - | let | |
185 | - | fromBase58String( | |
166 | + | let W = i | |
167 | + | fromBase58String(W) | |
186 | 168 | } | |
187 | 169 | else unit | |
188 | 170 | } | |
189 | - | let | |
190 | - | let i = | |
171 | + | let ak = { | |
172 | + | let i = ai[3] | |
191 | 173 | if ($isInstanceOf(i, "String")) | |
192 | 174 | then { | |
193 | - | let | |
194 | - | fromBase58String( | |
175 | + | let W = i | |
176 | + | fromBase58String(W) | |
195 | 177 | } | |
196 | 178 | else unit | |
197 | 179 | } | |
198 | - | $Tuple4( | |
180 | + | $Tuple4(ad, ae, aj, ak) | |
199 | 181 | } | |
200 | 182 | ||
201 | 183 | ||
202 | - | func | |
203 | - | let | |
204 | - | let | |
205 | - | let i = getString( | |
184 | + | func al (ab) = { | |
185 | + | let am = aa(ab) | |
186 | + | let ai = { | |
187 | + | let i = getString(am) | |
206 | 188 | if ($isInstanceOf(i, "String")) | |
207 | 189 | then { | |
208 | - | let | |
209 | - | | |
190 | + | let W = i | |
191 | + | W | |
210 | 192 | } | |
211 | 193 | else throw("Specified ticket not found") | |
212 | 194 | } | |
213 | - | | |
195 | + | ah(ai) | |
214 | 196 | } | |
215 | 197 | ||
216 | 198 | ||
217 | - | func | |
218 | - | let | |
219 | - | addressFromStringValue( | |
199 | + | func an (ab) = { | |
200 | + | let ao = split(ab, e) | |
201 | + | addressFromStringValue(ao[3]) | |
220 | 202 | } | |
221 | 203 | ||
222 | 204 | ||
223 | - | func | |
205 | + | func ap (j) = if (if ((j.decimals == 0)) | |
224 | 206 | then true | |
225 | 207 | else (j.quantity == 1)) | |
226 | 208 | then true | |
227 | 209 | else !(j.reissuable) | |
228 | 210 | ||
229 | 211 | ||
230 | 212 | @Callable(w) | |
231 | - | func createEvent (E,F,G, | |
232 | - | let | |
213 | + | func createEvent (E,F,G,aq,I,J,K,O,P,Q) = { | |
214 | + | let ar = g(a) | |
233 | 215 | if ((1 > size(w.payments))) | |
234 | 216 | then throw("You have to send service fee as payment") | |
235 | 217 | else { | |
236 | 218 | let q = w.payments[1] | |
237 | 219 | if (isDefined(o("Create event", q, c))) | |
238 | 220 | then throw("Reached unreachable state") | |
239 | 221 | else { | |
240 | - | let | |
241 | - | let | |
222 | + | let as = x(w.caller) | |
223 | + | let at = y(w.caller, as) | |
242 | 224 | if ((G > height)) | |
243 | 225 | then throw("Event start height has to be from the future") | |
244 | - | else if ((0 > H)) | |
245 | - | then throw("Ticket price has to be zero or positive number") | |
246 | - | else { | |
247 | - | let aw = { | |
248 | - | let i = as | |
249 | - | if ($isInstanceOf(i, "Int")) | |
250 | - | then { | |
251 | - | let ax = i | |
252 | - | if ((1 > ax)) | |
253 | - | then throw("Event duration has to be positive number") | |
254 | - | else ax | |
255 | - | } | |
256 | - | else unit | |
257 | - | } | |
258 | - | let ay = { | |
259 | - | let i = S | |
260 | - | if ($isInstanceOf(i, "Int")) | |
261 | - | then { | |
262 | - | let az = i | |
263 | - | if ((1 > az)) | |
264 | - | then throw("Event ticket count has to be positive number") | |
265 | - | else az | |
266 | - | } | |
267 | - | else unit | |
268 | - | } | |
269 | - | [IntegerEntry(t(w.caller), au), StringEntry(A(av), C(w.caller, E, F, G, H, I, aw, P, Q, R, ay))] | |
270 | - | } | |
226 | + | else if ((1 > aq)) | |
227 | + | then throw("Event duration has to be positive number") | |
228 | + | else if ((0 > I)) | |
229 | + | then throw("Ticket price has to be zero or positive number") | |
230 | + | else if ((1 > J)) | |
231 | + | then throw("Ticket count has to be positive number") | |
232 | + | else [IntegerEntry(t(w.caller), as), StringEntry(A(at), C(w.caller, E, F, G, aq, I, J, K, O, P, Q))] | |
271 | 233 | } | |
272 | 234 | } | |
273 | 235 | } | |
274 | 236 | ||
275 | 237 | ||
276 | 238 | ||
277 | 239 | @Callable(w) | |
278 | 240 | func buyTicket (B) = { | |
279 | - | let | |
241 | + | let ar = g(a) | |
280 | 242 | if ((1 > size(w.payments))) | |
281 | 243 | then throw("You have to attach the ticket payment") | |
282 | 244 | else { | |
283 | - | let | |
284 | - | let s = toBase58String( | |
285 | - | if (!(k( | |
245 | + | let au = w.payments[0] | |
246 | + | let s = toBase58String(ar.id) | |
247 | + | if (!(k(au.assetId, s))) | |
286 | 248 | then throw(("Ticket payment has to be in system asset " + s)) | |
287 | 249 | else { | |
288 | - | let | |
289 | - | let | |
290 | - | let | |
291 | - | let i = getInteger( | |
250 | + | let T = U(B) | |
251 | + | let av = X(B) | |
252 | + | let aw = { | |
253 | + | let i = getInteger(av) | |
292 | 254 | if ($isInstanceOf(i, "Int")) | |
293 | 255 | then { | |
294 | - | let | |
295 | - | | |
256 | + | let ax = i | |
257 | + | ax | |
296 | 258 | } | |
297 | 259 | else 0 | |
298 | 260 | } | |
299 | - | let N = V._11 | |
300 | - | if (if (isDefined(N)) | |
301 | - | then (aC >= value(N)) | |
302 | - | else false) | |
261 | + | let J = T._7 | |
262 | + | if ((aw >= J)) | |
303 | 263 | then throw("All the tickets are sold out") | |
304 | 264 | else { | |
305 | - | let | |
306 | - | if (isDefined(getString( | |
265 | + | let ay = Y(B, w.caller) | |
266 | + | if (isDefined(getString(ay))) | |
307 | 267 | then throw("You already have a ticket") | |
308 | 268 | else { | |
309 | - | let | |
310 | - | if (( | |
311 | - | then throw(("Attached ticket payment amount is less then event ticket price " + toString( | |
312 | - | else [IntegerEntry( | |
269 | + | let az = T._6 | |
270 | + | if ((az > au.amount)) | |
271 | + | then throw(("Attached ticket payment amount is less then event ticket price " + toString(az))) | |
272 | + | else [IntegerEntry(av, (aw + 1)), StringEntry(ay, ac(w.transactionId, au.amount, unit, unit))] | |
313 | 273 | } | |
314 | 274 | } | |
315 | 275 | } | |
316 | 276 | } | |
317 | 277 | } | |
318 | 278 | ||
319 | 279 | ||
320 | 280 | ||
321 | 281 | @Callable(w) | |
322 | - | func giveBitographForTicket ( | |
282 | + | func giveBitographForTicket (ab,aA,aB) = if (!(isDefined(getString(ab)))) | |
323 | 283 | then throw("Ticket does not exists") | |
324 | 284 | else { | |
325 | - | let | |
326 | - | let | |
327 | - | if (isDefined( | |
328 | - | then throw((("There is bitograph " + toBase58String(value( | |
285 | + | let ai = al(ab) | |
286 | + | let ak = ai._4 | |
287 | + | if (isDefined(ak)) | |
288 | + | then throw((("There is bitograph " + toBase58String(value(ak))) + " that has already been given for the ticket")) | |
329 | 289 | else { | |
330 | - | let | |
331 | - | let | |
332 | - | if (( | |
290 | + | let aC = an(ab) | |
291 | + | let aD = invoke(Address(b), "createBitograph", [aA, aB], nil) | |
292 | + | if ((aD == aD)) | |
333 | 293 | then { | |
334 | - | let | |
335 | - | let i = | |
294 | + | let aE = { | |
295 | + | let i = aD | |
336 | 296 | if ($isInstanceOf(i, "ByteVector")) | |
337 | 297 | then { | |
338 | - | let | |
339 | - | | |
298 | + | let aF = i | |
299 | + | aF | |
340 | 300 | } | |
341 | 301 | else throw("Error occurred while creating a bitograph") | |
342 | 302 | } | |
343 | - | [ScriptTransfer( | |
303 | + | [ScriptTransfer(aC, 1, aE), StringEntry(ab, ac(ai._1, ai._2, w.transactionId, aE))] | |
344 | 304 | } | |
345 | 305 | else throw("Strict value is not equal to itself.") | |
346 | 306 | } | |
347 | 307 | } | |
348 | 308 | ||
349 | 309 | ||
350 | - | @Verifier( | |
351 | - | func | |
310 | + | @Verifier(aG) | |
311 | + | func aH () = sigVerify(aG.bodyBytes, aG.proofs[0], aG.senderPublicKey) | |
352 | 312 |
github/deemru/w8io/026f985 72.25 ms ◑