tx · CHE3yBzKXqXbe7ggvWiCZzCwRWkTvVjWnCGYyKAjp9zN

3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh:  -0.01400000 Waves

2023.07.26 17:30 [2682953] smart account 3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh > SELF 0.00000000 Waves

{ "type": 13, "id": "CHE3yBzKXqXbe7ggvWiCZzCwRWkTvVjWnCGYyKAjp9zN", "fee": 1400000, "feeAssetId": null, "timestamp": 1690381798572, "version": 2, "chainId": 84, "sender": "3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh", "senderPublicKey": "Ap7CkWd6fzBU34kGo4GJJzC5q4qWXuLVunzE25PchdGS", "proofs": [ "24Z1ikKyNvM4sHuNuCTw3zDqfNg13NJEQ5VzWvBVxjouQPL5GMgY2teFVm6zdHkKuWyd4QVYH8HJiMjygHvkaLbo" ], "script": "base64:BgK8EAgCEgkKBwgICBgBCAESABIAEggKBggICAgICBIDCgEYEgASBAoCCAgSBAoCCAgSBAoCCAgiEGNvbnRyYWN0RmlsZW5hbWUiA1NFUCIMd2F2ZXNBc3NldElkIgdWTFRQT09MIghTVEJMUE9PTCIRaW52YWxpZFByaWNlQXNzZXQiB3dyYXBFcnIiA21zZyIIdGhyb3dFcnIiB3Rocm93UEQiFHRocm93Q3JlYXRlTm90Q2FsbGVkIhF0aHJvd1lvdU5vdElzc3VlciIPdGhyb3dQb29sRXhpc3RzIhV0aHJvd0Fzc2V0Tm90VmVyaWZpZWQiFnRocm93SW52YWxpZFByaWNlQXNzZXQiFHRocm93SW52YWxpZEZlZUFzc2V0Ihd0aHJvd0ludmFsaWRBbW91bnRBc3NldCISdGhyb3dJbnZhbGlkU3RhdHVzIh90aHJvd0NhbkFjdGl2YXRlT25seVBlbmRpbmdQb29sIh10aHJvd0ZhY3RvcnlSZXR1cm5lZE5vdFN0cmluZyIcdGhyb3dJbnZhbGlkUHJpY2VBc3NldEFtb3VudCIPdGhyb3dJbnZhbGlkRm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VFbnRyeQEJAQFBAgUBQgUBQwkAzAgCCQELRGVsZXRlRW50cnkBCQEBUAIFAUIFAUMJAMwIAgkBC0RlbGV0ZUVudHJ5AQkBAVECBQFCBQFDCQDMCAIJAQtEZWxldGVFbnRyeQEJAQFTAgUBQgUBQwUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJiegECYkEABAJiQgQBWgkBAmFtAAMJAAECBQFaAgpCeXRlVmVjdG9yBAJhcQUBWgUCYXEDCQABAgUBWgIEVW5pdAgFAmJ6D3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJieglib2R5Qnl0ZXMJAJEDAggFAmJ6BnByb29mcwAABQJiQrNxask=", "height": 2682953, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2cDNMGiARSFtkTSMntJGfATghuigRwowqBhP5CPS5Bhk Next: H6aUgE3nfNmUM4k6gjYVFKypGcgiVsJLLXpPY53tdjqh Diff:
OldNewDifferences
146146 case s: String =>
147147 if ((size(s) == 0))
148148 then nil
149- else split(s, SEP)
149+ else split_4C(s, SEP)
150150 case _: Unit =>
151151 nil
152152 case _ =>
229229 let amountAssetPayment = value(i.payments[0])
230230 let priceAssetPayment = value(i.payments[1])
231231 let feeAssetPayment = value(i.payments[2])
232- let $t064836555 = getIdAndInfo(amountAssetPayment)
233- let amountAssetId = $t064836555._1
234- let amountAssetInfo = $t064836555._2
235- let $t065586627 = getIdAndInfo(priceAssetPayment)
236- let priceAssetId = $t065586627._1
237- let priceAssetInfo = $t065586627._2
238- let $t066306693 = getIdAndInfo(feeAssetPayment)
239- let feeAssetId = $t066306693._1
240- let feeAssetInfo = $t066306693._2
232+ let $t064866558 = getIdAndInfo(amountAssetPayment)
233+ let amountAssetId = $t064866558._1
234+ let amountAssetInfo = $t064866558._2
235+ let $t065616630 = getIdAndInfo(priceAssetPayment)
236+ let priceAssetId = $t065616630._1
237+ let priceAssetInfo = $t065616630._2
238+ let $t066336696 = getIdAndInfo(feeAssetPayment)
239+ let feeAssetId = $t066336696._1
240+ let feeAssetInfo = $t066336696._2
241241 let amountAssetAmount = amountAssetPayment.amount
242242 let priceAssetAmount = priceAssetPayment.amount
243243 let feeAssetAmount = feeAssetPayment.amount
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let contractFilename = "user_pools.ride"
55
66 let SEP = "__"
77
88 let wavesAssetId = "WAVES"
99
1010 let VLTPOOL = "VLTPOOL"
1111
1212 let STBLPOOL = "STBLPOOL"
1313
1414 let invalidPriceAsset = "Invalid price asset"
1515
1616 func wrapErr (msg) = makeString([contractFilename, ": ", msg], "")
1717
1818
1919 func throwErr (msg) = throw(wrapErr(msg))
2020
2121
2222 func throwPD () = throwErr("Permission denied")
2323
2424
2525 func throwCreateNotCalled () = throwErr("Create is not called for assets pair")
2626
2727
2828 func throwYouNotIssuer () = throwErr("You are not amountAsset issuer")
2929
3030
3131 func throwPoolExists () = throwErr("Pool with such assets already exists")
3232
3333
3434 func throwAssetNotVerified () = throwErr("Asset is not verified")
3535
3636
3737 func throwInvalidPriceAsset () = throwErr(invalidPriceAsset)
3838
3939
4040 func throwInvalidFeeAsset () = throwErr("Invalid fee asset")
4141
4242
4343 func throwInvalidAmountAsset () = throwErr("Invalid amount asset attached")
4444
4545
4646 func throwInvalidStatus () = throwErr("Invalid status")
4747
4848
4949 func throwCanActivateOnlyPendingPool () = throwErr("Can activate pool only in 'pending' status")
5050
5151
5252 func throwFactoryReturnedNotString () = throwErr("FactoryV2 returned not string")
5353
5454
5555 func throwInvalidPriceAssetAmount () = throwErr("invalid price asset amount")
5656
5757
5858 func throwInvalidFee () = throwErr("invalid fee")
5959
6060
6161 func throwInvalidAssetPair () = throwErr("invalid asset pair")
6262
6363
6464 func keyManagerPublicKey () = makeString(["%s", "managerPublicKey"], SEP)
6565
6666
6767 func keyManagerVaultAddress () = "%s__managerVaultAddress"
6868
6969
7070 func keyAdminPubKeys () = makeString(["%s", "adminPubKeys"], SEP)
7171
7272
7373 func keyStatus (amountAssetId,priceAssetId) = makeString(["%s%s%s", "status", amountAssetId, priceAssetId], SEP)
7474
7575
7676 func keyFactoryContract () = makeString(["%s", "factoryContract"], SEP)
7777
7878
7979 func keyAssetsStoreContract () = makeString(["%s", "assetsStoreContract"], SEP)
8080
8181
8282 func keyEmissionContract () = makeString(["%s", "emissionContract"], SEP)
8383
8484
8585 func keySuffix (amountAssetId,priceAssetId) = makeString(["%s%s%s", "suffix", amountAssetId, priceAssetId], SEP)
8686
8787
8888 func keyLastIndex () = makeString(["%s", "lastIndex"], SEP)
8989
9090
9191 let indexSuffix = "u"
9292
9393 let statusPending = "pending"
9494
9595 let statusDeclined = "declined"
9696
9797 let statusActive = "active"
9898
9999 let statuses = [statusPending, statusDeclined, statusActive]
100100
101101 func keyCreateCalled (amountAssetId,priceAssetId) = makeString(["%s%s%s", "createCalled", amountAssetId, priceAssetId], SEP)
102102
103103
104104 func keyCreateCaller (amountAssetId,priceAssetId) = makeString(["%s%s%s", "createCaller", amountAssetId, priceAssetId], SEP)
105105
106106
107107 func keyAmountAssetAmount (amountAssetId,priceAssetId) = makeString(["%s%s%s", "amountAssetAmount", amountAssetId, priceAssetId], SEP)
108108
109109
110110 func keyPriceAssetAmount (amountAssetId,priceAssetId) = makeString(["%s%s%s", "priceAssetAmount", amountAssetId, priceAssetId], SEP)
111111
112112
113113 func keyHeight (amountAssetId,priceAssetId) = makeString(["%s%s%s", "height", amountAssetId, priceAssetId], SEP)
114114
115115
116116 func keyPoolType (amountAssetId,priceAssetId) = makeString(["%s%s%s", "poolType", amountAssetId, priceAssetId], SEP)
117117
118118
119119 func keyFeeAssetId () = makeString(["%s", "feeAssetId"], SEP)
120120
121121
122122 func keyFeeAmount () = makeString(["%s", "feeAmount"], SEP)
123123
124124
125125 func keyAmountAssetMinAmount () = makeString(["%s", "amountAssetMinAmount"], SEP)
126126
127127
128128 func keyPriceAssetsMinAmount () = makeString(["%s", "priceAssetsMinAmount"], SEP)
129129
130130
131131 func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP)
132132
133133
134134 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
135135 case s: String =>
136136 addressFromStringValue(s)
137137 case _ =>
138138 this
139139 }
140140
141141
142142 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined"))
143143
144144
145145 func stringOptionToList (stringOrUnit) = match stringOrUnit {
146146 case s: String =>
147147 if ((size(s) == 0))
148148 then nil
149- else split(s, SEP)
149+ else split_4C(s, SEP)
150150 case _: Unit =>
151151 nil
152152 case _ =>
153153 throw("Match error")
154154 }
155155
156156
157157 let factoryContract = addressFromStringValue(getStringOrFail(keyFactoryContract()))
158158
159159 let keyVotingEmissionContract = makeString(["%s", "votingEmissionContract"], SEP)
160160
161161 let votingEmissionContract = addressFromStringValue(valueOrErrorMessage(getString(factoryContract, keyVotingEmissionContract), wrapErr("voting emission contract address is required")))
162162
163163 let keyVotingEmissionCandidateContract = makeString(["%s", "votingEmissionCandidateContract"], SEP)
164164
165165 let votingEmissionCandidateContract = addressFromStringValue(valueOrErrorMessage(getString(votingEmissionContract, keyVotingEmissionCandidateContract), wrapErr("voting emission candidate contract address is required")))
166166
167167 func isCreateCalled (amountAssetId,priceAssetId) = valueOrElse(getBoolean(keyCreateCalled(amountAssetId, priceAssetId)), false)
168168
169169
170170 func mustCreateCalled (amountAssetId,priceAssetId) = if (isCreateCalled(amountAssetId, priceAssetId))
171171 then true
172172 else throwCreateNotCalled()
173173
174174
175175 func managerPublicKeyOrUnit () = {
176176 let managerVaultAddress = getManagerVaultAddressOrThis()
177177 match getString(managerVaultAddress, keyManagerPublicKey()) {
178178 case s: String =>
179179 fromBase58String(s)
180180 case _: Unit =>
181181 unit
182182 case _ =>
183183 throw("Match error")
184184 }
185185 }
186186
187187
188188 func isManager (i) = match managerPublicKeyOrUnit() {
189189 case pk: ByteVector =>
190190 (i.callerPublicKey == pk)
191191 case _: Unit =>
192192 (i.caller == this)
193193 case _ =>
194194 throw("Match error")
195195 }
196196
197197
198198 func mustManager (i) = if (isManager(i))
199199 then true
200200 else throwPD()
201201
202202
203203 func mustAdmin (i) = {
204204 let adminPKs = stringOptionToList(getString(keyAdminPubKeys()))
205205 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
206206 then true
207207 else mustManager(i)
208208 }
209209
210210
211211 func isVerified (assetId) = (valueOrElse(getInteger(addressFromStringValue(getStringOrFail(keyAssetsStoreContract())), (("status_<" + assetId) + ">")), 0) == 2)
212212
213213
214214 func getIdAndInfo (payment) = match payment.assetId {
215215 case id: ByteVector =>
216216 let info = value(assetInfo(id))
217217 $Tuple2(toBase58String(id), info)
218218 case _: Unit =>
219219 $Tuple2(wavesAssetId, unit)
220220 case _ =>
221221 throw("Match error")
222222 }
223223
224224
225225 func validStatus (status) = containsElement(statuses, status)
226226
227227
228228 func _create (i,poolType) = {
229229 let amountAssetPayment = value(i.payments[0])
230230 let priceAssetPayment = value(i.payments[1])
231231 let feeAssetPayment = value(i.payments[2])
232- let $t064836555 = getIdAndInfo(amountAssetPayment)
233- let amountAssetId = $t064836555._1
234- let amountAssetInfo = $t064836555._2
235- let $t065586627 = getIdAndInfo(priceAssetPayment)
236- let priceAssetId = $t065586627._1
237- let priceAssetInfo = $t065586627._2
238- let $t066306693 = getIdAndInfo(feeAssetPayment)
239- let feeAssetId = $t066306693._1
240- let feeAssetInfo = $t066306693._2
232+ let $t064866558 = getIdAndInfo(amountAssetPayment)
233+ let amountAssetId = $t064866558._1
234+ let amountAssetInfo = $t064866558._2
235+ let $t065616630 = getIdAndInfo(priceAssetPayment)
236+ let priceAssetId = $t065616630._1
237+ let priceAssetInfo = $t065616630._2
238+ let $t066336696 = getIdAndInfo(feeAssetPayment)
239+ let feeAssetId = $t066336696._1
240+ let feeAssetInfo = $t066336696._2
241241 let amountAssetAmount = amountAssetPayment.amount
242242 let priceAssetAmount = priceAssetPayment.amount
243243 let feeAssetAmount = feeAssetPayment.amount
244244 let priceAssetsList = stringOptionToList(getString(factoryContract, keyPriceAssets()))
245245 let assetMinAmountDefault = getIntegerValue(keyAmountAssetMinAmount())
246246 let allowedAssetsMinAmounts = stringOptionToList(getString(keyPriceAssetsMinAmount()))
247247 let amountAssetMinAmount = if (containsElement(priceAssetsList, amountAssetId))
248248 then {
249249 let priceAssetsIndex = valueOrErrorMessage(indexOf(priceAssetsList, amountAssetId), invalidPriceAsset)
250250 value(parseInt(allowedAssetsMinAmounts[priceAssetsIndex]))
251251 }
252252 else assetMinAmountDefault
253253 let priceAssetMinAmount = if (containsElement(priceAssetsList, priceAssetId))
254254 then {
255255 let priceAssetsIndex = valueOrErrorMessage(indexOf(priceAssetsList, priceAssetId), invalidPriceAsset)
256256 value(parseInt(allowedAssetsMinAmounts[priceAssetsIndex]))
257257 }
258258 else assetMinAmountDefault
259259 let lastIndex = valueOrElse(getInteger(keyLastIndex()), 0)
260260 let curIndex = (lastIndex + 1)
261261 let emissionContract = addressFromStringValue(getStringOrFail(keyEmissionContract()))
262262 let poolExists = {
263263 let @ = invoke(factoryContract, "poolExistsREADONLY", [amountAssetId, priceAssetId], nil)
264264 if ($isInstanceOf(@, "Boolean"))
265265 then @
266266 else throw(($getType(@) + " couldn't be cast to Boolean"))
267267 }
268268 let checks = [if (!(isCreateCalled(amountAssetId, priceAssetId)))
269269 then true
270270 else throwPoolExists(), if (!(poolExists))
271271 then true
272272 else throwPoolExists(), if ((amountAssetId != priceAssetId))
273273 then true
274274 else throwInvalidAssetPair(), if (if (isManager(i))
275275 then true
276276 else if (isVerified(amountAssetId))
277277 then isVerified(priceAssetId)
278278 else false)
279279 then true
280280 else throwInvalidAssetPair(), if (if (containsElement(priceAssetsList, amountAssetId))
281281 then true
282282 else containsElement(priceAssetsList, priceAssetId))
283283 then true
284284 else throwInvalidAssetPair(), if (if (isManager(i))
285285 then true
286286 else (getString(keyFeeAssetId()) == feeAssetId))
287287 then true
288288 else throwInvalidFeeAsset(), if (if (isManager(i))
289289 then true
290290 else (amountAssetAmount >= getIntegerValue(keyAmountAssetMinAmount())))
291291 then true
292292 else throwInvalidAmountAsset(), if (if (isManager(i))
293293 then true
294294 else (priceAssetAmount >= priceAssetMinAmount))
295295 then true
296296 else throwInvalidPriceAssetAmount(), if (if (isManager(i))
297297 then true
298298 else (feeAssetAmount == getInteger(keyFeeAmount())))
299299 then true
300300 else throwInvalidFee()]
301301 if ((checks == checks))
302302 then {
303303 let paymentsWithFeeSize = 3
304304 let burnEmissionInv = if ((size(i.payments) >= paymentsWithFeeSize))
305305 then invoke(emissionContract, "burn", nil, [AttachedPayment(fromBase58String(feeAssetId), feeAssetAmount)])
306306 else unit
307307 if ((burnEmissionInv == burnEmissionInv))
308308 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), amountAssetAmount), IntegerEntry(keyPriceAssetAmount(amountAssetId, priceAssetId), priceAssetAmount), StringEntry(keyPoolType(amountAssetId, priceAssetId), poolType)]
309309 else throw("Strict value is not equal to itself.")
310310 }
311311 else throw("Strict value is not equal to itself.")
312312 }
313313
314314
315315 @Callable(i)
316316 func constructor (factoryV2Address,assetsStoreAddress,emissionAddress,priceAssetsMinAmount,amountAssetMinAmount,feeAssetId,feeAmount) = {
317317 let checkCaller = mustManager(i)
318318 if ((checkCaller == checkCaller))
319319 then [StringEntry(keyFactoryContract(), factoryV2Address), StringEntry(keyAssetsStoreContract(), assetsStoreAddress), StringEntry(keyEmissionContract(), emissionAddress), StringEntry(keyPriceAssetsMinAmount(), makeString(priceAssetsMinAmount, SEP)), IntegerEntry(keyAmountAssetMinAmount(), amountAssetMinAmount), StringEntry(keyFeeAssetId(), feeAssetId), IntegerEntry(keyFeeAmount(), feeAmount)]
320320 else throw("Strict value is not equal to itself.")
321321 }
322322
323323
324324
325325 @Callable(i)
326326 func create () = _create(i, VLTPOOL)
327327
328328
329329
330330 @Callable(i)
331331 func createStable () = {
332332 let checkCaller = mustManager(i)
333333 if ((checkCaller == checkCaller))
334334 then _create(i, STBLPOOL)
335335 else throw("Strict value is not equal to itself.")
336336 }
337337
338338
339339
340340 @Callable(i)
341341 func activate (poolAddress,amountAssetId,amountAssetTicker,priceAssetId,priceAssetTicker,logo) = {
342342 let checks = [mustAdmin(i), if (isCreateCalled(amountAssetId, priceAssetId))
343343 then true
344344 else throwCreateNotCalled(), if ((value(getString(keyStatus(amountAssetId, priceAssetId))) == statusPending))
345345 then true
346346 else throwCanActivateOnlyPendingPool()]
347347 if ((checks == checks))
348348 then {
349349 let poolTypeOption = getString(this, keyPoolType(amountAssetId, priceAssetId))
350350 let activateNewPoolInv = invoke(factoryContract, "activateNewPool", [poolAddress, amountAssetId, priceAssetId, ((amountAssetTicker + priceAssetTicker) + "LP"), (((amountAssetTicker + "/") + priceAssetTicker) + " pool liquidity provider token"), 0, if ((poolTypeOption == unit))
351351 then "VLTPOOL"
352352 else value(poolTypeOption), logo], nil)
353353 if ((activateNewPoolInv == activateNewPoolInv))
354354 then {
355355 let lpAssetId = match activateNewPoolInv {
356356 case id: String =>
357357 id
358358 case _ =>
359359 throwFactoryReturnedNotString()
360360 }
361361 if ((lpAssetId == lpAssetId))
362362 then {
363363 let beforePut = assetBalance(this, fromBase58String(lpAssetId))
364364 if ((beforePut == beforePut))
365365 then {
366366 let put = invoke(addressFromStringValue(poolAddress), "put", [0, false], [AttachedPayment(if ((amountAssetId == "WAVES"))
367367 then unit
368368 else fromBase58String(amountAssetId), value(getInteger(keyAmountAssetAmount(amountAssetId, priceAssetId)))), AttachedPayment(if ((priceAssetId == "WAVES"))
369369 then unit
370370 else fromBase58String(priceAssetId), value(getInteger(keyPriceAssetAmount(amountAssetId, priceAssetId))))])
371371 if ((put == put))
372372 then {
373373 let afterPut = assetBalance(this, fromBase58String(lpAssetId))
374374 if ((afterPut == afterPut))
375375 then {
376376 let user = value(addressFromString(value(getString(keyCreateCaller(amountAssetId, priceAssetId)))))
377377 let res = invoke(votingEmissionCandidateContract, "approve", [amountAssetId, priceAssetId], nil)
378378 if ((res == res))
379379 then [StringEntry(keyStatus(amountAssetId, priceAssetId), statusActive), ScriptTransfer(user, (afterPut - beforePut), fromBase58String(lpAssetId))]
380380 else throw("Strict value is not equal to itself.")
381381 }
382382 else throw("Strict value is not equal to itself.")
383383 }
384384 else throw("Strict value is not equal to itself.")
385385 }
386386 else throw("Strict value is not equal to itself.")
387387 }
388388 else throw("Strict value is not equal to itself.")
389389 }
390390 else throw("Strict value is not equal to itself.")
391391 }
392392 else throw("Strict value is not equal to itself.")
393393 }
394394
395395
396396
397397 @Callable(i)
398398 func setAdmins (adminPubKeys) = {
399399 let checkCaller = mustManager(i)
400400 if ((checkCaller == checkCaller))
401401 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
402402 else throw("Strict value is not equal to itself.")
403403 }
404404
405405
406406
407407 @Callable(i)
408408 func priceAssetsREADONLY () = $Tuple2(nil, stringOptionToList(getString(keyPriceAssets())))
409409
410410
411411
412412 @Callable(i)
413413 func statusREADONLY (amountAssetId,priceAssetId) = {
414414 let status = match getString(keyStatus(amountAssetId, priceAssetId)) {
415415 case s: String =>
416416 s
417417 case _ =>
418418 unit
419419 }
420420 $Tuple2(nil, status)
421421 }
422422
423423
424424
425425 @Callable(i)
426426 func getPoolCreatorREADONLY (amountAssetId,priceAssetId) = {
427427 let creator = valueOrElse(getString(keyCreateCaller(amountAssetId, priceAssetId)), "")
428428 $Tuple2(nil, creator)
429429 }
430430
431431
432432
433433 @Callable(i)
434434 func deletePool (amountAssetId,priceAssetId) = {
435435 let checkCaller = if (if ((i.caller == factoryContract))
436436 then true
437437 else mustManager(i))
438438 then true
439439 else throwErr("Permission denied")
440440 if ((checkCaller == checkCaller))
441441 then [DeleteEntry(keyCreateCalled(amountAssetId, priceAssetId)), DeleteEntry(keyCreateCaller(amountAssetId, priceAssetId)), DeleteEntry(keySuffix(amountAssetId, priceAssetId)), DeleteEntry(keyHeight(amountAssetId, priceAssetId)), DeleteEntry(keyStatus(amountAssetId, priceAssetId)), DeleteEntry(keyAmountAssetAmount(amountAssetId, priceAssetId)), DeleteEntry(keyPriceAssetAmount(amountAssetId, priceAssetId)), DeleteEntry(keyPoolType(amountAssetId, priceAssetId))]
442442 else throw("Strict value is not equal to itself.")
443443 }
444444
445445
446446 @Verifier(tx)
447447 func verify () = {
448448 let targetPublicKey = match managerPublicKeyOrUnit() {
449449 case pk: ByteVector =>
450450 pk
451451 case _: Unit =>
452452 tx.senderPublicKey
453453 case _ =>
454454 throw("Match error")
455455 }
456456 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
457457 }
458458

github/deemru/w8io/026f985 
65.48 ms