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