tx · DygbdmnjtaS9cYUyP4yqdooK3Fs8n1uQmZwsXh2EyByL

3MuS6qVvhBR6wSynFRdcE3fVqmGBjoc7Hhx:  -0.01200000 Waves

2023.08.18 10:26 [2715741] smart account 3MuS6qVvhBR6wSynFRdcE3fVqmGBjoc7Hhx > SELF 0.00000000 Waves

{ "type": 13, "id": "DygbdmnjtaS9cYUyP4yqdooK3Fs8n1uQmZwsXh2EyByL", "fee": 1200000, "feeAssetId": null, "timestamp": 1692343571925, "version": 1, "sender": "3MuS6qVvhBR6wSynFRdcE3fVqmGBjoc7Hhx", "senderPublicKey": "62CHk4MqTdq3LqeUycy7TPnpvwrjgerSa2FqAY2EafXn", "proofs": [ "4vcfvevBmi5Y9Q9qPBFHv6KBpQrLi6zyKUS7BYncUUftuFEcduFTHk8Yzy9ebGzphyRdLkCoNV8FmNUFei9B53tp" ], "script": "base64:BwKFAQgCEgQKAggIEgQKAggBEgQKAggEEgQKAggCEgMKAQgSAwoBARIDCgEBEgUKAwIBAhIFCgMCGBgSBAoCAgESBAoCAgESBgoEAQEBARIGCgQBAQEBEgASAwoBCBIDCgEYEgASABIDCgEIEgASBAoCCAgSBAoCCBgSAwoBCBIDCgECEgMKAQg3AANTRVACAl9fAAVXQVZFUwIFV0FWRVMAEGNvbnRyYWN0RmlsZW5hbWUCDGZhY3RvcnkucmlkZQEHd3JhcEVycgEBcwkArAICCQCsAgIFEGNvbnRyYWN0RmlsZW5hbWUCAjogBQFzAQh0aHJvd0VycgEBcwkAAgEJAQd3cmFwRXJyAQUBcwEPc3RyaW5nVG9Bc3NldElkAQFzAwkAAAIFAXMFBVdBVkVTBQR1bml0CQDZBAEFAXMAD0FETUlOX0xJU1RfU0laRQAFAAZRVU9SVU0AAwARVFhJRF9CWVRFU19MRU5HVEgAIAEYa2V5QWxsb3dlZFR4SWRWb3RlUHJlZml4AQR0eElkCQC5CQIJAMwIAgIGJXMlcyVzCQDMCAICCWFsbG93VHhJZAkAzAgCBQR0eElkBQNuaWwFA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VVPUlVNBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQMDBQpieVByb3Bvc2FsBgUIYnlBZG1pbnMGBQdieU93bmVyUC6bvw==", "chainId": 84, "height": 2715741, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 91YTspwf5m6NRyGGsdJj2rmiHdHEY44zmoxDSr9sWL5f Next: AjEBmJjy3NLcc7oQghBdYLDjQncoWTEnkdpUzSMcRzex Full:
OldNewDifferences
1-{-# STDLIB_VERSION 6 #-}
1+{-# STDLIB_VERSION 7 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-func test () = {
5- let list = [$Tuple2("a", 0), $Tuple2("b", 1), $Tuple2("c", 2)]
6- func bar (acc,next) = {
7- let $t0191208 = next
8- let a = $t0191208._1
9- let b = $t0191208._2
10- let c = invoke(this, "foo", [a, b], nil)
11- if ((c == c))
12- then 0
13- else throw("Strict value is not equal to itself.")
4+let SEP = "__"
5+
6+let WAVES = "WAVES"
7+
8+let contractFilename = "factory.ride"
9+
10+func wrapErr (s) = ((contractFilename + ": ") + s)
11+
12+
13+func throwErr (s) = throw(wrapErr(s))
14+
15+
16+func stringToAssetId (s) = if ((s == WAVES))
17+ then unit
18+ else fromBase58String(s)
19+
20+
21+let ADMIN_LIST_SIZE = 5
22+
23+let QUORUM = 3
24+
25+let TXID_BYTES_LENGTH = 32
26+
27+func keyAllowedTxIdVotePrefix (txId) = makeString(["%s%s%s", "allowTxId", txId], SEP)
28+
29+
30+func keyFullAdminVote (prefix,adminAddress) = makeString([prefix, adminAddress], SEP)
31+
32+
33+func keyAdminAddressList () = makeString(["%s", "adminAddressList"], SEP)
34+
35+
36+func keyAllowedTxId () = makeString(["%s", "txId"], SEP)
37+
38+
39+func getAdminVote (prefix,admin) = {
40+ let voteKey = keyFullAdminVote(prefix, admin)
41+ valueOrElse(getInteger(voteKey), 0)
42+ }
43+
44+
45+func getAdminsList () = match getString(this, keyAdminAddressList()) {
46+ case s: String =>
47+ split(s, SEP)
48+ case _ =>
49+ nil
50+}
51+
52+
53+func isInAdminList (address) = containsElement(getAdminsList(), address)
54+
55+
56+func genVotesKeysHelper (a,adminAddress) = {
57+ let $t013751399 = a
58+ let result = $t013751399._1
59+ let prefix = $t013751399._2
60+ $Tuple2((result :+ keyFullAdminVote(prefix, adminAddress)), prefix)
61+ }
62+
63+
64+func genVotesKeys (keyPrefix) = {
65+ let adminList = keyAdminAddressList()
66+ let $t015461630 = {
67+ let $l = getAdminsList()
68+ let $s = size($l)
69+ let $acc0 = $Tuple2(nil, keyPrefix)
70+ func $f0_1 ($a,$i) = if (($i >= $s))
71+ then $a
72+ else genVotesKeysHelper($a, $l[$i])
73+
74+ func $f0_2 ($a,$i) = if (($i >= $s))
75+ then $a
76+ else throw("List size exceeds 5")
77+
78+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
1479 }
80+ let result = $t015461630._1
81+ let prefix = $t015461630._2
82+ result
83+ }
1584
16- let $l = list
85+
86+func countVotesHelper (result,voteKey) = (result + valueOrElse(getInteger(voteKey), 0))
87+
88+
89+func countVotes (prefix) = {
90+ let votes = genVotesKeys(prefix)
91+ let $l = votes
1792 let $s = size($l)
1893 let $acc0 = 0
1994 func $f0_1 ($a,$i) = if (($i >= $s))
2095 then $a
21- else bar($a, $l[$i])
96+ else countVotesHelper($a, $l[$i])
2297
2398 func $f0_2 ($a,$i) = if (($i >= $s))
2499 then $a
25- else throw("List size exceeds 10")
100+ else throw("List size exceeds 5")
26101
27- $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)
102+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
28103 }
29104
30105
106+func clearVotesHelper (result,key) = (result :+ DeleteEntry(key))
107+
108+
109+func getClearVoteEntries (prefix) = {
110+ let votes = genVotesKeys(prefix)
111+ let $l = votes
112+ let $s = size($l)
113+ let $acc0 = nil
114+ func $f0_1 ($a,$i) = if (($i >= $s))
115+ then $a
116+ else clearVotesHelper($a, $l[$i])
117+
118+ func $f0_2 ($a,$i) = if (($i >= $s))
119+ then $a
120+ else throw("List size exceeds 5")
121+
122+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
123+ }
124+
125+
126+func voteINTERNAL (callerAddressString,keyPrefix,minVotes,voteResult) = {
127+ let voteKey = keyFullAdminVote(keyPrefix, callerAddressString)
128+ let adminCurrentVote = getAdminVote(keyPrefix, callerAddressString)
129+ let err = if (!(isInAdminList(callerAddressString)))
130+ then throwErr((("Address: " + callerAddressString) + " not in Admin list"))
131+ else if ((adminCurrentVote == 1))
132+ then throwErr((voteKey + " you already voted"))
133+ else unit
134+ if ((err == err))
135+ then {
136+ let votes = countVotes(keyPrefix)
137+ if (((votes + 1) >= minVotes))
138+ then {
139+ let clearVoteEntries = getClearVoteEntries(keyPrefix)
140+ (clearVoteEntries ++ voteResult)
141+ }
142+ else [IntegerEntry(voteKey, 1)]
143+ }
144+ else throw("Strict value is not equal to itself.")
145+ }
146+
147+
148+func keyCalculatorAddress () = "%s__calculator"
149+
150+
151+func keyProxyTreasuryAddress () = "%s__proxyTreasury"
152+
153+
154+func keyPowerContractAddress () = "%s__powerContract"
155+
156+
157+func keySwapContractAddress () = "%s__swapContract"
158+
159+
160+func keyChildAddress () = "%s__child"
161+
162+
163+func keyBlockProcessingReward () = "%s__blockProcessingReward"
164+
165+
166+func keyNextBlockToProcess () = "%s__nextBlockToProcess"
167+
168+
169+func keyLpAssetId () = "%s__lpAssetId"
170+
171+
172+let calculatorAddressOption = match getString(this, keyCalculatorAddress()) {
173+ case s: String =>
174+ addressFromString(s)
175+ case _: Unit =>
176+ unit
177+ case _ =>
178+ throw("Match error")
179+}
180+
181+let calculatorAddressOrFail = valueOrErrorMessage(calculatorAddressOption, wrapErr("invalid calculator address"))
182+
183+let proxyTreasuryAddressOption = match getString(this, keyProxyTreasuryAddress()) {
184+ case s: String =>
185+ addressFromString(s)
186+ case _: Unit =>
187+ unit
188+ case _ =>
189+ throw("Match error")
190+}
191+
192+let proxyTreasuryAddressOrFail = valueOrErrorMessage(proxyTreasuryAddressOption, wrapErr("invalid proxy treasury address"))
193+
194+let powerContractAddressOption = match getString(this, keyPowerContractAddress()) {
195+ case s: String =>
196+ addressFromString(s)
197+ case _: Unit =>
198+ unit
199+ case _ =>
200+ throw("Match error")
201+}
202+
203+let powerContractAddressOrFail = valueOrErrorMessage(powerContractAddressOption, wrapErr("invalid power contract address"))
204+
205+let swapContractAddressOption = match getString(this, keySwapContractAddress()) {
206+ case s: String =>
207+ addressFromString(s)
208+ case _: Unit =>
209+ unit
210+ case _ =>
211+ throw("Match error")
212+}
213+
214+let swapContractAddressOrFail = valueOrErrorMessage(swapContractAddressOption, wrapErr("invalid swap contract address"))
215+
216+func keyConfigAddress () = "%s__config"
217+
218+
219+func keyChildrenAddress () = "contract_children"
220+
221+
222+func keyVotingResultAddress () = "contract_voting_result"
223+
224+
225+func keyProposalAllowBroadcast (address,txId) = ((("proposal_allow_broadcast_" + toString(address)) + "_") + toBase58String(txId))
226+
227+
228+func keyInvestedByUser (childAddress,userAddress) = makeString(["investor", toString(childAddress), toString(userAddress)], "_")
229+
230+
231+let configAddressOption = match getString(this, keyConfigAddress()) {
232+ case s: String =>
233+ addressFromString(s)
234+ case _: Unit =>
235+ unit
236+ case _ =>
237+ throw("Match error")
238+}
239+
240+let configAddressOrFail = valueOrErrorMessage(configAddressOption, wrapErr("invalid config address"))
241+
242+let votingResultAddressOption = match configAddressOption {
243+ case a: Address =>
244+ match getString(a, keyVotingResultAddress()) {
245+ case s: String =>
246+ addressFromString(s)
247+ case _: Unit =>
248+ unit
249+ case _ =>
250+ throw("Match error")
251+ }
252+ case _: Unit =>
253+ unit
254+ case _ =>
255+ throw("Match error")
256+}
257+
258+let votingResultAddressOrFail = valueOrErrorMessage(votingResultAddressOption, wrapErr("invalid voting result address"))
259+
260+let childrenAddressOption = match configAddressOption {
261+ case a: Address =>
262+ match getString(a, keyChildrenAddress()) {
263+ case s: String =>
264+ addressFromString(s)
265+ case _: Unit =>
266+ unit
267+ case _ =>
268+ throw("Match error")
269+ }
270+ case _: Unit =>
271+ unit
272+ case _ =>
273+ throw("Match error")
274+}
275+
276+let childrenAddressOrFail = valueOrErrorMessage(childrenAddressOption, wrapErr("invalid children address"))
277+
278+let lpAssetIdOption = match getString(this, keyLpAssetId()) {
279+ case s: String =>
280+ fromBase58String(s)
281+ case _: Unit =>
282+ unit
283+ case _ =>
284+ throw("Match error")
285+}
286+
287+let lpAssetIdOrFail = valueOrErrorMessage(lpAssetIdOption, wrapErr("invalid lpAssetId"))
288+
289+func onlyAddress (i,address) = if ((i.caller == address))
290+ then true
291+ else throwErr("permission denied")
292+
293+
294+func onlyThis (i) = onlyAddress(i, this)
295+
296+
297+func onlyCalculator (i) = onlyAddress(i, calculatorAddressOrFail)
298+
299+
31300 @Callable(i)
32-func foo (a,b) = [IntegerEntry(a, b)]
301+func stringEntry (key,val) = if (onlyCalculator(i))
302+ then $Tuple2([StringEntry(key, val)], key)
303+ else $Tuple2(nil, unit)
33304
34305
35306
36307 @Callable(i)
37-func a () = {
38- let a = test()
39- if ((a == a))
40- then nil
308+func integerEntry (key,val) = if (onlyCalculator(i))
309+ then $Tuple2([IntegerEntry(key, val)], key)
310+ else $Tuple2(nil, unit)
311+
312+
313+
314+@Callable(i)
315+func booleanEntry (key,val) = if (onlyCalculator(i))
316+ then $Tuple2([BooleanEntry(key, val)], key)
317+ else $Tuple2(nil, unit)
318+
319+
320+
321+@Callable(i)
322+func binaryEntry (key,val) = if (onlyCalculator(i))
323+ then $Tuple2([BinaryEntry(key, val)], key)
324+ else $Tuple2(nil, unit)
325+
326+
327+
328+@Callable(i)
329+func deleteEntry (key) = if (onlyCalculator(i))
330+ then $Tuple2([DeleteEntry(key)], key)
331+ else $Tuple2(nil, unit)
332+
333+
334+
335+@Callable(i)
336+func reissue (amount) = if (onlyCalculator(i))
337+ then $Tuple2([Reissue(lpAssetIdOrFail, amount, true)], amount)
338+ else $Tuple2(nil, unit)
339+
340+
341+
342+@Callable(i)
343+func burn (amount) = if (onlyCalculator(i))
344+ then $Tuple2([Burn(lpAssetIdOrFail, amount)], amount)
345+ else $Tuple2(nil, unit)
346+
347+
348+
349+@Callable(i)
350+func transferAsset (recipientBytes,amount,assetId) = if (onlyCalculator(i))
351+ then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, assetId)], amount)
352+ else $Tuple2(nil, unit)
353+
354+
355+
356+@Callable(i)
357+func transferAssets (recipientBytes,assetsList,amountsList) = if (onlyCalculator(i))
358+ then {
359+ func addNewTransfer (acc,nextAssetId) = {
360+ let $t081188142 = acc
361+ let transfers = $t081188142._1
362+ let j = $t081188142._2
363+ let newTransfer = ScriptTransfer(Address(recipientBytes), parseIntValue(amountsList[j]), stringToAssetId(assetsList[j]))
364+ let updatedTransfers = (transfers :+ newTransfer)
365+ $Tuple2(updatedTransfers, (j + 1))
366+ }
367+
368+ let $t084028483 = {
369+ let $l = assetsList
370+ let $s = size($l)
371+ let $acc0 = $Tuple2(nil, 0)
372+ func $f0_1 ($a,$i) = if (($i >= $s))
373+ then $a
374+ else addNewTransfer($a, $l[$i])
375+
376+ func $f0_2 ($a,$i) = if (($i >= $s))
377+ then $a
378+ else throw("List size exceeds 10")
379+
380+ $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)
381+ }
382+ let assetsTransfers = $t084028483._1
383+ let _lastIndex = $t084028483._2
384+ $Tuple2(assetsTransfers, unit)
385+ }
386+ else $Tuple2(nil, unit)
387+
388+
389+
390+@Callable(i)
391+func transferWaves (recipientBytes,amount) = if (onlyCalculator(i))
392+ then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, unit)], amount)
393+ else $Tuple2(nil, unit)
394+
395+
396+
397+@Callable(i)
398+func transferFromProxyTreasury (recipientBytes,rewardsAmount) = if (onlyCalculator(i))
399+ then $Tuple2(nil, invoke(proxyTreasuryAddressOrFail, "transferWaves", [recipientBytes, rewardsAmount], nil))
400+ else $Tuple2(nil, unit)
401+
402+
403+
404+@Callable(i)
405+func finalize (donationPartInWaves,lpPartInWaves,claimPartInWaves,powerStakePartInWaves) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "finalize", [i.caller.bytes, donationPartInWaves, lpPartInWaves, claimPartInWaves, powerStakePartInWaves], i.payments))
406+
407+
408+
409+@Callable(i)
410+func finalizeREADONLY (donationPartInWaves,lpPartInWaves,claimPartInWaves,powerStakePartInWaves) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "finalizeREADONLY", [donationPartInWaves, lpPartInWaves, claimPartInWaves, powerStakePartInWaves], nil))
411+
412+
413+
414+@Callable(i)
415+func claimLP () = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "claimLP", [i.caller.bytes], i.payments))
416+
417+
418+
419+@Callable(i)
420+func claimCollateral (txIdStr) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "claimCollateral", [i.caller.bytes, txIdStr], i.payments))
421+
422+
423+
424+@Callable(i)
425+func claimCollateralBulk (txIds) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "claimCollateralBulk", [i.caller.bytes, txIds], i.payments))
426+
427+
428+
429+@Callable(i)
430+func invest () = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "invest", [i.caller.bytes], i.payments))
431+
432+
433+
434+@Callable(i)
435+func withdraw () = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "withdraw", [i.caller.bytes], i.payments))
436+
437+
438+
439+@Callable(i)
440+func cancelWithdraw (txIdStr) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "cancelWithdraw", [i.caller.bytes, fromBase58String(txIdStr)], i.payments))
441+
442+
443+
444+@Callable(i)
445+func processBlocks () = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "processBlocks", [i.caller.bytes], i.payments))
446+
447+
448+
449+@Callable(i)
450+func claimCollateralREADONLY (userAddress,txIdStr) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "claimCollateralREADONLY", [fromBase58String(userAddress), txIdStr], nil))
451+
452+
453+
454+@Callable(i)
455+func claimCollateralBulkREADONLY (userAddress,txIds) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "claimCollateralBulkREADONLY", [fromBase58String(userAddress), txIds], nil))
456+
457+
458+
459+@Callable(i)
460+func swap (assetId) = {
461+ let check = [onlyCalculator(i)]
462+ if ((check == check))
463+ then {
464+ let initAssetBalance = if ((assetId == "WAVES"))
465+ then wavesBalance(this).available
466+ else assetBalance(this, fromBase58String(assetId))
467+ if ((initAssetBalance == initAssetBalance))
468+ then {
469+ let swapInvoke = invoke(swapContractAddressOrFail, "swap", [0, assetId, toString(this)], i.payments)
470+ if ((swapInvoke == swapInvoke))
471+ then {
472+ let newAssetBalance = if ((assetId == "WAVES"))
473+ then wavesBalance(this).available
474+ else assetBalance(this, fromBase58String(assetId))
475+ if ((newAssetBalance == newAssetBalance))
476+ then $Tuple2(nil, (newAssetBalance - initAssetBalance))
477+ else throw("Strict value is not equal to itself.")
478+ }
479+ else throw("Strict value is not equal to itself.")
480+ }
481+ else throw("Strict value is not equal to itself.")
482+ }
41483 else throw("Strict value is not equal to itself.")
42484 }
43485
486+
487+
488+@Callable(i)
489+func powerStake (recipientBytes) = if (onlyCalculator(i))
490+ then $Tuple2(nil, invoke(powerContractAddressOrFail, "commitForMiner", [toString(Address(recipientBytes))], i.payments))
491+ else $Tuple2(nil, unit)
492+
493+
494+
495+@Callable(i)
496+func voteForTxId (txId) = {
497+ let callerAddressString = toBase58String(i.caller.bytes)
498+ let keyPrefix = keyAllowedTxIdVotePrefix(txId)
499+ let result = [StringEntry(keyAllowedTxId(), txId)]
500+ let allowedTxIdOption = getString(this, keyAllowedTxId())
501+ let err = [if ((size(fromBase58String(txId)) == TXID_BYTES_LENGTH))
502+ then true
503+ else throwErr((txId + " is not valid txId")), if (if ((allowedTxIdOption == unit))
504+ then true
505+ else (value(allowedTxIdOption) != txId))
506+ then true
507+ else throwErr((txId + " is already allowed"))]
508+ if ((err == err))
509+ then voteINTERNAL(callerAddressString, keyPrefix, QUORUM, result)
510+ else throw("Strict value is not equal to itself.")
511+ }
512+
513+
514+@Verifier(tx)
515+func verify () = {
516+ let byProposal = match votingResultAddressOption {
517+ case proposalAddress: Address =>
518+ valueOrElse(getBoolean(proposalAddress, keyProposalAllowBroadcast(this, tx.id)), false)
519+ case _ =>
520+ false
521+ }
522+ let byAdmins = (tx.id == fromBase58String(valueOrElse(getString(this, keyAllowedTxId()), "")))
523+ let byOwner = if ((size(getAdminsList()) >= QUORUM))
524+ then false
525+ else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
526+ if (if (byProposal)
527+ then true
528+ else byAdmins)
529+ then true
530+ else byOwner
531+ }
44532

github/deemru/w8io/026f985 
56.28 ms