tx · 5qq13bjJJpzA9xxdoFwqPN3iuQnRZmYFzjxnuZCR4bgg 3N1JF2UVjGHtt7KByDco78tDr3BWfGdhmLU: -0.01000000 Waves 2022.02.14 19:46 [1923553] smart account 3N1JF2UVjGHtt7KByDco78tDr3BWfGdhmLU > SELF 0.00000000 Waves
{ "type": 13, "id": "5qq13bjJJpzA9xxdoFwqPN3iuQnRZmYFzjxnuZCR4bgg", "fee": 1000000, "feeAssetId": null, "timestamp": 1644857192396, "version": 1, "sender": "3N1JF2UVjGHtt7KByDco78tDr3BWfGdhmLU", "senderPublicKey": "FTCobxVZmFTcqne7HxXFFS9HrJZpgb1aRCYTUEAZAmzo", "proofs": [ "ahQJVE43HizEQqv4V7dXyrSsTUpCSwoFyrsMEcXkh5sSaeGitWk3zMywdz3WpCJBKRQCH2GpPQ2G8Qd9GAGbjus" ], "script": "base64:AAIFAAAAAAAAAF8IAhIHCgUCAQEBARIAEgASCAoGAgEBAQEBEgASAwoBCBIDCgEIEgMKAQgSAwoBCBIFCgMBAQESBQoDAQEBEgYKBAgICAESAwoBCBIDCgEIEgASAwoBCBIHCgUICAgICAAAADUAAAAAC3JldmlzaW9uTnVtAgAAAARudWxsAAAAAANTRVACAAAAAl9fAAAAAAhNQVhERVBUSAAAAAAAAAAAEQAAAAAJVVNFUkRFUFRIAAAAAAAAAAAaAAAAAAVTQ0FMRQAAAAAAAAAD6AAAAAAFTVVMVDgAAAAAAAX14QAAAAAACnplcm9CaWdJbnQJAAE2AAAAAQAAAAAAAAAAAAEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkAAAAAAAAAAAABAAAAD2dldE51bWJlck9yRmFpbAAAAAEAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5CQABLAAAAAIJAAEsAAAAAgIAAAAPb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AAVkTmV4dAkAAAIAAAABCQABLAAAAAICAAAAHUQgY2FsY3VsYXRpb24gZXJyb3IsIGREaWZmID0gCQABpgAAAAEFAAAABWREaWZmAAAAAC8roRg=", "chainId": 84, "height": 1923553, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let revisionNum = "null" | |
5 | + | ||
6 | + | let SEP = "__" | |
7 | + | ||
8 | + | let MAXDEPTH = 17 | |
9 | + | ||
10 | + | let USERDEPTH = 26 | |
11 | + | ||
12 | + | let SCALE = 1000 | |
13 | + | ||
14 | + | let MULT8 = 100000000 | |
15 | + | ||
16 | + | let zeroBigInt = toBigInt(0) | |
17 | + | ||
18 | + | func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0) | |
19 | + | ||
20 | + | ||
21 | + | func getNumberOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("mandatory this." + key) + " is not defined")) | |
22 | + | ||
23 | + | ||
24 | + | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
25 | + | ||
26 | + | ||
27 | + | func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined")) | |
28 | + | ||
29 | + | ||
30 | + | func abs (val) = if ((zeroBigInt > val)) | |
31 | + | then -(val) | |
32 | + | else val | |
33 | + | ||
34 | + | ||
35 | + | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
36 | + | ||
37 | + | ||
38 | + | let factoryAddressStr = getStringOrFail(keyFactoryAddress()) | |
39 | + | ||
40 | + | let factoryContract = addressFromStringValue(factoryAddressStr) | |
41 | + | ||
42 | + | func keyEmissionAddress () = "%s%s__config__emissionAddress" | |
43 | + | ||
44 | + | ||
45 | + | let emissionAddressStr = getStringOrFail(keyEmissionAddress()) | |
46 | + | ||
47 | + | let emissionContract = addressFromStringValue(emissionAddressStr) | |
48 | + | ||
49 | + | let IdxCfgAssetId = 1 | |
50 | + | ||
51 | + | let IdxCfgPacemakerAddress = 2 | |
52 | + | ||
53 | + | let IdxCfgBoostingContract = 3 | |
54 | + | ||
55 | + | let IdxCfgMaxDepth = 4 | |
56 | + | ||
57 | + | func keyConfig () = "%s__config" | |
58 | + | ||
59 | + | ||
60 | + | func readConfigArrayOrFail () = split(getStringOrFail(keyConfig()), SEP) | |
61 | + | ||
62 | + | ||
63 | + | func formatConfig (wxAssetIdStr,matcherPacemakerAddressStr,boostingContractAddressStr,maxDepth) = makeString(["%s%s%s%d", wxAssetIdStr, matcherPacemakerAddressStr, boostingContractAddressStr, toString(maxDepth)], SEP) | |
64 | + | ||
65 | + | ||
66 | + | func keyGwxRewardEmissionStartHeight () = "%s%s__gwxRewardEmissionPart__startHeight" | |
67 | + | ||
68 | + | ||
69 | + | func keyUsersCount () = "%s__nextUserNum" | |
70 | + | ||
71 | + | ||
72 | + | func keyRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
73 | + | ||
74 | + | ||
75 | + | func keyPoolWeightVirtual () = "%s%s__poolWeight__GWXvirtualPOOL" | |
76 | + | ||
77 | + | ||
78 | + | func keyNextProcessedUser () = "%s__nextProcessedUser" | |
79 | + | ||
80 | + | ||
81 | + | func keyLatestPeriod () = "%s__latestPeriod" | |
82 | + | ||
83 | + | ||
84 | + | func keyNextPeriod () = "%s__nextPeriod" | |
85 | + | ||
86 | + | ||
87 | + | func keyNextProcessedPeriod () = "%s__nextProcessedPeriod" | |
88 | + | ||
89 | + | ||
90 | + | func keyNextUnlaimedPeriodOfUser (userIndex) = makeString(["%s%d__nextClaimedPeriod", toString(userIndex)], SEP) | |
91 | + | ||
92 | + | ||
93 | + | func keyLastProcessedPeriodOfUser (userIndex) = makeString(["%s%d__lastProcessedPeriod", toString(userIndex)], SEP) | |
94 | + | ||
95 | + | ||
96 | + | func keyHeightForPeriod (period) = makeString(["%s%d__startHeightForPeriod", toString(period)], SEP) | |
97 | + | ||
98 | + | ||
99 | + | func keyAuxEmissionRewardForPeriod (period) = makeString(["%s%d__auxEmissionReward", toString(period)], SEP) | |
100 | + | ||
101 | + | ||
102 | + | func keyTotalAmountForPeriod (period) = makeString(["%s%d__totalAmountForPeriod", toString(period)], SEP) | |
103 | + | ||
104 | + | ||
105 | + | func keyLastPayoutInfo () = "%s__lastPayoutInfo" | |
106 | + | ||
107 | + | ||
108 | + | func PeriodPayoutInfo (period,matcherReward,emissionReward) = makeString(["%d%d%d", toString(period), toString(matcherReward), toString(emissionReward)], SEP) | |
109 | + | ||
110 | + | ||
111 | + | func keyPayoutHistoryInfo (period) = makeString(["%s%s%d__payouts__history", toString(period)], SEP) | |
112 | + | ||
113 | + | ||
114 | + | func keyTotalWeightForPeriod (period) = makeString(["%s%d__totalWeightForPeriod", toString(period)], SEP) | |
115 | + | ||
116 | + | ||
117 | + | func keyUserKValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "k", toString(period)], SEP) | |
118 | + | ||
119 | + | ||
120 | + | func keyUserBValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "b", toString(period)], SEP) | |
121 | + | ||
122 | + | ||
123 | + | func HistoryEntry (type,user,amountFromMatcher,amountFromEmission,currentPeriod,latestPeriod,i) = { | |
124 | + | let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP) | |
125 | + | let historyDATA = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(amountFromMatcher), toString(amountFromEmission), toString(currentPeriod), toString(latestPeriod)], SEP) | |
126 | + | StringEntry(historyKEY, historyDATA) | |
127 | + | } | |
128 | + | ||
129 | + | ||
130 | + | func calcUserWeight (boostingContractAddress,heightForPeriod,period,userIndex) = { | |
131 | + | let kLast = keyLastProcessedPeriodOfUser(userIndex) | |
132 | + | let kKey = keyUserKValueForPeriod(period, userIndex) | |
133 | + | let kRaw = getInteger(boostingContractAddress, kKey) | |
134 | + | if (isDefined(kRaw)) | |
135 | + | then { | |
136 | + | let k = value(kRaw) | |
137 | + | let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(period, userIndex))) | |
138 | + | let w = ((k * heightForPeriod) + b) | |
139 | + | if ((w > 0)) | |
140 | + | then $Tuple2((w / SCALE), [IntegerEntry(kLast, period)]) | |
141 | + | else $Tuple2(0, nil) | |
142 | + | } | |
143 | + | else { | |
144 | + | let p = getInteger(this, kLast) | |
145 | + | if (isDefined(p)) | |
146 | + | then { | |
147 | + | let pv = value(p) | |
148 | + | let k = value(getInteger(boostingContractAddress, keyUserKValueForPeriod(pv, userIndex))) | |
149 | + | let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(pv, userIndex))) | |
150 | + | let w = ((k * heightForPeriod) + b) | |
151 | + | if ((w > 0)) | |
152 | + | then $Tuple2((w / SCALE), nil) | |
153 | + | else $Tuple2(0, nil) | |
154 | + | } | |
155 | + | else $Tuple2(0, nil) | |
156 | + | } | |
157 | + | } | |
158 | + | ||
159 | + | ||
160 | + | func getUserIndexByAddress (boostingContractAddressStr,userAddress) = { | |
161 | + | let key = makeString(["%s%s%s", "mapping", "user2num", userAddress], SEP) | |
162 | + | parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(boostingContractAddressStr)), key), ((("User address " + userAddress) + " is not found in boosting contract data, key=") + key))) | |
163 | + | } | |
164 | + | ||
165 | + | ||
166 | + | func nextPeriod () = getNumberByKey(keyNextPeriod()) | |
167 | + | ||
168 | + | ||
169 | + | func invokeProcess (boostingContract,period,user,depth,weight) = { | |
170 | + | let result = invoke(this, "processNextBatch", [boostingContract, period, user, depth, weight], nil) | |
171 | + | if ((result == result)) | |
172 | + | then match result { | |
173 | + | case r: (Int, Int, Int) => | |
174 | + | r | |
175 | + | case _ => | |
176 | + | throw("Incorrect invoke result") | |
177 | + | } | |
178 | + | else throw("Strict value is not equal to itself.") | |
179 | + | } | |
180 | + | ||
181 | + | ||
182 | + | func processNextBatchInternal (boostingContract,currentPeriod,currentUser,depth,totalWeight) = { | |
183 | + | let boostingContractAddress = Address(boostingContract) | |
184 | + | let latestPeriod = getNumberByKey(keyLatestPeriod()) | |
185 | + | let usersCount = valueOrElse(getInteger(boostingContractAddress, keyUsersCount()), 0) | |
186 | + | let totalWeightKey = keyTotalWeightForPeriod(currentPeriod) | |
187 | + | let heightForPeriod = getNumberByKey(keyHeightForPeriod(currentPeriod)) | |
188 | + | if (if ((depth > 0)) | |
189 | + | then (latestPeriod >= currentPeriod) | |
190 | + | else false) | |
191 | + | then { | |
192 | + | let t0 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, currentUser) | |
193 | + | let weight0 = (totalWeight + t0._1) | |
194 | + | if ((usersCount > (currentUser + 1))) | |
195 | + | then { | |
196 | + | let t1 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, (currentUser + 1)) | |
197 | + | let weight1 = (weight0 + t1._1) | |
198 | + | if ((usersCount > (currentUser + 2))) | |
199 | + | then { | |
200 | + | let t2 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, (currentUser + 2)) | |
201 | + | let weight2 = (weight1 + t2._1) | |
202 | + | if ((usersCount > (currentUser + 3))) | |
203 | + | then { | |
204 | + | let t3 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, (currentUser + 3)) | |
205 | + | let weight3 = (weight2 + t3._1) | |
206 | + | if ((usersCount > (currentUser + 4))) | |
207 | + | then { | |
208 | + | let t4 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, (currentUser + 4)) | |
209 | + | let weight4 = (weight3 + t4._1) | |
210 | + | if ((usersCount > (currentUser + 5))) | |
211 | + | then { | |
212 | + | let t5 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, (currentUser + 5)) | |
213 | + | let weight5 = (weight4 + t5._1) | |
214 | + | if ((usersCount > (currentUser + 6))) | |
215 | + | then { | |
216 | + | let r5 = invokeProcess(boostingContract, currentPeriod, (currentUser + 6), (depth - 1), weight5) | |
217 | + | $Tuple4((((((t0._2 ++ t1._2) ++ t2._2) ++ t3._2) ++ t4._2) ++ t5._2), r5._1, r5._2, r5._3) | |
218 | + | } | |
219 | + | else $Tuple4((((((([IntegerEntry(totalWeightKey, weight5)] ++ t0._2) ++ t1._2) ++ t2._2) ++ t3._2) ++ t4._2) ++ t5._2), (currentPeriod + 1), 0, 0) | |
220 | + | } | |
221 | + | else $Tuple4(((((([IntegerEntry(totalWeightKey, weight4)] ++ t0._2) ++ t1._2) ++ t2._2) ++ t3._2) ++ t4._2), (currentPeriod + 1), 0, 0) | |
222 | + | } | |
223 | + | else $Tuple4((((([IntegerEntry(totalWeightKey, weight3)] ++ t0._2) ++ t1._2) ++ t2._2) ++ t3._2), (currentPeriod + 1), 0, 0) | |
224 | + | } | |
225 | + | else $Tuple4(((([IntegerEntry(totalWeightKey, weight2)] ++ t0._2) ++ t1._2) ++ t2._2), (currentPeriod + 1), 0, 0) | |
226 | + | } | |
227 | + | else $Tuple4((([IntegerEntry(totalWeightKey, weight1)] ++ t0._2) ++ t1._2), (currentPeriod + 1), 0, 0) | |
228 | + | } | |
229 | + | else $Tuple4(([IntegerEntry(totalWeightKey, weight0)] ++ t0._2), (currentPeriod + 1), 0, 0) | |
230 | + | } | |
231 | + | else if ((currentUser == 0)) | |
232 | + | then $Tuple4(nil, currentPeriod, 0, 0) | |
233 | + | else $Tuple4([IntegerEntry(totalWeightKey, totalWeight)], currentPeriod, currentUser, 0) | |
234 | + | } | |
235 | + | ||
236 | + | ||
237 | + | func invokeClaim (boostingContract,period,user,depth,totalFromMatcher,totalFromEmission) = { | |
238 | + | let result = invoke(this, "claimNextBatch", [boostingContract, period, user, depth, totalFromMatcher, totalFromEmission], nil) | |
239 | + | if ((result == result)) | |
240 | + | then match result { | |
241 | + | case r: (Int, Int, Int) => | |
242 | + | r | |
243 | + | case _ => | |
244 | + | throw("Incorrect invoke result") | |
245 | + | } | |
246 | + | else throw("Strict value is not equal to itself.") | |
247 | + | } | |
248 | + | ||
249 | + | ||
250 | + | func claimInternal (boostingContract,currentPeriod,currentUser,depth,userAccumulatedMatcher,userAccumulatedEmission) = { | |
251 | + | let boostingContractAddress = Address(boostingContract) | |
252 | + | let latestPeriod = getNumberByKey(keyNextProcessedPeriod()) | |
253 | + | let totalWeight = getNumberByKey(keyTotalWeightForPeriod(currentPeriod)) | |
254 | + | let heightForPeriod = getNumberByKey(keyHeightForPeriod(currentPeriod)) | |
255 | + | let $t01170311815 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, currentUser) | |
256 | + | let userWeight = $t01170311815._1 | |
257 | + | let ignored = $t01170311815._2 | |
258 | + | let userAmountMatcherForPeriod = fraction(getNumberByKey(keyTotalAmountForPeriod(currentPeriod)), userWeight, totalWeight) | |
259 | + | let userAmountEmissionForPeriod = fraction(getNumberByKey(keyAuxEmissionRewardForPeriod(currentPeriod)), userWeight, totalWeight) | |
260 | + | if (if ((0 >= depth)) | |
261 | + | then true | |
262 | + | else ((currentPeriod + 1) >= latestPeriod)) | |
263 | + | then $Tuple3((currentPeriod + 1), (userAccumulatedMatcher + userAmountMatcherForPeriod), (userAccumulatedEmission + userAmountEmissionForPeriod)) | |
264 | + | else invokeClaim(boostingContract, (currentPeriod + 1), currentUser, (depth - 1), (userAccumulatedMatcher + userAmountMatcherForPeriod), (userAccumulatedEmission + userAmountEmissionForPeriod)) | |
265 | + | } | |
266 | + | ||
267 | + | ||
268 | + | func commonClaimReward (userAddress) = { | |
269 | + | let cfgArray = readConfigArrayOrFail() | |
270 | + | let userIdx = getUserIndexByAddress(cfgArray[IdxCfgBoostingContract], userAddress) | |
271 | + | let currentPeriod = getNumberByKey(keyNextUnlaimedPeriodOfUser(userIdx)) | |
272 | + | let nextProcessedPeriod = getNumberByKey(keyNextProcessedPeriod()) | |
273 | + | if ((currentPeriod >= nextProcessedPeriod)) | |
274 | + | then throw("Nothing to claim") | |
275 | + | else { | |
276 | + | let boostingContract = fromBase58String(cfgArray[IdxCfgBoostingContract]) | |
277 | + | let $t01302713153 = claimInternal(boostingContract, currentPeriod, userIdx, USERDEPTH, 0, 0) | |
278 | + | let period = $t01302713153._1 | |
279 | + | let amountFromMatcher = $t01302713153._2 | |
280 | + | let amountFromEmission = $t01302713153._3 | |
281 | + | $Tuple6(period, amountFromMatcher, amountFromEmission, userIdx, cfgArray, nextProcessedPeriod) | |
282 | + | } | |
283 | + | } | |
284 | + | ||
285 | + | ||
286 | + | @Callable(i) | |
287 | + | func processNextBatch (boostingContract,currentPeriod,currentUser,depth,totalWeight) = if ((i.caller != this)) | |
288 | + | then throw("Should be called by this script only") | |
289 | + | else { | |
290 | + | let tpl = processNextBatchInternal(boostingContract, currentPeriod, currentUser, depth, totalWeight) | |
291 | + | $Tuple2(tpl._1, $Tuple3(tpl._2, tpl._3, tpl._4)) | |
292 | + | } | |
293 | + | ||
294 | + | ||
295 | + | ||
296 | + | @Callable(i) | |
297 | + | func processPendingPeriodsAndUsers () = { | |
298 | + | let currentPeriod = getNumberByKey(keyNextProcessedPeriod()) | |
299 | + | if ((currentPeriod > getNumberByKey(keyLatestPeriod()))) | |
300 | + | then throw("Nothing to process") | |
301 | + | else { | |
302 | + | let cfgArray = readConfigArrayOrFail() | |
303 | + | let depth = parseIntValue(cfgArray[IdxCfgMaxDepth]) | |
304 | + | if ((depth > MAXDEPTH)) | |
305 | + | then throw("Depth exceeds MAXDEPTH") | |
306 | + | else { | |
307 | + | let boostingContract = fromBase58String(cfgArray[IdxCfgBoostingContract]) | |
308 | + | let currentUser = getNumberByKey(keyNextProcessedUser()) | |
309 | + | let totalWeight = getNumberByKey(keyTotalWeightForPeriod(currentPeriod)) | |
310 | + | let r = processNextBatchInternal(boostingContract, currentPeriod, currentUser, depth, totalWeight) | |
311 | + | ((r._1 :+ IntegerEntry(keyNextProcessedPeriod(), r._2)) :+ IntegerEntry(keyNextProcessedUser(), r._3)) | |
312 | + | } | |
313 | + | } | |
314 | + | } | |
315 | + | ||
316 | + | ||
317 | + | ||
318 | + | @Callable(i) | |
319 | + | func deposit () = { | |
320 | + | let cfgArray = readConfigArrayOrFail() | |
321 | + | if ((i.caller != Address(fromBase58String(cfgArray[IdxCfgPacemakerAddress])))) | |
322 | + | then throw("Wrong caller address") | |
323 | + | else { | |
324 | + | let assetId = value(value(i.payments[0]).assetId) | |
325 | + | if ((assetId != fromBase58String(cfgArray[IdxCfgAssetId]))) | |
326 | + | then throw("Wrong payment asset") | |
327 | + | else { | |
328 | + | let period = nextPeriod() | |
329 | + | let deltaH = (height - getNumberOrFail(keyGwxRewardEmissionStartHeight())) | |
330 | + | let emissionRate = valueOrErrorMessage(getInteger(emissionContract, keyRatePerBlockCurrent()), (("mandatory emission_contract." + keyRatePerBlockCurrent()) + " is not defined")) | |
331 | + | let weight = valueOrErrorMessage(getInteger(factoryContract, keyPoolWeightVirtual()), (("mandatory factory_contract." + keyPoolWeightVirtual()) + " is not defined")) | |
332 | + | let auxAmount = fraction((deltaH * weight), emissionRate, MULT8) | |
333 | + | let em = invoke(emissionContract, "emit", [auxAmount], nil) | |
334 | + | if ((em == em)) | |
335 | + | then { | |
336 | + | let matcherPart = value(i.payments[0]).amount | |
337 | + | let payoutInfo = PeriodPayoutInfo(period, matcherPart, auxAmount) | |
338 | + | [IntegerEntry(keyLatestPeriod(), period), IntegerEntry(keyHeightForPeriod(period), height), IntegerEntry(keyAuxEmissionRewardForPeriod(period), auxAmount), IntegerEntry(keyGwxRewardEmissionStartHeight(), height), IntegerEntry(keyTotalAmountForPeriod(period), matcherPart), IntegerEntry(keyNextPeriod(), (period + 1)), StringEntry(keyLastPayoutInfo(), payoutInfo), StringEntry(keyPayoutHistoryInfo(period), payoutInfo)] | |
339 | + | } | |
340 | + | else throw("Strict value is not equal to itself.") | |
341 | + | } | |
342 | + | } | |
343 | + | } | |
344 | + | ||
345 | + | ||
346 | + | ||
347 | + | @Callable(i) | |
348 | + | func claimNextBatch (boostingContract,currentPeriod,currentUser,depth,totalFromMatcher,totalFromEmission) = if ((i.caller != this)) | |
349 | + | then throw("Should be called by this script only") | |
350 | + | else { | |
351 | + | let periodAndTotals = claimInternal(boostingContract, currentPeriod, currentUser, depth, totalFromMatcher, totalFromEmission) | |
352 | + | $Tuple2(nil, periodAndTotals) | |
353 | + | } | |
354 | + | ||
355 | + | ||
356 | + | ||
357 | + | @Callable(i) | |
358 | + | func claimReward () = { | |
359 | + | let address = toString(i.caller) | |
360 | + | let $t01743917559 = commonClaimReward(address) | |
361 | + | let period = $t01743917559._1 | |
362 | + | let amountFromMatcher = $t01743917559._2 | |
363 | + | let amountFromEmission = $t01743917559._3 | |
364 | + | let userIdx = $t01743917559._4 | |
365 | + | let cfgArray = $t01743917559._5 | |
366 | + | let nextProcessedPeriod = $t01743917559._6 | |
367 | + | $Tuple2([IntegerEntry(keyNextUnlaimedPeriodOfUser(userIdx), period), ScriptTransfer(i.caller, (amountFromMatcher + amountFromEmission), fromBase58String(cfgArray[IdxCfgAssetId])), HistoryEntry("claim", address, amountFromMatcher, amountFromEmission, period, nextProcessedPeriod, i)], [amountFromMatcher, amountFromEmission]) | |
368 | + | } | |
369 | + | ||
370 | + | ||
371 | + | ||
372 | + | @Callable(i) | |
373 | + | func claimRewardREADONLY (address) = { | |
374 | + | let claimResults = commonClaimReward(address) | |
375 | + | let amount = (claimResults._2 + claimResults._3) | |
376 | + | $Tuple2(nil, amount) | |
377 | + | } | |
378 | + | ||
379 | + | ||
380 | + | ||
381 | + | @Callable(i) | |
382 | + | func claimRewardDetailedREADONLY (address) = { | |
383 | + | let $t01830118370 = commonClaimReward(address) | |
384 | + | let ignored = $t01830118370._1 | |
385 | + | let fromMatcher = $t01830118370._2 | |
386 | + | let fromEmission = $t01830118370._3 | |
387 | + | $Tuple2(nil, makeString(["%d%d%d", toString((fromMatcher + fromEmission)), toString(fromMatcher), toString(fromEmission)], SEP)) | |
388 | + | } | |
389 | + | ||
390 | + | ||
391 | + | ||
392 | + | @Callable(i) | |
393 | + | func latestFinalizedPeriodREADONLY (address) = $Tuple2(nil, valueOrElse(getInteger(this, keyLatestPeriod()), -1)) | |
394 | + | ||
395 | + | ||
396 | + | ||
397 | + | @Callable(i) | |
398 | + | func latestFinalizedPeriodInfoREADONLY (address) = $Tuple2(nil, getStringByKey(keyLastPayoutInfo())) | |
399 | + | ||
400 | + | ||
401 | + | ||
402 | + | @Callable(i) | |
403 | + | func calcGwxParamsREADONLY (gwxAmountStart,lockStartHeight,lockDurationBlocks) = { | |
404 | + | let lockEndHeight = (lockStartHeight + lockDurationBlocks) | |
405 | + | let scale8ParamK = -(fraction(gwxAmountStart, SCALE, lockDurationBlocks)) | |
406 | + | let scale8ParamB = (fraction(gwxAmountStart, SCALE, lockDurationBlocks) * lockEndHeight) | |
407 | + | $Tuple2(nil, [scale8ParamK, scale8ParamB, nextPeriod()]) | |
408 | + | } | |
409 | + | ||
410 | + | ||
411 | + | ||
412 | + | @Callable(i) | |
413 | + | func calcGwxAmountStartREADONLY (wxLockAmount,lockDuration,maxLockDuration) = { | |
414 | + | let coeffX8 = fraction(lockDuration, MULT8, maxLockDuration) | |
415 | + | let gWxAmountStart = fraction(wxLockAmount, coeffX8, MULT8) | |
416 | + | $Tuple2(nil, [gWxAmountStart]) | |
417 | + | } | |
418 | + | ||
419 | + | ||
420 | + | ||
421 | + | @Callable(i) | |
422 | + | func constructor (wxAssetIdStr,matcherPacemakerAddressStr,boostingContractAddressStr,maxDepth) = if ((this != i.caller)) | |
423 | + | then throw("not authorized") | |
424 | + | else [StringEntry(keyConfig(), formatConfig(wxAssetIdStr, matcherPacemakerAddressStr, boostingContractAddressStr, maxDepth))] | |
425 | + | ||
426 | + | ||
427 | + | ||
428 | + | @Callable(i) | |
429 | + | func constructorV2 (factoryAddress) = if ((this != i.caller)) | |
430 | + | then throw("not authorized") | |
431 | + | else [StringEntry(keyFactoryAddress(), factoryAddress)] | |
432 | + | ||
433 | + | ||
434 | + | ||
435 | + | @Callable(i) | |
436 | + | func constructorV3 (emissionAddress) = if ((this != i.caller)) | |
437 | + | then throw("not authorized") | |
438 | + | else { | |
439 | + | let initLatestPeriod = if (isDefined(getInteger(this, keyLatestPeriod()))) | |
440 | + | then nil | |
441 | + | else [IntegerEntry(keyLatestPeriod(), -1)] | |
442 | + | (initLatestPeriod :+ StringEntry(keyEmissionAddress(), emissionAddress)) | |
443 | + | } | |
444 | + | ||
445 | + | ||
446 | + | ||
447 | + | @Callable(i) | |
448 | + | func onEmissionForGwxStart () = if ((i.caller != factoryContract)) | |
449 | + | then throw("permissions denied") | |
450 | + | else [IntegerEntry(keyGwxRewardEmissionStartHeight(), height)] | |
451 | + | ||
452 | + | ||
453 | + | ||
454 | + | @Callable(i) | |
455 | + | func latestPeriodEmissionRewardsREADONLY (address) = { | |
456 | + | let period = nextPeriod() | |
457 | + | $Tuple2(nil, [getNumberByKey(keyAuxEmissionRewardForPeriod(period))]) | |
458 | + | } | |
459 | + | ||
460 | + | ||
461 | + | ||
462 | + | @Callable(i) | |
463 | + | func calcD (x1BigIntStr,x2BigIntStr,ampBigIntStr,aPrecisionBigIntStr,targetPrecisionBigIntStr) = { | |
464 | + | let nCoins = toBigInt(2) | |
465 | + | let aPrecision = parseBigIntValue(aPrecisionBigIntStr) | |
466 | + | let targetPrecision = parseBigIntValue(targetPrecisionBigIntStr) | |
467 | + | let x1 = parseBigIntValue(x1BigIntStr) | |
468 | + | let x2 = parseBigIntValue(x2BigIntStr) | |
469 | + | let amp = (parseBigIntValue(ampBigIntStr) * aPrecision) | |
470 | + | let s = (x1 + x2) | |
471 | + | if ((s == zeroBigInt)) | |
472 | + | then $Tuple2(nil, toString(zeroBigInt)) | |
473 | + | else { | |
474 | + | let ann = (amp * nCoins) | |
475 | + | let arr = [1, 2, 3, 4, 5, 6, 7] | |
476 | + | func calc (acc,cur) = { | |
477 | + | let $t02184922038 = acc | |
478 | + | let d = $t02184922038._1 | |
479 | + | let dPrev = $t02184922038._2 | |
480 | + | let dp = (((d * d) * d) / (((x1 * x2) * nCoins) * nCoins)) | |
481 | + | let dNext = (((((ann * s) / aPrecision) + (dp * nCoins)) * d) / ((((ann - aPrecision) * d) / aPrecision) + ((nCoins + toBigInt(1)) * dp))) | |
482 | + | $Tuple2(dNext, d) | |
483 | + | } | |
484 | + | ||
485 | + | let $t02225122301 = { | |
486 | + | let $l = arr | |
487 | + | let $s = size($l) | |
488 | + | let $acc0 = $Tuple2(s, unit) | |
489 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
490 | + | then $a | |
491 | + | else calc($a, $l[$i]) | |
492 | + | ||
493 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
494 | + | then $a | |
495 | + | else throw("List size exceeds 7") | |
496 | + | ||
497 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7) | |
498 | + | } | |
499 | + | let dNext = $t02225122301._1 | |
500 | + | let dPrev = $t02225122301._2 | |
501 | + | let dDiff = abs((dNext - value(dPrev))) | |
502 | + | if ((targetPrecision >= dDiff)) | |
503 | + | then $Tuple2(nil, toString(dNext)) | |
504 | + | else throw(("D calculation error, dDiff = " + toString(dDiff))) | |
505 | + | } | |
506 | + | } | |
507 | + | ||
508 | + |
github/deemru/w8io/026f985 30.88 ms ◑