tx · 2PrT7sb6ScjaLZkSsDDKhQTivEHmNGR22ZiPJ765xLNv 3N7LWLXDtaXAyrzFjxhPPLBfV5DepLY4JQT: -0.02100000 Waves 2022.12.02 15:12 [2342716] smart account 3N7LWLXDtaXAyrzFjxhPPLBfV5DepLY4JQT > SELF 0.00000000 Waves
{ "type": 13, "id": "2PrT7sb6ScjaLZkSsDDKhQTivEHmNGR22ZiPJ765xLNv", "fee": 2100000, "feeAssetId": null, "timestamp": 1669983179572, "version": 2, "chainId": 84, "sender": "3N7LWLXDtaXAyrzFjxhPPLBfV5DepLY4JQT", "senderPublicKey": "Dua5JUgjDoKiGQvqvHFw2EcHUMTEH2zYWs8T2usUxu1S", "proofs": [ "bksVqAKbA87rKGUREyqRN3pE3xSiSQq6Wk43yw9FDX3PbRa37n9rdHtkgPhbps68HVMqPtmwtTfqM23CuxH9e6R" ], "script": "base64:AAIFAAAAAAAAAFAIAhILCgkBAQEBAQgBAQgSAwoBARIDCgEIEgUKAwEICBIECgIBCBIGCgQBCAECEgcKBQgBCAECEgQKAgEYEgUKAwgIARIECgIBCBIECgIBAQAAAD0BAAAAEWdldEludGVnZXJPclRocm93AAAAAgAAAAdhZGRyZXNzAAAAA2tleQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEGgAAAAIFAAAAB2FkZHJlc3MFAAAAA2tleQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAMQ2FuJ3QgcmVhZCAnBQAAAANrZXkCAAAADScgYXQgYWRkcmVzcyAJAAQlAAAAAQUAAAAHYWRkcmVzcwEAAAAQZ2V0U3RyaW5nT3JUaHJvdwAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACBQAAAAdhZGRyZXNzBQAAAANrZXkJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAADENhbid0IHJlYWQgJwUAAAADa2V5AgAAAA0nIGF0IGFkZHJlc3MgC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4NDE3OTY1AAAAAl8yCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAABVrZXlfbmFtZU1pbmltYWxMZW5ndGgFAAAAEW5leHRNaW5pbWFsTGVuZ2h0CQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIFAAAAGWtleV9uZXh0TmFtZU1pbmltYWxMZW5ndGgJAAEsAAAAAgkAASwAAAACCQABpAAAAAEFAAAACWF1Y3Rpb25JZAIAAAABLAkAAaQAAAABBQAAAA1taW5pbWFsTGVuZ2h0BQAAAANuaWwJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAAZa2V5X25leHROYW1lTWluaW1hbExlbmd0aAkAASwAAAACCQABLAAAAAIJAAGkAAAAAQUAAAAJYXVjdGlvbklkAgAAAAEsCQABpAAAAAEFAAAADW1pbmltYWxMZW5naHQFAAAAA25pbAAAAACHMvBt", "height": 2342716, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Fo6g4422nH9WwGmwxpcm5VyCW3wPq3k4SMu2aEuuFg7U Next: 7GGyHkZKoitSErQsNkje4RgfvNGfiyRWMGE83hHJW7GR Diff:
Old | New | Differences | |
---|---|---|---|
46 | 46 | func z (m) = (("Referrer_" + m) + "_percent") | |
47 | 47 | ||
48 | 48 | ||
49 | - | ||
49 | + | func A (B) = ("Length_" + toString(B)) | |
50 | 50 | ||
51 | - | let B = "bidDuration" | |
52 | 51 | ||
53 | - | let C = " | |
52 | + | let C = "initTimestamp" | |
54 | 53 | ||
55 | - | let D = " | |
54 | + | let D = "bidDuration" | |
56 | 55 | ||
57 | - | let E = " | |
56 | + | let E = "revealDuration" | |
58 | 57 | ||
59 | - | let F = " | |
58 | + | let F = "errorFee" | |
60 | 59 | ||
61 | - | let G = " | |
60 | + | let G = "minimalBid" | |
62 | 61 | ||
63 | - | let H = " | |
62 | + | let H = "registrarAddress" | |
64 | 63 | ||
65 | - | let I = " | |
64 | + | let I = "nameMinimalLength" | |
66 | 65 | ||
67 | - | let J = | |
66 | + | let J = "percentRate" | |
68 | 67 | ||
69 | - | let K = | |
68 | + | let K = "collectorAddress" | |
70 | 69 | ||
71 | - | let L = | |
70 | + | let L = "nextNameMinimalLength" | |
72 | 71 | ||
73 | - | let M = | |
72 | + | let M = "lengthPrices" | |
74 | 73 | ||
75 | - | let N = a(this, | |
74 | + | let N = a(this, C) | |
76 | 75 | ||
77 | - | let O = a(this, | |
76 | + | let O = a(this, D) | |
78 | 77 | ||
79 | - | let P = a(this, | |
78 | + | let P = a(this, E) | |
80 | 79 | ||
81 | - | let Q = | |
80 | + | let Q = (O + P) | |
82 | 81 | ||
83 | - | let R = | |
82 | + | let R = a(this, F) | |
84 | 83 | ||
85 | - | let S = | |
84 | + | let S = a(this, G) | |
86 | 85 | ||
87 | - | let T = | |
86 | + | let T = a(this, I) | |
88 | 87 | ||
89 | - | let U = | |
88 | + | let U = a(this, J) | |
90 | 89 | ||
91 | - | func V (W) = { | |
92 | - | let X = i(d(this, y(W))) | |
93 | - | let Y = valueOrElse(getInteger(this, z(W)), Q) | |
94 | - | if (if ((0 > Y)) | |
90 | + | let V = d(this, H) | |
91 | + | ||
92 | + | let W = i(V) | |
93 | + | ||
94 | + | let X = d(this, K) | |
95 | + | ||
96 | + | let Y = i(X) | |
97 | + | ||
98 | + | func Z (aa) = { | |
99 | + | let ab = i(d(this, y(aa))) | |
100 | + | let ac = valueOrElse(getInteger(this, z(aa)), U) | |
101 | + | if (if ((0 > ac)) | |
95 | 102 | then true | |
96 | - | else ( | |
103 | + | else (ac > 100)) | |
97 | 104 | then throw("Incorrect percent rate") | |
98 | - | else $Tuple2( | |
105 | + | else $Tuple2(ab, ac) | |
99 | 106 | } | |
100 | 107 | ||
101 | 108 | ||
102 | - | func | |
103 | - | let | |
104 | - | let | |
105 | - | if (isDefined( | |
109 | + | func ad (ae,af) = { | |
110 | + | let ag = x(ae) | |
111 | + | let ah = getString(this, ag) | |
112 | + | if (isDefined(ah)) | |
106 | 113 | then { | |
107 | - | let | |
108 | - | let | |
109 | - | let | |
110 | - | let | |
111 | - | $Tuple2([ScriptTransfer( | |
114 | + | let ai = Z(value(ah)) | |
115 | + | let aj = ai._1 | |
116 | + | let ak = ai._2 | |
117 | + | let al = fraction(af, ak, 100) | |
118 | + | $Tuple2([ScriptTransfer(aj, al, unit), DeleteEntry(ag)], al) | |
112 | 119 | } | |
113 | 120 | else $Tuple2(nil, 0) | |
114 | 121 | } | |
115 | 122 | ||
116 | 123 | ||
117 | - | func | |
124 | + | func am (m,an,ao,ap) = toBase58String(blake2b256_16Kb(keccak256_16Kb((((toBytes(m) + toBytes(an)) + fromBase58String(ao)) + ap)))) | |
118 | 125 | ||
119 | 126 | ||
120 | - | func | |
127 | + | func aq (ar) = unit | |
121 | 128 | ||
122 | 129 | ||
123 | - | func | |
130 | + | func as (at) = (at.caller == this) | |
124 | 131 | ||
125 | 132 | ||
126 | - | func | |
133 | + | func au (at) = if (as(at)) | |
127 | 134 | then unit | |
128 | 135 | else throw("Permission denied") | |
129 | 136 | ||
130 | 137 | ||
131 | - | func | |
138 | + | func av (j) = if (isDefined(addressFromString(j))) | |
132 | 139 | then unit | |
133 | 140 | else throw((j + " is not a valid address")) | |
134 | 141 | ||
135 | 142 | ||
136 | - | func | |
143 | + | func aw (ax,ay) = if ((ax > 0)) | |
137 | 144 | then unit | |
138 | - | else throw(( | |
145 | + | else throw((ay + " must be greter than 0")) | |
139 | 146 | ||
140 | 147 | ||
141 | - | let | |
148 | + | let az = "BID" | |
142 | 149 | ||
143 | - | let | |
150 | + | let aA = "REVEAL" | |
144 | 151 | ||
145 | - | func ax (s) = { | |
146 | - | let ay = (J + (s * M)) | |
147 | - | let az = (ay + K) | |
148 | - | let aA = (az + L) | |
149 | - | let aB = if ((lastBlock.timestamp > az)) | |
150 | - | then aw | |
151 | - | else av | |
152 | - | $Tuple5(s, aB, ay, az, aA) | |
153 | - | } | |
154 | - | ||
155 | - | ||
156 | - | func aC () = { | |
157 | - | let s = ((lastBlock.timestamp - J) / M) | |
158 | - | ax(s) | |
152 | + | func aB (B) = { | |
153 | + | let aC = getInteger(this, A(B)) | |
154 | + | if (isDefined(aC)) | |
155 | + | then value(aC) | |
156 | + | else S | |
159 | 157 | } | |
160 | 158 | ||
161 | 159 | ||
162 | 160 | func aD () = { | |
163 | - | let aE = aC() | |
164 | - | if ($isInstanceOf(aE, "(Int, String, Int, Int, Int)")) | |
165 | - | then { | |
166 | - | let aF = aE | |
167 | - | let s = aF._1 | |
168 | - | let aB = aF._2 | |
169 | - | $Tuple2(s, aB) | |
170 | - | } | |
171 | - | else throw("Invalid auction info") | |
161 | + | let aE = getInteger(this, A(6)) | |
162 | + | let aF = getInteger(this, A(5)) | |
163 | + | let aG = getInteger(this, A(4)) | |
164 | + | let aH = getInteger(this, A(3)) | |
165 | + | let aI = getInteger(this, A(2)) | |
166 | + | let aJ = getInteger(this, A(1)) | |
167 | + | ([S] ++ (if (isDefined(aE)) | |
168 | + | then [value(aE)] | |
169 | + | else (nil ++ (if (isDefined(aF)) | |
170 | + | then [value(aF)] | |
171 | + | else (nil ++ (if (isDefined(aG)) | |
172 | + | then [value(aG)] | |
173 | + | else (nil ++ (if (isDefined(aH)) | |
174 | + | then [value(aH)] | |
175 | + | else (nil ++ (if (isDefined(aI)) | |
176 | + | then [value(aI)] | |
177 | + | else (nil ++ (if (isDefined(aJ)) | |
178 | + | then [value(aJ)] | |
179 | + | else nil)))))))))))) | |
172 | 180 | } | |
173 | 181 | ||
174 | 182 | ||
175 | - | func aG (m) = { | |
176 | - | let aH = { | |
177 | - | let aE = invoke(S, "isValid", [m], nil) | |
178 | - | if ($isInstanceOf(aE, "Boolean")) | |
183 | + | func aK (s) = { | |
184 | + | let aL = getString(this, L) | |
185 | + | if (!(isDefined(aL))) | |
186 | + | then { | |
187 | + | let aM = { | |
188 | + | let aN = split(value(aL), ",") | |
189 | + | $Tuple2(parseIntValue(aN[0]), parseIntValue(aN[1])) | |
190 | + | } | |
191 | + | let aO = aM._1 | |
192 | + | let aP = aM._2 | |
193 | + | if ((s >= aO)) | |
194 | + | then aP | |
195 | + | else T | |
196 | + | } | |
197 | + | else T | |
198 | + | } | |
199 | + | ||
200 | + | ||
201 | + | func aQ (s) = { | |
202 | + | let aR = (N + ((s - 1) * Q)) | |
203 | + | let aS = (aR + O) | |
204 | + | let aT = (aS + P) | |
205 | + | let aU = if ((lastBlock.timestamp > aS)) | |
206 | + | then aA | |
207 | + | else az | |
208 | + | let aV = aK(s) | |
209 | + | let aW = aD() | |
210 | + | $Tuple7(s, aU, aR, aS, aT, aV, aW) | |
211 | + | } | |
212 | + | ||
213 | + | ||
214 | + | func aX () = { | |
215 | + | let s = (((lastBlock.timestamp - N) / Q) + 1) | |
216 | + | aQ(s) | |
217 | + | } | |
218 | + | ||
219 | + | ||
220 | + | func aY () = { | |
221 | + | let aZ = aX() | |
222 | + | let s = aZ._1 | |
223 | + | let aU = aZ._2 | |
224 | + | $Tuple2(s, aU) | |
225 | + | } | |
226 | + | ||
227 | + | ||
228 | + | func ba (m) = { | |
229 | + | let bb = { | |
230 | + | let bc = invoke(W, "isValid", [m], nil) | |
231 | + | if ($isInstanceOf(bc, "Boolean")) | |
179 | 232 | then { | |
180 | - | let | |
181 | - | | |
233 | + | let bd = bc | |
234 | + | bd | |
182 | 235 | } | |
183 | 236 | else throw("Unsupported result format (available)") | |
184 | 237 | } | |
185 | - | if (aH) | |
186 | - | then (size(m) >= P) | |
238 | + | let be = aX()._6 | |
239 | + | if (bb) | |
240 | + | then (size(m) >= be) | |
187 | 241 | else false | |
188 | 242 | } | |
189 | 243 | ||
190 | 244 | ||
191 | - | func | |
192 | - | let | |
193 | - | if ($isInstanceOf( | |
245 | + | func bf (m) = { | |
246 | + | let bc = invoke(W, "isAvailable", [m], nil) | |
247 | + | if ($isInstanceOf(bc, "Boolean")) | |
194 | 248 | then { | |
195 | - | let | |
196 | - | | |
249 | + | let bd = bc | |
250 | + | bd | |
197 | 251 | } | |
198 | 252 | else throw("Unsupported result format (available)") | |
199 | 253 | } | |
200 | 254 | ||
201 | 255 | ||
202 | - | func | |
203 | - | let | |
204 | - | if (!(isDefined( | |
256 | + | func bg (m) = { | |
257 | + | let bh = getString(this, p(m)) | |
258 | + | if (!(isDefined(bh))) | |
205 | 259 | then true | |
206 | 260 | else { | |
207 | - | let | |
208 | - | let | |
209 | - | let s = k( | |
210 | - | (s == | |
261 | + | let bi = aY()._1 | |
262 | + | let bj = split(value(bh), "_")[1] | |
263 | + | let s = k(bj, 0) | |
264 | + | (s == bi) | |
211 | 265 | } | |
212 | 266 | } | |
213 | 267 | ||
214 | 268 | ||
215 | - | func | |
216 | - | then | |
269 | + | func bk (m) = if (if (bf(m)) | |
270 | + | then bg(m) | |
217 | 271 | else false) | |
218 | - | then | |
272 | + | then ba(m) | |
219 | 273 | else false | |
220 | 274 | ||
221 | 275 | ||
222 | - | func | |
223 | - | let | |
224 | - | then ( | |
276 | + | func bl (at,s,t) = { | |
277 | + | let bm = if (if ((size(at.payments) == 1)) | |
278 | + | then (at.payments[0].assetId == unit) | |
225 | 279 | else false) | |
226 | - | then | |
280 | + | then at.payments[0].amount | |
227 | 281 | else throw("Single payment required") | |
228 | - | let aR = toString(ap.caller) | |
229 | - | let aS = u(r(toString(s), aR, t)) | |
230 | - | let aT = aD() | |
231 | - | let aU = aT._1 | |
232 | - | let aV = aT._2 | |
233 | - | if ((aU != s)) | |
234 | - | then throw("Auctions is already over") | |
235 | - | else if ((aV != av)) | |
236 | - | then throw("Bid period is over") | |
237 | - | else if (isDefined(getInteger(this, aS))) | |
238 | - | then throw("Bid with exact amount already presented") | |
239 | - | else [IntegerEntry(aS, aQ)] | |
282 | + | let bn = fromBase58String(t) | |
283 | + | if ((bn == bn)) | |
284 | + | then { | |
285 | + | let bo = toString(at.caller) | |
286 | + | let bp = u(r(toString(s), bo, t)) | |
287 | + | let bq = aY() | |
288 | + | let br = bq._1 | |
289 | + | let bs = bq._2 | |
290 | + | if ((br != s)) | |
291 | + | then throw("Auctions is already over") | |
292 | + | else if ((bs != az)) | |
293 | + | then throw("Bid period is over") | |
294 | + | else if (isDefined(getInteger(this, bp))) | |
295 | + | then throw("Bid with exact amount already presented") | |
296 | + | else [IntegerEntry(bp, bm)] | |
297 | + | } | |
298 | + | else throw("Strict value is not equal to itself.") | |
240 | 299 | } | |
241 | 300 | ||
242 | 301 | ||
243 | - | @Callable(ap) | |
244 | - | func init (aW,K,L,N,O,R,P,Q,T) = valueOrElse(am([aq(ap), if (!(isDefined(getInteger(this, A)))) | |
245 | - | then unit | |
246 | - | else throw("Auction already has been initialized"), ar(R), ar(T), as(K, "Bid duration"), as(L, "Reveal duration"), as(N, "Error fee"), as(O, "Minimal bid"), as(Q, "Percent rate"), if ((P > 3)) | |
247 | - | then unit | |
248 | - | else throw("Minimal name length must be more than 3")]), [IntegerEntry(A, aW), IntegerEntry(B, K), IntegerEntry(C, L), IntegerEntry(D, N), IntegerEntry(E, O), StringEntry(F, R), IntegerEntry(G, P), IntegerEntry(H, Q), StringEntry(I, T)]) | |
249 | - | ||
250 | - | ||
251 | - | ||
252 | - | @Callable(ap) | |
253 | - | func getAuctionById (s) = $Tuple2(nil, ax(s)) | |
254 | - | ||
255 | - | ||
256 | - | ||
257 | - | @Callable(ap) | |
258 | - | func isAvailable (m) = $Tuple2(nil, aO(m)) | |
259 | - | ||
260 | - | ||
261 | - | ||
262 | - | @Callable(ap) | |
263 | - | func bidWithReferrer (s,t,W) = valueOrElse(am([if (isDefined(getString(this, y(W)))) | |
264 | - | then unit | |
265 | - | else throw((("Referrer `" + W) + "` not found"))]), { | |
266 | - | let aX = aP(ap, s, t) | |
267 | - | let aY = [StringEntry(x(r(toString(s), toString(ap.caller), t)), W)] | |
268 | - | (aX ++ aY) | |
269 | - | }) | |
270 | - | ||
271 | - | ||
272 | - | ||
273 | - | @Callable(ap) | |
274 | - | func bid (s,t) = aP(ap, s, t) | |
275 | - | ||
276 | - | ||
277 | - | ||
278 | - | @Callable(ap) | |
279 | - | func reveal (s,m,ab,al) = { | |
280 | - | let aZ = ap.caller | |
281 | - | let aR = toString(aZ) | |
282 | - | let t = ai(m, ab, aR, al) | |
283 | - | let aa = r(toString(s), aR, t) | |
284 | - | let aL = w(aa) | |
285 | - | let ba = aD() | |
286 | - | let aU = ba._1 | |
287 | - | let aV = ba._2 | |
288 | - | if ((aU != s)) | |
302 | + | func bt (bu,s,m,af,ap) = { | |
303 | + | let bv = toString(bu) | |
304 | + | let t = am(m, af, bv, ap) | |
305 | + | let ae = r(toString(s), bv, t) | |
306 | + | let bh = w(ae) | |
307 | + | let bw = aY() | |
308 | + | let br = bw._1 | |
309 | + | let bs = bw._2 | |
310 | + | if ((br != s)) | |
289 | 311 | then throw("Auctions is already over") | |
290 | - | else if (( | |
312 | + | else if ((bs != aA)) | |
291 | 313 | then throw("Reveal period is over") | |
292 | - | else if (isDefined(getString(this, | |
314 | + | else if (isDefined(getString(this, bh))) | |
293 | 315 | then throw("Bid is already revealed") | |
294 | 316 | else { | |
295 | - | let aS = u(aa) | |
296 | - | let bb = valueOrErrorMessage(getInteger(this, aS), ("Bid doesn't exists " + t)) | |
297 | - | let bc = p(m) | |
298 | - | let bd = getString(this, bc) | |
299 | - | let be = if (if ((ab >= O)) | |
300 | - | then (bb >= ab) | |
317 | + | let bp = u(ae) | |
318 | + | let bx = valueOrErrorMessage(getInteger(this, bp), ("Bid doesn't exists " + t)) | |
319 | + | let by = p(m) | |
320 | + | let bz = getString(this, by) | |
321 | + | let bA = aB(size(m)) | |
322 | + | let bB = if (if ((af >= bA)) | |
323 | + | then (bx >= af) | |
301 | 324 | else false) | |
302 | - | then | |
325 | + | then bk(m) | |
303 | 326 | else false | |
304 | - | let | |
305 | - | if (!( | |
327 | + | let bC = [StringEntry(bh, ((((toString(bx) + ",") + toString(af)) + ",") + m))] | |
328 | + | if (!(bB)) | |
306 | 329 | then { | |
307 | - | let | |
308 | - | let | |
309 | - | | |
330 | + | let bD = fraction(bx, 10, 100) | |
331 | + | let bE = [ScriptTransfer(bu, (bx - bD), unit), ScriptTransfer(Y, bD, unit), DeleteEntry(bp)] | |
332 | + | bE | |
310 | 333 | } | |
311 | - | else if (isDefined( | |
334 | + | else if (isDefined(bz)) | |
312 | 335 | then { | |
313 | - | let | |
314 | - | let | |
315 | - | $Tuple2( | |
336 | + | let bF = { | |
337 | + | let bG = split(value(bz), ",") | |
338 | + | $Tuple2(bG[0], parseIntValue(bG[1])) | |
316 | 339 | } | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | then $Tuple2( | |
323 | - | else if (( | |
324 | - | then $Tuple2( | |
340 | + | let bH = bF._1 | |
341 | + | let bI = bF._2 | |
342 | + | let bJ = value(getString(this, bH)) | |
343 | + | let bK = parseIntValue(split(bJ, ",")[1]) | |
344 | + | let bL = if ((af > bK)) | |
345 | + | then $Tuple2(bh, bK) | |
346 | + | else if ((af > bI)) | |
347 | + | then $Tuple2(bH, af) | |
325 | 348 | else $Tuple2(unit, unit) | |
326 | - | let | |
327 | - | let | |
328 | - | let | |
329 | - | let | |
330 | - | if ($isInstanceOf( | |
349 | + | let bM = bL._1 | |
350 | + | let bN = bL._2 | |
351 | + | let bO = { | |
352 | + | let bc = $Tuple2(bM, bN) | |
353 | + | if ($isInstanceOf(bc, "(String, Int)")) | |
331 | 354 | then { | |
332 | - | let | |
333 | - | [StringEntry( | |
355 | + | let bP = bc | |
356 | + | [StringEntry(by, ((bP._1 + ",") + toString(bP._2)))] | |
334 | 357 | } | |
335 | 358 | else nil | |
336 | 359 | } | |
337 | - | ( | |
360 | + | (bC ++ bO) | |
338 | 361 | } | |
339 | 362 | else { | |
340 | - | let | |
341 | - | ( | |
363 | + | let bQ = [StringEntry(by, ((bh + ",") + toString(S)))] | |
364 | + | (bC ++ bQ) | |
342 | 365 | } | |
343 | 366 | } | |
344 | 367 | } | |
345 | 368 | ||
346 | 369 | ||
370 | + | @Callable(at) | |
371 | + | func init (bR,O,P,R,S,V,T,U,X) = valueOrElse(aq([au(at), if (!(isDefined(getInteger(this, C)))) | |
372 | + | then unit | |
373 | + | else throw("Auction already has been initialized"), av(V), av(X), aw(O, "Bid duration"), aw(P, "Reveal duration"), aw(R, "Error fee"), aw(S, "Minimal bid"), aw(U, "Percent rate"), if ((T > 3)) | |
374 | + | then unit | |
375 | + | else throw("Minimal name length must be more than 3")]), [IntegerEntry(C, bR), IntegerEntry(D, O), IntegerEntry(E, P), IntegerEntry(F, R), IntegerEntry(G, S), StringEntry(H, V), IntegerEntry(I, T), IntegerEntry(J, U), StringEntry(K, X)]) | |
347 | 376 | ||
348 | - | @Callable(ap) | |
349 | - | func finalize (s,bu) = { | |
350 | - | let aA = ax(s)._5 | |
351 | - | let bv = if ((lastBlock.timestamp > aA)) | |
377 | + | ||
378 | + | ||
379 | + | @Callable(at) | |
380 | + | func getAuctionById (s) = $Tuple2(nil, aQ(s)) | |
381 | + | ||
382 | + | ||
383 | + | ||
384 | + | @Callable(at) | |
385 | + | func isAvailable (m) = $Tuple2(nil, bk(m)) | |
386 | + | ||
387 | + | ||
388 | + | ||
389 | + | @Callable(at) | |
390 | + | func bidWithReferrer (s,t,aa) = valueOrElse(aq([if (isDefined(getString(this, y(aa)))) | |
391 | + | then unit | |
392 | + | else throw((("Referrer `" + aa) + "` not found"))]), { | |
393 | + | let bS = bl(at, s, t) | |
394 | + | let bT = [StringEntry(x(r(toString(s), toString(at.caller), t)), aa)] | |
395 | + | (bS ++ bT) | |
396 | + | }) | |
397 | + | ||
398 | + | ||
399 | + | ||
400 | + | @Callable(at) | |
401 | + | func bid (s,t) = bl(at, s, t) | |
402 | + | ||
403 | + | ||
404 | + | ||
405 | + | @Callable(at) | |
406 | + | func reveal (s,m,af,ap) = bt(at.caller, s, m, af, ap) | |
407 | + | ||
408 | + | ||
409 | + | ||
410 | + | @Callable(at) | |
411 | + | func revealForBidder (bu,s,m,af,ap) = bt(valueOrErrorMessage(addressFromString(bu), "Bidder must be valid address"), s, m, af, ap) | |
412 | + | ||
413 | + | ||
414 | + | ||
415 | + | @Callable(at) | |
416 | + | func finalize (s,bU) = { | |
417 | + | let aT = aQ(s)._5 | |
418 | + | let bV = if ((lastBlock.timestamp > aT)) | |
352 | 419 | then unit | |
353 | 420 | else throw("Cannot finalize auction that has not ended") | |
354 | - | if (( | |
421 | + | if ((bV == bV)) | |
355 | 422 | then { | |
356 | - | let aZ = ap.caller | |
357 | - | let aR = toString(aZ) | |
358 | - | func bw (bx,t) = { | |
359 | - | let aa = r(toString(s), aR, t) | |
360 | - | let aS = u(aa) | |
361 | - | let aL = w(aa) | |
362 | - | let bf = getString(this, aL) | |
363 | - | let by = { | |
364 | - | let bz = split(valueOrErrorMessage(bf, (("Bid with hash " + t) + " not found")), ",") | |
365 | - | $Tuple3(parseIntValue(bz[0]), parseIntValue(bz[1]), bz[2]) | |
366 | - | } | |
367 | - | let bb = by._1 | |
368 | - | let ab = by._2 | |
369 | - | let m = by._3 | |
370 | - | let bc = p(m) | |
371 | - | let bd = getString(this, bc) | |
372 | - | let bA = { | |
373 | - | let bj = split(value(bd), ",") | |
374 | - | $Tuple2(bj[0], parseIntValue(bj[1])) | |
375 | - | } | |
376 | - | let bk = bA._1 | |
377 | - | let bl = bA._2 | |
378 | - | let bB = { | |
379 | - | let bC = split(bk, "_") | |
380 | - | $Tuple2(parseIntValue(bC[1]), bC[2]) | |
381 | - | } | |
382 | - | let bD = bB._1 | |
383 | - | let bE = bB._2 | |
384 | - | let bF = [DeleteEntry(aL), DeleteEntry(aS)] | |
385 | - | let bG = if ((bk == aL)) | |
423 | + | let bW = at.caller | |
424 | + | let bo = toString(bW) | |
425 | + | func bX (bY,t) = { | |
426 | + | let bn = fromBase58String(t) | |
427 | + | if ((bn == bn)) | |
386 | 428 | then { | |
387 | - | let bH = Z(aa, bl) | |
388 | - | let bI = bH._1 | |
389 | - | let ag = bH._2 | |
390 | - | let bJ = invoke(S, "register", [m, bE, aA], nil) | |
391 | - | if ((bJ == bJ)) | |
429 | + | let ae = r(toString(s), bo, t) | |
430 | + | let bp = u(ae) | |
431 | + | let bh = w(ae) | |
432 | + | let bC = getString(this, bh) | |
433 | + | let bZ = { | |
434 | + | let ca = split(valueOrErrorMessage(bC, (("Bid with hash " + t) + " not found")), ",") | |
435 | + | $Tuple3(parseIntValue(ca[0]), parseIntValue(ca[1]), ca[2]) | |
436 | + | } | |
437 | + | let bx = bZ._1 | |
438 | + | let af = bZ._2 | |
439 | + | let m = bZ._3 | |
440 | + | let by = p(m) | |
441 | + | let bz = getString(this, by) | |
442 | + | let cb = { | |
443 | + | let bG = split(value(bz), ",") | |
444 | + | $Tuple2(bG[0], parseIntValue(bG[1])) | |
445 | + | } | |
446 | + | let bH = cb._1 | |
447 | + | let bI = cb._2 | |
448 | + | let cc = { | |
449 | + | let cd = split(bH, "_") | |
450 | + | $Tuple2(parseIntValue(cd[1]), cd[2]) | |
451 | + | } | |
452 | + | let ce = cc._1 | |
453 | + | let cf = cc._2 | |
454 | + | let cg = [DeleteEntry(bh), DeleteEntry(bp)] | |
455 | + | let ch = if ((bH == bh)) | |
392 | 456 | then { | |
393 | - | let bK = [ScriptTransfer(aZ, (bb - bl), unit), ScriptTransfer(U, (bl - ag), unit)] | |
394 | - | (bI ++ bK) | |
457 | + | let ci = ad(ae, bI) | |
458 | + | let cj = ci._1 | |
459 | + | let ak = ci._2 | |
460 | + | let ck = invoke(W, "register", [m, cf, aT], nil) | |
461 | + | if ((ck == ck)) | |
462 | + | then { | |
463 | + | let cl = (bx - bI) | |
464 | + | let cm = if ((cl > 0)) | |
465 | + | then [ScriptTransfer(bW, cl, unit)] | |
466 | + | else nil | |
467 | + | let cn = [ScriptTransfer(Y, (bI - ak), unit)] | |
468 | + | ((cj ++ cn) ++ cm) | |
469 | + | } | |
470 | + | else throw("Strict value is not equal to itself.") | |
395 | 471 | } | |
396 | - | else throw("Strict value is not equal to itself.") | |
472 | + | else [ScriptTransfer(bW, bx, unit)] | |
473 | + | ((bY ++ cg) ++ ch) | |
397 | 474 | } | |
398 | - | else [ScriptTransfer(aZ, bb, unit)] | |
399 | - | ((bx ++ bF) ++ bG) | |
475 | + | else throw("Strict value is not equal to itself.") | |
400 | 476 | } | |
401 | 477 | ||
402 | - | let | |
403 | - | let | |
404 | - | let | |
405 | - | func | |
406 | - | then | |
407 | - | else | |
478 | + | let co = bU | |
479 | + | let cp = size(co) | |
480 | + | let cq = nil | |
481 | + | func cr (cs,ct) = if ((ct >= cp)) | |
482 | + | then cs | |
483 | + | else bX(cs, co[ct]) | |
408 | 484 | ||
409 | - | func | |
410 | - | then | |
485 | + | func cu (cs,ct) = if ((ct >= cp)) | |
486 | + | then cs | |
411 | 487 | else throw("List size exceeds 10") | |
412 | 488 | ||
413 | - | | |
489 | + | cu(cr(cr(cr(cr(cr(cr(cr(cr(cr(cr(cq, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
414 | 490 | } | |
415 | 491 | else throw("Strict value is not equal to itself.") | |
416 | 492 | } | |
417 | 493 | ||
418 | 494 | ||
419 | 495 | ||
420 | - | @Callable( | |
421 | - | func addReferrer ( | |
422 | - | then (100 > | |
496 | + | @Callable(at) | |
497 | + | func addReferrer (aa,cv,cw) = valueOrElse(aq([au(at), av(cv), if (if ((cw > 0)) | |
498 | + | then (100 > cw) | |
423 | 499 | else false) | |
424 | 500 | then unit | |
425 | - | else throw("Percent must be between 0 and 100"), if ((size( | |
501 | + | else throw("Percent must be between 0 and 100"), if ((size(aa) > 0)) | |
426 | 502 | then unit | |
427 | - | else throw("Referrer name cannot be empty")]), [StringEntry(y( | |
503 | + | else throw("Referrer name cannot be empty")]), [StringEntry(y(aa), cv), IntegerEntry(z(aa), cw)]) | |
428 | 504 | ||
429 | 505 | ||
430 | 506 | ||
431 | - | @Callable( | |
507 | + | @Callable(at) | |
432 | 508 | func revokeBid (s,t) = { | |
433 | - | let aZ = ap.caller | |
434 | - | let bU = toString(aZ) | |
435 | - | let aa = r(toString(s), bU, t) | |
436 | - | let aS = u(aa) | |
437 | - | let aX = getInteger(this, aS) | |
438 | - | let bV = aD() | |
439 | - | let aU = bV._1 | |
440 | - | let aV = bV._2 | |
441 | - | if ((aU != s)) | |
442 | - | then throw("Auction is already over") | |
443 | - | else if ((aV != av)) | |
444 | - | then throw("Bid period is already over") | |
445 | - | else if (!(isDefined(aX))) | |
446 | - | then throw((("Bid with " + t) + " not found")) | |
447 | - | else [ScriptTransfer(aZ, value(aX), unit), DeleteEntry(aS)] | |
509 | + | let bW = at.caller | |
510 | + | let cx = toString(bW) | |
511 | + | let bn = fromBase58String(t) | |
512 | + | if ((bn == bn)) | |
513 | + | then { | |
514 | + | let ae = r(toString(s), cx, t) | |
515 | + | let bp = u(ae) | |
516 | + | let bS = getInteger(this, bp) | |
517 | + | let cy = aY() | |
518 | + | let br = cy._1 | |
519 | + | let bs = cy._2 | |
520 | + | if ((br != s)) | |
521 | + | then throw("Auction is already over") | |
522 | + | else if ((bs != az)) | |
523 | + | then throw("Bid period is already over") | |
524 | + | else if (!(isDefined(bS))) | |
525 | + | then throw((("Bid with " + t) + " not found")) | |
526 | + | else [ScriptTransfer(bW, value(bS), unit), DeleteEntry(bp)] | |
527 | + | } | |
528 | + | else throw("Strict value is not equal to itself.") | |
448 | 529 | } | |
530 | + | ||
531 | + | ||
532 | + | ||
533 | + | @Callable(at) | |
534 | + | func setNextMinimalLength (s,be) = valueOrElse(aq([au(at)]), { | |
535 | + | let cz = getString(this, L) | |
536 | + | if (isDefined(cz)) | |
537 | + | then { | |
538 | + | let cA = { | |
539 | + | let aN = split(value(cz), ",") | |
540 | + | $Tuple2(parseIntValue(aN[0]), parseIntValue(aN[1])) | |
541 | + | } | |
542 | + | let aO = cA._1 | |
543 | + | let aP = cA._2 | |
544 | + | [IntegerEntry(I, aP), StringEntry(L, ((toString(s) + ",") + toString(be)))] | |
545 | + | } | |
546 | + | else [StringEntry(L, ((toString(s) + ",") + toString(be)))] | |
547 | + | }) | |
449 | 548 | ||
450 | 549 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b,c) = valueOrErrorMessage(getInteger(b, c), ((("Can't read '" + c) + "' at address ") + toString(b))) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func d (b,c) = valueOrErrorMessage(getString(b, c), ((("Can't read '" + c) + "' at address ") + toString(b))) | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | func e (b,c,f) = valueOrElse(getInteger(b, c), f) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func g (h) = valueOrErrorMessage(parseInt(h), (("Can't parse integer from '" + h) + "'")) | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func i (j) = valueOrErrorMessage(addressFromString(j), (("Can't parse address from '" + j) + "'")) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func k (h,f) = valueOrElse(parseInt(h), f) | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func l (m,n,o) = ((((m + "_") + n) + "_") + o) | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func p (m) = ("Top_" + m) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func q (m) = ("Top2_" + m) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func r (s,b,t) = ((((s + "_") + b) + "_") + t) | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func u (v) = ("Bid_" + v) | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func w (v) = ("Reveal_" + v) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func x (v) = ("Referrer_" + v) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func y (m) = (("Referrer_" + m) + "_address") | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func z (m) = (("Referrer_" + m) + "_percent") | |
47 | 47 | ||
48 | 48 | ||
49 | - | ||
49 | + | func A (B) = ("Length_" + toString(B)) | |
50 | 50 | ||
51 | - | let B = "bidDuration" | |
52 | 51 | ||
53 | - | let C = " | |
52 | + | let C = "initTimestamp" | |
54 | 53 | ||
55 | - | let D = " | |
54 | + | let D = "bidDuration" | |
56 | 55 | ||
57 | - | let E = " | |
56 | + | let E = "revealDuration" | |
58 | 57 | ||
59 | - | let F = " | |
58 | + | let F = "errorFee" | |
60 | 59 | ||
61 | - | let G = " | |
60 | + | let G = "minimalBid" | |
62 | 61 | ||
63 | - | let H = " | |
62 | + | let H = "registrarAddress" | |
64 | 63 | ||
65 | - | let I = " | |
64 | + | let I = "nameMinimalLength" | |
66 | 65 | ||
67 | - | let J = | |
66 | + | let J = "percentRate" | |
68 | 67 | ||
69 | - | let K = | |
68 | + | let K = "collectorAddress" | |
70 | 69 | ||
71 | - | let L = | |
70 | + | let L = "nextNameMinimalLength" | |
72 | 71 | ||
73 | - | let M = | |
72 | + | let M = "lengthPrices" | |
74 | 73 | ||
75 | - | let N = a(this, | |
74 | + | let N = a(this, C) | |
76 | 75 | ||
77 | - | let O = a(this, | |
76 | + | let O = a(this, D) | |
78 | 77 | ||
79 | - | let P = a(this, | |
78 | + | let P = a(this, E) | |
80 | 79 | ||
81 | - | let Q = | |
80 | + | let Q = (O + P) | |
82 | 81 | ||
83 | - | let R = | |
82 | + | let R = a(this, F) | |
84 | 83 | ||
85 | - | let S = | |
84 | + | let S = a(this, G) | |
86 | 85 | ||
87 | - | let T = | |
86 | + | let T = a(this, I) | |
88 | 87 | ||
89 | - | let U = | |
88 | + | let U = a(this, J) | |
90 | 89 | ||
91 | - | func V (W) = { | |
92 | - | let X = i(d(this, y(W))) | |
93 | - | let Y = valueOrElse(getInteger(this, z(W)), Q) | |
94 | - | if (if ((0 > Y)) | |
90 | + | let V = d(this, H) | |
91 | + | ||
92 | + | let W = i(V) | |
93 | + | ||
94 | + | let X = d(this, K) | |
95 | + | ||
96 | + | let Y = i(X) | |
97 | + | ||
98 | + | func Z (aa) = { | |
99 | + | let ab = i(d(this, y(aa))) | |
100 | + | let ac = valueOrElse(getInteger(this, z(aa)), U) | |
101 | + | if (if ((0 > ac)) | |
95 | 102 | then true | |
96 | - | else ( | |
103 | + | else (ac > 100)) | |
97 | 104 | then throw("Incorrect percent rate") | |
98 | - | else $Tuple2( | |
105 | + | else $Tuple2(ab, ac) | |
99 | 106 | } | |
100 | 107 | ||
101 | 108 | ||
102 | - | func | |
103 | - | let | |
104 | - | let | |
105 | - | if (isDefined( | |
109 | + | func ad (ae,af) = { | |
110 | + | let ag = x(ae) | |
111 | + | let ah = getString(this, ag) | |
112 | + | if (isDefined(ah)) | |
106 | 113 | then { | |
107 | - | let | |
108 | - | let | |
109 | - | let | |
110 | - | let | |
111 | - | $Tuple2([ScriptTransfer( | |
114 | + | let ai = Z(value(ah)) | |
115 | + | let aj = ai._1 | |
116 | + | let ak = ai._2 | |
117 | + | let al = fraction(af, ak, 100) | |
118 | + | $Tuple2([ScriptTransfer(aj, al, unit), DeleteEntry(ag)], al) | |
112 | 119 | } | |
113 | 120 | else $Tuple2(nil, 0) | |
114 | 121 | } | |
115 | 122 | ||
116 | 123 | ||
117 | - | func | |
124 | + | func am (m,an,ao,ap) = toBase58String(blake2b256_16Kb(keccak256_16Kb((((toBytes(m) + toBytes(an)) + fromBase58String(ao)) + ap)))) | |
118 | 125 | ||
119 | 126 | ||
120 | - | func | |
127 | + | func aq (ar) = unit | |
121 | 128 | ||
122 | 129 | ||
123 | - | func | |
130 | + | func as (at) = (at.caller == this) | |
124 | 131 | ||
125 | 132 | ||
126 | - | func | |
133 | + | func au (at) = if (as(at)) | |
127 | 134 | then unit | |
128 | 135 | else throw("Permission denied") | |
129 | 136 | ||
130 | 137 | ||
131 | - | func | |
138 | + | func av (j) = if (isDefined(addressFromString(j))) | |
132 | 139 | then unit | |
133 | 140 | else throw((j + " is not a valid address")) | |
134 | 141 | ||
135 | 142 | ||
136 | - | func | |
143 | + | func aw (ax,ay) = if ((ax > 0)) | |
137 | 144 | then unit | |
138 | - | else throw(( | |
145 | + | else throw((ay + " must be greter than 0")) | |
139 | 146 | ||
140 | 147 | ||
141 | - | let | |
148 | + | let az = "BID" | |
142 | 149 | ||
143 | - | let | |
150 | + | let aA = "REVEAL" | |
144 | 151 | ||
145 | - | func ax (s) = { | |
146 | - | let ay = (J + (s * M)) | |
147 | - | let az = (ay + K) | |
148 | - | let aA = (az + L) | |
149 | - | let aB = if ((lastBlock.timestamp > az)) | |
150 | - | then aw | |
151 | - | else av | |
152 | - | $Tuple5(s, aB, ay, az, aA) | |
153 | - | } | |
154 | - | ||
155 | - | ||
156 | - | func aC () = { | |
157 | - | let s = ((lastBlock.timestamp - J) / M) | |
158 | - | ax(s) | |
152 | + | func aB (B) = { | |
153 | + | let aC = getInteger(this, A(B)) | |
154 | + | if (isDefined(aC)) | |
155 | + | then value(aC) | |
156 | + | else S | |
159 | 157 | } | |
160 | 158 | ||
161 | 159 | ||
162 | 160 | func aD () = { | |
163 | - | let aE = aC() | |
164 | - | if ($isInstanceOf(aE, "(Int, String, Int, Int, Int)")) | |
165 | - | then { | |
166 | - | let aF = aE | |
167 | - | let s = aF._1 | |
168 | - | let aB = aF._2 | |
169 | - | $Tuple2(s, aB) | |
170 | - | } | |
171 | - | else throw("Invalid auction info") | |
161 | + | let aE = getInteger(this, A(6)) | |
162 | + | let aF = getInteger(this, A(5)) | |
163 | + | let aG = getInteger(this, A(4)) | |
164 | + | let aH = getInteger(this, A(3)) | |
165 | + | let aI = getInteger(this, A(2)) | |
166 | + | let aJ = getInteger(this, A(1)) | |
167 | + | ([S] ++ (if (isDefined(aE)) | |
168 | + | then [value(aE)] | |
169 | + | else (nil ++ (if (isDefined(aF)) | |
170 | + | then [value(aF)] | |
171 | + | else (nil ++ (if (isDefined(aG)) | |
172 | + | then [value(aG)] | |
173 | + | else (nil ++ (if (isDefined(aH)) | |
174 | + | then [value(aH)] | |
175 | + | else (nil ++ (if (isDefined(aI)) | |
176 | + | then [value(aI)] | |
177 | + | else (nil ++ (if (isDefined(aJ)) | |
178 | + | then [value(aJ)] | |
179 | + | else nil)))))))))))) | |
172 | 180 | } | |
173 | 181 | ||
174 | 182 | ||
175 | - | func aG (m) = { | |
176 | - | let aH = { | |
177 | - | let aE = invoke(S, "isValid", [m], nil) | |
178 | - | if ($isInstanceOf(aE, "Boolean")) | |
183 | + | func aK (s) = { | |
184 | + | let aL = getString(this, L) | |
185 | + | if (!(isDefined(aL))) | |
186 | + | then { | |
187 | + | let aM = { | |
188 | + | let aN = split(value(aL), ",") | |
189 | + | $Tuple2(parseIntValue(aN[0]), parseIntValue(aN[1])) | |
190 | + | } | |
191 | + | let aO = aM._1 | |
192 | + | let aP = aM._2 | |
193 | + | if ((s >= aO)) | |
194 | + | then aP | |
195 | + | else T | |
196 | + | } | |
197 | + | else T | |
198 | + | } | |
199 | + | ||
200 | + | ||
201 | + | func aQ (s) = { | |
202 | + | let aR = (N + ((s - 1) * Q)) | |
203 | + | let aS = (aR + O) | |
204 | + | let aT = (aS + P) | |
205 | + | let aU = if ((lastBlock.timestamp > aS)) | |
206 | + | then aA | |
207 | + | else az | |
208 | + | let aV = aK(s) | |
209 | + | let aW = aD() | |
210 | + | $Tuple7(s, aU, aR, aS, aT, aV, aW) | |
211 | + | } | |
212 | + | ||
213 | + | ||
214 | + | func aX () = { | |
215 | + | let s = (((lastBlock.timestamp - N) / Q) + 1) | |
216 | + | aQ(s) | |
217 | + | } | |
218 | + | ||
219 | + | ||
220 | + | func aY () = { | |
221 | + | let aZ = aX() | |
222 | + | let s = aZ._1 | |
223 | + | let aU = aZ._2 | |
224 | + | $Tuple2(s, aU) | |
225 | + | } | |
226 | + | ||
227 | + | ||
228 | + | func ba (m) = { | |
229 | + | let bb = { | |
230 | + | let bc = invoke(W, "isValid", [m], nil) | |
231 | + | if ($isInstanceOf(bc, "Boolean")) | |
179 | 232 | then { | |
180 | - | let | |
181 | - | | |
233 | + | let bd = bc | |
234 | + | bd | |
182 | 235 | } | |
183 | 236 | else throw("Unsupported result format (available)") | |
184 | 237 | } | |
185 | - | if (aH) | |
186 | - | then (size(m) >= P) | |
238 | + | let be = aX()._6 | |
239 | + | if (bb) | |
240 | + | then (size(m) >= be) | |
187 | 241 | else false | |
188 | 242 | } | |
189 | 243 | ||
190 | 244 | ||
191 | - | func | |
192 | - | let | |
193 | - | if ($isInstanceOf( | |
245 | + | func bf (m) = { | |
246 | + | let bc = invoke(W, "isAvailable", [m], nil) | |
247 | + | if ($isInstanceOf(bc, "Boolean")) | |
194 | 248 | then { | |
195 | - | let | |
196 | - | | |
249 | + | let bd = bc | |
250 | + | bd | |
197 | 251 | } | |
198 | 252 | else throw("Unsupported result format (available)") | |
199 | 253 | } | |
200 | 254 | ||
201 | 255 | ||
202 | - | func | |
203 | - | let | |
204 | - | if (!(isDefined( | |
256 | + | func bg (m) = { | |
257 | + | let bh = getString(this, p(m)) | |
258 | + | if (!(isDefined(bh))) | |
205 | 259 | then true | |
206 | 260 | else { | |
207 | - | let | |
208 | - | let | |
209 | - | let s = k( | |
210 | - | (s == | |
261 | + | let bi = aY()._1 | |
262 | + | let bj = split(value(bh), "_")[1] | |
263 | + | let s = k(bj, 0) | |
264 | + | (s == bi) | |
211 | 265 | } | |
212 | 266 | } | |
213 | 267 | ||
214 | 268 | ||
215 | - | func | |
216 | - | then | |
269 | + | func bk (m) = if (if (bf(m)) | |
270 | + | then bg(m) | |
217 | 271 | else false) | |
218 | - | then | |
272 | + | then ba(m) | |
219 | 273 | else false | |
220 | 274 | ||
221 | 275 | ||
222 | - | func | |
223 | - | let | |
224 | - | then ( | |
276 | + | func bl (at,s,t) = { | |
277 | + | let bm = if (if ((size(at.payments) == 1)) | |
278 | + | then (at.payments[0].assetId == unit) | |
225 | 279 | else false) | |
226 | - | then | |
280 | + | then at.payments[0].amount | |
227 | 281 | else throw("Single payment required") | |
228 | - | let aR = toString(ap.caller) | |
229 | - | let aS = u(r(toString(s), aR, t)) | |
230 | - | let aT = aD() | |
231 | - | let aU = aT._1 | |
232 | - | let aV = aT._2 | |
233 | - | if ((aU != s)) | |
234 | - | then throw("Auctions is already over") | |
235 | - | else if ((aV != av)) | |
236 | - | then throw("Bid period is over") | |
237 | - | else if (isDefined(getInteger(this, aS))) | |
238 | - | then throw("Bid with exact amount already presented") | |
239 | - | else [IntegerEntry(aS, aQ)] | |
282 | + | let bn = fromBase58String(t) | |
283 | + | if ((bn == bn)) | |
284 | + | then { | |
285 | + | let bo = toString(at.caller) | |
286 | + | let bp = u(r(toString(s), bo, t)) | |
287 | + | let bq = aY() | |
288 | + | let br = bq._1 | |
289 | + | let bs = bq._2 | |
290 | + | if ((br != s)) | |
291 | + | then throw("Auctions is already over") | |
292 | + | else if ((bs != az)) | |
293 | + | then throw("Bid period is over") | |
294 | + | else if (isDefined(getInteger(this, bp))) | |
295 | + | then throw("Bid with exact amount already presented") | |
296 | + | else [IntegerEntry(bp, bm)] | |
297 | + | } | |
298 | + | else throw("Strict value is not equal to itself.") | |
240 | 299 | } | |
241 | 300 | ||
242 | 301 | ||
243 | - | @Callable(ap) | |
244 | - | func init (aW,K,L,N,O,R,P,Q,T) = valueOrElse(am([aq(ap), if (!(isDefined(getInteger(this, A)))) | |
245 | - | then unit | |
246 | - | else throw("Auction already has been initialized"), ar(R), ar(T), as(K, "Bid duration"), as(L, "Reveal duration"), as(N, "Error fee"), as(O, "Minimal bid"), as(Q, "Percent rate"), if ((P > 3)) | |
247 | - | then unit | |
248 | - | else throw("Minimal name length must be more than 3")]), [IntegerEntry(A, aW), IntegerEntry(B, K), IntegerEntry(C, L), IntegerEntry(D, N), IntegerEntry(E, O), StringEntry(F, R), IntegerEntry(G, P), IntegerEntry(H, Q), StringEntry(I, T)]) | |
249 | - | ||
250 | - | ||
251 | - | ||
252 | - | @Callable(ap) | |
253 | - | func getAuctionById (s) = $Tuple2(nil, ax(s)) | |
254 | - | ||
255 | - | ||
256 | - | ||
257 | - | @Callable(ap) | |
258 | - | func isAvailable (m) = $Tuple2(nil, aO(m)) | |
259 | - | ||
260 | - | ||
261 | - | ||
262 | - | @Callable(ap) | |
263 | - | func bidWithReferrer (s,t,W) = valueOrElse(am([if (isDefined(getString(this, y(W)))) | |
264 | - | then unit | |
265 | - | else throw((("Referrer `" + W) + "` not found"))]), { | |
266 | - | let aX = aP(ap, s, t) | |
267 | - | let aY = [StringEntry(x(r(toString(s), toString(ap.caller), t)), W)] | |
268 | - | (aX ++ aY) | |
269 | - | }) | |
270 | - | ||
271 | - | ||
272 | - | ||
273 | - | @Callable(ap) | |
274 | - | func bid (s,t) = aP(ap, s, t) | |
275 | - | ||
276 | - | ||
277 | - | ||
278 | - | @Callable(ap) | |
279 | - | func reveal (s,m,ab,al) = { | |
280 | - | let aZ = ap.caller | |
281 | - | let aR = toString(aZ) | |
282 | - | let t = ai(m, ab, aR, al) | |
283 | - | let aa = r(toString(s), aR, t) | |
284 | - | let aL = w(aa) | |
285 | - | let ba = aD() | |
286 | - | let aU = ba._1 | |
287 | - | let aV = ba._2 | |
288 | - | if ((aU != s)) | |
302 | + | func bt (bu,s,m,af,ap) = { | |
303 | + | let bv = toString(bu) | |
304 | + | let t = am(m, af, bv, ap) | |
305 | + | let ae = r(toString(s), bv, t) | |
306 | + | let bh = w(ae) | |
307 | + | let bw = aY() | |
308 | + | let br = bw._1 | |
309 | + | let bs = bw._2 | |
310 | + | if ((br != s)) | |
289 | 311 | then throw("Auctions is already over") | |
290 | - | else if (( | |
312 | + | else if ((bs != aA)) | |
291 | 313 | then throw("Reveal period is over") | |
292 | - | else if (isDefined(getString(this, | |
314 | + | else if (isDefined(getString(this, bh))) | |
293 | 315 | then throw("Bid is already revealed") | |
294 | 316 | else { | |
295 | - | let aS = u(aa) | |
296 | - | let bb = valueOrErrorMessage(getInteger(this, aS), ("Bid doesn't exists " + t)) | |
297 | - | let bc = p(m) | |
298 | - | let bd = getString(this, bc) | |
299 | - | let be = if (if ((ab >= O)) | |
300 | - | then (bb >= ab) | |
317 | + | let bp = u(ae) | |
318 | + | let bx = valueOrErrorMessage(getInteger(this, bp), ("Bid doesn't exists " + t)) | |
319 | + | let by = p(m) | |
320 | + | let bz = getString(this, by) | |
321 | + | let bA = aB(size(m)) | |
322 | + | let bB = if (if ((af >= bA)) | |
323 | + | then (bx >= af) | |
301 | 324 | else false) | |
302 | - | then | |
325 | + | then bk(m) | |
303 | 326 | else false | |
304 | - | let | |
305 | - | if (!( | |
327 | + | let bC = [StringEntry(bh, ((((toString(bx) + ",") + toString(af)) + ",") + m))] | |
328 | + | if (!(bB)) | |
306 | 329 | then { | |
307 | - | let | |
308 | - | let | |
309 | - | | |
330 | + | let bD = fraction(bx, 10, 100) | |
331 | + | let bE = [ScriptTransfer(bu, (bx - bD), unit), ScriptTransfer(Y, bD, unit), DeleteEntry(bp)] | |
332 | + | bE | |
310 | 333 | } | |
311 | - | else if (isDefined( | |
334 | + | else if (isDefined(bz)) | |
312 | 335 | then { | |
313 | - | let | |
314 | - | let | |
315 | - | $Tuple2( | |
336 | + | let bF = { | |
337 | + | let bG = split(value(bz), ",") | |
338 | + | $Tuple2(bG[0], parseIntValue(bG[1])) | |
316 | 339 | } | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | then $Tuple2( | |
323 | - | else if (( | |
324 | - | then $Tuple2( | |
340 | + | let bH = bF._1 | |
341 | + | let bI = bF._2 | |
342 | + | let bJ = value(getString(this, bH)) | |
343 | + | let bK = parseIntValue(split(bJ, ",")[1]) | |
344 | + | let bL = if ((af > bK)) | |
345 | + | then $Tuple2(bh, bK) | |
346 | + | else if ((af > bI)) | |
347 | + | then $Tuple2(bH, af) | |
325 | 348 | else $Tuple2(unit, unit) | |
326 | - | let | |
327 | - | let | |
328 | - | let | |
329 | - | let | |
330 | - | if ($isInstanceOf( | |
349 | + | let bM = bL._1 | |
350 | + | let bN = bL._2 | |
351 | + | let bO = { | |
352 | + | let bc = $Tuple2(bM, bN) | |
353 | + | if ($isInstanceOf(bc, "(String, Int)")) | |
331 | 354 | then { | |
332 | - | let | |
333 | - | [StringEntry( | |
355 | + | let bP = bc | |
356 | + | [StringEntry(by, ((bP._1 + ",") + toString(bP._2)))] | |
334 | 357 | } | |
335 | 358 | else nil | |
336 | 359 | } | |
337 | - | ( | |
360 | + | (bC ++ bO) | |
338 | 361 | } | |
339 | 362 | else { | |
340 | - | let | |
341 | - | ( | |
363 | + | let bQ = [StringEntry(by, ((bh + ",") + toString(S)))] | |
364 | + | (bC ++ bQ) | |
342 | 365 | } | |
343 | 366 | } | |
344 | 367 | } | |
345 | 368 | ||
346 | 369 | ||
370 | + | @Callable(at) | |
371 | + | func init (bR,O,P,R,S,V,T,U,X) = valueOrElse(aq([au(at), if (!(isDefined(getInteger(this, C)))) | |
372 | + | then unit | |
373 | + | else throw("Auction already has been initialized"), av(V), av(X), aw(O, "Bid duration"), aw(P, "Reveal duration"), aw(R, "Error fee"), aw(S, "Minimal bid"), aw(U, "Percent rate"), if ((T > 3)) | |
374 | + | then unit | |
375 | + | else throw("Minimal name length must be more than 3")]), [IntegerEntry(C, bR), IntegerEntry(D, O), IntegerEntry(E, P), IntegerEntry(F, R), IntegerEntry(G, S), StringEntry(H, V), IntegerEntry(I, T), IntegerEntry(J, U), StringEntry(K, X)]) | |
347 | 376 | ||
348 | - | @Callable(ap) | |
349 | - | func finalize (s,bu) = { | |
350 | - | let aA = ax(s)._5 | |
351 | - | let bv = if ((lastBlock.timestamp > aA)) | |
377 | + | ||
378 | + | ||
379 | + | @Callable(at) | |
380 | + | func getAuctionById (s) = $Tuple2(nil, aQ(s)) | |
381 | + | ||
382 | + | ||
383 | + | ||
384 | + | @Callable(at) | |
385 | + | func isAvailable (m) = $Tuple2(nil, bk(m)) | |
386 | + | ||
387 | + | ||
388 | + | ||
389 | + | @Callable(at) | |
390 | + | func bidWithReferrer (s,t,aa) = valueOrElse(aq([if (isDefined(getString(this, y(aa)))) | |
391 | + | then unit | |
392 | + | else throw((("Referrer `" + aa) + "` not found"))]), { | |
393 | + | let bS = bl(at, s, t) | |
394 | + | let bT = [StringEntry(x(r(toString(s), toString(at.caller), t)), aa)] | |
395 | + | (bS ++ bT) | |
396 | + | }) | |
397 | + | ||
398 | + | ||
399 | + | ||
400 | + | @Callable(at) | |
401 | + | func bid (s,t) = bl(at, s, t) | |
402 | + | ||
403 | + | ||
404 | + | ||
405 | + | @Callable(at) | |
406 | + | func reveal (s,m,af,ap) = bt(at.caller, s, m, af, ap) | |
407 | + | ||
408 | + | ||
409 | + | ||
410 | + | @Callable(at) | |
411 | + | func revealForBidder (bu,s,m,af,ap) = bt(valueOrErrorMessage(addressFromString(bu), "Bidder must be valid address"), s, m, af, ap) | |
412 | + | ||
413 | + | ||
414 | + | ||
415 | + | @Callable(at) | |
416 | + | func finalize (s,bU) = { | |
417 | + | let aT = aQ(s)._5 | |
418 | + | let bV = if ((lastBlock.timestamp > aT)) | |
352 | 419 | then unit | |
353 | 420 | else throw("Cannot finalize auction that has not ended") | |
354 | - | if (( | |
421 | + | if ((bV == bV)) | |
355 | 422 | then { | |
356 | - | let aZ = ap.caller | |
357 | - | let aR = toString(aZ) | |
358 | - | func bw (bx,t) = { | |
359 | - | let aa = r(toString(s), aR, t) | |
360 | - | let aS = u(aa) | |
361 | - | let aL = w(aa) | |
362 | - | let bf = getString(this, aL) | |
363 | - | let by = { | |
364 | - | let bz = split(valueOrErrorMessage(bf, (("Bid with hash " + t) + " not found")), ",") | |
365 | - | $Tuple3(parseIntValue(bz[0]), parseIntValue(bz[1]), bz[2]) | |
366 | - | } | |
367 | - | let bb = by._1 | |
368 | - | let ab = by._2 | |
369 | - | let m = by._3 | |
370 | - | let bc = p(m) | |
371 | - | let bd = getString(this, bc) | |
372 | - | let bA = { | |
373 | - | let bj = split(value(bd), ",") | |
374 | - | $Tuple2(bj[0], parseIntValue(bj[1])) | |
375 | - | } | |
376 | - | let bk = bA._1 | |
377 | - | let bl = bA._2 | |
378 | - | let bB = { | |
379 | - | let bC = split(bk, "_") | |
380 | - | $Tuple2(parseIntValue(bC[1]), bC[2]) | |
381 | - | } | |
382 | - | let bD = bB._1 | |
383 | - | let bE = bB._2 | |
384 | - | let bF = [DeleteEntry(aL), DeleteEntry(aS)] | |
385 | - | let bG = if ((bk == aL)) | |
423 | + | let bW = at.caller | |
424 | + | let bo = toString(bW) | |
425 | + | func bX (bY,t) = { | |
426 | + | let bn = fromBase58String(t) | |
427 | + | if ((bn == bn)) | |
386 | 428 | then { | |
387 | - | let bH = Z(aa, bl) | |
388 | - | let bI = bH._1 | |
389 | - | let ag = bH._2 | |
390 | - | let bJ = invoke(S, "register", [m, bE, aA], nil) | |
391 | - | if ((bJ == bJ)) | |
429 | + | let ae = r(toString(s), bo, t) | |
430 | + | let bp = u(ae) | |
431 | + | let bh = w(ae) | |
432 | + | let bC = getString(this, bh) | |
433 | + | let bZ = { | |
434 | + | let ca = split(valueOrErrorMessage(bC, (("Bid with hash " + t) + " not found")), ",") | |
435 | + | $Tuple3(parseIntValue(ca[0]), parseIntValue(ca[1]), ca[2]) | |
436 | + | } | |
437 | + | let bx = bZ._1 | |
438 | + | let af = bZ._2 | |
439 | + | let m = bZ._3 | |
440 | + | let by = p(m) | |
441 | + | let bz = getString(this, by) | |
442 | + | let cb = { | |
443 | + | let bG = split(value(bz), ",") | |
444 | + | $Tuple2(bG[0], parseIntValue(bG[1])) | |
445 | + | } | |
446 | + | let bH = cb._1 | |
447 | + | let bI = cb._2 | |
448 | + | let cc = { | |
449 | + | let cd = split(bH, "_") | |
450 | + | $Tuple2(parseIntValue(cd[1]), cd[2]) | |
451 | + | } | |
452 | + | let ce = cc._1 | |
453 | + | let cf = cc._2 | |
454 | + | let cg = [DeleteEntry(bh), DeleteEntry(bp)] | |
455 | + | let ch = if ((bH == bh)) | |
392 | 456 | then { | |
393 | - | let bK = [ScriptTransfer(aZ, (bb - bl), unit), ScriptTransfer(U, (bl - ag), unit)] | |
394 | - | (bI ++ bK) | |
457 | + | let ci = ad(ae, bI) | |
458 | + | let cj = ci._1 | |
459 | + | let ak = ci._2 | |
460 | + | let ck = invoke(W, "register", [m, cf, aT], nil) | |
461 | + | if ((ck == ck)) | |
462 | + | then { | |
463 | + | let cl = (bx - bI) | |
464 | + | let cm = if ((cl > 0)) | |
465 | + | then [ScriptTransfer(bW, cl, unit)] | |
466 | + | else nil | |
467 | + | let cn = [ScriptTransfer(Y, (bI - ak), unit)] | |
468 | + | ((cj ++ cn) ++ cm) | |
469 | + | } | |
470 | + | else throw("Strict value is not equal to itself.") | |
395 | 471 | } | |
396 | - | else throw("Strict value is not equal to itself.") | |
472 | + | else [ScriptTransfer(bW, bx, unit)] | |
473 | + | ((bY ++ cg) ++ ch) | |
397 | 474 | } | |
398 | - | else [ScriptTransfer(aZ, bb, unit)] | |
399 | - | ((bx ++ bF) ++ bG) | |
475 | + | else throw("Strict value is not equal to itself.") | |
400 | 476 | } | |
401 | 477 | ||
402 | - | let | |
403 | - | let | |
404 | - | let | |
405 | - | func | |
406 | - | then | |
407 | - | else | |
478 | + | let co = bU | |
479 | + | let cp = size(co) | |
480 | + | let cq = nil | |
481 | + | func cr (cs,ct) = if ((ct >= cp)) | |
482 | + | then cs | |
483 | + | else bX(cs, co[ct]) | |
408 | 484 | ||
409 | - | func | |
410 | - | then | |
485 | + | func cu (cs,ct) = if ((ct >= cp)) | |
486 | + | then cs | |
411 | 487 | else throw("List size exceeds 10") | |
412 | 488 | ||
413 | - | | |
489 | + | cu(cr(cr(cr(cr(cr(cr(cr(cr(cr(cr(cq, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
414 | 490 | } | |
415 | 491 | else throw("Strict value is not equal to itself.") | |
416 | 492 | } | |
417 | 493 | ||
418 | 494 | ||
419 | 495 | ||
420 | - | @Callable( | |
421 | - | func addReferrer ( | |
422 | - | then (100 > | |
496 | + | @Callable(at) | |
497 | + | func addReferrer (aa,cv,cw) = valueOrElse(aq([au(at), av(cv), if (if ((cw > 0)) | |
498 | + | then (100 > cw) | |
423 | 499 | else false) | |
424 | 500 | then unit | |
425 | - | else throw("Percent must be between 0 and 100"), if ((size( | |
501 | + | else throw("Percent must be between 0 and 100"), if ((size(aa) > 0)) | |
426 | 502 | then unit | |
427 | - | else throw("Referrer name cannot be empty")]), [StringEntry(y( | |
503 | + | else throw("Referrer name cannot be empty")]), [StringEntry(y(aa), cv), IntegerEntry(z(aa), cw)]) | |
428 | 504 | ||
429 | 505 | ||
430 | 506 | ||
431 | - | @Callable( | |
507 | + | @Callable(at) | |
432 | 508 | func revokeBid (s,t) = { | |
433 | - | let aZ = ap.caller | |
434 | - | let bU = toString(aZ) | |
435 | - | let aa = r(toString(s), bU, t) | |
436 | - | let aS = u(aa) | |
437 | - | let aX = getInteger(this, aS) | |
438 | - | let bV = aD() | |
439 | - | let aU = bV._1 | |
440 | - | let aV = bV._2 | |
441 | - | if ((aU != s)) | |
442 | - | then throw("Auction is already over") | |
443 | - | else if ((aV != av)) | |
444 | - | then throw("Bid period is already over") | |
445 | - | else if (!(isDefined(aX))) | |
446 | - | then throw((("Bid with " + t) + " not found")) | |
447 | - | else [ScriptTransfer(aZ, value(aX), unit), DeleteEntry(aS)] | |
509 | + | let bW = at.caller | |
510 | + | let cx = toString(bW) | |
511 | + | let bn = fromBase58String(t) | |
512 | + | if ((bn == bn)) | |
513 | + | then { | |
514 | + | let ae = r(toString(s), cx, t) | |
515 | + | let bp = u(ae) | |
516 | + | let bS = getInteger(this, bp) | |
517 | + | let cy = aY() | |
518 | + | let br = cy._1 | |
519 | + | let bs = cy._2 | |
520 | + | if ((br != s)) | |
521 | + | then throw("Auction is already over") | |
522 | + | else if ((bs != az)) | |
523 | + | then throw("Bid period is already over") | |
524 | + | else if (!(isDefined(bS))) | |
525 | + | then throw((("Bid with " + t) + " not found")) | |
526 | + | else [ScriptTransfer(bW, value(bS), unit), DeleteEntry(bp)] | |
527 | + | } | |
528 | + | else throw("Strict value is not equal to itself.") | |
448 | 529 | } | |
530 | + | ||
531 | + | ||
532 | + | ||
533 | + | @Callable(at) | |
534 | + | func setNextMinimalLength (s,be) = valueOrElse(aq([au(at)]), { | |
535 | + | let cz = getString(this, L) | |
536 | + | if (isDefined(cz)) | |
537 | + | then { | |
538 | + | let cA = { | |
539 | + | let aN = split(value(cz), ",") | |
540 | + | $Tuple2(parseIntValue(aN[0]), parseIntValue(aN[1])) | |
541 | + | } | |
542 | + | let aO = cA._1 | |
543 | + | let aP = cA._2 | |
544 | + | [IntegerEntry(I, aP), StringEntry(L, ((toString(s) + ",") + toString(be)))] | |
545 | + | } | |
546 | + | else [StringEntry(L, ((toString(s) + ",") + toString(be)))] | |
547 | + | }) | |
449 | 548 | ||
450 | 549 |
github/deemru/w8io/169f3d6 112.41 ms ◑