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