tx · 4cp5ScUehZXBHKV1vyDdHvnFHvK6tKJCUHmNQ48C3TqH

3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh:  -0.01600000 Waves

2022.10.20 11:14 [2280469] smart account 3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh > SELF 0.00000000 Waves

{ "type": 13, "id": "4cp5ScUehZXBHKV1vyDdHvnFHvK6tKJCUHmNQ48C3TqH", "fee": 1600000, "feeAssetId": null, "timestamp": 1666253779984, "version": 1, "sender": "3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh", "senderPublicKey": "Ap7CkWd6fzBU34kGo4GJJzC5q4qWXuLVunzE25PchdGS", "proofs": [ "3ChhFsxo9JENkwjEjQKL1A94NUhYYrFTEhBUoKKatxGt7CrAYCVVSCVsdMHKtCxEhNZwMhszGgMfUxMLxeJioCVC" ], "script": "base64:AAIFAAAAAAAABswIAhIICgYICBgBCAESABIICgYICAgICAgSAwoBGBIDCgEIEgASABIECgIICCIDU0VQIgx3YXZlc0Fzc2V0SWQiEWludmFsaWRQcmljZUFzc2V0Igh0aHJvd0VyciIDbXNnIgd0aHJvd1BEIhR0aHJvd0NyZWF0ZU5vdENhbGxlZCIRdGhyb3dZb3VOb3RJc3N1ZXIiD3Rocm93UG9vbEV4aXN0cyIVdGhyb3dBc3NldE5vdFZlcmlmaWVkIhZ0aHJvd0ludmFsaWRQcmljZUFzc2V0IhR0aHJvd0ludmFsaWRGZWVBc3NldCIXdGhyb3dJbnZhbGlkQW1vdW50QXNzZXQiEnRocm93SW52YWxpZFN0YXR1cyIfdGhyb3dDYW5BY3RpdmF0ZU9ubHlQZW5kaW5nUG9vbCIddGhyb3dGYWN0b3J5UmV0dXJuZWROb3RTdHJpbmciHHRocm93SW52YWxpZFByaWNlQXNzZXRBbW91bnQiD3Rocm93SW52YWxpZEZlZSITa2V5TWFuYWdlclB1YmxpY0tleSIaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkiD2tleUFk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JAAQiAAAAAQkBAAAAAXYAAAACBQAAAAF3BQAAAAF4AwkAAAEAAAACBQAAAAFXAgAAAAZTdHJpbmcEAAAAAVgFAAAAAVcFAAAAAVgFAAAABHVuaXQJAAUUAAAAAgUAAAADbmlsBQAAAAJhcQAAAAEAAAACYmUBAAAAAmJmAAAAAAQAAAACYmcEAAAAAVcJAQAAAAJhYgAAAAADCQAAAQAAAAIFAAAAAVcCAAAACkJ5dGVWZWN0b3IEAAAAAmFmBQAAAAFXBQAAAAJhZgMJAAABAAAAAgUAAAABVwIAAAAEVW5pdAgFAAAAAmJlAAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACYmUAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJiZQAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAAmJnLok93A==", "chainId": 84, "height": 2280469, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FUA7PhACYC7M5uqTsFWxKN1bzPZ3hNEjcn1342abDsSV Next: FSYWcXjXHxVUJ1d4mhRfPzGRVajwwpqPCCzFVdBmfX1Y 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 keyActivationHeight (amountAssetId,priceAssetId) = makeString(["%s%s%s", "activationHeight", amountAssetId, priceAssetId], SEP)
102102
103103
104104 func keyFeeAssetId () = makeString(["%s", "feeAssetId"], SEP)
105105
106106
107107 func keyFeeAmount () = makeString(["%s", "feeAmount"], SEP)
108108
109109
110110 func keyAmountAssetMinAmount () = makeString(["%s", "amountAssetMinAmount"], SEP)
111111
112112
113113 func keyPriceAssetsMinAmount () = makeString(["%s", "priceAssetsMinAmount"], SEP)
114114
115115
116116 func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP)
117117
118118
119119 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined"))
120120
121121
122122 func stringOptionToList (stringOrUnit) = match stringOrUnit {
123123 case s: String =>
124124 if ((size(s) == 0))
125125 then nil
126126 else split(s, SEP)
127127 case _: Unit =>
128128 nil
129129 case _ =>
130130 throw("Match error")
131131 }
132132
133133
134134 let factoryContract = addressFromStringValue(getStringOrFail(keyFactoryContract()))
135135
136136 func isCreateCalled (amountAssetId,priceAssetId) = valueOrElse(getBoolean(keyCreateCalled(amountAssetId, priceAssetId)), false)
137137
138138
139139 func mustCreateCalled (amountAssetId,priceAssetId) = if (isCreateCalled(amountAssetId, priceAssetId))
140140 then true
141141 else throwCreateNotCalled()
142142
143143
144144 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
145145 case s: String =>
146146 fromBase58String(s)
147147 case _: Unit =>
148148 unit
149149 case _ =>
150150 throw("Match error")
151151 }
152152
153153
154154 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
155155 case s: String =>
156156 fromBase58String(s)
157157 case _: Unit =>
158158 unit
159159 case _ =>
160160 throw("Match error")
161161 }
162162
163163
164164 func isManager (i) = match managerPublicKeyOrUnit() {
165165 case pk: ByteVector =>
166166 (i.callerPublicKey == pk)
167167 case _: Unit =>
168168 (i.caller == this)
169169 case _ =>
170170 throw("Match error")
171171 }
172172
173173
174174 func mustManager (i) = if (isManager(i))
175175 then true
176176 else throwPD()
177177
178178
179179 func mustAdmin (i) = {
180180 let adminPKs = stringOptionToList(getString(keyAdminPubKeys()))
181181 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
182182 then true
183183 else mustManager(i)
184184 }
185185
186186
187187 func isVerified (assetId) = (valueOrElse(getInteger(addressFromStringValue(getStringOrFail(keyAssetsStoreContract())), (("status_<" + assetId) + ">")), 0) == 2)
188188
189189
190190 func getIdAndInfo (payment) = match payment.assetId {
191191 case id: ByteVector =>
192192 let info = value(assetInfo(id))
193193 $Tuple2(toBase58String(id), info)
194194 case _: Unit =>
195195 $Tuple2(wavesAssetId, unit)
196196 case _ =>
197197 throw("Match error")
198198 }
199199
200200
201201 func validStatus (status) = containsElement(statuses, status)
202202
203203
204204 @Callable(i)
205205 func constructor (factoryV2Address,assetsStoreAddress,priceAssetsMinAmount,amountAssetMinAmount,feeAssetId,feeAmount) = {
206206 let checkCaller = mustManager(i)
207207 if ((checkCaller == checkCaller))
208208 then [StringEntry(keyFactoryContract(), factoryV2Address), StringEntry(keyAssetsStoreContract(), assetsStoreAddress), StringEntry(keyPriceAssetsMinAmount(), makeString(priceAssetsMinAmount, SEP)), IntegerEntry(keyAmountAssetMinAmount(), amountAssetMinAmount), StringEntry(keyFeeAssetId(), feeAssetId), IntegerEntry(keyFeeAmount(), feeAmount)]
209209 else throw("Strict value is not equal to itself.")
210210 }
211211
212212
213213
214214 @Callable(i)
215215 func create () = {
216216 let amountAssetPayment = value(i.payments[0])
217217 let priceAssetPayment = value(i.payments[1])
218218 let feeAssetPayment = value(i.payments[2])
219219 let $t066406712 = getIdAndInfo(amountAssetPayment)
220220 let amountAssetId = $t066406712._1
221221 let amountAssetInfo = $t066406712._2
222222 let $t067156784 = getIdAndInfo(priceAssetPayment)
223223 let priceAssetId = $t067156784._1
224224 let priceAssetInfo = $t067156784._2
225225 let $t067876850 = getIdAndInfo(feeAssetPayment)
226226 let feeAssetId = $t067876850._1
227227 let feeAssetInfo = $t067876850._2
228228 let priceAssetsList = stringOptionToList(getString(factoryContract, keyPriceAssets()))
229229 let managerPriceAssetMinAmount = 1
230230 let priceAssetMinAmount = if (isManager(i))
231231 then managerPriceAssetMinAmount
232232 else {
233233 let priceAssetsIndex = valueOrErrorMessage(indexOf(priceAssetsList, priceAssetId), invalidPriceAsset)
234234 value(parseInt(stringOptionToList(getString(keyPriceAssetsMinAmount()))[priceAssetsIndex]))
235235 }
236236 let lastIndex = valueOrElse(getInteger(keyLastIndex()), 0)
237237 let curIndex = (lastIndex + 1)
238238 let checks = [if (!(isCreateCalled(amountAssetId, priceAssetId)))
239239 then true
240240 else throwPoolExists(), if (if (isManager(i))
241241 then true
242242 else isVerified(amountAssetId))
243243 then true
244244 else throwAssetNotVerified(), if ((getString(keyFeeAssetId()) == feeAssetId))
245245 then true
246246 else throwInvalidFeeAsset(), if (if (isManager(i))
247247 then true
248248 else (amountAssetPayment.amount >= getIntegerValue(keyAmountAssetMinAmount())))
249249 then true
250250 else throwInvalidAmountAsset(), if (if (isManager(i))
251251 then true
252252 else (priceAssetPayment.amount >= priceAssetMinAmount))
253253 then true
254254 else throwInvalidPriceAssetAmount(), if ((feeAssetPayment.amount == getInteger(keyFeeAmount())))
255255 then true
256256 else throwInvalidFee()]
257257 if ((checks == checks))
258258 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)]
259259 else throw("Strict value is not equal to itself.")
260260 }
261261
262262
263263
264264 @Callable(i)
265265 func activate (poolAddress,amountAssetId,amountAssetTicker,priceAssetId,priceAssetTicker,logo) = {
266266 let checks = [mustAdmin(i), if (isCreateCalled(amountAssetId, priceAssetId))
267267 then true
268268 else throwCreateNotCalled(), if ((value(getString(keyStatus(amountAssetId, priceAssetId))) == statusPending))
269269 then true
270270 else throwCanActivateOnlyPendingPool()]
271271 if ((checks == checks))
272272 then {
273273 let activateNewPoolInv = invoke(factoryContract, "activateNewPool", [poolAddress, amountAssetId, priceAssetId, ((amountAssetTicker + priceAssetTicker) + "LP"), (((amountAssetTicker + "/") + priceAssetTicker) + " pool liquidity provider token"), 0, "VLTPOOL", logo], nil)
274274 if ((activateNewPoolInv == activateNewPoolInv))
275275 then {
276276 let lpAssetId = match activateNewPoolInv {
277277 case id: String =>
278278 id
279279 case _ =>
280280 throwFactoryReturnedNotString()
281281 }
282282 if ((lpAssetId == lpAssetId))
283283 then {
284284 let beforePut = assetBalance(this, fromBase58String(lpAssetId))
285285 if ((beforePut == beforePut))
286286 then {
287287 let put = invoke(addressFromStringValue(poolAddress), "put", [0, false], [AttachedPayment(fromBase58String(amountAssetId), value(getInteger(keyAmountAssetAmount(amountAssetId, priceAssetId)))), AttachedPayment(if ((priceAssetId == "WAVES"))
288288 then unit
289289 else fromBase58String(priceAssetId), value(getInteger(keyPriceAssetAmount(amountAssetId, priceAssetId))))])
290290 if ((put == put))
291291 then {
292292 let afterPut = assetBalance(this, fromBase58String(lpAssetId))
293293 if ((afterPut == afterPut))
294294 then {
295295 let user = value(addressFromString(value(getString(keyCreateCaller(amountAssetId, priceAssetId)))))
296296 [StringEntry(keyStatus(amountAssetId, priceAssetId), statusActive), IntegerEntry(keyActivationHeight(amountAssetId, priceAssetId), height), ScriptTransfer(user, (afterPut - beforePut), fromBase58String(lpAssetId))]
297297 }
298298 else throw("Strict value is not equal to itself.")
299299 }
300300 else throw("Strict value is not equal to itself.")
301301 }
302302 else throw("Strict value is not equal to itself.")
303303 }
304304 else throw("Strict value is not equal to itself.")
305305 }
306306 else throw("Strict value is not equal to itself.")
307307 }
308308 else throw("Strict value is not equal to itself.")
309309 }
310310
311311
312312
313313 @Callable(i)
314314 func setAdmins (adminPubKeys) = {
315315 let checkCaller = mustManager(i)
316316 if ((checkCaller == checkCaller))
317317 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
318318 else throw("Strict value is not equal to itself.")
319319 }
320320
321321
322322
323323 @Callable(i)
324324 func setManager (pendingManagerPublicKey) = {
325325 let checkCaller = mustManager(i)
326326 if ((checkCaller == checkCaller))
327327 then {
328328 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
329329 if ((checkManagerPublicKey == checkManagerPublicKey))
330330 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
331331 else throw("Strict value is not equal to itself.")
332332 }
333333 else throw("Strict value is not equal to itself.")
334334 }
335335
336336
337337
338338 @Callable(i)
339339 func confirmManager () = {
340340 let pm = pendingManagerPublicKeyOrUnit()
341341 let hasPM = if (isDefined(pm))
342342 then true
343343 else throw("No pending manager")
344344 if ((hasPM == hasPM))
345345 then {
346346 let checkPM = if ((i.callerPublicKey == value(pm)))
347347 then true
348348 else throw("You are not pending manager")
349349 if ((checkPM == checkPM))
350350 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
351351 else throw("Strict value is not equal to itself.")
352352 }
353353 else throw("Strict value is not equal to itself.")
354354 }
355355
356356
357357
358358 @Callable(i)
359359 func priceAssetsREADONLY () = $Tuple2(nil, stringOptionToList(getString(keyPriceAssets())))
360360
361361
362362
363363 @Callable(i)
364364 func statusREADONLY (amountAssetId,priceAssetId) = {
365365 let status = match getString(keyStatus(amountAssetId, priceAssetId)) {
366366 case s: String =>
367367 s
368368 case _ =>
369369 unit
370370 }
371371 $Tuple2(nil, status)
372372 }
373373
374374
375375 @Verifier(tx)
376376 func verify () = {
377377 let targetPublicKey = match managerPublicKeyOrUnit() {
378378 case pk: ByteVector =>
379379 pk
380380 case _: Unit =>
381381 tx.senderPublicKey
382382 case _ =>
383383 throw("Match error")
384384 }
385385 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
386386 }
387387

github/deemru/w8io/fabc49c 
37.98 ms