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