tx · C1WDv6ANK9MfpBf6GG3xXmP7H2tEPibczdoYiuDT8Am2

3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh:  -0.01400000 Waves

2023.10.16 12:15 [2800981] smart account 3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh > SELF 0.00000000 Waves

{ "type": 13, "id": "C1WDv6ANK9MfpBf6GG3xXmP7H2tEPibczdoYiuDT8Am2", "fee": 1400000, "feeAssetId": null, "timestamp": 1697447732021, "version": 2, "chainId": 84, "sender": "3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh", "senderPublicKey": "Ap7CkWd6fzBU34kGo4GJJzC5q4qWXuLVunzE25PchdGS", "proofs": [ "4qJAuzWEU7mCVVGfjV9aqmV8kvEDhUtfE5kyFiPCW9YjjifoFfxUuUoH3JyDXdbCN77BGze1c26MF7QuyDc8fAGe" ], "script": "base64:BgL9DwgCEgcKBQgICAgBEgASABIICgYICAgICAgSAwoBGBIAEgQKAggIEgQKAggIEgQKAggIIhBjb250cmFjdEZpbGVuYW1lIgNTRVAiDHdhdmVzQXNzZXRJZCIHVkxUUE9PTCIIU1RCTFBPT0wiEWludmFsaWRQcmljZUFzc2V0Igd3cmFwRXJyIgNtc2ciCHRocm93RXJyIgd0aHJvd1BEIhR0aHJvd0NyZWF0ZU5vdENhbGxlZCIRdGhyb3dZb3VOb3RJc3N1ZXIiD3Rocm93UG9vbEV4aXN0cyIVdGhyb3dBc3NldE5vdFZlcmlmaWVkIhZ0aHJvd0ludmFsaWRQcmljZUFzc2V0IhR0aHJvd0ludmFsaWRGZWVBc3NldCIXdGhyb3dJbnZhbGlkQW1vdW50QXNzZXQiEnRocm93SW52YWxpZFN0YXR1cyIfdGhyb3dDYW5BY3RpdmF0ZU9ubHlQZW5kaW5nUG9vbCIddGhyb3dGYWN0b3J5UmV0dXJuZWROb3RTdHJpbmciHHRocm93SW52YWxpZFByaWNlQXNzZXRBbW91bnQiD3Rocm93SW52YWxpZEZlZSIVd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XkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCYncJYm9keUJ5dGVzCQCRAwIIBQJidwZwcm9vZnMAAAUCYnkKF6YT", "height": 2800981, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EyaCuH3qBuzELXSdNZ4cccKJb2hmznJknsrLmrSByGCu Next: none Diff:
OldNewDifferences
122122 func keyFeeAmount () = makeString(["%s", "feeAmount"], SEP)
123123
124124
125-func keyAmountAssetMinAmount () = makeString(["%s", "amountAssetMinAmount"], SEP)
125+func keyPoolAssetDefaultMinAmount () = makeString(["%s", "poolAssetDefaultMinAmount"], SEP)
126126
127127
128-func keyPriceAssetsMinAmount () = makeString(["%s", "priceAssetsMinAmount"], SEP)
128+func keyPoolAssetsMinAmount (assetId) = makeString(["%s%s", "poolAssetMinAmount", assetId], SEP)
129129
130130
131131 func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP)
229229 let amountAssetPayment = value(i.payments[0])
230230 let priceAssetPayment = value(i.payments[1])
231231 let feeAssetPayment = value(i.payments[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
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
241241 let amountAssetAmount = amountAssetPayment.amount
242242 let priceAssetAmount = priceAssetPayment.amount
243243 let feeAssetAmount = feeAssetPayment.amount
244244 let priceAssetsList = stringOptionToList(getString(factoryContract, keyPriceAssets()))
245- let assetMinAmountDefault = getIntegerValue(keyAmountAssetMinAmount())
246- let allowedAssetsMinAmounts = stringOptionToList(getString(keyPriceAssetsMinAmount()))
247- let amountAssetMinAmount = if (containsElement(priceAssetsList, amountAssetId))
248- then {
249- let priceAssetsIndex = valueOrErrorMessage(indexOf(priceAssetsList, amountAssetId), invalidPriceAsset)
250- value(parseInt(allowedAssetsMinAmounts[priceAssetsIndex]))
251- }
252- else assetMinAmountDefault
253- let priceAssetMinAmount = if (containsElement(priceAssetsList, priceAssetId))
254- then {
255- let priceAssetsIndex = valueOrErrorMessage(indexOf(priceAssetsList, priceAssetId), invalidPriceAsset)
256- value(parseInt(allowedAssetsMinAmounts[priceAssetsIndex]))
257- }
258- else assetMinAmountDefault
245+ let assetMinAmountDefault = getIntegerValue(factoryContract, keyPoolAssetDefaultMinAmount())
246+ let amountAssetMinAmount = valueOrElse(getInteger(factoryContract, keyPoolAssetsMinAmount(amountAssetId)), assetMinAmountDefault)
247+ let priceAssetMinAmount = valueOrElse(getInteger(factoryContract, keyPoolAssetsMinAmount(priceAssetId)), assetMinAmountDefault)
259248 let lastIndex = valueOrElse(getInteger(keyLastIndex()), 0)
260249 let curIndex = (lastIndex + 1)
261250 let emissionContract = addressFromStringValue(getStringOrFail(keyEmissionContract()))
287276 then true
288277 else throwInvalidFeeAsset(), if (if (isManager(i))
289278 then true
290- else (amountAssetAmount >= getIntegerValue(keyAmountAssetMinAmount())))
279+ else (amountAssetAmount >= amountAssetMinAmount))
291280 then true
292281 else throwInvalidAmountAsset(), if (if (isManager(i))
293282 then true
313302
314303
315304 @Callable(i)
316-func constructor (factoryV2Address,assetsStoreAddress,emissionAddress,priceAssetsMinAmount,amountAssetMinAmount,feeAssetId,feeAmount) = {
305+func constructor (factoryV2Address,assetsStoreAddress,emissionAddress,feeAssetId,feeAmount) = {
317306 let checkCaller = mustManager(i)
318307 if ((checkCaller == checkCaller))
319- then [StringEntry(keyFactoryContract(), factoryV2Address), StringEntry(keyAssetsStoreContract(), assetsStoreAddress), StringEntry(keyEmissionContract(), emissionAddress), StringEntry(keyPriceAssetsMinAmount(), makeString(priceAssetsMinAmount, SEP)), IntegerEntry(keyAmountAssetMinAmount(), amountAssetMinAmount), StringEntry(keyFeeAssetId(), feeAssetId), IntegerEntry(keyFeeAmount(), feeAmount)]
308+ then [StringEntry(keyFactoryContract(), factoryV2Address), StringEntry(keyAssetsStoreContract(), assetsStoreAddress), StringEntry(keyEmissionContract(), emissionAddress), StringEntry(keyFeeAssetId(), feeAssetId), IntegerEntry(keyFeeAmount(), feeAmount)]
320309 else throw("Strict value is not equal to itself.")
321310 }
322311
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
125-func keyAmountAssetMinAmount () = makeString(["%s", "amountAssetMinAmount"], SEP)
125+func keyPoolAssetDefaultMinAmount () = makeString(["%s", "poolAssetDefaultMinAmount"], SEP)
126126
127127
128-func keyPriceAssetsMinAmount () = makeString(["%s", "priceAssetsMinAmount"], SEP)
128+func keyPoolAssetsMinAmount (assetId) = makeString(["%s%s", "poolAssetMinAmount", assetId], 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
149149 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 $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
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
241241 let amountAssetAmount = amountAssetPayment.amount
242242 let priceAssetAmount = priceAssetPayment.amount
243243 let feeAssetAmount = feeAssetPayment.amount
244244 let priceAssetsList = stringOptionToList(getString(factoryContract, keyPriceAssets()))
245- let assetMinAmountDefault = getIntegerValue(keyAmountAssetMinAmount())
246- let allowedAssetsMinAmounts = stringOptionToList(getString(keyPriceAssetsMinAmount()))
247- let amountAssetMinAmount = if (containsElement(priceAssetsList, amountAssetId))
248- then {
249- let priceAssetsIndex = valueOrErrorMessage(indexOf(priceAssetsList, amountAssetId), invalidPriceAsset)
250- value(parseInt(allowedAssetsMinAmounts[priceAssetsIndex]))
251- }
252- else assetMinAmountDefault
253- let priceAssetMinAmount = if (containsElement(priceAssetsList, priceAssetId))
254- then {
255- let priceAssetsIndex = valueOrErrorMessage(indexOf(priceAssetsList, priceAssetId), invalidPriceAsset)
256- value(parseInt(allowedAssetsMinAmounts[priceAssetsIndex]))
257- }
258- else assetMinAmountDefault
245+ let assetMinAmountDefault = getIntegerValue(factoryContract, keyPoolAssetDefaultMinAmount())
246+ let amountAssetMinAmount = valueOrElse(getInteger(factoryContract, keyPoolAssetsMinAmount(amountAssetId)), assetMinAmountDefault)
247+ let priceAssetMinAmount = valueOrElse(getInteger(factoryContract, keyPoolAssetsMinAmount(priceAssetId)), assetMinAmountDefault)
259248 let lastIndex = valueOrElse(getInteger(keyLastIndex()), 0)
260249 let curIndex = (lastIndex + 1)
261250 let emissionContract = addressFromStringValue(getStringOrFail(keyEmissionContract()))
262251 let poolExists = {
263252 let @ = invoke(factoryContract, "poolExistsREADONLY", [amountAssetId, priceAssetId], nil)
264253 if ($isInstanceOf(@, "Boolean"))
265254 then @
266255 else throw(($getType(@) + " couldn't be cast to Boolean"))
267256 }
268257 let checks = [if (!(isCreateCalled(amountAssetId, priceAssetId)))
269258 then true
270259 else throwPoolExists(), if (!(poolExists))
271260 then true
272261 else throwPoolExists(), if ((amountAssetId != priceAssetId))
273262 then true
274263 else throwInvalidAssetPair(), if (if (isManager(i))
275264 then true
276265 else if (isVerified(amountAssetId))
277266 then isVerified(priceAssetId)
278267 else false)
279268 then true
280269 else throwInvalidAssetPair(), if (if (containsElement(priceAssetsList, amountAssetId))
281270 then true
282271 else containsElement(priceAssetsList, priceAssetId))
283272 then true
284273 else throwInvalidAssetPair(), if (if (isManager(i))
285274 then true
286275 else (getString(keyFeeAssetId()) == feeAssetId))
287276 then true
288277 else throwInvalidFeeAsset(), if (if (isManager(i))
289278 then true
290- else (amountAssetAmount >= getIntegerValue(keyAmountAssetMinAmount())))
279+ else (amountAssetAmount >= amountAssetMinAmount))
291280 then true
292281 else throwInvalidAmountAsset(), if (if (isManager(i))
293282 then true
294283 else (priceAssetAmount >= priceAssetMinAmount))
295284 then true
296285 else throwInvalidPriceAssetAmount(), if (if (isManager(i))
297286 then true
298287 else (feeAssetAmount == getInteger(keyFeeAmount())))
299288 then true
300289 else throwInvalidFee()]
301290 if ((checks == checks))
302291 then {
303292 let paymentsWithFeeSize = 3
304293 let burnEmissionInv = if ((size(i.payments) >= paymentsWithFeeSize))
305294 then invoke(emissionContract, "burn", nil, [AttachedPayment(fromBase58String(feeAssetId), feeAssetAmount)])
306295 else unit
307296 if ((burnEmissionInv == burnEmissionInv))
308297 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)]
309298 else throw("Strict value is not equal to itself.")
310299 }
311300 else throw("Strict value is not equal to itself.")
312301 }
313302
314303
315304 @Callable(i)
316-func constructor (factoryV2Address,assetsStoreAddress,emissionAddress,priceAssetsMinAmount,amountAssetMinAmount,feeAssetId,feeAmount) = {
305+func constructor (factoryV2Address,assetsStoreAddress,emissionAddress,feeAssetId,feeAmount) = {
317306 let checkCaller = mustManager(i)
318307 if ((checkCaller == checkCaller))
319- then [StringEntry(keyFactoryContract(), factoryV2Address), StringEntry(keyAssetsStoreContract(), assetsStoreAddress), StringEntry(keyEmissionContract(), emissionAddress), StringEntry(keyPriceAssetsMinAmount(), makeString(priceAssetsMinAmount, SEP)), IntegerEntry(keyAmountAssetMinAmount(), amountAssetMinAmount), StringEntry(keyFeeAssetId(), feeAssetId), IntegerEntry(keyFeeAmount(), feeAmount)]
308+ then [StringEntry(keyFactoryContract(), factoryV2Address), StringEntry(keyAssetsStoreContract(), assetsStoreAddress), StringEntry(keyEmissionContract(), emissionAddress), StringEntry(keyFeeAssetId(), feeAssetId), IntegerEntry(keyFeeAmount(), feeAmount)]
320309 else throw("Strict value is not equal to itself.")
321310 }
322311
323312
324313
325314 @Callable(i)
326315 func create () = _create(i, VLTPOOL)
327316
328317
329318
330319 @Callable(i)
331320 func createStable () = {
332321 let checkCaller = mustManager(i)
333322 if ((checkCaller == checkCaller))
334323 then _create(i, STBLPOOL)
335324 else throw("Strict value is not equal to itself.")
336325 }
337326
338327
339328
340329 @Callable(i)
341330 func activate (poolAddress,amountAssetId,amountAssetTicker,priceAssetId,priceAssetTicker,logo) = {
342331 let checks = [mustAdmin(i), if (isCreateCalled(amountAssetId, priceAssetId))
343332 then true
344333 else throwCreateNotCalled(), if ((value(getString(keyStatus(amountAssetId, priceAssetId))) == statusPending))
345334 then true
346335 else throwCanActivateOnlyPendingPool()]
347336 if ((checks == checks))
348337 then {
349338 let poolTypeOption = getString(this, keyPoolType(amountAssetId, priceAssetId))
350339 let activateNewPoolInv = invoke(factoryContract, "activateNewPool", [poolAddress, amountAssetId, priceAssetId, ((amountAssetTicker + priceAssetTicker) + "LP"), (((amountAssetTicker + "/") + priceAssetTicker) + " pool liquidity provider token"), 0, if ((poolTypeOption == unit))
351340 then "VLTPOOL"
352341 else value(poolTypeOption), logo], nil)
353342 if ((activateNewPoolInv == activateNewPoolInv))
354343 then {
355344 let lpAssetId = match activateNewPoolInv {
356345 case id: String =>
357346 id
358347 case _ =>
359348 throwFactoryReturnedNotString()
360349 }
361350 if ((lpAssetId == lpAssetId))
362351 then {
363352 let beforePut = assetBalance(this, fromBase58String(lpAssetId))
364353 if ((beforePut == beforePut))
365354 then {
366355 let put = invoke(addressFromStringValue(poolAddress), "put", [0, false], [AttachedPayment(if ((amountAssetId == "WAVES"))
367356 then unit
368357 else fromBase58String(amountAssetId), value(getInteger(keyAmountAssetAmount(amountAssetId, priceAssetId)))), AttachedPayment(if ((priceAssetId == "WAVES"))
369358 then unit
370359 else fromBase58String(priceAssetId), value(getInteger(keyPriceAssetAmount(amountAssetId, priceAssetId))))])
371360 if ((put == put))
372361 then {
373362 let afterPut = assetBalance(this, fromBase58String(lpAssetId))
374363 if ((afterPut == afterPut))
375364 then {
376365 let user = value(addressFromString(value(getString(keyCreateCaller(amountAssetId, priceAssetId)))))
377366 let res = invoke(votingEmissionCandidateContract, "approve", [amountAssetId, priceAssetId], nil)
378367 if ((res == res))
379368 then [StringEntry(keyStatus(amountAssetId, priceAssetId), statusActive), ScriptTransfer(user, (afterPut - beforePut), fromBase58String(lpAssetId))]
380369 else throw("Strict value is not equal to itself.")
381370 }
382371 else throw("Strict value is not equal to itself.")
383372 }
384373 else throw("Strict value is not equal to itself.")
385374 }
386375 else throw("Strict value is not equal to itself.")
387376 }
388377 else throw("Strict value is not equal to itself.")
389378 }
390379 else throw("Strict value is not equal to itself.")
391380 }
392381 else throw("Strict value is not equal to itself.")
393382 }
394383
395384
396385
397386 @Callable(i)
398387 func setAdmins (adminPubKeys) = {
399388 let checkCaller = mustManager(i)
400389 if ((checkCaller == checkCaller))
401390 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
402391 else throw("Strict value is not equal to itself.")
403392 }
404393
405394
406395
407396 @Callable(i)
408397 func priceAssetsREADONLY () = $Tuple2(nil, stringOptionToList(getString(keyPriceAssets())))
409398
410399
411400
412401 @Callable(i)
413402 func statusREADONLY (amountAssetId,priceAssetId) = {
414403 let status = match getString(keyStatus(amountAssetId, priceAssetId)) {
415404 case s: String =>
416405 s
417406 case _ =>
418407 unit
419408 }
420409 $Tuple2(nil, status)
421410 }
422411
423412
424413
425414 @Callable(i)
426415 func getPoolCreatorREADONLY (amountAssetId,priceAssetId) = {
427416 let creator = valueOrElse(getString(keyCreateCaller(amountAssetId, priceAssetId)), "")
428417 $Tuple2(nil, creator)
429418 }
430419
431420
432421
433422 @Callable(i)
434423 func deletePool (amountAssetId,priceAssetId) = {
435424 let checkCaller = if (if ((i.caller == factoryContract))
436425 then true
437426 else mustManager(i))
438427 then true
439428 else throwErr("Permission denied")
440429 if ((checkCaller == checkCaller))
441430 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))]
442431 else throw("Strict value is not equal to itself.")
443432 }
444433
445434
446435 @Verifier(tx)
447436 func verify () = {
448437 let targetPublicKey = match managerPublicKeyOrUnit() {
449438 case pk: ByteVector =>
450439 pk
451440 case _: Unit =>
452441 tx.senderPublicKey
453442 case _ =>
454443 throw("Match error")
455444 }
456445 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
457446 }
458447

github/deemru/w8io/026f985 
53.10 ms