tx · 4RnAu3PyDznDa5hPyFHtHwWNYyjRT19CqqLWcAaZHdc6 3P8eeDzUnoDNbQjW617pAe76cEUDQsP1m1V: -0.02000000 Waves 2024.04.18 19:53 [4134448] smart account 3P8eeDzUnoDNbQjW617pAe76cEUDQsP1m1V > SELF 0.00000000 Waves
{ "type": 13, "id": "4RnAu3PyDznDa5hPyFHtHwWNYyjRT19CqqLWcAaZHdc6", "fee": 2000000, "feeAssetId": null, "timestamp": 1713459184843, "version": 2, "chainId": 87, "sender": "3P8eeDzUnoDNbQjW617pAe76cEUDQsP1m1V", "senderPublicKey": "Hkj3ckU9a63dXcAMBHssA9LjpfnkrpkzdoF2TvqWXst3", "proofs": [ "2CyfyEwu2beeqjfniQ4hjjSaxVMx9iSW7U78YrrdaW3doXYvc161Bx1W3NENyFsYoMwhe7XaSsTbZ2BkCvreKN9" ], "script": "base64:BgIcCAISBAoCCAESAwoBCBIDCgEIEgMKAQgSAwoBCAcABWhvdXJzABgAB21pbnV0ZXMAPAENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAEMdHJ5R2V0U3RyaW5nAQNrZXkEByRtYXRjaDAJAJ0IAgUEdGhpcwUDa2V5AwkAAQIFByRtYXRjaDACBlN0cmluZwQBYgUHJG1hdGNoMAUBYgIAAQ5nZXRBc3NldFN0cmluZwEHYXNzZXRJZAQHJG1hdGNoMAUHYXNzZXRJZAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAFiBQckbWF0Y2gwCQDYBAEFAWICBVdBVkVTAQ1nZXRBc3NldEJ5dGVzAQphc3NldElkU3RyAwkAAAIFCmFzc2V0SWRTdHICBVdBVkVTBQR1bml0CQDZBAEFCmFzc2V0SWRTdHIBEXBheUJvb3N0aW5nUmVzdWx0AQpib29zdGluZ0lkBApsYXN0SGVpZ2h0CQENdHJ5R2V0SW50ZWdlc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U8QL64uvph Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let li = ["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", "55", "56"] | |
5 | - | ||
6 | 4 | let hours = 24 | |
7 | 5 | ||
8 | 6 | let minutes = 60 | |
45 | 43 | then { | |
46 | 44 | let blockReward = (tryGetInteger((("boosting_" + boostingId) + "_totalAmount")) / ((tryGetInteger((("boosting_" + boostingId) + "_days")) * hours) * minutes)) | |
47 | 45 | let toPay = fraction((min([finishHeight, height]) - lastHeight), blockReward, 1) | |
48 | - | let getFinishedPoolId = tryGetString((("boosting_" + boostingId) + "_poolId")) | |
49 | - | let getPoolBoostings = tryGetString((("pool_" + getFinishedPoolId) + "_boostings")) | |
50 | - | let sizeStr = size(getPoolBoostings) | |
51 | - | let findIndex = value(indexOf(getPoolBoostings, boostingId)) | |
52 | - | let modifierLeft = if ((findIndex == 0)) | |
53 | - | then 0 | |
54 | - | else 1 | |
55 | - | let modifierRight = if ((findIndex == 0)) | |
56 | - | then 2 | |
57 | - | else 1 | |
58 | - | let leftStr = take(getPoolBoostings, (sizeStr - ((sizeStr - findIndex) + modifierLeft))) | |
59 | - | let rightStr = takeRight(getPoolBoostings, (sizeStr - (findIndex + modifierRight))) | |
60 | - | let openBoostingsIds = (leftStr + rightStr) | |
61 | - | [IntegerEntry((("boosting_" + boostingId) + "_lastHeight"), height), ScriptTransfer(addressFromStringValue(tryGetString((("boosting_" + boostingId) + "_poolId"))), toPay, getAssetBytes(tryGetString((("boosting_" + boostingId) + "_assetId")))), StringEntry((("pool_" + getFinishedPoolId) + "_boostings"), if ((finishHeight > height)) | |
62 | - | then tryGetString((("pool_" + getFinishedPoolId) + "_boostings")) | |
63 | - | else openBoostingsIds)] | |
46 | + | [IntegerEntry((("boosting_" + boostingId) + "_lastHeight"), height), ScriptTransfer(addressFromStringValue(tryGetString((("boosting_" + boostingId) + "_poolId"))), toPay, getAssetBytes(tryGetString((("boosting_" + boostingId) + "_assetId"))))] | |
64 | 47 | } | |
65 | 48 | else nil | |
66 | 49 | } | |
67 | 50 | ||
68 | 51 | ||
69 | - | func endedBoostingIds (boostingId) = { | |
70 | - | let lastHeight = tryGetInteger((("boosting_" + boostingId) + "_lastHeight")) | |
71 | - | let finishHeight = tryGetInteger((("boosting_" + boostingId) + "_finishHeight")) | |
72 | - | if ((lastHeight >= finishHeight)) | |
73 | - | then [StringEntry((("list ended " + toString(height)) + " boostingIds"), ((tryGetString((("list ended " + toString(height)) + " boostingIds")) + boostingId) + ","))] | |
74 | - | else [StringEntry((("list ongoing boosts " + toString(height)) + " boostingIds"), ((tryGetString((("list ongoing boosts " + toString(height)) + " boostingIds")) + boostingId) + ","))] | |
52 | + | @Callable(i) | |
53 | + | func addBoosting (poolId,days) = { | |
54 | + | let fullAmount = i.payments[0].amount | |
55 | + | if ((1 > days)) | |
56 | + | then throw("amount of days has to be between 1 and 365") | |
57 | + | else if ((days > 365)) | |
58 | + | then throw("amount of days has to be between 1 and 365") | |
59 | + | else if ((1440 > (fullAmount / days))) | |
60 | + | then throw((("boosting amount too small, minimum is " + toString((1440 * days))) + " of the smallest unit of payment asset")) | |
61 | + | else if ((addressFromString(poolId) == unit)) | |
62 | + | then throw("incorrect pool address") | |
63 | + | else { | |
64 | + | let assetId = getAssetString(i.payments[0].assetId) | |
65 | + | let poolBoostings = split(tryGetString((("pool_" + poolId) + "_boostings")), ",") | |
66 | + | let boostingId = toBase58String(i.transactionId) | |
67 | + | [IntegerEntry((("boosting_" + boostingId) + "_days"), days), IntegerEntry((("boosting_" + boostingId) + "_totalAmount"), fullAmount), IntegerEntry((("boosting_" + boostingId) + "_dailyAmount"), (fullAmount / days)), IntegerEntry((("boosting_" + boostingId) + "_startHeight"), height), IntegerEntry((("boosting_" + boostingId) + "_finishHeight"), (height + ((days * hours) * minutes))), IntegerEntry((("boosting_" + boostingId) + "_finishTimestamp"), (lastBlock.timestamp + ((((days * hours) * minutes) * 60) * 1000))), IntegerEntry((("boosting_" + boostingId) + "_lastHeight"), height), StringEntry((("boosting_" + boostingId) + "_assetId"), assetId), StringEntry((("boosting_" + boostingId) + "_owner"), toString(i.caller)), StringEntry((("boosting_" + boostingId) + "_poolId"), poolId), StringEntry((("pool_" + poolId) + "_boostings"), tryGetString((((("pool_" + poolId) + "_boostings") + boostingId) + ",")))] | |
68 | + | } | |
75 | 69 | } | |
76 | 70 | ||
77 | 71 | ||
72 | + | ||
78 | 73 | @Callable(i) | |
79 | - | func addBoosting (poolId,days) = if ((1 > days)) | |
80 | - | then throw("amount of days has to be between 1 and 365") | |
81 | - | else if ((days > 365)) | |
82 | - | then throw("amount of days has to be between 1 and 365") | |
83 | - | else if (false) | |
84 | - | then throw("under maintenance until further notice") | |
85 | - | else { | |
86 | - | let fullAmount = i.payments[0].amount | |
87 | - | if ((1440 > (fullAmount / days))) | |
88 | - | then throw((("boosting amount too small, minimum is " + toString((1440 * days))) + " of the smallest unit of payment asset")) | |
89 | - | else { | |
90 | - | let assetId = getAssetString(i.payments[0].assetId) | |
91 | - | if ((height == tryGetInteger("height"))) | |
92 | - | then throw("wait 1 minute") | |
93 | - | else { | |
94 | - | let entry = if ((size(tryGetString((("pool_" + poolId) + "_boostings"))) > 11)) | |
95 | - | then throw("max 5 boosts per pool") | |
96 | - | else invoke(this, "entryEnded", nil, nil) | |
97 | - | if ((entry == entry)) | |
98 | - | then { | |
99 | - | let boostingId = if ((size((("list ongoing boosts " + toString(height)) + " boostingIds")) > 112)) | |
100 | - | then throw("wait till other boosts are finished") | |
101 | - | else take(tryGetString((("list ended " + toString(height)) + " boostingIds")), 1) | |
102 | - | if ((addressFromString(poolId) == unit)) | |
103 | - | then throw("incorrect pool address") | |
104 | - | else [IntegerEntry((("boosting_" + boostingId) + "_days"), days), IntegerEntry((("boosting_" + boostingId) + "_totalAmount"), fullAmount), IntegerEntry((("boosting_" + boostingId) + "_dailyAmount"), (fullAmount / days)), IntegerEntry((("boosting_" + boostingId) + "_startHeight"), height), IntegerEntry((("boosting_" + boostingId) + "_finishHeight"), (height + ((days * hours) * minutes))), IntegerEntry((("boosting_" + boostingId) + "_finishTimestamp"), (lastBlock.timestamp + ((((days * hours) * minutes) * 60) * 1000))), IntegerEntry((("boosting_" + boostingId) + "_lastHeight"), height), StringEntry((("boosting_" + boostingId) + "_assetId"), assetId), StringEntry((("boosting_" + boostingId) + "_owner"), toString(i.caller)), StringEntry((("boosting_" + boostingId) + "_poolId"), poolId), StringEntry((("pool_" + poolId) + "_boostings"), ((tryGetString((("pool_" + poolId) + "_boostings")) + boostingId) + ","))] | |
105 | - | } | |
106 | - | else throw("Strict value is not equal to itself.") | |
107 | - | } | |
108 | - | } | |
109 | - | } | |
74 | + | func polishFinishedBoostings (poolId) = { | |
75 | + | func checkNextBoosting (accum,boostingId) = if ((boostingId == "")) | |
76 | + | then accum | |
77 | + | else { | |
78 | + | let finishHeight = tryGetInteger((("boosting_" + boostingId) + "_finishHeight")) | |
79 | + | if ((height > finishHeight)) | |
80 | + | then ((accum + boostingId) + ",") | |
81 | + | else accum | |
82 | + | } | |
83 | + | ||
84 | + | let currentBoostings = split_51C(tryGetString((("pool_" + poolId) + "_boostings")), ",") | |
85 | + | let newBoostings = { | |
86 | + | let $l = currentBoostings | |
87 | + | let $s = size($l) | |
88 | + | let $acc0 = "" | |
89 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
90 | + | then $a | |
91 | + | else checkNextBoosting($a, $l[$i]) | |
92 | + | ||
93 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
94 | + | then $a | |
95 | + | else throw("List size exceeds 25") | |
96 | + | ||
97 | + | $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($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) | |
98 | + | } | |
99 | + | [if ((newBoostings == "")) | |
100 | + | then DeleteEntry((("pool_" + poolId) + "_boostings")) | |
101 | + | else StringEntry((("pool_" + poolId) + "_boostings"), newBoostings)] | |
102 | + | } | |
110 | 103 | ||
111 | 104 | ||
112 | 105 | ||
116 | 109 | ||
117 | 110 | ||
118 | 111 | @Callable(i) | |
119 | - | func payBoostings () = { | |
120 | - | func f (accum,next) = { | |
121 | - | let in = invoke(this, "payBoosting", [next], nil) | |
122 | - | if ((in == in)) | |
123 | - | then in | |
124 | - | else throw("Strict value is not equal to itself.") | |
125 | - | } | |
112 | + | func payPoolBoostings (poolId) = { | |
113 | + | func f (accum,boostingId) = payBoostingResult(boostingId) | |
126 | 114 | ||
115 | + | let boostings = split_51C(tryGetString((("pool_" + poolId) + "_boostings")), ",") | |
127 | 116 | let payments = { | |
128 | - | let $l = | |
117 | + | let $l = boostings | |
129 | 118 | let $s = size($l) | |
130 | 119 | let $acc0 = 0 | |
131 | 120 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
134 | 123 | ||
135 | 124 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
136 | 125 | then $a | |
137 | - | else throw("List size exceeds | |
126 | + | else throw("List size exceeds 25") | |
138 | 127 | ||
139 | - | $f0_2 | |
128 | + | $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($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) | |
140 | 129 | } | |
141 | 130 | if ((payments == payments)) | |
142 | - | then nil | |
131 | + | then { | |
132 | + | let inv = invoke(this, "polishFinishedBoostings", [poolId], nil) | |
133 | + | if ((inv == inv)) | |
134 | + | then nil | |
135 | + | else throw("Strict value is not equal to itself.") | |
136 | + | } | |
143 | 137 | else throw("Strict value is not equal to itself.") | |
144 | 138 | } | |
145 | 139 | ||
146 | 140 | ||
147 | 141 | ||
148 | 142 | @Callable(i) | |
149 | - | func endedBoostings (boostingId) = endedBoostingIds(boostingId) | |
150 | - | ||
151 | - | ||
152 | - | ||
153 | - | @Callable(i) | |
154 | - | func entryEnded () = { | |
155 | - | func f (accum,next) = { | |
156 | - | let in = invoke(this, "endedBoostings", [next], nil) | |
143 | + | func payBoostings (poolIds) = { | |
144 | + | func f (accum,poolId) = { | |
145 | + | let in = invoke(this, "payPoolBoostings", [poolId], nil) | |
157 | 146 | if ((in == in)) | |
158 | - | then | |
147 | + | then 0 | |
159 | 148 | else throw("Strict value is not equal to itself.") | |
160 | 149 | } | |
161 | 150 | ||
162 | - | let | |
163 | - | let $l = | |
151 | + | let invokes = { | |
152 | + | let $l = split_51C(poolIds, ",") | |
164 | 153 | let $s = size($l) | |
165 | 154 | let $acc0 = 0 | |
166 | 155 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
169 | 158 | ||
170 | 159 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
171 | 160 | then $a | |
172 | - | else throw("List size exceeds | |
161 | + | else throw("List size exceeds 25") | |
173 | 162 | ||
174 | - | $f0_2 | |
163 | + | $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($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) | |
175 | 164 | } | |
176 | - | if (( | |
177 | - | then | |
165 | + | if ((invokes == invokes)) | |
166 | + | then nil | |
178 | 167 | else throw("Strict value is not equal to itself.") | |
179 | 168 | } | |
180 | 169 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let li = ["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", "55", "56"] | |
5 | - | ||
6 | 4 | let hours = 24 | |
7 | 5 | ||
8 | 6 | let minutes = 60 | |
9 | 7 | ||
10 | 8 | func tryGetInteger (key) = match getInteger(this, key) { | |
11 | 9 | case b: Int => | |
12 | 10 | b | |
13 | 11 | case _ => | |
14 | 12 | 0 | |
15 | 13 | } | |
16 | 14 | ||
17 | 15 | ||
18 | 16 | func tryGetString (key) = match getString(this, key) { | |
19 | 17 | case b: String => | |
20 | 18 | b | |
21 | 19 | case _ => | |
22 | 20 | "" | |
23 | 21 | } | |
24 | 22 | ||
25 | 23 | ||
26 | 24 | func getAssetString (assetId) = match assetId { | |
27 | 25 | case b: ByteVector => | |
28 | 26 | toBase58String(b) | |
29 | 27 | case _ => | |
30 | 28 | "WAVES" | |
31 | 29 | } | |
32 | 30 | ||
33 | 31 | ||
34 | 32 | func getAssetBytes (assetIdStr) = if ((assetIdStr == "WAVES")) | |
35 | 33 | then unit | |
36 | 34 | else fromBase58String(assetIdStr) | |
37 | 35 | ||
38 | 36 | ||
39 | 37 | func payBoostingResult (boostingId) = { | |
40 | 38 | let lastHeight = tryGetInteger((("boosting_" + boostingId) + "_lastHeight")) | |
41 | 39 | let finishHeight = tryGetInteger((("boosting_" + boostingId) + "_finishHeight")) | |
42 | 40 | if (if ((lastHeight != 0)) | |
43 | 41 | then (finishHeight > lastHeight) | |
44 | 42 | else false) | |
45 | 43 | then { | |
46 | 44 | let blockReward = (tryGetInteger((("boosting_" + boostingId) + "_totalAmount")) / ((tryGetInteger((("boosting_" + boostingId) + "_days")) * hours) * minutes)) | |
47 | 45 | let toPay = fraction((min([finishHeight, height]) - lastHeight), blockReward, 1) | |
48 | - | let getFinishedPoolId = tryGetString((("boosting_" + boostingId) + "_poolId")) | |
49 | - | let getPoolBoostings = tryGetString((("pool_" + getFinishedPoolId) + "_boostings")) | |
50 | - | let sizeStr = size(getPoolBoostings) | |
51 | - | let findIndex = value(indexOf(getPoolBoostings, boostingId)) | |
52 | - | let modifierLeft = if ((findIndex == 0)) | |
53 | - | then 0 | |
54 | - | else 1 | |
55 | - | let modifierRight = if ((findIndex == 0)) | |
56 | - | then 2 | |
57 | - | else 1 | |
58 | - | let leftStr = take(getPoolBoostings, (sizeStr - ((sizeStr - findIndex) + modifierLeft))) | |
59 | - | let rightStr = takeRight(getPoolBoostings, (sizeStr - (findIndex + modifierRight))) | |
60 | - | let openBoostingsIds = (leftStr + rightStr) | |
61 | - | [IntegerEntry((("boosting_" + boostingId) + "_lastHeight"), height), ScriptTransfer(addressFromStringValue(tryGetString((("boosting_" + boostingId) + "_poolId"))), toPay, getAssetBytes(tryGetString((("boosting_" + boostingId) + "_assetId")))), StringEntry((("pool_" + getFinishedPoolId) + "_boostings"), if ((finishHeight > height)) | |
62 | - | then tryGetString((("pool_" + getFinishedPoolId) + "_boostings")) | |
63 | - | else openBoostingsIds)] | |
46 | + | [IntegerEntry((("boosting_" + boostingId) + "_lastHeight"), height), ScriptTransfer(addressFromStringValue(tryGetString((("boosting_" + boostingId) + "_poolId"))), toPay, getAssetBytes(tryGetString((("boosting_" + boostingId) + "_assetId"))))] | |
64 | 47 | } | |
65 | 48 | else nil | |
66 | 49 | } | |
67 | 50 | ||
68 | 51 | ||
69 | - | func endedBoostingIds (boostingId) = { | |
70 | - | let lastHeight = tryGetInteger((("boosting_" + boostingId) + "_lastHeight")) | |
71 | - | let finishHeight = tryGetInteger((("boosting_" + boostingId) + "_finishHeight")) | |
72 | - | if ((lastHeight >= finishHeight)) | |
73 | - | then [StringEntry((("list ended " + toString(height)) + " boostingIds"), ((tryGetString((("list ended " + toString(height)) + " boostingIds")) + boostingId) + ","))] | |
74 | - | else [StringEntry((("list ongoing boosts " + toString(height)) + " boostingIds"), ((tryGetString((("list ongoing boosts " + toString(height)) + " boostingIds")) + boostingId) + ","))] | |
52 | + | @Callable(i) | |
53 | + | func addBoosting (poolId,days) = { | |
54 | + | let fullAmount = i.payments[0].amount | |
55 | + | if ((1 > days)) | |
56 | + | then throw("amount of days has to be between 1 and 365") | |
57 | + | else if ((days > 365)) | |
58 | + | then throw("amount of days has to be between 1 and 365") | |
59 | + | else if ((1440 > (fullAmount / days))) | |
60 | + | then throw((("boosting amount too small, minimum is " + toString((1440 * days))) + " of the smallest unit of payment asset")) | |
61 | + | else if ((addressFromString(poolId) == unit)) | |
62 | + | then throw("incorrect pool address") | |
63 | + | else { | |
64 | + | let assetId = getAssetString(i.payments[0].assetId) | |
65 | + | let poolBoostings = split(tryGetString((("pool_" + poolId) + "_boostings")), ",") | |
66 | + | let boostingId = toBase58String(i.transactionId) | |
67 | + | [IntegerEntry((("boosting_" + boostingId) + "_days"), days), IntegerEntry((("boosting_" + boostingId) + "_totalAmount"), fullAmount), IntegerEntry((("boosting_" + boostingId) + "_dailyAmount"), (fullAmount / days)), IntegerEntry((("boosting_" + boostingId) + "_startHeight"), height), IntegerEntry((("boosting_" + boostingId) + "_finishHeight"), (height + ((days * hours) * minutes))), IntegerEntry((("boosting_" + boostingId) + "_finishTimestamp"), (lastBlock.timestamp + ((((days * hours) * minutes) * 60) * 1000))), IntegerEntry((("boosting_" + boostingId) + "_lastHeight"), height), StringEntry((("boosting_" + boostingId) + "_assetId"), assetId), StringEntry((("boosting_" + boostingId) + "_owner"), toString(i.caller)), StringEntry((("boosting_" + boostingId) + "_poolId"), poolId), StringEntry((("pool_" + poolId) + "_boostings"), tryGetString((((("pool_" + poolId) + "_boostings") + boostingId) + ",")))] | |
68 | + | } | |
75 | 69 | } | |
76 | 70 | ||
77 | 71 | ||
72 | + | ||
78 | 73 | @Callable(i) | |
79 | - | func addBoosting (poolId,days) = if ((1 > days)) | |
80 | - | then throw("amount of days has to be between 1 and 365") | |
81 | - | else if ((days > 365)) | |
82 | - | then throw("amount of days has to be between 1 and 365") | |
83 | - | else if (false) | |
84 | - | then throw("under maintenance until further notice") | |
85 | - | else { | |
86 | - | let fullAmount = i.payments[0].amount | |
87 | - | if ((1440 > (fullAmount / days))) | |
88 | - | then throw((("boosting amount too small, minimum is " + toString((1440 * days))) + " of the smallest unit of payment asset")) | |
89 | - | else { | |
90 | - | let assetId = getAssetString(i.payments[0].assetId) | |
91 | - | if ((height == tryGetInteger("height"))) | |
92 | - | then throw("wait 1 minute") | |
93 | - | else { | |
94 | - | let entry = if ((size(tryGetString((("pool_" + poolId) + "_boostings"))) > 11)) | |
95 | - | then throw("max 5 boosts per pool") | |
96 | - | else invoke(this, "entryEnded", nil, nil) | |
97 | - | if ((entry == entry)) | |
98 | - | then { | |
99 | - | let boostingId = if ((size((("list ongoing boosts " + toString(height)) + " boostingIds")) > 112)) | |
100 | - | then throw("wait till other boosts are finished") | |
101 | - | else take(tryGetString((("list ended " + toString(height)) + " boostingIds")), 1) | |
102 | - | if ((addressFromString(poolId) == unit)) | |
103 | - | then throw("incorrect pool address") | |
104 | - | else [IntegerEntry((("boosting_" + boostingId) + "_days"), days), IntegerEntry((("boosting_" + boostingId) + "_totalAmount"), fullAmount), IntegerEntry((("boosting_" + boostingId) + "_dailyAmount"), (fullAmount / days)), IntegerEntry((("boosting_" + boostingId) + "_startHeight"), height), IntegerEntry((("boosting_" + boostingId) + "_finishHeight"), (height + ((days * hours) * minutes))), IntegerEntry((("boosting_" + boostingId) + "_finishTimestamp"), (lastBlock.timestamp + ((((days * hours) * minutes) * 60) * 1000))), IntegerEntry((("boosting_" + boostingId) + "_lastHeight"), height), StringEntry((("boosting_" + boostingId) + "_assetId"), assetId), StringEntry((("boosting_" + boostingId) + "_owner"), toString(i.caller)), StringEntry((("boosting_" + boostingId) + "_poolId"), poolId), StringEntry((("pool_" + poolId) + "_boostings"), ((tryGetString((("pool_" + poolId) + "_boostings")) + boostingId) + ","))] | |
105 | - | } | |
106 | - | else throw("Strict value is not equal to itself.") | |
107 | - | } | |
108 | - | } | |
109 | - | } | |
74 | + | func polishFinishedBoostings (poolId) = { | |
75 | + | func checkNextBoosting (accum,boostingId) = if ((boostingId == "")) | |
76 | + | then accum | |
77 | + | else { | |
78 | + | let finishHeight = tryGetInteger((("boosting_" + boostingId) + "_finishHeight")) | |
79 | + | if ((height > finishHeight)) | |
80 | + | then ((accum + boostingId) + ",") | |
81 | + | else accum | |
82 | + | } | |
83 | + | ||
84 | + | let currentBoostings = split_51C(tryGetString((("pool_" + poolId) + "_boostings")), ",") | |
85 | + | let newBoostings = { | |
86 | + | let $l = currentBoostings | |
87 | + | let $s = size($l) | |
88 | + | let $acc0 = "" | |
89 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
90 | + | then $a | |
91 | + | else checkNextBoosting($a, $l[$i]) | |
92 | + | ||
93 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
94 | + | then $a | |
95 | + | else throw("List size exceeds 25") | |
96 | + | ||
97 | + | $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($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) | |
98 | + | } | |
99 | + | [if ((newBoostings == "")) | |
100 | + | then DeleteEntry((("pool_" + poolId) + "_boostings")) | |
101 | + | else StringEntry((("pool_" + poolId) + "_boostings"), newBoostings)] | |
102 | + | } | |
110 | 103 | ||
111 | 104 | ||
112 | 105 | ||
113 | 106 | @Callable(i) | |
114 | 107 | func payBoosting (boostingId) = payBoostingResult(boostingId) | |
115 | 108 | ||
116 | 109 | ||
117 | 110 | ||
118 | 111 | @Callable(i) | |
119 | - | func payBoostings () = { | |
120 | - | func f (accum,next) = { | |
121 | - | let in = invoke(this, "payBoosting", [next], nil) | |
122 | - | if ((in == in)) | |
123 | - | then in | |
124 | - | else throw("Strict value is not equal to itself.") | |
125 | - | } | |
112 | + | func payPoolBoostings (poolId) = { | |
113 | + | func f (accum,boostingId) = payBoostingResult(boostingId) | |
126 | 114 | ||
115 | + | let boostings = split_51C(tryGetString((("pool_" + poolId) + "_boostings")), ",") | |
127 | 116 | let payments = { | |
128 | - | let $l = | |
117 | + | let $l = boostings | |
129 | 118 | let $s = size($l) | |
130 | 119 | let $acc0 = 0 | |
131 | 120 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
132 | 121 | then $a | |
133 | 122 | else f($a, $l[$i]) | |
134 | 123 | ||
135 | 124 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
136 | 125 | then $a | |
137 | - | else throw("List size exceeds | |
126 | + | else throw("List size exceeds 25") | |
138 | 127 | ||
139 | - | $f0_2 | |
128 | + | $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($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) | |
140 | 129 | } | |
141 | 130 | if ((payments == payments)) | |
142 | - | then nil | |
131 | + | then { | |
132 | + | let inv = invoke(this, "polishFinishedBoostings", [poolId], nil) | |
133 | + | if ((inv == inv)) | |
134 | + | then nil | |
135 | + | else throw("Strict value is not equal to itself.") | |
136 | + | } | |
143 | 137 | else throw("Strict value is not equal to itself.") | |
144 | 138 | } | |
145 | 139 | ||
146 | 140 | ||
147 | 141 | ||
148 | 142 | @Callable(i) | |
149 | - | func endedBoostings (boostingId) = endedBoostingIds(boostingId) | |
150 | - | ||
151 | - | ||
152 | - | ||
153 | - | @Callable(i) | |
154 | - | func entryEnded () = { | |
155 | - | func f (accum,next) = { | |
156 | - | let in = invoke(this, "endedBoostings", [next], nil) | |
143 | + | func payBoostings (poolIds) = { | |
144 | + | func f (accum,poolId) = { | |
145 | + | let in = invoke(this, "payPoolBoostings", [poolId], nil) | |
157 | 146 | if ((in == in)) | |
158 | - | then | |
147 | + | then 0 | |
159 | 148 | else throw("Strict value is not equal to itself.") | |
160 | 149 | } | |
161 | 150 | ||
162 | - | let | |
163 | - | let $l = | |
151 | + | let invokes = { | |
152 | + | let $l = split_51C(poolIds, ",") | |
164 | 153 | let $s = size($l) | |
165 | 154 | let $acc0 = 0 | |
166 | 155 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
167 | 156 | then $a | |
168 | 157 | else f($a, $l[$i]) | |
169 | 158 | ||
170 | 159 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
171 | 160 | then $a | |
172 | - | else throw("List size exceeds | |
161 | + | else throw("List size exceeds 25") | |
173 | 162 | ||
174 | - | $f0_2 | |
163 | + | $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($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) | |
175 | 164 | } | |
176 | - | if (( | |
177 | - | then | |
165 | + | if ((invokes == invokes)) | |
166 | + | then nil | |
178 | 167 | else throw("Strict value is not equal to itself.") | |
179 | 168 | } | |
180 | 169 | ||
181 | 170 |
github/deemru/w8io/6500d08 57.00 ms ◑