tx · HuF1WqDWVwEhzJW5szDdSMUcFvV6S2h9WP7Xi1d8nnob 3N8E9LU71MDkdP8FWtbP4TBXCNhoc15hWfs: -0.02500000 Waves 2023.03.17 17:08 [2494094] smart account 3N8E9LU71MDkdP8FWtbP4TBXCNhoc15hWfs > SELF 0.00000000 Waves
{ "type": 13, "id": "HuF1WqDWVwEhzJW5szDdSMUcFvV6S2h9WP7Xi1d8nnob", "fee": 2500000, "feeAssetId": null, "timestamp": 1679062168137, "version": 2, "chainId": 84, "sender": "3N8E9LU71MDkdP8FWtbP4TBXCNhoc15hWfs", "senderPublicKey": "2EDucEDvqYfn6hdx4PbvykQFRoNgPMWX6SiVPjM8AyxM", "proofs": [ "2hvpEXrSqYBE3teE39oQcw5cKfqcshbrvj4a6WUYp9dhvuhHEUznBFjxoijssWaJLjapiASt4DXUN1c5BERgSnxh", "5sfCdxmBvpV5YtKsuUMp7gEY2tNLqHzwEqfxN5jn5t9qQZXhDYXqUpaQT86kKqL8TibW6Q4qp4WZNwgoVFmcma2Y" ], "script": "base64:BgIiCAISAwoBCBIAEgASAwoBARIAEgASABIGCgQYEQEBEgASAFgAB2tBY3RpdmUCBmFjdGl2ZQALa0FjdGl2ZUdsb2ICFGFjdGl2ZV9hbGxfY29udHJhY3RzAAZrQ2F1c2UCDnNodXRkb3duX2NhdXNlAA1rTGFzdEludGVyZXN0Ag1sYXN0X2ludGVyZXN0ABFrVXNlckxhc3RJbnRlcmVzdAIOX2xhc3RfaW50ZXJlc3QAD2tVc2VyU1dPUExvY2tlZAIMX1NXT1BfYW1vdW50ABBrVG90YWxTV09QTG9ja2VkAhF0b3RhbF9TV09QX2Ftb3VudAAVa1VzZXJTd29wVW5sb2NrSGVpZ2h0AhNfU1dPUF91bmxvY2tfaGVpZ2h0ABBrVXNlckdTd29wTG9ja2VkAg1fR1N3b3BfYW1vdW50ABFrVG90YWxHU3dvcExvY2tlZAISdG90YWxfR1N3b3BfYW1vdW50ABJrVXNlclRvdGFsVm90ZVNX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HJ5AgUHa0FjdGl2ZQYJAMwIAgkBC0RlbGV0ZUVudHJ5AQUGa0NhdXNlBQNuaWwBAnR4AQZ2ZXJpZnkABBJhZG1pblB1YktleTFTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQxhZG1pblB1YktleTEAAQAABBJhZG1pblB1YktleTJTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwABBQxhZG1pblB1YktleTIAAQAABBJhZG1pblB1YktleTNTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwACBQxhZG1pblB1YktleTMAAQAACQBnAgkAZAIJAGQCBRJhZG1pblB1YktleTFTaWduZWQFEmFkbWluUHViS2V5MlNpZ25lZAUSYWRtaW5QdWJLZXkzU2lnbmVkAALZ2Lw4", "height": 2494094, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6Gy4UyhT2TRVndCjqVaZGGkE3epCsy48DXqUW8id9aV6 Next: none Diff:
Old | New | Differences | |
---|---|---|---|
91 | 91 | ||
92 | 92 | let kLaunchpadAddr = "launchpad_address" | |
93 | 93 | ||
94 | - | let kAirdropMoneyBoxAddr = "airdrop_fee_money_box" | |
95 | - | ||
96 | 94 | let kOraclePool = "pool_" | |
97 | 95 | ||
98 | 96 | let oracle = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
121 | 119 | ||
122 | 120 | let launchpadAddr = Address(getBase58FromOracle(kLaunchpadAddr)) | |
123 | 121 | ||
124 | - | let airdropMoneyBoxAddr = Address(getBase58FromOracle(kAirdropMoneyBoxAddr)) | |
125 | - | ||
126 | 122 | let lockSwopBlocksAmount = (10102 * 4) | |
127 | 123 | ||
128 | 124 | let SWOP = fromBase58String(getStringValue(farmingAddr, kSWOPid)) | |
148 | 144 | let active = valueOrElse(getBoolean(this, kActive), true) | |
149 | 145 | ||
150 | 146 | let activeGlob = valueOrElse(getBoolean(oracle, kActiveGlob), true) | |
151 | - | ||
152 | - | let airdropFee = getIntegerValue(oracle, kAirdropFee) | |
153 | 147 | ||
154 | 148 | let currVotingPeriod = (basePeriod + ((height - startHeight) / periodLength)) | |
155 | 149 | ||
186 | 180 | ||
187 | 181 | ||
188 | 182 | func getUserInterestInfo (user,lastInterest) = { | |
189 | - | let $ | |
190 | - | let userSWOPAmount = $ | |
191 | - | let userGSwopAmount = $ | |
183 | + | let $t048554918 = getUserLockedInfo(user) | |
184 | + | let userSWOPAmount = $t048554918._1 | |
185 | + | let userGSwopAmount = $t048554918._2 | |
192 | 186 | let userLastInterest = valueOrElse(getInteger(this, (user + kUserLastInterest)), lastInterest) | |
193 | 187 | $Tuple3(userLastInterest, userSWOPAmount, userGSwopAmount) | |
194 | 188 | } | |
257 | 251 | ||
258 | 252 | func claimCalc (user) = { | |
259 | 253 | let lastInterest = getLastInterestInfo() | |
260 | - | let $ | |
261 | - | let userLastInterest = $ | |
262 | - | let userSWOPLocked = $ | |
263 | - | let userGSwopAmount = $ | |
254 | + | let $t083438440 = getUserInterestInfo(user, lastInterest) | |
255 | + | let userLastInterest = $t083438440._1 | |
256 | + | let userSWOPLocked = $t083438440._2 | |
257 | + | let userGSwopAmount = $t083438440._3 | |
264 | 258 | let claimAmount = fraction(userGSwopAmount, (lastInterest - userLastInterest), scaleValue) | |
265 | 259 | let userNewInterest = lastInterest | |
266 | 260 | $Tuple2(userNewInterest, claimAmount) | |
281 | 275 | ||
282 | 276 | @Callable(i) | |
283 | 277 | func airDrop () = valueOrElse(isActive(), { | |
284 | - | let $ | |
285 | - | let pmtAmount = $ | |
286 | - | let pmtAssetId = $ | |
278 | + | let $t093399414 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
279 | + | let pmtAmount = $t093399414._1 | |
280 | + | let pmtAssetId = $t093399414._2 | |
287 | 281 | if ((pmtAssetId != SWOP)) | |
288 | 282 | then throw("Incorrect pmtAssetId") | |
289 | 283 | else { | |
290 | - | let airdropFeeAmount = fraction(pmtAmount, airdropFee, feeSacle6, CEILING) | |
291 | - | let $t097689830 = getTotalLockedInfo() | |
292 | - | let totalSWOPLocked = $t097689830._1 | |
293 | - | let totalGSwopLocked = $t097689830._2 | |
284 | + | let $t095059567 = getTotalLockedInfo() | |
285 | + | let totalSWOPLocked = $t095059567._1 | |
286 | + | let totalGSwopLocked = $t095059567._2 | |
294 | 287 | let lastInterest = getLastInterestInfo() | |
295 | - | let interestNew = (lastInterest + fraction( | |
296 | - | [IntegerEntry(kLastInterest, interestNew) | |
288 | + | let interestNew = (lastInterest + fraction(pmtAmount, scaleValue, totalGSwopLocked)) | |
289 | + | [IntegerEntry(kLastInterest, interestNew)] | |
297 | 290 | } | |
298 | 291 | }) | |
299 | 292 | ||
301 | 294 | ||
302 | 295 | @Callable(i) | |
303 | 296 | func lockSWOP () = valueOrElse(isActive(), { | |
304 | - | let $ | |
305 | - | let pmtAmount = $ | |
306 | - | let pmtAssetId = $ | |
297 | + | let $t098539928 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
298 | + | let pmtAmount = $t098539928._1 | |
299 | + | let pmtAssetId = $t098539928._2 | |
307 | 300 | if ((pmtAssetId != SWOP)) | |
308 | 301 | then throw("Incorrect pmtAssetId") | |
309 | 302 | else { | |
310 | 303 | let user = toString(i.caller) | |
311 | 304 | let lastInterest = getLastInterestInfo() | |
312 | - | let $ | |
313 | - | let userSWOPLocked = $ | |
314 | - | let userGSwopLocked = $ | |
315 | - | let $ | |
316 | - | let userNewInterest = $ | |
317 | - | let claimAmountAvailable = $ | |
305 | + | let $t01007910142 = getUserLockedInfo(user) | |
306 | + | let userSWOPLocked = $t01007910142._1 | |
307 | + | let userGSwopLocked = $t01007910142._2 | |
308 | + | let $t01014710208 = claimCalc(user) | |
309 | + | let userNewInterest = $t01014710208._1 | |
310 | + | let claimAmountAvailable = $t01014710208._2 | |
318 | 311 | let availableForClaim = getUserAvailableForClaim(user) | |
319 | 312 | let availableForClaimNew = (availableForClaim + claimAmountAvailable) | |
320 | 313 | let userSWOPLockedNew = (userSWOPLocked + pmtAmount) | |
321 | 314 | let userGSwopLockedNew = (userGSwopLocked + pmtAmount) | |
322 | - | let $ | |
323 | - | let totalSWOPLocked = $ | |
324 | - | let totalGSwopLocked = $ | |
315 | + | let $t01045610518 = getTotalLockedInfo() | |
316 | + | let totalSWOPLocked = $t01045610518._1 | |
317 | + | let totalGSwopLocked = $t01045610518._2 | |
325 | 318 | let totalSWOPLockedNew = (totalSWOPLocked + pmtAmount) | |
326 | 319 | let totalGSwopLockedNew = (totalGSwopLocked + pmtAmount) | |
327 | 320 | [IntegerEntry((user + kUserSwopUnlockHeight), (height + lockSwopBlocksAmount)), IntegerEntry((user + kUserLastInterest), userNewInterest), IntegerEntry((user + kUserSWOPLocked), userSWOPLockedNew), IntegerEntry((user + kUserGSwopLocked), userGSwopLockedNew), IntegerEntry((user + kUserAvailableForClaim), availableForClaimNew), IntegerEntry(kTotalSWOPLocked, totalSWOPLockedNew), IntegerEntry(kTotalGSwopLocked, totalGSwopLockedNew)] | |
339 | 332 | else if ((unlockHeight > height)) | |
340 | 333 | then throw(("You can't withdraw till " + toString(unlockHeight))) | |
341 | 334 | else { | |
342 | - | let $ | |
343 | - | let totalSWOPLocked = $ | |
344 | - | let totalGSwopLocked = $ | |
345 | - | let $ | |
346 | - | let userSWOPLocked = $ | |
347 | - | let userGSwopLocked = $ | |
348 | - | let $ | |
349 | - | let userNewInterest = $ | |
350 | - | let claimAmountAvailable = $ | |
335 | + | let $t01149611558 = getTotalLockedInfo() | |
336 | + | let totalSWOPLocked = $t01149611558._1 | |
337 | + | let totalGSwopLocked = $t01149611558._2 | |
338 | + | let $t01156311626 = getUserLockedInfo(user) | |
339 | + | let userSWOPLocked = $t01156311626._1 | |
340 | + | let userGSwopLocked = $t01156311626._2 | |
341 | + | let $t01163111692 = claimCalc(user) | |
342 | + | let userNewInterest = $t01163111692._1 | |
343 | + | let claimAmountAvailable = $t01163111692._2 | |
351 | 344 | let userTotalVoteAmount = getUserTotalVote(i.caller) | |
352 | 345 | let userVoteAmountForNewPool = getUserTotalVoteForNewPoolAmount(i.caller) | |
353 | 346 | let blockedInLaunchpad = getUserBlockedInLauchpad(i.caller) | |
377 | 370 | func claimAndWithdrawSWOP () = valueOrElse(isActive(), { | |
378 | 371 | let user = toString(i.caller) | |
379 | 372 | let availableForClaim = getUserAvailableForClaim(user) | |
380 | - | let $ | |
381 | - | let userNewInterest = $ | |
382 | - | let claimAmount = $ | |
373 | + | let $t01321113263 = claimCalc(user) | |
374 | + | let userNewInterest = $t01321113263._1 | |
375 | + | let claimAmount = $t01321113263._2 | |
383 | 376 | let userClaimAmount = (availableForClaim + claimAmount) | |
384 | 377 | if ((userClaimAmount == 0)) | |
385 | 378 | then throw("You have 0 available SWOP") | |
391 | 384 | @Callable(i) | |
392 | 385 | func claimAndStakeSWOP () = valueOrElse(isActive(), { | |
393 | 386 | let user = toString(i.caller) | |
394 | - | let $ | |
395 | - | let totalSWOPLocked = $ | |
396 | - | let totalGSwopLocked = $ | |
397 | - | let $ | |
398 | - | let userSWOPLocked = $ | |
399 | - | let userGSwopLocked = $ | |
387 | + | let $t01369313755 = getTotalLockedInfo() | |
388 | + | let totalSWOPLocked = $t01369313755._1 | |
389 | + | let totalGSwopLocked = $t01369313755._2 | |
390 | + | let $t01376013823 = getUserLockedInfo(user) | |
391 | + | let userSWOPLocked = $t01376013823._1 | |
392 | + | let userGSwopLocked = $t01376013823._2 | |
400 | 393 | let availableForClaim = getUserAvailableForClaim(user) | |
401 | - | let $ | |
402 | - | let userNewInterest = $ | |
403 | - | let claimAmount = $ | |
394 | + | let $t01388713938 = claimCalc(user) | |
395 | + | let userNewInterest = $t01388713938._1 | |
396 | + | let claimAmount = $t01388713938._2 | |
404 | 397 | let userClaimAmount = (availableForClaim + claimAmount) | |
405 | 398 | let userSWOPLockedNew = (userSWOPLocked + userClaimAmount) | |
406 | 399 | let userGSwopLockedNew = (userGSwopLocked + (userClaimAmount * 2)) | |
415 | 408 | ||
416 | 409 | @Callable(i) | |
417 | 410 | func lockSWOPFromFarming () = valueOrElse(isActive(), { | |
418 | - | let $ | |
419 | - | let pmtAmount = $ | |
420 | - | let pmtAssetId = $ | |
411 | + | let $t01487414949 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
412 | + | let pmtAmount = $t01487414949._1 | |
413 | + | let pmtAssetId = $t01487414949._2 | |
421 | 414 | if ((i.caller != farmingAddr)) | |
422 | 415 | then throw("Only farming can call this function") | |
423 | 416 | else if ((pmtAssetId != SWOP)) | |
425 | 418 | else { | |
426 | 419 | let user = toString(i.originCaller) | |
427 | 420 | let lastInterest = getLastInterestInfo() | |
428 | - | let $ | |
429 | - | let userSWOPLocked = $ | |
430 | - | let userGSwopLocked = $ | |
431 | - | let $ | |
432 | - | let userNewInterest = $ | |
433 | - | let claimAmountAvailable = $ | |
421 | + | let $t01519215255 = getUserLockedInfo(user) | |
422 | + | let userSWOPLocked = $t01519215255._1 | |
423 | + | let userGSwopLocked = $t01519215255._2 | |
424 | + | let $t01526015321 = claimCalc(user) | |
425 | + | let userNewInterest = $t01526015321._1 | |
426 | + | let claimAmountAvailable = $t01526015321._2 | |
434 | 427 | let availableForClaim = getUserAvailableForClaim(user) | |
435 | 428 | let availableForClaimNew = (availableForClaim + claimAmountAvailable) | |
436 | 429 | let userSWOPLockedNew = (userSWOPLocked + pmtAmount) | |
437 | 430 | let userGSwopLockedNew = (userGSwopLocked + (pmtAmount * 2)) | |
438 | - | let $ | |
439 | - | let totalSWOPLocked = $ | |
440 | - | let totalGSwopLocked = $ | |
431 | + | let $t01557315635 = getTotalLockedInfo() | |
432 | + | let totalSWOPLocked = $t01557315635._1 | |
433 | + | let totalGSwopLocked = $t01557315635._2 | |
441 | 434 | let totalSWOPLockedNew = (totalSWOPLocked + pmtAmount) | |
442 | 435 | let totalGSwopLockedNew = (totalGSwopLocked + (pmtAmount * 2)) | |
443 | 436 | [IntegerEntry((user + kUserSwopUnlockHeight), (height + lockSwopBlocksAmount)), IntegerEntry((user + kUserLastInterest), userNewInterest), IntegerEntry((user + kUserSWOPLocked), userSWOPLockedNew), IntegerEntry((user + kUserGSwopLocked), userGSwopLockedNew), IntegerEntry((user + kUserAvailableForClaim), availableForClaimNew), IntegerEntry(kTotalSWOPLocked, totalSWOPLockedNew), IntegerEntry(kTotalGSwopLocked, totalGSwopLockedNew)] | |
578 | 571 | ||
579 | 572 | $f3_2($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
580 | 573 | } | |
581 | - | let $ | |
582 | - | let sumRewardCurrent = $ | |
583 | - | let rewardUpdateHeightFirstPaginationEntry = $ | |
574 | + | let $t02066020771 = getSumReward(sumRewardCurrentTemp, pagination) | |
575 | + | let sumRewardCurrent = $t02066020771._1 | |
576 | + | let rewardUpdateHeightFirstPaginationEntry = $t02066020771._2 | |
584 | 577 | let rewardUpdateHeightEntry = if ((pagination == 2)) | |
585 | 578 | then [IntegerEntry(kRewardUpdateHeight, rewardUpdateHeight)] | |
586 | 579 | else nil |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let kActive = "active" | |
5 | 5 | ||
6 | 6 | let kActiveGlob = "active_all_contracts" | |
7 | 7 | ||
8 | 8 | let kCause = "shutdown_cause" | |
9 | 9 | ||
10 | 10 | let kLastInterest = "last_interest" | |
11 | 11 | ||
12 | 12 | let kUserLastInterest = "_last_interest" | |
13 | 13 | ||
14 | 14 | let kUserSWOPLocked = "_SWOP_amount" | |
15 | 15 | ||
16 | 16 | let kTotalSWOPLocked = "total_SWOP_amount" | |
17 | 17 | ||
18 | 18 | let kUserSwopUnlockHeight = "_SWOP_unlock_height" | |
19 | 19 | ||
20 | 20 | let kUserGSwopLocked = "_GSwop_amount" | |
21 | 21 | ||
22 | 22 | let kTotalGSwopLocked = "total_GSwop_amount" | |
23 | 23 | ||
24 | 24 | let kUserTotalVoteSWOP = "_user_total_vote_gSWOP" | |
25 | 25 | ||
26 | 26 | let kUserAvailableForClaim = "_user_available_for_claim" | |
27 | 27 | ||
28 | 28 | let kRewardPoolFractionCurrent = "_current_pool_fraction_reward" | |
29 | 29 | ||
30 | 30 | let kRewardPoolFractionPrevious = "_previous_pool_fraction_reward" | |
31 | 31 | ||
32 | 32 | let kHeightPoolFraction = "_pool_reward_update_height" | |
33 | 33 | ||
34 | 34 | let kRewardUpdateHeight = "reward_update_height" | |
35 | 35 | ||
36 | 36 | let kRewardUpdateFirstPaginationHeight = "reward_update_height_first_pagination" | |
37 | 37 | ||
38 | 38 | let kNoVotingForNewPool = "_vote_no" | |
39 | 39 | ||
40 | 40 | let kYesVotingForNewPool = "_vote_yes" | |
41 | 41 | ||
42 | 42 | let kStatusOfVotingForNewPool = "_status" | |
43 | 43 | ||
44 | 44 | let kHeightOfPoolVotingForNewPool = "_finish_height" | |
45 | 45 | ||
46 | 46 | let activeVoteFirst = "voting_active_cell_1" | |
47 | 47 | ||
48 | 48 | let activeVoteSecond = "voting_active_cell_2" | |
49 | 49 | ||
50 | 50 | let activeVoteThird = "voting_active_cell_3" | |
51 | 51 | ||
52 | 52 | let kTempCurSum = "sum_reward_current" | |
53 | 53 | ||
54 | 54 | let kLaunchpadBoughtTickets = "_bought_tickets" | |
55 | 55 | ||
56 | 56 | let kLaunchpadSwopPerTickets = "_swop_per_ticket" | |
57 | 57 | ||
58 | 58 | let kLaunchpadActiveId = "launchpad_active_id" | |
59 | 59 | ||
60 | 60 | let kLaunchpadDuration = "_duration" | |
61 | 61 | ||
62 | 62 | let kLaunchpadStartHeight = "_start_height" | |
63 | 63 | ||
64 | 64 | let kStartHeight = "start_height" | |
65 | 65 | ||
66 | 66 | let kBasePeriod = "base_period" | |
67 | 67 | ||
68 | 68 | let kPeriodLength = "period_length" | |
69 | 69 | ||
70 | 70 | let kUserTotalStruc = "_user_total_struc" | |
71 | 71 | ||
72 | 72 | let kLauchpadFreezSwopDuration = "_freeze_swop_duration" | |
73 | 73 | ||
74 | 74 | let kSWOPid = "SWOP_id" | |
75 | 75 | ||
76 | 76 | let kAirdropFee = "airdrop_fee" | |
77 | 77 | ||
78 | 78 | let kAdminPubKey1 = "admin_pub_1" | |
79 | 79 | ||
80 | 80 | let kAdminPubKey2 = "admin_pub_2" | |
81 | 81 | ||
82 | 82 | let kAdminPubKey3 = "admin_pub_3" | |
83 | 83 | ||
84 | 84 | let kMoneyBoxPubKey = "money_box_pub_key" | |
85 | 85 | ||
86 | 86 | let kFarmingAddr = "farming_address" | |
87 | 87 | ||
88 | 88 | let kVotingAddr = "voting_address" | |
89 | 89 | ||
90 | 90 | let kVotingNewPoolAddr = "voting_new_pool_address" | |
91 | 91 | ||
92 | 92 | let kLaunchpadAddr = "launchpad_address" | |
93 | 93 | ||
94 | - | let kAirdropMoneyBoxAddr = "airdrop_fee_money_box" | |
95 | - | ||
96 | 94 | let kOraclePool = "pool_" | |
97 | 95 | ||
98 | 96 | let oracle = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
99 | 97 | ||
100 | 98 | func getBase58FromOracle (key) = match getString(oracle, key) { | |
101 | 99 | case string: String => | |
102 | 100 | fromBase58String(string) | |
103 | 101 | case nothing => | |
104 | 102 | throw((key + "is empty")) | |
105 | 103 | } | |
106 | 104 | ||
107 | 105 | ||
108 | 106 | let adminPubKey1 = getBase58FromOracle(kAdminPubKey1) | |
109 | 107 | ||
110 | 108 | let adminPubKey2 = getBase58FromOracle(kAdminPubKey2) | |
111 | 109 | ||
112 | 110 | let adminPubKey3 = getBase58FromOracle(kAdminPubKey3) | |
113 | 111 | ||
114 | 112 | let moneyBoxPubKey = getBase58FromOracle(kMoneyBoxPubKey) | |
115 | 113 | ||
116 | 114 | let farmingAddr = Address(getBase58FromOracle(kFarmingAddr)) | |
117 | 115 | ||
118 | 116 | let votingAddr = Address(getBase58FromOracle(kVotingAddr)) | |
119 | 117 | ||
120 | 118 | let votingNewPoolAddr = Address(getBase58FromOracle(kVotingNewPoolAddr)) | |
121 | 119 | ||
122 | 120 | let launchpadAddr = Address(getBase58FromOracle(kLaunchpadAddr)) | |
123 | 121 | ||
124 | - | let airdropMoneyBoxAddr = Address(getBase58FromOracle(kAirdropMoneyBoxAddr)) | |
125 | - | ||
126 | 122 | let lockSwopBlocksAmount = (10102 * 4) | |
127 | 123 | ||
128 | 124 | let SWOP = fromBase58String(getStringValue(farmingAddr, kSWOPid)) | |
129 | 125 | ||
130 | 126 | let scaleValue = 100000000 | |
131 | 127 | ||
132 | 128 | let totalVoteShare = 10000000000 | |
133 | 129 | ||
134 | 130 | let feeSacle6 = 1000000 | |
135 | 131 | ||
136 | 132 | let basePeriod = valueOrErrorMessage(getInteger(votingAddr, kBasePeriod), "Empty kBasePeriod at voting contract") | |
137 | 133 | ||
138 | 134 | let startHeight = valueOrErrorMessage(getInteger(votingAddr, kStartHeight), "Empty kStartHeight at voting contract") | |
139 | 135 | ||
140 | 136 | let periodLength = valueOrErrorMessage(getInteger(votingAddr, kPeriodLength), "Empty kPeriodLength at voting contract") | |
141 | 137 | ||
142 | 138 | let firstActiveVote = valueOrElse(getString(votingNewPoolAddr, activeVoteFirst), "") | |
143 | 139 | ||
144 | 140 | let secondActiveVote = valueOrElse(getString(votingNewPoolAddr, activeVoteSecond), "") | |
145 | 141 | ||
146 | 142 | let thirdActiveVote = valueOrElse(getString(votingNewPoolAddr, activeVoteThird), "") | |
147 | 143 | ||
148 | 144 | let active = valueOrElse(getBoolean(this, kActive), true) | |
149 | 145 | ||
150 | 146 | let activeGlob = valueOrElse(getBoolean(oracle, kActiveGlob), true) | |
151 | - | ||
152 | - | let airdropFee = getIntegerValue(oracle, kAirdropFee) | |
153 | 147 | ||
154 | 148 | let currVotingPeriod = (basePeriod + ((height - startHeight) / periodLength)) | |
155 | 149 | ||
156 | 150 | func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)] | |
157 | 151 | ||
158 | 152 | ||
159 | 153 | func isActive () = if (if (active) | |
160 | 154 | then activeGlob | |
161 | 155 | else false) | |
162 | 156 | then unit | |
163 | 157 | else throw("DApp is inactive at this moment") | |
164 | 158 | ||
165 | 159 | ||
166 | 160 | func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
167 | 161 | then unit | |
168 | 162 | else throw("Only admin can call this function") | |
169 | 163 | ||
170 | 164 | ||
171 | 165 | func getLastInterestInfo () = valueOrElse(getInteger(this, kLastInterest), 0) | |
172 | 166 | ||
173 | 167 | ||
174 | 168 | func getTotalLockedInfo () = { | |
175 | 169 | let totalSwopLocked = valueOrElse(getInteger(this, kTotalSWOPLocked), 0) | |
176 | 170 | let totalGSwopLocked = valueOrElse(getInteger(this, kTotalGSwopLocked), totalSwopLocked) | |
177 | 171 | $Tuple2(totalSwopLocked, totalGSwopLocked) | |
178 | 172 | } | |
179 | 173 | ||
180 | 174 | ||
181 | 175 | func getUserLockedInfo (user) = { | |
182 | 176 | let userSwopLocked = valueOrElse(getInteger(this, (user + kUserSWOPLocked)), 0) | |
183 | 177 | let userGSwopLocked = valueOrElse(getInteger(this, (user + kUserGSwopLocked)), userSwopLocked) | |
184 | 178 | $Tuple2(userSwopLocked, userGSwopLocked) | |
185 | 179 | } | |
186 | 180 | ||
187 | 181 | ||
188 | 182 | func getUserInterestInfo (user,lastInterest) = { | |
189 | - | let $ | |
190 | - | let userSWOPAmount = $ | |
191 | - | let userGSwopAmount = $ | |
183 | + | let $t048554918 = getUserLockedInfo(user) | |
184 | + | let userSWOPAmount = $t048554918._1 | |
185 | + | let userGSwopAmount = $t048554918._2 | |
192 | 186 | let userLastInterest = valueOrElse(getInteger(this, (user + kUserLastInterest)), lastInterest) | |
193 | 187 | $Tuple3(userLastInterest, userSWOPAmount, userGSwopAmount) | |
194 | 188 | } | |
195 | 189 | ||
196 | 190 | ||
197 | 191 | func getUserAvailableForClaim (user) = valueOrElse(getInteger(this, (user + kUserAvailableForClaim)), 0) | |
198 | 192 | ||
199 | 193 | ||
200 | 194 | func getUserTotalVoteAmountForOnePool (pool,user) = { | |
201 | 195 | let voting = valueOrElse(getInteger(votingNewPoolAddr, pool), -1) | |
202 | 196 | let heightOfVoting = valueOrElse(getInteger(votingNewPoolAddr, (toString(voting) + kHeightOfPoolVotingForNewPool)), 0) | |
203 | 197 | let statusOfVoting = valueOrElse(getBoolean(votingNewPoolAddr, (toString(voting) + kStatusOfVotingForNewPool)), true) | |
204 | 198 | let currentHeight = height | |
205 | 199 | if ((0 > voting)) | |
206 | 200 | then 0 | |
207 | 201 | else if (!(statusOfVoting)) | |
208 | 202 | then 0 | |
209 | 203 | else if ((heightOfVoting > currentHeight)) | |
210 | 204 | then (valueOrElse(getInteger(votingNewPoolAddr, (((toString(user) + "_") + toString(voting)) + kYesVotingForNewPool)), 0) + valueOrElse(getInteger(votingNewPoolAddr, (((toString(user) + "_") + toString(voting)) + kNoVotingForNewPool)), 0)) | |
211 | 205 | else 0 | |
212 | 206 | } | |
213 | 207 | ||
214 | 208 | ||
215 | 209 | func getUserTotalVoteForNewPoolAmount (user) = { | |
216 | 210 | let listOfVoting = [getUserTotalVoteAmountForOnePool(firstActiveVote, user), getUserTotalVoteAmountForOnePool(secondActiveVote, user), getUserTotalVoteAmountForOnePool(thirdActiveVote, user)] | |
217 | 211 | max(listOfVoting) | |
218 | 212 | } | |
219 | 213 | ||
220 | 214 | ||
221 | 215 | func getUserBlockedInLauchpad (user) = { | |
222 | 216 | let lauchpadId = toString(valueOrElse(getInteger(launchpadAddr, kLaunchpadActiveId), 0)) | |
223 | 217 | if ((lauchpadId == "0")) | |
224 | 218 | then 0 | |
225 | 219 | else { | |
226 | 220 | let lStartHeight = valueOrElse(getInteger(launchpadAddr, (lauchpadId + kLaunchpadStartHeight)), 0) | |
227 | 221 | let lDuration = valueOrElse(getInteger(launchpadAddr, (lauchpadId + kLaunchpadDuration)), 0) | |
228 | 222 | let lFreezeSwopDuration = valueOrElse(getInteger(launchpadAddr, (lauchpadId + kLauchpadFreezSwopDuration)), 0) | |
229 | 223 | let blockEndHeight = ((lStartHeight + lDuration) + lFreezeSwopDuration) | |
230 | 224 | if ((height > blockEndHeight)) | |
231 | 225 | then 0 | |
232 | 226 | else { | |
233 | 227 | let boughtTickets = valueOrElse(getInteger(launchpadAddr, (((toString(user) + "_") + lauchpadId) + kLaunchpadBoughtTickets)), 0) | |
234 | 228 | let swopPerTicket = valueOrElse(getInteger(launchpadAddr, (lauchpadId + kLaunchpadSwopPerTickets)), 0) | |
235 | 229 | (boughtTickets * swopPerTicket) | |
236 | 230 | } | |
237 | 231 | } | |
238 | 232 | } | |
239 | 233 | ||
240 | 234 | ||
241 | 235 | func getUserTotalVote (user) = if (isDefined(getString(votingAddr, (toString(user) + kUserTotalStruc)))) | |
242 | 236 | then parseIntValue(split(valueOrErrorMessage(getString(votingAddr, (toString(user) + kUserTotalStruc)), "Empty kUserTotalStruc"), "_")[0]) | |
243 | 237 | else valueOrElse(getInteger(votingAddr, (toString(user) + kUserTotalVoteSWOP)), 0) | |
244 | 238 | ||
245 | 239 | ||
246 | 240 | func getPoolUpdateHeight (pool) = valueOrElse(getInteger(this, (pool + kHeightPoolFraction)), 0) | |
247 | 241 | ||
248 | 242 | ||
249 | 243 | func isDefinePoolUpdateHeight (pool) = isDefined(getInteger(this, (pool + kHeightPoolFraction))) | |
250 | 244 | ||
251 | 245 | ||
252 | 246 | func getCurPoolWeight (pool) = valueOrElse(getInteger(this, (pool + kRewardPoolFractionCurrent)), 0) | |
253 | 247 | ||
254 | 248 | ||
255 | 249 | func getPrevPoolWeight (pool) = valueOrElse(getInteger(this, (pool + kRewardPoolFractionPrevious)), 0) | |
256 | 250 | ||
257 | 251 | ||
258 | 252 | func claimCalc (user) = { | |
259 | 253 | let lastInterest = getLastInterestInfo() | |
260 | - | let $ | |
261 | - | let userLastInterest = $ | |
262 | - | let userSWOPLocked = $ | |
263 | - | let userGSwopAmount = $ | |
254 | + | let $t083438440 = getUserInterestInfo(user, lastInterest) | |
255 | + | let userLastInterest = $t083438440._1 | |
256 | + | let userSWOPLocked = $t083438440._2 | |
257 | + | let userGSwopAmount = $t083438440._3 | |
264 | 258 | let claimAmount = fraction(userGSwopAmount, (lastInterest - userLastInterest), scaleValue) | |
265 | 259 | let userNewInterest = lastInterest | |
266 | 260 | $Tuple2(userNewInterest, claimAmount) | |
267 | 261 | } | |
268 | 262 | ||
269 | 263 | ||
270 | 264 | func isOraclePool (poolAddress) = if (isDefined(getString(oracle, (kOraclePool + poolAddress)))) | |
271 | 265 | then unit | |
272 | 266 | else throw("DApp is not registered pool") | |
273 | 267 | ||
274 | 268 | ||
275 | 269 | @Callable(i) | |
276 | 270 | func addPool (poolAddress) = valueOrElse(isAdminCall(i), valueOrElse(isActive(), valueOrElse(isOraclePool(poolAddress), if (isDefined(getInteger(this, (poolAddress + kRewardPoolFractionCurrent)))) | |
277 | 271 | then throw("Pool already in governance") | |
278 | 272 | else [IntegerEntry((poolAddress + kRewardPoolFractionCurrent), 0), IntegerEntry((poolAddress + kRewardPoolFractionPrevious), 0), IntegerEntry((poolAddress + kHeightPoolFraction), getIntegerValue(this, kRewardUpdateHeight))]))) | |
279 | 273 | ||
280 | 274 | ||
281 | 275 | ||
282 | 276 | @Callable(i) | |
283 | 277 | func airDrop () = valueOrElse(isActive(), { | |
284 | - | let $ | |
285 | - | let pmtAmount = $ | |
286 | - | let pmtAssetId = $ | |
278 | + | let $t093399414 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
279 | + | let pmtAmount = $t093399414._1 | |
280 | + | let pmtAssetId = $t093399414._2 | |
287 | 281 | if ((pmtAssetId != SWOP)) | |
288 | 282 | then throw("Incorrect pmtAssetId") | |
289 | 283 | else { | |
290 | - | let airdropFeeAmount = fraction(pmtAmount, airdropFee, feeSacle6, CEILING) | |
291 | - | let $t097689830 = getTotalLockedInfo() | |
292 | - | let totalSWOPLocked = $t097689830._1 | |
293 | - | let totalGSwopLocked = $t097689830._2 | |
284 | + | let $t095059567 = getTotalLockedInfo() | |
285 | + | let totalSWOPLocked = $t095059567._1 | |
286 | + | let totalGSwopLocked = $t095059567._2 | |
294 | 287 | let lastInterest = getLastInterestInfo() | |
295 | - | let interestNew = (lastInterest + fraction( | |
296 | - | [IntegerEntry(kLastInterest, interestNew) | |
288 | + | let interestNew = (lastInterest + fraction(pmtAmount, scaleValue, totalGSwopLocked)) | |
289 | + | [IntegerEntry(kLastInterest, interestNew)] | |
297 | 290 | } | |
298 | 291 | }) | |
299 | 292 | ||
300 | 293 | ||
301 | 294 | ||
302 | 295 | @Callable(i) | |
303 | 296 | func lockSWOP () = valueOrElse(isActive(), { | |
304 | - | let $ | |
305 | - | let pmtAmount = $ | |
306 | - | let pmtAssetId = $ | |
297 | + | let $t098539928 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
298 | + | let pmtAmount = $t098539928._1 | |
299 | + | let pmtAssetId = $t098539928._2 | |
307 | 300 | if ((pmtAssetId != SWOP)) | |
308 | 301 | then throw("Incorrect pmtAssetId") | |
309 | 302 | else { | |
310 | 303 | let user = toString(i.caller) | |
311 | 304 | let lastInterest = getLastInterestInfo() | |
312 | - | let $ | |
313 | - | let userSWOPLocked = $ | |
314 | - | let userGSwopLocked = $ | |
315 | - | let $ | |
316 | - | let userNewInterest = $ | |
317 | - | let claimAmountAvailable = $ | |
305 | + | let $t01007910142 = getUserLockedInfo(user) | |
306 | + | let userSWOPLocked = $t01007910142._1 | |
307 | + | let userGSwopLocked = $t01007910142._2 | |
308 | + | let $t01014710208 = claimCalc(user) | |
309 | + | let userNewInterest = $t01014710208._1 | |
310 | + | let claimAmountAvailable = $t01014710208._2 | |
318 | 311 | let availableForClaim = getUserAvailableForClaim(user) | |
319 | 312 | let availableForClaimNew = (availableForClaim + claimAmountAvailable) | |
320 | 313 | let userSWOPLockedNew = (userSWOPLocked + pmtAmount) | |
321 | 314 | let userGSwopLockedNew = (userGSwopLocked + pmtAmount) | |
322 | - | let $ | |
323 | - | let totalSWOPLocked = $ | |
324 | - | let totalGSwopLocked = $ | |
315 | + | let $t01045610518 = getTotalLockedInfo() | |
316 | + | let totalSWOPLocked = $t01045610518._1 | |
317 | + | let totalGSwopLocked = $t01045610518._2 | |
325 | 318 | let totalSWOPLockedNew = (totalSWOPLocked + pmtAmount) | |
326 | 319 | let totalGSwopLockedNew = (totalGSwopLocked + pmtAmount) | |
327 | 320 | [IntegerEntry((user + kUserSwopUnlockHeight), (height + lockSwopBlocksAmount)), IntegerEntry((user + kUserLastInterest), userNewInterest), IntegerEntry((user + kUserSWOPLocked), userSWOPLockedNew), IntegerEntry((user + kUserGSwopLocked), userGSwopLockedNew), IntegerEntry((user + kUserAvailableForClaim), availableForClaimNew), IntegerEntry(kTotalSWOPLocked, totalSWOPLockedNew), IntegerEntry(kTotalGSwopLocked, totalGSwopLockedNew)] | |
328 | 321 | } | |
329 | 322 | }) | |
330 | 323 | ||
331 | 324 | ||
332 | 325 | ||
333 | 326 | @Callable(i) | |
334 | 327 | func withdrawSWOP (withdrawAmount) = valueOrElse(isActive(), { | |
335 | 328 | let user = toString(i.caller) | |
336 | 329 | let unlockHeight = valueOrElse(getInteger(this, (user + kUserSwopUnlockHeight)), 0) | |
337 | 330 | if ((0 >= withdrawAmount)) | |
338 | 331 | then throw("withdrawAmount <= 0") | |
339 | 332 | else if ((unlockHeight > height)) | |
340 | 333 | then throw(("You can't withdraw till " + toString(unlockHeight))) | |
341 | 334 | else { | |
342 | - | let $ | |
343 | - | let totalSWOPLocked = $ | |
344 | - | let totalGSwopLocked = $ | |
345 | - | let $ | |
346 | - | let userSWOPLocked = $ | |
347 | - | let userGSwopLocked = $ | |
348 | - | let $ | |
349 | - | let userNewInterest = $ | |
350 | - | let claimAmountAvailable = $ | |
335 | + | let $t01149611558 = getTotalLockedInfo() | |
336 | + | let totalSWOPLocked = $t01149611558._1 | |
337 | + | let totalGSwopLocked = $t01149611558._2 | |
338 | + | let $t01156311626 = getUserLockedInfo(user) | |
339 | + | let userSWOPLocked = $t01156311626._1 | |
340 | + | let userGSwopLocked = $t01156311626._2 | |
341 | + | let $t01163111692 = claimCalc(user) | |
342 | + | let userNewInterest = $t01163111692._1 | |
343 | + | let claimAmountAvailable = $t01163111692._2 | |
351 | 344 | let userTotalVoteAmount = getUserTotalVote(i.caller) | |
352 | 345 | let userVoteAmountForNewPool = getUserTotalVoteForNewPoolAmount(i.caller) | |
353 | 346 | let blockedInLaunchpad = getUserBlockedInLauchpad(i.caller) | |
354 | 347 | if (if ((0 > userTotalVoteAmount)) | |
355 | 348 | then true | |
356 | 349 | else (0 > userVoteAmountForNewPool)) | |
357 | 350 | then throw("userVoteAmount < 0 || userVoteAmountForNewPool < 0") | |
358 | 351 | else { | |
359 | 352 | let availableToUnstake = (userSWOPLocked - max([userVoteAmountForNewPool, userTotalVoteAmount, blockedInLaunchpad])) | |
360 | 353 | if ((withdrawAmount > availableToUnstake)) | |
361 | 354 | then throw("withdrawAmount > availableToUnstake") | |
362 | 355 | else { | |
363 | 356 | let availableForClaim = getUserAvailableForClaim(user) | |
364 | 357 | let availableForClaimNew = (availableForClaim + claimAmountAvailable) | |
365 | 358 | let totalSWOPLockedNew = (totalSWOPLocked - withdrawAmount) | |
366 | 359 | let userSWOPAmountNew = (userSWOPLocked - withdrawAmount) | |
367 | 360 | let totalGSwopLockedNew = ((totalGSwopLocked - userGSwopLocked) + userSWOPAmountNew) | |
368 | 361 | [IntegerEntry((user + kUserLastInterest), userNewInterest), IntegerEntry((user + kUserSWOPLocked), userSWOPAmountNew), IntegerEntry((user + kUserGSwopLocked), userSWOPAmountNew), IntegerEntry((user + kUserAvailableForClaim), availableForClaimNew), IntegerEntry(kTotalSWOPLocked, totalSWOPLockedNew), IntegerEntry(kTotalGSwopLocked, totalGSwopLockedNew), ScriptTransfer(i.caller, withdrawAmount, SWOP)] | |
369 | 362 | } | |
370 | 363 | } | |
371 | 364 | } | |
372 | 365 | }) | |
373 | 366 | ||
374 | 367 | ||
375 | 368 | ||
376 | 369 | @Callable(i) | |
377 | 370 | func claimAndWithdrawSWOP () = valueOrElse(isActive(), { | |
378 | 371 | let user = toString(i.caller) | |
379 | 372 | let availableForClaim = getUserAvailableForClaim(user) | |
380 | - | let $ | |
381 | - | let userNewInterest = $ | |
382 | - | let claimAmount = $ | |
373 | + | let $t01321113263 = claimCalc(user) | |
374 | + | let userNewInterest = $t01321113263._1 | |
375 | + | let claimAmount = $t01321113263._2 | |
383 | 376 | let userClaimAmount = (availableForClaim + claimAmount) | |
384 | 377 | if ((userClaimAmount == 0)) | |
385 | 378 | then throw("You have 0 available SWOP") | |
386 | 379 | else [IntegerEntry((user + kUserLastInterest), userNewInterest), IntegerEntry((user + kUserAvailableForClaim), 0), ScriptTransfer(i.caller, userClaimAmount, SWOP)] | |
387 | 380 | }) | |
388 | 381 | ||
389 | 382 | ||
390 | 383 | ||
391 | 384 | @Callable(i) | |
392 | 385 | func claimAndStakeSWOP () = valueOrElse(isActive(), { | |
393 | 386 | let user = toString(i.caller) | |
394 | - | let $ | |
395 | - | let totalSWOPLocked = $ | |
396 | - | let totalGSwopLocked = $ | |
397 | - | let $ | |
398 | - | let userSWOPLocked = $ | |
399 | - | let userGSwopLocked = $ | |
387 | + | let $t01369313755 = getTotalLockedInfo() | |
388 | + | let totalSWOPLocked = $t01369313755._1 | |
389 | + | let totalGSwopLocked = $t01369313755._2 | |
390 | + | let $t01376013823 = getUserLockedInfo(user) | |
391 | + | let userSWOPLocked = $t01376013823._1 | |
392 | + | let userGSwopLocked = $t01376013823._2 | |
400 | 393 | let availableForClaim = getUserAvailableForClaim(user) | |
401 | - | let $ | |
402 | - | let userNewInterest = $ | |
403 | - | let claimAmount = $ | |
394 | + | let $t01388713938 = claimCalc(user) | |
395 | + | let userNewInterest = $t01388713938._1 | |
396 | + | let claimAmount = $t01388713938._2 | |
404 | 397 | let userClaimAmount = (availableForClaim + claimAmount) | |
405 | 398 | let userSWOPLockedNew = (userSWOPLocked + userClaimAmount) | |
406 | 399 | let userGSwopLockedNew = (userGSwopLocked + (userClaimAmount * 2)) | |
407 | 400 | let totalSWOPLockedNew = (totalSWOPLocked + userClaimAmount) | |
408 | 401 | let totalGSwopLockedNew = (totalGSwopLocked + (userClaimAmount * 2)) | |
409 | 402 | if ((userClaimAmount == 0)) | |
410 | 403 | then throw("You have 0 available SWOP") | |
411 | 404 | else [IntegerEntry((user + kUserSwopUnlockHeight), (height + lockSwopBlocksAmount)), IntegerEntry((user + kUserLastInterest), userNewInterest), IntegerEntry(kTotalSWOPLocked, totalSWOPLockedNew), IntegerEntry(kTotalGSwopLocked, totalGSwopLockedNew), IntegerEntry((user + kUserSWOPLocked), userSWOPLockedNew), IntegerEntry((user + kUserGSwopLocked), userGSwopLockedNew), IntegerEntry((user + kUserAvailableForClaim), 0)] | |
412 | 405 | }) | |
413 | 406 | ||
414 | 407 | ||
415 | 408 | ||
416 | 409 | @Callable(i) | |
417 | 410 | func lockSWOPFromFarming () = valueOrElse(isActive(), { | |
418 | - | let $ | |
419 | - | let pmtAmount = $ | |
420 | - | let pmtAssetId = $ | |
411 | + | let $t01487414949 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
412 | + | let pmtAmount = $t01487414949._1 | |
413 | + | let pmtAssetId = $t01487414949._2 | |
421 | 414 | if ((i.caller != farmingAddr)) | |
422 | 415 | then throw("Only farming can call this function") | |
423 | 416 | else if ((pmtAssetId != SWOP)) | |
424 | 417 | then throw("Incorrect pmtAssetId") | |
425 | 418 | else { | |
426 | 419 | let user = toString(i.originCaller) | |
427 | 420 | let lastInterest = getLastInterestInfo() | |
428 | - | let $ | |
429 | - | let userSWOPLocked = $ | |
430 | - | let userGSwopLocked = $ | |
431 | - | let $ | |
432 | - | let userNewInterest = $ | |
433 | - | let claimAmountAvailable = $ | |
421 | + | let $t01519215255 = getUserLockedInfo(user) | |
422 | + | let userSWOPLocked = $t01519215255._1 | |
423 | + | let userGSwopLocked = $t01519215255._2 | |
424 | + | let $t01526015321 = claimCalc(user) | |
425 | + | let userNewInterest = $t01526015321._1 | |
426 | + | let claimAmountAvailable = $t01526015321._2 | |
434 | 427 | let availableForClaim = getUserAvailableForClaim(user) | |
435 | 428 | let availableForClaimNew = (availableForClaim + claimAmountAvailable) | |
436 | 429 | let userSWOPLockedNew = (userSWOPLocked + pmtAmount) | |
437 | 430 | let userGSwopLockedNew = (userGSwopLocked + (pmtAmount * 2)) | |
438 | - | let $ | |
439 | - | let totalSWOPLocked = $ | |
440 | - | let totalGSwopLocked = $ | |
431 | + | let $t01557315635 = getTotalLockedInfo() | |
432 | + | let totalSWOPLocked = $t01557315635._1 | |
433 | + | let totalGSwopLocked = $t01557315635._2 | |
441 | 434 | let totalSWOPLockedNew = (totalSWOPLocked + pmtAmount) | |
442 | 435 | let totalGSwopLockedNew = (totalGSwopLocked + (pmtAmount * 2)) | |
443 | 436 | [IntegerEntry((user + kUserSwopUnlockHeight), (height + lockSwopBlocksAmount)), IntegerEntry((user + kUserLastInterest), userNewInterest), IntegerEntry((user + kUserSWOPLocked), userSWOPLockedNew), IntegerEntry((user + kUserGSwopLocked), userGSwopLockedNew), IntegerEntry((user + kUserAvailableForClaim), availableForClaimNew), IntegerEntry(kTotalSWOPLocked, totalSWOPLockedNew), IntegerEntry(kTotalGSwopLocked, totalGSwopLockedNew)] | |
444 | 437 | } | |
445 | 438 | }) | |
446 | 439 | ||
447 | 440 | ||
448 | 441 | ||
449 | 442 | @Callable(i) | |
450 | 443 | func updateWeights (currentPools,currentRewards,rewardUpdateHeight,pagination) = valueOrElse(isActive(), { | |
451 | 444 | let amountPools = 10 | |
452 | 445 | let totalRewardUpdateHeight = valueOrElse(getInteger(this, kRewardUpdateHeight), 0) | |
453 | 446 | if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, moneyBoxPubKey], i.callerPublicKey))) | |
454 | 447 | then throw("Only admin can call this function") | |
455 | 448 | else if ((size(currentPools) > amountPools)) | |
456 | 449 | then throw(("Max amount of pool is " + toString(amountPools))) | |
457 | 450 | else if ((totalRewardUpdateHeight >= rewardUpdateHeight)) | |
458 | 451 | then throw("rewardUpdateHeight <= totalRewardUpdateHeight") | |
459 | 452 | else if ((height >= rewardUpdateHeight)) | |
460 | 453 | then throw("height >= rewardUpdateHeight") | |
461 | 454 | else if ((0 >= rewardUpdateHeight)) | |
462 | 455 | then throw("0 >= rewardUpdateHeight ") | |
463 | 456 | else { | |
464 | 457 | func sum (a,b) = (a + b) | |
465 | 458 | ||
466 | 459 | func changePreviousRewardEntry (accumulated,pool) = { | |
467 | 460 | let poolRewardUpdateHeight = getPoolUpdateHeight(pool) | |
468 | 461 | if (if (!(isDefinePoolUpdateHeight(pool))) | |
469 | 462 | then true | |
470 | 463 | else if ((rewardUpdateHeight != poolRewardUpdateHeight)) | |
471 | 464 | then (poolRewardUpdateHeight == totalRewardUpdateHeight) | |
472 | 465 | else false) | |
473 | 466 | then { | |
474 | 467 | let poolReward = getCurPoolWeight(pool) | |
475 | 468 | IntegerEntry((pool + kRewardPoolFractionPrevious), poolReward) :: accumulated | |
476 | 469 | } | |
477 | 470 | else { | |
478 | 471 | let poolReward = getPrevPoolWeight(pool) | |
479 | 472 | IntegerEntry((pool + kRewardPoolFractionPrevious), poolReward) :: accumulated | |
480 | 473 | } | |
481 | 474 | } | |
482 | 475 | ||
483 | 476 | func changeCurrentRewardEntry (accumulated,pool) = { | |
484 | 477 | let poolIndex = value(indexOf(currentPools, pool)) | |
485 | 478 | let poolReward = currentRewards[poolIndex] | |
486 | 479 | if ((0 > poolReward)) | |
487 | 480 | then throw("PoolReward < 0") | |
488 | 481 | else IntegerEntry((pool + kRewardPoolFractionCurrent), poolReward) :: accumulated | |
489 | 482 | } | |
490 | 483 | ||
491 | 484 | func changeHeightEntry (accumulated,pool) = { | |
492 | 485 | let poolHeight = rewardUpdateHeight | |
493 | 486 | let upUIntr = invoke(farmingAddr, "updatePoolInterest", [pool], nil) | |
494 | 487 | if ((upUIntr == upUIntr)) | |
495 | 488 | then IntegerEntry((pool + kHeightPoolFraction), poolHeight) :: accumulated | |
496 | 489 | else throw("Strict value is not equal to itself.") | |
497 | 490 | } | |
498 | 491 | ||
499 | 492 | func getSumReward (curTempSum,pagination) = if ((pagination == 0)) | |
500 | 493 | then if ((curTempSum > totalVoteShare)) | |
501 | 494 | then throw(((("sumRewardPrevious > totalVoteShare or sumRewardCurrent > totalVoteShare - " + toString(pagination)) + " ") + toString(curTempSum))) | |
502 | 495 | else $Tuple2([IntegerEntry(kTempCurSum, curTempSum)], [IntegerEntry(kRewardUpdateFirstPaginationHeight, rewardUpdateHeight)]) | |
503 | 496 | else if ((pagination == 1)) | |
504 | 497 | then { | |
505 | 498 | let curTempSumFromKey = valueOrElse(getInteger(this, kTempCurSum), 0) | |
506 | 499 | let rewardUpdateHeightFirstPaginationEntry = valueOrElse(getInteger(this, kRewardUpdateFirstPaginationHeight), 0) | |
507 | 500 | if (((curTempSum + curTempSumFromKey) > totalVoteShare)) | |
508 | 501 | then throw(((("sumRewardPrevious > totalVoteShare or sumRewardCurrent > totalVoteShare - " + toString(pagination)) + " ") + toString((curTempSum + curTempSumFromKey)))) | |
509 | 502 | else if ((rewardUpdateHeightFirstPaginationEntry != rewardUpdateHeight)) | |
510 | 503 | then throw("current rewardUpdateHeight != rewardUpdateHeightFirstPaginationEntry") | |
511 | 504 | else $Tuple2([IntegerEntry(kTempCurSum, (curTempSum + curTempSumFromKey))], nil) | |
512 | 505 | } | |
513 | 506 | else if ((pagination == 2)) | |
514 | 507 | then { | |
515 | 508 | let curSum = (valueOrElse(getInteger(this, kTempCurSum), 0) + curTempSum) | |
516 | 509 | let rewardUpdateHeightFirstPaginationEntry = valueOrElse(getInteger(this, kRewardUpdateFirstPaginationHeight), 0) | |
517 | 510 | if ((curSum != totalVoteShare)) | |
518 | 511 | then throw("sumRewardPrevious != totalVoteShare or sumRewardCurrent != totalVoteShare") | |
519 | 512 | else if ((rewardUpdateHeightFirstPaginationEntry != rewardUpdateHeight)) | |
520 | 513 | then throw("current rewardUpdateHeight != rewardUpdateHeightFirstPaginationEntry") | |
521 | 514 | else $Tuple2([IntegerEntry(kTempCurSum, curSum)], nil) | |
522 | 515 | } | |
523 | 516 | else throw("Incorrect pagination") | |
524 | 517 | ||
525 | 518 | let previousRewardEntryNew = { | |
526 | 519 | let $l = currentPools | |
527 | 520 | let $s = size($l) | |
528 | 521 | let $acc0 = nil | |
529 | 522 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
530 | 523 | then $a | |
531 | 524 | else changePreviousRewardEntry($a, $l[$i]) | |
532 | 525 | ||
533 | 526 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
534 | 527 | then $a | |
535 | 528 | else throw("List size exceeds 10") | |
536 | 529 | ||
537 | 530 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
538 | 531 | } | |
539 | 532 | let currentRewardEntryNew = { | |
540 | 533 | let $l = currentPools | |
541 | 534 | let $s = size($l) | |
542 | 535 | let $acc0 = nil | |
543 | 536 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
544 | 537 | then $a | |
545 | 538 | else changeCurrentRewardEntry($a, $l[$i]) | |
546 | 539 | ||
547 | 540 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
548 | 541 | then $a | |
549 | 542 | else throw("List size exceeds 10") | |
550 | 543 | ||
551 | 544 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
552 | 545 | } | |
553 | 546 | let heightEntryNewCur = { | |
554 | 547 | let $l = currentPools | |
555 | 548 | let $s = size($l) | |
556 | 549 | let $acc0 = nil | |
557 | 550 | func $f2_1 ($a,$i) = if (($i >= $s)) | |
558 | 551 | then $a | |
559 | 552 | else changeHeightEntry($a, $l[$i]) | |
560 | 553 | ||
561 | 554 | func $f2_2 ($a,$i) = if (($i >= $s)) | |
562 | 555 | then $a | |
563 | 556 | else throw("List size exceeds 10") | |
564 | 557 | ||
565 | 558 | $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
566 | 559 | } | |
567 | 560 | let sumRewardCurrentTemp = { | |
568 | 561 | let $l = currentRewards | |
569 | 562 | let $s = size($l) | |
570 | 563 | let $acc0 = 0 | |
571 | 564 | func $f3_1 ($a,$i) = if (($i >= $s)) | |
572 | 565 | then $a | |
573 | 566 | else sum($a, $l[$i]) | |
574 | 567 | ||
575 | 568 | func $f3_2 ($a,$i) = if (($i >= $s)) | |
576 | 569 | then $a | |
577 | 570 | else throw("List size exceeds 10") | |
578 | 571 | ||
579 | 572 | $f3_2($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
580 | 573 | } | |
581 | - | let $ | |
582 | - | let sumRewardCurrent = $ | |
583 | - | let rewardUpdateHeightFirstPaginationEntry = $ | |
574 | + | let $t02066020771 = getSumReward(sumRewardCurrentTemp, pagination) | |
575 | + | let sumRewardCurrent = $t02066020771._1 | |
576 | + | let rewardUpdateHeightFirstPaginationEntry = $t02066020771._2 | |
584 | 577 | let rewardUpdateHeightEntry = if ((pagination == 2)) | |
585 | 578 | then [IntegerEntry(kRewardUpdateHeight, rewardUpdateHeight)] | |
586 | 579 | else nil | |
587 | 580 | if ((height > rewardUpdateHeight)) | |
588 | 581 | then throw("rewardUpdateHeight < height") | |
589 | 582 | else (((((previousRewardEntryNew ++ currentRewardEntryNew) ++ heightEntryNewCur) ++ sumRewardCurrent) ++ rewardUpdateHeightEntry) ++ rewardUpdateHeightFirstPaginationEntry) | |
590 | 583 | } | |
591 | 584 | }) | |
592 | 585 | ||
593 | 586 | ||
594 | 587 | ||
595 | 588 | @Callable(i) | |
596 | 589 | func shutdown () = valueOrElse(isAdminCall(i), if (!(active)) | |
597 | 590 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified"))) | |
598 | 591 | else suspend("Paused by admin")) | |
599 | 592 | ||
600 | 593 | ||
601 | 594 | ||
602 | 595 | @Callable(i) | |
603 | 596 | func activate () = valueOrElse(isAdminCall(i), if (active) | |
604 | 597 | then throw("DApp is already active") | |
605 | 598 | else [BooleanEntry(kActive, true), DeleteEntry(kCause)]) | |
606 | 599 | ||
607 | 600 | ||
608 | 601 | @Verifier(tx) | |
609 | 602 | func verify () = { | |
610 | 603 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
611 | 604 | then 1 | |
612 | 605 | else 0 | |
613 | 606 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
614 | 607 | then 1 | |
615 | 608 | else 0 | |
616 | 609 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
617 | 610 | then 1 | |
618 | 611 | else 0 | |
619 | 612 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
620 | 613 | } | |
621 | 614 |
github/deemru/w8io/169f3d6 136.61 ms ◑