tx · 7XZdzfB3UDxSNaT5fGVgffHP3ZCa4PhVm4ErnowPNAaP

3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE:  -0.02000000 Waves

2023.04.19 10:42 [2541162] smart account 3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE > SELF 0.00000000 Waves

{ "type": 13, "id": "7XZdzfB3UDxSNaT5fGVgffHP3ZCa4PhVm4ErnowPNAaP", "fee": 2000000, "feeAssetId": null, "timestamp": 1681890171822, "version": 2, "chainId": 84, "sender": "3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE", "senderPublicKey": "G349Uq3FTox7dRNLeAfAQeoACvwZ9iEnVSaHcEYn6j8J", "proofs": [ "2eRpEod1AbHTbUqsdDwo36Uen1aH89nyrAeho9nktpb1MdPX2okrKVRWFXj1nvnaEoM5LKGLbYWegnCtE9P6hUwx" ], "script": "base64:BgKCHQgCEgYKBAEYEQESBAoCCAESABIDCgEBEgASABIAEgMKAQgSAwoBCBIDCgEIEgUKAwEBARIFCgMBAQESABIDCgEIEgcKBQgICAgIEgQKAhgREgMKAQgSACIDU0VQIgVTQ0FMRSIFTVVMVDgiCnplcm9CaWdJbnQiFHByb2Nlc3NpbmdTdGFnZVRvdGFsIhVwcm9jZXNzaW5nU3RhZ2VTaGFyZXMiC3dhdmVzU3RyaW5nIg5nZXROdW1iZXJCeUtleSIDa2V5Ig9nZXROdW1iZXJPckZhaWwiDmdldFN0cmluZ0J5S2V5Ig9nZXRTdHJpbmdPckZhaWwiDHBhcnNlQXNzZXRJZCIFaW5wdXQiB3dyYXBFcnIiA21zZyIIdGhyb3dFcnIiDGtleVd4QXNzZXRJZCIJd3hBc3NldElkIgNhYnMiA3ZhbCIJYWJzQmlnSW50IgtrZXlNYXhEZXB0aCIPbWF4RGVwdGhEZWZhdWx0IghtYXhEZXB0aCIRa2V5RmFjdG9yeUFkZHJlc3MiEWZhY3RvcnlBZGRyZXNzU3RyIg9mYWN0b3J5Q29udHJhY3QiEmtleUVtaXNz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2541162, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: F516ifH69vbUfArmqfamwC4mzKgmuM16xxxsC7EzrMJ6 Next: 29mtBhKRAQh5dMH7TYqryWqcsiUQQSZiwH2q7VG5JL8L Diff:
OldNewDifferences
1313
1414 let processingStageShares = 1
1515
16+let wavesString = "WAVES"
17+
1618 func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0)
1719
1820
2426
2527 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (("mandatory this." + key) + " is not defined"))
2628
29+
30+func parseAssetId (input) = if ((input == wavesString))
31+ then unit
32+ else fromBase58String(input)
33+
34+
35+func wrapErr (msg) = makeString(["gwx_reward.ride:", msg], " ")
36+
37+
38+func throwErr (msg) = throw(wrapErr(msg))
39+
40+
41+func keyWxAssetId () = makeString(["%s", "wxAssetId"], SEP)
42+
43+
44+let wxAssetId = parseAssetId(getStringValue(this, keyWxAssetId()))
2745
2846 func abs (val) = if ((0 > val))
2947 then -(val)
193211
194212 let referralsContractAddressOrFail = addressFromStringValue(getStringOrFail(keyReferralsContractAddress()))
195213
214+func keyTradingRewardHistory (user,i) = makeString(["%s%s%s%s", "tradingReward", "history", user, toBase58String(i.transactionId)], SEP)
215+
216+
217+func keyMaxRecipients () = makeString(["%s%s", "config", "maxRecipients"], SEP)
218+
219+
196220 func HistoryEntry (type,user,amount,i) = {
197221 let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP)
198222 let historyDATA = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(amount)], SEP)
315339
316340
317341 @Callable(i)
342+func tradeRewardInternal (paymentAmountLeftOver,userAddresses,rewards,currentIter) = if ((currentIter == size(userAddresses)))
343+ then nil
344+ else {
345+ let insufficientFundsCheck = if ((paymentAmountLeftOver >= rewards[currentIter]))
346+ then true
347+ else throwErr("insufficient payment assetId")
348+ if ((insufficientFundsCheck == insufficientFundsCheck))
349+ then {
350+ let tradeRewardInternal = invoke(this, "tradeRewardInternal", [(paymentAmountLeftOver - rewards[currentIter]), userAddresses, rewards, (currentIter + 1)], nil)
351+ if ((tradeRewardInternal == tradeRewardInternal))
352+ then {
353+ let tradingRewardHistoryKey = keyTradingRewardHistory(userAddresses[currentIter], i)
354+ let userAddress = addressFromStringValue(userAddresses[currentIter])
355+ $Tuple2([IntegerEntry(tradingRewardHistoryKey, rewards[currentIter]), ScriptTransfer(userAddress, rewards[currentIter], wxAssetId)], tradeRewardInternal)
356+ }
357+ else throw("Strict value is not equal to itself.")
358+ }
359+ else throw("Strict value is not equal to itself.")
360+ }
361+
362+
363+
364+@Callable(i)
318365 func updateReferralActivity (userAddress,gWxAmountStart) = {
319366 let referrer = getString(referralsContractAddressOrFail, keyReferrer(userAddress))
320367 let activeReferralInv = if ((referrer == unit))
341388 then $Tuple2(nil, false)
342389 else if ((processingStage == processingStageTotal))
343390 then {
344- let $t01241512531 = calcUserWeight(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser)
345- let userWeight = $t01241512531._1
346- let userActions = $t01241512531._2
391+ let $t01391914035 = calcUserWeight(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser)
392+ let userWeight = $t01391914035._1
393+ let userActions = $t01391914035._2
347394 let totalWeightNew = (totalWeight + userWeight)
348395 let processingActions = if (((usersCount - 1) > currentUser))
349396 then [IntegerEntry(keyNextProcessedUser(), (currentUser + 1))]
468515 func claimReward () = {
469516 let cfgArray = readConfigArrayOrFail()
470517 let address = toString(i.caller)
471- let $t01772017770 = commonClaimReward(address)
472- let amount = $t01772017770._1
473- let actions = $t01772017770._2
518+ let $t01922419274 = commonClaimReward(address)
519+ let amount = $t01922419274._1
520+ let actions = $t01922419274._2
474521 let checkAmount = if ((amount > 0))
475522 then true
476523 else throw("Nothing to claim")
493540
494541 @Callable(i)
495542 func claimRewardREADONLY (address) = {
496- let $t01834318393 = commonClaimReward(address)
497- let amount = $t01834318393._1
498- let actions = $t01834318393._2
543+ let $t01984719897 = commonClaimReward(address)
544+ let amount = $t01984719897._1
545+ let actions = $t01984719897._2
499546 let referralUnclaimed = valueOrElse(getInteger(referralsContractAddressOrFail, keyUnclaimedReferral(referralProgramName, address)), 0)
500547 let totalAmount = (amount + referralUnclaimed)
501548 $Tuple2(nil, totalAmount)
562609 let ann = (amp * nCoins)
563610 let arr = [0, 1, 2, 3, 4, 5, 6]
564611 func calc (acc,cur) = {
565- let $t02102621053 = acc
566- let d = $t02102621053._1
567- let dPrev = $t02102621053._2
568- let found = $t02102621053._3
612+ let $t02253022557 = acc
613+ let d = $t02253022557._1
614+ let dPrev = $t02253022557._2
615+ let found = $t02253022557._3
569616 if ((found != unit))
570617 then acc
571618 else {
578625 }
579626 }
580627
581- let $t02165121714 = {
628+ let $t02315523218 = {
582629 let $l = arr
583630 let $s = size($l)
584631 let $acc0 = $Tuple3(s, unit, unit)
592639
593640 $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)
594641 }
595- let dNext = $t02165121714._1
596- let dPrev = $t02165121714._2
597- let found = $t02165121714._3
642+ let dNext = $t02315523218._1
643+ let dPrev = $t02315523218._2
644+ let found = $t02315523218._3
598645 if ((found != unit))
599646 then $Tuple2(nil, toString(dNext))
600647 else {
602649 throw(("D calculation error, dDiff = " + toString(dDiff)))
603650 }
604651 }
652+ }
653+
654+
655+
656+@Callable(i)
657+func tradeReward (userAddresses,rewards) = {
658+ let argsComparison = (size(userAddresses) == size(rewards))
659+ let maxRecipients = valueOrElse(getInteger(keyMaxRecipients()), 0)
660+ let payment = i.payments[0]
661+ let paymentAssetId = payment.assetId
662+ let paymentAmount = payment.amount
663+ let checks = [if ((size(userAddresses) > maxRecipients))
664+ then true
665+ else throwErr("Too many recipients"), if (argsComparison)
666+ then true
667+ else throwErr("Arguments size mismatch"), if ((paymentAssetId == wxAssetId))
668+ then true
669+ else throwErr("Wrong asset payment")]
670+ if ((checks == checks))
671+ then {
672+ let tradeRewardInternal = invoke(this, "tradeRewardInternal", [paymentAmount, userAddresses, rewards, 0], nil)
673+ if ((tradeRewardInternal == tradeRewardInternal))
674+ then $Tuple2(nil, tradeRewardInternal)
675+ else throw("Strict value is not equal to itself.")
676+ }
677+ else throw("Strict value is not equal to itself.")
605678 }
606679
607680
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let SCALE = 1000
77
88 let MULT8 = 100000000
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let processingStageTotal = 0
1313
1414 let processingStageShares = 1
1515
16+let wavesString = "WAVES"
17+
1618 func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0)
1719
1820
1921 func getNumberOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("mandatory this." + key) + " is not defined"))
2022
2123
2224 func getStringByKey (key) = valueOrElse(getString(this, key), "")
2325
2426
2527 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (("mandatory this." + key) + " is not defined"))
2628
29+
30+func parseAssetId (input) = if ((input == wavesString))
31+ then unit
32+ else fromBase58String(input)
33+
34+
35+func wrapErr (msg) = makeString(["gwx_reward.ride:", msg], " ")
36+
37+
38+func throwErr (msg) = throw(wrapErr(msg))
39+
40+
41+func keyWxAssetId () = makeString(["%s", "wxAssetId"], SEP)
42+
43+
44+let wxAssetId = parseAssetId(getStringValue(this, keyWxAssetId()))
2745
2846 func abs (val) = if ((0 > val))
2947 then -(val)
3048 else val
3149
3250
3351 func absBigInt (val) = if ((zeroBigInt > val))
3452 then -(val)
3553 else val
3654
3755
3856 let keyMaxDepth = "%s__maxDepth"
3957
4058 let maxDepthDefault = 30
4159
4260 let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault)
4361
4462 func keyFactoryAddress () = "%s%s__config__factoryAddress"
4563
4664
4765 let factoryAddressStr = getStringOrFail(keyFactoryAddress())
4866
4967 let factoryContract = addressFromStringValue(factoryAddressStr)
5068
5169 func keyEmissionAddress () = "%s%s__config__emissionAddress"
5270
5371
5472 func keyVotingEmissionContract () = makeString(["%s", "votingEmissionContract"], SEP)
5573
5674
5775 let votingEmissionContract = addressFromStringValue(getStringValue(factoryContract, keyVotingEmissionContract()))
5876
5977 func keyNumToUserMapping (num) = makeString(["%s%s%s", "mapping", "num2user", toString(num)], SEP)
6078
6179
6280 let keyReferralProgramName = makeString(["%s%s", "referral", "programName"], SEP)
6381
6482 let referralProgramNameDefault = "wxlock"
6583
6684 let referralProgramName = valueOrElse(getString(this, keyReferralProgramName), referralProgramNameDefault)
6785
6886 let keyReferralMinGWxAmount = makeString(["%s%s", "referral", "minGWxAmount"], SEP)
6987
7088 let referralMinGWxAmountDefault = (500 * MULT8)
7189
7290 let referralMinGWxAmount = valueOrElse(getInteger(this, keyReferralMinGWxAmount), referralMinGWxAmountDefault)
7391
7492 let keyReferrerRewardPermille = makeString(["%s%s", "referral", "referrerRewardPermille"], SEP)
7593
7694 let referrerRewardPermilleDefault = 50
7795
7896 let referrerRewardPermille = valueOrElse(getInteger(this, keyReferrerRewardPermille), referrerRewardPermilleDefault)
7997
8098 let keyReferralRewardPermille = makeString(["%s%s", "referral", "referralRewardPermille"], SEP)
8199
82100 let referralRewardPermilleDefault = 50
83101
84102 let referralRewardPermille = valueOrElse(getInteger(this, keyReferralRewardPermille), referralRewardPermilleDefault)
85103
86104 func keyReferrer (referralAddress) = makeString(["%s%s%s", "referrer", referralProgramName, referralAddress], SEP)
87105
88106
89107 func keyUnclaimedReferral (programName,claimerAddress) = makeString(["%s%s%s", "unclaimedReferral", programName, claimerAddress], SEP)
90108
91109
92110 let emissionAddressStr = getStringOrFail(keyEmissionAddress())
93111
94112 let emissionContract = addressFromStringValue(emissionAddressStr)
95113
96114 let IdxCfgAssetId = 1
97115
98116 let IdxCfgPacemakerAddress = 2
99117
100118 let IdxCfgBoostingContract = 3
101119
102120 let IdxCfgMaxDepth = 4
103121
104122 func keyConfig () = "%s__config"
105123
106124
107125 func readConfigArrayOrFail () = split(getStringOrFail(keyConfig()), SEP)
108126
109127
110128 func formatConfig (wxAssetIdStr,matcherPacemakerAddressStr,boostingContractAddressStr,maxDepth) = makeString(["%s%s%s%d", wxAssetIdStr, matcherPacemakerAddressStr, boostingContractAddressStr, toString(maxDepth)], SEP)
111129
112130
113131 func boostingContractOrFail () = {
114132 let cfgArray = readConfigArrayOrFail()
115133 valueOrErrorMessage(addressFromString(cfgArray[IdxCfgBoostingContract]), "boosting contract address is not defined")
116134 }
117135
118136
119137 func keyGwxRewardEmissionStartHeight () = "%s%s__gwxRewardEmissionPart__startHeight"
120138
121139
122140 func keyUsersCount () = "%s__nextUserNum"
123141
124142
125143 func keyRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
126144
127145
128146 func keyGwxHoldersRewardCurrent () = "%s%s__gwxHoldersReward__current"
129147
130148
131149 func keyGwxHoldersRewardNext () = "%s%s__gwxHoldersReward__next"
132150
133151
134152 func keyPoolWeightVirtual () = "%s%s__poolWeight__GWXvirtualPOOL"
135153
136154
137155 func keyNextProcessedUser () = "%s__nextProcessedUser"
138156
139157
140158 func keyLatestPeriod () = "%s__latestPeriod"
141159
142160
143161 func keyNextPeriod () = "%s__nextPeriod"
144162
145163
146164 func keyProcessingStage () = "%s__processingStage"
147165
148166
149167 func keyNextProcessedPeriod () = "%s__nextProcessedPeriod"
150168
151169
152170 func keyUserUnclaimed (userIndex) = makeString(["%s%d", "userUnclaimed", toString(userIndex)], SEP)
153171
154172
155173 func keyNextUnlaimedPeriodOfUser (userIndex) = makeString(["%s%d__nextClaimedPeriod", toString(userIndex)], SEP)
156174
157175
158176 func keyLastProcessedPeriodOfUser (userIndex) = makeString(["%s%d__lastProcessedPeriod", toString(userIndex)], SEP)
159177
160178
161179 func keyHeightForPeriod (period) = makeString(["%s%d__startHeightForPeriod", toString(period)], SEP)
162180
163181
164182 func keyAuxEmissionRewardForPeriod (period) = makeString(["%s%d__auxEmissionReward", toString(period)], SEP)
165183
166184
167185 func keyTotalAmountForPeriod (period) = makeString(["%s%d__totalAmountForPeriod", toString(period)], SEP)
168186
169187
170188 func keyLastPayoutInfo () = "%s__lastPayoutInfo"
171189
172190
173191 func PeriodPayoutInfo (period,matcherReward,emissionReward) = makeString(["%d%d%d", toString(period), toString(matcherReward), toString(emissionReward)], SEP)
174192
175193
176194 func keyPayoutHistoryInfo (period) = makeString(["%s%s%d__payouts__history", toString(period)], SEP)
177195
178196
179197 func keyTotalWeightForPeriod (period) = makeString(["%s%d__totalWeightForPeriod", toString(period)], SEP)
180198
181199
182200 func keyUserKValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "k", toString(period)], SEP)
183201
184202
185203 func keyUserBValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "b", toString(period)], SEP)
186204
187205
188206 func keyUserWeightForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "weight", toString(period)], SEP)
189207
190208
191209 func keyReferralsContractAddress () = makeString(["%s%s", "config", "referralsContractAddress"], SEP)
192210
193211
194212 let referralsContractAddressOrFail = addressFromStringValue(getStringOrFail(keyReferralsContractAddress()))
195213
214+func keyTradingRewardHistory (user,i) = makeString(["%s%s%s%s", "tradingReward", "history", user, toBase58String(i.transactionId)], SEP)
215+
216+
217+func keyMaxRecipients () = makeString(["%s%s", "config", "maxRecipients"], SEP)
218+
219+
196220 func HistoryEntry (type,user,amount,i) = {
197221 let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP)
198222 let historyDATA = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(amount)], SEP)
199223 StringEntry(historyKEY, historyDATA)
200224 }
201225
202226
203227 func keyManagerPublicKey () = "%s__managerPublicKey"
204228
205229
206230 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
207231
208232
209233 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
210234 case s: String =>
211235 fromBase58String(s)
212236 case _: Unit =>
213237 unit
214238 case _ =>
215239 throw("Match error")
216240 }
217241
218242
219243 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
220244 case s: String =>
221245 fromBase58String(s)
222246 case _: Unit =>
223247 unit
224248 case _ =>
225249 throw("Match error")
226250 }
227251
228252
229253 func mustManager (i) = {
230254 let pd = throw("Permission denied")
231255 match managerPublicKeyOrUnit() {
232256 case pk: ByteVector =>
233257 if ((i.callerPublicKey == pk))
234258 then true
235259 else pd
236260 case _: Unit =>
237261 if ((i.caller == this))
238262 then true
239263 else pd
240264 case _ =>
241265 throw("Match error")
242266 }
243267 }
244268
245269
246270 func calcUserWeight (boostingContractAddress,heightForPeriod,period,userIndex) = {
247271 let kLast = keyLastProcessedPeriodOfUser(userIndex)
248272 let kKey = keyUserKValueForPeriod(period, userIndex)
249273 let kRaw = getInteger(boostingContractAddress, kKey)
250274 let kUserWeight = keyUserWeightForPeriod(period, userIndex)
251275 if (isDefined(kRaw))
252276 then {
253277 let k = value(kRaw)
254278 let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(period, userIndex)))
255279 let w = ((k * heightForPeriod) + b)
256280 if ((w > 0))
257281 then $Tuple2((w / SCALE), [IntegerEntry(kLast, period), IntegerEntry(kUserWeight, w)])
258282 else $Tuple2(0, nil)
259283 }
260284 else {
261285 let p = getInteger(this, kLast)
262286 if (if (isDefined(p))
263287 then (period >= value(p))
264288 else false)
265289 then {
266290 let pv = value(p)
267291 let k = value(getInteger(boostingContractAddress, keyUserKValueForPeriod(pv, userIndex)))
268292 let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(pv, userIndex)))
269293 let w = ((k * heightForPeriod) + b)
270294 if ((w > 0))
271295 then $Tuple2((w / SCALE), [IntegerEntry(kUserWeight, w)])
272296 else $Tuple2(0, nil)
273297 }
274298 else $Tuple2(0, nil)
275299 }
276300 }
277301
278302
279303 func calcUserWeightForClaim (boostingContractAddress,heightForPeriod,period,userIndex) = {
280304 let kUserWeight = keyUserWeightForPeriod(period, userIndex)
281305 let userWeightOrUnit = getInteger(kUserWeight)
282306 match userWeightOrUnit {
283307 case _: Unit =>
284308 0
285309 case w: Int =>
286310 (w / SCALE)
287311 case _ =>
288312 throw("Match error")
289313 }
290314 }
291315
292316
293317 func getUserIndexByAddress (boostingContractAddressStr,userAddress) = {
294318 let key = makeString(["%s%s%s", "mapping", "user2num", userAddress], SEP)
295319 parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(boostingContractAddressStr)), key), ((("User address " + userAddress) + " is not found in boosting contract data, key=") + key)))
296320 }
297321
298322
299323 func nextPeriod () = getNumberByKey(keyNextPeriod())
300324
301325
302326 func commonClaimReward (userAddress) = {
303327 let cfgArray = readConfigArrayOrFail()
304328 let userIdx = getUserIndexByAddress(cfgArray[IdxCfgBoostingContract], userAddress)
305329 let userUnclaimedOption = getInteger(keyUserUnclaimed(userIdx))
306330 match userUnclaimedOption {
307331 case _: Unit =>
308332 $Tuple2(0, nil)
309333 case u: Int =>
310334 $Tuple2(u, [IntegerEntry(keyUserUnclaimed(userIdx), 0)])
311335 case _ =>
312336 throw("Match error")
313337 }
314338 }
315339
316340
317341 @Callable(i)
342+func tradeRewardInternal (paymentAmountLeftOver,userAddresses,rewards,currentIter) = if ((currentIter == size(userAddresses)))
343+ then nil
344+ else {
345+ let insufficientFundsCheck = if ((paymentAmountLeftOver >= rewards[currentIter]))
346+ then true
347+ else throwErr("insufficient payment assetId")
348+ if ((insufficientFundsCheck == insufficientFundsCheck))
349+ then {
350+ let tradeRewardInternal = invoke(this, "tradeRewardInternal", [(paymentAmountLeftOver - rewards[currentIter]), userAddresses, rewards, (currentIter + 1)], nil)
351+ if ((tradeRewardInternal == tradeRewardInternal))
352+ then {
353+ let tradingRewardHistoryKey = keyTradingRewardHistory(userAddresses[currentIter], i)
354+ let userAddress = addressFromStringValue(userAddresses[currentIter])
355+ $Tuple2([IntegerEntry(tradingRewardHistoryKey, rewards[currentIter]), ScriptTransfer(userAddress, rewards[currentIter], wxAssetId)], tradeRewardInternal)
356+ }
357+ else throw("Strict value is not equal to itself.")
358+ }
359+ else throw("Strict value is not equal to itself.")
360+ }
361+
362+
363+
364+@Callable(i)
318365 func updateReferralActivity (userAddress,gWxAmountStart) = {
319366 let referrer = getString(referralsContractAddressOrFail, keyReferrer(userAddress))
320367 let activeReferralInv = if ((referrer == unit))
321368 then unit
322369 else invoke(referralsContractAddressOrFail, "updateReferralActivity", [referralProgramName, userAddress, (gWxAmountStart >= referralMinGWxAmount)], nil)
323370 if ((activeReferralInv == activeReferralInv))
324371 then $Tuple2(nil, unit)
325372 else throw("Strict value is not equal to itself.")
326373 }
327374
328375
329376
330377 @Callable(i)
331378 func finalizeHelper () = {
332379 let processingStage = valueOrElse(getInteger(keyProcessingStage()), processingStageTotal)
333380 let currentPeriod = getNumberByKey(keyNextProcessedPeriod())
334381 let currentUser = getNumberByKey(keyNextProcessedUser())
335382 let latestPeriod = getNumberByKey(keyLatestPeriod())
336383 let usersCount = valueOrElse(getInteger(boostingContractOrFail(), keyUsersCount()), 0)
337384 let totalWeightKey = keyTotalWeightForPeriod(currentPeriod)
338385 let totalWeight = getNumberByKey(keyTotalWeightForPeriod(currentPeriod))
339386 let heightForPeriod = getNumberByKey(keyHeightForPeriod(currentPeriod))
340387 if ((currentPeriod > latestPeriod))
341388 then $Tuple2(nil, false)
342389 else if ((processingStage == processingStageTotal))
343390 then {
344- let $t01241512531 = calcUserWeight(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser)
345- let userWeight = $t01241512531._1
346- let userActions = $t01241512531._2
391+ let $t01391914035 = calcUserWeight(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser)
392+ let userWeight = $t01391914035._1
393+ let userActions = $t01391914035._2
347394 let totalWeightNew = (totalWeight + userWeight)
348395 let processingActions = if (((usersCount - 1) > currentUser))
349396 then [IntegerEntry(keyNextProcessedUser(), (currentUser + 1))]
350397 else [IntegerEntry(keyProcessingStage(), processingStageShares), IntegerEntry(keyNextProcessedUser(), 0)]
351398 $Tuple2((([IntegerEntry(totalWeightKey, totalWeightNew)] ++ processingActions) ++ userActions), true)
352399 }
353400 else if ((processingStage == processingStageShares))
354401 then {
355402 let userWeight = calcUserWeightForClaim(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser)
356403 let userAmountMatcherForPeriod = fraction(getNumberByKey(keyTotalAmountForPeriod(currentPeriod)), userWeight, totalWeight)
357404 let userAmountEmissionForPeriod = fraction(getNumberByKey(keyAuxEmissionRewardForPeriod(currentPeriod)), userWeight, totalWeight)
358405 let userTotalAmount = (userAmountEmissionForPeriod + userAmountMatcherForPeriod)
359406 let userUnclaimedOption = getInteger(keyUserUnclaimed(currentUser))
360407 let userAddress = getStringValue(boostingContractOrFail(), keyNumToUserMapping(currentUser))
361408 let referrer = getString(referralsContractAddressOrFail, keyReferrer(userAddress))
362409 let activeReferralInv = if ((referrer == unit))
363410 then unit
364411 else invoke(referralsContractAddressOrFail, "updateReferralActivity", [referralProgramName, userAddress, (userWeight >= referralMinGWxAmount)], nil)
365412 if ((activeReferralInv == activeReferralInv))
366413 then {
367414 let referralInv = if (if ((referrer == unit))
368415 then true
369416 else (referralMinGWxAmount > userWeight))
370417 then unit
371418 else {
372419 let referrerReward = fraction(userTotalAmount, referrerRewardPermille, SCALE)
373420 let referralReward = fraction(userTotalAmount, referralRewardPermille, SCALE)
374421 invoke(referralsContractAddressOrFail, "incUnclaimed", [referralProgramName, userAddress, referrerReward, referralReward], nil)
375422 }
376423 if ((referralInv == referralInv))
377424 then {
378425 let unclaimedActions = [IntegerEntry(keyUserUnclaimed(currentUser), (valueOrElse(userUnclaimedOption, 0) + userTotalAmount))]
379426 let processingActions = if (((usersCount - 1) > currentUser))
380427 then [IntegerEntry(keyNextProcessedUser(), (currentUser + 1))]
381428 else [IntegerEntry(keyNextProcessedPeriod(), (currentPeriod + 1)), IntegerEntry(keyNextProcessedUser(), 0), DeleteEntry(keyProcessingStage())]
382429 $Tuple2((unclaimedActions ++ processingActions), true)
383430 }
384431 else throw("Strict value is not equal to itself.")
385432 }
386433 else throw("Strict value is not equal to itself.")
387434 }
388435 else throw("invalid processing stage")
389436 }
390437
391438
392439
393440 @Callable(i)
394441 func finalizeWrapper (counter) = {
395442 let result = {
396443 let @ = invoke(this, "finalizeHelper", nil, nil)
397444 if ($isInstanceOf(@, "Boolean"))
398445 then @
399446 else throw(($getType(@) + " couldn't be cast to Boolean"))
400447 }
401448 if ((result == result))
402449 then if (!(result))
403450 then if ((counter == maxDepth))
404451 then throw("Nothing to process")
405452 else $Tuple2(nil, unit)
406453 else if ((counter > 0))
407454 then $Tuple2(nil, invoke(this, "finalizeWrapper", [(counter - 1)], nil))
408455 else $Tuple2(nil, unit)
409456 else throw("Strict value is not equal to itself.")
410457 }
411458
412459
413460
414461 @Callable(i)
415462 func processPendingPeriodsAndUsers () = $Tuple2(nil, invoke(this, "finalizeWrapper", [maxDepth], nil))
416463
417464
418465
419466 @Callable(i)
420467 func deposit () = {
421468 let checkCaller = if ((i.caller == votingEmissionContract))
422469 then true
423470 else mustManager(i)
424471 if ((checkCaller == checkCaller))
425472 then {
426473 let period = nextPeriod()
427474 let deltaH = (height - getNumberOrFail(keyGwxRewardEmissionStartHeight()))
428475 let emissionRate = valueOrErrorMessage(getInteger(emissionContract, keyRatePerBlockCurrent()), (("mandatory emission_contract." + keyRatePerBlockCurrent()) + " is not defined"))
429476 let gwxHoldersRewardCurrent = valueOrElse(getInteger(emissionContract, keyGwxHoldersRewardCurrent()), 0)
430477 if ((gwxHoldersRewardCurrent == gwxHoldersRewardCurrent))
431478 then {
432479 let auxAmount = fraction((deltaH * gwxHoldersRewardCurrent), emissionRate, MULT8)
433480 let em = if ((auxAmount > 0))
434481 then invoke(emissionContract, "emit", [auxAmount], nil)
435482 else unit
436483 if ((em == em))
437484 then {
438485 let matcherPart = 0
439486 let payoutInfo = PeriodPayoutInfo(period, matcherPart, auxAmount)
440487 let gwxHoldersRewardUpdated = {
441488 let @ = invoke(emissionContract, "gwxHoldersRewardUpdate", nil, nil)
442489 if ($isInstanceOf(@, "Boolean"))
443490 then @
444491 else throw(($getType(@) + " couldn't be cast to Boolean"))
445492 }
446493 if ((gwxHoldersRewardUpdated == gwxHoldersRewardUpdated))
447494 then {
448495 let totalReward = (matcherPart + auxAmount)
449496 let actions = if (if ((totalReward == 0))
450497 then !(gwxHoldersRewardUpdated)
451498 else false)
452499 then nil
453500 else [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)]
454501 $Tuple2(actions, unit)
455502 }
456503 else throw("Strict value is not equal to itself.")
457504 }
458505 else throw("Strict value is not equal to itself.")
459506 }
460507 else throw("Strict value is not equal to itself.")
461508 }
462509 else throw("Strict value is not equal to itself.")
463510 }
464511
465512
466513
467514 @Callable(i)
468515 func claimReward () = {
469516 let cfgArray = readConfigArrayOrFail()
470517 let address = toString(i.caller)
471- let $t01772017770 = commonClaimReward(address)
472- let amount = $t01772017770._1
473- let actions = $t01772017770._2
518+ let $t01922419274 = commonClaimReward(address)
519+ let amount = $t01922419274._1
520+ let actions = $t01922419274._2
474521 let checkAmount = if ((amount > 0))
475522 then true
476523 else throw("Nothing to claim")
477524 if ((checkAmount == checkAmount))
478525 then {
479526 let amountFromEmission = 0
480527 let claimedReferral = {
481528 let @ = invoke(referralsContractAddressOrFail, "claim", [referralProgramName], nil)
482529 if ($isInstanceOf(@, "Int"))
483530 then @
484531 else throw(($getType(@) + " couldn't be cast to Int"))
485532 }
486533 let totalAmount = (amount + claimedReferral)
487534 $Tuple2(([ScriptTransfer(i.caller, totalAmount, fromBase58String(cfgArray[IdxCfgAssetId])), HistoryEntry("claim", address, amount, i)] ++ actions), [totalAmount, amountFromEmission])
488535 }
489536 else throw("Strict value is not equal to itself.")
490537 }
491538
492539
493540
494541 @Callable(i)
495542 func claimRewardREADONLY (address) = {
496- let $t01834318393 = commonClaimReward(address)
497- let amount = $t01834318393._1
498- let actions = $t01834318393._2
543+ let $t01984719897 = commonClaimReward(address)
544+ let amount = $t01984719897._1
545+ let actions = $t01984719897._2
499546 let referralUnclaimed = valueOrElse(getInteger(referralsContractAddressOrFail, keyUnclaimedReferral(referralProgramName, address)), 0)
500547 let totalAmount = (amount + referralUnclaimed)
501548 $Tuple2(nil, totalAmount)
502549 }
503550
504551
505552
506553 @Callable(i)
507554 func latestFinalizedPeriodREADONLY (address) = $Tuple2(nil, valueOrElse(getInteger(this, keyLatestPeriod()), -1))
508555
509556
510557
511558 @Callable(i)
512559 func latestFinalizedPeriodInfoREADONLY (address) = $Tuple2(nil, getStringByKey(keyLastPayoutInfo()))
513560
514561
515562
516563 @Callable(i)
517564 func calcGwxParamsREADONLY (gwxAmountStart,lockStartHeight,lockDurationBlocks) = {
518565 let lockEndHeight = (lockStartHeight + lockDurationBlocks)
519566 let scale8ParamK = -(fraction(gwxAmountStart, SCALE, lockDurationBlocks))
520567 let scale8ParamB = (fraction(gwxAmountStart, SCALE, lockDurationBlocks) * lockEndHeight)
521568 $Tuple2(nil, [scale8ParamK, scale8ParamB, nextPeriod()])
522569 }
523570
524571
525572
526573 @Callable(i)
527574 func calcGwxAmountStartREADONLY (wxLockAmount,lockDuration,maxLockDuration) = {
528575 let coeffX8 = fraction(lockDuration, MULT8, maxLockDuration)
529576 let gWxAmountStart = fraction(wxLockAmount, coeffX8, MULT8)
530577 $Tuple2(nil, [gWxAmountStart])
531578 }
532579
533580
534581
535582 @Callable(i)
536583 func onEmissionForGwxStart () = if ((i.caller != factoryContract))
537584 then throw("permissions denied")
538585 else [IntegerEntry(keyGwxRewardEmissionStartHeight(), height)]
539586
540587
541588
542589 @Callable(i)
543590 func latestPeriodEmissionRewardsREADONLY (address) = {
544591 let period = nextPeriod()
545592 $Tuple2(nil, [getNumberByKey(keyAuxEmissionRewardForPeriod(period))])
546593 }
547594
548595
549596
550597 @Callable(i)
551598 func calcD (x1BigIntStr,x2BigIntStr,ampBigIntStr,aPrecisionBigIntStr,targetPrecisionBigIntStr) = {
552599 let nCoins = toBigInt(2)
553600 let aPrecision = parseBigIntValue(aPrecisionBigIntStr)
554601 let targetPrecision = parseBigIntValue(targetPrecisionBigIntStr)
555602 let x1 = parseBigIntValue(x1BigIntStr)
556603 let x2 = parseBigIntValue(x2BigIntStr)
557604 let amp = (parseBigIntValue(ampBigIntStr) * aPrecision)
558605 let s = (x1 + x2)
559606 if ((s == zeroBigInt))
560607 then $Tuple2(nil, toString(zeroBigInt))
561608 else {
562609 let ann = (amp * nCoins)
563610 let arr = [0, 1, 2, 3, 4, 5, 6]
564611 func calc (acc,cur) = {
565- let $t02102621053 = acc
566- let d = $t02102621053._1
567- let dPrev = $t02102621053._2
568- let found = $t02102621053._3
612+ let $t02253022557 = acc
613+ let d = $t02253022557._1
614+ let dPrev = $t02253022557._2
615+ let found = $t02253022557._3
569616 if ((found != unit))
570617 then acc
571618 else {
572619 let dp = (((d * d) * d) / (((x1 * x2) * nCoins) * nCoins))
573620 let dNext = (((((ann * s) / aPrecision) + (dp * nCoins)) * d) / ((((ann - aPrecision) * d) / aPrecision) + ((nCoins + toBigInt(1)) * dp)))
574621 let dDiff = absBigInt((dNext - value(d)))
575622 if ((targetPrecision >= dDiff))
576623 then $Tuple3(dNext, d, cur)
577624 else $Tuple3(dNext, d, unit)
578625 }
579626 }
580627
581- let $t02165121714 = {
628+ let $t02315523218 = {
582629 let $l = arr
583630 let $s = size($l)
584631 let $acc0 = $Tuple3(s, unit, unit)
585632 func $f0_1 ($a,$i) = if (($i >= $s))
586633 then $a
587634 else calc($a, $l[$i])
588635
589636 func $f0_2 ($a,$i) = if (($i >= $s))
590637 then $a
591638 else throw("List size exceeds 7")
592639
593640 $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)
594641 }
595- let dNext = $t02165121714._1
596- let dPrev = $t02165121714._2
597- let found = $t02165121714._3
642+ let dNext = $t02315523218._1
643+ let dPrev = $t02315523218._2
644+ let found = $t02315523218._3
598645 if ((found != unit))
599646 then $Tuple2(nil, toString(dNext))
600647 else {
601648 let dDiff = absBigInt((dNext - value(dPrev)))
602649 throw(("D calculation error, dDiff = " + toString(dDiff)))
603650 }
604651 }
652+ }
653+
654+
655+
656+@Callable(i)
657+func tradeReward (userAddresses,rewards) = {
658+ let argsComparison = (size(userAddresses) == size(rewards))
659+ let maxRecipients = valueOrElse(getInteger(keyMaxRecipients()), 0)
660+ let payment = i.payments[0]
661+ let paymentAssetId = payment.assetId
662+ let paymentAmount = payment.amount
663+ let checks = [if ((size(userAddresses) > maxRecipients))
664+ then true
665+ else throwErr("Too many recipients"), if (argsComparison)
666+ then true
667+ else throwErr("Arguments size mismatch"), if ((paymentAssetId == wxAssetId))
668+ then true
669+ else throwErr("Wrong asset payment")]
670+ if ((checks == checks))
671+ then {
672+ let tradeRewardInternal = invoke(this, "tradeRewardInternal", [paymentAmount, userAddresses, rewards, 0], nil)
673+ if ((tradeRewardInternal == tradeRewardInternal))
674+ then $Tuple2(nil, tradeRewardInternal)
675+ else throw("Strict value is not equal to itself.")
676+ }
677+ else throw("Strict value is not equal to itself.")
605678 }
606679
607680
608681
609682 @Callable(i)
610683 func setManager (pendingManagerPublicKey) = {
611684 let checkCaller = mustManager(i)
612685 if ((checkCaller == checkCaller))
613686 then {
614687 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
615688 if ((checkManagerPublicKey == checkManagerPublicKey))
616689 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
617690 else throw("Strict value is not equal to itself.")
618691 }
619692 else throw("Strict value is not equal to itself.")
620693 }
621694
622695
623696
624697 @Callable(i)
625698 func confirmManager () = {
626699 let pm = pendingManagerPublicKeyOrUnit()
627700 let hasPM = if (isDefined(pm))
628701 then true
629702 else throw("No pending manager")
630703 if ((hasPM == hasPM))
631704 then {
632705 let checkPM = if ((i.callerPublicKey == value(pm)))
633706 then true
634707 else throw("You are not pending manager")
635708 if ((checkPM == checkPM))
636709 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
637710 else throw("Strict value is not equal to itself.")
638711 }
639712 else throw("Strict value is not equal to itself.")
640713 }
641714
642715
643716 @Verifier(tx)
644717 func verify () = {
645718 let targetPublicKey = match managerPublicKeyOrUnit() {
646719 case pk: ByteVector =>
647720 pk
648721 case _: Unit =>
649722 tx.senderPublicKey
650723 case _ =>
651724 throw("Match error")
652725 }
653726 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
654727 }
655728

github/deemru/w8io/026f985 
124.12 ms