tx · 6MyTkzm8fjJC1dAw43qfkmcDjMHjHuZ3SmdeukpWpvRf

3N7XWpdx1UJKZp5stTtFMXPEygyfZ7j4PyC:  -0.01200000 Waves

2024.04.29 03:59 [3083456] smart account 3N7XWpdx1UJKZp5stTtFMXPEygyfZ7j4PyC > SELF 0.00000000 Waves

{ "type": 13, "id": "6MyTkzm8fjJC1dAw43qfkmcDjMHjHuZ3SmdeukpWpvRf", "fee": 1200000, "feeAssetId": null, "timestamp": 1714352363870, "version": 2, "chainId": 84, "sender": "3N7XWpdx1UJKZp5stTtFMXPEygyfZ7j4PyC", "senderPublicKey": "APsCCjsKHFx7rbr1mG8Pca43pccTbH2G4FZj4keEqKJ5", "proofs": [ "wxHjLPSAuPBhwoXXXx3B9LGU5Z2P3pRUUW7jvvVhpjjjgn1xgUHP6DJsMbQXqYu4zNnzuoZKfcZtxbrEiBT8736" ], "script": "base64:BgIoCAISBwoFAQEBERgSBwoFAQgBCAESBwoFARIREQgSAwoBARIAEgASABkACE1pbmVyRmVlAAUAEVBheW91dEVtcHR5U3RhdHVzAAAAFVBheW91dEluaXRpYXRlZFN0YXR1cwABABVQYXlvdXRDb21wbGV0ZWRTdGF0dXMAAgASQmxvY2tzQmF0Y2hNYXhTaXplAAoAFlJlY2lwaWVudHNCYXRjaE1heFNpemUAZAAGSGVpZ2h0BQZoZWlnaHQAB0NoYWluSWQAVAAFQXJyMTAJAMwIAgAACQDMCAIAAQkAzAgCAAIJAMwIAgADCQDMCAIABAkAzAgCAAUJAMwIAgAGCQDMCAIABwkAzAgCAAgJAMwIAgAJBQNuaWwADUNhbGxlckFkZHJlc3MJAQdBZGRyZXNzAQEaAVTyivfVKpPlEk6umrrIyi00GQZQXD9/r7cAFldhdmVzRGFvRmFjdG9yeUFkZHJlc3MJAQdBZGRyZXNzAQEaAVQ8hf55dL/LZOPYRZ/ELezKrvBEP8q22ucAD1NldHRpbmdzQWRkcmVzcwkBB0FkZHJlc3MBARoBVIyem88MXqbW0vyDLXrGP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AggFAWkGY2FsbGVyBRFNYWludGFpbmVyQWRkcmVzcwkAAgECDUFjY2VzcyBkZW5pZWQDCQECIT0CCQCQAwEIBQFpCHBheW1lbnRzAAAJAAIBAhdQYXltZW50cyBhcmUgcHJvaGliaXRlZAQXY3VycmVudE1hc3NUcmFuc2ZlckZlZXMJAQt2YWx1ZU9yRWxzZQIJAJ8IAQUTTWFzc1RyYW5zZmVyRmVlc0tleQAAAwkAAAIFF2N1cnJlbnRNYXNzVHJhbnNmZXJGZWVzAAAJAAIBAhNOb3RoaW5nIHRvIHdpdGhkcmF3CQDMCAIJAQxJbnRlZ2VyRW50cnkCBRNNYXNzVHJhbnNmZXJGZWVzS2V5AAAJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwURTWFpbnRhaW5lckFkZHJlc3MFF2N1cnJlbnRNYXNzVHJhbnNmZXJGZWVzBQR1bml0BQNuaWwBAnR4AQZ2ZXJpZnkABAckbWF0Y2gwBQJ0eAMJAAECBQckbWF0Y2gwAhdNYXNzVHJhbnNmZXJUcmFuc2FjdGlvbgQGbWFzc1R4BQckbWF0Y2gwCQDIEwMIBQZtYXNzVHgJYm9keUJ5dGVzCQCRAwIIBQZtYXNzVHgGcHJvb2ZzAAABICdyyI/DWUM9psFqeRmTYcK5k1+LqigLMCS33KkAh0oxCQDIEwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAAASAumQaoN6U+xrN5VpNDLBIHmCVy2F3Irlvu7+1i5+zzFKw4HUo=", "height": 3083456, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Gei317femh5k1rpRaYcjujXrC4HFpBU7Z3o87joVkbUk Next: 7cW213AvGoKvVVNrKP8iGi9n8yrpNSsSXXDEo4zQAhwL Diff:
OldNewDifferences
2525
2626 let SettingsAddress = Address(base58'3N2jcP6cAcDJoVpfsQ5tVDTQrNgJcVUjj4v')
2727
28-let PuzzleAggregatorAddress = Address(base58'3MpaxRCedEduatuKuqqyiMBobrmfivmD1HZ')
28+let PuzzleAggregatorAddress = Address(base58'3MyJM8hLxAMYFrPzdh68QqeMdFSSWufQqw3')
2929
3030 let MaintainerAddress = Address(base58'3N7ynzLr2PzVg9bCkrwLezNLVmoEyFmJtPL')
3131
32-let PuzzleTeamAddress = Address(base58'3MyUDpTMG43mkmScfDKgG9gep4reUboH9YF')
32+let PuzzleBuybackAddress = Address(base58'3MyUDpTMG43mkmScfDKgG9gep4reUboH9YF')
3333
3434 let WavesId = "WAVES"
3535
7878 if ((lastPayoutStatus != PayoutCompletedStatus))
7979 then throw((("Last payout: " + toString(lastPayout)) + " was not completed"))
8080 else {
81- let $t024462510 = getPayoutData(lastPayout)
82- let lastStartHeight = $t024462510._1
83- let lastEndHeight = $t024462510._2
81+ let $t024492513 = getPayoutData(lastPayout)
82+ let lastStartHeight = $t024492513._1
83+ let lastEndHeight = $t024492513._2
8484 if ((startHeight != (lastEndHeight + 1)))
8585 then throw(((("Wrong startHeight: " + toString(startHeight)) + ", should be: ") + toString((lastEndHeight + 1))))
8686 else if ((startHeight > endHeight))
111111 if ((getInteger(SettingsAddress, ("inputAssetIndex_" + assetStr)) == unit))
112112 then throw(("Unknown input: " + assetStr))
113113 else {
114- let $t039124091 = if ((assetStr == WavesId))
114+ let $t039154094 = if ((assetStr == WavesId))
115115 then $Tuple2(unit, (amounts[index] + currentAdditionalRewards))
116116 else $Tuple2(fromBase58String(assetStr), amounts[index])
117- let asset = $t039124091._1
118- let amount = $t039124091._2
117+ let asset = $t039154094._1
118+ let amount = $t039154094._2
119119 if ((0 > amount))
120120 then throw((("Wrong asset amount: " + toString(amount)) + ", should be positive or zero"))
121121 else {
123123 let maintainerFee = (minerFee / 2)
124124 let puzzleTeamFee = (minerFee - maintainerFee)
125125 let lessorsAmount = ((amount - maintainerFee) - puzzleTeamFee)
126- $Tuple2(((accum._1 :+ ScriptTransfer(MaintainerAddress, maintainerFee, asset)) :+ ScriptTransfer(PuzzleTeamAddress, puzzleTeamFee, asset)), (accum._2 :+ toString(lessorsAmount)))
126+ $Tuple2(((accum._1 :+ ScriptTransfer(MaintainerAddress, maintainerFee, asset)) :+ ScriptTransfer(PuzzleBuybackAddress, puzzleTeamFee, asset)), (accum._2 :+ toString(lessorsAmount)))
127127 }
128128 }
129129 }
130130
131- let $t046634730 = {
131+ let $t046694736 = {
132132 let $l = Arr10
133133 let $s = size($l)
134134 let $acc0 = $Tuple2(nil, nil)
142142
143143 $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)
144144 }
145- let transfers = $t046634730._1
146- let amountKeys = $t046634730._2
145+ let transfers = $t046694736._1
146+ let amountKeys = $t046694736._2
147147 let newPayoutData = makeString(([toString(startHeight), toString(endHeight)] ++ amountKeys), "_")
148148 (transfers ++ [IntegerEntry(LastPayoutKey, payoutId), StringEntry(makePayoutDataKey(payoutId), newPayoutData), IntegerEntry(makePayoutStatusKey(payoutId), PayoutInitiatedStatus)])
149149 }
170170 if ((payoutStatus != PayoutInitiatedStatus))
171171 then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be 1"))
172172 else {
173- let $t056815930 = if ((swapFrom == WavesId))
173+ let $t056875936 = if ((swapFrom == WavesId))
174174 then $Tuple2(wavesBalance(this).available, unit)
175175 else {
176176 let assetId = fromBase58String(swapFrom)
177177 $Tuple2(assetBalance(this, assetId), assetId)
178178 }
179- let balanceInBeforeSwap = $t056815930._1
180- let swapFromId = $t056815930._2
179+ let balanceInBeforeSwap = $t056875936._1
180+ let swapFromId = $t056875936._2
181181 let swapInvoke = invoke(PuzzleAggregatorAddress, "swapWithReferral", [route, minToReceive, "puzzlenode"], [AttachedPayment(swapFromId, amountIn)])
182182 if ((swapInvoke == swapInvoke))
183183 then {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let MinerFee = 5
55
66 let PayoutEmptyStatus = 0
77
88 let PayoutInitiatedStatus = 1
99
1010 let PayoutCompletedStatus = 2
1111
1212 let BlocksBatchMaxSize = 10
1313
1414 let RecipientsBatchMaxSize = 100
1515
1616 let Height = height
1717
1818 let ChainId = 84
1919
2020 let Arr10 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
2121
2222 let CallerAddress = Address(base58'3NC2Xn1tUKEc7YxJS9oxdtY4x5NaQHhpH2e')
2323
2424 let WavesDaoFactoryAddress = Address(base58'3MuS6qVvhBR6wSynFRdcE3fVqmGBjoc7Hhx')
2525
2626 let SettingsAddress = Address(base58'3N2jcP6cAcDJoVpfsQ5tVDTQrNgJcVUjj4v')
2727
28-let PuzzleAggregatorAddress = Address(base58'3MpaxRCedEduatuKuqqyiMBobrmfivmD1HZ')
28+let PuzzleAggregatorAddress = Address(base58'3MyJM8hLxAMYFrPzdh68QqeMdFSSWufQqw3')
2929
3030 let MaintainerAddress = Address(base58'3N7ynzLr2PzVg9bCkrwLezNLVmoEyFmJtPL')
3131
32-let PuzzleTeamAddress = Address(base58'3MyUDpTMG43mkmScfDKgG9gep4reUboH9YF')
32+let PuzzleBuybackAddress = Address(base58'3MyUDpTMG43mkmScfDKgG9gep4reUboH9YF')
3333
3434 let WavesId = "WAVES"
3535
3636 let LastPayoutKey = "lastPayout"
3737
3838 let MassTransferFeesKey = "massTransferFees"
3939
4040 func makePayoutDataKey (payoutId) = ("payoutData_" + toString(payoutId))
4141
4242
4343 func makePayoutStatusKey (payoutId) = ("payoutStatus_" + toString(payoutId))
4444
4545
4646 func makePayoutAdditionalRewardsKey (payoutId) = ("payoutAdditionalRewards_" + toString(payoutId))
4747
4848
4949 func getLastPayout () = getIntegerValue(this, LastPayoutKey)
5050
5151
5252 func getPayoutData (payoutId) = {
5353 let payoutString = getStringValue(makePayoutDataKey(payoutId))
5454 let payoutDataList = split(payoutString, "_")
5555 let startHeight = parseIntValue(payoutDataList[0])
5656 let endHeight = parseIntValue(payoutDataList[1])
5757 $Tuple2(startHeight, endHeight)
5858 }
5959
6060
6161 func getPayoutStatus (payoutId) = valueOrElse(getInteger(makePayoutStatusKey(payoutId)), PayoutEmptyStatus)
6262
6363
6464 func getPayoutAdditionalRewards (payoutId) = valueOrElse(getInteger(makePayoutAdditionalRewardsKey(payoutId)), 0)
6565
6666
6767 @Callable(i)
6868 func initiatePayout (payoutId,startHeight,endHeight,amounts,assets) = if ((i.caller != CallerAddress))
6969 then throw("Access denied")
7070 else if ((size(i.payments) != 0))
7171 then throw("Payments are prohibited")
7272 else {
7373 let lastPayout = getLastPayout()
7474 if ((payoutId != (lastPayout + 1)))
7575 then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString((lastPayout + 1))))
7676 else {
7777 let lastPayoutStatus = getPayoutStatus(lastPayout)
7878 if ((lastPayoutStatus != PayoutCompletedStatus))
7979 then throw((("Last payout: " + toString(lastPayout)) + " was not completed"))
8080 else {
81- let $t024462510 = getPayoutData(lastPayout)
82- let lastStartHeight = $t024462510._1
83- let lastEndHeight = $t024462510._2
81+ let $t024492513 = getPayoutData(lastPayout)
82+ let lastStartHeight = $t024492513._1
83+ let lastEndHeight = $t024492513._2
8484 if ((startHeight != (lastEndHeight + 1)))
8585 then throw(((("Wrong startHeight: " + toString(startHeight)) + ", should be: ") + toString((lastEndHeight + 1))))
8686 else if ((startHeight > endHeight))
8787 then throw(((("endHeight: " + toString(endHeight)) + " less than startHeight: ") + toString(startHeight)))
8888 else {
8989 let inputsQuantity = getIntegerValue(SettingsAddress, "inputsQuantity")
9090 let amountsSize = size(amounts)
9191 let assetsSize = size(assets)
9292 if (if ((amountsSize != assetsSize))
9393 then true
9494 else (amountsSize != inputsQuantity))
9595 then throw("Wrong size of amounts or assets")
9696 else {
9797 let availableWavesDaoLpToClaim = valueOrElse(getInteger(WavesDaoFactoryAddress, ("%s%s__available__" + toString(this))), 0)
9898 let wavesDaoNextBlockToProcess = getIntegerValue(WavesDaoFactoryAddress, "%s__nextBlockToProcess")
9999 let wavesDlpClaim = if (if ((availableWavesDaoLpToClaim > 0))
100100 then ((wavesDaoNextBlockToProcess + BlocksBatchMaxSize) >= Height)
101101 else false)
102102 then invoke(WavesDaoFactoryAddress, "claimLP", nil, nil)
103103 else unit
104104 if ((wavesDlpClaim == wavesDlpClaim))
105105 then {
106106 let currentAdditionalRewards = getPayoutAdditionalRewards(payoutId)
107107 func assetsFold (accum,index) = if ((index >= assetsSize))
108108 then accum
109109 else {
110110 let assetStr = assets[index]
111111 if ((getInteger(SettingsAddress, ("inputAssetIndex_" + assetStr)) == unit))
112112 then throw(("Unknown input: " + assetStr))
113113 else {
114- let $t039124091 = if ((assetStr == WavesId))
114+ let $t039154094 = if ((assetStr == WavesId))
115115 then $Tuple2(unit, (amounts[index] + currentAdditionalRewards))
116116 else $Tuple2(fromBase58String(assetStr), amounts[index])
117- let asset = $t039124091._1
118- let amount = $t039124091._2
117+ let asset = $t039154094._1
118+ let amount = $t039154094._2
119119 if ((0 > amount))
120120 then throw((("Wrong asset amount: " + toString(amount)) + ", should be positive or zero"))
121121 else {
122122 let minerFee = fraction(amount, MinerFee, 100)
123123 let maintainerFee = (minerFee / 2)
124124 let puzzleTeamFee = (minerFee - maintainerFee)
125125 let lessorsAmount = ((amount - maintainerFee) - puzzleTeamFee)
126- $Tuple2(((accum._1 :+ ScriptTransfer(MaintainerAddress, maintainerFee, asset)) :+ ScriptTransfer(PuzzleTeamAddress, puzzleTeamFee, asset)), (accum._2 :+ toString(lessorsAmount)))
126+ $Tuple2(((accum._1 :+ ScriptTransfer(MaintainerAddress, maintainerFee, asset)) :+ ScriptTransfer(PuzzleBuybackAddress, puzzleTeamFee, asset)), (accum._2 :+ toString(lessorsAmount)))
127127 }
128128 }
129129 }
130130
131- let $t046634730 = {
131+ let $t046694736 = {
132132 let $l = Arr10
133133 let $s = size($l)
134134 let $acc0 = $Tuple2(nil, nil)
135135 func $f0_1 ($a,$i) = if (($i >= $s))
136136 then $a
137137 else assetsFold($a, $l[$i])
138138
139139 func $f0_2 ($a,$i) = if (($i >= $s))
140140 then $a
141141 else throw("List size exceeds 10")
142142
143143 $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)
144144 }
145- let transfers = $t046634730._1
146- let amountKeys = $t046634730._2
145+ let transfers = $t046694736._1
146+ let amountKeys = $t046694736._2
147147 let newPayoutData = makeString(([toString(startHeight), toString(endHeight)] ++ amountKeys), "_")
148148 (transfers ++ [IntegerEntry(LastPayoutKey, payoutId), StringEntry(makePayoutDataKey(payoutId), newPayoutData), IntegerEntry(makePayoutStatusKey(payoutId), PayoutInitiatedStatus)])
149149 }
150150 else throw("Strict value is not equal to itself.")
151151 }
152152 }
153153 }
154154 }
155155 }
156156
157157
158158
159159 @Callable(i)
160160 func swap (payoutId,swapFrom,amountIn,route,minToReceive) = if ((i.caller != CallerAddress))
161161 then throw("Access denied")
162162 else if ((size(i.payments) != 0))
163163 then throw("Payments are prohibited")
164164 else {
165165 let lastPayout = getLastPayout()
166166 if ((lastPayout != payoutId))
167167 then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString(lastPayout)))
168168 else {
169169 let payoutStatus = getPayoutStatus(payoutId)
170170 if ((payoutStatus != PayoutInitiatedStatus))
171171 then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be 1"))
172172 else {
173- let $t056815930 = if ((swapFrom == WavesId))
173+ let $t056875936 = if ((swapFrom == WavesId))
174174 then $Tuple2(wavesBalance(this).available, unit)
175175 else {
176176 let assetId = fromBase58String(swapFrom)
177177 $Tuple2(assetBalance(this, assetId), assetId)
178178 }
179- let balanceInBeforeSwap = $t056815930._1
180- let swapFromId = $t056815930._2
179+ let balanceInBeforeSwap = $t056875936._1
180+ let swapFromId = $t056875936._2
181181 let swapInvoke = invoke(PuzzleAggregatorAddress, "swapWithReferral", [route, minToReceive, "puzzlenode"], [AttachedPayment(swapFromId, amountIn)])
182182 if ((swapInvoke == swapInvoke))
183183 then {
184184 let balanceInAfterSwap = if ((swapFrom == WavesId))
185185 then wavesBalance(this).available
186186 else assetBalance(this, value(swapFromId))
187187 let refund = (balanceInAfterSwap - (balanceInBeforeSwap - amountIn))
188188 if ((refund > 10))
189189 then throw(("Rollback aggregator refund: " + toString(refund)))
190190 else nil
191191 }
192192 else throw("Strict value is not equal to itself.")
193193 }
194194 }
195195 }
196196
197197
198198
199199 @Callable(i)
200200 func distributeTokens (payoutId,recipients,amounts,assets,attachment) = if ((i.caller != CallerAddress))
201201 then throw("Access denied")
202202 else if ((size(i.payments) != 0))
203203 then throw("Payments are prohibited")
204204 else {
205205 let lastPayout = getLastPayout()
206206 if ((lastPayout != payoutId))
207207 then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString(lastPayout)))
208208 else {
209209 let payoutStatus = getPayoutStatus(payoutId)
210210 if ((payoutStatus != PayoutInitiatedStatus))
211211 then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be 1"))
212212 else {
213213 let recipientsSize = size(recipients)
214214 let amountsSize = size(amounts)
215215 let assetsSize = size(assets)
216216 if (if ((recipientsSize != amountsSize))
217217 then true
218218 else (recipientsSize != assetsSize))
219219 then throw(((((("Wrong recipients size: " + toString(recipientsSize)) + ", amounts size: ") + toString(amountsSize)) + ", assets size: ") + toString(assetsSize)))
220220 else if ((recipientsSize == 0))
221221 then throw("Recipients list should not be empty")
222222 else if ((recipientsSize > RecipientsBatchMaxSize))
223223 then throw(((("Should be not greater than " + toString(RecipientsBatchMaxSize)) + " recipients, current: ") + toString(recipientsSize)))
224224 else {
225225 let magicByte = drop(toBytes(1), 7)
226226 let chainIdByte = drop(toBytes(ChainId), 7)
227227 let addressPrefix = (magicByte + chainIdByte)
228228 func scriptTransfersFold (accum,index) = if ((index >= recipientsSize))
229229 then accum
230230 else {
231231 let publicKeyHash = recipients[index]
232232 let addressData = (addressPrefix + publicKeyHash)
233233 let addressChecksum = take(keccak256(blake2b256(addressData)), 4)
234234 let recipient = Address((addressData + addressChecksum))
235235 let amount = amounts[index]
236236 let assetIndex = assets[index]
237237 let assetId = getBinaryValue(SettingsAddress, ("assetId_" + toString(assetIndex)))
238238 let asset = if ((assetId == base58''))
239239 then unit
240240 else assetId
241241 (accum :+ ScriptTransfer(recipient, amount, asset))
242242 }
243243
244244 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]
245245 let $l = indexes
246246 let $s = size($l)
247247 let $acc0 = nil
248248 func $f0_1 ($a,$i) = if (($i >= $s))
249249 then $a
250250 else scriptTransfersFold($a, $l[$i])
251251
252252 func $f0_2 ($a,$i) = if (($i >= $s))
253253 then $a
254254 else throw("List size exceeds 100")
255255
256256 $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)
257257 }
258258 }
259259 }
260260 }
261261
262262
263263
264264 @Callable(i)
265265 func finalizePayout (payoutId) = if ((i.caller != CallerAddress))
266266 then throw("Access denied")
267267 else {
268268 let lastPayout = getLastPayout()
269269 if ((lastPayout != payoutId))
270270 then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString(lastPayout)))
271271 else {
272272 let payoutStatus = getPayoutStatus(lastPayout)
273273 if ((payoutStatus != PayoutInitiatedStatus))
274274 then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be: 1"))
275275 else [IntegerEntry(makePayoutStatusKey(lastPayout), PayoutCompletedStatus)]
276276 }
277277 }
278278
279279
280280
281281 @Callable(i)
282282 func addAdditionalRewards () = if ((size(i.payments) != 1))
283283 then throw("At least one payment should be attached")
284284 else if ((i.payments[0].assetId != unit))
285285 then throw("Only waves can be attached")
286286 else {
287287 let lastPayout = getLastPayout()
288288 let lastPayoutStatus = getPayoutStatus(lastPayout)
289289 if ((lastPayoutStatus != PayoutCompletedStatus))
290290 then throw((("Last payout: " + toString(lastPayout)) + " was not completed"))
291291 else {
292292 let nextPayoutId = (lastPayout + 1)
293293 let currentAdditionalRewards = getPayoutAdditionalRewards(nextPayoutId)
294294 let newAdditionalRewards = (currentAdditionalRewards + i.payments[0].amount)
295295 [IntegerEntry(makePayoutAdditionalRewardsKey(nextPayoutId), newAdditionalRewards)]
296296 }
297297 }
298298
299299
300300
301301 @Callable(i)
302302 func addMassTransferFees () = if ((size(i.payments) != 1))
303303 then throw("At least one payment should be attached")
304304 else if ((i.payments[0].assetId != unit))
305305 then throw("Only waves can be attached")
306306 else {
307307 let currentMassTransferFees = valueOrElse(getInteger(MassTransferFeesKey), 0)
308308 let newMassTransferFees = (currentMassTransferFees + i.payments[0].amount)
309309 [IntegerEntry(MassTransferFeesKey, newMassTransferFees)]
310310 }
311311
312312
313313
314314 @Callable(i)
315315 func withdrawMassTransferFees () = if ((i.caller != MaintainerAddress))
316316 then throw("Access denied")
317317 else if ((size(i.payments) != 0))
318318 then throw("Payments are prohibited")
319319 else {
320320 let currentMassTransferFees = valueOrElse(getInteger(MassTransferFeesKey), 0)
321321 if ((currentMassTransferFees == 0))
322322 then throw("Nothing to withdraw")
323323 else [IntegerEntry(MassTransferFeesKey, 0), ScriptTransfer(MaintainerAddress, currentMassTransferFees, unit)]
324324 }
325325
326326
327327 @Verifier(tx)
328328 func verify () = match tx {
329329 case massTx: MassTransferTransaction =>
330330 sigVerify_128Kb(massTx.bodyBytes, massTx.proofs[0], base58'3ezR5yaSmZAzqGt8iqRkYESRWpH1uaTKZ9ZffHD3C2Wc')
331331 case _ =>
332332 sigVerify_128Kb(tx.bodyBytes, tx.proofs[0], base58'48u6HN3ArS3YcgWAwiuq3aAnviVc2uPwuEj2QuFcV4bd')
333333 }
334334

github/deemru/w8io/026f985 
55.18 ms