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:BgItCAISAwoBCBIHCgUBAQERGBIHCgUBCAEIARIHCgUBEhERCBIDCgEBEgASABIAJQAHV2F2ZXNJZAIFV0FWRVMACE1pbmVyRmVlAAUAEVBheW91dEVtcHR5U3RhdHVzAAAAFVBheW91dEluaXRpYXRlZFN0YXR1cwABABVQYXlvdXRDb21wbGV0ZWRTdGF0dXMAAgASQmxvY2tzQmF0Y2hNYXhTaXplAAoAFlJlY2lwaWVudHNCYXRjaE1heFNpemUAZAAGSGVpZ2h0BQZoZWlnaHQABUFycjEwCQDMCAIAAAkAzAgCAAEJAMwIAgACCQDMCAIAAwkAzAgCAAQJAMwIAgAFCQDMCAIABgkAzAgCAAcJAMwIAgAICQDMCAIACQUDbmlsABBDb25maWdBZGRyZXNzS2V5Ag1jb25maWdBZGRyZXNzAA1MYXN0UGF5b3V0S2V5AgpsYXN0UGF5b3V0ABNNYXNzVHJhbnNmZXJGZWVzS2V5AhBtYXNzVHJhbnNmZXJGZWVzAA9XYXZlc0NoYWluSWRLZXkJAKwCAgIIY2hhaW5JZF8FB1dhdmVzSWQAEERhZW1vbkFkZHJlc3NL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JAQlpc0RlZmluZWQBBRBjb25maWdBZGRyZXNzU3RyCQELdmFsdWVPckVsc2UCCQCcCAIFDWNvbmZpZ0FkZHJlc3MFElNpZ25lclB1YmxpY0tleUtleQgFAnR4D3NlbmRlclB1YmxpY0tleQgFAnR4D3NlbmRlclB1YmxpY0tleQkAyBMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUJcHVibGljS2V5cpzdjw==", "height": 3251344, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DMXhdGpcvh65pn25ZCbsyZXjeb4Dm2Ge89xytG2jJd1v Next: none Diff:
OldNewDifferences
366366 else tx.senderPublicKey
367367 sigVerify_8Kb(massTx.bodyBytes, massTx.proofs[0], publicKey)
368368 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")
381369 let configAddressStr = getString(this, ConfigAddressKey)
382370 let configAddress = addressFromStringValue(value(configAddressStr))
383371 let unitsChain = getString(configAddress, ("unitsChainName_" + toString({
388376 })))
389377 let signerPublicKey = valueOrElse(getBinary(configAddress, SignerPublicKeyKey), tx.senderPublicKey)
390378 let publicKey = if (isDefined(configAddressStr))
391- then if (if (isDefined(unitsChain))
392- then validFunctionName
393- else false)
379+ then if (isDefined(unitsChain))
394380 then tx.senderPublicKey
395381 else signerPublicKey
396382 else tx.senderPublicKey
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let WavesId = "WAVES"
55
66 let MinerFee = 5
77
88 let PayoutEmptyStatus = 0
99
1010 let PayoutInitiatedStatus = 1
1111
1212 let PayoutCompletedStatus = 2
1313
1414 let BlocksBatchMaxSize = 10
1515
1616 let RecipientsBatchMaxSize = 100
1717
1818 let Height = height
1919
2020 let Arr10 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
2121
2222 let ConfigAddressKey = "configAddress"
2323
2424 let LastPayoutKey = "lastPayout"
2525
2626 let MassTransferFeesKey = "massTransferFees"
2727
2828 let WavesChainIdKey = ("chainId_" + WavesId)
2929
3030 let DaemonAddressKey = "daemonAddress"
3131
3232 let DaemonPublicKeyKey = "daemonPublicKey"
3333
3434 let MaintainerAddressKey = "maintainerAddress"
3535
3636 let PuzzleAggregatorAddressKey = "puzzleAggregatorAddress"
3737
3838 let PuzzleBuybackAddressKey = "puzzleBuybackAddress"
3939
4040 let SettingsAddressKey = "settingsAddress"
4141
4242 let SignerPublicKeyKey = "signerPublicKey"
4343
4444 let WavesDaoFactoryAddressKey = "wavesDaoFactoryAddress"
4545
4646 let ConfigAddress = addressFromStringValue(getStringValue(this, ConfigAddressKey))
4747
4848 let WavesChainId = getIntegerValue(ConfigAddress, WavesChainIdKey)
4949
5050 let DaemonAddress = addressFromStringValue(getStringValue(ConfigAddress, DaemonAddressKey))
5151
5252 let DaemonPublicKey = getBinaryValue(ConfigAddress, DaemonPublicKeyKey)
5353
5454 let MaintainerAddress = addressFromStringValue(getStringValue(ConfigAddress, MaintainerAddressKey))
5555
5656 let PuzzleAggregatorAddress = addressFromStringValue(getStringValue(ConfigAddress, PuzzleAggregatorAddressKey))
5757
5858 let PuzzleBuybackAddress = addressFromStringValue(getStringValue(ConfigAddress, PuzzleBuybackAddressKey))
5959
6060 let SignerPublicKey = getBinary(ConfigAddress, SignerPublicKeyKey)
6161
6262 let WavesDaoFactoryAddress = addressFromStringValue(getStringValue(ConfigAddress, WavesDaoFactoryAddressKey))
6363
6464 func makePayoutDataKey (payoutId) = ("payoutData_" + toString(payoutId))
6565
6666
6767 func makePayoutStatusKey (payoutId) = ("payoutStatus_" + toString(payoutId))
6868
6969
7070 func makePayoutAdditionalRewardsKey (payoutId) = ("payoutAdditionalRewards_" + toString(payoutId))
7171
7272
7373 func getLastPayout () = getIntegerValue(this, LastPayoutKey)
7474
7575
7676 func getPayoutData (payoutId) = {
7777 let payoutString = getStringValue(makePayoutDataKey(payoutId))
7878 let payoutDataList = split(payoutString, "_")
7979 let startHeight = parseIntValue(payoutDataList[0])
8080 let endHeight = parseIntValue(payoutDataList[1])
8181 $Tuple2(startHeight, endHeight)
8282 }
8383
8484
8585 func getPayoutStatus (payoutId) = valueOrElse(getInteger(makePayoutStatusKey(payoutId)), PayoutEmptyStatus)
8686
8787
8888 func getPayoutAdditionalRewards (payoutId) = valueOrElse(getInteger(makePayoutAdditionalRewardsKey(payoutId)), 0)
8989
9090
9191 @Callable(i)
9292 func setup (configAddress) = if ((i.caller != this))
9393 then throw("Access denied")
9494 else if ((size(i.payments) != 0))
9595 then throw("Payments are prohibited")
9696 else if ((addressFromString(configAddress) == unit))
9797 then throw(("Invalid configAddress: " + configAddress))
9898 else [StringEntry(ConfigAddressKey, configAddress)]
9999
100100
101101
102102 @Callable(i)
103103 func initiatePayout (payoutId,startHeight,endHeight,amounts,assets) = if ((i.caller != DaemonAddress))
104104 then throw("Access denied")
105105 else if ((size(i.payments) != 0))
106106 then throw("Payments are prohibited")
107107 else {
108108 let lastPayout = getLastPayout()
109109 if ((payoutId != (lastPayout + 1)))
110110 then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString((lastPayout + 1))))
111111 else {
112112 let lastPayoutStatus = getPayoutStatus(lastPayout)
113113 if ((lastPayoutStatus != PayoutCompletedStatus))
114114 then throw((("Last payout: " + toString(lastPayout)) + " was not completed"))
115115 else {
116116 let $t035963660 = getPayoutData(lastPayout)
117117 let lastStartHeight = $t035963660._1
118118 let lastEndHeight = $t035963660._2
119119 if ((startHeight != (lastEndHeight + 1)))
120120 then throw(((("Wrong startHeight: " + toString(startHeight)) + ", should be: ") + toString((lastEndHeight + 1))))
121121 else if ((startHeight > endHeight))
122122 then throw(((("endHeight: " + toString(endHeight)) + " less than startHeight: ") + toString(startHeight)))
123123 else {
124124 let amountsSize = size(amounts)
125125 let assetsSize = size(assets)
126126 if ((amountsSize != assetsSize))
127127 then throw("Wrong size of amounts or assets")
128128 else {
129129 let availableWavesDaoLpToClaim = valueOrElse(getInteger(WavesDaoFactoryAddress, ("%s%s__available__" + toString(this))), 0)
130130 let wavesDaoNextBlockToProcess = getIntegerValue(WavesDaoFactoryAddress, "%s__nextBlockToProcess")
131131 let wavesDlpClaim = if (if ((availableWavesDaoLpToClaim > 0))
132132 then ((wavesDaoNextBlockToProcess + BlocksBatchMaxSize) >= Height)
133133 else false)
134134 then invoke(WavesDaoFactoryAddress, "claimLP", nil, nil)
135135 else unit
136136 if ((wavesDlpClaim == wavesDlpClaim))
137137 then {
138138 let currentAdditionalRewards = getPayoutAdditionalRewards(payoutId)
139139 func assetsFold (accum,index) = if ((index >= assetsSize))
140140 then accum
141141 else {
142142 let assetStr = assets[index]
143143 if ((getInteger(ConfigAddress, ("assetIndex_" + assetStr)) == unit))
144144 then throw(("Unknown asset: " + assetStr))
145145 else {
146146 let $t049465125 = if ((assetStr == WavesId))
147147 then $Tuple2(unit, (amounts[index] + currentAdditionalRewards))
148148 else $Tuple2(fromBase58String(assetStr), amounts[index])
149149 let asset = $t049465125._1
150150 let amount = $t049465125._2
151151 if ((0 > amount))
152152 then throw((("Wrong asset amount: " + toString(amount)) + ", should be positive or zero"))
153153 else {
154154 let minerFee = fraction(amount, MinerFee, 100)
155155 let maintainerFee = (minerFee / 2)
156156 let puzzleBuybackFee = (minerFee - maintainerFee)
157157 let lessorsAmount = ((amount - maintainerFee) - puzzleBuybackFee)
158158 $Tuple2(((accum._1 :+ ScriptTransfer(MaintainerAddress, maintainerFee, asset)) :+ ScriptTransfer(PuzzleBuybackAddress, puzzleBuybackFee, asset)), (accum._2 :+ toString(lessorsAmount)))
159159 }
160160 }
161161 }
162162
163163 let $t057095776 = {
164164 let $l = Arr10
165165 let $s = size($l)
166166 let $acc0 = $Tuple2(nil, nil)
167167 func $f0_1 ($a,$i) = if (($i >= $s))
168168 then $a
169169 else assetsFold($a, $l[$i])
170170
171171 func $f0_2 ($a,$i) = if (($i >= $s))
172172 then $a
173173 else throw("List size exceeds 10")
174174
175175 $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)
176176 }
177177 let transfers = $t057095776._1
178178 let amountKeys = $t057095776._2
179179 let newPayoutData = makeString(([toString(startHeight), toString(endHeight)] ++ amountKeys), "_")
180180 (transfers ++ [IntegerEntry(LastPayoutKey, payoutId), StringEntry(makePayoutDataKey(payoutId), newPayoutData), IntegerEntry(makePayoutStatusKey(payoutId), PayoutInitiatedStatus)])
181181 }
182182 else throw("Strict value is not equal to itself.")
183183 }
184184 }
185185 }
186186 }
187187 }
188188
189189
190190
191191 @Callable(i)
192192 func swap (payoutId,swapFrom,amountIn,route,minToReceive) = if ((i.caller != DaemonAddress))
193193 then throw("Access denied")
194194 else if ((size(i.payments) != 0))
195195 then throw("Payments are prohibited")
196196 else {
197197 let lastPayout = getLastPayout()
198198 if ((lastPayout != payoutId))
199199 then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString(lastPayout)))
200200 else {
201201 let payoutStatus = getPayoutStatus(payoutId)
202202 if ((payoutStatus != PayoutInitiatedStatus))
203203 then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be 1"))
204204 else {
205205 let $t067276976 = if ((swapFrom == WavesId))
206206 then $Tuple2(wavesBalance(this).available, unit)
207207 else {
208208 let assetId = fromBase58String(swapFrom)
209209 $Tuple2(assetBalance(this, assetId), assetId)
210210 }
211211 let balanceInBeforeSwap = $t067276976._1
212212 let swapFromId = $t067276976._2
213213 let swapInvoke = invoke(PuzzleAggregatorAddress, "swapWithReferral", [route, minToReceive, "puzzlenode"], [AttachedPayment(swapFromId, amountIn)])
214214 if ((swapInvoke == swapInvoke))
215215 then {
216216 let balanceInAfterSwap = if ((swapFrom == WavesId))
217217 then wavesBalance(this).available
218218 else assetBalance(this, value(swapFromId))
219219 let refund = (balanceInAfterSwap - (balanceInBeforeSwap - amountIn))
220220 if ((refund > 10))
221221 then throw(("Rollback aggregator refund: " + toString(refund)))
222222 else nil
223223 }
224224 else throw("Strict value is not equal to itself.")
225225 }
226226 }
227227 }
228228
229229
230230
231231 @Callable(i)
232232 func distributeTokens (payoutId,recipients,amounts,assets,attachment) = if ((i.caller != DaemonAddress))
233233 then throw("Access denied")
234234 else if ((size(i.payments) != 0))
235235 then throw("Payments are prohibited")
236236 else {
237237 let lastPayout = getLastPayout()
238238 if ((lastPayout != payoutId))
239239 then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString(lastPayout)))
240240 else {
241241 let payoutStatus = getPayoutStatus(payoutId)
242242 if ((payoutStatus != PayoutInitiatedStatus))
243243 then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be 1"))
244244 else {
245245 let recipientsSize = size(recipients)
246246 let amountsSize = size(amounts)
247247 let assetsSize = size(assets)
248248 if (if ((recipientsSize != amountsSize))
249249 then true
250250 else (recipientsSize != assetsSize))
251251 then throw(((((("Wrong recipients size: " + toString(recipientsSize)) + ", amounts size: ") + toString(amountsSize)) + ", assets size: ") + toString(assetsSize)))
252252 else if ((recipientsSize == 0))
253253 then throw("Recipients list should not be empty")
254254 else if ((recipientsSize > RecipientsBatchMaxSize))
255255 then throw(((("Should be not greater than " + toString(RecipientsBatchMaxSize)) + " recipients, current: ") + toString(recipientsSize)))
256256 else {
257257 let magicByte = drop(toBytes(1), 7)
258258 let chainIdByte = drop(toBytes(WavesChainId), 7)
259259 let addressPrefix = (magicByte + chainIdByte)
260260 func scriptTransfersFold (accum,index) = if ((index >= recipientsSize))
261261 then accum
262262 else {
263263 let publicKeyHash = recipients[index]
264264 let addressData = (addressPrefix + publicKeyHash)
265265 let addressChecksum = take(keccak256(blake2b256(addressData)), 4)
266266 let recipient = Address((addressData + addressChecksum))
267267 let amount = amounts[index]
268268 let assetIndex = assets[index]
269269 let assetId = getBinaryValue(ConfigAddress, ("assetId_" + toString(assetIndex)))
270270 let asset = if ((assetId == base58''))
271271 then unit
272272 else assetId
273273 (accum :+ ScriptTransfer(recipient, amount, asset))
274274 }
275275
276276 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]
277277 let $l = indexes
278278 let $s = size($l)
279279 let $acc0 = nil
280280 func $f0_1 ($a,$i) = if (($i >= $s))
281281 then $a
282282 else scriptTransfersFold($a, $l[$i])
283283
284284 func $f0_2 ($a,$i) = if (($i >= $s))
285285 then $a
286286 else throw("List size exceeds 100")
287287
288288 $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)
289289 }
290290 }
291291 }
292292 }
293293
294294
295295
296296 @Callable(i)
297297 func finalizePayout (payoutId) = if ((i.caller != DaemonAddress))
298298 then throw("Access denied")
299299 else {
300300 let lastPayout = getLastPayout()
301301 if ((lastPayout != payoutId))
302302 then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString(lastPayout)))
303303 else {
304304 let payoutStatus = getPayoutStatus(lastPayout)
305305 if ((payoutStatus != PayoutInitiatedStatus))
306306 then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be: 1"))
307307 else [IntegerEntry(makePayoutStatusKey(lastPayout), PayoutCompletedStatus)]
308308 }
309309 }
310310
311311
312312
313313 @Callable(i)
314314 func addAdditionalRewards () = if ((size(i.payments) != 1))
315315 then throw("At least one payment should be attached")
316316 else if ((i.payments[0].assetId != unit))
317317 then throw("Only waves can be attached")
318318 else {
319319 let lastPayout = getLastPayout()
320320 let lastPayoutStatus = getPayoutStatus(lastPayout)
321321 if ((lastPayoutStatus != PayoutCompletedStatus))
322322 then throw((("Last payout: " + toString(lastPayout)) + " was not completed"))
323323 else {
324324 let nextPayoutId = (lastPayout + 1)
325325 let currentAdditionalRewards = getPayoutAdditionalRewards(nextPayoutId)
326326 let newAdditionalRewards = (currentAdditionalRewards + i.payments[0].amount)
327327 [IntegerEntry(makePayoutAdditionalRewardsKey(nextPayoutId), newAdditionalRewards)]
328328 }
329329 }
330330
331331
332332
333333 @Callable(i)
334334 func addMassTransferFees () = if ((size(i.payments) != 1))
335335 then throw("At least one payment should be attached")
336336 else if ((i.payments[0].assetId != unit))
337337 then throw("Only waves can be attached")
338338 else {
339339 let currentMassTransferFees = valueOrElse(getInteger(MassTransferFeesKey), 0)
340340 let newMassTransferFees = (currentMassTransferFees + i.payments[0].amount)
341341 [IntegerEntry(MassTransferFeesKey, newMassTransferFees)]
342342 }
343343
344344
345345
346346 @Callable(i)
347347 func withdrawMassTransferFees () = if ((i.caller != MaintainerAddress))
348348 then throw("Access denied")
349349 else if ((size(i.payments) != 0))
350350 then throw("Payments are prohibited")
351351 else {
352352 let currentMassTransferFees = valueOrElse(getInteger(MassTransferFeesKey), 0)
353353 if ((currentMassTransferFees == 0))
354354 then throw("Nothing to withdraw")
355355 else [IntegerEntry(MassTransferFeesKey, 0), ScriptTransfer(MaintainerAddress, currentMassTransferFees, unit)]
356356 }
357357
358358
359359 @Verifier(tx)
360360 func verify () = match tx {
361361 case massTx: MassTransferTransaction =>
362362 let configAddressStr = getString(this, ConfigAddressKey)
363363 let configAddress = addressFromStringValue(value(configAddressStr))
364364 let publicKey = if (isDefined(configAddressStr))
365365 then valueOrElse(getBinary(configAddress, DaemonPublicKeyKey), tx.senderPublicKey)
366366 else tx.senderPublicKey
367367 sigVerify_8Kb(massTx.bodyBytes, massTx.proofs[0], publicKey)
368368 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")
381369 let configAddressStr = getString(this, ConfigAddressKey)
382370 let configAddress = addressFromStringValue(value(configAddressStr))
383371 let unitsChain = getString(configAddress, ("unitsChainName_" + toString({
384372 let @ = invokeTx.dApp
385373 if ($isInstanceOf(@, "Address"))
386374 then @
387375 else throw(($getType(@) + " couldn't be cast to Address"))
388376 })))
389377 let signerPublicKey = valueOrElse(getBinary(configAddress, SignerPublicKeyKey), tx.senderPublicKey)
390378 let publicKey = if (isDefined(configAddressStr))
391- then if (if (isDefined(unitsChain))
392- then validFunctionName
393- else false)
379+ then if (isDefined(unitsChain))
394380 then tx.senderPublicKey
395381 else signerPublicKey
396382 else tx.senderPublicKey
397383 sigVerify_8Kb(invokeTx.bodyBytes, invokeTx.proofs[0], publicKey)
398384 case _ =>
399385 let configAddressStr = getString(this, ConfigAddressKey)
400386 let configAddress = addressFromStringValue(value(configAddressStr))
401387 let publicKey = if (isDefined(configAddressStr))
402388 then valueOrElse(getBinary(configAddress, SignerPublicKeyKey), tx.senderPublicKey)
403389 else tx.senderPublicKey
404390 sigVerify_128Kb(tx.bodyBytes, tx.proofs[0], publicKey)
405391 }
406392

github/deemru/w8io/026f985 
53.43 ms