tx · HT69Nu1VNhAkR5uYH9mDrp1tzdFvHnxWdmS1P9d5awwS 3N7XWpdx1UJKZp5stTtFMXPEygyfZ7j4PyC: -0.01400000 Waves 2024.05.16 17:04 [3108676] smart account 3N7XWpdx1UJKZp5stTtFMXPEygyfZ7j4PyC > SELF 0.00000000 Waves
{ "type": 13, "id": "HT69Nu1VNhAkR5uYH9mDrp1tzdFvHnxWdmS1P9d5awwS", "fee": 1400000, "feeAssetId": null, "timestamp": 1715868294545, "version": 2, "chainId": 84, "sender": "3N7XWpdx1UJKZp5stTtFMXPEygyfZ7j4PyC", "senderPublicKey": "APsCCjsKHFx7rbr1mG8Pca43pccTbH2G4FZj4keEqKJ5", "proofs": [ "22tEsJda6Ui14AAX1JzWrvuSrXqmruvebRgSr97BEiGYm9rJCprvDnUvvcmEjuP3L6CFwyjURprTMNyb9u4angob" ], "script": "base64:BgItCAISAwoBCBIHCgUBAQERGBIHCgUBCAEIARIHCgUBEhERCBIDCgEBEgASABIAJgAHV2F2ZXNJZAIFV0FWRVMACE1pbmVyRmVlAAUAEVBheW91dEVtcHR5U3RhdHVzAAAAFVBheW91dEluaXRpYXRlZFN0YXR1cwABABVQYXlvdXRDb21wbGV0ZWRTdGF0dXMAAgASQmxvY2tzQmF0Y2hNYXhTaXplAAoAFlJlY2lwaWVudHNCYXRjaE1heFNpemUAZAAGSGVpZ2h0BQZoZWlnaHQABUFycjEwCQDMCAIAAAkAzAgCAAEJAMwIAgACCQDMCAIAAwkAzAgCAAQJAMwIAgAFCQDMCAIABgkAzAgCAAcJAMwIAgAICQDMCAIACQUDbmlsABBDb25maWdBZGRyZXNzS2V5Ag1jb25maWdBZGRyZXNzAA1MYXN0UGF5b3V0S2V5AgpsYXN0UGF5b3V0ABNNYXNzVHJhbnNmZXJGZWVzS2V5AhBtYXNzVHJhbnNmZXJGZWVzAApDaGFpbklkS2V5AgdjaGFpbklkABBEYWVtb25BZGRyZXNzS2V5Ag1kYWVtb25BZGRyZXNzABJEYWVtb25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lT3JFbHNlAgkAnAgCBQ1jb25maWdBZGRyZXNzBRJTaWduZXJQdWJsaWNLZXlLZXkIBQJ0eA9zZW5kZXJQdWJsaWNLZXkECXB1YmxpY0tleQMJAQlpc0RlZmluZWQBBRBjb25maWdBZGRyZXNzU3RyAwMJAQlpc0RlZmluZWQBBRR1bml0c0NoYWluQWRkcmVzc1N0cgURdmFsaWRGdW5jdGlvbk5hbWUHCAUCdHgPc2VuZGVyUHVibGljS2V5BQ9zaWduZXJQdWJsaWNLZXkIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAMQTAwgFCGludm9rZVR4CWJvZHlCeXRlcwkAkQMCCAUIaW52b2tlVHgGcHJvb2ZzAAAFCXB1YmxpY0tleQQQY29uZmlnQWRkcmVzc1N0cgkAnQgCBQR0aGlzBRBDb25maWdBZGRyZXNzS2V5BA1jb25maWdBZGRyZXNzCQERQGV4dHJOYXRpdmUoMTA2MikBCQEFdmFsdWUBBRBjb25maWdBZGRyZXNzU3RyBAlwdWJsaWNLZXkDCQEJaXNEZWZpbmVkAQUQY29uZmlnQWRkcmVzc1N0cgkBC3ZhbHVlT3JFbHNlAgkAnAgCBQ1jb25maWdBZGRyZXNzBRJTaWduZXJQdWJsaWNLZXlLZXkIBQJ0eA9zZW5kZXJQdWJsaWNLZXkIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAMgTAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFCXB1YmxpY0tleVabJjs=", "height": 3108676, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5AhQAXEViBmhNMBB3dbQQTy6c9qjc81moApEszPmsBxP Next: Fuqph3uTgyS6qgsxgT2YLKEQtKjoTsUqzhASvKXqFzjD Diff:
Old | New | Differences | |
---|---|---|---|
158 | 158 | else { | |
159 | 159 | let minerFee = fraction(amount, MinerFee, 100) | |
160 | 160 | let maintainerFee = (minerFee / 2) | |
161 | - | let | |
162 | - | let lessorsAmount = ((amount - maintainerFee) - | |
163 | - | $Tuple2(((accum._1 :+ ScriptTransfer(MaintainerAddress, maintainerFee, asset)) :+ ScriptTransfer(PuzzleBuybackAddress, | |
161 | + | let puzzleBuybackFee = (minerFee - maintainerFee) | |
162 | + | let lessorsAmount = ((amount - maintainerFee) - puzzleBuybackFee) | |
163 | + | $Tuple2(((accum._1 :+ ScriptTransfer(MaintainerAddress, maintainerFee, asset)) :+ ScriptTransfer(PuzzleBuybackAddress, puzzleBuybackFee, asset)), (accum._2 :+ toString(lessorsAmount))) | |
164 | 164 | } | |
165 | 165 | } | |
166 | 166 | } | |
167 | 167 | ||
168 | - | let $ | |
168 | + | let $t058955962 = { | |
169 | 169 | let $l = Arr10 | |
170 | 170 | let $s = size($l) | |
171 | 171 | let $acc0 = $Tuple2(nil, nil) | |
179 | 179 | ||
180 | 180 | $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) | |
181 | 181 | } | |
182 | - | let transfers = $ | |
183 | - | let amountKeys = $ | |
182 | + | let transfers = $t058955962._1 | |
183 | + | let amountKeys = $t058955962._2 | |
184 | 184 | let newPayoutData = makeString(([toString(startHeight), toString(endHeight)] ++ amountKeys), "_") | |
185 | 185 | (transfers ++ [IntegerEntry(LastPayoutKey, payoutId), StringEntry(makePayoutDataKey(payoutId), newPayoutData), IntegerEntry(makePayoutStatusKey(payoutId), PayoutInitiatedStatus)]) | |
186 | 186 | } | |
207 | 207 | if ((payoutStatus != PayoutInitiatedStatus)) | |
208 | 208 | then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be 1")) | |
209 | 209 | else { | |
210 | - | let $ | |
210 | + | let $t069137162 = if ((swapFrom == WavesId)) | |
211 | 211 | then $Tuple2(wavesBalance(this).available, unit) | |
212 | 212 | else { | |
213 | 213 | let assetId = fromBase58String(swapFrom) | |
214 | 214 | $Tuple2(assetBalance(this, assetId), assetId) | |
215 | 215 | } | |
216 | - | let balanceInBeforeSwap = $ | |
217 | - | let swapFromId = $ | |
216 | + | let balanceInBeforeSwap = $t069137162._1 | |
217 | + | let swapFromId = $t069137162._2 | |
218 | 218 | let swapInvoke = invoke(PuzzleAggregatorAddress, "swapWithReferral", [route, minToReceive, "puzzlenode"], [AttachedPayment(swapFromId, amountIn)]) | |
219 | 219 | if ((swapInvoke == swapInvoke)) | |
220 | 220 | then { | |
371 | 371 | else tx.senderPublicKey | |
372 | 372 | sigVerify_8Kb(massTx.bodyBytes, massTx.proofs[0], publicKey) | |
373 | 373 | case invokeTx: InvokeScriptTransaction => | |
374 | - | let validFunctionName = if (if (if ((invokeTx.function == "extendMainChain")) | |
375 | - | then true | |
376 | - | else (invokeTx.function == "appendBlock")) | |
374 | + | let validFunctionName = if (if ((invokeTx.function == "extendMainChain")) | |
377 | 375 | then true | |
378 | 376 | else (invokeTx.function == "startAltChain")) | |
379 | 377 | then true |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let WavesId = "WAVES" | |
5 | 5 | ||
6 | 6 | let MinerFee = 5 | |
7 | 7 | ||
8 | 8 | let PayoutEmptyStatus = 0 | |
9 | 9 | ||
10 | 10 | let PayoutInitiatedStatus = 1 | |
11 | 11 | ||
12 | 12 | let PayoutCompletedStatus = 2 | |
13 | 13 | ||
14 | 14 | let BlocksBatchMaxSize = 10 | |
15 | 15 | ||
16 | 16 | let RecipientsBatchMaxSize = 100 | |
17 | 17 | ||
18 | 18 | let Height = height | |
19 | 19 | ||
20 | 20 | let Arr10 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
21 | 21 | ||
22 | 22 | let ConfigAddressKey = "configAddress" | |
23 | 23 | ||
24 | 24 | let LastPayoutKey = "lastPayout" | |
25 | 25 | ||
26 | 26 | let MassTransferFeesKey = "massTransferFees" | |
27 | 27 | ||
28 | 28 | let ChainIdKey = "chainId" | |
29 | 29 | ||
30 | 30 | let DaemonAddressKey = "daemonAddress" | |
31 | 31 | ||
32 | 32 | let DaemonPublicKeyKey = "daemonPublicKey" | |
33 | 33 | ||
34 | 34 | let MaintainerAddressKey = "maintainerAddress" | |
35 | 35 | ||
36 | 36 | let PuzzleAggregatorAddressKey = "puzzleAggregatorAddress" | |
37 | 37 | ||
38 | 38 | let PuzzleBuybackAddressKey = "puzzleBuybackAddress" | |
39 | 39 | ||
40 | 40 | let SettingsAddressKey = "settingsAddress" | |
41 | 41 | ||
42 | 42 | let SignerPublicKeyKey = "signerPublicKey" | |
43 | 43 | ||
44 | 44 | let WavesDaoFactoryAddressKey = "wavesDaoFactoryAddress" | |
45 | 45 | ||
46 | 46 | let ConfigAddress = addressFromStringValue(getStringValue(this, ConfigAddressKey)) | |
47 | 47 | ||
48 | 48 | let ChainId = getIntegerValue(ConfigAddress, ChainIdKey) | |
49 | 49 | ||
50 | 50 | let DaemonAddress = addressFromStringValue(getStringValue(ConfigAddress, DaemonAddressKey)) | |
51 | 51 | ||
52 | 52 | let DaemonPublicKey = getBinaryValue(ConfigAddress, DaemonPublicKeyKey) | |
53 | 53 | ||
54 | 54 | let MaintainerAddress = addressFromStringValue(getStringValue(ConfigAddress, MaintainerAddressKey)) | |
55 | 55 | ||
56 | 56 | let PuzzleAggregatorAddress = addressFromStringValue(getStringValue(ConfigAddress, PuzzleAggregatorAddressKey)) | |
57 | 57 | ||
58 | 58 | let PuzzleBuybackAddress = addressFromStringValue(getStringValue(ConfigAddress, PuzzleBuybackAddressKey)) | |
59 | 59 | ||
60 | 60 | let SettingsAddress = addressFromStringValue(getStringValue(ConfigAddress, SettingsAddressKey)) | |
61 | 61 | ||
62 | 62 | let SignerPublicKey = getBinary(ConfigAddress, SignerPublicKeyKey) | |
63 | 63 | ||
64 | 64 | let WavesDaoFactoryAddress = addressFromStringValue(getStringValue(ConfigAddress, WavesDaoFactoryAddressKey)) | |
65 | 65 | ||
66 | 66 | func makePayoutDataKey (payoutId) = ("payoutData_" + toString(payoutId)) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func makePayoutStatusKey (payoutId) = ("payoutStatus_" + toString(payoutId)) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func makePayoutAdditionalRewardsKey (payoutId) = ("payoutAdditionalRewards_" + toString(payoutId)) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func getLastPayout () = getIntegerValue(this, LastPayoutKey) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func getPayoutData (payoutId) = { | |
79 | 79 | let payoutString = getStringValue(makePayoutDataKey(payoutId)) | |
80 | 80 | let payoutDataList = split(payoutString, "_") | |
81 | 81 | let startHeight = parseIntValue(payoutDataList[0]) | |
82 | 82 | let endHeight = parseIntValue(payoutDataList[1]) | |
83 | 83 | $Tuple2(startHeight, endHeight) | |
84 | 84 | } | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func getPayoutStatus (payoutId) = valueOrElse(getInteger(makePayoutStatusKey(payoutId)), PayoutEmptyStatus) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func getPayoutAdditionalRewards (payoutId) = valueOrElse(getInteger(makePayoutAdditionalRewardsKey(payoutId)), 0) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | @Callable(i) | |
94 | 94 | func setup (configAddress) = if ((i.caller != this)) | |
95 | 95 | then throw("Access denied") | |
96 | 96 | else if ((size(i.payments) != 0)) | |
97 | 97 | then throw("Payments are prohibited") | |
98 | 98 | else if ((addressFromString(configAddress) == unit)) | |
99 | 99 | then throw(("Invalid configAddress: " + configAddress)) | |
100 | 100 | else [StringEntry(ConfigAddressKey, configAddress)] | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | ||
104 | 104 | @Callable(i) | |
105 | 105 | func initiatePayout (payoutId,startHeight,endHeight,amounts,assets) = if ((i.caller != DaemonAddress)) | |
106 | 106 | then throw("Access denied") | |
107 | 107 | else if ((size(i.payments) != 0)) | |
108 | 108 | then throw("Payments are prohibited") | |
109 | 109 | else { | |
110 | 110 | let lastPayout = getLastPayout() | |
111 | 111 | if ((payoutId != (lastPayout + 1))) | |
112 | 112 | then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString((lastPayout + 1)))) | |
113 | 113 | else { | |
114 | 114 | let lastPayoutStatus = getPayoutStatus(lastPayout) | |
115 | 115 | if ((lastPayoutStatus != PayoutCompletedStatus)) | |
116 | 116 | then throw((("Last payout: " + toString(lastPayout)) + " was not completed")) | |
117 | 117 | else { | |
118 | 118 | let $t036663730 = getPayoutData(lastPayout) | |
119 | 119 | let lastStartHeight = $t036663730._1 | |
120 | 120 | let lastEndHeight = $t036663730._2 | |
121 | 121 | if ((startHeight != (lastEndHeight + 1))) | |
122 | 122 | then throw(((("Wrong startHeight: " + toString(startHeight)) + ", should be: ") + toString((lastEndHeight + 1)))) | |
123 | 123 | else if ((startHeight > endHeight)) | |
124 | 124 | then throw(((("endHeight: " + toString(endHeight)) + " less than startHeight: ") + toString(startHeight))) | |
125 | 125 | else { | |
126 | 126 | let inputsQuantity = getIntegerValue(SettingsAddress, "inputsQuantity") | |
127 | 127 | let amountsSize = size(amounts) | |
128 | 128 | let assetsSize = size(assets) | |
129 | 129 | if (if ((amountsSize != assetsSize)) | |
130 | 130 | then true | |
131 | 131 | else (amountsSize != inputsQuantity)) | |
132 | 132 | then throw("Wrong size of amounts or assets") | |
133 | 133 | else { | |
134 | 134 | let availableWavesDaoLpToClaim = valueOrElse(getInteger(WavesDaoFactoryAddress, ("%s%s__available__" + toString(this))), 0) | |
135 | 135 | let wavesDaoNextBlockToProcess = getIntegerValue(WavesDaoFactoryAddress, "%s__nextBlockToProcess") | |
136 | 136 | let wavesDlpClaim = if (if ((availableWavesDaoLpToClaim > 0)) | |
137 | 137 | then ((wavesDaoNextBlockToProcess + BlocksBatchMaxSize) >= Height) | |
138 | 138 | else false) | |
139 | 139 | then invoke(WavesDaoFactoryAddress, "claimLP", nil, nil) | |
140 | 140 | else unit | |
141 | 141 | if ((wavesDlpClaim == wavesDlpClaim)) | |
142 | 142 | then { | |
143 | 143 | let currentAdditionalRewards = getPayoutAdditionalRewards(payoutId) | |
144 | 144 | func assetsFold (accum,index) = if ((index >= assetsSize)) | |
145 | 145 | then accum | |
146 | 146 | else { | |
147 | 147 | let assetStr = assets[index] | |
148 | 148 | if ((getInteger(SettingsAddress, ("inputAssetIndex_" + assetStr)) == unit)) | |
149 | 149 | then throw(("Unknown input: " + assetStr)) | |
150 | 150 | else { | |
151 | 151 | let $t051325311 = if ((assetStr == WavesId)) | |
152 | 152 | then $Tuple2(unit, (amounts[index] + currentAdditionalRewards)) | |
153 | 153 | else $Tuple2(fromBase58String(assetStr), amounts[index]) | |
154 | 154 | let asset = $t051325311._1 | |
155 | 155 | let amount = $t051325311._2 | |
156 | 156 | if ((0 > amount)) | |
157 | 157 | then throw((("Wrong asset amount: " + toString(amount)) + ", should be positive or zero")) | |
158 | 158 | else { | |
159 | 159 | let minerFee = fraction(amount, MinerFee, 100) | |
160 | 160 | let maintainerFee = (minerFee / 2) | |
161 | - | let | |
162 | - | let lessorsAmount = ((amount - maintainerFee) - | |
163 | - | $Tuple2(((accum._1 :+ ScriptTransfer(MaintainerAddress, maintainerFee, asset)) :+ ScriptTransfer(PuzzleBuybackAddress, | |
161 | + | let puzzleBuybackFee = (minerFee - maintainerFee) | |
162 | + | let lessorsAmount = ((amount - maintainerFee) - puzzleBuybackFee) | |
163 | + | $Tuple2(((accum._1 :+ ScriptTransfer(MaintainerAddress, maintainerFee, asset)) :+ ScriptTransfer(PuzzleBuybackAddress, puzzleBuybackFee, asset)), (accum._2 :+ toString(lessorsAmount))) | |
164 | 164 | } | |
165 | 165 | } | |
166 | 166 | } | |
167 | 167 | ||
168 | - | let $ | |
168 | + | let $t058955962 = { | |
169 | 169 | let $l = Arr10 | |
170 | 170 | let $s = size($l) | |
171 | 171 | let $acc0 = $Tuple2(nil, nil) | |
172 | 172 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
173 | 173 | then $a | |
174 | 174 | else assetsFold($a, $l[$i]) | |
175 | 175 | ||
176 | 176 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
177 | 177 | then $a | |
178 | 178 | else throw("List size exceeds 10") | |
179 | 179 | ||
180 | 180 | $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) | |
181 | 181 | } | |
182 | - | let transfers = $ | |
183 | - | let amountKeys = $ | |
182 | + | let transfers = $t058955962._1 | |
183 | + | let amountKeys = $t058955962._2 | |
184 | 184 | let newPayoutData = makeString(([toString(startHeight), toString(endHeight)] ++ amountKeys), "_") | |
185 | 185 | (transfers ++ [IntegerEntry(LastPayoutKey, payoutId), StringEntry(makePayoutDataKey(payoutId), newPayoutData), IntegerEntry(makePayoutStatusKey(payoutId), PayoutInitiatedStatus)]) | |
186 | 186 | } | |
187 | 187 | else throw("Strict value is not equal to itself.") | |
188 | 188 | } | |
189 | 189 | } | |
190 | 190 | } | |
191 | 191 | } | |
192 | 192 | } | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | ||
196 | 196 | @Callable(i) | |
197 | 197 | func swap (payoutId,swapFrom,amountIn,route,minToReceive) = if ((i.caller != DaemonAddress)) | |
198 | 198 | then throw("Access denied") | |
199 | 199 | else if ((size(i.payments) != 0)) | |
200 | 200 | then throw("Payments are prohibited") | |
201 | 201 | else { | |
202 | 202 | let lastPayout = getLastPayout() | |
203 | 203 | if ((lastPayout != payoutId)) | |
204 | 204 | then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString(lastPayout))) | |
205 | 205 | else { | |
206 | 206 | let payoutStatus = getPayoutStatus(payoutId) | |
207 | 207 | if ((payoutStatus != PayoutInitiatedStatus)) | |
208 | 208 | then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be 1")) | |
209 | 209 | else { | |
210 | - | let $ | |
210 | + | let $t069137162 = if ((swapFrom == WavesId)) | |
211 | 211 | then $Tuple2(wavesBalance(this).available, unit) | |
212 | 212 | else { | |
213 | 213 | let assetId = fromBase58String(swapFrom) | |
214 | 214 | $Tuple2(assetBalance(this, assetId), assetId) | |
215 | 215 | } | |
216 | - | let balanceInBeforeSwap = $ | |
217 | - | let swapFromId = $ | |
216 | + | let balanceInBeforeSwap = $t069137162._1 | |
217 | + | let swapFromId = $t069137162._2 | |
218 | 218 | let swapInvoke = invoke(PuzzleAggregatorAddress, "swapWithReferral", [route, minToReceive, "puzzlenode"], [AttachedPayment(swapFromId, amountIn)]) | |
219 | 219 | if ((swapInvoke == swapInvoke)) | |
220 | 220 | then { | |
221 | 221 | let balanceInAfterSwap = if ((swapFrom == WavesId)) | |
222 | 222 | then wavesBalance(this).available | |
223 | 223 | else assetBalance(this, value(swapFromId)) | |
224 | 224 | let refund = (balanceInAfterSwap - (balanceInBeforeSwap - amountIn)) | |
225 | 225 | if ((refund > 10)) | |
226 | 226 | then throw(("Rollback aggregator refund: " + toString(refund))) | |
227 | 227 | else nil | |
228 | 228 | } | |
229 | 229 | else throw("Strict value is not equal to itself.") | |
230 | 230 | } | |
231 | 231 | } | |
232 | 232 | } | |
233 | 233 | ||
234 | 234 | ||
235 | 235 | ||
236 | 236 | @Callable(i) | |
237 | 237 | func distributeTokens (payoutId,recipients,amounts,assets,attachment) = if ((i.caller != DaemonAddress)) | |
238 | 238 | then throw("Access denied") | |
239 | 239 | else if ((size(i.payments) != 0)) | |
240 | 240 | then throw("Payments are prohibited") | |
241 | 241 | else { | |
242 | 242 | let lastPayout = getLastPayout() | |
243 | 243 | if ((lastPayout != payoutId)) | |
244 | 244 | then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString(lastPayout))) | |
245 | 245 | else { | |
246 | 246 | let payoutStatus = getPayoutStatus(payoutId) | |
247 | 247 | if ((payoutStatus != PayoutInitiatedStatus)) | |
248 | 248 | then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be 1")) | |
249 | 249 | else { | |
250 | 250 | let recipientsSize = size(recipients) | |
251 | 251 | let amountsSize = size(amounts) | |
252 | 252 | let assetsSize = size(assets) | |
253 | 253 | if (if ((recipientsSize != amountsSize)) | |
254 | 254 | then true | |
255 | 255 | else (recipientsSize != assetsSize)) | |
256 | 256 | then throw(((((("Wrong recipients size: " + toString(recipientsSize)) + ", amounts size: ") + toString(amountsSize)) + ", assets size: ") + toString(assetsSize))) | |
257 | 257 | else if ((recipientsSize == 0)) | |
258 | 258 | then throw("Recipients list should not be empty") | |
259 | 259 | else if ((recipientsSize > RecipientsBatchMaxSize)) | |
260 | 260 | then throw(((("Should be not greater than " + toString(RecipientsBatchMaxSize)) + " recipients, current: ") + toString(recipientsSize))) | |
261 | 261 | else { | |
262 | 262 | let magicByte = drop(toBytes(1), 7) | |
263 | 263 | let chainIdByte = drop(toBytes(ChainId), 7) | |
264 | 264 | let addressPrefix = (magicByte + chainIdByte) | |
265 | 265 | func scriptTransfersFold (accum,index) = if ((index >= recipientsSize)) | |
266 | 266 | then accum | |
267 | 267 | else { | |
268 | 268 | let publicKeyHash = recipients[index] | |
269 | 269 | let addressData = (addressPrefix + publicKeyHash) | |
270 | 270 | let addressChecksum = take(keccak256(blake2b256(addressData)), 4) | |
271 | 271 | let recipient = Address((addressData + addressChecksum)) | |
272 | 272 | let amount = amounts[index] | |
273 | 273 | let assetIndex = assets[index] | |
274 | 274 | let assetId = getBinaryValue(SettingsAddress, ("assetId_" + toString(assetIndex))) | |
275 | 275 | let asset = if ((assetId == base58'')) | |
276 | 276 | then unit | |
277 | 277 | else assetId | |
278 | 278 | (accum :+ ScriptTransfer(recipient, amount, asset)) | |
279 | 279 | } | |
280 | 280 | ||
281 | 281 | let indexes = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99] | |
282 | 282 | let $l = indexes | |
283 | 283 | let $s = size($l) | |
284 | 284 | let $acc0 = nil | |
285 | 285 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
286 | 286 | then $a | |
287 | 287 | else scriptTransfersFold($a, $l[$i]) | |
288 | 288 | ||
289 | 289 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
290 | 290 | then $a | |
291 | 291 | else throw("List size exceeds 100") | |
292 | 292 | ||
293 | 293 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
294 | 294 | } | |
295 | 295 | } | |
296 | 296 | } | |
297 | 297 | } | |
298 | 298 | ||
299 | 299 | ||
300 | 300 | ||
301 | 301 | @Callable(i) | |
302 | 302 | func finalizePayout (payoutId) = if ((i.caller != DaemonAddress)) | |
303 | 303 | then throw("Access denied") | |
304 | 304 | else { | |
305 | 305 | let lastPayout = getLastPayout() | |
306 | 306 | if ((lastPayout != payoutId)) | |
307 | 307 | then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString(lastPayout))) | |
308 | 308 | else { | |
309 | 309 | let payoutStatus = getPayoutStatus(lastPayout) | |
310 | 310 | if ((payoutStatus != PayoutInitiatedStatus)) | |
311 | 311 | then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be: 1")) | |
312 | 312 | else [IntegerEntry(makePayoutStatusKey(lastPayout), PayoutCompletedStatus)] | |
313 | 313 | } | |
314 | 314 | } | |
315 | 315 | ||
316 | 316 | ||
317 | 317 | ||
318 | 318 | @Callable(i) | |
319 | 319 | func addAdditionalRewards () = if ((size(i.payments) != 1)) | |
320 | 320 | then throw("At least one payment should be attached") | |
321 | 321 | else if ((i.payments[0].assetId != unit)) | |
322 | 322 | then throw("Only waves can be attached") | |
323 | 323 | else { | |
324 | 324 | let lastPayout = getLastPayout() | |
325 | 325 | let lastPayoutStatus = getPayoutStatus(lastPayout) | |
326 | 326 | if ((lastPayoutStatus != PayoutCompletedStatus)) | |
327 | 327 | then throw((("Last payout: " + toString(lastPayout)) + " was not completed")) | |
328 | 328 | else { | |
329 | 329 | let nextPayoutId = (lastPayout + 1) | |
330 | 330 | let currentAdditionalRewards = getPayoutAdditionalRewards(nextPayoutId) | |
331 | 331 | let newAdditionalRewards = (currentAdditionalRewards + i.payments[0].amount) | |
332 | 332 | [IntegerEntry(makePayoutAdditionalRewardsKey(nextPayoutId), newAdditionalRewards)] | |
333 | 333 | } | |
334 | 334 | } | |
335 | 335 | ||
336 | 336 | ||
337 | 337 | ||
338 | 338 | @Callable(i) | |
339 | 339 | func addMassTransferFees () = if ((size(i.payments) != 1)) | |
340 | 340 | then throw("At least one payment should be attached") | |
341 | 341 | else if ((i.payments[0].assetId != unit)) | |
342 | 342 | then throw("Only waves can be attached") | |
343 | 343 | else { | |
344 | 344 | let currentMassTransferFees = valueOrElse(getInteger(MassTransferFeesKey), 0) | |
345 | 345 | let newMassTransferFees = (currentMassTransferFees + i.payments[0].amount) | |
346 | 346 | [IntegerEntry(MassTransferFeesKey, newMassTransferFees)] | |
347 | 347 | } | |
348 | 348 | ||
349 | 349 | ||
350 | 350 | ||
351 | 351 | @Callable(i) | |
352 | 352 | func withdrawMassTransferFees () = if ((i.caller != MaintainerAddress)) | |
353 | 353 | then throw("Access denied") | |
354 | 354 | else if ((size(i.payments) != 0)) | |
355 | 355 | then throw("Payments are prohibited") | |
356 | 356 | else { | |
357 | 357 | let currentMassTransferFees = valueOrElse(getInteger(MassTransferFeesKey), 0) | |
358 | 358 | if ((currentMassTransferFees == 0)) | |
359 | 359 | then throw("Nothing to withdraw") | |
360 | 360 | else [IntegerEntry(MassTransferFeesKey, 0), ScriptTransfer(MaintainerAddress, currentMassTransferFees, unit)] | |
361 | 361 | } | |
362 | 362 | ||
363 | 363 | ||
364 | 364 | @Verifier(tx) | |
365 | 365 | func verify () = match tx { | |
366 | 366 | case massTx: MassTransferTransaction => | |
367 | 367 | let configAddressStr = getString(this, ConfigAddressKey) | |
368 | 368 | let configAddress = addressFromStringValue(value(configAddressStr)) | |
369 | 369 | let publicKey = if (isDefined(configAddressStr)) | |
370 | 370 | then valueOrElse(getBinary(configAddress, DaemonPublicKeyKey), tx.senderPublicKey) | |
371 | 371 | else tx.senderPublicKey | |
372 | 372 | sigVerify_8Kb(massTx.bodyBytes, massTx.proofs[0], publicKey) | |
373 | 373 | case invokeTx: InvokeScriptTransaction => | |
374 | - | let validFunctionName = if (if (if ((invokeTx.function == "extendMainChain")) | |
375 | - | then true | |
376 | - | else (invokeTx.function == "appendBlock")) | |
374 | + | let validFunctionName = if (if ((invokeTx.function == "extendMainChain")) | |
377 | 375 | then true | |
378 | 376 | else (invokeTx.function == "startAltChain")) | |
379 | 377 | then true | |
380 | 378 | else (invokeTx.function == "extendAltChain") | |
381 | 379 | let configAddressStr = getString(this, ConfigAddressKey) | |
382 | 380 | let configAddress = addressFromStringValue(value(configAddressStr)) | |
383 | 381 | let unitsChainAddressStr = getString(configAddress, ("unitsChain_" + toString({ | |
384 | 382 | let @ = invokeTx.dApp | |
385 | 383 | if ($isInstanceOf(@, "Address")) | |
386 | 384 | then @ | |
387 | 385 | else throw(($getType(@) + " couldn't be cast to Address")) | |
388 | 386 | }))) | |
389 | 387 | let signerPublicKey = valueOrElse(getBinary(configAddress, SignerPublicKeyKey), tx.senderPublicKey) | |
390 | 388 | let publicKey = if (isDefined(configAddressStr)) | |
391 | 389 | then if (if (isDefined(unitsChainAddressStr)) | |
392 | 390 | then validFunctionName | |
393 | 391 | else false) | |
394 | 392 | then tx.senderPublicKey | |
395 | 393 | else signerPublicKey | |
396 | 394 | else tx.senderPublicKey | |
397 | 395 | sigVerify_8Kb(invokeTx.bodyBytes, invokeTx.proofs[0], publicKey) | |
398 | 396 | case _ => | |
399 | 397 | let configAddressStr = getString(this, ConfigAddressKey) | |
400 | 398 | let configAddress = addressFromStringValue(value(configAddressStr)) | |
401 | 399 | let publicKey = if (isDefined(configAddressStr)) | |
402 | 400 | then valueOrElse(getBinary(configAddress, SignerPublicKeyKey), tx.senderPublicKey) | |
403 | 401 | else tx.senderPublicKey | |
404 | 402 | sigVerify_128Kb(tx.bodyBytes, tx.proofs[0], publicKey) | |
405 | 403 | } | |
406 | 404 |
github/deemru/w8io/fabc49c 60.07 ms ◑