tx · 5v7c3o9Gc5sUGvX6nshxUZ6hhS9gnuRNerTFrzswEt47

3MuS6qVvhBR6wSynFRdcE3fVqmGBjoc7Hhx:  -0.01600000 Waves

2023.08.18 14:23 [2715972] smart account 3MuS6qVvhBR6wSynFRdcE3fVqmGBjoc7Hhx > SELF 0.00000000 Waves

{ "type": 13, "id": "5v7c3o9Gc5sUGvX6nshxUZ6hhS9gnuRNerTFrzswEt47", "fee": 1600000, "feeAssetId": null, "timestamp": 1692357798150, "version": 1, "sender": "3MuS6qVvhBR6wSynFRdcE3fVqmGBjoc7Hhx", "senderPublicKey": "62CHk4MqTdq3LqeUycy7TPnpvwrjgerSa2FqAY2EafXn", "proofs": [ "3vwuNB6riuzY8eUUNZhr5BXGV76rk5ASH4tZmZgZXKotm4u1FHf1M6egPGpit4QD7AvAodThz2MjQ9XWFsidCGu7" ], "script": "base64:BwKLAQgCEgQKAggIEgQKAggBEgQKAggEEgQKAggCEgMKAQgSAwoBARIDCgEBEgUKAwIBAhIFCgMCGBgSBAoCAgESBAoCAgESBgoEAQEBARIGCgQBAQEBEgASABIDCgEIEgMKARgSABIAEgMKAQgSABIECgIICBIECgIIGBIFCgMICAESBQoDAgIBEgMKAQg3AANTRVACAl9fAAVXQVZFUwIFV0FWRVMAEGNvbnRyYWN0RmlsZW5hbWUCDGZhY3RvcnkucmlkZQEHd3JhcEVycgEBcwkArAICCQCsAgIFEGNvbnRyYWN0RmlsZW5hbWUCAjogBQFzAQh0aHJvd0VycgEBcwkAAgEJAQd3cmFwRXJyAQUBcwEPc3RyaW5nVG9Bc3NldElkAQFzAwkAAAIFAXMFBVdBVkVTBQR1bml0CQDZBAEFAXMAD0FETUlOX0xJU1RfU0laRQAFAAZRVU9SVU0AAwARVFhJRF9CWVRFU19MRU5HVEgAIAEYa2V5QWxsb3dlZFR4SWRWb3RlUHJlZml4AQR0eElkCQC5CQIJAMwIAgIGJXMlcyVzCQDMCAICCWFsbG93VHhJZAkAzAgCBQR0eElkBQNuaWwF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Rl2b3RpbmdSZXN1bHRBZGRyZXNzT3B0aW9uAwkAAQIFByRtYXRjaDACB0FkZHJlc3MED3Byb3Bvc2FsQWRkcmVzcwUHJG1hdGNoMAkBC3ZhbHVlT3JFbHNlAgkAmwgCBQ9wcm9wb3NhbEFkZHJlc3MJARlrZXlQcm9wb3NhbEFsbG93QnJvYWRjYXN0AgUEdGhpcwgFAnR4AmlkBwcECGJ5QWRtaW5zCQAAAggFAnR4AmlkCQDZBAEJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwkBDmtleUFsbG93ZWRUeElkAAIABAdieU93bmVyAwkAZwIJAJADAQkBDWdldEFkbWluc0xpc3QABQZRVU9SVU0HCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5AwMFCmJ5UHJvcG9zYWwGBQhieUFkbWlucwYFB2J5T3duZXJdPFs0", "chainId": 84, "height": 2715972, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: ysGhs6RRNT7Pviy1geShijGAp1tUAo77ZChyUg33sxx Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 7 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let WAVES = "WAVES"
77
88 let contractFilename = "factory.ride"
99
1010 func wrapErr (s) = ((contractFilename + ": ") + s)
1111
1212
1313 func throwErr (s) = throw(wrapErr(s))
1414
1515
1616 func stringToAssetId (s) = if ((s == WAVES))
1717 then unit
1818 else fromBase58String(s)
1919
2020
2121 let ADMIN_LIST_SIZE = 5
2222
2323 let QUORUM = 3
2424
2525 let TXID_BYTES_LENGTH = 32
2626
2727 func keyAllowedTxIdVotePrefix (txId) = makeString(["%s%s%s", "allowTxId", txId], SEP)
2828
2929
3030 func keyFullAdminVote (prefix,adminAddress) = makeString([prefix, adminAddress], SEP)
3131
3232
3333 func keyAdminAddressList () = makeString(["%s", "adminAddressList"], SEP)
3434
3535
3636 func keyAllowedTxId () = makeString(["%s", "txId"], SEP)
3737
3838
3939 func getAdminVote (prefix,admin) = {
4040 let voteKey = keyFullAdminVote(prefix, admin)
4141 valueOrElse(getInteger(voteKey), 0)
4242 }
4343
4444
4545 func getAdminsList () = match getString(this, keyAdminAddressList()) {
4646 case s: String =>
4747 split(s, SEP)
4848 case _ =>
4949 nil
5050 }
5151
5252
5353 func isInAdminList (address) = containsElement(getAdminsList(), address)
5454
5555
5656 func genVotesKeysHelper (a,adminAddress) = {
5757 let $t013751399 = a
5858 let result = $t013751399._1
5959 let prefix = $t013751399._2
6060 $Tuple2((result :+ keyFullAdminVote(prefix, adminAddress)), prefix)
6161 }
6262
6363
6464 func genVotesKeys (keyPrefix) = {
6565 let adminList = keyAdminAddressList()
6666 let $t015461630 = {
6767 let $l = getAdminsList()
6868 let $s = size($l)
6969 let $acc0 = $Tuple2(nil, keyPrefix)
7070 func $f0_1 ($a,$i) = if (($i >= $s))
7171 then $a
7272 else genVotesKeysHelper($a, $l[$i])
7373
7474 func $f0_2 ($a,$i) = if (($i >= $s))
7575 then $a
7676 else throw("List size exceeds 5")
7777
7878 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
7979 }
8080 let result = $t015461630._1
8181 let prefix = $t015461630._2
8282 result
8383 }
8484
8585
8686 func countVotesHelper (result,voteKey) = (result + valueOrElse(getInteger(voteKey), 0))
8787
8888
8989 func countVotes (prefix) = {
9090 let votes = genVotesKeys(prefix)
9191 let $l = votes
9292 let $s = size($l)
9393 let $acc0 = 0
9494 func $f0_1 ($a,$i) = if (($i >= $s))
9595 then $a
9696 else countVotesHelper($a, $l[$i])
9797
9898 func $f0_2 ($a,$i) = if (($i >= $s))
9999 then $a
100100 else throw("List size exceeds 5")
101101
102102 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
103103 }
104104
105105
106106 func clearVotesHelper (result,key) = (result :+ DeleteEntry(key))
107107
108108
109109 func getClearVoteEntries (prefix) = {
110110 let votes = genVotesKeys(prefix)
111111 let $l = votes
112112 let $s = size($l)
113113 let $acc0 = nil
114114 func $f0_1 ($a,$i) = if (($i >= $s))
115115 then $a
116116 else clearVotesHelper($a, $l[$i])
117117
118118 func $f0_2 ($a,$i) = if (($i >= $s))
119119 then $a
120120 else throw("List size exceeds 5")
121121
122122 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
123123 }
124124
125125
126126 func voteINTERNAL (callerAddressString,keyPrefix,minVotes,voteResult) = {
127127 let voteKey = keyFullAdminVote(keyPrefix, callerAddressString)
128128 let adminCurrentVote = getAdminVote(keyPrefix, callerAddressString)
129129 let err = if (!(isInAdminList(callerAddressString)))
130130 then throwErr((("Address: " + callerAddressString) + " not in Admin list"))
131131 else if ((adminCurrentVote == 1))
132132 then throwErr((voteKey + " you already voted"))
133133 else unit
134134 if ((err == err))
135135 then {
136136 let votes = countVotes(keyPrefix)
137137 if (((votes + 1) >= minVotes))
138138 then {
139139 let clearVoteEntries = getClearVoteEntries(keyPrefix)
140140 (clearVoteEntries ++ voteResult)
141141 }
142142 else [IntegerEntry(voteKey, 1)]
143143 }
144144 else throw("Strict value is not equal to itself.")
145145 }
146146
147147
148148 func keyCalculatorAddress () = "%s__calculator"
149149
150150
151151 func keyProxyTreasuryAddress () = "%s__proxyTreasury"
152152
153153
154154 func keyPowerContractAddress () = "%s__powerContract"
155155
156156
157157 func keySwapContractAddress () = "%s__swapContract"
158158
159159
160160 func keyChildAddress () = "%s__child"
161161
162162
163163 func keyBlockProcessingReward () = "%s__blockProcessingReward"
164164
165165
166166 func keyNextBlockToProcess () = "%s__nextBlockToProcess"
167167
168168
169169 func keyLpAssetId () = "%s__lpAssetId"
170170
171171
172172 let calculatorAddressOption = match getString(this, keyCalculatorAddress()) {
173173 case s: String =>
174174 addressFromString(s)
175175 case _: Unit =>
176176 unit
177177 case _ =>
178178 throw("Match error")
179179 }
180180
181181 let calculatorAddressOrFail = valueOrErrorMessage(calculatorAddressOption, wrapErr("invalid calculator address"))
182182
183183 let proxyTreasuryAddressOption = match getString(this, keyProxyTreasuryAddress()) {
184184 case s: String =>
185185 addressFromString(s)
186186 case _: Unit =>
187187 unit
188188 case _ =>
189189 throw("Match error")
190190 }
191191
192192 let proxyTreasuryAddressOrFail = valueOrErrorMessage(proxyTreasuryAddressOption, wrapErr("invalid proxy treasury address"))
193193
194194 let powerContractAddressOption = match getString(this, keyPowerContractAddress()) {
195195 case s: String =>
196196 addressFromString(s)
197197 case _: Unit =>
198198 unit
199199 case _ =>
200200 throw("Match error")
201201 }
202202
203203 let powerContractAddressOrFail = valueOrErrorMessage(powerContractAddressOption, wrapErr("invalid power contract address"))
204204
205205 let swapContractAddressOption = match getString(this, keySwapContractAddress()) {
206206 case s: String =>
207207 addressFromString(s)
208208 case _: Unit =>
209209 unit
210210 case _ =>
211211 throw("Match error")
212212 }
213213
214214 let swapContractAddressOrFail = valueOrErrorMessage(swapContractAddressOption, wrapErr("invalid swap contract address"))
215215
216216 func keyConfigAddress () = "%s__config"
217217
218218
219219 func keyChildrenAddress () = "contract_children"
220220
221221
222222 func keyVotingResultAddress () = "contract_voting_result"
223223
224224
225225 func keyProposalAllowBroadcast (address,txId) = ((("proposal_allow_broadcast_" + toString(address)) + "_") + toBase58String(txId))
226226
227227
228228 func keyInvestedByUser (childAddress,userAddress) = makeString(["investor", toString(childAddress), toString(userAddress)], "_")
229229
230230
231231 let configAddressOption = match getString(this, keyConfigAddress()) {
232232 case s: String =>
233233 addressFromString(s)
234234 case _: Unit =>
235235 unit
236236 case _ =>
237237 throw("Match error")
238238 }
239239
240240 let configAddressOrFail = valueOrErrorMessage(configAddressOption, wrapErr("invalid config address"))
241241
242242 let votingResultAddressOption = match configAddressOption {
243243 case a: Address =>
244244 match getString(a, keyVotingResultAddress()) {
245245 case s: String =>
246246 addressFromString(s)
247247 case _: Unit =>
248248 unit
249249 case _ =>
250250 throw("Match error")
251251 }
252252 case _: Unit =>
253253 unit
254254 case _ =>
255255 throw("Match error")
256256 }
257257
258258 let votingResultAddressOrFail = valueOrErrorMessage(votingResultAddressOption, wrapErr("invalid voting result address"))
259259
260260 let childrenAddressOption = match configAddressOption {
261261 case a: Address =>
262262 match getString(a, keyChildrenAddress()) {
263263 case s: String =>
264264 addressFromString(s)
265265 case _: Unit =>
266266 unit
267267 case _ =>
268268 throw("Match error")
269269 }
270270 case _: Unit =>
271271 unit
272272 case _ =>
273273 throw("Match error")
274274 }
275275
276276 let childrenAddressOrFail = valueOrErrorMessage(childrenAddressOption, wrapErr("invalid children address"))
277277
278278 let lpAssetIdOption = match getString(this, keyLpAssetId()) {
279279 case s: String =>
280280 fromBase58String(s)
281281 case _: Unit =>
282282 unit
283283 case _ =>
284284 throw("Match error")
285285 }
286286
287287 let lpAssetIdOrFail = valueOrErrorMessage(lpAssetIdOption, wrapErr("invalid lpAssetId"))
288288
289289 func onlyAddress (i,address) = if ((i.caller == address))
290290 then true
291291 else throwErr("permission denied")
292292
293293
294294 func onlyThis (i) = onlyAddress(i, this)
295295
296296
297297 func onlyCalculator (i) = onlyAddress(i, calculatorAddressOrFail)
298298
299299
300300 @Callable(i)
301301 func stringEntry (key,val) = if (onlyCalculator(i))
302302 then $Tuple2([StringEntry(key, val)], key)
303303 else $Tuple2(nil, unit)
304304
305305
306306
307307 @Callable(i)
308308 func integerEntry (key,val) = if (onlyCalculator(i))
309309 then $Tuple2([IntegerEntry(key, val)], key)
310310 else $Tuple2(nil, unit)
311311
312312
313313
314314 @Callable(i)
315315 func booleanEntry (key,val) = if (onlyCalculator(i))
316316 then $Tuple2([BooleanEntry(key, val)], key)
317317 else $Tuple2(nil, unit)
318318
319319
320320
321321 @Callable(i)
322322 func binaryEntry (key,val) = if (onlyCalculator(i))
323323 then $Tuple2([BinaryEntry(key, val)], key)
324324 else $Tuple2(nil, unit)
325325
326326
327327
328328 @Callable(i)
329329 func deleteEntry (key) = if (onlyCalculator(i))
330330 then $Tuple2([DeleteEntry(key)], key)
331331 else $Tuple2(nil, unit)
332332
333333
334334
335335 @Callable(i)
336336 func reissue (amount) = if (onlyCalculator(i))
337337 then $Tuple2([Reissue(lpAssetIdOrFail, amount, true)], amount)
338338 else $Tuple2(nil, unit)
339339
340340
341341
342342 @Callable(i)
343343 func burn (amount) = if (onlyCalculator(i))
344344 then $Tuple2([Burn(lpAssetIdOrFail, amount)], amount)
345345 else $Tuple2(nil, unit)
346346
347347
348348
349349 @Callable(i)
350350 func transferAsset (recipientBytes,amount,assetId) = if (onlyCalculator(i))
351351 then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, assetId)], amount)
352352 else $Tuple2(nil, unit)
353353
354354
355355
356356 @Callable(i)
357357 func transferAssets (recipientBytes,assetsList,amountsList) = if (onlyCalculator(i))
358358 then {
359359 func addNewTransfer (acc,nextAssetId) = {
360360 let $t081188142 = acc
361361 let transfers = $t081188142._1
362362 let j = $t081188142._2
363363 let newTransfer = ScriptTransfer(Address(recipientBytes), parseIntValue(amountsList[j]), stringToAssetId(assetsList[j]))
364364 let updatedTransfers = (transfers :+ newTransfer)
365365 $Tuple2(updatedTransfers, (j + 1))
366366 }
367367
368368 let $t084028483 = {
369369 let $l = assetsList
370370 let $s = size($l)
371371 let $acc0 = $Tuple2(nil, 0)
372372 func $f0_1 ($a,$i) = if (($i >= $s))
373373 then $a
374374 else addNewTransfer($a, $l[$i])
375375
376376 func $f0_2 ($a,$i) = if (($i >= $s))
377377 then $a
378378 else throw("List size exceeds 10")
379379
380380 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
381381 }
382382 let assetsTransfers = $t084028483._1
383383 let _lastIndex = $t084028483._2
384384 $Tuple2(assetsTransfers, unit)
385385 }
386386 else $Tuple2(nil, unit)
387387
388388
389389
390390 @Callable(i)
391391 func transferWaves (recipientBytes,amount) = if (onlyCalculator(i))
392392 then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, unit)], amount)
393393 else $Tuple2(nil, unit)
394394
395395
396396
397397 @Callable(i)
398398 func transferFromProxyTreasury (recipientBytes,rewardsAmount) = if (onlyCalculator(i))
399399 then $Tuple2(nil, invoke(proxyTreasuryAddressOrFail, "transferWaves", [recipientBytes, rewardsAmount], nil))
400400 else $Tuple2(nil, unit)
401401
402402
403403
404404 @Callable(i)
405405 func finalize (donationPartInWaves,lpPartInWaves,claimPartInWaves,powerStakePartInWaves) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "finalize", [i.caller.bytes, donationPartInWaves, lpPartInWaves, claimPartInWaves, powerStakePartInWaves], i.payments))
406406
407407
408408
409409 @Callable(i)
410410 func finalizeREADONLY (donationPartInWaves,lpPartInWaves,claimPartInWaves,powerStakePartInWaves) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "finalizeREADONLY", [donationPartInWaves, lpPartInWaves, claimPartInWaves, powerStakePartInWaves], nil))
411411
412412
413413
414414 @Callable(i)
415415 func rewardSplitREADONLY () = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "rewardSplitREADONLY", nil, nil))
416416
417417
418418
419419 @Callable(i)
420420 func claimLP () = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "claimLP", [i.caller.bytes], i.payments))
421421
422422
423423
424424 @Callable(i)
425425 func claimCollateral (txIdStr) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "claimCollateral", [i.caller.bytes, txIdStr], i.payments))
426426
427427
428428
429429 @Callable(i)
430430 func claimCollateralBulk (txIds) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "claimCollateralBulk", [i.caller.bytes, txIds], i.payments))
431431
432432
433433
434434 @Callable(i)
435435 func invest () = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "invest", [i.caller.bytes], i.payments))
436436
437437
438438
439439 @Callable(i)
440440 func withdraw () = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "withdraw", [i.caller.bytes], i.payments))
441441
442442
443443
444444 @Callable(i)
445445 func cancelWithdraw (txIdStr) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "cancelWithdraw", [i.caller.bytes, fromBase58String(txIdStr)], i.payments))
446446
447447
448448
449449 @Callable(i)
450450 func processBlocks () = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "processBlocks", [i.caller.bytes], i.payments))
451451
452452
453453
454454 @Callable(i)
455455 func claimCollateralREADONLY (userAddress,txIdStr) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "claimCollateralREADONLY", [fromBase58String(userAddress), txIdStr], nil))
456456
457457
458458
459459 @Callable(i)
460460 func claimCollateralBulkREADONLY (userAddress,txIds) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "claimCollateralBulkREADONLY", [fromBase58String(userAddress), txIds], nil))
461461
462462
463463
464464 @Callable(i)
465465 func swap (assetId,paymentAssetId,paymentAmount) = {
466466 let check = [onlyCalculator(i)]
467467 if ((check == check))
468468 then {
469469 let paymentAsset = if ((paymentAssetId == "WAVES"))
470470 then unit
471471 else fromBase58String(paymentAssetId)
472472 let initAssetBalance = if ((assetId == "WAVES"))
473473 then wavesBalance(this).available
474474 else assetBalance(this, fromBase58String(assetId))
475475 if ((initAssetBalance == initAssetBalance))
476476 then {
477477 let swapInvoke = invoke(swapContractAddressOrFail, "swap", [0, assetId, toString(this)], [AttachedPayment(paymentAsset, paymentAmount)])
478478 if ((swapInvoke == swapInvoke))
479479 then {
480480 let newAssetBalance = if ((assetId == "WAVES"))
481481 then wavesBalance(this).available
482482 else assetBalance(this, fromBase58String(assetId))
483483 if ((newAssetBalance == newAssetBalance))
484484 then $Tuple2(nil, (newAssetBalance - initAssetBalance))
485485 else throw("Strict value is not equal to itself.")
486486 }
487487 else throw("Strict value is not equal to itself.")
488488 }
489489 else throw("Strict value is not equal to itself.")
490490 }
491491 else throw("Strict value is not equal to itself.")
492492 }
493493
494494
495495
496496 @Callable(i)
497497 func powerStake (recipientBytes,assetIdBytes,amount) = if (onlyCalculator(i))
498498 then $Tuple2(nil, invoke(powerContractAddressOrFail, "commitForMiner", [toString(Address(recipientBytes))], [AttachedPayment(assetIdBytes, amount)]))
499499 else $Tuple2(nil, unit)
500500
501501
502502
503503 @Callable(i)
504504 func voteForTxId (txId) = {
505505 let callerAddressString = toBase58String(i.caller.bytes)
506506 let keyPrefix = keyAllowedTxIdVotePrefix(txId)
507507 let result = [StringEntry(keyAllowedTxId(), txId)]
508508 let allowedTxIdOption = getString(this, keyAllowedTxId())
509509 let err = [if ((size(fromBase58String(txId)) == TXID_BYTES_LENGTH))
510510 then true
511511 else throwErr((txId + " is not valid txId")), if (if ((allowedTxIdOption == unit))
512512 then true
513513 else (value(allowedTxIdOption) != txId))
514514 then true
515515 else throwErr((txId + " is already allowed"))]
516516 if ((err == err))
517517 then voteINTERNAL(callerAddressString, keyPrefix, QUORUM, result)
518518 else throw("Strict value is not equal to itself.")
519519 }
520520
521521
522522 @Verifier(tx)
523523 func verify () = {
524524 let byProposal = match votingResultAddressOption {
525525 case proposalAddress: Address =>
526526 valueOrElse(getBoolean(proposalAddress, keyProposalAllowBroadcast(this, tx.id)), false)
527527 case _ =>
528528 false
529529 }
530530 let byAdmins = (tx.id == fromBase58String(valueOrElse(getString(this, keyAllowedTxId()), "")))
531531 let byOwner = if ((size(getAdminsList()) >= QUORUM))
532532 then false
533533 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
534534 if (if (byProposal)
535535 then true
536536 else byAdmins)
537537 then true
538538 else byOwner
539539 }
540540

github/deemru/w8io/169f3d6 
49.18 ms