tx · G1MuvMVT8JoFXfs9GkhPY4W3sJBigK4g5BBKtTxa7iLC 3NBwZbvD45CscLGF78qTaDRBZ7mDBHt3Yib: -0.00900000 Waves 2022.08.20 12:37 [2192620] smart account 3NBwZbvD45CscLGF78qTaDRBZ7mDBHt3Yib > SELF 0.00000000 Waves
{ "type": 13, "id": "G1MuvMVT8JoFXfs9GkhPY4W3sJBigK4g5BBKtTxa7iLC", "fee": 900000, "feeAssetId": null, "timestamp": 1660988293474, "version": 2, "chainId": 84, "sender": "3NBwZbvD45CscLGF78qTaDRBZ7mDBHt3Yib", "senderPublicKey": "3q3N8Kv49DbzNHyTB4A87UYz2DdquXCgP3GNCcD9Zj66", "proofs": [ "FpY83t139okrkNN3S6TAAPwAWGjmRPDT3FRo5Lb92GngtNs3FSzoU1ebyaqWJ9MSQ1SwzNs1Y3z9GAMBiDF2j6u" ], "script": "base64:BgI3CAISCgoICAgICAgBCAgSBAoCCAgSBAoCCAESBAoCCAgSBAoCCAgSBAoCCAgSBAoCBAgSAwoBCDUAB3ZlcnNpb24CAzEuMAALQ09ORl9JTklUX0sCC2NvbmZpZ19pbml0AAtDT05GX0FNSU5fSwIMY29uZmlnX2FkbWluAA1DT05GX09SQUNMRV9LAg1jb25maWdfb3JhY2xlABNDT05GX0FSVFdPUktfREFQUF9LAhNjb25maWdfYXJ0d29ya19kYXBwABFDT05GX1VTRVJTX0RBUFBfSwIRY29uZmlnX3VzZXJzX2RhcHAAEENPTkZfRkVFX0FTU0VUX0sCEGNvbmZpZ19mZWVfYXNzZXQAEUNPTkZfRkVFX0FNT1VOVF9LAhFjb25maWdfZmVlX2Ftb3VudAAVQ09ORl9TV09QX1NJR05fREFQUF9LAhVjb25maWdfc3dvcF9zaWduX2RhcHAAFENPTkZfU1dPUF9FVEhfREFQUF9LAhRjb25maWdfc3dvcF9ldGhfZGFwcAAOZGFwcFJ1bm5pbmdLZXkCFGNvbmZfZGFwcF9pc19ydW5uaW5nABFtYWludGVuYW5jZU1TR0tle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WVudHJ5AwkBCW93bmVyT25seQEFAWkJAMwIAgkBC0RlbGV0ZUVudHJ5AQUFZW50cnkFA25pbAkAAgECAm5vAIuQ248=", "height": 2192620, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3gH8THxNKMtCmgJBNM3bAJx5Prwo7vgz4QETMUymaVRt Next: 4Pj6rF4A3wq8AbSABHpiF1gxAANVr8wETSkMjMwTBv8V Diff:
Old | New | Differences | |
---|---|---|---|
172 | 172 | else false | |
173 | 173 | ||
174 | 174 | ||
175 | + | func at (am) = if ((size(am) == 42)) | |
176 | + | then (take(am, 2) == "0x") | |
177 | + | else false | |
178 | + | ||
179 | + | ||
175 | 180 | @Callable(W) | |
176 | - | func init ( | |
181 | + | func init (au,L,J,K,av,aw,ax,ay) = if (ac(W)) | |
177 | 182 | then { | |
178 | - | let | |
179 | - | if (( | |
183 | + | let az = invoke(this, "setFee", [av, aw], nil) | |
184 | + | if ((az == az)) | |
180 | 185 | then { | |
181 | - | let | |
182 | - | if (( | |
183 | - | then [StringEntry(c, | |
186 | + | let aA = invoke(this, "setSwopDapps", [ax, ay], nil) | |
187 | + | if ((aA == aA)) | |
188 | + | then [StringEntry(c, au), StringEntry(d, L), StringEntry(e, J), StringEntry(f, K), BooleanEntry(b, true)] | |
184 | 189 | else throw("Strict value is not equal to itself.") | |
185 | 190 | } | |
186 | 191 | else throw("Strict value is not equal to itself.") | |
190 | 195 | ||
191 | 196 | ||
192 | 197 | @Callable(W) | |
193 | - | func setSwopDapps ( | |
194 | - | then [StringEntry(i, | |
198 | + | func setSwopDapps (ax,ay) = if (ac(W)) | |
199 | + | then [StringEntry(i, ax), StringEntry(j, ay)] | |
195 | 200 | else throw("Not allowed") | |
196 | 201 | ||
197 | 202 | ||
198 | 203 | ||
199 | 204 | @Callable(W) | |
200 | - | func setFee ( | |
201 | - | let S = assetInfo(fromBase58String( | |
202 | - | let | |
203 | - | let | |
205 | + | func setFee (av,aw) = { | |
206 | + | let S = assetInfo(fromBase58String(av)) | |
207 | + | let aB = value(S).decimals | |
208 | + | let aC = pow(aw, 0, 10, 1, aB, HALFUP) | |
204 | 209 | if (ac(W)) | |
205 | - | then [StringEntry(g, | |
210 | + | then [StringEntry(g, av), IntegerEntry(h, aC)] | |
206 | 211 | else throw("Not allowed") | |
207 | 212 | } | |
208 | 213 | ||
209 | 214 | ||
210 | 215 | ||
211 | 216 | @Callable(W) | |
212 | - | func lock ( | |
217 | + | func lock (aD,aE) = if (!(ab)) | |
213 | 218 | then throw("dApp not ready") | |
214 | - | else if (!(containsElement(x, | |
219 | + | else if (!(containsElement(x, aE))) | |
215 | 220 | then throw("Network not supported") | |
216 | - | else { | |
217 | - | let aE = af(W) | |
218 | - | let U = aE._1 | |
219 | - | let ad = aE._2 | |
220 | - | let aF = aE._3 | |
221 | - | let aG = V(W) | |
222 | - | let X = aG._1 | |
223 | - | let Y = aG._2 | |
224 | - | let Z = aG._3 | |
225 | - | let aa = aG._4 | |
226 | - | if ((Y != 1)) | |
227 | - | then throw("No NFT attached") | |
228 | - | else { | |
229 | - | let z = if (if (isDefined(X.assetId)) | |
230 | - | then T(value(X.assetId)) | |
231 | - | else false) | |
232 | - | then toBase58String(value(X.assetId)) | |
233 | - | else throw("Only SIGN Art NFT accepted.") | |
234 | - | let aH = ag(z) | |
235 | - | let aj = aH._1 | |
236 | - | let ak = aH._2 | |
237 | - | if (!(ar(ao(aj)))) | |
238 | - | then throw(("Creator status is :" + ao(aj))) | |
239 | - | else if (!(as(aq(ak, aj)))) | |
240 | - | then throw(("Artwork status is :" + aq(ak, aj))) | |
241 | - | else { | |
242 | - | let an = al(aj) | |
243 | - | if ((size(an) == 0)) | |
244 | - | then throw("This artist didn't allow crosschain transfer") | |
245 | - | else { | |
246 | - | let aI = E(y(z)) | |
247 | - | if (if ((aI == o)) | |
248 | - | then true | |
249 | - | else (aI == q)) | |
250 | - | then throw("NFT already locked") | |
251 | - | else { | |
252 | - | let aJ = Q(C) | |
253 | - | let aK = Q(D) | |
254 | - | let aL = if ((aI == p)) | |
255 | - | then true | |
256 | - | else false | |
257 | - | if (if (!(isDefined(Z.assetId))) | |
258 | - | then true | |
259 | - | else (toBase58String(value(Z.assetId)) != M)) | |
260 | - | then throw("Wrong payment asset") | |
261 | - | else if (if (aL) | |
262 | - | then (aa > (aK + N)) | |
263 | - | else false) | |
264 | - | then throw("Wrong payment amount to unlock") | |
265 | - | else if (if (!(aL)) | |
266 | - | then (aa > (aJ + N)) | |
221 | + | else if (!(at(aD))) | |
222 | + | then throw("Wrong recipient address") | |
223 | + | else { | |
224 | + | let aF = af(W) | |
225 | + | let U = aF._1 | |
226 | + | let ad = aF._2 | |
227 | + | let aG = aF._3 | |
228 | + | let aH = V(W) | |
229 | + | let X = aH._1 | |
230 | + | let Y = aH._2 | |
231 | + | let Z = aH._3 | |
232 | + | let aa = aH._4 | |
233 | + | if ((Y != 1)) | |
234 | + | then throw("No NFT attached") | |
235 | + | else { | |
236 | + | let z = if (if (isDefined(X.assetId)) | |
237 | + | then T(value(X.assetId)) | |
238 | + | else false) | |
239 | + | then toBase58String(value(X.assetId)) | |
240 | + | else throw("Only SIGN Art NFT accepted.") | |
241 | + | let aI = ag(z) | |
242 | + | let aj = aI._1 | |
243 | + | let ak = aI._2 | |
244 | + | if (!(ar(ao(aj)))) | |
245 | + | then throw(("Creator status is :" + ao(aj))) | |
246 | + | else if (!(as(aq(ak, aj)))) | |
247 | + | then throw(("Artwork status is :" + aq(ak, aj))) | |
248 | + | else { | |
249 | + | let an = al(aj) | |
250 | + | if ((size(an) == 0)) | |
251 | + | then throw("This artist didn't allow crosschain transfer") | |
252 | + | else { | |
253 | + | let aJ = E(y(z)) | |
254 | + | if (if ((aJ == o)) | |
255 | + | then true | |
256 | + | else (aJ == q)) | |
257 | + | then throw("NFT already locked") | |
258 | + | else { | |
259 | + | let aK = Q(C) | |
260 | + | let aL = Q(D) | |
261 | + | let aM = if ((aJ == p)) | |
262 | + | then true | |
263 | + | else false | |
264 | + | if (if (!(isDefined(Z.assetId))) | |
265 | + | then true | |
266 | + | else (toBase58String(value(Z.assetId)) != M)) | |
267 | + | then throw("Wrong payment asset") | |
268 | + | else if (if (aM) | |
269 | + | then (aa > (aL + N)) | |
267 | 270 | else false) | |
268 | - | then throw("Wrong payment amount to mint and unlock") | |
269 | - | else { | |
270 | - | let aM = if (aL) | |
271 | - | then aK | |
272 | - | else aJ | |
273 | - | let aN = invoke(addressFromStringValue(E(i)), "exchange", [1], [AttachedPayment(fromBase58String(M), N)]) | |
274 | - | if ((aN == aN)) | |
275 | - | then { | |
276 | - | let aO = invoke(addressFromStringValue(E(j)), "exchange", [1], [AttachedPayment(fromBase58String(M), aM)]) | |
277 | - | if ((aO == aO)) | |
278 | - | then [StringEntry(y(z), q), StringEntry(((A(z, U) + "_") + q), ((((((((((((aC + "_") + aD) + "_") + ad) + "_") + U) + "_") + value(assetInfo(value(X.assetId))).name) + "_") + toString(aF)) + "_") + toString(height)))] | |
279 | - | else throw("Strict value is not equal to itself.") | |
280 | - | } | |
281 | - | else throw("Strict value is not equal to itself.") | |
282 | - | } | |
283 | - | } | |
284 | - | } | |
285 | - | } | |
286 | - | } | |
287 | - | } | |
271 | + | then throw("Wrong payment amount to unlock") | |
272 | + | else if (if (!(aM)) | |
273 | + | then (aa > (aK + N)) | |
274 | + | else false) | |
275 | + | then throw("Wrong payment amount to mint and unlock") | |
276 | + | else { | |
277 | + | let aN = if (aM) | |
278 | + | then aL | |
279 | + | else aK | |
280 | + | let aO = invoke(addressFromStringValue(E(i)), "exchange", [1], [AttachedPayment(fromBase58String(M), N)]) | |
281 | + | if ((aO == aO)) | |
282 | + | then { | |
283 | + | let aP = invoke(addressFromStringValue(E(j)), "exchange", [1], [AttachedPayment(fromBase58String(M), aN)]) | |
284 | + | if ((aP == aP)) | |
285 | + | then [StringEntry(y(z), q), StringEntry(((A(z, U) + "_") + q), ((((((((((((aD + "_") + aE) + "_") + ad) + "_") + U) + "_") + value(assetInfo(value(X.assetId))).name) + "_") + toString(aG)) + "_") + toString(height)))] | |
286 | + | else throw("Strict value is not equal to itself.") | |
287 | + | } | |
288 | + | else throw("Strict value is not equal to itself.") | |
289 | + | } | |
290 | + | } | |
291 | + | } | |
292 | + | } | |
293 | + | } | |
294 | + | } | |
288 | 295 | ||
289 | 296 | ||
290 | 297 | ||
291 | 298 | @Callable(W) | |
292 | - | func confirmLock (z, | |
299 | + | func confirmLock (z,aQ) = if (!(ab)) | |
293 | 300 | then throw("dApp not ready") | |
294 | 301 | else if (ac(W)) | |
295 | 302 | then { | |
296 | - | let | |
297 | - | if (( | |
303 | + | let aJ = E(y(z)) | |
304 | + | if ((aJ != q)) | |
298 | 305 | then throw("NFT not pending") | |
299 | 306 | else { | |
300 | - | let | |
301 | - | let | |
302 | - | [DeleteEntry(((A(z, | |
307 | + | let aR = E(((A(z, aQ) + "_") + q)) | |
308 | + | let aS = ((A(z, aQ) + "_") + r) | |
309 | + | [DeleteEntry(((A(z, aQ) + "_") + q)), StringEntry(aS, aR), StringEntry(y(z), o)] | |
303 | 310 | } | |
304 | 311 | } | |
305 | 312 | else throw("Not allowed") | |
307 | 314 | ||
308 | 315 | ||
309 | 316 | @Callable(W) | |
310 | - | func unlock ( | |
317 | + | func unlock (aD,z) = if (!(ab)) | |
311 | 318 | then throw("dApp not ready") | |
312 | 319 | else if (ac(W)) | |
313 | 320 | then { | |
314 | - | let | |
315 | - | if (( | |
321 | + | let aJ = E(y(z)) | |
322 | + | if ((aJ != o)) | |
316 | 323 | then throw("NFT not locked, finalize first if pending") | |
317 | - | else [StringEntry(y(z), p), ScriptTransfer(Address(fromBase58String( | |
324 | + | else [StringEntry(y(z), p), ScriptTransfer(Address(fromBase58String(aD)), 1, fromBase58String(z))] | |
318 | 325 | } | |
319 | 326 | else throw("Not allowed") | |
320 | 327 | ||
321 | 328 | ||
322 | 329 | ||
323 | 330 | @Callable(W) | |
324 | - | func appRunning ( | |
331 | + | func appRunning (aT,aU) = if (!(ab)) | |
325 | 332 | then throw("dApp not ready") | |
326 | 333 | else if (ac(W)) | |
327 | - | then [BooleanEntry(k, | |
334 | + | then [BooleanEntry(k, aT), StringEntry(l, aU)] | |
328 | 335 | else throw("You are not allowed to change this") | |
329 | 336 | ||
330 | 337 | ||
331 | 338 | ||
332 | 339 | @Callable(W) | |
333 | - | func deleteEntry ( | |
334 | - | then [DeleteEntry( | |
340 | + | func deleteEntry (aV) = if (ac(W)) | |
341 | + | then [DeleteEntry(aV)] | |
335 | 342 | else throw("no") | |
336 | 343 | ||
337 | 344 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "1.0" | |
5 | 5 | ||
6 | 6 | let b = "config_init" | |
7 | 7 | ||
8 | 8 | let c = "config_admin" | |
9 | 9 | ||
10 | 10 | let d = "config_oracle" | |
11 | 11 | ||
12 | 12 | let e = "config_artwork_dapp" | |
13 | 13 | ||
14 | 14 | let f = "config_users_dapp" | |
15 | 15 | ||
16 | 16 | let g = "config_fee_asset" | |
17 | 17 | ||
18 | 18 | let h = "config_fee_amount" | |
19 | 19 | ||
20 | 20 | let i = "config_swop_sign_dapp" | |
21 | 21 | ||
22 | 22 | let j = "config_swop_eth_dapp" | |
23 | 23 | ||
24 | 24 | let k = "conf_dapp_is_running" | |
25 | 25 | ||
26 | 26 | let l = "conf_maintenance_msg" | |
27 | 27 | ||
28 | 28 | let m = valueOrElse(getBoolean(this, k), true) | |
29 | 29 | ||
30 | 30 | let n = valueOrElse(getString(this, l), "") | |
31 | 31 | ||
32 | 32 | let o = "LOCKED" | |
33 | 33 | ||
34 | 34 | let p = "UNLOCKED" | |
35 | 35 | ||
36 | 36 | let q = "PENDING" | |
37 | 37 | ||
38 | 38 | let r = "CLOSED" | |
39 | 39 | ||
40 | 40 | let s = "REGISTERED" | |
41 | 41 | ||
42 | 42 | let t = "VERIFIED" | |
43 | 43 | ||
44 | 44 | let u = "FLAGGED" | |
45 | 45 | ||
46 | 46 | let v = "ILLEGAL" | |
47 | 47 | ||
48 | 48 | let w = "CHANGE_REQUIRED" | |
49 | 49 | ||
50 | 50 | let x = ["ETH"] | |
51 | 51 | ||
52 | 52 | func y (z) = (("nft_" + z) + "_status") | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func A (z,B) = ((("transfer_" + z) + "_") + B) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | let C = "cost_non_minted" | |
59 | 59 | ||
60 | 60 | let D = "cost_minted" | |
61 | 61 | ||
62 | 62 | func E (F) = valueOrElse(getString(this, F), "") | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func G (F) = valueOrElse(getInteger(this, F), 0) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func H (F) = valueOrElse(getBoolean(this, F), false) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | let I = value(addressFromString(E(c))) | |
72 | 72 | ||
73 | 73 | let J = value(addressFromString(E(e))) | |
74 | 74 | ||
75 | 75 | let K = value(addressFromString(E(f))) | |
76 | 76 | ||
77 | 77 | let L = value(addressFromString(E(d))) | |
78 | 78 | ||
79 | 79 | let M = E(g) | |
80 | 80 | ||
81 | 81 | let N = G(h) | |
82 | 82 | ||
83 | 83 | func O (F) = valueOrElse(getString(K, F), "") | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func P (F) = valueOrElse(getString(J, F), "") | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func Q (F) = valueOrErrorMessage(getInteger(L, F), "Integer undefine or 0 in oracle") | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func R (S) = if (if (if ((S.quantity == 1)) | |
93 | 93 | then (S.decimals == 0) | |
94 | 94 | else false) | |
95 | 95 | then (S.reissuable == false) | |
96 | 96 | else false) | |
97 | 97 | then (S.issuer == J) | |
98 | 98 | else false | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func T (U) = { | |
102 | 102 | let S = value(assetInfo(U)) | |
103 | 103 | R(S) | |
104 | 104 | } | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func V (W) = if ((size(W.payments) == 0)) | |
108 | 108 | then throw("No payment attached") | |
109 | 109 | else { | |
110 | 110 | let X = value(W.payments[0]) | |
111 | 111 | let Y = value(X.amount) | |
112 | 112 | let Z = value(W.payments[1]) | |
113 | 113 | let aa = value(Z.amount) | |
114 | 114 | $Tuple4(X, Y, Z, aa) | |
115 | 115 | } | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | let ab = valueOrElse(H(b), false) | |
119 | 119 | ||
120 | 120 | func ac (W) = { | |
121 | 121 | let ad = toString(W.caller) | |
122 | 122 | let U = toBase58String(W.transactionId) | |
123 | 123 | let ae = if (ab) | |
124 | 124 | then [toString(I), toString(this)] | |
125 | 125 | else [toString(this)] | |
126 | 126 | if (containsElement(ae, ad)) | |
127 | 127 | then true | |
128 | 128 | else false | |
129 | 129 | } | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func af (W) = if (!(m)) | |
133 | 133 | then throw(n) | |
134 | 134 | else $Tuple3(toBase58String(W.transactionId), toBase58String(W.caller.bytes), lastBlock.timestamp) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func ag (ah) = { | |
138 | 138 | let ai = P(("nft_" + ah)) | |
139 | 139 | let aj = split(ai, "_")[6] | |
140 | 140 | let ak = split(ai, "_")[5] | |
141 | 141 | $Tuple2(aj, ak) | |
142 | 142 | } | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func al (am) = { | |
146 | 146 | let an = O(("user_ERC20_" + am)) | |
147 | 147 | an | |
148 | 148 | } | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func ao (am) = { | |
152 | 152 | let ap = O(("user_status_" + am)) | |
153 | 153 | ap | |
154 | 154 | } | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func aq (ak,am) = { | |
158 | 158 | let ap = P(((("art_flag_" + ak) + "_") + am)) | |
159 | 159 | ap | |
160 | 160 | } | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func ar (ap) = if ((ap == s)) | |
164 | 164 | then true | |
165 | 165 | else (ap == t) | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func as (ap) = if (if ((ap != u)) | |
169 | 169 | then (ap != v) | |
170 | 170 | else false) | |
171 | 171 | then (ap != w) | |
172 | 172 | else false | |
173 | 173 | ||
174 | 174 | ||
175 | + | func at (am) = if ((size(am) == 42)) | |
176 | + | then (take(am, 2) == "0x") | |
177 | + | else false | |
178 | + | ||
179 | + | ||
175 | 180 | @Callable(W) | |
176 | - | func init ( | |
181 | + | func init (au,L,J,K,av,aw,ax,ay) = if (ac(W)) | |
177 | 182 | then { | |
178 | - | let | |
179 | - | if (( | |
183 | + | let az = invoke(this, "setFee", [av, aw], nil) | |
184 | + | if ((az == az)) | |
180 | 185 | then { | |
181 | - | let | |
182 | - | if (( | |
183 | - | then [StringEntry(c, | |
186 | + | let aA = invoke(this, "setSwopDapps", [ax, ay], nil) | |
187 | + | if ((aA == aA)) | |
188 | + | then [StringEntry(c, au), StringEntry(d, L), StringEntry(e, J), StringEntry(f, K), BooleanEntry(b, true)] | |
184 | 189 | else throw("Strict value is not equal to itself.") | |
185 | 190 | } | |
186 | 191 | else throw("Strict value is not equal to itself.") | |
187 | 192 | } | |
188 | 193 | else throw("Not allowed") | |
189 | 194 | ||
190 | 195 | ||
191 | 196 | ||
192 | 197 | @Callable(W) | |
193 | - | func setSwopDapps ( | |
194 | - | then [StringEntry(i, | |
198 | + | func setSwopDapps (ax,ay) = if (ac(W)) | |
199 | + | then [StringEntry(i, ax), StringEntry(j, ay)] | |
195 | 200 | else throw("Not allowed") | |
196 | 201 | ||
197 | 202 | ||
198 | 203 | ||
199 | 204 | @Callable(W) | |
200 | - | func setFee ( | |
201 | - | let S = assetInfo(fromBase58String( | |
202 | - | let | |
203 | - | let | |
205 | + | func setFee (av,aw) = { | |
206 | + | let S = assetInfo(fromBase58String(av)) | |
207 | + | let aB = value(S).decimals | |
208 | + | let aC = pow(aw, 0, 10, 1, aB, HALFUP) | |
204 | 209 | if (ac(W)) | |
205 | - | then [StringEntry(g, | |
210 | + | then [StringEntry(g, av), IntegerEntry(h, aC)] | |
206 | 211 | else throw("Not allowed") | |
207 | 212 | } | |
208 | 213 | ||
209 | 214 | ||
210 | 215 | ||
211 | 216 | @Callable(W) | |
212 | - | func lock ( | |
217 | + | func lock (aD,aE) = if (!(ab)) | |
213 | 218 | then throw("dApp not ready") | |
214 | - | else if (!(containsElement(x, | |
219 | + | else if (!(containsElement(x, aE))) | |
215 | 220 | then throw("Network not supported") | |
216 | - | else { | |
217 | - | let aE = af(W) | |
218 | - | let U = aE._1 | |
219 | - | let ad = aE._2 | |
220 | - | let aF = aE._3 | |
221 | - | let aG = V(W) | |
222 | - | let X = aG._1 | |
223 | - | let Y = aG._2 | |
224 | - | let Z = aG._3 | |
225 | - | let aa = aG._4 | |
226 | - | if ((Y != 1)) | |
227 | - | then throw("No NFT attached") | |
228 | - | else { | |
229 | - | let z = if (if (isDefined(X.assetId)) | |
230 | - | then T(value(X.assetId)) | |
231 | - | else false) | |
232 | - | then toBase58String(value(X.assetId)) | |
233 | - | else throw("Only SIGN Art NFT accepted.") | |
234 | - | let aH = ag(z) | |
235 | - | let aj = aH._1 | |
236 | - | let ak = aH._2 | |
237 | - | if (!(ar(ao(aj)))) | |
238 | - | then throw(("Creator status is :" + ao(aj))) | |
239 | - | else if (!(as(aq(ak, aj)))) | |
240 | - | then throw(("Artwork status is :" + aq(ak, aj))) | |
241 | - | else { | |
242 | - | let an = al(aj) | |
243 | - | if ((size(an) == 0)) | |
244 | - | then throw("This artist didn't allow crosschain transfer") | |
245 | - | else { | |
246 | - | let aI = E(y(z)) | |
247 | - | if (if ((aI == o)) | |
248 | - | then true | |
249 | - | else (aI == q)) | |
250 | - | then throw("NFT already locked") | |
251 | - | else { | |
252 | - | let aJ = Q(C) | |
253 | - | let aK = Q(D) | |
254 | - | let aL = if ((aI == p)) | |
255 | - | then true | |
256 | - | else false | |
257 | - | if (if (!(isDefined(Z.assetId))) | |
258 | - | then true | |
259 | - | else (toBase58String(value(Z.assetId)) != M)) | |
260 | - | then throw("Wrong payment asset") | |
261 | - | else if (if (aL) | |
262 | - | then (aa > (aK + N)) | |
263 | - | else false) | |
264 | - | then throw("Wrong payment amount to unlock") | |
265 | - | else if (if (!(aL)) | |
266 | - | then (aa > (aJ + N)) | |
221 | + | else if (!(at(aD))) | |
222 | + | then throw("Wrong recipient address") | |
223 | + | else { | |
224 | + | let aF = af(W) | |
225 | + | let U = aF._1 | |
226 | + | let ad = aF._2 | |
227 | + | let aG = aF._3 | |
228 | + | let aH = V(W) | |
229 | + | let X = aH._1 | |
230 | + | let Y = aH._2 | |
231 | + | let Z = aH._3 | |
232 | + | let aa = aH._4 | |
233 | + | if ((Y != 1)) | |
234 | + | then throw("No NFT attached") | |
235 | + | else { | |
236 | + | let z = if (if (isDefined(X.assetId)) | |
237 | + | then T(value(X.assetId)) | |
238 | + | else false) | |
239 | + | then toBase58String(value(X.assetId)) | |
240 | + | else throw("Only SIGN Art NFT accepted.") | |
241 | + | let aI = ag(z) | |
242 | + | let aj = aI._1 | |
243 | + | let ak = aI._2 | |
244 | + | if (!(ar(ao(aj)))) | |
245 | + | then throw(("Creator status is :" + ao(aj))) | |
246 | + | else if (!(as(aq(ak, aj)))) | |
247 | + | then throw(("Artwork status is :" + aq(ak, aj))) | |
248 | + | else { | |
249 | + | let an = al(aj) | |
250 | + | if ((size(an) == 0)) | |
251 | + | then throw("This artist didn't allow crosschain transfer") | |
252 | + | else { | |
253 | + | let aJ = E(y(z)) | |
254 | + | if (if ((aJ == o)) | |
255 | + | then true | |
256 | + | else (aJ == q)) | |
257 | + | then throw("NFT already locked") | |
258 | + | else { | |
259 | + | let aK = Q(C) | |
260 | + | let aL = Q(D) | |
261 | + | let aM = if ((aJ == p)) | |
262 | + | then true | |
263 | + | else false | |
264 | + | if (if (!(isDefined(Z.assetId))) | |
265 | + | then true | |
266 | + | else (toBase58String(value(Z.assetId)) != M)) | |
267 | + | then throw("Wrong payment asset") | |
268 | + | else if (if (aM) | |
269 | + | then (aa > (aL + N)) | |
267 | 270 | else false) | |
268 | - | then throw("Wrong payment amount to mint and unlock") | |
269 | - | else { | |
270 | - | let aM = if (aL) | |
271 | - | then aK | |
272 | - | else aJ | |
273 | - | let aN = invoke(addressFromStringValue(E(i)), "exchange", [1], [AttachedPayment(fromBase58String(M), N)]) | |
274 | - | if ((aN == aN)) | |
275 | - | then { | |
276 | - | let aO = invoke(addressFromStringValue(E(j)), "exchange", [1], [AttachedPayment(fromBase58String(M), aM)]) | |
277 | - | if ((aO == aO)) | |
278 | - | then [StringEntry(y(z), q), StringEntry(((A(z, U) + "_") + q), ((((((((((((aC + "_") + aD) + "_") + ad) + "_") + U) + "_") + value(assetInfo(value(X.assetId))).name) + "_") + toString(aF)) + "_") + toString(height)))] | |
279 | - | else throw("Strict value is not equal to itself.") | |
280 | - | } | |
281 | - | else throw("Strict value is not equal to itself.") | |
282 | - | } | |
283 | - | } | |
284 | - | } | |
285 | - | } | |
286 | - | } | |
287 | - | } | |
271 | + | then throw("Wrong payment amount to unlock") | |
272 | + | else if (if (!(aM)) | |
273 | + | then (aa > (aK + N)) | |
274 | + | else false) | |
275 | + | then throw("Wrong payment amount to mint and unlock") | |
276 | + | else { | |
277 | + | let aN = if (aM) | |
278 | + | then aL | |
279 | + | else aK | |
280 | + | let aO = invoke(addressFromStringValue(E(i)), "exchange", [1], [AttachedPayment(fromBase58String(M), N)]) | |
281 | + | if ((aO == aO)) | |
282 | + | then { | |
283 | + | let aP = invoke(addressFromStringValue(E(j)), "exchange", [1], [AttachedPayment(fromBase58String(M), aN)]) | |
284 | + | if ((aP == aP)) | |
285 | + | then [StringEntry(y(z), q), StringEntry(((A(z, U) + "_") + q), ((((((((((((aD + "_") + aE) + "_") + ad) + "_") + U) + "_") + value(assetInfo(value(X.assetId))).name) + "_") + toString(aG)) + "_") + toString(height)))] | |
286 | + | else throw("Strict value is not equal to itself.") | |
287 | + | } | |
288 | + | else throw("Strict value is not equal to itself.") | |
289 | + | } | |
290 | + | } | |
291 | + | } | |
292 | + | } | |
293 | + | } | |
294 | + | } | |
288 | 295 | ||
289 | 296 | ||
290 | 297 | ||
291 | 298 | @Callable(W) | |
292 | - | func confirmLock (z, | |
299 | + | func confirmLock (z,aQ) = if (!(ab)) | |
293 | 300 | then throw("dApp not ready") | |
294 | 301 | else if (ac(W)) | |
295 | 302 | then { | |
296 | - | let | |
297 | - | if (( | |
303 | + | let aJ = E(y(z)) | |
304 | + | if ((aJ != q)) | |
298 | 305 | then throw("NFT not pending") | |
299 | 306 | else { | |
300 | - | let | |
301 | - | let | |
302 | - | [DeleteEntry(((A(z, | |
307 | + | let aR = E(((A(z, aQ) + "_") + q)) | |
308 | + | let aS = ((A(z, aQ) + "_") + r) | |
309 | + | [DeleteEntry(((A(z, aQ) + "_") + q)), StringEntry(aS, aR), StringEntry(y(z), o)] | |
303 | 310 | } | |
304 | 311 | } | |
305 | 312 | else throw("Not allowed") | |
306 | 313 | ||
307 | 314 | ||
308 | 315 | ||
309 | 316 | @Callable(W) | |
310 | - | func unlock ( | |
317 | + | func unlock (aD,z) = if (!(ab)) | |
311 | 318 | then throw("dApp not ready") | |
312 | 319 | else if (ac(W)) | |
313 | 320 | then { | |
314 | - | let | |
315 | - | if (( | |
321 | + | let aJ = E(y(z)) | |
322 | + | if ((aJ != o)) | |
316 | 323 | then throw("NFT not locked, finalize first if pending") | |
317 | - | else [StringEntry(y(z), p), ScriptTransfer(Address(fromBase58String( | |
324 | + | else [StringEntry(y(z), p), ScriptTransfer(Address(fromBase58String(aD)), 1, fromBase58String(z))] | |
318 | 325 | } | |
319 | 326 | else throw("Not allowed") | |
320 | 327 | ||
321 | 328 | ||
322 | 329 | ||
323 | 330 | @Callable(W) | |
324 | - | func appRunning ( | |
331 | + | func appRunning (aT,aU) = if (!(ab)) | |
325 | 332 | then throw("dApp not ready") | |
326 | 333 | else if (ac(W)) | |
327 | - | then [BooleanEntry(k, | |
334 | + | then [BooleanEntry(k, aT), StringEntry(l, aU)] | |
328 | 335 | else throw("You are not allowed to change this") | |
329 | 336 | ||
330 | 337 | ||
331 | 338 | ||
332 | 339 | @Callable(W) | |
333 | - | func deleteEntry ( | |
334 | - | then [DeleteEntry( | |
340 | + | func deleteEntry (aV) = if (ac(W)) | |
341 | + | then [DeleteEntry(aV)] | |
335 | 342 | else throw("no") | |
336 | 343 | ||
337 | 344 |
github/deemru/w8io/169f3d6 67.97 ms ◑