tx · 6csLhFmjMwSie8E2HXQUoeb7AoghQ6bwYcqgvTGEapPo

3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh:  -0.01900000 Waves

2022.09.09 12:17 [2221381] smart account 3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh > SELF 0.00000000 Waves

{ "type": 13, "id": "6csLhFmjMwSie8E2HXQUoeb7AoghQ6bwYcqgvTGEapPo", "fee": 1900000, "feeAssetId": null, "timestamp": 1662715081620, "version": 1, "sender": "3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh", "senderPublicKey": "Ap7CkWd6fzBU34kGo4GJJzC5q4qWXuLVunzE25PchdGS", "proofs": [ "L1uz9SxHjQENkAk1oiJLtC4tWGQ3qEYZNQwaXH7JMsUtJZYqcVtGdgWRtMKWkmFDNmonUFXJbucpduL4dH7snzV" ], "script": "base64:AAIFAAAAAAAAAC0IAhIJCgcICBgYAQgBEgASCAoGCAgICAgIEgMKARgSAwoBCBIAEgASBAoCCAgAAAA1AAAAAANTRVACAAAAAl9fAAAAAAx3YXZlc0Fzc2V0SWQCAAAABVdBVkVTAAAAABFpbnZhbGlkUHJpY2VBc3NldAIAAAATSW52YWxpZCBwcmljZSBhc3NldAEAAAAIdGhyb3dFcnIAAAABAAAAA21zZwkAAAIAAAABCQAEuQAAAAIJAARMAAAAAgIAAAAQdXNlcl9wb29scy5yaWRlOgkABEwAAAACBQAAAANtc2cFAAAAA25pbAIAAAABIAEAAAAHdGhyb3dQRAAAAAAJAQAAAAh0aHJvd0VycgAAAAECAAAAEVBlcm1pc3Npb24gZGVuaWVkAQAAABR0aHJvd0NyZWF0ZU5vdENhbGxlZAAAAAAJAQAAAAh0aHJvd0VycgAAAAECAAAAJENyZWF0ZSBpcyBub3QgY2FsbGVkIGZvciBhc3NldHMgcGFpcgEAAAARdGhyb3dZb3VOb3RJc3N1ZXIAAAAACQEAAAAIdGhyb3dFcnIAAAABAgAAAB5Zb3UgYXJlIG5vdCBhbW91b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QkBAAAADmtleVByaWNlQXNzZXRzAAAAAAAAAAFpAQAAAA5zdGF0dXNSRUFET05MWQAAAAIAAAANYW1vdW50QXNzZXRJZAAAAAxwcmljZUFzc2V0SWQEAAAABnN0YXR1cwQAAAAHJG1hdGNoMAkABCIAAAABCQEAAAAJa2V5U3RhdHVzAAAAAgUAAAANYW1vdW50QXNzZXRJZAUAAAAMcHJpY2VBc3NldElkAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAXMFAAAAByRtYXRjaDAFAAAAAXMFAAAABHVuaXQJAAUUAAAAAgUAAAADbmlsBQAAAAZzdGF0dXMAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAA90YXJnZXRQdWJsaWNLZXkEAAAAByRtYXRjaDAJAQAAABZtYW5hZ2VyUHVibGljS2V5T3JVbml0AAAAAAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAKQnl0ZVZlY3RvcgQAAAACcGsFAAAAByRtYXRjaDAFAAAAAnBrAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAARVbml0CAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5CQAAAgAAAAECAAAAC01hdGNoIGVycm9yCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAPdGFyZ2V0UHVibGljS2V5/4DwvQ==", "chainId": 84, "height": 2221381, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4fhdtpmrsuVQxeDULS4vr6YrEN2498WxaygNFKSWR4fs Next: E6fTFYGVFTrt8D83bs17eBT3fq9Sehqd6tWYT2c8VDyi Diff:
OldNewDifferences
110110 func keyPriceAssetsMinAmount () = makeString(["%s", "priceAssetsMinAmount"], SEP)
111111
112112
113-func keyPriceAssetIds () = makeString(["%s", "priceAssetIds"], SEP)
113+func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP)
114114
115115
116116 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined"))
202202 func constructor (factoryV2Address,assetsStoreAddress,priceAssetIds,priceAssetsMinAmount,amountAssetMinAmount,feeAssetId,feeAmount) = {
203203 let checkCaller = mustManager(i)
204204 if ((checkCaller == checkCaller))
205- then [StringEntry(keyFactoryContract(), factoryV2Address), StringEntry(keyAssetsStoreContract(), assetsStoreAddress), StringEntry(keyPriceAssetIds(), makeString(priceAssetIds, SEP)), StringEntry(keyPriceAssetsMinAmount(), makeString(priceAssetsMinAmount, SEP)), IntegerEntry(keyAmountAssetMinAmount(), amountAssetMinAmount), StringEntry(keyFeeAssetId(), feeAssetId), IntegerEntry(keyFeeAmount(), feeAmount)]
205+ then [StringEntry(keyFactoryContract(), factoryV2Address), StringEntry(keyAssetsStoreContract(), assetsStoreAddress), StringEntry(keyPriceAssets(), makeString(priceAssetIds, SEP)), StringEntry(keyPriceAssetsMinAmount(), makeString(priceAssetsMinAmount, SEP)), IntegerEntry(keyAmountAssetMinAmount(), amountAssetMinAmount), StringEntry(keyFeeAssetId(), feeAssetId), IntegerEntry(keyFeeAmount(), feeAmount)]
206206 else throw("Strict value is not equal to itself.")
207207 }
208208
213213 let amountAssetPayment = value(i.payments[0])
214214 let priceAssetPayment = value(i.payments[1])
215215 let feeAssetPayment = value(i.payments[2])
216- let $t065936665 = getIdAndInfo(amountAssetPayment)
217- let amountAssetId = $t065936665._1
218- let amountAssetInfo = $t065936665._2
219- let $t066686737 = getIdAndInfo(priceAssetPayment)
220- let priceAssetId = $t066686737._1
221- let priceAssetInfo = $t066686737._2
222- let $t067406803 = getIdAndInfo(feeAssetPayment)
223- let feeAssetId = $t067406803._1
224- let feeAssetInfo = $t067406803._2
225- let priceAssetsList = stringOptionToList(getString(factoryContract, keyPriceAssetIds()))
216+ let $t065876659 = getIdAndInfo(amountAssetPayment)
217+ let amountAssetId = $t065876659._1
218+ let amountAssetInfo = $t065876659._2
219+ let $t066626731 = getIdAndInfo(priceAssetPayment)
220+ let priceAssetId = $t066626731._1
221+ let priceAssetInfo = $t066626731._2
222+ let $t067346797 = getIdAndInfo(feeAssetPayment)
223+ let feeAssetId = $t067346797._1
224+ let feeAssetInfo = $t067346797._2
225+ let priceAssetsList = stringOptionToList(getString(factoryContract, keyPriceAssets()))
226226 let managerPriceAssetMinAmount = 1
227227 let priceAssetMinAmount = if (isManager(i))
228228 then managerPriceAssetMinAmount
353353
354354
355355 @Callable(i)
356-func priceAssetsREADONLY () = $Tuple2(nil, stringOptionToList(getString(keyPriceAssetIds())))
356+func priceAssetsREADONLY () = $Tuple2(nil, stringOptionToList(getString(keyPriceAssets())))
357357
358358
359359
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let wavesAssetId = "WAVES"
77
88 let invalidPriceAsset = "Invalid price asset"
99
1010 func throwErr (msg) = throw(makeString(["user_pools.ride:", msg], " "))
1111
1212
1313 func throwPD () = throwErr("Permission denied")
1414
1515
1616 func throwCreateNotCalled () = throwErr("Create is not called for assets pair")
1717
1818
1919 func throwYouNotIssuer () = throwErr("You are not amountAsset issuer")
2020
2121
2222 func throwPoolExists () = throwErr("Pool with such assets already exists")
2323
2424
2525 func throwAssetNotVerified () = throwErr("Asset is not verified")
2626
2727
2828 func throwInvalidPriceAsset () = throwErr(invalidPriceAsset)
2929
3030
3131 func throwInvalidFeeAsset () = throwErr("Invalid fee asset")
3232
3333
3434 func throwInvalidAmountAsset () = throwErr("Invalid amount asset attached")
3535
3636
3737 func throwInvalidStatus () = throwErr("Invalid status")
3838
3939
4040 func throwCanActivateOnlyPendingPool () = throwErr("Can activate pool only in 'pending' status")
4141
4242
4343 func throwFactoryReturnedNotString () = throwErr("FactoryV2 returned not string")
4444
4545
4646 func throwInvalidPriceAssetAmount () = throwErr("invalid price asset amount")
4747
4848
4949 func throwInvalidFee () = throwErr("invalid fee")
5050
5151
5252 func keyManagerPublicKey () = makeString(["%s", "managerPublicKey"], SEP)
5353
5454
5555 func keyPendingManagerPublicKey () = makeString(["%s", "pendingManagerPublicKey"], SEP)
5656
5757
5858 func keyAdminPubKeys () = makeString(["%s", "adminPubKeys"], SEP)
5959
6060
6161 func keyStatus (amountAssetId,priceAssetId) = makeString(["%s%s%s", "status", amountAssetId, priceAssetId], SEP)
6262
6363
6464 func keyFactoryContract () = makeString(["%s", "factoryContract"], SEP)
6565
6666
6767 func keyAssetsStoreContract () = makeString(["%s", "assetsStoreContract"], SEP)
6868
6969
7070 func keySuffix (amountAssetId,priceAssetId) = makeString(["%s%s%s", "suffix", amountAssetId, priceAssetId], SEP)
7171
7272
7373 func keyLastIndex () = makeString(["%s", "lastIndex"], SEP)
7474
7575
7676 let indexSuffix = "u"
7777
7878 let statusPending = "pending"
7979
8080 let statusDeclined = "declined"
8181
8282 let statusActive = "active"
8383
8484 let statuses = [statusPending, statusDeclined, statusActive]
8585
8686 func keyCreateCalled (amountAssetId,priceAssetId) = makeString(["%s%s%s", "createCalled", amountAssetId, priceAssetId], SEP)
8787
8888
8989 func keyCreateCaller (amountAssetId,priceAssetId) = makeString(["%s%s%s", "createCaller", amountAssetId, priceAssetId], SEP)
9090
9191
9292 func keyAmountAssetAmount (amountAssetId,priceAssetId) = makeString(["%s%s%s", "amountAssetAmount", amountAssetId, priceAssetId], SEP)
9393
9494
9595 func keyPriceAssetAmount (amountAssetId,priceAssetId) = makeString(["%s%s%s", "priceAssetAmount", amountAssetId, priceAssetId], SEP)
9696
9797
9898 func keyHeight (amountAssetId,priceAssetId) = makeString(["%s%s%s", "height", amountAssetId, priceAssetId], SEP)
9999
100100
101101 func keyFeeAssetId () = makeString(["%s", "feeAssetId"], SEP)
102102
103103
104104 func keyFeeAmount () = makeString(["%s", "feeAmount"], SEP)
105105
106106
107107 func keyAmountAssetMinAmount () = makeString(["%s", "amountAssetMinAmount"], SEP)
108108
109109
110110 func keyPriceAssetsMinAmount () = makeString(["%s", "priceAssetsMinAmount"], SEP)
111111
112112
113-func keyPriceAssetIds () = makeString(["%s", "priceAssetIds"], SEP)
113+func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP)
114114
115115
116116 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined"))
117117
118118
119119 func stringOptionToList (stringOrUnit) = match stringOrUnit {
120120 case s: String =>
121121 if ((size(s) == 0))
122122 then nil
123123 else split(s, SEP)
124124 case _: Unit =>
125125 nil
126126 case _ =>
127127 throw("Match error")
128128 }
129129
130130
131131 let factoryContract = addressFromStringValue(getStringOrFail(keyFactoryContract()))
132132
133133 func isCreateCalled (amountAssetId,priceAssetId) = valueOrElse(getBoolean(keyCreateCalled(amountAssetId, priceAssetId)), false)
134134
135135
136136 func mustCreateCalled (amountAssetId,priceAssetId) = if (isCreateCalled(amountAssetId, priceAssetId))
137137 then true
138138 else throwCreateNotCalled()
139139
140140
141141 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
142142 case s: String =>
143143 fromBase58String(s)
144144 case _: Unit =>
145145 unit
146146 case _ =>
147147 throw("Match error")
148148 }
149149
150150
151151 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
152152 case s: String =>
153153 fromBase58String(s)
154154 case _: Unit =>
155155 unit
156156 case _ =>
157157 throw("Match error")
158158 }
159159
160160
161161 func isManager (i) = match managerPublicKeyOrUnit() {
162162 case pk: ByteVector =>
163163 (i.callerPublicKey == pk)
164164 case _: Unit =>
165165 (i.caller == this)
166166 case _ =>
167167 throw("Match error")
168168 }
169169
170170
171171 func mustManager (i) = if (isManager(i))
172172 then true
173173 else throwPD()
174174
175175
176176 func mustAdmin (i) = {
177177 let adminPKs = stringOptionToList(getString(keyAdminPubKeys()))
178178 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
179179 then true
180180 else mustManager(i)
181181 }
182182
183183
184184 func isVerified (assetId) = (valueOrElse(getInteger(addressFromStringValue(getStringOrFail(keyAssetsStoreContract())), (("status_<" + assetId) + ">")), 0) == 2)
185185
186186
187187 func getIdAndInfo (payment) = match payment.assetId {
188188 case id: ByteVector =>
189189 let info = value(assetInfo(id))
190190 $Tuple2(toBase58String(id), info)
191191 case _: Unit =>
192192 $Tuple2(wavesAssetId, unit)
193193 case _ =>
194194 throw("Match error")
195195 }
196196
197197
198198 func validStatus (status) = containsElement(statuses, status)
199199
200200
201201 @Callable(i)
202202 func constructor (factoryV2Address,assetsStoreAddress,priceAssetIds,priceAssetsMinAmount,amountAssetMinAmount,feeAssetId,feeAmount) = {
203203 let checkCaller = mustManager(i)
204204 if ((checkCaller == checkCaller))
205- then [StringEntry(keyFactoryContract(), factoryV2Address), StringEntry(keyAssetsStoreContract(), assetsStoreAddress), StringEntry(keyPriceAssetIds(), makeString(priceAssetIds, SEP)), StringEntry(keyPriceAssetsMinAmount(), makeString(priceAssetsMinAmount, SEP)), IntegerEntry(keyAmountAssetMinAmount(), amountAssetMinAmount), StringEntry(keyFeeAssetId(), feeAssetId), IntegerEntry(keyFeeAmount(), feeAmount)]
205+ then [StringEntry(keyFactoryContract(), factoryV2Address), StringEntry(keyAssetsStoreContract(), assetsStoreAddress), StringEntry(keyPriceAssets(), makeString(priceAssetIds, SEP)), StringEntry(keyPriceAssetsMinAmount(), makeString(priceAssetsMinAmount, SEP)), IntegerEntry(keyAmountAssetMinAmount(), amountAssetMinAmount), StringEntry(keyFeeAssetId(), feeAssetId), IntegerEntry(keyFeeAmount(), feeAmount)]
206206 else throw("Strict value is not equal to itself.")
207207 }
208208
209209
210210
211211 @Callable(i)
212212 func create () = {
213213 let amountAssetPayment = value(i.payments[0])
214214 let priceAssetPayment = value(i.payments[1])
215215 let feeAssetPayment = value(i.payments[2])
216- let $t065936665 = getIdAndInfo(amountAssetPayment)
217- let amountAssetId = $t065936665._1
218- let amountAssetInfo = $t065936665._2
219- let $t066686737 = getIdAndInfo(priceAssetPayment)
220- let priceAssetId = $t066686737._1
221- let priceAssetInfo = $t066686737._2
222- let $t067406803 = getIdAndInfo(feeAssetPayment)
223- let feeAssetId = $t067406803._1
224- let feeAssetInfo = $t067406803._2
225- let priceAssetsList = stringOptionToList(getString(factoryContract, keyPriceAssetIds()))
216+ let $t065876659 = getIdAndInfo(amountAssetPayment)
217+ let amountAssetId = $t065876659._1
218+ let amountAssetInfo = $t065876659._2
219+ let $t066626731 = getIdAndInfo(priceAssetPayment)
220+ let priceAssetId = $t066626731._1
221+ let priceAssetInfo = $t066626731._2
222+ let $t067346797 = getIdAndInfo(feeAssetPayment)
223+ let feeAssetId = $t067346797._1
224+ let feeAssetInfo = $t067346797._2
225+ let priceAssetsList = stringOptionToList(getString(factoryContract, keyPriceAssets()))
226226 let managerPriceAssetMinAmount = 1
227227 let priceAssetMinAmount = if (isManager(i))
228228 then managerPriceAssetMinAmount
229229 else {
230230 let priceAssetsIndex = valueOrErrorMessage(indexOf(priceAssetsList, priceAssetId), invalidPriceAsset)
231231 value(parseInt(stringOptionToList(getString(keyPriceAssetsMinAmount()))[priceAssetsIndex]))
232232 }
233233 let lastIndex = valueOrElse(getInteger(keyLastIndex()), 0)
234234 let curIndex = (lastIndex + 1)
235235 let checks = [if (!(isCreateCalled(amountAssetId, priceAssetId)))
236236 then true
237237 else throwPoolExists(), if (if (isManager(i))
238238 then true
239239 else isVerified(amountAssetId))
240240 then true
241241 else throwAssetNotVerified(), if ((getString(keyFeeAssetId()) == feeAssetId))
242242 then true
243243 else throwInvalidFeeAsset(), if (if (isManager(i))
244244 then true
245245 else (amountAssetPayment.amount >= getIntegerValue(keyAmountAssetMinAmount())))
246246 then true
247247 else throwInvalidAmountAsset(), if (if (isManager(i))
248248 then true
249249 else (priceAssetPayment.amount >= priceAssetMinAmount))
250250 then true
251251 else throwInvalidPriceAssetAmount(), if ((feeAssetPayment.amount == getInteger(keyFeeAmount())))
252252 then true
253253 else throwInvalidFee()]
254254 if ((checks == checks))
255255 then [BooleanEntry(keyCreateCalled(amountAssetId, priceAssetId), true), StringEntry(keyCreateCaller(amountAssetId, priceAssetId), toString(i.caller)), IntegerEntry(keyLastIndex(), curIndex), StringEntry(keySuffix(amountAssetId, priceAssetId), (toString(curIndex) + indexSuffix)), IntegerEntry(keyHeight(amountAssetId, priceAssetId), height), StringEntry(keyStatus(amountAssetId, priceAssetId), statusPending), IntegerEntry(keyAmountAssetAmount(amountAssetId, priceAssetId), amountAssetPayment.amount), IntegerEntry(keyPriceAssetAmount(amountAssetId, priceAssetId), priceAssetPayment.amount)]
256256 else throw("Strict value is not equal to itself.")
257257 }
258258
259259
260260
261261 @Callable(i)
262262 func activate (poolAddress,amountAssetId,amountAssetTicker,priceAssetId,priceAssetTicker,logo) = {
263263 let checks = [mustAdmin(i), if (isCreateCalled(amountAssetId, priceAssetId))
264264 then true
265265 else throwCreateNotCalled(), if ((value(getString(keyStatus(amountAssetId, priceAssetId))) == statusPending))
266266 then true
267267 else throwCanActivateOnlyPendingPool()]
268268 if ((checks == checks))
269269 then {
270270 let activateNewPoolInv = invoke(factoryContract, "activateNewPool", [poolAddress, amountAssetId, priceAssetId, ((amountAssetTicker + priceAssetTicker) + "LP"), (((amountAssetTicker + "/") + priceAssetTicker) + " pool liquidity provider token"), 0, "VLTPOOL", logo], nil)
271271 if ((activateNewPoolInv == activateNewPoolInv))
272272 then {
273273 let lpAssetId = match activateNewPoolInv {
274274 case id: String =>
275275 id
276276 case _ =>
277277 throwFactoryReturnedNotString()
278278 }
279279 if ((lpAssetId == lpAssetId))
280280 then {
281281 let beforePut = assetBalance(this, fromBase58String(lpAssetId))
282282 if ((beforePut == beforePut))
283283 then {
284284 let put = invoke(addressFromStringValue(poolAddress), "put", [0, false], [AttachedPayment(fromBase58String(amountAssetId), value(getInteger(keyAmountAssetAmount(amountAssetId, priceAssetId)))), AttachedPayment(if ((priceAssetId == "WAVES"))
285285 then unit
286286 else fromBase58String(priceAssetId), value(getInteger(keyPriceAssetAmount(amountAssetId, priceAssetId))))])
287287 if ((put == put))
288288 then {
289289 let afterPut = assetBalance(this, fromBase58String(lpAssetId))
290290 if ((afterPut == afterPut))
291291 then {
292292 let user = value(addressFromString(value(getString(keyCreateCaller(amountAssetId, priceAssetId)))))
293293 [StringEntry(keyStatus(amountAssetId, priceAssetId), statusActive), ScriptTransfer(user, (afterPut - beforePut), fromBase58String(lpAssetId))]
294294 }
295295 else throw("Strict value is not equal to itself.")
296296 }
297297 else throw("Strict value is not equal to itself.")
298298 }
299299 else throw("Strict value is not equal to itself.")
300300 }
301301 else throw("Strict value is not equal to itself.")
302302 }
303303 else throw("Strict value is not equal to itself.")
304304 }
305305 else throw("Strict value is not equal to itself.")
306306 }
307307
308308
309309
310310 @Callable(i)
311311 func setAdmins (adminPubKeys) = {
312312 let checkCaller = mustManager(i)
313313 if ((checkCaller == checkCaller))
314314 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
315315 else throw("Strict value is not equal to itself.")
316316 }
317317
318318
319319
320320 @Callable(i)
321321 func setManager (pendingManagerPublicKey) = {
322322 let checkCaller = mustManager(i)
323323 if ((checkCaller == checkCaller))
324324 then {
325325 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
326326 if ((checkManagerPublicKey == checkManagerPublicKey))
327327 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
328328 else throw("Strict value is not equal to itself.")
329329 }
330330 else throw("Strict value is not equal to itself.")
331331 }
332332
333333
334334
335335 @Callable(i)
336336 func confirmManager () = {
337337 let pm = pendingManagerPublicKeyOrUnit()
338338 let hasPM = if (isDefined(pm))
339339 then true
340340 else throw("No pending manager")
341341 if ((hasPM == hasPM))
342342 then {
343343 let checkPM = if ((i.callerPublicKey == value(pm)))
344344 then true
345345 else throw("You are not pending manager")
346346 if ((checkPM == checkPM))
347347 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
348348 else throw("Strict value is not equal to itself.")
349349 }
350350 else throw("Strict value is not equal to itself.")
351351 }
352352
353353
354354
355355 @Callable(i)
356-func priceAssetsREADONLY () = $Tuple2(nil, stringOptionToList(getString(keyPriceAssetIds())))
356+func priceAssetsREADONLY () = $Tuple2(nil, stringOptionToList(getString(keyPriceAssets())))
357357
358358
359359
360360 @Callable(i)
361361 func statusREADONLY (amountAssetId,priceAssetId) = {
362362 let status = match getString(keyStatus(amountAssetId, priceAssetId)) {
363363 case s: String =>
364364 s
365365 case _ =>
366366 unit
367367 }
368368 $Tuple2(nil, status)
369369 }
370370
371371
372372 @Verifier(tx)
373373 func verify () = {
374374 let targetPublicKey = match managerPublicKeyOrUnit() {
375375 case pk: ByteVector =>
376376 pk
377377 case _: Unit =>
378378 tx.senderPublicKey
379379 case _ =>
380380 throw("Match error")
381381 }
382382 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
383383 }
384384

github/deemru/w8io/026f985 
76.43 ms