tx · 8VMLbvKuxLnnqbh5BMzKX74ywJMra4hS6pZXLKLRkW8m

3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh:  -0.01800000 Waves

2024.12.18 09:56 [3419649] smart account 3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh > SELF 0.00000000 Waves

{ "type": 13, "id": "8VMLbvKuxLnnqbh5BMzKX74ywJMra4hS6pZXLKLRkW8m", "fee": 1800000, "feeAssetId": null, "timestamp": 1734505029057, "version": 2, "chainId": 84, "sender": "3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh", "senderPublicKey": "Ap7CkWd6fzBU34kGo4GJJzC5q4qWXuLVunzE25PchdGS", "proofs": [ "4NHveRmRwydEsfyX7WmDj3Kw3gKtrzcLWrLMhzdyQzzPR652DfAFPPdKgNmSaYi79D3m2Scocdc2zeeg4smZrWfv" ], "script": "base64:BgIyCAISBwoFCAgICAESABIAEggKBggICAgICBIDCgEYEgASBAoCCAgSBAoCCAgSBAoCCAhDABBjb250cmFjdEZpbGVuYW1lAg91c2VyX3Bvb2xzLnJpZGUAA1NFUAICX18ADHdhdmVzQXNzZXRJZAIFV0FWRVMAB1ZMVFBPT0wCB1ZMVFBPT0wACFNUQkxQT09MAghTVEJMUE9PTAARaW52YWxpZFByaWNlQXNzZXQCE0ludmFsaWQgcHJpY2UgYXNzZXQBB3dyYXBFcnIBA21zZwkAuQkCCQDMCAIFEGNvbnRyYWN0RmlsZW5hbWUJAMwIAgICOiAJAMwIAgUDbXNnBQNuaWwCAAEIdGhyb3dFcnIBA21zZwkAAgEJAQd3cmFwRXJyAQUDbXNnAQd0aHJvd1BEAAkBCHRocm93RXJyAQIRUGVybWlzc2lvbiBkZW5pZWQBFHRocm93Q3JlYXRlTm90Q2FsbGVkAAkBCHRocm93RXJyAQIkQ3JlYXRlIGlzIG5vdCBjYWxsZWQgZm9yIGFzc2V0cyBwYWlyARF0aHJvd1lvdU5vdElzc3VlcgAJAQh0aHJvd0VycgEC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YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQ90YXJnZXRQdWJsaWNLZXmq6nqa", "height": 3419649, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C1WDv6ANK9MfpBf6GG3xXmP7H2tEPibczdoYiuDT8Am2 Next: none Diff:
OldNewDifferences
131131 func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP)
132132
133133
134+func keyMemePoolFactory () = makeString(["%s", "memePoolFactory"], SEP)
135+
136+
134137 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
135138 case s: String =>
136139 addressFromStringValue(s)
208211 }
209212
210213
214+func isMemePoolFactory (i) = {
215+ let memePoolFactory = getString(factoryContract, keyMemePoolFactory())
216+ match memePoolFactory {
217+ case address: String =>
218+ (toString(i.caller) == address)
219+ case _: Unit =>
220+ false
221+ case _ =>
222+ throw("Match error")
223+ }
224+ }
225+
226+
211227 func isVerified (assetId) = (valueOrElse(getInteger(addressFromStringValue(getStringOrFail(keyAssetsStoreContract())), (("status_<" + assetId) + ">")), 0) == 2)
212228
213229
229245 let amountAssetPayment = value(i.payments[0])
230246 let priceAssetPayment = value(i.payments[1])
231247 let feeAssetPayment = value(i.payments[2])
232- let $t065196591 = getIdAndInfo(amountAssetPayment)
233- let amountAssetId = $t065196591._1
234- let amountAssetInfo = $t065196591._2
235- let $t065946663 = getIdAndInfo(priceAssetPayment)
236- let priceAssetId = $t065946663._1
237- let priceAssetInfo = $t065946663._2
238- let $t066666729 = getIdAndInfo(feeAssetPayment)
239- let feeAssetId = $t066666729._1
240- let feeAssetInfo = $t066666729._2
248+ let $t068296901 = getIdAndInfo(amountAssetPayment)
249+ let amountAssetId = $t068296901._1
250+ let amountAssetInfo = $t068296901._2
251+ let $t069046973 = getIdAndInfo(priceAssetPayment)
252+ let priceAssetId = $t069046973._1
253+ let priceAssetInfo = $t069046973._2
254+ let $t069767039 = getIdAndInfo(feeAssetPayment)
255+ let feeAssetId = $t069767039._1
256+ let feeAssetInfo = $t069767039._2
241257 let amountAssetAmount = amountAssetPayment.amount
242258 let priceAssetAmount = priceAssetPayment.amount
243259 let feeAssetAmount = feeAssetPayment.amount
260276 then true
261277 else throwPoolExists(), if ((amountAssetId != priceAssetId))
262278 then true
263- else throwInvalidAssetPair(), if (if (isManager(i))
279+ else throwInvalidAssetPair(), if (if (containsElement(priceAssetsList, amountAssetId))
280+ then true
281+ else containsElement(priceAssetsList, priceAssetId))
282+ then true
283+ else throwInvalidAssetPair(), if (if (if (isManager(i))
284+ then true
285+ else isMemePoolFactory(i))
264286 then true
265287 else if (isVerified(amountAssetId))
266288 then isVerified(priceAssetId)
267289 else false)
268290 then true
269- else throwInvalidAssetPair(), if (if (containsElement(priceAssetsList, amountAssetId))
291+ else throwInvalidAssetPair(), if (if (if (isManager(i))
270292 then true
271- else containsElement(priceAssetsList, priceAssetId))
272- then true
273- else throwInvalidAssetPair(), if (if (isManager(i))
293+ else isMemePoolFactory(i))
274294 then true
275295 else (getString(keyFeeAssetId()) == feeAssetId))
276296 then true
277- else throwInvalidFeeAsset(), if (if (isManager(i))
297+ else throwInvalidFeeAsset(), if (if (if (isManager(i))
298+ then true
299+ else isMemePoolFactory(i))
278300 then true
279301 else (amountAssetAmount >= amountAssetMinAmount))
280302 then true
281- else throwInvalidAmountAsset(), if (if (isManager(i))
303+ else throwInvalidAmountAsset(), if (if (if (isManager(i))
304+ then true
305+ else isMemePoolFactory(i))
282306 then true
283307 else (priceAssetAmount >= priceAssetMinAmount))
284308 then true
285- else throwInvalidPriceAssetAmount(), if (if (isManager(i))
309+ else throwInvalidPriceAssetAmount(), if (if (if (isManager(i))
310+ then true
311+ else isMemePoolFactory(i))
286312 then true
287313 else (feeAssetAmount == getInteger(keyFeeAmount())))
288314 then true
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 keyPoolAssetDefaultMinAmount () = makeString(["%s", "poolAssetDefaultMinAmount"], SEP)
126126
127127
128128 func keyPoolAssetsMinAmount (assetId) = makeString(["%s%s", "poolAssetMinAmount", assetId], SEP)
129129
130130
131131 func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP)
132132
133133
134+func keyMemePoolFactory () = makeString(["%s", "memePoolFactory"], SEP)
135+
136+
134137 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
135138 case s: String =>
136139 addressFromStringValue(s)
137140 case _ =>
138141 this
139142 }
140143
141144
142145 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined"))
143146
144147
145148 func stringOptionToList (stringOrUnit) = match stringOrUnit {
146149 case s: String =>
147150 if ((size(s) == 0))
148151 then nil
149152 else split_4C(s, SEP)
150153 case _: Unit =>
151154 nil
152155 case _ =>
153156 throw("Match error")
154157 }
155158
156159
157160 let factoryContract = addressFromStringValue(getStringOrFail(keyFactoryContract()))
158161
159162 let keyVotingEmissionContract = makeString(["%s", "votingEmissionContract"], SEP)
160163
161164 let votingEmissionContract = addressFromStringValue(valueOrErrorMessage(getString(factoryContract, keyVotingEmissionContract), wrapErr("voting emission contract address is required")))
162165
163166 let keyVotingEmissionCandidateContract = makeString(["%s", "votingEmissionCandidateContract"], SEP)
164167
165168 let votingEmissionCandidateContract = addressFromStringValue(valueOrErrorMessage(getString(votingEmissionContract, keyVotingEmissionCandidateContract), wrapErr("voting emission candidate contract address is required")))
166169
167170 func isCreateCalled (amountAssetId,priceAssetId) = valueOrElse(getBoolean(keyCreateCalled(amountAssetId, priceAssetId)), false)
168171
169172
170173 func mustCreateCalled (amountAssetId,priceAssetId) = if (isCreateCalled(amountAssetId, priceAssetId))
171174 then true
172175 else throwCreateNotCalled()
173176
174177
175178 func managerPublicKeyOrUnit () = {
176179 let managerVaultAddress = getManagerVaultAddressOrThis()
177180 match getString(managerVaultAddress, keyManagerPublicKey()) {
178181 case s: String =>
179182 fromBase58String(s)
180183 case _: Unit =>
181184 unit
182185 case _ =>
183186 throw("Match error")
184187 }
185188 }
186189
187190
188191 func isManager (i) = match managerPublicKeyOrUnit() {
189192 case pk: ByteVector =>
190193 (i.callerPublicKey == pk)
191194 case _: Unit =>
192195 (i.caller == this)
193196 case _ =>
194197 throw("Match error")
195198 }
196199
197200
198201 func mustManager (i) = if (isManager(i))
199202 then true
200203 else throwPD()
201204
202205
203206 func mustAdmin (i) = {
204207 let adminPKs = stringOptionToList(getString(keyAdminPubKeys()))
205208 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
206209 then true
207210 else mustManager(i)
208211 }
209212
210213
214+func isMemePoolFactory (i) = {
215+ let memePoolFactory = getString(factoryContract, keyMemePoolFactory())
216+ match memePoolFactory {
217+ case address: String =>
218+ (toString(i.caller) == address)
219+ case _: Unit =>
220+ false
221+ case _ =>
222+ throw("Match error")
223+ }
224+ }
225+
226+
211227 func isVerified (assetId) = (valueOrElse(getInteger(addressFromStringValue(getStringOrFail(keyAssetsStoreContract())), (("status_<" + assetId) + ">")), 0) == 2)
212228
213229
214230 func getIdAndInfo (payment) = match payment.assetId {
215231 case id: ByteVector =>
216232 let info = value(assetInfo(id))
217233 $Tuple2(toBase58String(id), info)
218234 case _: Unit =>
219235 $Tuple2(wavesAssetId, unit)
220236 case _ =>
221237 throw("Match error")
222238 }
223239
224240
225241 func validStatus (status) = containsElement(statuses, status)
226242
227243
228244 func _create (i,poolType) = {
229245 let amountAssetPayment = value(i.payments[0])
230246 let priceAssetPayment = value(i.payments[1])
231247 let feeAssetPayment = value(i.payments[2])
232- let $t065196591 = getIdAndInfo(amountAssetPayment)
233- let amountAssetId = $t065196591._1
234- let amountAssetInfo = $t065196591._2
235- let $t065946663 = getIdAndInfo(priceAssetPayment)
236- let priceAssetId = $t065946663._1
237- let priceAssetInfo = $t065946663._2
238- let $t066666729 = getIdAndInfo(feeAssetPayment)
239- let feeAssetId = $t066666729._1
240- let feeAssetInfo = $t066666729._2
248+ let $t068296901 = getIdAndInfo(amountAssetPayment)
249+ let amountAssetId = $t068296901._1
250+ let amountAssetInfo = $t068296901._2
251+ let $t069046973 = getIdAndInfo(priceAssetPayment)
252+ let priceAssetId = $t069046973._1
253+ let priceAssetInfo = $t069046973._2
254+ let $t069767039 = getIdAndInfo(feeAssetPayment)
255+ let feeAssetId = $t069767039._1
256+ let feeAssetInfo = $t069767039._2
241257 let amountAssetAmount = amountAssetPayment.amount
242258 let priceAssetAmount = priceAssetPayment.amount
243259 let feeAssetAmount = feeAssetPayment.amount
244260 let priceAssetsList = stringOptionToList(getString(factoryContract, keyPriceAssets()))
245261 let assetMinAmountDefault = getIntegerValue(factoryContract, keyPoolAssetDefaultMinAmount())
246262 let amountAssetMinAmount = valueOrElse(getInteger(factoryContract, keyPoolAssetsMinAmount(amountAssetId)), assetMinAmountDefault)
247263 let priceAssetMinAmount = valueOrElse(getInteger(factoryContract, keyPoolAssetsMinAmount(priceAssetId)), assetMinAmountDefault)
248264 let lastIndex = valueOrElse(getInteger(keyLastIndex()), 0)
249265 let curIndex = (lastIndex + 1)
250266 let emissionContract = addressFromStringValue(getStringOrFail(keyEmissionContract()))
251267 let poolExists = {
252268 let @ = invoke(factoryContract, "poolExistsREADONLY", [amountAssetId, priceAssetId], nil)
253269 if ($isInstanceOf(@, "Boolean"))
254270 then @
255271 else throw(($getType(@) + " couldn't be cast to Boolean"))
256272 }
257273 let checks = [if (!(isCreateCalled(amountAssetId, priceAssetId)))
258274 then true
259275 else throwPoolExists(), if (!(poolExists))
260276 then true
261277 else throwPoolExists(), if ((amountAssetId != priceAssetId))
262278 then true
263- else throwInvalidAssetPair(), if (if (isManager(i))
279+ else throwInvalidAssetPair(), if (if (containsElement(priceAssetsList, amountAssetId))
280+ then true
281+ else containsElement(priceAssetsList, priceAssetId))
282+ then true
283+ else throwInvalidAssetPair(), if (if (if (isManager(i))
284+ then true
285+ else isMemePoolFactory(i))
264286 then true
265287 else if (isVerified(amountAssetId))
266288 then isVerified(priceAssetId)
267289 else false)
268290 then true
269- else throwInvalidAssetPair(), if (if (containsElement(priceAssetsList, amountAssetId))
291+ else throwInvalidAssetPair(), if (if (if (isManager(i))
270292 then true
271- else containsElement(priceAssetsList, priceAssetId))
272- then true
273- else throwInvalidAssetPair(), if (if (isManager(i))
293+ else isMemePoolFactory(i))
274294 then true
275295 else (getString(keyFeeAssetId()) == feeAssetId))
276296 then true
277- else throwInvalidFeeAsset(), if (if (isManager(i))
297+ else throwInvalidFeeAsset(), if (if (if (isManager(i))
298+ then true
299+ else isMemePoolFactory(i))
278300 then true
279301 else (amountAssetAmount >= amountAssetMinAmount))
280302 then true
281- else throwInvalidAmountAsset(), if (if (isManager(i))
303+ else throwInvalidAmountAsset(), if (if (if (isManager(i))
304+ then true
305+ else isMemePoolFactory(i))
282306 then true
283307 else (priceAssetAmount >= priceAssetMinAmount))
284308 then true
285- else throwInvalidPriceAssetAmount(), if (if (isManager(i))
309+ else throwInvalidPriceAssetAmount(), if (if (if (isManager(i))
310+ then true
311+ else isMemePoolFactory(i))
286312 then true
287313 else (feeAssetAmount == getInteger(keyFeeAmount())))
288314 then true
289315 else throwInvalidFee()]
290316 if ((checks == checks))
291317 then {
292318 let paymentsWithFeeSize = 3
293319 let burnEmissionInv = if ((size(i.payments) >= paymentsWithFeeSize))
294320 then invoke(emissionContract, "burn", nil, [AttachedPayment(fromBase58String(feeAssetId), feeAssetAmount)])
295321 else unit
296322 if ((burnEmissionInv == burnEmissionInv))
297323 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)]
298324 else throw("Strict value is not equal to itself.")
299325 }
300326 else throw("Strict value is not equal to itself.")
301327 }
302328
303329
304330 @Callable(i)
305331 func constructor (factoryV2Address,assetsStoreAddress,emissionAddress,feeAssetId,feeAmount) = {
306332 let checkCaller = mustManager(i)
307333 if ((checkCaller == checkCaller))
308334 then [StringEntry(keyFactoryContract(), factoryV2Address), StringEntry(keyAssetsStoreContract(), assetsStoreAddress), StringEntry(keyEmissionContract(), emissionAddress), StringEntry(keyFeeAssetId(), feeAssetId), IntegerEntry(keyFeeAmount(), feeAmount)]
309335 else throw("Strict value is not equal to itself.")
310336 }
311337
312338
313339
314340 @Callable(i)
315341 func create () = _create(i, VLTPOOL)
316342
317343
318344
319345 @Callable(i)
320346 func createStable () = {
321347 let checkCaller = mustManager(i)
322348 if ((checkCaller == checkCaller))
323349 then _create(i, STBLPOOL)
324350 else throw("Strict value is not equal to itself.")
325351 }
326352
327353
328354
329355 @Callable(i)
330356 func activate (poolAddress,amountAssetId,amountAssetTicker,priceAssetId,priceAssetTicker,logo) = {
331357 let checks = [mustAdmin(i), if (isCreateCalled(amountAssetId, priceAssetId))
332358 then true
333359 else throwCreateNotCalled(), if ((value(getString(keyStatus(amountAssetId, priceAssetId))) == statusPending))
334360 then true
335361 else throwCanActivateOnlyPendingPool()]
336362 if ((checks == checks))
337363 then {
338364 let poolTypeOption = getString(this, keyPoolType(amountAssetId, priceAssetId))
339365 let activateNewPoolInv = invoke(factoryContract, "activateNewPool", [poolAddress, amountAssetId, priceAssetId, ((amountAssetTicker + priceAssetTicker) + "LP"), (((amountAssetTicker + "/") + priceAssetTicker) + " pool liquidity provider token"), 0, if ((poolTypeOption == unit))
340366 then "VLTPOOL"
341367 else value(poolTypeOption), logo], nil)
342368 if ((activateNewPoolInv == activateNewPoolInv))
343369 then {
344370 let lpAssetId = match activateNewPoolInv {
345371 case id: String =>
346372 id
347373 case _ =>
348374 throwFactoryReturnedNotString()
349375 }
350376 if ((lpAssetId == lpAssetId))
351377 then {
352378 let beforePut = assetBalance(this, fromBase58String(lpAssetId))
353379 if ((beforePut == beforePut))
354380 then {
355381 let put = invoke(addressFromStringValue(poolAddress), "put", [0, false], [AttachedPayment(if ((amountAssetId == "WAVES"))
356382 then unit
357383 else fromBase58String(amountAssetId), value(getInteger(keyAmountAssetAmount(amountAssetId, priceAssetId)))), AttachedPayment(if ((priceAssetId == "WAVES"))
358384 then unit
359385 else fromBase58String(priceAssetId), value(getInteger(keyPriceAssetAmount(amountAssetId, priceAssetId))))])
360386 if ((put == put))
361387 then {
362388 let afterPut = assetBalance(this, fromBase58String(lpAssetId))
363389 if ((afterPut == afterPut))
364390 then {
365391 let user = value(addressFromString(value(getString(keyCreateCaller(amountAssetId, priceAssetId)))))
366392 let res = invoke(votingEmissionCandidateContract, "approve", [amountAssetId, priceAssetId], nil)
367393 if ((res == res))
368394 then [StringEntry(keyStatus(amountAssetId, priceAssetId), statusActive), ScriptTransfer(user, (afterPut - beforePut), fromBase58String(lpAssetId))]
369395 else throw("Strict value is not equal to itself.")
370396 }
371397 else throw("Strict value is not equal to itself.")
372398 }
373399 else throw("Strict value is not equal to itself.")
374400 }
375401 else throw("Strict value is not equal to itself.")
376402 }
377403 else throw("Strict value is not equal to itself.")
378404 }
379405 else throw("Strict value is not equal to itself.")
380406 }
381407 else throw("Strict value is not equal to itself.")
382408 }
383409
384410
385411
386412 @Callable(i)
387413 func setAdmins (adminPubKeys) = {
388414 let checkCaller = mustManager(i)
389415 if ((checkCaller == checkCaller))
390416 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
391417 else throw("Strict value is not equal to itself.")
392418 }
393419
394420
395421
396422 @Callable(i)
397423 func priceAssetsREADONLY () = $Tuple2(nil, stringOptionToList(getString(keyPriceAssets())))
398424
399425
400426
401427 @Callable(i)
402428 func statusREADONLY (amountAssetId,priceAssetId) = {
403429 let status = match getString(keyStatus(amountAssetId, priceAssetId)) {
404430 case s: String =>
405431 s
406432 case _ =>
407433 unit
408434 }
409435 $Tuple2(nil, status)
410436 }
411437
412438
413439
414440 @Callable(i)
415441 func getPoolCreatorREADONLY (amountAssetId,priceAssetId) = {
416442 let creator = valueOrElse(getString(keyCreateCaller(amountAssetId, priceAssetId)), "")
417443 $Tuple2(nil, creator)
418444 }
419445
420446
421447
422448 @Callable(i)
423449 func deletePool (amountAssetId,priceAssetId) = {
424450 let checkCaller = if (if ((i.caller == factoryContract))
425451 then true
426452 else mustManager(i))
427453 then true
428454 else throwErr("Permission denied")
429455 if ((checkCaller == checkCaller))
430456 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))]
431457 else throw("Strict value is not equal to itself.")
432458 }
433459
434460
435461 @Verifier(tx)
436462 func verify () = {
437463 let targetPublicKey = match managerPublicKeyOrUnit() {
438464 case pk: ByteVector =>
439465 pk
440466 case _: Unit =>
441467 tx.senderPublicKey
442468 case _ =>
443469 throw("Match error")
444470 }
445471 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
446472 }
447473

github/deemru/w8io/169f3d6 
54.80 ms