tx · 5ifMDAaSpBkaEB5z2xrDyqzA2DZHH8G1Fgk4znhHsoo9 3N4wBgYtWgJW2LTRef2ekWQTrEXCRfXmGLh: -0.01000000 Waves 2023.10.20 19:31 [2807152] smart account 3N4wBgYtWgJW2LTRef2ekWQTrEXCRfXmGLh > SELF 0.00000000 Waves
{ "type": 13, "id": "5ifMDAaSpBkaEB5z2xrDyqzA2DZHH8G1Fgk4znhHsoo9", "fee": 1000000, "feeAssetId": null, "timestamp": 1697819516803, "version": 2, "chainId": 84, "sender": "3N4wBgYtWgJW2LTRef2ekWQTrEXCRfXmGLh", "senderPublicKey": "7hRYZBcZCcRPgMoWSZsJ7jspEBuJt9Tc58d12xK3DWMp", "proofs": [ "3S7iGVKsF2XqUacNrBhjNfmbCFRfLE3vn3J3e71mCbcgi9nyaawwDsokGShTYnYwm2TZTdfdGosyNL8kivpVBeQh" ], "script": "base64:BgIWCAISBgoEGBERCBIAEgMKAQESAwoBAQcAFHVzZXJfYmFsYW5jZV9hZGRyZXNzAiMzTjFzMnc0TkhnYnJYeE5aWEg5UnRhVlQ5cHRIUkpjZ1NwMgARbHBfYWRkcmVzc19wdWJrZXkBIMjtmNqG7lU1WGDHPJboKlti9SIwxR/k7IFRCWjnzhpzACBtYXNzdHJhbnNmZXJfd2hpdGVsaXN0ZWRfYWRkcmVzcwkApwgBBRFscF9hZGRyZXNzX3B1YmtleQAUbHBfZGVwb3NpdG9yX2FkZHJlc3MBIAKzAejCIyo1u64LRV3TLFVU23AoEuHL2Ni8HYSbNWZ5ABRscF93aGl0ZWxpc3RfYWRkcmVzcwkApwgBBRRscF9kZXBvc2l0b3JfYWRkcmVzcwALbmV0d29ya19mZWUAoMIeAR12YWxpZGF0ZU1hc3NUcmFuc2ZlckFyZ3VtZW50cwQKcmVjaXBpZW50cwdhbW91bnRzCnBheW1lbnRJZHgIcGF5bWVudHMEDnJlY2lwaWVudHNTaXplCQCQAwEFCnJlY2lwaWVudHMEC2Ftb3VudHNTaXplCQCQAwE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VwZGF0ZWRfcG9vbF9iYWxhbmNlCQDMCAIJAQxJbnRlZ2VyRW50cnkCAhNMUF9XaXRoZHJhd19Db3VudGVyBRZUb3RhbExQV2l0aGRyYXdDb3VudGVyCQDMCAIJAQxJbnRlZ2VyRW50cnkCAhFUb3RhbF9MUF9XaXRoZHJhdwUPVG90YWxMUFdpdGhkcmF3CQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIJAKQDAQUWVG90YWxMUFdpdGhkcmF3Q291bnRlcgIMX0xQX1dpdGhkcmF3BQ5XaXRoZHJhd0Ftb3VudAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDBRRscF93aGl0ZWxpc3RfYWRkcmVzcwUOV2l0aGRyYXdBbW91bnQFBHVuaXQFA25pbAECdHgBBnZlcmlmeQAEByRtYXRjaDAFAnR4AwMJAAECBQckbWF0Y2gwAgVPcmRlcgYDCQABAgUHJG1hdGNoMAITRXhjaGFuZ2VUcmFuc2FjdGlvbgYJAAECBQckbWF0Y2gwAhNUcmFuc2ZlclRyYW5zYWN0aW9uBAF0BQckbWF0Y2gwBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleUDdp7I=", "height": 2807152, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8xQzJTZudgLJk66B2PShisYssdn8SGgFx2Wg7ZNTkkZu Next: 6tm7U2jTfq1xwaYKDqNxSM2VoZvABwQkbUbd67bo73Mq Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let user_balance_address = "3N1s2w4NHgbrXxNZXH9RtaVT9ptHRJcgSp2" | |
5 | + | ||
4 | 6 | let lp_address_pubkey = base58'EXLfxKmqhQPiProBaoPatTentUSZX5Dd8A8bYDcmfNwt' | |
5 | 7 | ||
6 | 8 | let masstransfer_whitelisted_address = addressFromPublicKey(lp_address_pubkey) | |
20 | 22 | let minPaymentIdx = min(paymentIdx) | |
21 | 23 | let maxPaymentIdx = max(paymentIdx) | |
22 | 24 | func paymentsValidator (paymentAccum,nextPayment) = { | |
23 | - | let $ | |
24 | - | let validPayments = $ | |
25 | - | let j = $ | |
25 | + | let $t014901527 = paymentAccum | |
26 | + | let validPayments = $t014901527._1 | |
27 | + | let j = $t014901527._2 | |
26 | 28 | if ((j >= paymentsSize)) | |
27 | 29 | then $Tuple2(validPayments, (j + 1)) | |
28 | 30 | else { | |
29 | 31 | func amountsAggregator (amountAccum,nextAmount) = { | |
30 | - | let $ | |
31 | - | let amount = $ | |
32 | - | let k = $ | |
32 | + | let $t016821711 = amountAccum | |
33 | + | let amount = $t016821711._1 | |
34 | + | let k = $t016821711._2 | |
33 | 35 | if (if ((k >= recipientsSize)) | |
34 | 36 | then true | |
35 | 37 | else (paymentIdx[k] != j)) | |
94 | 96 | @Callable(i) | |
95 | 97 | func massTransfer (recipients,amounts,paymentIdx,attachment) = { | |
96 | 98 | let pmt = value(i.payments[0]) | |
99 | + | let Amount = pmt.amount | |
100 | + | let maximum_payout_factor = 18 | |
101 | + | let Counter = split(attachment, "_")[0] | |
102 | + | let CheckTotalFundsAddedInCounter = valueOrErrorMessage(getInteger(addressFromStringValue(user_balance_address), ("Total_Funds_Added_In_Option_Order_" + Counter)), (("Counter ID: " + Counter) + " Not Found.")) | |
103 | + | let masspayoutlimits = fraction(CheckTotalFundsAddedInCounter, maximum_payout_factor, 10) | |
97 | 104 | if ((i.caller != masstransfer_whitelisted_address)) | |
98 | 105 | then throw((("Not an Admin only " + toString(masstransfer_whitelisted_address)) + " can sign it.")) | |
99 | 106 | else if (isDefined(pmt.assetId)) | |
100 | 107 | then throw("Only Waves is allowed to Attach as payment.") | |
101 | 108 | else if (!(validateMassTransferArguments(recipients, amounts, paymentIdx, i.payments))) | |
102 | 109 | then throw("Invalid arguments") | |
103 | - | else { | |
104 | - | let recipientsSize = size(recipients) | |
105 | - | func scriptTransfersGenerator (accum,next) = { | |
106 | - | let $t029462978 = accum | |
107 | - | let scriptTransfers = $t029462978._1 | |
108 | - | let j = $t029462978._2 | |
109 | - | if ((j >= recipientsSize)) | |
110 | - | then $Tuple2(scriptTransfers, (j + 1)) | |
111 | - | else $Tuple2((scriptTransfers :+ ScriptTransfer(addressFromStringValue(recipients[j]), next, i.payments[paymentIdx[j]].assetId)), (j + 1)) | |
110 | + | else if ((Amount > CheckTotalFundsAddedInCounter)) | |
111 | + | then throw((("Attached Payment Amount is exceeding more than Maximum Eligible Limit of " + toString(masspayoutlimits)) + " Wavelets.")) | |
112 | + | else { | |
113 | + | let recipientsSize = size(recipients) | |
114 | + | func scriptTransfersGenerator (accum,next) = { | |
115 | + | let $t036603692 = accum | |
116 | + | let scriptTransfers = $t036603692._1 | |
117 | + | let j = $t036603692._2 | |
118 | + | if ((j >= recipientsSize)) | |
119 | + | then $Tuple2(scriptTransfers, (j + 1)) | |
120 | + | else $Tuple2((scriptTransfers :+ ScriptTransfer(addressFromStringValue(recipients[j]), next, i.payments[paymentIdx[j]].assetId)), (j + 1)) | |
121 | + | } | |
122 | + | ||
123 | + | let result = { | |
124 | + | let $l = amounts | |
125 | + | let $s = size($l) | |
126 | + | let $acc0 = $Tuple2(nil, 0) | |
127 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
128 | + | then $a | |
129 | + | else scriptTransfersGenerator($a, $l[$i]) | |
130 | + | ||
131 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
132 | + | then $a | |
133 | + | else throw("List size exceeds 100") | |
134 | + | ||
135 | + | $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) | |
136 | + | } | |
137 | + | $Tuple2((result._1 ++ [IntegerEntry((Counter + "_Total_Winners"), recipientsSize)]), unit) | |
112 | 138 | } | |
113 | - | ||
114 | - | let result = { | |
115 | - | let $l = amounts | |
116 | - | let $s = size($l) | |
117 | - | let $acc0 = $Tuple2(nil, 0) | |
118 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
119 | - | then $a | |
120 | - | else scriptTransfersGenerator($a, $l[$i]) | |
121 | - | ||
122 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
123 | - | then $a | |
124 | - | else throw("List size exceeds 100") | |
125 | - | ||
126 | - | $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) | |
127 | - | } | |
128 | - | $Tuple2(result._1, unit) | |
129 | - | } | |
130 | 139 | } | |
131 | 140 | ||
132 | 141 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let user_balance_address = "3N1s2w4NHgbrXxNZXH9RtaVT9ptHRJcgSp2" | |
5 | + | ||
4 | 6 | let lp_address_pubkey = base58'EXLfxKmqhQPiProBaoPatTentUSZX5Dd8A8bYDcmfNwt' | |
5 | 7 | ||
6 | 8 | let masstransfer_whitelisted_address = addressFromPublicKey(lp_address_pubkey) | |
7 | 9 | ||
8 | 10 | let lp_depositor_address = base58'BY8Zzs9J1T1DuiWMW4QKgbVAC99HYARVSxV4gd8fN7A' | |
9 | 11 | ||
10 | 12 | let lp_whitelist_address = addressFromPublicKey(lp_depositor_address) | |
11 | 13 | ||
12 | 14 | let network_fee = 500000 | |
13 | 15 | ||
14 | 16 | func validateMassTransferArguments (recipients,amounts,paymentIdx,payments) = { | |
15 | 17 | let recipientsSize = size(recipients) | |
16 | 18 | let amountsSize = size(amounts) | |
17 | 19 | let paymentIdxSize = size(paymentIdx) | |
18 | 20 | let paymentsSize = size(payments) | |
19 | 21 | let minAmount = min(amounts) | |
20 | 22 | let minPaymentIdx = min(paymentIdx) | |
21 | 23 | let maxPaymentIdx = max(paymentIdx) | |
22 | 24 | func paymentsValidator (paymentAccum,nextPayment) = { | |
23 | - | let $ | |
24 | - | let validPayments = $ | |
25 | - | let j = $ | |
25 | + | let $t014901527 = paymentAccum | |
26 | + | let validPayments = $t014901527._1 | |
27 | + | let j = $t014901527._2 | |
26 | 28 | if ((j >= paymentsSize)) | |
27 | 29 | then $Tuple2(validPayments, (j + 1)) | |
28 | 30 | else { | |
29 | 31 | func amountsAggregator (amountAccum,nextAmount) = { | |
30 | - | let $ | |
31 | - | let amount = $ | |
32 | - | let k = $ | |
32 | + | let $t016821711 = amountAccum | |
33 | + | let amount = $t016821711._1 | |
34 | + | let k = $t016821711._2 | |
33 | 35 | if (if ((k >= recipientsSize)) | |
34 | 36 | then true | |
35 | 37 | else (paymentIdx[k] != j)) | |
36 | 38 | then $Tuple2(amount, (k + 1)) | |
37 | 39 | else $Tuple2((amount + nextAmount), (k + 1)) | |
38 | 40 | } | |
39 | 41 | ||
40 | 42 | let aggregatedAmount = { | |
41 | 43 | let $l = amounts | |
42 | 44 | let $s = size($l) | |
43 | 45 | let $acc0 = $Tuple2(0, 0) | |
44 | 46 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
45 | 47 | then $a | |
46 | 48 | else amountsAggregator($a, $l[$i]) | |
47 | 49 | ||
48 | 50 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
49 | 51 | then $a | |
50 | 52 | else throw("List size exceeds 100") | |
51 | 53 | ||
52 | 54 | $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) | |
53 | 55 | } | |
54 | 56 | if ((aggregatedAmount._1 == nextPayment.amount)) | |
55 | 57 | then $Tuple2((validPayments + 1), (j + 1)) | |
56 | 58 | else $Tuple2(validPayments, (j + 1)) | |
57 | 59 | } | |
58 | 60 | } | |
59 | 61 | ||
60 | 62 | let paymentsValidation = { | |
61 | 63 | let $l = payments | |
62 | 64 | let $s = size($l) | |
63 | 65 | let $acc0 = $Tuple2(0, 0) | |
64 | 66 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
65 | 67 | then $a | |
66 | 68 | else paymentsValidator($a, $l[$i]) | |
67 | 69 | ||
68 | 70 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
69 | 71 | then $a | |
70 | 72 | else throw("List size exceeds 10") | |
71 | 73 | ||
72 | 74 | $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) | |
73 | 75 | } | |
74 | 76 | if (if (if (if (if (if (if (if ((recipientsSize == amountsSize)) | |
75 | 77 | then (recipientsSize == paymentIdxSize) | |
76 | 78 | else false) | |
77 | 79 | then (recipientsSize > 0) | |
78 | 80 | else false) | |
79 | 81 | then (100 >= recipientsSize) | |
80 | 82 | else false) | |
81 | 83 | then (paymentsSize > 0) | |
82 | 84 | else false) | |
83 | 85 | then (minAmount > 0) | |
84 | 86 | else false) | |
85 | 87 | then (minPaymentIdx == 0) | |
86 | 88 | else false) | |
87 | 89 | then (maxPaymentIdx == (paymentsSize - 1)) | |
88 | 90 | else false) | |
89 | 91 | then (paymentsValidation._1 == paymentsSize) | |
90 | 92 | else false | |
91 | 93 | } | |
92 | 94 | ||
93 | 95 | ||
94 | 96 | @Callable(i) | |
95 | 97 | func massTransfer (recipients,amounts,paymentIdx,attachment) = { | |
96 | 98 | let pmt = value(i.payments[0]) | |
99 | + | let Amount = pmt.amount | |
100 | + | let maximum_payout_factor = 18 | |
101 | + | let Counter = split(attachment, "_")[0] | |
102 | + | let CheckTotalFundsAddedInCounter = valueOrErrorMessage(getInteger(addressFromStringValue(user_balance_address), ("Total_Funds_Added_In_Option_Order_" + Counter)), (("Counter ID: " + Counter) + " Not Found.")) | |
103 | + | let masspayoutlimits = fraction(CheckTotalFundsAddedInCounter, maximum_payout_factor, 10) | |
97 | 104 | if ((i.caller != masstransfer_whitelisted_address)) | |
98 | 105 | then throw((("Not an Admin only " + toString(masstransfer_whitelisted_address)) + " can sign it.")) | |
99 | 106 | else if (isDefined(pmt.assetId)) | |
100 | 107 | then throw("Only Waves is allowed to Attach as payment.") | |
101 | 108 | else if (!(validateMassTransferArguments(recipients, amounts, paymentIdx, i.payments))) | |
102 | 109 | then throw("Invalid arguments") | |
103 | - | else { | |
104 | - | let recipientsSize = size(recipients) | |
105 | - | func scriptTransfersGenerator (accum,next) = { | |
106 | - | let $t029462978 = accum | |
107 | - | let scriptTransfers = $t029462978._1 | |
108 | - | let j = $t029462978._2 | |
109 | - | if ((j >= recipientsSize)) | |
110 | - | then $Tuple2(scriptTransfers, (j + 1)) | |
111 | - | else $Tuple2((scriptTransfers :+ ScriptTransfer(addressFromStringValue(recipients[j]), next, i.payments[paymentIdx[j]].assetId)), (j + 1)) | |
110 | + | else if ((Amount > CheckTotalFundsAddedInCounter)) | |
111 | + | then throw((("Attached Payment Amount is exceeding more than Maximum Eligible Limit of " + toString(masspayoutlimits)) + " Wavelets.")) | |
112 | + | else { | |
113 | + | let recipientsSize = size(recipients) | |
114 | + | func scriptTransfersGenerator (accum,next) = { | |
115 | + | let $t036603692 = accum | |
116 | + | let scriptTransfers = $t036603692._1 | |
117 | + | let j = $t036603692._2 | |
118 | + | if ((j >= recipientsSize)) | |
119 | + | then $Tuple2(scriptTransfers, (j + 1)) | |
120 | + | else $Tuple2((scriptTransfers :+ ScriptTransfer(addressFromStringValue(recipients[j]), next, i.payments[paymentIdx[j]].assetId)), (j + 1)) | |
121 | + | } | |
122 | + | ||
123 | + | let result = { | |
124 | + | let $l = amounts | |
125 | + | let $s = size($l) | |
126 | + | let $acc0 = $Tuple2(nil, 0) | |
127 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
128 | + | then $a | |
129 | + | else scriptTransfersGenerator($a, $l[$i]) | |
130 | + | ||
131 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
132 | + | then $a | |
133 | + | else throw("List size exceeds 100") | |
134 | + | ||
135 | + | $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) | |
136 | + | } | |
137 | + | $Tuple2((result._1 ++ [IntegerEntry((Counter + "_Total_Winners"), recipientsSize)]), unit) | |
112 | 138 | } | |
113 | - | ||
114 | - | let result = { | |
115 | - | let $l = amounts | |
116 | - | let $s = size($l) | |
117 | - | let $acc0 = $Tuple2(nil, 0) | |
118 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
119 | - | then $a | |
120 | - | else scriptTransfersGenerator($a, $l[$i]) | |
121 | - | ||
122 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
123 | - | then $a | |
124 | - | else throw("List size exceeds 100") | |
125 | - | ||
126 | - | $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) | |
127 | - | } | |
128 | - | $Tuple2(result._1, unit) | |
129 | - | } | |
130 | 139 | } | |
131 | 140 | ||
132 | 141 | ||
133 | 142 | ||
134 | 143 | @Callable(i) | |
135 | 144 | func AddPoolLiquidity () = { | |
136 | 145 | let calleraddress = toBase58String(i.caller.bytes) | |
137 | 146 | let pmt = if ((size(i.payments) == 1)) | |
138 | 147 | then i.payments[0] | |
139 | 148 | else throw("No payment attached, Please Attach only Whitelisted Tokens in payment[1].") | |
140 | 149 | let PreviousFundsAddedToPoolbyCompany = match getInteger(this, "Total_LP_Added") { | |
141 | 150 | case a: Int => | |
142 | 151 | a | |
143 | 152 | case _ => | |
144 | 153 | 0 | |
145 | 154 | } | |
146 | 155 | let TotalFundsAddedToPoolbyCompany = (PreviousFundsAddedToPoolbyCompany + pmt.amount) | |
147 | 156 | let PreviousPoolLiquidity = match getInteger(this, "Total_Pool_Liquidity") { | |
148 | 157 | case a: Int => | |
149 | 158 | a | |
150 | 159 | case _ => | |
151 | 160 | 0 | |
152 | 161 | } | |
153 | 162 | let TotalPoolLiquidity = (PreviousPoolLiquidity + pmt.amount) | |
154 | 163 | let PreviousLPDepositCounter = match getInteger(this, "LP_Deposit_Counter") { | |
155 | 164 | case a: Int => | |
156 | 165 | a | |
157 | 166 | case _ => | |
158 | 167 | 0 | |
159 | 168 | } | |
160 | 169 | let TotalLPDepositCounter = (PreviousLPDepositCounter + 1) | |
161 | 170 | if ((i.caller != lp_whitelist_address)) | |
162 | 171 | then throw((("This Address is not Authorized. Only " + toString(lp_whitelist_address)) + " is Authorized Address to Sign it.")) | |
163 | 172 | else if (isDefined(pmt.assetId)) | |
164 | 173 | then throw("Only WAVES is allowed to deposit at the moment") | |
165 | 174 | else [IntegerEntry("Total_Pool_Liquidity", TotalPoolLiquidity), IntegerEntry("LP_Deposit_Counter", TotalLPDepositCounter), IntegerEntry("Total_LP_Added", TotalFundsAddedToPoolbyCompany)] | |
166 | 175 | } | |
167 | 176 | ||
168 | 177 | ||
169 | 178 | ||
170 | 179 | @Callable(i) | |
171 | 180 | func UpdateLPBalance (PaidMassTransferAmount) = { | |
172 | 181 | let read_account_balance = wavesBalance(this).regular | |
173 | 182 | let read_total_pool_liquidity = valueOrErrorMessage(getInteger(this, "Total_Pool_Liquidity"), "No Initial Pool Liquidity was Found.") | |
174 | 183 | let received_order_amount = ((read_account_balance - read_total_pool_liquidity) - network_fee) | |
175 | 184 | let updated_pool_balance = ((read_total_pool_liquidity - PaidMassTransferAmount) + received_order_amount) | |
176 | 185 | let PreviousMassTransferCounter = match getInteger(this, "Mass_Transfer_Counter") { | |
177 | 186 | case a: Int => | |
178 | 187 | a | |
179 | 188 | case _ => | |
180 | 189 | 0 | |
181 | 190 | } | |
182 | 191 | let TotalMassTransferCounter = (PreviousMassTransferCounter + 1) | |
183 | 192 | let PreviousMassTransferSend = match getInteger(this, "Total_Mass_Transfer_Send") { | |
184 | 193 | case a: Int => | |
185 | 194 | a | |
186 | 195 | case _ => | |
187 | 196 | 0 | |
188 | 197 | } | |
189 | 198 | let TotalMassTransferSend = (PreviousMassTransferSend + PaidMassTransferAmount) | |
190 | 199 | if ((i.caller != masstransfer_whitelisted_address)) | |
191 | 200 | then throw((("This Address is not Authorized. Only " + toString(masstransfer_whitelisted_address)) + " is Authorized Address to Sign it.")) | |
192 | 201 | else if ((PaidMassTransferAmount > read_total_pool_liquidity)) | |
193 | 202 | then throw("Placed Mass Transfer Amount Size is more than Total Pool Liquidity.") | |
194 | 203 | else [IntegerEntry("Total_Pool_Liquidity", updated_pool_balance), IntegerEntry("Mass_Transfer_Counter", TotalMassTransferCounter), IntegerEntry("Total_Mass_Transfer_Send", TotalMassTransferSend), IntegerEntry((toString(TotalMassTransferCounter) + "_Mass_Transfer_Send"), PaidMassTransferAmount), ScriptTransfer(masstransfer_whitelisted_address, PaidMassTransferAmount, unit), ScriptTransfer(masstransfer_whitelisted_address, network_fee, unit)] | |
195 | 204 | } | |
196 | 205 | ||
197 | 206 | ||
198 | 207 | ||
199 | 208 | @Callable(i) | |
200 | 209 | func WithdrawLPBalance (WithdrawAmount) = { | |
201 | 210 | let read_total_pool_liquidity = valueOrErrorMessage(getInteger(this, "Total_Pool_Liquidity"), "No Initial Pool Liquidity was Found.") | |
202 | 211 | let updated_pool_balance = (read_total_pool_liquidity - WithdrawAmount) | |
203 | 212 | let PreviousLPWithdrawCounter = match getInteger(this, "LP_Withdraw_Counter") { | |
204 | 213 | case a: Int => | |
205 | 214 | a | |
206 | 215 | case _ => | |
207 | 216 | 0 | |
208 | 217 | } | |
209 | 218 | let TotalLPWithdrawCounter = (PreviousLPWithdrawCounter + 1) | |
210 | 219 | let PreviousLPWithdraw = match getInteger(this, "Total_LP_Withdraw") { | |
211 | 220 | case a: Int => | |
212 | 221 | a | |
213 | 222 | case _ => | |
214 | 223 | 0 | |
215 | 224 | } | |
216 | 225 | let TotalLPWithdraw = (PreviousLPWithdraw + WithdrawAmount) | |
217 | 226 | if ((i.caller != lp_whitelist_address)) | |
218 | 227 | then throw((("This Address is not Authorized. Only " + toString(lp_whitelist_address)) + " is Authorized Address to Sign it.")) | |
219 | 228 | else if ((WithdrawAmount > read_total_pool_liquidity)) | |
220 | 229 | then throw("Placed Withdraw Amount Size is more than Total Pool Liquidity.") | |
221 | 230 | else [IntegerEntry("Total_Pool_Liquidity", updated_pool_balance), IntegerEntry("LP_Withdraw_Counter", TotalLPWithdrawCounter), IntegerEntry("Total_LP_Withdraw", TotalLPWithdraw), IntegerEntry((toString(TotalLPWithdrawCounter) + "_LP_Withdraw"), WithdrawAmount), ScriptTransfer(lp_whitelist_address, WithdrawAmount, unit)] | |
222 | 231 | } | |
223 | 232 | ||
224 | 233 | ||
225 | 234 | @Verifier(tx) | |
226 | 235 | func verify () = match tx { | |
227 | 236 | case t: Order|ExchangeTransaction|TransferTransaction => | |
228 | 237 | false | |
229 | 238 | case _ => | |
230 | 239 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
231 | 240 | } | |
232 | 241 |
github/deemru/w8io/026f985 61.28 ms ◑