tx · 2tnMxHbUKtcAaDsNtSNRSRKPmAZj21wuu57XHg4zqUC6

3N3y7nQfqDc7rBUExjKQi5ZbspWRh9q8PYH:  -0.00900000 Waves

2023.11.08 15:00 [2834350] smart account 3N3y7nQfqDc7rBUExjKQi5ZbspWRh9q8PYH > SELF 0.00000000 Waves

{ "type": 13, "id": "2tnMxHbUKtcAaDsNtSNRSRKPmAZj21wuu57XHg4zqUC6", "fee": 900000, "feeAssetId": null, "timestamp": 1699444895561, "version": 2, "chainId": 84, "sender": "3N3y7nQfqDc7rBUExjKQi5ZbspWRh9q8PYH", "senderPublicKey": "9ggtmbyecVRfUY2zeZhNaoLBp2iymhnQhffXQhemTJaG", "proofs": [ "2XA6MbeDXBSF3KDt2h5k383p87xSHZMDWnhQVsB4J2ErWGe3wHp3Y3YBA9ZEdEfVZihxTJi923tRN775xRa6oHMa" ], "script": "base64:BgIgCAISBAoCCAESAwoBCBIAEgMKAQgSABIDCgEIEgMKAQgJAAJsaQkAzAgCAgExCQDMCAICATIJAMwIAgIBMwkAzAgCAgE0CQDMCAICATUJAMwIAgIBNgkAzAgCAgE3CQDMCAICATgJAMwIAgIBOQkAzAgCAgIxMAkAzAgCAgIxMQkAzAgCAgIxMgkAzAgCAgIxMwkAzAgCAgIxNAkAzAgCAgIxNQkAzAgCAgIxNgkAzAgCAgIxNwkAzAgCAgIxOAkAzAgCAgIxOQkAzAgCAgIyMAkAzAgCAgIyMQkAzAgCAgIyMgkAzAgCAgIyMwkAzAgCAgIyNAkAzAgCAgIyNQkAzAgCAgIyNgkAzAgCAgIyNwkAzAgCAgIyOAkAzAgCAgIyOQkAzAgCAgIzMAkAzAgCAgIzMQkAzAgCAgIzMgkAzAgCAgIzMwkAzAgCAgIzNAkAzAgCAgIzNQkAzAgCAgIzNgkAzAgCAgIzNwkAzAgCAgIzOAkAzAgCAgIzOQkAzAgCAgI0MAkAzAgCAgI0MQkAzAgCAgI0MgkAzAgCAgI0MwkAzAgCAgI0NAkAzAgCAgI0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4AAAAAAABBBVyZW1vdmVFbmRlZEJvb3N0aW5nSUQJAKwCAgkArwICBRBnZXRQb29sQm9vc3RpbmdzCQBlAgUHc2l6ZVN0cgkAZAIJAGUCBQdzaXplU3RyBQlmaW5kSW5kZXgFDG1vZGlmaWVyTGVmdAkAsgICBRBnZXRQb29sQm9vc3RpbmdzCQBlAgUHc2l6ZVN0cgkAZAIFCWZpbmRJbmRleAUNbW9kaWZpZXJSaWdodAkAzAgCCQELU3RyaW5nRW50cnkCAhFnZXRGaW5pc2hlZFBvb2xJZAUSZ2V0RmluaXNoZWRQb29sSWQxCQDMCAIJAQtTdHJpbmdFbnRyeQICEGdldFBvb2xCb29zdGluZ3MFEGdldFBvb2xCb29zdGluZ3MJAMwIAgkBDEludGVnZXJFbnRyeQICCWZpbmRJbmRleAUJZmluZEluZGV4CQDMCAIJAQxJbnRlZ2VyRW50cnkCAgdzaXplU3RyBQdzaXplU3RyCQDMCAIJAQtTdHJpbmdFbnRyeQICC2xlZnQgc3RyaW5nCQCvAgIFEGdldFBvb2xCb29zdGluZ3MJAGUCBQdzaXplU3RyCQBlAgUHc2l6ZVN0cgUJZmluZEluZGV4CQDMCAIJAQtTdHJpbmdFbnRyeQICDHJpZ2h0IHN0cmluZwkAsgICBRBnZXRQb29sQm9vc3RpbmdzCQBlAgUHc2l6ZVN0cgkAZAIFCWZpbmRJbmRleAUNbW9kaWZpZXJSaWdodAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJAKwCAgIFcG9vbF8FEmdldEZpbmlzaGVkUG9vbElkMQIKX2Jvb3N0aW5ncwUVcmVtb3ZlRW5kZWRCb29zdGluZ0lEBQNuaWwAYlgWAg==", "height": 2834350, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: G4rzCXizoYcp8StjzodhFN4K4XZQuLwSA845rLhbwZ8y Next: Gm1pYpHu5Wsovqg8f6Rofb5zvFQQwhBZhc6CF5eqDwJ4 Diff:
OldNewDifferences
1-{-# STDLIB_VERSION 5 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 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"]
4343 then (finishHeight > lastHeight)
4444 else false)
4545 then {
46- let blockReward = tryGetInteger((("boosting_" + boostingId) + "_blockAmount"))
47- let toPay = ((min([finishHeight, height]) - lastHeight) * blockReward)
48-[IntegerEntry((("boosting_" + boostingId) + "_lastHeight"), height), ScriptTransfer(addressFromStringValue(tryGetString((("boosting_" + boostingId) + "_poolId"))), toPay, getAssetBytes(tryGetString((("boosting_" + boostingId) + "_assetId"))))]
46+ let blockReward = (tryGetInteger((("boosting_" + boostingId) + "_totalAmount")) / ((tryGetInteger((("boosting_" + boostingId) + "_days")) * hours) * minutes))
47+ 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("getFinishedPoolId", getFinishedPoolId), StringEntry("getPoolBoostings", getPoolBoostings), IntegerEntry("findIndex", findIndex), IntegerEntry("sizeStr", sizeStr), StringEntry("left string", leftStr), StringEntry("right string", rightStr), StringEntry("openBoostingsIds", openBoostingsIds)]
4962 }
5063 else nil
5164 }
5265
5366
54-func endedBoostingResult (boostingId) = {
67+func endedBoostingIds (boostingId) = {
5568 let lastHeight = tryGetInteger((("boosting_" + boostingId) + "_lastHeight"))
5669 let finishHeight = tryGetInteger((("boosting_" + boostingId) + "_finishHeight"))
57- if (if ((lastHeight != 0))
58- then (lastHeight >= finishHeight)
59- else false)
60- then [StringEntry("list ended boostings", ((tryGetString("list ended boostings") + boostingId) + ","))]
61- else nil
70+ if ((lastHeight >= finishHeight))
71+ then [StringEntry((("list ended " + toString(height)) + " boostingIds"), ((tryGetString((("list ended " + toString(height)) + " boostingIds")) + boostingId) + ","))]
72+ else [StringEntry((("list ongoing boosts " + toString(height)) + " boostingIds"), ((tryGetString((("list ongoing boosts " + toString(height)) + " boostingIds")) + boostingId) + ","))]
6273 }
6374
6475
6576 @Callable(i)
66-func addBoosting (poolId,days) = {
67- let fullAmount = i.payments[0].amount
68- let assetId = getAssetString(i.payments[0].assetId)
69- let inv = invoke(this, "findEndedBoosting", nil, nil)
70- if ((inv == inv))
71- then {
72- let newBoostingsAmount = (tryGetInteger("global_boostingsAmount") + 1)
73- let boostingId = toString(newBoostingsAmount)
74- if ((addressFromString(poolId) == unit))
75- then throw("incorrect pool address")
76- else [IntegerEntry("global_boostingsAmount", newBoostingsAmount), IntegerEntry((("boosting_" + boostingId) + "_days"), days), IntegerEntry((("boosting_" + boostingId) + "_totalAmount"), fullAmount), IntegerEntry((("boosting_" + boostingId) + "_dailyAmount"), (fullAmount / days)), IntegerEntry((("boosting_" + boostingId) + "_blockAmount"), (fullAmount / ((days * hours) * minutes))), 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) + ","))]
77- }
78- else throw("Strict value is not equal to itself.")
79- }
77+func addBoosting (poolId,days) = if ((1 > days))
78+ then throw("amount of days has to be between 1 and 365")
79+ else if ((days > 365))
80+ then throw("amount of days has to be between 1 and 365")
81+ else if (false)
82+ then throw("under maintenance until further notice")
83+ else {
84+ let fullAmount = i.payments[0].amount
85+ if ((1440 > (fullAmount / days)))
86+ then throw((("boosting amount too small, minimum is " + toString((1440 * days))) + " of the smallest unit of payment asset"))
87+ else {
88+ let assetId = getAssetString(i.payments[0].assetId)
89+ if ((height == tryGetInteger("height")))
90+ then throw("wait 1 minute")
91+ else {
92+ let entry = if ((size(tryGetString((("pool_" + poolId) + "_boostings"))) > 11))
93+ then throw("max 5 boosts per pool")
94+ else invoke(this, "entryEnded", nil, nil)
95+ if ((entry == entry))
96+ then {
97+ let boostingId = if ((size((("list ongoing boosts " + toString(height)) + " boostingIds")) > 112))
98+ then throw("wait till other boosts are finished")
99+ else take(tryGetString((("list ended " + toString(height)) + " boostingIds")), 1)
100+ if ((addressFromString(poolId) == unit))
101+ then throw("incorrect pool address")
102+ 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) + ","))]
103+ }
104+ else throw("Strict value is not equal to itself.")
105+ }
106+ }
107+ }
80108
81109
82110
104132
105133 func $f0_2 ($a,$i) = if (($i >= $s))
106134 then $a
107- else throw("List size exceeds 100")
135+ else throw("List size exceeds 56")
108136
109- $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)
137+ $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($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)
110138 }
111139 if ((payments == payments))
112140 then nil
116144
117145
118146 @Callable(i)
119-func findEndedBoosting (boostingId) = endedBoostingResult(boostingId)
147+func endedBoostings (boostingId) = endedBoostingIds(boostingId)
120148
121149
122150
123151 @Callable(i)
124-func findEndedBoostings () = {
125- func e (accum,next) = {
126- let in = invoke(this, "findEndedBoosting", [next], nil)
152+func entryEnded () = {
153+ func f (accum,next) = {
154+ let in = invoke(this, "endedBoostings", [next], nil)
127155 if ((in == in))
128156 then in
129157 else throw("Strict value is not equal to itself.")
130158 }
131159
132- let ended = {
160+ let end = {
133161 let $l = li
134162 let $s = size($l)
135163 let $acc0 = 0
136164 func $f0_1 ($a,$i) = if (($i >= $s))
137165 then $a
138- else e($a, $l[$i])
166+ else f($a, $l[$i])
139167
140168 func $f0_2 ($a,$i) = if (($i >= $s))
141169 then $a
142- else throw("List size exceeds 100")
170+ else throw("List size exceeds 56")
143171
144- $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)
172+ $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($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)
145173 }
146- if ((ended == ended))
174+ if ((end == end))
175+ then [IntegerEntry("height", height)]
176+ else throw("Strict value is not equal to itself.")
177+ }
178+
179+
180+
181+@Callable(i)
182+func deleteEntr (poolId) = [DeleteEntry((("pool_" + poolId) + "_boostings"))]
183+
184+
185+
186+@Callable(i)
187+func checkStr (boostingId) = {
188+ let getFinishedPoolId1 = tryGetString((("boosting_" + boostingId) + "_poolId"))
189+ let getPoolBoostings = tryGetString((("pool_" + getFinishedPoolId1) + "_boostings"))
190+ let sizeStr = size(getPoolBoostings)
191+ if ((indexOf(getPoolBoostings, boostingId) == unit))
147192 then nil
148- else throw("Strict value is not equal to itself.")
193+ else {
194+ let findIndex = value(indexOf(getPoolBoostings, boostingId))
195+ let modifierRight = if ((findIndex == 0))
196+ then 2
197+ else 1
198+ let modifierLeft = if ((findIndex == 0))
199+ then 0
200+ else 1
201+ let removeEndedBoostingID = (take(getPoolBoostings, (sizeStr - ((sizeStr - findIndex) + modifierLeft))) + takeRight(getPoolBoostings, (sizeStr - (findIndex + modifierRight))))
202+[StringEntry("getFinishedPoolId", getFinishedPoolId1), StringEntry("getPoolBoostings", getPoolBoostings), IntegerEntry("findIndex", findIndex), IntegerEntry("sizeStr", sizeStr), StringEntry("left string", take(getPoolBoostings, (sizeStr - (sizeStr - findIndex)))), StringEntry("right string", takeRight(getPoolBoostings, (sizeStr - (findIndex + modifierRight)))), StringEntry((("pool_" + getFinishedPoolId1) + "_boostings"), removeEndedBoostingID)]
203+ }
149204 }
150205
151206
Full:
OldNewDifferences
1-{-# STDLIB_VERSION 5 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 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"]
55
66 let hours = 1
77
88 let minutes = 10
99
1010 func tryGetInteger (key) = match getInteger(this, key) {
1111 case b: Int =>
1212 b
1313 case _ =>
1414 0
1515 }
1616
1717
1818 func tryGetString (key) = match getString(this, key) {
1919 case b: String =>
2020 b
2121 case _ =>
2222 ""
2323 }
2424
2525
2626 func getAssetString (assetId) = match assetId {
2727 case b: ByteVector =>
2828 toBase58String(b)
2929 case _ =>
3030 "WAVES"
3131 }
3232
3333
3434 func getAssetBytes (assetIdStr) = if ((assetIdStr == "WAVES"))
3535 then unit
3636 else fromBase58String(assetIdStr)
3737
3838
3939 func payBoostingResult (boostingId) = {
4040 let lastHeight = tryGetInteger((("boosting_" + boostingId) + "_lastHeight"))
4141 let finishHeight = tryGetInteger((("boosting_" + boostingId) + "_finishHeight"))
4242 if (if ((lastHeight != 0))
4343 then (finishHeight > lastHeight)
4444 else false)
4545 then {
46- let blockReward = tryGetInteger((("boosting_" + boostingId) + "_blockAmount"))
47- let toPay = ((min([finishHeight, height]) - lastHeight) * blockReward)
48-[IntegerEntry((("boosting_" + boostingId) + "_lastHeight"), height), ScriptTransfer(addressFromStringValue(tryGetString((("boosting_" + boostingId) + "_poolId"))), toPay, getAssetBytes(tryGetString((("boosting_" + boostingId) + "_assetId"))))]
46+ let blockReward = (tryGetInteger((("boosting_" + boostingId) + "_totalAmount")) / ((tryGetInteger((("boosting_" + boostingId) + "_days")) * hours) * minutes))
47+ 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("getFinishedPoolId", getFinishedPoolId), StringEntry("getPoolBoostings", getPoolBoostings), IntegerEntry("findIndex", findIndex), IntegerEntry("sizeStr", sizeStr), StringEntry("left string", leftStr), StringEntry("right string", rightStr), StringEntry("openBoostingsIds", openBoostingsIds)]
4962 }
5063 else nil
5164 }
5265
5366
54-func endedBoostingResult (boostingId) = {
67+func endedBoostingIds (boostingId) = {
5568 let lastHeight = tryGetInteger((("boosting_" + boostingId) + "_lastHeight"))
5669 let finishHeight = tryGetInteger((("boosting_" + boostingId) + "_finishHeight"))
57- if (if ((lastHeight != 0))
58- then (lastHeight >= finishHeight)
59- else false)
60- then [StringEntry("list ended boostings", ((tryGetString("list ended boostings") + boostingId) + ","))]
61- else nil
70+ if ((lastHeight >= finishHeight))
71+ then [StringEntry((("list ended " + toString(height)) + " boostingIds"), ((tryGetString((("list ended " + toString(height)) + " boostingIds")) + boostingId) + ","))]
72+ else [StringEntry((("list ongoing boosts " + toString(height)) + " boostingIds"), ((tryGetString((("list ongoing boosts " + toString(height)) + " boostingIds")) + boostingId) + ","))]
6273 }
6374
6475
6576 @Callable(i)
66-func addBoosting (poolId,days) = {
67- let fullAmount = i.payments[0].amount
68- let assetId = getAssetString(i.payments[0].assetId)
69- let inv = invoke(this, "findEndedBoosting", nil, nil)
70- if ((inv == inv))
71- then {
72- let newBoostingsAmount = (tryGetInteger("global_boostingsAmount") + 1)
73- let boostingId = toString(newBoostingsAmount)
74- if ((addressFromString(poolId) == unit))
75- then throw("incorrect pool address")
76- else [IntegerEntry("global_boostingsAmount", newBoostingsAmount), IntegerEntry((("boosting_" + boostingId) + "_days"), days), IntegerEntry((("boosting_" + boostingId) + "_totalAmount"), fullAmount), IntegerEntry((("boosting_" + boostingId) + "_dailyAmount"), (fullAmount / days)), IntegerEntry((("boosting_" + boostingId) + "_blockAmount"), (fullAmount / ((days * hours) * minutes))), 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) + ","))]
77- }
78- else throw("Strict value is not equal to itself.")
79- }
77+func addBoosting (poolId,days) = if ((1 > days))
78+ then throw("amount of days has to be between 1 and 365")
79+ else if ((days > 365))
80+ then throw("amount of days has to be between 1 and 365")
81+ else if (false)
82+ then throw("under maintenance until further notice")
83+ else {
84+ let fullAmount = i.payments[0].amount
85+ if ((1440 > (fullAmount / days)))
86+ then throw((("boosting amount too small, minimum is " + toString((1440 * days))) + " of the smallest unit of payment asset"))
87+ else {
88+ let assetId = getAssetString(i.payments[0].assetId)
89+ if ((height == tryGetInteger("height")))
90+ then throw("wait 1 minute")
91+ else {
92+ let entry = if ((size(tryGetString((("pool_" + poolId) + "_boostings"))) > 11))
93+ then throw("max 5 boosts per pool")
94+ else invoke(this, "entryEnded", nil, nil)
95+ if ((entry == entry))
96+ then {
97+ let boostingId = if ((size((("list ongoing boosts " + toString(height)) + " boostingIds")) > 112))
98+ then throw("wait till other boosts are finished")
99+ else take(tryGetString((("list ended " + toString(height)) + " boostingIds")), 1)
100+ if ((addressFromString(poolId) == unit))
101+ then throw("incorrect pool address")
102+ 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) + ","))]
103+ }
104+ else throw("Strict value is not equal to itself.")
105+ }
106+ }
107+ }
80108
81109
82110
83111 @Callable(i)
84112 func payBoosting (boostingId) = payBoostingResult(boostingId)
85113
86114
87115
88116 @Callable(i)
89117 func payBoostings () = {
90118 func f (accum,next) = {
91119 let in = invoke(this, "payBoosting", [next], nil)
92120 if ((in == in))
93121 then in
94122 else throw("Strict value is not equal to itself.")
95123 }
96124
97125 let payments = {
98126 let $l = li
99127 let $s = size($l)
100128 let $acc0 = 0
101129 func $f0_1 ($a,$i) = if (($i >= $s))
102130 then $a
103131 else f($a, $l[$i])
104132
105133 func $f0_2 ($a,$i) = if (($i >= $s))
106134 then $a
107- else throw("List size exceeds 100")
135+ else throw("List size exceeds 56")
108136
109- $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)
137+ $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($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)
110138 }
111139 if ((payments == payments))
112140 then nil
113141 else throw("Strict value is not equal to itself.")
114142 }
115143
116144
117145
118146 @Callable(i)
119-func findEndedBoosting (boostingId) = endedBoostingResult(boostingId)
147+func endedBoostings (boostingId) = endedBoostingIds(boostingId)
120148
121149
122150
123151 @Callable(i)
124-func findEndedBoostings () = {
125- func e (accum,next) = {
126- let in = invoke(this, "findEndedBoosting", [next], nil)
152+func entryEnded () = {
153+ func f (accum,next) = {
154+ let in = invoke(this, "endedBoostings", [next], nil)
127155 if ((in == in))
128156 then in
129157 else throw("Strict value is not equal to itself.")
130158 }
131159
132- let ended = {
160+ let end = {
133161 let $l = li
134162 let $s = size($l)
135163 let $acc0 = 0
136164 func $f0_1 ($a,$i) = if (($i >= $s))
137165 then $a
138- else e($a, $l[$i])
166+ else f($a, $l[$i])
139167
140168 func $f0_2 ($a,$i) = if (($i >= $s))
141169 then $a
142- else throw("List size exceeds 100")
170+ else throw("List size exceeds 56")
143171
144- $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)
172+ $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($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)
145173 }
146- if ((ended == ended))
174+ if ((end == end))
175+ then [IntegerEntry("height", height)]
176+ else throw("Strict value is not equal to itself.")
177+ }
178+
179+
180+
181+@Callable(i)
182+func deleteEntr (poolId) = [DeleteEntry((("pool_" + poolId) + "_boostings"))]
183+
184+
185+
186+@Callable(i)
187+func checkStr (boostingId) = {
188+ let getFinishedPoolId1 = tryGetString((("boosting_" + boostingId) + "_poolId"))
189+ let getPoolBoostings = tryGetString((("pool_" + getFinishedPoolId1) + "_boostings"))
190+ let sizeStr = size(getPoolBoostings)
191+ if ((indexOf(getPoolBoostings, boostingId) == unit))
147192 then nil
148- else throw("Strict value is not equal to itself.")
193+ else {
194+ let findIndex = value(indexOf(getPoolBoostings, boostingId))
195+ let modifierRight = if ((findIndex == 0))
196+ then 2
197+ else 1
198+ let modifierLeft = if ((findIndex == 0))
199+ then 0
200+ else 1
201+ let removeEndedBoostingID = (take(getPoolBoostings, (sizeStr - ((sizeStr - findIndex) + modifierLeft))) + takeRight(getPoolBoostings, (sizeStr - (findIndex + modifierRight))))
202+[StringEntry("getFinishedPoolId", getFinishedPoolId1), StringEntry("getPoolBoostings", getPoolBoostings), IntegerEntry("findIndex", findIndex), IntegerEntry("sizeStr", sizeStr), StringEntry("left string", take(getPoolBoostings, (sizeStr - (sizeStr - findIndex)))), StringEntry("right string", takeRight(getPoolBoostings, (sizeStr - (findIndex + modifierRight)))), StringEntry((("pool_" + getFinishedPoolId1) + "_boostings"), removeEndedBoostingID)]
203+ }
149204 }
150205
151206

github/deemru/w8io/026f985 
85.73 ms