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