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