tx · 9B2mSCgSyfoMx7tRKhXxb4dnDJwzSTznqes1aUkbQkKi 3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr: -0.01400000 Waves 2022.04.18 16:44 [2014068] smart account 3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr > SELF 0.00000000 Waves
{ "type": 13, "id": "9B2mSCgSyfoMx7tRKhXxb4dnDJwzSTznqes1aUkbQkKi", "fee": 1400000, "feeAssetId": null, "timestamp": 1650289519546, "version": 1, "sender": "3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr", "senderPublicKey": "EtZZHS4uqNXY5WPneZ8jY2aA95peXwthJVLzAMxMp379", "proofs": [ "5ihcqpumLi9iG8rUetVYGQtmPGhaQiS1y9RC9NtEH2Bgpd22NkiE7rEgVVxXGYkGvSD4ecUzXmqR44fTzduARqR1" ], "script": "base64:AAIFAAAAAAAAAFkIAhIECgIIGBIFCgMICAgSAwoBCBIDCgEIEgMKAQgSBAoCCAgSBAoCCAgSBAoCCAgSAwoBCBIFCgMICAQSBAoCCAgSBAoCCAQSAwoBGBIDCgEIEgASAwoBCAAAACUAAAAAA1NFUAIAAAACX18AAAAABUVNUFRZAgAAAAAAAAAADnN0YXR1c1ZlcmlmaWVkAAAAAAAAAAACAAAAABBzdGF0dXNVbnZlcmlmaWVkAAAAAAAAAAAAAAAAABZsYWJlbENvbW11bml0eVZlcmlmaWVkAgAAABJDT01NVU5JVFlfVkVSSUZJRUQAAAAADGxhYmVsUG9vbHNMcAIAAAAIUE9PTFNfTFAAAAAADWRlZmF1bHRMYWJlbHMJAARMAAAAAgUAAAAWbGFiZWxDb21tdW5pdHlWZXJpZmllZAkABEwAAAACBQAAAAxsYWJlbFBvb2xzTHAFAAAAA25pbAEAAAAHdGhyb3dQRAAAAAAJAAACAAAAAQIAAAARUGVybWlzc2lvbiBkZW5pZWQBAAAADHRocm93Tm9Bc3NldAAAAAAJAAACAAAAAQIAAAAUQXNzZXQgZG9lc24ndCBleGlzdHMBAAAA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AA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAWkBAAAAEmlzVmVyaWZpZWRSRUFET05MWQAAAAEAAAAHYXNzZXRJZAkABRQAAAACBQAAAANuaWwJAQAAAAppc1ZlcmlmaWVkAAAAAQUAAAAHYXNzZXRJZAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAD3RhcmdldFB1YmxpY0tleQQAAAAHJG1hdGNoMAkBAAAAFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAAAAAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAJwawUAAAAHJG1hdGNoMAUAAAACcGsDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABFVuaXQIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA90YXJnZXRQdWJsaWNLZXmG8ULi", "chainId": 84, "height": 2014068, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4yF8bE6CetRyZSLWkwneD7EetbHSwoTwc22TqPPNcN8m Next: 7NQzxXX6wEahkfqiLDiRaoqWAfoWkTyeH28MxhdNizHL Diff:
Old | New | Differences | |
---|---|---|---|
332 | 332 | let checkCaller = mustAdmin(i) | |
333 | 333 | if ((checkCaller == checkCaller)) | |
334 | 334 | then { | |
335 | - | let | |
336 | - | if (( | |
335 | + | let isCreatedNow = !(isCreated(assetId)) | |
336 | + | if ((isCreatedNow == isCreatedNow)) | |
337 | 337 | then { | |
338 | - | let isCreatedNow = !(isCreated(assetId)) | |
339 | - | if ((isCreatedNow == isCreatedNow)) | |
340 | - | then { | |
341 | - | let setLogoActions = if ((logo == "")) | |
342 | - | then nil | |
343 | - | else [StringEntry(keyLogo(assetId), logo)] | |
344 | - | $Tuple2((([BooleanEntry(keyCreated(assetId), true)] ++ setLogoActions) ++ setVerifiedActions(assetId, verified)), isCreatedNow) | |
345 | - | } | |
346 | - | else throw("Strict value is not equal to itself.") | |
338 | + | let setLogoActions = if ((logo == "")) | |
339 | + | then nil | |
340 | + | else [StringEntry(keyLogo(assetId), logo)] | |
341 | + | $Tuple2((([BooleanEntry(keyCreated(assetId), true)] ++ setLogoActions) ++ setVerifiedActions(assetId, verified)), isCreatedNow) | |
347 | 342 | } | |
348 | 343 | else throw("Strict value is not equal to itself.") | |
349 | 344 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let EMPTY = "" | |
7 | 7 | ||
8 | 8 | let statusVerified = 2 | |
9 | 9 | ||
10 | 10 | let statusUnverified = 0 | |
11 | 11 | ||
12 | 12 | let labelCommunityVerified = "COMMUNITY_VERIFIED" | |
13 | 13 | ||
14 | 14 | let labelPoolsLp = "POOLS_LP" | |
15 | 15 | ||
16 | 16 | let defaultLabels = [labelCommunityVerified, labelPoolsLp] | |
17 | 17 | ||
18 | 18 | func throwPD () = throw("Permission denied") | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func throwNoAsset () = throw("Asset doesn't exists") | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func keyAdminPubKeys () = "%s__adminPubKeys" | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func keyUserPoolsContract () = "%s__userPoolsContract" | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func keyCreated (assetId) = (("created_<" + assetId) + ">") | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func keyLogo (assetId) = (("logo_<" + assetId) + ">") | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func keyTicker (assetId) = (("ticker_<" + assetId) + ">") | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func keyStatus (assetId) = (("status_<" + assetId) + ">") | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func keyAssetPoolsNumber (assetId) = makeString(["%s%s", "pools", assetId], SEP) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func keyTickerToAssetId (ticker) = makeString(["%s%s", "ticker2assetId", ticker], SEP) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func keyAssetIdToTicker (assetId) = makeString(["%s%s", "assetId2ticker", assetId], SEP) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func keyAmountAndPriceAssetsToLpAsset (amountAsset,priceAsset) = makeString(["%s%s%s", "amountAndPriceAssetsToLpAsset", amountAsset, priceAsset], SEP) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func keyLpAssetToAmountAndPriceAssets (lpAsset) = makeString(["%s%s", "lpAssetToAmountAndPriceAssets", lpAsset], SEP) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func keyAssetLabels (assetId) = makeString(["%s%s", "labels", assetId], SEP) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func keyLabels () = makeString(["%s", "labels"], SEP) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func isVerified (assetId) = (valueOrElse(getInteger(keyStatus(assetId)), statusUnverified) == statusVerified) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func getLabels () = match getString(keyLabels()) { | |
73 | 73 | case s: String => | |
74 | 74 | if ((size(s) == 0)) | |
75 | 75 | then nil | |
76 | 76 | else split(s, SEP) | |
77 | 77 | case _ => | |
78 | 78 | nil | |
79 | 79 | } | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func getAssetLabels (assetId) = match getString(keyAssetLabels(assetId)) { | |
83 | 83 | case s: String => | |
84 | 84 | if ((size(s) == 0)) | |
85 | 85 | then nil | |
86 | 86 | else split(s, SEP) | |
87 | 87 | case _ => | |
88 | 88 | nil | |
89 | 89 | } | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
93 | 93 | case s: String => | |
94 | 94 | fromBase58String(s) | |
95 | 95 | case _: Unit => | |
96 | 96 | unit | |
97 | 97 | case _ => | |
98 | 98 | throw("Match error") | |
99 | 99 | } | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
103 | 103 | case s: String => | |
104 | 104 | fromBase58String(s) | |
105 | 105 | case _: Unit => | |
106 | 106 | unit | |
107 | 107 | case _ => | |
108 | 108 | throw("Match error") | |
109 | 109 | } | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func mustManager (i) = match managerPublicKeyOrUnit() { | |
113 | 113 | case pk: ByteVector => | |
114 | 114 | if ((i.callerPublicKey == pk)) | |
115 | 115 | then true | |
116 | 116 | else throwPD() | |
117 | 117 | case _: Unit => | |
118 | 118 | if ((i.caller == this)) | |
119 | 119 | then true | |
120 | 120 | else throwPD() | |
121 | 121 | case _ => | |
122 | 122 | throw("Match error") | |
123 | 123 | } | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func mustAdmin (i) = { | |
127 | 127 | let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP) | |
128 | 128 | if (containsElement(adminPKs, toBase58String(i.callerPublicKey))) | |
129 | 129 | then true | |
130 | 130 | else { | |
131 | 131 | let isManager = mustManager(i) | |
132 | 132 | if ((isManager == isManager)) | |
133 | 133 | then true | |
134 | 134 | else throw("Strict value is not equal to itself.") | |
135 | 135 | } | |
136 | 136 | } | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func isCreated (assetId) = valueOrElse(getBoolean(keyCreated(assetId)), false) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func verifiedToStatus (verified) = if (verified) | |
143 | 143 | then statusVerified | |
144 | 144 | else statusUnverified | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func addLabelActions (assetId,label,throwOnError) = { | |
148 | 148 | let labels = getLabels() | |
149 | 149 | let assetLabels = getAssetLabels(assetId) | |
150 | 150 | let checkLabel = if (containsElement(labels, label)) | |
151 | 151 | then true | |
152 | 152 | else throw("Label doesn't exist") | |
153 | 153 | if ((checkLabel == checkLabel)) | |
154 | 154 | then { | |
155 | 155 | let newAssetLabels = if (containsElement(assetLabels, label)) | |
156 | 156 | then if (throwOnError) | |
157 | 157 | then throw("Label has already been added") | |
158 | 158 | else assetLabels | |
159 | 159 | else (assetLabels :+ label) | |
160 | 160 | [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))] | |
161 | 161 | } | |
162 | 162 | else throw("Strict value is not equal to itself.") | |
163 | 163 | } | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func deleteLabelActions (assetId,label,throwOnError) = { | |
167 | 167 | let assetLabels = getAssetLabels(assetId) | |
168 | 168 | let newAssetLabels = if (containsElement(assetLabels, label)) | |
169 | 169 | then removeByIndex(assetLabels, value(indexOf(assetLabels, label))) | |
170 | 170 | else if (throwOnError) | |
171 | 171 | then throw("Label wasn't added") | |
172 | 172 | else assetLabels | |
173 | 173 | [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))] | |
174 | 174 | } | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func setVerifiedActions (assetId,verified) = { | |
178 | 178 | let labelCommunityVerifiedActions = if (verified) | |
179 | 179 | then addLabelActions(assetId, labelCommunityVerified, false) | |
180 | 180 | else deleteLabelActions(assetId, labelCommunityVerified, false) | |
181 | 181 | ([IntegerEntry(keyStatus(assetId), verifiedToStatus(verified))] ++ labelCommunityVerifiedActions) | |
182 | 182 | } | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | func updateTickerActions (assetId,ticker) = { | |
186 | 186 | let checkTicker = { | |
187 | 187 | let linkedAssetIdOrUnit = getString(keyTickerToAssetId(ticker)) | |
188 | 188 | let tickerIsValid = if ((ticker != "")) | |
189 | 189 | then if ((linkedAssetIdOrUnit == unit)) | |
190 | 190 | then true | |
191 | 191 | else (value(linkedAssetIdOrUnit) == assetId) | |
192 | 192 | else false | |
193 | 193 | if (tickerIsValid) | |
194 | 194 | then true | |
195 | 195 | else throw("Invalid ticker") | |
196 | 196 | } | |
197 | 197 | if ((checkTicker == checkTicker)) | |
198 | 198 | then [StringEntry(keyAssetIdToTicker(assetId), ticker), StringEntry(keyTickerToAssetId(ticker), assetId)] | |
199 | 199 | else throw("Strict value is not equal to itself.") | |
200 | 200 | } | |
201 | 201 | ||
202 | 202 | ||
203 | 203 | @Callable(i) | |
204 | 204 | func constructor (userPoolsContract,labels) = { | |
205 | 205 | let checkCaller = mustManager(i) | |
206 | 206 | if ((checkCaller == checkCaller)) | |
207 | 207 | then { | |
208 | 208 | let checksAddress = valueOrErrorMessage(addressFromString(userPoolsContract), "Invalid address") | |
209 | 209 | if ((checksAddress == checksAddress)) | |
210 | 210 | then [StringEntry(keyUserPoolsContract(), userPoolsContract), StringEntry(keyLabels(), makeString((defaultLabels ++ labels), SEP))] | |
211 | 211 | else throw("Strict value is not equal to itself.") | |
212 | 212 | } | |
213 | 213 | else throw("Strict value is not equal to itself.") | |
214 | 214 | } | |
215 | 215 | ||
216 | 216 | ||
217 | 217 | ||
218 | 218 | @Callable(i) | |
219 | 219 | func addAssetsLink (amountAsset,priceAsset,lpAsset) = { | |
220 | 220 | let checkCaller = mustAdmin(i) | |
221 | 221 | if ((checkCaller == checkCaller)) | |
222 | 222 | then [StringEntry(keyAmountAndPriceAssetsToLpAsset(amountAsset, priceAsset), lpAsset), StringEntry(keyLpAssetToAmountAndPriceAssets(lpAsset), makeString([amountAsset, priceAsset], SEP))] | |
223 | 223 | else throw("Strict value is not equal to itself.") | |
224 | 224 | } | |
225 | 225 | ||
226 | 226 | ||
227 | 227 | ||
228 | 228 | @Callable(i) | |
229 | 229 | func increaseAssetPoolsNumber (assetId) = { | |
230 | 230 | let checkCaller = mustAdmin(i) | |
231 | 231 | if ((checkCaller == checkCaller)) | |
232 | 232 | then { | |
233 | 233 | let assetPoolsNumberKey = keyAssetPoolsNumber(assetId) | |
234 | 234 | let assetPoolsNumber = valueOrElse(getInteger(assetPoolsNumberKey), 0) | |
235 | 235 | [IntegerEntry(assetPoolsNumberKey, (assetPoolsNumber + 1))] | |
236 | 236 | } | |
237 | 237 | else throw("Strict value is not equal to itself.") | |
238 | 238 | } | |
239 | 239 | ||
240 | 240 | ||
241 | 241 | ||
242 | 242 | @Callable(i) | |
243 | 243 | func createLabel (label) = { | |
244 | 244 | let labels = getLabels() | |
245 | 245 | let checkCaller = mustManager(i) | |
246 | 246 | if ((checkCaller == checkCaller)) | |
247 | 247 | then { | |
248 | 248 | let checkLabel = [if (!(contains(label, SEP))) | |
249 | 249 | then true | |
250 | 250 | else throw("Invalid label name"), if (!(containsElement(labels, label))) | |
251 | 251 | then true | |
252 | 252 | else throw("Label exists")] | |
253 | 253 | if ((checkLabel == checkLabel)) | |
254 | 254 | then [StringEntry(keyLabels(), makeString((labels :+ label), SEP))] | |
255 | 255 | else throw("Strict value is not equal to itself.") | |
256 | 256 | } | |
257 | 257 | else throw("Strict value is not equal to itself.") | |
258 | 258 | } | |
259 | 259 | ||
260 | 260 | ||
261 | 261 | ||
262 | 262 | @Callable(i) | |
263 | 263 | func dropLabel (label) = { | |
264 | 264 | let labels = getLabels() | |
265 | 265 | let checkCaller = mustManager(i) | |
266 | 266 | if ((checkCaller == checkCaller)) | |
267 | 267 | then { | |
268 | 268 | let checkLabel = if (containsElement(labels, label)) | |
269 | 269 | then true | |
270 | 270 | else throw("Label doesn't exist") | |
271 | 271 | if ((checkLabel == checkLabel)) | |
272 | 272 | then [StringEntry(keyLabels(), makeString(removeByIndex(labels, value(indexOf(labels, label))), SEP))] | |
273 | 273 | else throw("Strict value is not equal to itself.") | |
274 | 274 | } | |
275 | 275 | else throw("Strict value is not equal to itself.") | |
276 | 276 | } | |
277 | 277 | ||
278 | 278 | ||
279 | 279 | ||
280 | 280 | @Callable(i) | |
281 | 281 | func addLabel (assetId,label) = { | |
282 | 282 | let checkCaller = mustAdmin(i) | |
283 | 283 | if ((checkCaller == checkCaller)) | |
284 | 284 | then addLabelActions(assetId, label, true) | |
285 | 285 | else throw("Strict value is not equal to itself.") | |
286 | 286 | } | |
287 | 287 | ||
288 | 288 | ||
289 | 289 | ||
290 | 290 | @Callable(i) | |
291 | 291 | func deleteLabel (assetId,label) = { | |
292 | 292 | let checkCaller = mustAdmin(i) | |
293 | 293 | if ((checkCaller == checkCaller)) | |
294 | 294 | then deleteLabelActions(assetId, label, true) | |
295 | 295 | else throw("Strict value is not equal to itself.") | |
296 | 296 | } | |
297 | 297 | ||
298 | 298 | ||
299 | 299 | ||
300 | 300 | @Callable(i) | |
301 | 301 | func updateTicker (assetId,ticker) = { | |
302 | 302 | let checkCaller = mustAdmin(i) | |
303 | 303 | if ((checkCaller == checkCaller)) | |
304 | 304 | then { | |
305 | 305 | let checkAsset = if (isCreated(assetId)) | |
306 | 306 | then true | |
307 | 307 | else throwNoAsset() | |
308 | 308 | if ((checkAsset == checkAsset)) | |
309 | 309 | then updateTickerActions(assetId, ticker) | |
310 | 310 | else throw("Strict value is not equal to itself.") | |
311 | 311 | } | |
312 | 312 | else throw("Strict value is not equal to itself.") | |
313 | 313 | } | |
314 | 314 | ||
315 | 315 | ||
316 | 316 | ||
317 | 317 | @Callable(i) | |
318 | 318 | func deleteTicker (assetId) = { | |
319 | 319 | let checkCaller = mustAdmin(i) | |
320 | 320 | if ((checkCaller == checkCaller)) | |
321 | 321 | then { | |
322 | 322 | let ticker = valueOrErrorMessage(getString(keyAssetIdToTicker(assetId)), "Invalid asset") | |
323 | 323 | [DeleteEntry(keyAssetIdToTicker(assetId)), DeleteEntry(keyTickerToAssetId(ticker))] | |
324 | 324 | } | |
325 | 325 | else throw("Strict value is not equal to itself.") | |
326 | 326 | } | |
327 | 327 | ||
328 | 328 | ||
329 | 329 | ||
330 | 330 | @Callable(i) | |
331 | 331 | func createOrUpdate (assetId,logo,verified) = { | |
332 | 332 | let checkCaller = mustAdmin(i) | |
333 | 333 | if ((checkCaller == checkCaller)) | |
334 | 334 | then { | |
335 | - | let | |
336 | - | if (( | |
335 | + | let isCreatedNow = !(isCreated(assetId)) | |
336 | + | if ((isCreatedNow == isCreatedNow)) | |
337 | 337 | then { | |
338 | - | let isCreatedNow = !(isCreated(assetId)) | |
339 | - | if ((isCreatedNow == isCreatedNow)) | |
340 | - | then { | |
341 | - | let setLogoActions = if ((logo == "")) | |
342 | - | then nil | |
343 | - | else [StringEntry(keyLogo(assetId), logo)] | |
344 | - | $Tuple2((([BooleanEntry(keyCreated(assetId), true)] ++ setLogoActions) ++ setVerifiedActions(assetId, verified)), isCreatedNow) | |
345 | - | } | |
346 | - | else throw("Strict value is not equal to itself.") | |
338 | + | let setLogoActions = if ((logo == "")) | |
339 | + | then nil | |
340 | + | else [StringEntry(keyLogo(assetId), logo)] | |
341 | + | $Tuple2((([BooleanEntry(keyCreated(assetId), true)] ++ setLogoActions) ++ setVerifiedActions(assetId, verified)), isCreatedNow) | |
347 | 342 | } | |
348 | 343 | else throw("Strict value is not equal to itself.") | |
349 | 344 | } | |
350 | 345 | else throw("Strict value is not equal to itself.") | |
351 | 346 | } | |
352 | 347 | ||
353 | 348 | ||
354 | 349 | ||
355 | 350 | @Callable(i) | |
356 | 351 | func setLogo (assetId,logo) = { | |
357 | 352 | let checks = [mustAdmin(i), if (isCreated(assetId)) | |
358 | 353 | then true | |
359 | 354 | else throwNoAsset()] | |
360 | 355 | if ((checks == checks)) | |
361 | 356 | then [StringEntry(keyLogo(assetId), logo)] | |
362 | 357 | else throw("Strict value is not equal to itself.") | |
363 | 358 | } | |
364 | 359 | ||
365 | 360 | ||
366 | 361 | ||
367 | 362 | @Callable(i) | |
368 | 363 | func setVerified (assetId,verified) = { | |
369 | 364 | let checks = [mustAdmin(i), if (isCreated(assetId)) | |
370 | 365 | then true | |
371 | 366 | else throwNoAsset()] | |
372 | 367 | if ((checks == checks)) | |
373 | 368 | then { | |
374 | 369 | let priceAssets = match invoke(addressFromStringValue(getStringValue(keyUserPoolsContract())), "priceAssetsREADONLY", nil, nil) { | |
375 | 370 | case assets: List[Any] => | |
376 | 371 | let checkPriceAssetsSize = if ((size(assets) > 0)) | |
377 | 372 | then true | |
378 | 373 | else throw("Invalid price assets") | |
379 | 374 | if ((checkPriceAssetsSize == checkPriceAssetsSize)) | |
380 | 375 | then assets | |
381 | 376 | else throw("Strict value is not equal to itself.") | |
382 | 377 | case _ => | |
383 | 378 | throw("Incorrect invoke result") | |
384 | 379 | } | |
385 | 380 | func cb (acc,item) = { | |
386 | 381 | let priceAssetId = match item { | |
387 | 382 | case s: String => | |
388 | 383 | s | |
389 | 384 | case _ => | |
390 | 385 | throw("Invalid price asset") | |
391 | 386 | } | |
392 | 387 | let lpAssetIdOrUnit = getString(keyAmountAndPriceAssetsToLpAsset(assetId, priceAssetId)) | |
393 | 388 | let action = if ((lpAssetIdOrUnit == unit)) | |
394 | 389 | then nil | |
395 | 390 | else setVerifiedActions(value(lpAssetIdOrUnit), verified) | |
396 | 391 | (acc ++ action) | |
397 | 392 | } | |
398 | 393 | ||
399 | 394 | let tokensActions = { | |
400 | 395 | let $l = priceAssets | |
401 | 396 | let $s = size($l) | |
402 | 397 | let $acc0 = setVerifiedActions(assetId, verified) | |
403 | 398 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
404 | 399 | then $a | |
405 | 400 | else cb($a, $l[$i]) | |
406 | 401 | ||
407 | 402 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
408 | 403 | then $a | |
409 | 404 | else throw("List size exceeds 10") | |
410 | 405 | ||
411 | 406 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
412 | 407 | } | |
413 | 408 | $Tuple2(tokensActions, unit) | |
414 | 409 | } | |
415 | 410 | else throw("Strict value is not equal to itself.") | |
416 | 411 | } | |
417 | 412 | ||
418 | 413 | ||
419 | 414 | ||
420 | 415 | @Callable(i) | |
421 | 416 | func setAdmins (adminPubKeys) = { | |
422 | 417 | let checkCaller = mustManager(i) | |
423 | 418 | if ((checkCaller == checkCaller)) | |
424 | 419 | then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))] | |
425 | 420 | else throw("Strict value is not equal to itself.") | |
426 | 421 | } | |
427 | 422 | ||
428 | 423 | ||
429 | 424 | ||
430 | 425 | @Callable(i) | |
431 | 426 | func setManager (pendingManagerPublicKey) = { | |
432 | 427 | let checkCaller = mustManager(i) | |
433 | 428 | if ((checkCaller == checkCaller)) | |
434 | 429 | then { | |
435 | 430 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
436 | 431 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
437 | 432 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
438 | 433 | else throw("Strict value is not equal to itself.") | |
439 | 434 | } | |
440 | 435 | else throw("Strict value is not equal to itself.") | |
441 | 436 | } | |
442 | 437 | ||
443 | 438 | ||
444 | 439 | ||
445 | 440 | @Callable(i) | |
446 | 441 | func confirmManager () = { | |
447 | 442 | let pm = pendingManagerPublicKeyOrUnit() | |
448 | 443 | let hasPM = if (isDefined(pm)) | |
449 | 444 | then true | |
450 | 445 | else throw("No pending manager") | |
451 | 446 | if ((hasPM == hasPM)) | |
452 | 447 | then { | |
453 | 448 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
454 | 449 | then true | |
455 | 450 | else throw("You are not pending manager") | |
456 | 451 | if ((checkPM == checkPM)) | |
457 | 452 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
458 | 453 | else throw("Strict value is not equal to itself.") | |
459 | 454 | } | |
460 | 455 | else throw("Strict value is not equal to itself.") | |
461 | 456 | } | |
462 | 457 | ||
463 | 458 | ||
464 | 459 | ||
465 | 460 | @Callable(i) | |
466 | 461 | func isVerifiedREADONLY (assetId) = $Tuple2(nil, isVerified(assetId)) | |
467 | 462 | ||
468 | 463 | ||
469 | 464 | @Verifier(tx) | |
470 | 465 | func verify () = { | |
471 | 466 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
472 | 467 | case pk: ByteVector => | |
473 | 468 | pk | |
474 | 469 | case _: Unit => | |
475 | 470 | tx.senderPublicKey | |
476 | 471 | case _ => | |
477 | 472 | throw("Match error") | |
478 | 473 | } | |
479 | 474 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
480 | 475 | } | |
481 | 476 |
github/deemru/w8io/026f985 66.17 ms ◑