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:BgItCAISAwoBCBIHCgUBAQERGBIHCgUBCAEIARIHCgUBEhERCBIDCgEBEgASABIAJgAHV2F2ZXNJZAIFV0FWRVMACE1pbmVyRmVlAAUAEVBheW91dEVtcHR5U3RhdHVzAAAAFVBheW91dEluaXRpYXRlZFN0YXR1cwABABVQYXlvdXRDb21wbGV0ZWRTdGF0dXMAAgASQmxvY2tzQmF0Y2hNYXhTaXplAAoAFlJlY2lwaWVudHNCYXRjaE1heFNpemUAZAAGSGVpZ2h0BQZoZWlnaHQABUFycjEwCQDMCAIAAAkAzAgCAAEJAMwIAgACCQDMCAIAAwkAzAgCAAQJAMwIAgAFCQDMCAIABgkAzAgCAAcJAMwIAgAICQDMCAIACQUDbmlsABBDb25maWdBZGRyZXNzS2V5Ag1jb25maWdBZGRyZXNzAA1MYXN0UGF5b3V0S2V5AgpsYXN0UGF5b3V0ABNNYXNzVHJhbnNmZXJGZWVzS2V5AhBtYXNzVHJhbnNmZXJGZWVzAApDaGFpbklkS2V5AgdjaGFpbklkABBEYWVtb25BZGRyZXNzS2V5Ag1kYWVtb25BZGRyZXNzABJEYWVtb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VlT3JFbHNlAgkAnAgCBQ1jb25maWdBZGRyZXNzBRJTaWduZXJQdWJsaWNLZXlLZXkIBQJ0eA9zZW5kZXJQdWJsaWNLZXkECXB1YmxpY0tleQMJAQlpc0RlZmluZWQBBRBjb25maWdBZGRyZXNzU3RyAwMJAQlpc0RlZmluZWQBBRR1bml0c0NoYWluQWRkcmVzc1N0cgURdmFsaWRGdW5jdGlvbk5hbWUHCAUCdHgPc2VuZGVyUHVibGljS2V5BQ9zaWduZXJQdWJsaWNLZXkIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAMQTAwgFCGludm9rZVR4CWJvZHlCeXRlcwkAkQMCCAUIaW52b2tlVHgGcHJvb2ZzAAAFCXB1YmxpY0tleQQQY29uZmlnQWRkcmVzc1N0cgkAnQgCBQR0aGlzBRBDb25maWdBZGRyZXNzS2V5BA1jb25maWdBZGRyZXNzCQERQGV4dHJOYXRpdmUoMTA2MikBCQEFdmFsdWUBBRBjb25maWdBZGRyZXNzU3RyBAlwdWJsaWNLZXkDCQEJaXNEZWZpbmVkAQUQY29uZmlnQWRkcmVzc1N0cgkBC3ZhbHVlT3JFbHNlAgkAnAgCBQ1jb25maWdBZGRyZXNzBRJTaWduZXJQdWJsaWNLZXlLZXkIBQJ0eA9zZW5kZXJQdWJsaWNLZXkIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAMgTAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFCXB1YmxpY0tleVabJjs=", "height": 3108676, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5AhQAXEViBmhNMBB3dbQQTy6c9qjc81moApEszPmsBxP Next: Fuqph3uTgyS6qgsxgT2YLKEQtKjoTsUqzhASvKXqFzjD Diff:
OldNewDifferences
158158 else {
159159 let minerFee = fraction(amount, MinerFee, 100)
160160 let maintainerFee = (minerFee / 2)
161- let puzzleTeamFee = (minerFee - maintainerFee)
162- let lessorsAmount = ((amount - maintainerFee) - puzzleTeamFee)
163- $Tuple2(((accum._1 :+ ScriptTransfer(MaintainerAddress, maintainerFee, asset)) :+ ScriptTransfer(PuzzleBuybackAddress, puzzleTeamFee, asset)), (accum._2 :+ toString(lessorsAmount)))
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)))
164164 }
165165 }
166166 }
167167
168- let $t058865953 = {
168+ let $t058955962 = {
169169 let $l = Arr10
170170 let $s = size($l)
171171 let $acc0 = $Tuple2(nil, nil)
179179
180180 $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)
181181 }
182- let transfers = $t058865953._1
183- let amountKeys = $t058865953._2
182+ let transfers = $t058955962._1
183+ let amountKeys = $t058955962._2
184184 let newPayoutData = makeString(([toString(startHeight), toString(endHeight)] ++ amountKeys), "_")
185185 (transfers ++ [IntegerEntry(LastPayoutKey, payoutId), StringEntry(makePayoutDataKey(payoutId), newPayoutData), IntegerEntry(makePayoutStatusKey(payoutId), PayoutInitiatedStatus)])
186186 }
207207 if ((payoutStatus != PayoutInitiatedStatus))
208208 then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be 1"))
209209 else {
210- let $t069047153 = if ((swapFrom == WavesId))
210+ let $t069137162 = if ((swapFrom == WavesId))
211211 then $Tuple2(wavesBalance(this).available, unit)
212212 else {
213213 let assetId = fromBase58String(swapFrom)
214214 $Tuple2(assetBalance(this, assetId), assetId)
215215 }
216- let balanceInBeforeSwap = $t069047153._1
217- let swapFromId = $t069047153._2
216+ let balanceInBeforeSwap = $t069137162._1
217+ let swapFromId = $t069137162._2
218218 let swapInvoke = invoke(PuzzleAggregatorAddress, "swapWithReferral", [route, minToReceive, "puzzlenode"], [AttachedPayment(swapFromId, amountIn)])
219219 if ((swapInvoke == swapInvoke))
220220 then {
371371 else tx.senderPublicKey
372372 sigVerify_8Kb(massTx.bodyBytes, massTx.proofs[0], publicKey)
373373 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"))
377375 then true
378376 else (invokeTx.function == "startAltChain"))
379377 then true
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 ChainIdKey = "chainId"
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 ChainId = getIntegerValue(ConfigAddress, ChainIdKey)
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 SettingsAddress = addressFromStringValue(getStringValue(ConfigAddress, SettingsAddressKey))
6161
6262 let SignerPublicKey = getBinary(ConfigAddress, SignerPublicKeyKey)
6363
6464 let WavesDaoFactoryAddress = addressFromStringValue(getStringValue(ConfigAddress, WavesDaoFactoryAddressKey))
6565
6666 func makePayoutDataKey (payoutId) = ("payoutData_" + toString(payoutId))
6767
6868
6969 func makePayoutStatusKey (payoutId) = ("payoutStatus_" + toString(payoutId))
7070
7171
7272 func makePayoutAdditionalRewardsKey (payoutId) = ("payoutAdditionalRewards_" + toString(payoutId))
7373
7474
7575 func getLastPayout () = getIntegerValue(this, LastPayoutKey)
7676
7777
7878 func getPayoutData (payoutId) = {
7979 let payoutString = getStringValue(makePayoutDataKey(payoutId))
8080 let payoutDataList = split(payoutString, "_")
8181 let startHeight = parseIntValue(payoutDataList[0])
8282 let endHeight = parseIntValue(payoutDataList[1])
8383 $Tuple2(startHeight, endHeight)
8484 }
8585
8686
8787 func getPayoutStatus (payoutId) = valueOrElse(getInteger(makePayoutStatusKey(payoutId)), PayoutEmptyStatus)
8888
8989
9090 func getPayoutAdditionalRewards (payoutId) = valueOrElse(getInteger(makePayoutAdditionalRewardsKey(payoutId)), 0)
9191
9292
9393 @Callable(i)
9494 func setup (configAddress) = if ((i.caller != this))
9595 then throw("Access denied")
9696 else if ((size(i.payments) != 0))
9797 then throw("Payments are prohibited")
9898 else if ((addressFromString(configAddress) == unit))
9999 then throw(("Invalid configAddress: " + configAddress))
100100 else [StringEntry(ConfigAddressKey, configAddress)]
101101
102102
103103
104104 @Callable(i)
105105 func initiatePayout (payoutId,startHeight,endHeight,amounts,assets) = if ((i.caller != DaemonAddress))
106106 then throw("Access denied")
107107 else if ((size(i.payments) != 0))
108108 then throw("Payments are prohibited")
109109 else {
110110 let lastPayout = getLastPayout()
111111 if ((payoutId != (lastPayout + 1)))
112112 then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString((lastPayout + 1))))
113113 else {
114114 let lastPayoutStatus = getPayoutStatus(lastPayout)
115115 if ((lastPayoutStatus != PayoutCompletedStatus))
116116 then throw((("Last payout: " + toString(lastPayout)) + " was not completed"))
117117 else {
118118 let $t036663730 = getPayoutData(lastPayout)
119119 let lastStartHeight = $t036663730._1
120120 let lastEndHeight = $t036663730._2
121121 if ((startHeight != (lastEndHeight + 1)))
122122 then throw(((("Wrong startHeight: " + toString(startHeight)) + ", should be: ") + toString((lastEndHeight + 1))))
123123 else if ((startHeight > endHeight))
124124 then throw(((("endHeight: " + toString(endHeight)) + " less than startHeight: ") + toString(startHeight)))
125125 else {
126126 let inputsQuantity = getIntegerValue(SettingsAddress, "inputsQuantity")
127127 let amountsSize = size(amounts)
128128 let assetsSize = size(assets)
129129 if (if ((amountsSize != assetsSize))
130130 then true
131131 else (amountsSize != inputsQuantity))
132132 then throw("Wrong size of amounts or assets")
133133 else {
134134 let availableWavesDaoLpToClaim = valueOrElse(getInteger(WavesDaoFactoryAddress, ("%s%s__available__" + toString(this))), 0)
135135 let wavesDaoNextBlockToProcess = getIntegerValue(WavesDaoFactoryAddress, "%s__nextBlockToProcess")
136136 let wavesDlpClaim = if (if ((availableWavesDaoLpToClaim > 0))
137137 then ((wavesDaoNextBlockToProcess + BlocksBatchMaxSize) >= Height)
138138 else false)
139139 then invoke(WavesDaoFactoryAddress, "claimLP", nil, nil)
140140 else unit
141141 if ((wavesDlpClaim == wavesDlpClaim))
142142 then {
143143 let currentAdditionalRewards = getPayoutAdditionalRewards(payoutId)
144144 func assetsFold (accum,index) = if ((index >= assetsSize))
145145 then accum
146146 else {
147147 let assetStr = assets[index]
148148 if ((getInteger(SettingsAddress, ("inputAssetIndex_" + assetStr)) == unit))
149149 then throw(("Unknown input: " + assetStr))
150150 else {
151151 let $t051325311 = if ((assetStr == WavesId))
152152 then $Tuple2(unit, (amounts[index] + currentAdditionalRewards))
153153 else $Tuple2(fromBase58String(assetStr), amounts[index])
154154 let asset = $t051325311._1
155155 let amount = $t051325311._2
156156 if ((0 > amount))
157157 then throw((("Wrong asset amount: " + toString(amount)) + ", should be positive or zero"))
158158 else {
159159 let minerFee = fraction(amount, MinerFee, 100)
160160 let maintainerFee = (minerFee / 2)
161- let puzzleTeamFee = (minerFee - maintainerFee)
162- let lessorsAmount = ((amount - maintainerFee) - puzzleTeamFee)
163- $Tuple2(((accum._1 :+ ScriptTransfer(MaintainerAddress, maintainerFee, asset)) :+ ScriptTransfer(PuzzleBuybackAddress, puzzleTeamFee, asset)), (accum._2 :+ toString(lessorsAmount)))
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)))
164164 }
165165 }
166166 }
167167
168- let $t058865953 = {
168+ let $t058955962 = {
169169 let $l = Arr10
170170 let $s = size($l)
171171 let $acc0 = $Tuple2(nil, nil)
172172 func $f0_1 ($a,$i) = if (($i >= $s))
173173 then $a
174174 else assetsFold($a, $l[$i])
175175
176176 func $f0_2 ($a,$i) = if (($i >= $s))
177177 then $a
178178 else throw("List size exceeds 10")
179179
180180 $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)
181181 }
182- let transfers = $t058865953._1
183- let amountKeys = $t058865953._2
182+ let transfers = $t058955962._1
183+ let amountKeys = $t058955962._2
184184 let newPayoutData = makeString(([toString(startHeight), toString(endHeight)] ++ amountKeys), "_")
185185 (transfers ++ [IntegerEntry(LastPayoutKey, payoutId), StringEntry(makePayoutDataKey(payoutId), newPayoutData), IntegerEntry(makePayoutStatusKey(payoutId), PayoutInitiatedStatus)])
186186 }
187187 else throw("Strict value is not equal to itself.")
188188 }
189189 }
190190 }
191191 }
192192 }
193193
194194
195195
196196 @Callable(i)
197197 func swap (payoutId,swapFrom,amountIn,route,minToReceive) = if ((i.caller != DaemonAddress))
198198 then throw("Access denied")
199199 else if ((size(i.payments) != 0))
200200 then throw("Payments are prohibited")
201201 else {
202202 let lastPayout = getLastPayout()
203203 if ((lastPayout != payoutId))
204204 then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString(lastPayout)))
205205 else {
206206 let payoutStatus = getPayoutStatus(payoutId)
207207 if ((payoutStatus != PayoutInitiatedStatus))
208208 then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be 1"))
209209 else {
210- let $t069047153 = if ((swapFrom == WavesId))
210+ let $t069137162 = if ((swapFrom == WavesId))
211211 then $Tuple2(wavesBalance(this).available, unit)
212212 else {
213213 let assetId = fromBase58String(swapFrom)
214214 $Tuple2(assetBalance(this, assetId), assetId)
215215 }
216- let balanceInBeforeSwap = $t069047153._1
217- let swapFromId = $t069047153._2
216+ let balanceInBeforeSwap = $t069137162._1
217+ let swapFromId = $t069137162._2
218218 let swapInvoke = invoke(PuzzleAggregatorAddress, "swapWithReferral", [route, minToReceive, "puzzlenode"], [AttachedPayment(swapFromId, amountIn)])
219219 if ((swapInvoke == swapInvoke))
220220 then {
221221 let balanceInAfterSwap = if ((swapFrom == WavesId))
222222 then wavesBalance(this).available
223223 else assetBalance(this, value(swapFromId))
224224 let refund = (balanceInAfterSwap - (balanceInBeforeSwap - amountIn))
225225 if ((refund > 10))
226226 then throw(("Rollback aggregator refund: " + toString(refund)))
227227 else nil
228228 }
229229 else throw("Strict value is not equal to itself.")
230230 }
231231 }
232232 }
233233
234234
235235
236236 @Callable(i)
237237 func distributeTokens (payoutId,recipients,amounts,assets,attachment) = if ((i.caller != DaemonAddress))
238238 then throw("Access denied")
239239 else if ((size(i.payments) != 0))
240240 then throw("Payments are prohibited")
241241 else {
242242 let lastPayout = getLastPayout()
243243 if ((lastPayout != payoutId))
244244 then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString(lastPayout)))
245245 else {
246246 let payoutStatus = getPayoutStatus(payoutId)
247247 if ((payoutStatus != PayoutInitiatedStatus))
248248 then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be 1"))
249249 else {
250250 let recipientsSize = size(recipients)
251251 let amountsSize = size(amounts)
252252 let assetsSize = size(assets)
253253 if (if ((recipientsSize != amountsSize))
254254 then true
255255 else (recipientsSize != assetsSize))
256256 then throw(((((("Wrong recipients size: " + toString(recipientsSize)) + ", amounts size: ") + toString(amountsSize)) + ", assets size: ") + toString(assetsSize)))
257257 else if ((recipientsSize == 0))
258258 then throw("Recipients list should not be empty")
259259 else if ((recipientsSize > RecipientsBatchMaxSize))
260260 then throw(((("Should be not greater than " + toString(RecipientsBatchMaxSize)) + " recipients, current: ") + toString(recipientsSize)))
261261 else {
262262 let magicByte = drop(toBytes(1), 7)
263263 let chainIdByte = drop(toBytes(ChainId), 7)
264264 let addressPrefix = (magicByte + chainIdByte)
265265 func scriptTransfersFold (accum,index) = if ((index >= recipientsSize))
266266 then accum
267267 else {
268268 let publicKeyHash = recipients[index]
269269 let addressData = (addressPrefix + publicKeyHash)
270270 let addressChecksum = take(keccak256(blake2b256(addressData)), 4)
271271 let recipient = Address((addressData + addressChecksum))
272272 let amount = amounts[index]
273273 let assetIndex = assets[index]
274274 let assetId = getBinaryValue(SettingsAddress, ("assetId_" + toString(assetIndex)))
275275 let asset = if ((assetId == base58''))
276276 then unit
277277 else assetId
278278 (accum :+ ScriptTransfer(recipient, amount, asset))
279279 }
280280
281281 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]
282282 let $l = indexes
283283 let $s = size($l)
284284 let $acc0 = nil
285285 func $f0_1 ($a,$i) = if (($i >= $s))
286286 then $a
287287 else scriptTransfersFold($a, $l[$i])
288288
289289 func $f0_2 ($a,$i) = if (($i >= $s))
290290 then $a
291291 else throw("List size exceeds 100")
292292
293293 $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)
294294 }
295295 }
296296 }
297297 }
298298
299299
300300
301301 @Callable(i)
302302 func finalizePayout (payoutId) = if ((i.caller != DaemonAddress))
303303 then throw("Access denied")
304304 else {
305305 let lastPayout = getLastPayout()
306306 if ((lastPayout != payoutId))
307307 then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString(lastPayout)))
308308 else {
309309 let payoutStatus = getPayoutStatus(lastPayout)
310310 if ((payoutStatus != PayoutInitiatedStatus))
311311 then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be: 1"))
312312 else [IntegerEntry(makePayoutStatusKey(lastPayout), PayoutCompletedStatus)]
313313 }
314314 }
315315
316316
317317
318318 @Callable(i)
319319 func addAdditionalRewards () = if ((size(i.payments) != 1))
320320 then throw("At least one payment should be attached")
321321 else if ((i.payments[0].assetId != unit))
322322 then throw("Only waves can be attached")
323323 else {
324324 let lastPayout = getLastPayout()
325325 let lastPayoutStatus = getPayoutStatus(lastPayout)
326326 if ((lastPayoutStatus != PayoutCompletedStatus))
327327 then throw((("Last payout: " + toString(lastPayout)) + " was not completed"))
328328 else {
329329 let nextPayoutId = (lastPayout + 1)
330330 let currentAdditionalRewards = getPayoutAdditionalRewards(nextPayoutId)
331331 let newAdditionalRewards = (currentAdditionalRewards + i.payments[0].amount)
332332 [IntegerEntry(makePayoutAdditionalRewardsKey(nextPayoutId), newAdditionalRewards)]
333333 }
334334 }
335335
336336
337337
338338 @Callable(i)
339339 func addMassTransferFees () = if ((size(i.payments) != 1))
340340 then throw("At least one payment should be attached")
341341 else if ((i.payments[0].assetId != unit))
342342 then throw("Only waves can be attached")
343343 else {
344344 let currentMassTransferFees = valueOrElse(getInteger(MassTransferFeesKey), 0)
345345 let newMassTransferFees = (currentMassTransferFees + i.payments[0].amount)
346346 [IntegerEntry(MassTransferFeesKey, newMassTransferFees)]
347347 }
348348
349349
350350
351351 @Callable(i)
352352 func withdrawMassTransferFees () = if ((i.caller != MaintainerAddress))
353353 then throw("Access denied")
354354 else if ((size(i.payments) != 0))
355355 then throw("Payments are prohibited")
356356 else {
357357 let currentMassTransferFees = valueOrElse(getInteger(MassTransferFeesKey), 0)
358358 if ((currentMassTransferFees == 0))
359359 then throw("Nothing to withdraw")
360360 else [IntegerEntry(MassTransferFeesKey, 0), ScriptTransfer(MaintainerAddress, currentMassTransferFees, unit)]
361361 }
362362
363363
364364 @Verifier(tx)
365365 func verify () = match tx {
366366 case massTx: MassTransferTransaction =>
367367 let configAddressStr = getString(this, ConfigAddressKey)
368368 let configAddress = addressFromStringValue(value(configAddressStr))
369369 let publicKey = if (isDefined(configAddressStr))
370370 then valueOrElse(getBinary(configAddress, DaemonPublicKeyKey), tx.senderPublicKey)
371371 else tx.senderPublicKey
372372 sigVerify_8Kb(massTx.bodyBytes, massTx.proofs[0], publicKey)
373373 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"))
377375 then true
378376 else (invokeTx.function == "startAltChain"))
379377 then true
380378 else (invokeTx.function == "extendAltChain")
381379 let configAddressStr = getString(this, ConfigAddressKey)
382380 let configAddress = addressFromStringValue(value(configAddressStr))
383381 let unitsChainAddressStr = getString(configAddress, ("unitsChain_" + toString({
384382 let @ = invokeTx.dApp
385383 if ($isInstanceOf(@, "Address"))
386384 then @
387385 else throw(($getType(@) + " couldn't be cast to Address"))
388386 })))
389387 let signerPublicKey = valueOrElse(getBinary(configAddress, SignerPublicKeyKey), tx.senderPublicKey)
390388 let publicKey = if (isDefined(configAddressStr))
391389 then if (if (isDefined(unitsChainAddressStr))
392390 then validFunctionName
393391 else false)
394392 then tx.senderPublicKey
395393 else signerPublicKey
396394 else tx.senderPublicKey
397395 sigVerify_8Kb(invokeTx.bodyBytes, invokeTx.proofs[0], publicKey)
398396 case _ =>
399397 let configAddressStr = getString(this, ConfigAddressKey)
400398 let configAddress = addressFromStringValue(value(configAddressStr))
401399 let publicKey = if (isDefined(configAddressStr))
402400 then valueOrElse(getBinary(configAddress, SignerPublicKeyKey), tx.senderPublicKey)
403401 else tx.senderPublicKey
404402 sigVerify_128Kb(tx.bodyBytes, tx.proofs[0], publicKey)
405403 }
406404

github/deemru/w8io/fabc49c 
60.07 ms