tx · 9wZRxJJs8sKk8MtLPUGqNTbW3aVKVzGecNjXqkPMqECN 3N2eA4yzXa4wTj7pP8r6G144RRxZW7cmq4p: -0.01500000 Waves 2022.11.30 07:18 [2339357] smart account 3N2eA4yzXa4wTj7pP8r6G144RRxZW7cmq4p > SELF 0.00000000 Waves
{ "type": 13, "id": "9wZRxJJs8sKk8MtLPUGqNTbW3aVKVzGecNjXqkPMqECN", "fee": 1500000, "feeAssetId": null, "timestamp": 1669781909424, "version": 2, "chainId": 84, "sender": "3N2eA4yzXa4wTj7pP8r6G144RRxZW7cmq4p", "senderPublicKey": "Hh3eFP2XFetZSfTxQiM1Ps96f68zi8Zh5ghhCZdjgdFs", "proofs": [ "4wZokJWFBhKtmdsFYZXWMtjPSyvB5qGTeSPjcB3mnq3efdLoKVF67ak66aDq7zS78HUvCPFETiktx3iPwdrfiaGG" ], "script": "base64:BgI5CAISBAoCCAgSBAoCBAgSBAoCAQgSBQoDCAEIEgMKAQgSAwoBCBIDCgEIEgUKAwgICBIGCgQICAgINAEJZ2V0U3RyQnlLAQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgAACHVuaXRUZXN0BwAJb3JhY2xlRmVlCQEFdmFsdWUBCQCmCAEJAQlnZXRTdHJCeUsBAg9jb25mX29yYWNsZV9mZWUAC2ZlZVJlY2VpdmVyCQEJZ2V0U3RyQnlLAQIRY29uZl9mZWVfcmVjZWl2ZXIADGFydHdvcmtzRGFwcAkBBXZhbHVlAQkApggBCQEJZ2V0U3RyQnlLAQISY29uZl9hcnR3b3Jrc19kYXBwAAh1c2VyRGFwcAMFCHVuaXRUZXN0CQEFdmFsdWUBCQCmCAECIzNNdDRSR01FeWpTV1lBb2NUUHFkNTV3ZEhRUUIzUFUyVUNtCQEFdmFsdWUBCQCmCAEJAQlnZXRTdHJCeUsBAg9jb25mX3VzZXJzX2RhcHAAC3NpZ25Bc3NldElkCQDZBAEJAQlnZXRTdHJCeUsBAhhjb25mX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NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQUGY2FsbGVyCQENcGFyc2VJbnRWYWx1ZQEJAJEDAgUKYmlkRGF0YUFycgABBQdhc3NldElkBQNuaWwA0jx8rg==", "height": 2339357, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5Lcsh7p6YFtDxz5fktwyXHhWZqkXsW9NVQVSofdENWbR Next: 8XJcRSSKPzAJGhVTbMxdopfJM3XvLhLDgBEqCyjNq8hJ Diff:
Old | New | Differences | |
---|---|---|---|
196 | 196 | ||
197 | 197 | func au (Z,ae,ah,M,P,D,E) = { | |
198 | 198 | let av = x(C(M, E)) | |
199 | - | if (true) | |
200 | - | then throw(((((C(M, ah) + " / ") + toString(Z)) + " / ") + toString(av))) | |
201 | - | else { | |
202 | - | let aw = valueOrElse(getString(g, T(M)), e) | |
203 | - | let ax = valueOrElse(getInteger(g, U(M)), 0) | |
204 | - | let ay = fraction(Z, m, 100) | |
205 | - | let az = fraction(Z, av, 10000) | |
206 | - | let aA = (Z - (ay + az)) | |
207 | - | let aB = if (if ((aw != e)) | |
208 | - | then (ax > 0) | |
209 | - | else false) | |
210 | - | then fraction(Z, ax, 100) | |
211 | - | else 0 | |
212 | - | let aC = if ((aB != 0)) | |
213 | - | then [ScriptTransfer(Address(fromBase58String(e)), (ay - aB), ae), ScriptTransfer(Address(fromBase58String(aw)), aB, ae)] | |
214 | - | else [ScriptTransfer(Address(fromBase58String(e)), ay, ae)] | |
215 | - | let aD = ScriptTransfer(Address(fromBase58String(M)), az, ae) | |
216 | - | let aE = ScriptTransfer(Address(fromBase58String(P)), aA, ae) | |
217 | - | let aF = ScriptTransfer(Address(fromBase58String(D)), 1, fromBase58String(ah)) | |
218 | - | $Tuple4(aC, aD, aE, aF) | |
219 | - | } | |
199 | + | let aw = valueOrElse(getString(g, T(M)), e) | |
200 | + | let ax = valueOrElse(getInteger(g, U(M)), 0) | |
201 | + | let ay = fraction(Z, m, 100) | |
202 | + | let az = fraction(Z, av, 10000) | |
203 | + | let aA = (Z - (ay + az)) | |
204 | + | let aB = if (if ((aw != e)) | |
205 | + | then (ax > 0) | |
206 | + | else false) | |
207 | + | then fraction(Z, ax, 100) | |
208 | + | else 0 | |
209 | + | let aC = if ((aB != 0)) | |
210 | + | then [ScriptTransfer(Address(fromBase58String(e)), (ay - aB), ae), ScriptTransfer(Address(fromBase58String(aw)), aB, ae)] | |
211 | + | else [ScriptTransfer(Address(fromBase58String(e)), ay, ae)] | |
212 | + | let aD = ScriptTransfer(Address(fromBase58String(M)), az, ae) | |
213 | + | let aE = ScriptTransfer(Address(fromBase58String(P)), aA, ae) | |
214 | + | let aF = ScriptTransfer(Address(fromBase58String(D)), 1, fromBase58String(ah)) | |
215 | + | $Tuple4(aC, aD, aE, aF) | |
220 | 216 | } | |
221 | 217 | ||
222 | 218 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = valueOrElse(getString(this, b), "") | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | let c = false | |
8 | 8 | ||
9 | 9 | let d = value(addressFromString(a("conf_oracle_fee"))) | |
10 | 10 | ||
11 | 11 | let e = a("conf_fee_receiver") | |
12 | 12 | ||
13 | 13 | let f = value(addressFromString(a("conf_artworks_dapp"))) | |
14 | 14 | ||
15 | 15 | let g = if (c) | |
16 | 16 | then value(addressFromString("3Mt4RGMEyjSWYAocTPqd55wdHQQB3PU2UCm")) | |
17 | 17 | else value(addressFromString(a("conf_users_dapp"))) | |
18 | 18 | ||
19 | 19 | let h = fromBase58String(a("conf_accepted_asset_SIGN")) | |
20 | 20 | ||
21 | 21 | let i = fromBase58String(a("conf_accepted_asset_USDN")) | |
22 | 22 | ||
23 | 23 | let j = fromBase58String(a("conf_accepted_asset_USDT")) | |
24 | 24 | ||
25 | 25 | let k = base58'' | |
26 | 26 | ||
27 | 27 | let l = a("conf_admin_1") | |
28 | 28 | ||
29 | 29 | let m = 3 | |
30 | 30 | ||
31 | 31 | let n = "SUSPENDED" | |
32 | 32 | ||
33 | 33 | let o = "REMOVED" | |
34 | 34 | ||
35 | 35 | let p = "ILLEGAL" | |
36 | 36 | ||
37 | 37 | let q = "SUSPENDED" | |
38 | 38 | ||
39 | 39 | let r = "conf_dapp_is_running" | |
40 | 40 | ||
41 | 41 | let s = "conf_maintenance_msg" | |
42 | 42 | ||
43 | 43 | let t = valueOrElse(getBoolean(this, r), true) | |
44 | 44 | ||
45 | 45 | let u = valueOrElse(getString(this, s), "") | |
46 | 46 | ||
47 | 47 | let v = "num_sales" | |
48 | 48 | ||
49 | 49 | func w (b) = valueOrElse(getString(g, b), "Error") | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func x (b) = valueOrElse(getInteger(f, b), 1000) | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func y (b) = valueOrElse(getString(f, b), "") | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func z (b) = valueOrElse(getInteger(this, b), 0) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func A (B) = ("user_status_" + B) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func C (D,E) = ((("art_royalties_" + E) + "_") + D) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func F (G,E) = ((("art_signid_" + E) + "_") + G) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func H (G,E) = ((("art_flag_" + E) + "_") + G) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func I (J) = ("nft_" + J) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func K (D,L,E,M) = ((((((("sale2nd_info_" + D) + "_") + L) + "_") + E) + "_") + M) | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func N (O,L,P,Q) = ((((((("offer2nd_" + O) + "_") + L) + "_") + P) + "_") + Q) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func R (b) = valueOrErrorMessage(getInteger(d, b), "Integer undefine or 0 in oracle") | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | let S = R(("certification_fee_" + toBase58String(h))) | |
86 | 86 | ||
87 | 87 | func T (G) = ("artist_agent_" + G) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func U (G) = ("artist_agent_secondary_" + G) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func V (W) = if (!(t)) | |
94 | 94 | then throw(u) | |
95 | 95 | else $Tuple3(toBase58String(W.transactionId), toBase58String(W.caller.bytes), lastBlock.timestamp) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func X (W) = if ((size(W.payments) == 0)) | |
99 | 99 | then throw("No payment attached") | |
100 | 100 | else { | |
101 | 101 | let Y = value(W.payments[0]) | |
102 | 102 | let Z = value(Y.amount) | |
103 | 103 | $Tuple2(Y, Z) | |
104 | 104 | } | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func aa (ab) = if (if (if ((ab.quantity == 1)) | |
108 | 108 | then (ab.decimals == 0) | |
109 | 109 | else false) | |
110 | 110 | then (ab.reissuable == false) | |
111 | 111 | else false) | |
112 | 112 | then (ab.issuer == f) | |
113 | 113 | else false | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func ac (J) = { | |
117 | 117 | let ab = value(assetInfo(J)) | |
118 | 118 | aa(ab) | |
119 | 119 | } | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func ad (ae) = if (if (if (if (if ((ae != toBase58String(h))) | |
123 | 123 | then (ae != toBase58String(k)) | |
124 | 124 | else false) | |
125 | 125 | then (ae != "WAVES") | |
126 | 126 | else false) | |
127 | 127 | then (ae != toBase58String(i)) | |
128 | 128 | else false) | |
129 | 129 | then (ae != toBase58String(j)) | |
130 | 130 | else false) | |
131 | 131 | then false | |
132 | 132 | else true | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func af (ae) = if ((ae == "WAVES")) | |
136 | 136 | then unit | |
137 | 137 | else fromBase58String(ae) | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func ag (ah) = { | |
141 | 141 | let P = a(("current_owner_on_dapp_" + ah)) | |
142 | 142 | if ((size(P) == 0)) | |
143 | 143 | then throw("NFT not found") | |
144 | 144 | else { | |
145 | 145 | let ai = a(((("sale2nd_status_" + P) + "_") + ah)) | |
146 | 146 | if ((ai != "OPEN")) | |
147 | 147 | then throw("NFT not for sale") | |
148 | 148 | else P | |
149 | 149 | } | |
150 | 150 | } | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func aj (b) = { | |
154 | 154 | let ak = a((b + "_OPEN")) | |
155 | 155 | if ((ak == "")) | |
156 | 156 | then throw("Offer not found") | |
157 | 157 | else { | |
158 | 158 | let al = split(ak, "_") | |
159 | 159 | let ae = af(al[2]) | |
160 | 160 | $Tuple3(al, ae, ak) | |
161 | 161 | } | |
162 | 162 | } | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func am (an) = if ((an != p)) | |
166 | 166 | then (an != q) | |
167 | 167 | else false | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | func ao (B,J) = { | |
171 | 171 | let an = y(H(B, J)) | |
172 | 172 | if (am(an)) | |
173 | 173 | then true | |
174 | 174 | else throw(("Original Artwork flagged as " + an)) | |
175 | 175 | } | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func ap (B) = { | |
179 | 179 | let aq = w(A(B)) | |
180 | 180 | if (containsElement([n, o], aq)) | |
181 | 181 | then throw(("Original Artist " + aq)) | |
182 | 182 | else true | |
183 | 183 | } | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | func ar (ae) = { | |
187 | 187 | let as = split(y(I(ae)), "_") | |
188 | 188 | let at = y(F(as[6], as[5])) | |
189 | 189 | if (if (!(ao(as[6], as[5]))) | |
190 | 190 | then !(ap(as[6])) | |
191 | 191 | else false) | |
192 | 192 | then $Tuple4(false, as[5], as[6], at) | |
193 | 193 | else $Tuple4(true, as[5], as[6], at) | |
194 | 194 | } | |
195 | 195 | ||
196 | 196 | ||
197 | 197 | func au (Z,ae,ah,M,P,D,E) = { | |
198 | 198 | let av = x(C(M, E)) | |
199 | - | if (true) | |
200 | - | then throw(((((C(M, ah) + " / ") + toString(Z)) + " / ") + toString(av))) | |
201 | - | else { | |
202 | - | let aw = valueOrElse(getString(g, T(M)), e) | |
203 | - | let ax = valueOrElse(getInteger(g, U(M)), 0) | |
204 | - | let ay = fraction(Z, m, 100) | |
205 | - | let az = fraction(Z, av, 10000) | |
206 | - | let aA = (Z - (ay + az)) | |
207 | - | let aB = if (if ((aw != e)) | |
208 | - | then (ax > 0) | |
209 | - | else false) | |
210 | - | then fraction(Z, ax, 100) | |
211 | - | else 0 | |
212 | - | let aC = if ((aB != 0)) | |
213 | - | then [ScriptTransfer(Address(fromBase58String(e)), (ay - aB), ae), ScriptTransfer(Address(fromBase58String(aw)), aB, ae)] | |
214 | - | else [ScriptTransfer(Address(fromBase58String(e)), ay, ae)] | |
215 | - | let aD = ScriptTransfer(Address(fromBase58String(M)), az, ae) | |
216 | - | let aE = ScriptTransfer(Address(fromBase58String(P)), aA, ae) | |
217 | - | let aF = ScriptTransfer(Address(fromBase58String(D)), 1, fromBase58String(ah)) | |
218 | - | $Tuple4(aC, aD, aE, aF) | |
219 | - | } | |
199 | + | let aw = valueOrElse(getString(g, T(M)), e) | |
200 | + | let ax = valueOrElse(getInteger(g, U(M)), 0) | |
201 | + | let ay = fraction(Z, m, 100) | |
202 | + | let az = fraction(Z, av, 10000) | |
203 | + | let aA = (Z - (ay + az)) | |
204 | + | let aB = if (if ((aw != e)) | |
205 | + | then (ax > 0) | |
206 | + | else false) | |
207 | + | then fraction(Z, ax, 100) | |
208 | + | else 0 | |
209 | + | let aC = if ((aB != 0)) | |
210 | + | then [ScriptTransfer(Address(fromBase58String(e)), (ay - aB), ae), ScriptTransfer(Address(fromBase58String(aw)), aB, ae)] | |
211 | + | else [ScriptTransfer(Address(fromBase58String(e)), ay, ae)] | |
212 | + | let aD = ScriptTransfer(Address(fromBase58String(M)), az, ae) | |
213 | + | let aE = ScriptTransfer(Address(fromBase58String(P)), aA, ae) | |
214 | + | let aF = ScriptTransfer(Address(fromBase58String(D)), 1, fromBase58String(ah)) | |
215 | + | $Tuple4(aC, aD, aE, aF) | |
220 | 216 | } | |
221 | 217 | ||
222 | 218 | ||
223 | 219 | func aG (ae,aH) = { | |
224 | 220 | let aI = if (c) | |
225 | 221 | then 10 | |
226 | 222 | else R("waves_min_sell") | |
227 | 223 | let aJ = 1000000 | |
228 | 224 | let aK = if (c) | |
229 | 225 | then 1 | |
230 | 226 | else (S * 2) | |
231 | 227 | if (if (if (if (if (if ((ae == toBase58String(i))) | |
232 | 228 | then (aJ > aH) | |
233 | 229 | else false) | |
234 | 230 | then (aH != 0) | |
235 | 231 | else false) | |
236 | 232 | then true | |
237 | 233 | else if (if ((ae == toBase58String(j))) | |
238 | 234 | then (aJ > aH) | |
239 | 235 | else false) | |
240 | 236 | then (aH != 0) | |
241 | 237 | else false) | |
242 | 238 | then true | |
243 | 239 | else if (if ((ae == toBase58String(h))) | |
244 | 240 | then (aK > aH) | |
245 | 241 | else false) | |
246 | 242 | then (aH != 0) | |
247 | 243 | else false) | |
248 | 244 | then true | |
249 | 245 | else if (if (if ((ae == toBase58String(k))) | |
250 | 246 | then true | |
251 | 247 | else (ae == "WAVES")) | |
252 | 248 | then (aI > aH) | |
253 | 249 | else false) | |
254 | 250 | then (aH != 0) | |
255 | 251 | else false) | |
256 | 252 | then false | |
257 | 253 | else true | |
258 | 254 | } | |
259 | 255 | ||
260 | 256 | ||
261 | 257 | func aL (W,L) = { | |
262 | 258 | let aM = V(W) | |
263 | 259 | let J = aM._1 | |
264 | 260 | let D = aM._2 | |
265 | 261 | let aN = aM._3 | |
266 | 262 | let aO = ar(L) | |
267 | 263 | let aP = aO._1 | |
268 | 264 | let E = aO._2 | |
269 | 265 | let M = aO._3 | |
270 | 266 | let at = aO._4 | |
271 | 267 | $Tuple7(J, D, aN, aP, E, M, at) | |
272 | 268 | } | |
273 | 269 | ||
274 | 270 | ||
275 | 271 | func aQ () = { | |
276 | 272 | let aR = z(v) | |
277 | 273 | IntegerEntry(v, (aR + 1)) | |
278 | 274 | } | |
279 | 275 | ||
280 | 276 | ||
281 | 277 | @Callable(aS) | |
282 | 278 | func setConf (b,aT) = { | |
283 | 279 | let D = toString(aS.caller) | |
284 | 280 | if (containsElement([l, toString(this)], D)) | |
285 | 281 | then if (contains(b, "conf_")) | |
286 | 282 | then [StringEntry(b, aT)] | |
287 | 283 | else throw("Entries starting with conf_ only") | |
288 | 284 | else throw("You are not allowed to change this") | |
289 | 285 | } | |
290 | 286 | ||
291 | 287 | ||
292 | 288 | ||
293 | 289 | @Callable(aS) | |
294 | 290 | func appRunning (aU,aV) = { | |
295 | 291 | let D = toString(aS.caller) | |
296 | 292 | let J = toBase58String(aS.transactionId) | |
297 | 293 | if (containsElement([l, toString(this)], D)) | |
298 | 294 | then [BooleanEntry(r, aU), StringEntry(s, aV)] | |
299 | 295 | else throw("You are not allowed to change this") | |
300 | 296 | } | |
301 | 297 | ||
302 | 298 | ||
303 | 299 | ||
304 | 300 | @Callable(W) | |
305 | 301 | func sellNFT (aH,aW) = { | |
306 | 302 | let aX = X(W) | |
307 | 303 | let Y = aX._1 | |
308 | 304 | let Z = aX._2 | |
309 | 305 | if ((Z != 1)) | |
310 | 306 | then throw("No NFT attached") | |
311 | 307 | else { | |
312 | 308 | let L = if (if (isDefined(Y.assetId)) | |
313 | 309 | then ac(value(Y.assetId)) | |
314 | 310 | else false) | |
315 | 311 | then toBase58String(value(Y.assetId)) | |
316 | 312 | else throw("Only SIGN Art NFT accepted.") | |
317 | 313 | let aY = aL(W, L) | |
318 | 314 | let J = aY._1 | |
319 | 315 | let D = aY._2 | |
320 | 316 | let aN = aY._3 | |
321 | 317 | let aP = aY._4 | |
322 | 318 | let E = aY._5 | |
323 | 319 | let M = aY._6 | |
324 | 320 | let at = aY._7 | |
325 | 321 | if ((size(at) == 0)) | |
326 | 322 | then throw("Artwork not found on SIGN Art") | |
327 | 323 | else if (!(aP)) | |
328 | 324 | then throw("Not a valid nft") | |
329 | 325 | else if (!(ad(aW))) | |
330 | 326 | then throw("Only SIGN, USDN, USDT or WAVES accepted") | |
331 | 327 | else if (!(aG(aW, aH))) | |
332 | 328 | then throw("Wrong minimum sell price") | |
333 | 329 | else [StringEntry((K(D, L, E, M) + "_OPEN"), ((((((((((((toString(aN) + "_") + toString(aH)) + "_") + aW) + "_") + L) + "_") + E) + "_") + M) + "_") + J)), StringEntry(((("sale2nd_status_" + D) + "_") + L), "OPEN"), StringEntry(("current_owner_on_dapp_" + L), D)] | |
334 | 330 | } | |
335 | 331 | } | |
336 | 332 | ||
337 | 333 | ||
338 | 334 | ||
339 | 335 | @Callable(W) | |
340 | 336 | func updateSalePrice (L,aH,aW) = { | |
341 | 337 | let aZ = aL(W, L) | |
342 | 338 | let J = aZ._1 | |
343 | 339 | let D = aZ._2 | |
344 | 340 | let aN = aZ._3 | |
345 | 341 | let aP = aZ._4 | |
346 | 342 | let E = aZ._5 | |
347 | 343 | let M = aZ._6 | |
348 | 344 | let at = aZ._7 | |
349 | 345 | if ((size(at) == 0)) | |
350 | 346 | then throw("Artwork not found on SIGN Art, cancel your sale.") | |
351 | 347 | else if (!(aP)) | |
352 | 348 | then throw("Not a valid nft") | |
353 | 349 | else { | |
354 | 350 | let P = a(("current_owner_on_dapp_" + L)) | |
355 | 351 | if ((P != D)) | |
356 | 352 | then throw("You don't own this NFT") | |
357 | 353 | else { | |
358 | 354 | let ai = a(((("sale2nd_status_" + D) + "_") + L)) | |
359 | 355 | if ((ai != "OPEN")) | |
360 | 356 | then throw("Sale not active") | |
361 | 357 | else if (!(ad(aW))) | |
362 | 358 | then throw("Only SIGN, USDN, USDT or WAVES accepted") | |
363 | 359 | else if (!(aG(aW, aH))) | |
364 | 360 | then throw("Wrong minimum sell price") | |
365 | 361 | else { | |
366 | 362 | let ba = K(D, L, E, M) | |
367 | 363 | let bb = split(a((ba + "_OPEN")), "_") | |
368 | 364 | [StringEntry((ba + "_OPEN"), ((((((((((((bb[0] + "_") + toString(aH)) + "_") + aW) + "_") + bb[3]) + "_") + bb[4]) + "_") + bb[5]) + "_") + bb[6]))] | |
369 | 365 | } | |
370 | 366 | } | |
371 | 367 | } | |
372 | 368 | } | |
373 | 369 | ||
374 | 370 | ||
375 | 371 | ||
376 | 372 | @Callable(W) | |
377 | 373 | func cancelSale (L) = { | |
378 | 374 | let bc = aL(W, L) | |
379 | 375 | let J = bc._1 | |
380 | 376 | let D = bc._2 | |
381 | 377 | let aN = bc._3 | |
382 | 378 | let aP = bc._4 | |
383 | 379 | let E = bc._5 | |
384 | 380 | let M = bc._6 | |
385 | 381 | let at = bc._7 | |
386 | 382 | let P = a(("current_owner_on_dapp_" + L)) | |
387 | 383 | if ((P != D)) | |
388 | 384 | then throw("You don't own this NFT") | |
389 | 385 | else { | |
390 | 386 | let ai = a(((("sale2nd_status_" + D) + "_") + L)) | |
391 | 387 | if ((ai != "OPEN")) | |
392 | 388 | then throw("Sale not active") | |
393 | 389 | else { | |
394 | 390 | let ba = K(D, L, E, M) | |
395 | 391 | let bb = a((ba + "_OPEN")) | |
396 | 392 | [DeleteEntry((ba + "_OPEN")), DeleteEntry(((("sale2nd_status_" + D) + "_") + L)), DeleteEntry(("current_owner_on_dapp_" + L)), StringEntry((((ba + "_") + J) + "_CANCELLED"), ((((bb + "_CANCELLED_") + toString(aN)) + "_") + J)), ScriptTransfer(Address(fromBase58String(D)), 1, fromBase58String(L))] | |
397 | 393 | } | |
398 | 394 | } | |
399 | 395 | } | |
400 | 396 | ||
401 | 397 | ||
402 | 398 | ||
403 | 399 | @Callable(W) | |
404 | 400 | func buyNFT (L) = { | |
405 | 401 | let bd = aL(W, L) | |
406 | 402 | let J = bd._1 | |
407 | 403 | let D = bd._2 | |
408 | 404 | let aN = bd._3 | |
409 | 405 | let aP = bd._4 | |
410 | 406 | let E = bd._5 | |
411 | 407 | let M = bd._6 | |
412 | 408 | let at = bd._7 | |
413 | 409 | if ((size(at) == 0)) | |
414 | 410 | then throw("Artwork not found on SIGN Art, cancel your sale.") | |
415 | 411 | else if (!(aP)) | |
416 | 412 | then throw("Not a valid nft") | |
417 | 413 | else { | |
418 | 414 | let P = ag(L) | |
419 | 415 | let ba = K(P, L, E, M) | |
420 | 416 | let bb = a((ba + "_OPEN")) | |
421 | 417 | if ((size(bb) == 0)) | |
422 | 418 | then throw("Sale Not found!") | |
423 | 419 | else { | |
424 | 420 | let be = split(bb, "_") | |
425 | 421 | if ((parseInt(be[1]) == 0)) | |
426 | 422 | then throw("Offer only") | |
427 | 423 | else { | |
428 | 424 | let bf = X(W) | |
429 | 425 | let Y = bf._1 | |
430 | 426 | let Z = bf._2 | |
431 | 427 | let bg = if (isDefined(Y.assetId)) | |
432 | 428 | then toBase58String(value(Y.assetId)) | |
433 | 429 | else "" | |
434 | 430 | if (if ((be[1] != toString(Z))) | |
435 | 431 | then true | |
436 | 432 | else (be[2] != bg)) | |
437 | 433 | then throw("Payment infos don't match.") | |
438 | 434 | else { | |
439 | 435 | let bh = au(Z, Y.assetId, L, M, P, D, E) | |
440 | 436 | let aC = bh._1 | |
441 | 437 | let aD = bh._2 | |
442 | 438 | let aE = bh._3 | |
443 | 439 | let aF = bh._4 | |
444 | 440 | ([DeleteEntry((ba + "_OPEN")), DeleteEntry(((("sale2nd_status_" + P) + "_") + L)), DeleteEntry(("current_owner_on_dapp_" + L)), StringEntry((((ba + "_") + J) + "_CLOSED"), ((((((bb + "_CLOSED_") + toString(aN)) + "_") + J) + "_") + D)), aQ(), aD, aE, aF] ++ aC) | |
445 | 441 | } | |
446 | 442 | } | |
447 | 443 | } | |
448 | 444 | } | |
449 | 445 | } | |
450 | 446 | ||
451 | 447 | ||
452 | 448 | ||
453 | 449 | @Callable(W) | |
454 | 450 | func setOffer (L) = { | |
455 | 451 | let bi = aL(W, L) | |
456 | 452 | let J = bi._1 | |
457 | 453 | let O = bi._2 | |
458 | 454 | let aN = bi._3 | |
459 | 455 | let aP = bi._4 | |
460 | 456 | let E = bi._5 | |
461 | 457 | let M = bi._6 | |
462 | 458 | let at = bi._7 | |
463 | 459 | if (!(aP)) | |
464 | 460 | then throw("Not a valid nft") | |
465 | 461 | else { | |
466 | 462 | let bj = X(W) | |
467 | 463 | let Y = bj._1 | |
468 | 464 | let Z = bj._2 | |
469 | 465 | let ae = if (!(isDefined(Y.assetId))) | |
470 | 466 | then "WAVES" | |
471 | 467 | else toBase58String(value(Y.assetId)) | |
472 | 468 | if (!(ad(ae))) | |
473 | 469 | then throw("asset not accepted") | |
474 | 470 | else if ((Z == 0)) | |
475 | 471 | then throw("Offer of 0 not allowed") | |
476 | 472 | else if (!(aG(ae, Z))) | |
477 | 473 | then throw("Wrong minimum sell price") | |
478 | 474 | else { | |
479 | 475 | let P = ag(L) | |
480 | 476 | [StringEntry((N(O, L, P, J) + "_OPEN"), ((((((((((((((toString(aN) + "_") + toString(Z)) + "_") + ae) + "_") + L) + "_") + E) + "_") + M) + "_") + O) + "_") + J))] | |
481 | 477 | } | |
482 | 478 | } | |
483 | 479 | } | |
484 | 480 | ||
485 | 481 | ||
486 | 482 | ||
487 | 483 | @Callable(W) | |
488 | 484 | func acceptOffer (L,Q,O) = { | |
489 | 485 | let bk = aL(W, L) | |
490 | 486 | let J = bk._1 | |
491 | 487 | let D = bk._2 | |
492 | 488 | let aN = bk._3 | |
493 | 489 | let aP = bk._4 | |
494 | 490 | let E = bk._5 | |
495 | 491 | let M = bk._6 | |
496 | 492 | let at = bk._7 | |
497 | 493 | if (!(aP)) | |
498 | 494 | then throw("Not a valid nft") | |
499 | 495 | else { | |
500 | 496 | let P = ag(L) | |
501 | 497 | if ((D != P)) | |
502 | 498 | then throw("Only sale owner can accept offer") | |
503 | 499 | else { | |
504 | 500 | let bl = N(O, L, P, Q) | |
505 | 501 | let bm = aj(bl) | |
506 | 502 | let al = bm._1 | |
507 | 503 | let ae = bm._2 | |
508 | 504 | let ak = bm._3 | |
509 | 505 | let ba = K(P, L, E, M) | |
510 | 506 | let bb = a((ba + "_OPEN")) | |
511 | 507 | if ((size(bb) == 0)) | |
512 | 508 | then throw("Sale Not found!") | |
513 | 509 | else { | |
514 | 510 | let Z = value(parseInt(al[1])) | |
515 | 511 | let bn = au(Z, ae, L, M, P, al[6], E) | |
516 | 512 | let aC = bn._1 | |
517 | 513 | let aD = bn._2 | |
518 | 514 | let aE = bn._3 | |
519 | 515 | let aF = bn._4 | |
520 | 516 | let bo = if (isDefined(ae)) | |
521 | 517 | then toBase58String(value(ae)) | |
522 | 518 | else "WAVES" | |
523 | 519 | ([DeleteEntry((ba + "_OPEN")), DeleteEntry((bl + "_OPEN")), DeleteEntry(((("sale2nd_status_" + P) + "_") + L)), DeleteEntry(("current_owner_on_dapp_" + L)), StringEntry((bl + "_CLOSED"), ((((ak + "_CLOSED_") + toString(aN)) + "_") + J)), StringEntry((((ba + "_") + J) + "_CLOSED"), ((((((((((bb + "_CLOSED-OFFER_") + toString(aN)) + "_") + J) + "_") + O) + "_") + toString(Z)) + "_") + bo)), aQ(), aD, aE, aF] ++ aC) | |
524 | 520 | } | |
525 | 521 | } | |
526 | 522 | } | |
527 | 523 | } | |
528 | 524 | ||
529 | 525 | ||
530 | 526 | ||
531 | 527 | @Callable(W) | |
532 | 528 | func cancelOffer (L,Q,O,P) = { | |
533 | 529 | let bp = V(W) | |
534 | 530 | let J = bp._1 | |
535 | 531 | let D = bp._2 | |
536 | 532 | let aN = bp._3 | |
537 | 533 | if (if ((D != O)) | |
538 | 534 | then (D != P) | |
539 | 535 | else false) | |
540 | 536 | then throw("You cannot cancel this offer.") | |
541 | 537 | else { | |
542 | 538 | let bl = N(O, L, P, Q) | |
543 | 539 | let bq = aj(bl) | |
544 | 540 | let al = bq._1 | |
545 | 541 | let ae = bq._2 | |
546 | 542 | let ak = bq._3 | |
547 | 543 | [DeleteEntry((bl + "_OPEN")), StringEntry((bl + "_CANCELLED"), ((((ak + "_CANCELLED_") + toString(aN)) + "_") + J)), ScriptTransfer(Address(fromBase58String(D)), parseIntValue(al[1]), ae)] | |
548 | 544 | } | |
549 | 545 | } | |
550 | 546 | ||
551 | 547 |
github/deemru/w8io/026f985 63.60 ms ◑