tx · 4mw16Fe1VNmB9YeDCDfATPQkKLbsJYyZqNn2pHaJk3Hs 3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq: -0.05000000 Waves 2022.12.03 08:03 [2343731] smart account 3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq > SELF 0.00000000 Waves
{ "type": 13, "id": "4mw16Fe1VNmB9YeDCDfATPQkKLbsJYyZqNn2pHaJk3Hs", "fee": 5000000, "feeAssetId": null, "timestamp": 1670043804944, "version": 2, "chainId": 84, "sender": "3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq", "senderPublicKey": "H6UqxUDcJamDRg1uykVcWMn4zhAMTV7i1nfPq1moLWmJ", "proofs": [ "5FuQuWHef9LXQRUFiEU6UwSWcLcuxTBWgds6Nz7hMLDfVrcvoyv5Lvyqto7sje5PV2Eqfa88DTurKCZ3CxRcWVam" ], "script": "base64:BgI2CAISCwoJCAgICAgBCAgIEgMKAQESBAoCCAgSBgoECAgBARIGCgQICAgBEgUKAwgIARIDCgEIKQAJc2VwYXJhdG9yAgFfAAhrQXVjdGlvbgIHYXVjdGlvbgAFa1NlbGwCBHNlbGwACGtUcnVzdGVkAgd0cnVzdGVkAAZrUHJpY2UCBXByaWNlAQpnZXRTbG90S2V5AgZwcmVmaXgFbmZ0SWQJAKwCAgkArAICBQZwcmVmaXgFCXNlcGFyYXRvcgkA2AQBBQVuZnRJZAELZ2V0UHJpY2VLZXkBBW5mdElkCQCsAgIJAKwCAgUGa1ByaWNlBQlzZXBhcmF0b3IJANgEAQUFbmZ0SWQBCmdldFNlbGxLZXkBBW5mdElkCQCsAgIJAKwCAgUFa1NlbGwFCXNlcGFyYXRvcgkA2AQBBQVuZnRJZAENZ2V0QXVjdGlvbktleQEFbmZ0SWQJAKwCAgkArAICBQhrQXVjdGlvbgUJc2VwYXJhdG9yCQDYBAEFBW5mdElkAQ1nZXRUcnVzdGVkS2V5AQZpc3N1ZXIJAKwCAgkArAICBQhrVHJ1c3R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kA2AQBBQZjYWxsZXIFA25pbAFpAQd0ZXN0QmlkAQRkYXRhCQDMCAIJAQtTdHJpbmdFbnRyeQICA2JpZAUEZGF0YQUDbmlsALLYJ+I=", "height": 2343731, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4nPWTCYB1kuqB6P7ueXAADSbKXnagJSW5C3HAycVKpUe Next: Hcaeqm9nSiXecKvUR8NpqY9XkiBNKfUKgFcSJ2M6oGua Diff:
Old | New | Differences | |
---|---|---|---|
352 | 352 | then throw("Not open for auction") | |
353 | 353 | else if ((parseIntValue(bj) >= bi)) | |
354 | 354 | then throw("Bid is less then starting/highest Bid") | |
355 | - | else [StringEntry((bg + "_highest_bid"), toString(bi))] | |
355 | + | else [StringEntry((bg + "_highest_bid"), toString(bi)), StringEntry((bg + "_winner"), toBase58String(aI.caller.bytes))] | |
356 | 356 | } | |
357 | 357 | ||
358 | 358 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "_" | |
5 | 5 | ||
6 | 6 | let b = "auction" | |
7 | 7 | ||
8 | 8 | let c = "sell" | |
9 | 9 | ||
10 | 10 | let d = "trusted" | |
11 | 11 | ||
12 | 12 | let e = "price" | |
13 | 13 | ||
14 | 14 | func f (g,h) = ((g + a) + toBase58String(h)) | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func i (h) = ((e + a) + toBase58String(h)) | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func j (h) = ((c + a) + toBase58String(h)) | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func k (h) = ((b + a) + toBase58String(h)) | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func l (m) = ((d + a) + toString(m)) | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func n (o,p) = (o ++ [p]) | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func q (r) = { | |
33 | 33 | let s = size(r) | |
34 | 34 | if ((s == 0)) | |
35 | 35 | then throw("Empty params") | |
36 | 36 | else if ((s == 1)) | |
37 | 37 | then makeString({ | |
38 | 38 | let t = r | |
39 | 39 | let u = size(t) | |
40 | 40 | let v = nil | |
41 | 41 | func w (x,y) = if ((y >= u)) | |
42 | 42 | then x | |
43 | 43 | else n(x, t[y]) | |
44 | 44 | ||
45 | 45 | func z (x,y) = if ((y >= u)) | |
46 | 46 | then x | |
47 | 47 | else throw("List size exceeds 1") | |
48 | 48 | ||
49 | 49 | z(w(v, 0), 1) | |
50 | 50 | }, a) | |
51 | 51 | else if ((s == 2)) | |
52 | 52 | then makeString({ | |
53 | 53 | let t = r | |
54 | 54 | let u = size(t) | |
55 | 55 | let v = nil | |
56 | 56 | func w (x,y) = if ((y >= u)) | |
57 | 57 | then x | |
58 | 58 | else n(x, t[y]) | |
59 | 59 | ||
60 | 60 | func z (x,y) = if ((y >= u)) | |
61 | 61 | then x | |
62 | 62 | else throw("List size exceeds 2") | |
63 | 63 | ||
64 | 64 | z(w(w(v, 0), 1), 2) | |
65 | 65 | }, a) | |
66 | 66 | else if ((s == 3)) | |
67 | 67 | then makeString({ | |
68 | 68 | let t = r | |
69 | 69 | let u = size(t) | |
70 | 70 | let v = nil | |
71 | 71 | func w (x,y) = if ((y >= u)) | |
72 | 72 | then x | |
73 | 73 | else n(x, t[y]) | |
74 | 74 | ||
75 | 75 | func z (x,y) = if ((y >= u)) | |
76 | 76 | then x | |
77 | 77 | else throw("List size exceeds 3") | |
78 | 78 | ||
79 | 79 | z(w(w(w(v, 0), 1), 2), 3) | |
80 | 80 | }, a) | |
81 | 81 | else if ((s == 4)) | |
82 | 82 | then makeString({ | |
83 | 83 | let t = r | |
84 | 84 | let u = size(t) | |
85 | 85 | let v = nil | |
86 | 86 | func w (x,y) = if ((y >= u)) | |
87 | 87 | then x | |
88 | 88 | else n(x, t[y]) | |
89 | 89 | ||
90 | 90 | func z (x,y) = if ((y >= u)) | |
91 | 91 | then x | |
92 | 92 | else throw("List size exceeds 4") | |
93 | 93 | ||
94 | 94 | z(w(w(w(w(v, 0), 1), 2), 3), 4) | |
95 | 95 | }, a) | |
96 | 96 | else if ((s == 5)) | |
97 | 97 | then makeString({ | |
98 | 98 | let t = r | |
99 | 99 | let u = size(t) | |
100 | 100 | let v = nil | |
101 | 101 | func w (x,y) = if ((y >= u)) | |
102 | 102 | then x | |
103 | 103 | else n(x, t[y]) | |
104 | 104 | ||
105 | 105 | func z (x,y) = if ((y >= u)) | |
106 | 106 | then x | |
107 | 107 | else throw("List size exceeds 5") | |
108 | 108 | ||
109 | 109 | z(w(w(w(w(w(v, 0), 1), 2), 3), 4), 5) | |
110 | 110 | }, a) | |
111 | 111 | else throw("Max number of parameters exceeded") | |
112 | 112 | } | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func A (B) = { | |
116 | 116 | let C = split(B, a) | |
117 | 117 | $Tuple5(addressFromStringValue(C[0]), parseIntValue(C[1]), parseIntValue(C[2]), parseIntValue(C[3]), parseIntValue(C[4])) | |
118 | 118 | } | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func D (B) = { | |
122 | 122 | let C = split(B, a) | |
123 | 123 | $Tuple2(addressFromStringValue(C[0]), parseIntValue(C[1])) | |
124 | 124 | } | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func E (r) = { | |
128 | 128 | let F = r | |
129 | 129 | if ($isInstanceOf(F, "(Address, Int, String, String)")) | |
130 | 130 | then { | |
131 | 131 | let G = F | |
132 | 132 | q([toString(G._1), toString(G._2), G._3, G._4]) | |
133 | 133 | } | |
134 | 134 | else if ($isInstanceOf(F, "(Address, Int)")) | |
135 | 135 | then { | |
136 | 136 | let H = F | |
137 | 137 | q([toString(H._1), toString(H._2)]) | |
138 | 138 | } | |
139 | 139 | else throw("Wrong params tupple") | |
140 | 140 | } | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func I (J,h,K,L,M) = StringEntry(k(h), E($Tuple4(J, K, L, M))) | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | func N (h,O,P) = StringEntry(j(h), E($Tuple2(O, P))) | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func Q (h) = value(getString(this, k(h))) | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func R (h) = value(getString(this, j(h))) | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func S (T,U) = { | |
156 | 156 | let B = Q(T) | |
157 | 157 | let V = A(B) | |
158 | 158 | let J = V._1 | |
159 | 159 | let W = V._2 | |
160 | 160 | let X = V._3 | |
161 | 161 | let Y = V._4 | |
162 | 162 | let Z = V._5 | |
163 | 163 | if ((U >= Z)) | |
164 | 164 | then $Tuple2(J, X) | |
165 | 165 | else { | |
166 | 166 | let aa = (W - X) | |
167 | 167 | let ab = (Z - Y) | |
168 | 168 | let ac = (U - Y) | |
169 | 169 | $Tuple2(J, (W - fraction(ac, aa, ab))) | |
170 | 170 | } | |
171 | 171 | } | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func ad (T) = { | |
175 | 175 | let F = assetInfo(T) | |
176 | 176 | if ($isInstanceOf(F, "Asset")) | |
177 | 177 | then { | |
178 | 178 | let ae = F | |
179 | 179 | if (if ((ae.decimals == 0)) | |
180 | 180 | then (ae.quantity == 1) | |
181 | 181 | else false) | |
182 | 182 | then (ae.reissuable == false) | |
183 | 183 | else false | |
184 | 184 | } | |
185 | 185 | else false | |
186 | 186 | } | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | func af (T) = { | |
190 | 190 | let m = value(assetInfo(T)).issuer | |
191 | 191 | valueOrElse(getBoolean(this, l(m)), false) | |
192 | 192 | } | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | func ag (T) = isDefined(getString(this, j(T))) | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | func ah (T) = isDefined(getString(this, k(T))) | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | func ai (P) = (P > 0) | |
202 | 202 | ||
203 | 203 | ||
204 | 204 | func aj (K,ak) = (K > ak) | |
205 | 205 | ||
206 | 206 | ||
207 | 207 | func al (am) = (am == this) | |
208 | 208 | ||
209 | 209 | ||
210 | 210 | func an (am,J) = if ((am == this)) | |
211 | 211 | then true | |
212 | 212 | else (am == J) | |
213 | 213 | ||
214 | 214 | ||
215 | 215 | func ao (ap,M) = (ap > M) | |
216 | 216 | ||
217 | 217 | ||
218 | 218 | func aq (ar,as) = (ar >= as) | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | func at (T) = (T == unit) | |
222 | 222 | ||
223 | 223 | ||
224 | 224 | func au (h) = if (!(ad(h))) | |
225 | 225 | then throw("Token is not Nft") | |
226 | 226 | else if (ag(h)) | |
227 | 227 | then throw("Sell already exists") | |
228 | 228 | else if (ah(h)) | |
229 | 229 | then throw("Auction already exists") | |
230 | 230 | else unit | |
231 | 231 | ||
232 | 232 | ||
233 | 233 | func av (aw,ax,P) = if (!(at(aw))) | |
234 | 234 | then throw("Payment must be at WAVES") | |
235 | 235 | else if (!(aq(ax, P))) | |
236 | 236 | then throw("Not enough funds") | |
237 | 237 | else unit | |
238 | 238 | ||
239 | 239 | ||
240 | 240 | func ay () = 0 | |
241 | 241 | ||
242 | 242 | ||
243 | 243 | func az () = 0 | |
244 | 244 | ||
245 | 245 | ||
246 | 246 | func aA (aB,ax,aC) = if (aB) | |
247 | 247 | then $Tuple2((aC - az()), (ax - aC)) | |
248 | 248 | else $Tuple2((aC - ay()), (ax - aC)) | |
249 | 249 | ||
250 | 250 | ||
251 | 251 | func aD (h) = if (ag(h)) | |
252 | 252 | then $Tuple2(c, R(h)) | |
253 | 253 | else if (ah(h)) | |
254 | 254 | then $Tuple2(b, Q(h)) | |
255 | 255 | else throw("Slot doesn`t exist") | |
256 | 256 | ||
257 | 257 | ||
258 | 258 | let aE = "buy" | |
259 | 259 | ||
260 | 260 | let aF = "bid" | |
261 | 261 | ||
262 | 262 | let aG = $Tuple4("OPEN", "CLOSED", "REWARDED", "CANCELED") | |
263 | 263 | ||
264 | 264 | let aH = base58'3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq' | |
265 | 265 | ||
266 | 266 | @Callable(aI) | |
267 | 267 | func createNft (aJ,aK,aL,aM,aN,aO,aP,aQ,aR) = { | |
268 | 268 | let aS = Issue(aJ, aP, 1, 0, false) | |
269 | 269 | let aT = calculateAssetId(aS) | |
270 | 270 | let aU = aI.transactionId | |
271 | 271 | [aS, ScriptTransfer(aI.caller, 1, aT), StringEntry(((toBase58String(aT) + a) + "Owner"), toString(aI.caller)), StringEntry(((toBase58String(aT) + a) + "nft_type"), aM), StringEntry(((toBase58String(aT) + a) + "nft_tags"), aN), StringEntry(((toBase58String(aT) + a) + "nft_dAppAddress"), aL), IntegerEntry(((toBase58String(aT) + a) + "nft_selling_price"), aO), StringEntry(((toBase58String(aT) + a) + "nft_onSell"), aQ), StringEntry(((toBase58String(aT) + a) + "nft_data"), aR), StringEntry(((toBase58String(aU) + a) + "issue_nft"), toBase58String(aT))] | |
272 | 272 | } | |
273 | 273 | ||
274 | 274 | ||
275 | 275 | ||
276 | 276 | @Callable(aI) | |
277 | 277 | func sellNFT (P) = { | |
278 | 278 | let aU = aI.transactionId | |
279 | 279 | let J = aI.caller.bytes | |
280 | 280 | let aV = $Tuple2(value(aI.payments[0].assetId), value(aI.payments[0].amount)) | |
281 | 281 | let aW = aV._1 | |
282 | 282 | let aX = aV._2 | |
283 | 283 | if (!(ad(aW))) | |
284 | 284 | then throw("Token is not NFT") | |
285 | 285 | else [StringEntry(((e + a) + toBase58String(value(aI.payments[0].assetId))), toString(P)), StringEntry(((toString(aI.caller) + a) + c), ((toBase58String(aW) + a) + toString(aX)))] | |
286 | 286 | } | |
287 | 287 | ||
288 | 288 | ||
289 | 289 | ||
290 | 290 | @Callable(aI) | |
291 | 291 | func buyNFT (aY,aZ) = { | |
292 | 292 | let T = fromBase58String(aY) | |
293 | 293 | let ba = value(aI.payments[0].amount) | |
294 | 294 | let bb = { | |
295 | 295 | let F = getString(this, (("nft_" + aZ) + "_owner")) | |
296 | 296 | if ($isInstanceOf(F, "String")) | |
297 | 297 | then { | |
298 | 298 | let bc = F | |
299 | 299 | bc | |
300 | 300 | } | |
301 | 301 | else false | |
302 | 302 | } | |
303 | 303 | let P = getStringValue(((((e + a) + aY) + "_") + aZ)) | |
304 | 304 | let bd = valueOrErrorMessage(getStringValue(((aY + a) + "Owner")), "No owner") | |
305 | 305 | if ((aI.payments[0].assetId != unit)) | |
306 | 306 | then throw("Pay in waves") | |
307 | 307 | else if ((bb == toString(aI.caller))) | |
308 | 308 | then throw("Owner of NFT not able to purchase") | |
309 | 309 | else [ScriptTransfer(aI.caller, 1, T), ScriptTransfer(Address(fromBase58String(bd)), ba, unit), StringEntry(((toString(aI.caller) + a) + aE), ((aY + a) + toString(ba))), DeleteEntry((("nft_" + aZ) + "_owner"))] | |
310 | 310 | } | |
311 | 311 | ||
312 | 312 | ||
313 | 313 | ||
314 | 314 | @Callable(aI) | |
315 | 315 | func addAuction (L,M,K,be) = { | |
316 | 316 | let aU = toBase58String(aI.transactionId) | |
317 | 317 | let h = value(aI.payments[0].assetId) | |
318 | 318 | let P = value(K) | |
319 | 319 | let am = aI.caller.bytes | |
320 | 320 | let bf = { | |
321 | 321 | let F = getString(this, (((toBase58String(h) + a) + "nft_status_") + toBase58String(am))) | |
322 | 322 | if ($isInstanceOf(F, "String")) | |
323 | 323 | then { | |
324 | 324 | let bc = F | |
325 | 325 | true | |
326 | 326 | } | |
327 | 327 | else false | |
328 | 328 | } | |
329 | 329 | if ((aI.payments[0].assetId == unit)) | |
330 | 330 | then throw("NFT not attached") | |
331 | 331 | else if ((bf == true)) | |
332 | 332 | then throw("Already in auction list") | |
333 | 333 | else [StringEntry(((aU + "_nft_start_auction_date_") + toBase58String(am)), L), StringEntry(((aU + "_nft_end_auction_date_") + toBase58String(am)), M), IntegerEntry((aU + "_nft_start_price"), K), StringEntry((aU + "_nft_owner"), toString(aI.caller)), StringEntry((aU + "_nft_on_auction"), toBase58String(h)), StringEntry((aU + "_previous_bidder"), "none"), StringEntry((aU + "_highest_bid"), toString(K)), StringEntry((aU + "_winner_of_nft"), "0"), StringEntry((aU + "_bidder_count"), "0"), StringEntry(((aU + "_nft_status_") + toBase58String(am)), "OPEN")] | |
334 | 334 | } | |
335 | 335 | ||
336 | 336 | ||
337 | 337 | ||
338 | 338 | @Callable(aI) | |
339 | 339 | func placeBid (bg,h,aK,bh) = { | |
340 | 340 | let aU = toBase58String(aI.transactionId) | |
341 | 341 | let am = aI.caller.bytes | |
342 | 342 | let T = fromBase58String(h) | |
343 | 343 | let bi = aI.payments[0].amount | |
344 | 344 | let bj = getStringValue(this, (bg + "_highest_bid")) | |
345 | 345 | let bk = getString(this, (bg + "_previous_bidder")) | |
346 | 346 | let bl = getStringValue(this, (bg + "_bidder_count")) | |
347 | 347 | let bm = getStringValue(this, (bg + "_winner_of_nft")) | |
348 | 348 | let bf = getStringValue(this, ((bg + "_nft_status_") + aK)) | |
349 | 349 | if ((aI.payments[0].assetId != unit)) | |
350 | 350 | then throw("Pay in waves") | |
351 | 351 | else if ((bf != "OPEN")) | |
352 | 352 | then throw("Not open for auction") | |
353 | 353 | else if ((parseIntValue(bj) >= bi)) | |
354 | 354 | then throw("Bid is less then starting/highest Bid") | |
355 | - | else [StringEntry((bg + "_highest_bid"), toString(bi))] | |
355 | + | else [StringEntry((bg + "_highest_bid"), toString(bi)), StringEntry((bg + "_winner"), toBase58String(aI.caller.bytes))] | |
356 | 356 | } | |
357 | 357 | ||
358 | 358 | ||
359 | 359 | ||
360 | 360 | @Callable(aI) | |
361 | 361 | func acceptBidOffer (h,bn,bo) = { | |
362 | 362 | let am = aI.caller.bytes | |
363 | 363 | let T = fromBase58String(h) | |
364 | 364 | let bp = fromBase58String(bn) | |
365 | 365 | [ScriptTransfer(Address(aI.caller.bytes), bo, unit), ScriptTransfer(Address(bp), 1, T), StringEntry(((toBase58String(T) + "_rewarded_to_") + bn), bn), StringEntry(("nft_transfer_status_from" + toBase58String(am)), aG._3), StringEntry(((("nft_transfer_status_" + h) + "_transfer_to_") + bn), bn), DeleteEntry((((toBase58String(T) + a) + "nft_status_") + toBase58String(am)))] | |
366 | 366 | } | |
367 | 367 | ||
368 | 368 | ||
369 | 369 | ||
370 | 370 | @Callable(aI) | |
371 | 371 | func testBid (bq) = [StringEntry("bid", bq)] | |
372 | 372 | ||
373 | 373 |
github/deemru/w8io/026f985 44.32 ms ◑