tx · Bw3dyDDD8Uefsw52sC2yRSTsi3KPZdjV7YjWfvZWETL6

3N7XWpdx1UJKZp5stTtFMXPEygyfZ7j4PyC:  -0.01400000 Waves

2024.05.22 22:13 [3117605] smart account 3N7XWpdx1UJKZp5stTtFMXPEygyfZ7j4PyC > SELF 0.00000000 Waves

{ "type": 13, "id": "Bw3dyDDD8Uefsw52sC2yRSTsi3KPZdjV7YjWfvZWETL6", "fee": 1400000, "feeAssetId": null, "timestamp": 1716405191121, "version": 2, "chainId": 84, "sender": "3N7XWpdx1UJKZp5stTtFMXPEygyfZ7j4PyC", "senderPublicKey": "APsCCjsKHFx7rbr1mG8Pca43pccTbH2G4FZj4keEqKJ5", "proofs": [ "2QyywaydkNwR8BYj8ea9FsGJ9QZqmHs2C7QuAbDw8UaMLFykJTjiUgi9fAxk4dcvscaSvvYHbaWnPNGHsEwYFfef" ], "script": "base64:BgItCAISAwoBCBIHCgUBAQERGBIHCgUBCAEIARIHCgUBEhERCBIDCgEBEgASABIAJQAHV2F2ZXNJZAIFV0FWRVMACE1pbmVyRmVlAAUAEVBheW91dEVtcHR5U3RhdHVzAAAAFVBheW91dEluaXRpYXRlZFN0YXR1cwABABVQYXlvdXRDb21wbGV0ZWRTdGF0dXMAAgASQmxvY2tzQmF0Y2hNYXhTaXplAAoAFlJlY2lwaWVudHNCYXRjaE1heFNpemUAZAAGSGVpZ2h0BQZoZWlnaHQABUFycjEwCQDMCAIAAAkAzAgCAAEJAMwIAgACCQDMCAIAAwkAzAgCAAQJAMwIAgAFCQDMCAIABgkAzAgCAAcJAMwIAgAICQDMCAIACQUDbmlsABBDb25maWdBZGRyZXNzS2V5Ag1jb25maWdBZGRyZXNzAA1MYXN0UGF5b3V0S2V5AgpsYXN0UGF5b3V0ABNNYXNzVHJhbnNmZXJGZWVzS2V5AhBtYXNzVHJhbnNmZXJGZWVzAA9XYXZlc0NoYWluSWRLZXkJAKwCAgIIY2hhaW5JZF8FB1dhdmVzSWQAEERhZW1vbkFkZH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yUHVibGljS2V5CQDEEwMIBQhpbnZva2VUeAlib2R5Qnl0ZXMJAJEDAggFCGludm9rZVR4BnByb29mcwAABQlwdWJsaWNLZXkEEGNvbmZpZ0FkZHJlc3NTdHIJAJ0IAgUEdGhpcwUQQ29uZmlnQWRkcmVzc0tleQQNY29uZmlnQWRkcmVzcwkBEUBleHRyTmF0aXZlKDEwNjIpAQkBBXZhbHVlAQUQY29uZmlnQWRkcmVzc1N0cgQJcHVibGljS2V5AwkBCWlzRGVmaW5lZAEFEGNvbmZpZ0FkZHJlc3NTdHIJAQt2YWx1ZU9yRWxzZQIJAJwIAgUNY29uZmlnQWRkcmVzcwUSU2lnbmVyUHVibGljS2V5S2V5CAUCdHgPc2VuZGVyUHVibGljS2V5CAUCdHgPc2VuZGVyUHVibGljS2V5CQDIEwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQlwdWJsaWNLZXkH1jcw", "height": 3117605, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Fuqph3uTgyS6qgsxgT2YLKEQtKjoTsUqzhASvKXqFzjD Next: DMXhdGpcvh65pn25ZCbsyZXjeb4Dm2Ge89xytG2jJd1v Diff:
OldNewDifferences
2525
2626 let MassTransferFeesKey = "massTransferFees"
2727
28-let ChainIdKey = "chainId"
28+let WavesChainIdKey = ("chainId_" + WavesId)
2929
3030 let DaemonAddressKey = "daemonAddress"
3131
4545
4646 let ConfigAddress = addressFromStringValue(getStringValue(this, ConfigAddressKey))
4747
48-let ChainId = getIntegerValue(ConfigAddress, ChainIdKey)
48+let WavesChainId = getIntegerValue(ConfigAddress, WavesChainIdKey)
4949
5050 let DaemonAddress = addressFromStringValue(getStringValue(ConfigAddress, DaemonAddressKey))
5151
5656 let PuzzleAggregatorAddress = addressFromStringValue(getStringValue(ConfigAddress, PuzzleAggregatorAddressKey))
5757
5858 let PuzzleBuybackAddress = addressFromStringValue(getStringValue(ConfigAddress, PuzzleBuybackAddressKey))
59-
60-let SettingsAddress = addressFromStringValue(getStringValue(ConfigAddress, SettingsAddressKey))
6159
6260 let SignerPublicKey = getBinary(ConfigAddress, SignerPublicKeyKey)
6361
115113 if ((lastPayoutStatus != PayoutCompletedStatus))
116114 then throw((("Last payout: " + toString(lastPayout)) + " was not completed"))
117115 else {
118- let $t036663730 = getPayoutData(lastPayout)
119- let lastStartHeight = $t036663730._1
120- let lastEndHeight = $t036663730._2
116+ let $t035963660 = getPayoutData(lastPayout)
117+ let lastStartHeight = $t035963660._1
118+ let lastEndHeight = $t035963660._2
121119 if ((startHeight != (lastEndHeight + 1)))
122120 then throw(((("Wrong startHeight: " + toString(startHeight)) + ", should be: ") + toString((lastEndHeight + 1))))
123121 else if ((startHeight > endHeight))
124122 then throw(((("endHeight: " + toString(endHeight)) + " less than startHeight: ") + toString(startHeight)))
125123 else {
126- let inputsQuantity = getIntegerValue(SettingsAddress, "inputsQuantity")
127124 let amountsSize = size(amounts)
128125 let assetsSize = size(assets)
129- if (if ((amountsSize != assetsSize))
130- then true
131- else (amountsSize != inputsQuantity))
126+ if ((amountsSize != assetsSize))
132127 then throw("Wrong size of amounts or assets")
133128 else {
134129 let availableWavesDaoLpToClaim = valueOrElse(getInteger(WavesDaoFactoryAddress, ("%s%s__available__" + toString(this))), 0)
145140 then accum
146141 else {
147142 let assetStr = assets[index]
148- if ((getInteger(SettingsAddress, ("inputAssetIndex_" + assetStr)) == unit))
149- then throw(("Unknown input: " + assetStr))
143+ if ((getInteger(ConfigAddress, ("assetIndex_" + assetStr)) == unit))
144+ then throw(("Unknown asset: " + assetStr))
150145 else {
151- let $t051325311 = if ((assetStr == WavesId))
146+ let $t049465125 = if ((assetStr == WavesId))
152147 then $Tuple2(unit, (amounts[index] + currentAdditionalRewards))
153148 else $Tuple2(fromBase58String(assetStr), amounts[index])
154- let asset = $t051325311._1
155- let amount = $t051325311._2
149+ let asset = $t049465125._1
150+ let amount = $t049465125._2
156151 if ((0 > amount))
157152 then throw((("Wrong asset amount: " + toString(amount)) + ", should be positive or zero"))
158153 else {
165160 }
166161 }
167162
168- let $t058955962 = {
163+ let $t057095776 = {
169164 let $l = Arr10
170165 let $s = size($l)
171166 let $acc0 = $Tuple2(nil, nil)
179174
180175 $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)
181176 }
182- let transfers = $t058955962._1
183- let amountKeys = $t058955962._2
177+ let transfers = $t057095776._1
178+ let amountKeys = $t057095776._2
184179 let newPayoutData = makeString(([toString(startHeight), toString(endHeight)] ++ amountKeys), "_")
185180 (transfers ++ [IntegerEntry(LastPayoutKey, payoutId), StringEntry(makePayoutDataKey(payoutId), newPayoutData), IntegerEntry(makePayoutStatusKey(payoutId), PayoutInitiatedStatus)])
186181 }
207202 if ((payoutStatus != PayoutInitiatedStatus))
208203 then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be 1"))
209204 else {
210- let $t069137162 = if ((swapFrom == WavesId))
205+ let $t067276976 = if ((swapFrom == WavesId))
211206 then $Tuple2(wavesBalance(this).available, unit)
212207 else {
213208 let assetId = fromBase58String(swapFrom)
214209 $Tuple2(assetBalance(this, assetId), assetId)
215210 }
216- let balanceInBeforeSwap = $t069137162._1
217- let swapFromId = $t069137162._2
211+ let balanceInBeforeSwap = $t067276976._1
212+ let swapFromId = $t067276976._2
218213 let swapInvoke = invoke(PuzzleAggregatorAddress, "swapWithReferral", [route, minToReceive, "puzzlenode"], [AttachedPayment(swapFromId, amountIn)])
219214 if ((swapInvoke == swapInvoke))
220215 then {
260255 then throw(((("Should be not greater than " + toString(RecipientsBatchMaxSize)) + " recipients, current: ") + toString(recipientsSize)))
261256 else {
262257 let magicByte = drop(toBytes(1), 7)
263- let chainIdByte = drop(toBytes(ChainId), 7)
258+ let chainIdByte = drop(toBytes(WavesChainId), 7)
264259 let addressPrefix = (magicByte + chainIdByte)
265260 func scriptTransfersFold (accum,index) = if ((index >= recipientsSize))
266261 then accum
271266 let recipient = Address((addressData + addressChecksum))
272267 let amount = amounts[index]
273268 let assetIndex = assets[index]
274- let assetId = getBinaryValue(SettingsAddress, ("assetId_" + toString(assetIndex)))
269+ let assetId = getBinaryValue(ConfigAddress, ("assetId_" + toString(assetIndex)))
275270 let asset = if ((assetId == base58''))
276271 then unit
277272 else assetId
380375 else (invokeTx.function == "extendAltChain")
381376 let configAddressStr = getString(this, ConfigAddressKey)
382377 let configAddress = addressFromStringValue(value(configAddressStr))
383- let unitsChainAddressStr = getString(configAddress, ("unitsChain_" + toString({
378+ let unitsChain = getString(configAddress, ("unitsChainName_" + toString({
384379 let @ = invokeTx.dApp
385380 if ($isInstanceOf(@, "Address"))
386381 then @
388383 })))
389384 let signerPublicKey = valueOrElse(getBinary(configAddress, SignerPublicKeyKey), tx.senderPublicKey)
390385 let publicKey = if (isDefined(configAddressStr))
391- then if (if (isDefined(unitsChainAddressStr))
386+ then if (if (isDefined(unitsChain))
392387 then validFunctionName
393388 else false)
394389 then 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
28-let ChainIdKey = "chainId"
28+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
48-let ChainId = getIntegerValue(ConfigAddress, ChainIdKey)
48+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))
59-
60-let SettingsAddress = addressFromStringValue(getStringValue(ConfigAddress, SettingsAddressKey))
6159
6260 let SignerPublicKey = getBinary(ConfigAddress, SignerPublicKeyKey)
6361
6462 let WavesDaoFactoryAddress = addressFromStringValue(getStringValue(ConfigAddress, WavesDaoFactoryAddressKey))
6563
6664 func makePayoutDataKey (payoutId) = ("payoutData_" + toString(payoutId))
6765
6866
6967 func makePayoutStatusKey (payoutId) = ("payoutStatus_" + toString(payoutId))
7068
7169
7270 func makePayoutAdditionalRewardsKey (payoutId) = ("payoutAdditionalRewards_" + toString(payoutId))
7371
7472
7573 func getLastPayout () = getIntegerValue(this, LastPayoutKey)
7674
7775
7876 func getPayoutData (payoutId) = {
7977 let payoutString = getStringValue(makePayoutDataKey(payoutId))
8078 let payoutDataList = split(payoutString, "_")
8179 let startHeight = parseIntValue(payoutDataList[0])
8280 let endHeight = parseIntValue(payoutDataList[1])
8381 $Tuple2(startHeight, endHeight)
8482 }
8583
8684
8785 func getPayoutStatus (payoutId) = valueOrElse(getInteger(makePayoutStatusKey(payoutId)), PayoutEmptyStatus)
8886
8987
9088 func getPayoutAdditionalRewards (payoutId) = valueOrElse(getInteger(makePayoutAdditionalRewardsKey(payoutId)), 0)
9189
9290
9391 @Callable(i)
9492 func setup (configAddress) = if ((i.caller != this))
9593 then throw("Access denied")
9694 else if ((size(i.payments) != 0))
9795 then throw("Payments are prohibited")
9896 else if ((addressFromString(configAddress) == unit))
9997 then throw(("Invalid configAddress: " + configAddress))
10098 else [StringEntry(ConfigAddressKey, configAddress)]
10199
102100
103101
104102 @Callable(i)
105103 func initiatePayout (payoutId,startHeight,endHeight,amounts,assets) = if ((i.caller != DaemonAddress))
106104 then throw("Access denied")
107105 else if ((size(i.payments) != 0))
108106 then throw("Payments are prohibited")
109107 else {
110108 let lastPayout = getLastPayout()
111109 if ((payoutId != (lastPayout + 1)))
112110 then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString((lastPayout + 1))))
113111 else {
114112 let lastPayoutStatus = getPayoutStatus(lastPayout)
115113 if ((lastPayoutStatus != PayoutCompletedStatus))
116114 then throw((("Last payout: " + toString(lastPayout)) + " was not completed"))
117115 else {
118- let $t036663730 = getPayoutData(lastPayout)
119- let lastStartHeight = $t036663730._1
120- let lastEndHeight = $t036663730._2
116+ let $t035963660 = getPayoutData(lastPayout)
117+ let lastStartHeight = $t035963660._1
118+ let lastEndHeight = $t035963660._2
121119 if ((startHeight != (lastEndHeight + 1)))
122120 then throw(((("Wrong startHeight: " + toString(startHeight)) + ", should be: ") + toString((lastEndHeight + 1))))
123121 else if ((startHeight > endHeight))
124122 then throw(((("endHeight: " + toString(endHeight)) + " less than startHeight: ") + toString(startHeight)))
125123 else {
126- let inputsQuantity = getIntegerValue(SettingsAddress, "inputsQuantity")
127124 let amountsSize = size(amounts)
128125 let assetsSize = size(assets)
129- if (if ((amountsSize != assetsSize))
130- then true
131- else (amountsSize != inputsQuantity))
126+ if ((amountsSize != assetsSize))
132127 then throw("Wrong size of amounts or assets")
133128 else {
134129 let availableWavesDaoLpToClaim = valueOrElse(getInteger(WavesDaoFactoryAddress, ("%s%s__available__" + toString(this))), 0)
135130 let wavesDaoNextBlockToProcess = getIntegerValue(WavesDaoFactoryAddress, "%s__nextBlockToProcess")
136131 let wavesDlpClaim = if (if ((availableWavesDaoLpToClaim > 0))
137132 then ((wavesDaoNextBlockToProcess + BlocksBatchMaxSize) >= Height)
138133 else false)
139134 then invoke(WavesDaoFactoryAddress, "claimLP", nil, nil)
140135 else unit
141136 if ((wavesDlpClaim == wavesDlpClaim))
142137 then {
143138 let currentAdditionalRewards = getPayoutAdditionalRewards(payoutId)
144139 func assetsFold (accum,index) = if ((index >= assetsSize))
145140 then accum
146141 else {
147142 let assetStr = assets[index]
148- if ((getInteger(SettingsAddress, ("inputAssetIndex_" + assetStr)) == unit))
149- then throw(("Unknown input: " + assetStr))
143+ if ((getInteger(ConfigAddress, ("assetIndex_" + assetStr)) == unit))
144+ then throw(("Unknown asset: " + assetStr))
150145 else {
151- let $t051325311 = if ((assetStr == WavesId))
146+ let $t049465125 = if ((assetStr == WavesId))
152147 then $Tuple2(unit, (amounts[index] + currentAdditionalRewards))
153148 else $Tuple2(fromBase58String(assetStr), amounts[index])
154- let asset = $t051325311._1
155- let amount = $t051325311._2
149+ let asset = $t049465125._1
150+ let amount = $t049465125._2
156151 if ((0 > amount))
157152 then throw((("Wrong asset amount: " + toString(amount)) + ", should be positive or zero"))
158153 else {
159154 let minerFee = fraction(amount, MinerFee, 100)
160155 let maintainerFee = (minerFee / 2)
161156 let puzzleBuybackFee = (minerFee - maintainerFee)
162157 let lessorsAmount = ((amount - maintainerFee) - puzzleBuybackFee)
163158 $Tuple2(((accum._1 :+ ScriptTransfer(MaintainerAddress, maintainerFee, asset)) :+ ScriptTransfer(PuzzleBuybackAddress, puzzleBuybackFee, asset)), (accum._2 :+ toString(lessorsAmount)))
164159 }
165160 }
166161 }
167162
168- let $t058955962 = {
163+ let $t057095776 = {
169164 let $l = Arr10
170165 let $s = size($l)
171166 let $acc0 = $Tuple2(nil, nil)
172167 func $f0_1 ($a,$i) = if (($i >= $s))
173168 then $a
174169 else assetsFold($a, $l[$i])
175170
176171 func $f0_2 ($a,$i) = if (($i >= $s))
177172 then $a
178173 else throw("List size exceeds 10")
179174
180175 $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)
181176 }
182- let transfers = $t058955962._1
183- let amountKeys = $t058955962._2
177+ let transfers = $t057095776._1
178+ let amountKeys = $t057095776._2
184179 let newPayoutData = makeString(([toString(startHeight), toString(endHeight)] ++ amountKeys), "_")
185180 (transfers ++ [IntegerEntry(LastPayoutKey, payoutId), StringEntry(makePayoutDataKey(payoutId), newPayoutData), IntegerEntry(makePayoutStatusKey(payoutId), PayoutInitiatedStatus)])
186181 }
187182 else throw("Strict value is not equal to itself.")
188183 }
189184 }
190185 }
191186 }
192187 }
193188
194189
195190
196191 @Callable(i)
197192 func swap (payoutId,swapFrom,amountIn,route,minToReceive) = if ((i.caller != DaemonAddress))
198193 then throw("Access denied")
199194 else if ((size(i.payments) != 0))
200195 then throw("Payments are prohibited")
201196 else {
202197 let lastPayout = getLastPayout()
203198 if ((lastPayout != payoutId))
204199 then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString(lastPayout)))
205200 else {
206201 let payoutStatus = getPayoutStatus(payoutId)
207202 if ((payoutStatus != PayoutInitiatedStatus))
208203 then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be 1"))
209204 else {
210- let $t069137162 = if ((swapFrom == WavesId))
205+ let $t067276976 = if ((swapFrom == WavesId))
211206 then $Tuple2(wavesBalance(this).available, unit)
212207 else {
213208 let assetId = fromBase58String(swapFrom)
214209 $Tuple2(assetBalance(this, assetId), assetId)
215210 }
216- let balanceInBeforeSwap = $t069137162._1
217- let swapFromId = $t069137162._2
211+ let balanceInBeforeSwap = $t067276976._1
212+ let swapFromId = $t067276976._2
218213 let swapInvoke = invoke(PuzzleAggregatorAddress, "swapWithReferral", [route, minToReceive, "puzzlenode"], [AttachedPayment(swapFromId, amountIn)])
219214 if ((swapInvoke == swapInvoke))
220215 then {
221216 let balanceInAfterSwap = if ((swapFrom == WavesId))
222217 then wavesBalance(this).available
223218 else assetBalance(this, value(swapFromId))
224219 let refund = (balanceInAfterSwap - (balanceInBeforeSwap - amountIn))
225220 if ((refund > 10))
226221 then throw(("Rollback aggregator refund: " + toString(refund)))
227222 else nil
228223 }
229224 else throw("Strict value is not equal to itself.")
230225 }
231226 }
232227 }
233228
234229
235230
236231 @Callable(i)
237232 func distributeTokens (payoutId,recipients,amounts,assets,attachment) = if ((i.caller != DaemonAddress))
238233 then throw("Access denied")
239234 else if ((size(i.payments) != 0))
240235 then throw("Payments are prohibited")
241236 else {
242237 let lastPayout = getLastPayout()
243238 if ((lastPayout != payoutId))
244239 then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString(lastPayout)))
245240 else {
246241 let payoutStatus = getPayoutStatus(payoutId)
247242 if ((payoutStatus != PayoutInitiatedStatus))
248243 then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be 1"))
249244 else {
250245 let recipientsSize = size(recipients)
251246 let amountsSize = size(amounts)
252247 let assetsSize = size(assets)
253248 if (if ((recipientsSize != amountsSize))
254249 then true
255250 else (recipientsSize != assetsSize))
256251 then throw(((((("Wrong recipients size: " + toString(recipientsSize)) + ", amounts size: ") + toString(amountsSize)) + ", assets size: ") + toString(assetsSize)))
257252 else if ((recipientsSize == 0))
258253 then throw("Recipients list should not be empty")
259254 else if ((recipientsSize > RecipientsBatchMaxSize))
260255 then throw(((("Should be not greater than " + toString(RecipientsBatchMaxSize)) + " recipients, current: ") + toString(recipientsSize)))
261256 else {
262257 let magicByte = drop(toBytes(1), 7)
263- let chainIdByte = drop(toBytes(ChainId), 7)
258+ let chainIdByte = drop(toBytes(WavesChainId), 7)
264259 let addressPrefix = (magicByte + chainIdByte)
265260 func scriptTransfersFold (accum,index) = if ((index >= recipientsSize))
266261 then accum
267262 else {
268263 let publicKeyHash = recipients[index]
269264 let addressData = (addressPrefix + publicKeyHash)
270265 let addressChecksum = take(keccak256(blake2b256(addressData)), 4)
271266 let recipient = Address((addressData + addressChecksum))
272267 let amount = amounts[index]
273268 let assetIndex = assets[index]
274- let assetId = getBinaryValue(SettingsAddress, ("assetId_" + toString(assetIndex)))
269+ let assetId = getBinaryValue(ConfigAddress, ("assetId_" + toString(assetIndex)))
275270 let asset = if ((assetId == base58''))
276271 then unit
277272 else assetId
278273 (accum :+ ScriptTransfer(recipient, amount, asset))
279274 }
280275
281276 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]
282277 let $l = indexes
283278 let $s = size($l)
284279 let $acc0 = nil
285280 func $f0_1 ($a,$i) = if (($i >= $s))
286281 then $a
287282 else scriptTransfersFold($a, $l[$i])
288283
289284 func $f0_2 ($a,$i) = if (($i >= $s))
290285 then $a
291286 else throw("List size exceeds 100")
292287
293288 $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)
294289 }
295290 }
296291 }
297292 }
298293
299294
300295
301296 @Callable(i)
302297 func finalizePayout (payoutId) = if ((i.caller != DaemonAddress))
303298 then throw("Access denied")
304299 else {
305300 let lastPayout = getLastPayout()
306301 if ((lastPayout != payoutId))
307302 then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString(lastPayout)))
308303 else {
309304 let payoutStatus = getPayoutStatus(lastPayout)
310305 if ((payoutStatus != PayoutInitiatedStatus))
311306 then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be: 1"))
312307 else [IntegerEntry(makePayoutStatusKey(lastPayout), PayoutCompletedStatus)]
313308 }
314309 }
315310
316311
317312
318313 @Callable(i)
319314 func addAdditionalRewards () = if ((size(i.payments) != 1))
320315 then throw("At least one payment should be attached")
321316 else if ((i.payments[0].assetId != unit))
322317 then throw("Only waves can be attached")
323318 else {
324319 let lastPayout = getLastPayout()
325320 let lastPayoutStatus = getPayoutStatus(lastPayout)
326321 if ((lastPayoutStatus != PayoutCompletedStatus))
327322 then throw((("Last payout: " + toString(lastPayout)) + " was not completed"))
328323 else {
329324 let nextPayoutId = (lastPayout + 1)
330325 let currentAdditionalRewards = getPayoutAdditionalRewards(nextPayoutId)
331326 let newAdditionalRewards = (currentAdditionalRewards + i.payments[0].amount)
332327 [IntegerEntry(makePayoutAdditionalRewardsKey(nextPayoutId), newAdditionalRewards)]
333328 }
334329 }
335330
336331
337332
338333 @Callable(i)
339334 func addMassTransferFees () = if ((size(i.payments) != 1))
340335 then throw("At least one payment should be attached")
341336 else if ((i.payments[0].assetId != unit))
342337 then throw("Only waves can be attached")
343338 else {
344339 let currentMassTransferFees = valueOrElse(getInteger(MassTransferFeesKey), 0)
345340 let newMassTransferFees = (currentMassTransferFees + i.payments[0].amount)
346341 [IntegerEntry(MassTransferFeesKey, newMassTransferFees)]
347342 }
348343
349344
350345
351346 @Callable(i)
352347 func withdrawMassTransferFees () = if ((i.caller != MaintainerAddress))
353348 then throw("Access denied")
354349 else if ((size(i.payments) != 0))
355350 then throw("Payments are prohibited")
356351 else {
357352 let currentMassTransferFees = valueOrElse(getInteger(MassTransferFeesKey), 0)
358353 if ((currentMassTransferFees == 0))
359354 then throw("Nothing to withdraw")
360355 else [IntegerEntry(MassTransferFeesKey, 0), ScriptTransfer(MaintainerAddress, currentMassTransferFees, unit)]
361356 }
362357
363358
364359 @Verifier(tx)
365360 func verify () = match tx {
366361 case massTx: MassTransferTransaction =>
367362 let configAddressStr = getString(this, ConfigAddressKey)
368363 let configAddress = addressFromStringValue(value(configAddressStr))
369364 let publicKey = if (isDefined(configAddressStr))
370365 then valueOrElse(getBinary(configAddress, DaemonPublicKeyKey), tx.senderPublicKey)
371366 else tx.senderPublicKey
372367 sigVerify_8Kb(massTx.bodyBytes, massTx.proofs[0], publicKey)
373368 case invokeTx: InvokeScriptTransaction =>
374369 let validFunctionName = if (if (if ((invokeTx.function == "extendMainChain"))
375370 then true
376371 else (invokeTx.function == "appendBlock"))
377372 then true
378373 else (invokeTx.function == "startAltChain"))
379374 then true
380375 else (invokeTx.function == "extendAltChain")
381376 let configAddressStr = getString(this, ConfigAddressKey)
382377 let configAddress = addressFromStringValue(value(configAddressStr))
383- let unitsChainAddressStr = getString(configAddress, ("unitsChain_" + toString({
378+ let unitsChain = getString(configAddress, ("unitsChainName_" + toString({
384379 let @ = invokeTx.dApp
385380 if ($isInstanceOf(@, "Address"))
386381 then @
387382 else throw(($getType(@) + " couldn't be cast to Address"))
388383 })))
389384 let signerPublicKey = valueOrElse(getBinary(configAddress, SignerPublicKeyKey), tx.senderPublicKey)
390385 let publicKey = if (isDefined(configAddressStr))
391- then if (if (isDefined(unitsChainAddressStr))
386+ then if (if (isDefined(unitsChain))
392387 then validFunctionName
393388 else false)
394389 then tx.senderPublicKey
395390 else signerPublicKey
396391 else tx.senderPublicKey
397392 sigVerify_8Kb(invokeTx.bodyBytes, invokeTx.proofs[0], publicKey)
398393 case _ =>
399394 let configAddressStr = getString(this, ConfigAddressKey)
400395 let configAddress = addressFromStringValue(value(configAddressStr))
401396 let publicKey = if (isDefined(configAddressStr))
402397 then valueOrElse(getBinary(configAddress, SignerPublicKeyKey), tx.senderPublicKey)
403398 else tx.senderPublicKey
404399 sigVerify_128Kb(tx.bodyBytes, tx.proofs[0], publicKey)
405400 }
406401

github/deemru/w8io/026f985 
78.45 ms