tx · Gei317femh5k1rpRaYcjujXrC4HFpBU7Z3o87joVkbUk

3N7XWpdx1UJKZp5stTtFMXPEygyfZ7j4PyC:  -0.01200000 Waves

2024.04.16 23:15 [3065777] smart account 3N7XWpdx1UJKZp5stTtFMXPEygyfZ7j4PyC > SELF 0.00000000 Waves

{ "type": 13, "id": "Gei317femh5k1rpRaYcjujXrC4HFpBU7Z3o87joVkbUk", "fee": 1200000, "feeAssetId": null, "timestamp": 1713298533259, "version": 1, "sender": "3N7XWpdx1UJKZp5stTtFMXPEygyfZ7j4PyC", "senderPublicKey": "APsCCjsKHFx7rbr1mG8Pca43pccTbH2G4FZj4keEqKJ5", "proofs": [ "4BkpgP89zqQt2hK6FkYSunVSjqVGG7iTAek25Dt1WGmLxb5V1qLyQdZjjc5R9RGSC4x1GVKGhTfxFFKbWBetQQsK" ], "script": "base64:BgIoCAISBwoFAQEBERgSBwoFAQgBCAESBwoFARIREQgSAwoBARIAEgASABkACE1pbmVyRmVlAAUAEVBheW91dEVtcHR5U3RhdHVzAAAAFVBheW91dEluaXRpYXRlZFN0YXR1cwABABVQYXlvdXRDb21wbGV0ZWRTdGF0dXMAAgASQmxvY2tzQmF0Y2hNYXhTaXplAAoAFlJlY2lwaWVudHNCYXRjaE1heFNpemUAZAAGSGVpZ2h0BQZoZWlnaHQAB0NoYWluSWQAVAAFQXJyMTAJAMwIAgAACQDMCAIAAQkAzAgCAAIJAMwIAgADCQDMCAIABAkAzAgCAAUJAMwIAgAGCQDMCAIABwkAzAgCAAgJAMwIAgAJBQNuaWwADUNhbGxlckFkZHJlc3MJAQdBZGRyZXNzAQEaAVTyivfVKpPlEk6umrrIyi00GQZQXD9/r7cAFldhdmVzRGFvRmFjdG9yeUFkZHJlc3MJAQdBZGRyZXNzAQEaAVQ8hf55dL/LZOPYRZ/ELezKrvBEP8q22ucAD1NldHRpbmdzQWRkcmVzcwkBB0FkZHJlc3MBARoBVIyem88MXqbW0vyDLXrGPL3YKtq0d10DywAXUHV6emxlQ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VzcwkAAgECDUFjY2VzcyBkZW5pZWQDCQECIT0CCQCQAwEIBQFpCHBheW1lbnRzAAAJAAIBAhdQYXltZW50cyBhcmUgcHJvaGliaXRlZAQXY3VycmVudE1hc3NUcmFuc2ZlckZlZXMJAQt2YWx1ZU9yRWxzZQIJAJ8IAQUTTWFzc1RyYW5zZmVyRmVlc0tleQAAAwkAAAIFF2N1cnJlbnRNYXNzVHJhbnNmZXJGZWVzAAAJAAIBAhNOb3RoaW5nIHRvIHdpdGhkcmF3CQDMCAIJAQxJbnRlZ2VyRW50cnkCBRNNYXNzVHJhbnNmZXJGZWVzS2V5AAAJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwURTWFpbnRhaW5lckFkZHJlc3MFF2N1cnJlbnRNYXNzVHJhbnNmZXJGZWVzBQR1bml0BQNuaWwBAnR4AQZ2ZXJpZnkABAckbWF0Y2gwBQJ0eAMJAAECBQckbWF0Y2gwAhdNYXNzVHJhbnNmZXJUcmFuc2FjdGlvbgQGbWFzc1R4BQckbWF0Y2gwCQDIEwMIBQZtYXNzVHgJYm9keUJ5dGVzCQCRAwIIBQZtYXNzVHgGcHJvb2ZzAAABICdyyI/DWUM9psFqeRmTYcK5k1+LqigLMCS33KkAh0oxCQDIEwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAAASAumQaoN6U+xrN5VpNDLBIHmCVy2F3Irlvu7+1i5+zzFNL0M2o=", "chainId": 84, "height": 3065777, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 6MyTkzm8fjJC1dAw43qfkmcDjMHjHuZ3SmdeukpWpvRf Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let MinerFee = 5
5+
6+let PayoutEmptyStatus = 0
7+
8+let PayoutInitiatedStatus = 1
9+
10+let PayoutCompletedStatus = 2
11+
12+let BlocksBatchMaxSize = 10
13+
14+let RecipientsBatchMaxSize = 100
15+
16+let Height = height
17+
18+let ChainId = 84
19+
20+let Arr10 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
21+
22+let CallerAddress = Address(base58'3NC2Xn1tUKEc7YxJS9oxdtY4x5NaQHhpH2e')
23+
24+let WavesDaoFactoryAddress = Address(base58'3MuS6qVvhBR6wSynFRdcE3fVqmGBjoc7Hhx')
25+
26+let SettingsAddress = Address(base58'3N2jcP6cAcDJoVpfsQ5tVDTQrNgJcVUjj4v')
27+
28+let PuzzleAggregatorAddress = Address(base58'3MpaxRCedEduatuKuqqyiMBobrmfivmD1HZ')
29+
30+let MaintainerAddress = Address(base58'3N7ynzLr2PzVg9bCkrwLezNLVmoEyFmJtPL')
31+
32+let PuzzleTeamAddress = Address(base58'3MyUDpTMG43mkmScfDKgG9gep4reUboH9YF')
33+
34+let WavesId = "WAVES"
35+
36+let LastPayoutKey = "lastPayout"
37+
38+let MassTransferFeesKey = "massTransferFees"
39+
40+func makePayoutDataKey (payoutId) = ("payoutData_" + toString(payoutId))
41+
42+
43+func makePayoutStatusKey (payoutId) = ("payoutStatus_" + toString(payoutId))
44+
45+
46+func makePayoutAdditionalRewardsKey (payoutId) = ("payoutAdditionalRewards_" + toString(payoutId))
47+
48+
49+func getLastPayout () = getIntegerValue(this, LastPayoutKey)
50+
51+
52+func getPayoutData (payoutId) = {
53+ let payoutString = getStringValue(makePayoutDataKey(payoutId))
54+ let payoutDataList = split(payoutString, "_")
55+ let startHeight = parseIntValue(payoutDataList[0])
56+ let endHeight = parseIntValue(payoutDataList[1])
57+ $Tuple2(startHeight, endHeight)
58+ }
59+
60+
61+func getPayoutStatus (payoutId) = valueOrElse(getInteger(makePayoutStatusKey(payoutId)), PayoutEmptyStatus)
62+
63+
64+func getPayoutAdditionalRewards (payoutId) = valueOrElse(getInteger(makePayoutAdditionalRewardsKey(payoutId)), 0)
65+
66+
67+@Callable(i)
68+func initiatePayout (payoutId,startHeight,endHeight,amounts,assets) = if ((i.caller != CallerAddress))
69+ then throw("Access denied")
70+ else if ((size(i.payments) != 0))
71+ then throw("Payments are prohibited")
72+ else {
73+ let lastPayout = getLastPayout()
74+ if ((payoutId != (lastPayout + 1)))
75+ then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString((lastPayout + 1))))
76+ else {
77+ let lastPayoutStatus = getPayoutStatus(lastPayout)
78+ if ((lastPayoutStatus != PayoutCompletedStatus))
79+ then throw((("Last payout: " + toString(lastPayout)) + " was not completed"))
80+ else {
81+ let $t024462510 = getPayoutData(lastPayout)
82+ let lastStartHeight = $t024462510._1
83+ let lastEndHeight = $t024462510._2
84+ if ((startHeight != (lastEndHeight + 1)))
85+ then throw(((("Wrong startHeight: " + toString(startHeight)) + ", should be: ") + toString((lastEndHeight + 1))))
86+ else if ((startHeight > endHeight))
87+ then throw(((("endHeight: " + toString(endHeight)) + " less than startHeight: ") + toString(startHeight)))
88+ else {
89+ let inputsQuantity = getIntegerValue(SettingsAddress, "inputsQuantity")
90+ let amountsSize = size(amounts)
91+ let assetsSize = size(assets)
92+ if (if ((amountsSize != assetsSize))
93+ then true
94+ else (amountsSize != inputsQuantity))
95+ then throw("Wrong size of amounts or assets")
96+ else {
97+ let availableWavesDaoLpToClaim = valueOrElse(getInteger(WavesDaoFactoryAddress, ("%s%s__available__" + toString(this))), 0)
98+ let wavesDaoNextBlockToProcess = getIntegerValue(WavesDaoFactoryAddress, "%s__nextBlockToProcess")
99+ let wavesDlpClaim = if (if ((availableWavesDaoLpToClaim > 0))
100+ then ((wavesDaoNextBlockToProcess + BlocksBatchMaxSize) >= Height)
101+ else false)
102+ then invoke(WavesDaoFactoryAddress, "claimLP", nil, nil)
103+ else unit
104+ if ((wavesDlpClaim == wavesDlpClaim))
105+ then {
106+ let currentAdditionalRewards = getPayoutAdditionalRewards(payoutId)
107+ func assetsFold (accum,index) = if ((index >= assetsSize))
108+ then accum
109+ else {
110+ let assetStr = assets[index]
111+ if ((getInteger(SettingsAddress, ("inputAssetIndex_" + assetStr)) == unit))
112+ then throw(("Unknown input: " + assetStr))
113+ else {
114+ let $t039124091 = if ((assetStr == WavesId))
115+ then $Tuple2(unit, (amounts[index] + currentAdditionalRewards))
116+ else $Tuple2(fromBase58String(assetStr), amounts[index])
117+ let asset = $t039124091._1
118+ let amount = $t039124091._2
119+ if ((0 > amount))
120+ then throw((("Wrong asset amount: " + toString(amount)) + ", should be positive or zero"))
121+ else {
122+ let minerFee = fraction(amount, MinerFee, 100)
123+ let maintainerFee = (minerFee / 2)
124+ let puzzleTeamFee = (minerFee - maintainerFee)
125+ let lessorsAmount = ((amount - maintainerFee) - puzzleTeamFee)
126+ $Tuple2(((accum._1 :+ ScriptTransfer(MaintainerAddress, maintainerFee, asset)) :+ ScriptTransfer(PuzzleTeamAddress, puzzleTeamFee, asset)), (accum._2 :+ toString(lessorsAmount)))
127+ }
128+ }
129+ }
130+
131+ let $t046634730 = {
132+ let $l = Arr10
133+ let $s = size($l)
134+ let $acc0 = $Tuple2(nil, nil)
135+ func $f0_1 ($a,$i) = if (($i >= $s))
136+ then $a
137+ else assetsFold($a, $l[$i])
138+
139+ func $f0_2 ($a,$i) = if (($i >= $s))
140+ then $a
141+ else throw("List size exceeds 10")
142+
143+ $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)
144+ }
145+ let transfers = $t046634730._1
146+ let amountKeys = $t046634730._2
147+ let newPayoutData = makeString(([toString(startHeight), toString(endHeight)] ++ amountKeys), "_")
148+ (transfers ++ [IntegerEntry(LastPayoutKey, payoutId), StringEntry(makePayoutDataKey(payoutId), newPayoutData), IntegerEntry(makePayoutStatusKey(payoutId), PayoutInitiatedStatus)])
149+ }
150+ else throw("Strict value is not equal to itself.")
151+ }
152+ }
153+ }
154+ }
155+ }
156+
157+
158+
159+@Callable(i)
160+func swap (payoutId,swapFrom,amountIn,route,minToReceive) = if ((i.caller != CallerAddress))
161+ then throw("Access denied")
162+ else if ((size(i.payments) != 0))
163+ then throw("Payments are prohibited")
164+ else {
165+ let lastPayout = getLastPayout()
166+ if ((lastPayout != payoutId))
167+ then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString(lastPayout)))
168+ else {
169+ let payoutStatus = getPayoutStatus(payoutId)
170+ if ((payoutStatus != PayoutInitiatedStatus))
171+ then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be 1"))
172+ else {
173+ let $t056815930 = if ((swapFrom == WavesId))
174+ then $Tuple2(wavesBalance(this).available, unit)
175+ else {
176+ let assetId = fromBase58String(swapFrom)
177+ $Tuple2(assetBalance(this, assetId), assetId)
178+ }
179+ let balanceInBeforeSwap = $t056815930._1
180+ let swapFromId = $t056815930._2
181+ let swapInvoke = invoke(PuzzleAggregatorAddress, "swapWithReferral", [route, minToReceive, "puzzlenode"], [AttachedPayment(swapFromId, amountIn)])
182+ if ((swapInvoke == swapInvoke))
183+ then {
184+ let balanceInAfterSwap = if ((swapFrom == WavesId))
185+ then wavesBalance(this).available
186+ else assetBalance(this, value(swapFromId))
187+ let refund = (balanceInAfterSwap - (balanceInBeforeSwap - amountIn))
188+ if ((refund > 10))
189+ then throw(("Rollback aggregator refund: " + toString(refund)))
190+ else nil
191+ }
192+ else throw("Strict value is not equal to itself.")
193+ }
194+ }
195+ }
196+
197+
198+
199+@Callable(i)
200+func distributeTokens (payoutId,recipients,amounts,assets,attachment) = if ((i.caller != CallerAddress))
201+ then throw("Access denied")
202+ else if ((size(i.payments) != 0))
203+ then throw("Payments are prohibited")
204+ else {
205+ let lastPayout = getLastPayout()
206+ if ((lastPayout != payoutId))
207+ then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString(lastPayout)))
208+ else {
209+ let payoutStatus = getPayoutStatus(payoutId)
210+ if ((payoutStatus != PayoutInitiatedStatus))
211+ then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be 1"))
212+ else {
213+ let recipientsSize = size(recipients)
214+ let amountsSize = size(amounts)
215+ let assetsSize = size(assets)
216+ if (if ((recipientsSize != amountsSize))
217+ then true
218+ else (recipientsSize != assetsSize))
219+ then throw(((((("Wrong recipients size: " + toString(recipientsSize)) + ", amounts size: ") + toString(amountsSize)) + ", assets size: ") + toString(assetsSize)))
220+ else if ((recipientsSize == 0))
221+ then throw("Recipients list should not be empty")
222+ else if ((recipientsSize > RecipientsBatchMaxSize))
223+ then throw(((("Should be not greater than " + toString(RecipientsBatchMaxSize)) + " recipients, current: ") + toString(recipientsSize)))
224+ else {
225+ let magicByte = drop(toBytes(1), 7)
226+ let chainIdByte = drop(toBytes(ChainId), 7)
227+ let addressPrefix = (magicByte + chainIdByte)
228+ func scriptTransfersFold (accum,index) = if ((index >= recipientsSize))
229+ then accum
230+ else {
231+ let publicKeyHash = recipients[index]
232+ let addressData = (addressPrefix + publicKeyHash)
233+ let addressChecksum = take(keccak256(blake2b256(addressData)), 4)
234+ let recipient = Address((addressData + addressChecksum))
235+ let amount = amounts[index]
236+ let assetIndex = assets[index]
237+ let assetId = getBinaryValue(SettingsAddress, ("assetId_" + toString(assetIndex)))
238+ let asset = if ((assetId == base58''))
239+ then unit
240+ else assetId
241+ (accum :+ ScriptTransfer(recipient, amount, asset))
242+ }
243+
244+ 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]
245+ let $l = indexes
246+ let $s = size($l)
247+ let $acc0 = nil
248+ func $f0_1 ($a,$i) = if (($i >= $s))
249+ then $a
250+ else scriptTransfersFold($a, $l[$i])
251+
252+ func $f0_2 ($a,$i) = if (($i >= $s))
253+ then $a
254+ else throw("List size exceeds 100")
255+
256+ $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)
257+ }
258+ }
259+ }
260+ }
261+
262+
263+
264+@Callable(i)
265+func finalizePayout (payoutId) = if ((i.caller != CallerAddress))
266+ then throw("Access denied")
267+ else {
268+ let lastPayout = getLastPayout()
269+ if ((lastPayout != payoutId))
270+ then throw(((("Wrong payoutId: " + toString(payoutId)) + ", should be: ") + toString(lastPayout)))
271+ else {
272+ let payoutStatus = getPayoutStatus(lastPayout)
273+ if ((payoutStatus != PayoutInitiatedStatus))
274+ then throw((("Wrong payout status: " + toString(payoutStatus)) + ", should be: 1"))
275+ else [IntegerEntry(makePayoutStatusKey(lastPayout), PayoutCompletedStatus)]
276+ }
277+ }
278+
279+
280+
281+@Callable(i)
282+func addAdditionalRewards () = if ((size(i.payments) != 1))
283+ then throw("At least one payment should be attached")
284+ else if ((i.payments[0].assetId != unit))
285+ then throw("Only waves can be attached")
286+ else {
287+ let lastPayout = getLastPayout()
288+ let lastPayoutStatus = getPayoutStatus(lastPayout)
289+ if ((lastPayoutStatus != PayoutCompletedStatus))
290+ then throw((("Last payout: " + toString(lastPayout)) + " was not completed"))
291+ else {
292+ let nextPayoutId = (lastPayout + 1)
293+ let currentAdditionalRewards = getPayoutAdditionalRewards(nextPayoutId)
294+ let newAdditionalRewards = (currentAdditionalRewards + i.payments[0].amount)
295+[IntegerEntry(makePayoutAdditionalRewardsKey(nextPayoutId), newAdditionalRewards)]
296+ }
297+ }
298+
299+
300+
301+@Callable(i)
302+func addMassTransferFees () = if ((size(i.payments) != 1))
303+ then throw("At least one payment should be attached")
304+ else if ((i.payments[0].assetId != unit))
305+ then throw("Only waves can be attached")
306+ else {
307+ let currentMassTransferFees = valueOrElse(getInteger(MassTransferFeesKey), 0)
308+ let newMassTransferFees = (currentMassTransferFees + i.payments[0].amount)
309+[IntegerEntry(MassTransferFeesKey, newMassTransferFees)]
310+ }
311+
312+
313+
314+@Callable(i)
315+func withdrawMassTransferFees () = if ((i.caller != MaintainerAddress))
316+ then throw("Access denied")
317+ else if ((size(i.payments) != 0))
318+ then throw("Payments are prohibited")
319+ else {
320+ let currentMassTransferFees = valueOrElse(getInteger(MassTransferFeesKey), 0)
321+ if ((currentMassTransferFees == 0))
322+ then throw("Nothing to withdraw")
323+ else [IntegerEntry(MassTransferFeesKey, 0), ScriptTransfer(MaintainerAddress, currentMassTransferFees, unit)]
324+ }
325+
326+
327+@Verifier(tx)
328+func verify () = match tx {
329+ case massTx: MassTransferTransaction =>
330+ sigVerify_128Kb(massTx.bodyBytes, massTx.proofs[0], base58'3ezR5yaSmZAzqGt8iqRkYESRWpH1uaTKZ9ZffHD3C2Wc')
331+ case _ =>
332+ sigVerify_128Kb(tx.bodyBytes, tx.proofs[0], base58'48u6HN3ArS3YcgWAwiuq3aAnviVc2uPwuEj2QuFcV4bd')
333+}
334+

github/deemru/w8io/026f985 
39.80 ms