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