tx · 5oNyLAumQmdaUbUhQBGY2oizyu69bhu9uXYV8raRSZk4 3N4LZUtraMUi2ABEMkny2jPuW4YtMb1Mptu: -0.01400000 Waves 2021.01.23 22:48 [1366595] smart account 3N4LZUtraMUi2ABEMkny2jPuW4YtMb1Mptu > SELF 0.00000000 Waves
{ "type": 13, "id": "5oNyLAumQmdaUbUhQBGY2oizyu69bhu9uXYV8raRSZk4", "fee": 1400000, "feeAssetId": null, "timestamp": 1611431354725, "version": 1, "sender": "3N4LZUtraMUi2ABEMkny2jPuW4YtMb1Mptu", "senderPublicKey": "5HCGPojca71eK6HQ2LLv6xriZLjgp7V5febuNekZMZgX", "proofs": [ "3meYztUJL1PVUPLPeorXNvfQw3Cpnktr3WEpTvzVVvwUGtddbFoY7jz8qzmwXni7XHowSCC5YiqWvE7XpvkxsfZQ" ], "script": "base64:AAIEAAAAAAAAAB8IAhIAEgUKAwgIARIFCgMICAESBQoDCAgBEgASABIAAAAAJAAAAAAMYWRtaW5QdWJLZXkxAQAAACAQsOLq5CB1W9qjcQbPak46dbMqu5F1eul3gOhttbJnHwAAAAAMYWRtaW5QdWJLZXkyAQAAACAQsOLq5CB1W9qjcQbPak46dbMqu5F1eul3gOhttbJnHwAAAAAMYWRtaW5QdWJLZXkzAQAAACAQsOLq5CB1W9qjcQbPak46dbMqu5F1eul3gOhttbJnHwAAAAAUYWRtaW5QdWJLZXlTdGFydFN0b3ABAAAAIBCw4urkIHVb2qNxBs9qTjp1syq7kXV66XeA6G21smcfAAAAABJhZG1pblB1YktleVN0YWtpbmcBAAAAIBCw4urkIHVb2qNxBs9qTjp1syq7kXV66XeA6G21smcfAAAAAA9rZXlMYXN0SW50ZXJlc3QCAAAADWxhc3RfaW50ZXJlc3QAAAAAE2tleVVzZXJMYXN0SW50ZXJlc3QCAAAADl9sYXN0X2ludGVyZXN0AAAAABFrZXlVc2VyU1dPUEFtb3VudAIAAAAMX1NXT1BfYW1vdW50AAAAABRrZXlVc2VyR2V0QmFja0hlaW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dmFpbGFibGVGdW5kCQAAZQAAAAIJAABkAAAAAgkBAAAAEWdldFVzZXJTV09QQW1vdW50AAAAAQgFAAAAAWkAAAAGY2FsbGVyBQAAAAtjbGFpbUFtb3VudAUAAAAOdXNlclZvdGVBbW91bnQEAAAAEnRvdGFsU1dPUExvY2tlZE5ldwkAAGUAAAACBQAAAA90b3RhbFNXT1BMb2NrZWQFAAAADWF2YWlsYWJsZUZ1bmQEAAAAEXVzZXJDbGFpbWVkQW1vdW50CQEAAAAYZ2V0VXNlclNXT1BDbGFpbWVkQW1vdW50AAAAAQgFAAAAAWkAAAAGY2FsbGVyBAAAABR1c2VyQ2xhaW1lZEFtb3VudE5ldwkAAGQAAAACBQAAABF1c2VyQ2xhaW1lZEFtb3VudAUAAAALY2xhaW1BbW91bnQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIFAAAAE2tleVVzZXJMYXN0SW50ZXJlc3QFAAAAD3VzZXJOZXdJbnRlcmVzdAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAAPa2V5TGFzdEludGVyZXN0BQAAAAxsYXN0SW50ZXJlc3QJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIFAAAAEWtleVVzZXJTV09QQW1vdW50CQAAZAAAAAIFAAAADWF2YWlsYWJsZUZ1bmQFAAAADnVzZXJWb3RlQW1vdW50CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyBQAAABhrZXlVc2VyU1dPUENsYWltZWRBbW91bnQFAAAAFHVzZXJDbGFpbWVkQW1vdW50TmV3BQAAAANuaWwAAAAAaMGbvw==", "chainId": 84, "height": 1366595, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EtfksnEGX6ABmUMs5n6zhZMS5qEe1LEZki1KdWAuh1VW Next: 2PJeZLh2vgMVVQcWPe9z5U892G4pra3uSVRkcrCHQyHb Diff:
Old | New | Differences | |
---|---|---|---|
146 | 146 | let $t049435025 = getUserInterestInfo(i.caller, lastInterest) | |
147 | 147 | let userLastInterest = $t049435025._1 | |
148 | 148 | let userSWOPAmount = $t049435025._2 | |
149 | - | let claimAmount = fraction(userSWOPAmount, (lastInterest - userLastInterest), scaleValue) | |
150 | - | let userSWOPAmountNew = ((userSWOPAmount + pmtAmount) + claimAmount) | |
151 | - | let userNewInterest = lastInterest | |
152 | - | let totalSWOPAmount = getTotalSWOPLocked() | |
153 | - | let totalSWOPLockedNew = (totalSWOPAmount + pmtAmount) | |
149 | + | if (true) | |
150 | + | then throw(((toString(lastInterest) + "_") + toString(userLastInterest))) | |
151 | + | else { | |
152 | + | let claimAmount = fraction(userSWOPAmount, (lastInterest - userLastInterest), scaleValue) | |
153 | + | let userSWOPAmountNew = ((userSWOPAmount + pmtAmount) + claimAmount) | |
154 | + | let userNewInterest = lastInterest | |
155 | + | let totalSWOPAmount = getTotalSWOPLocked() | |
156 | + | let totalSWOPLockedNew = (totalSWOPAmount + pmtAmount) | |
154 | 157 | [IntegerEntry((toString(i.caller) + keyUserLastInterest), userNewInterest), IntegerEntry((toString(i.caller) + keyUserSWOPAmount), userSWOPAmountNew), IntegerEntry(keyTotalSWOPAmount, totalSWOPLockedNew)] | |
158 | + | } | |
155 | 159 | } | |
156 | 160 | } | |
157 | 161 | ||
208 | 212 | ||
209 | 213 | @Callable(i) | |
210 | 214 | func airDrop () = { | |
211 | - | let $ | |
212 | - | let pmtAmount = $ | |
213 | - | let pmtAssetId = $ | |
215 | + | let $t084528527 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
216 | + | let pmtAmount = $t084528527._1 | |
217 | + | let pmtAssetId = $t084528527._2 | |
214 | 218 | if ((pmtAssetId != SWOP)) | |
215 | 219 | then throw("Incorrect pmtAssetId") | |
216 | 220 | else { | |
228 | 232 | func claimSWOPandWithdraw () = { | |
229 | 233 | let totalSWOPLocked = getTotalSWOPLocked() | |
230 | 234 | let lastInterest = getLastInterestInfo() | |
231 | - | let $ | |
232 | - | let userNewInterest = $ | |
233 | - | let claimAmount = $ | |
235 | + | let $t091579212 = claimCalc(i.caller) | |
236 | + | let userNewInterest = $t091579212._1 | |
237 | + | let claimAmount = $t091579212._2 | |
234 | 238 | let userVoteAmount = getUserTotalVoteAmount(i.caller) | |
235 | 239 | let availableFund = ((getUserSWOPAmount(i.caller) + claimAmount) - userVoteAmount) | |
236 | 240 | let totalSWOPLockedNew = (totalSWOPLocked - availableFund) | |
245 | 249 | func claimSWOPandStake () = { | |
246 | 250 | let totalSWOPLocked = getTotalSWOPLocked() | |
247 | 251 | let lastInterest = getLastInterestInfo() | |
248 | - | let $ | |
249 | - | let userNewInterest = $ | |
250 | - | let claimAmount = $ | |
252 | + | let $t01011710172 = claimCalc(i.caller) | |
253 | + | let userNewInterest = $t01011710172._1 | |
254 | + | let claimAmount = $t01011710172._2 | |
251 | 255 | let userVoteAmount = getUserTotalVoteAmount(i.caller) | |
252 | 256 | let availableFund = ((getUserSWOPAmount(i.caller) + claimAmount) - userVoteAmount) | |
253 | 257 | let totalSWOPLockedNew = (totalSWOPLocked - availableFund) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let adminPubKey1 = base58'289xpUrYrKbLjaKkqH3XNhfecukcYRaDRT3JDrvkvQRU' | |
5 | 5 | ||
6 | 6 | let adminPubKey2 = base58'289xpUrYrKbLjaKkqH3XNhfecukcYRaDRT3JDrvkvQRU' | |
7 | 7 | ||
8 | 8 | let adminPubKey3 = base58'289xpUrYrKbLjaKkqH3XNhfecukcYRaDRT3JDrvkvQRU' | |
9 | 9 | ||
10 | 10 | let adminPubKeyStartStop = base58'289xpUrYrKbLjaKkqH3XNhfecukcYRaDRT3JDrvkvQRU' | |
11 | 11 | ||
12 | 12 | let adminPubKeyStaking = base58'289xpUrYrKbLjaKkqH3XNhfecukcYRaDRT3JDrvkvQRU' | |
13 | 13 | ||
14 | 14 | let keyLastInterest = "last_interest" | |
15 | 15 | ||
16 | 16 | let keyUserLastInterest = "_last_interest" | |
17 | 17 | ||
18 | 18 | let keyUserSWOPAmount = "_SWOP_amount" | |
19 | 19 | ||
20 | 20 | let keyUserGetBackHeight = "_getBackHeight" | |
21 | 21 | ||
22 | 22 | let keyTotalSWOPAmount = "total_SWOP_amount" | |
23 | 23 | ||
24 | 24 | let keyUserVoteTotalAmount = "_total_SWOP_vote_amount" | |
25 | 25 | ||
26 | 26 | let keyUserVoteOptionAmount = "_SWOP_option_amount" | |
27 | 27 | ||
28 | 28 | let keyUserSWOPClaimedAmount = "_SWOP_claimed_amount" | |
29 | 29 | ||
30 | 30 | let keyTotalVoteOptionAmount = "total_SWOP_option_amount" | |
31 | 31 | ||
32 | 32 | let keyVoteName = "vote_name" | |
33 | 33 | ||
34 | 34 | let keyOptionName = "_option_name" | |
35 | 35 | ||
36 | 36 | let keyVotingStartHeight = "_startHeight" | |
37 | 37 | ||
38 | 38 | let keyVoteDuration = "_vote_duration" | |
39 | 39 | ||
40 | 40 | let farmingSWOPAddress = Address(base58'3NAqJ1CqP1iTzXR9wENKwEXHMvT4CS4YGBb') | |
41 | 41 | ||
42 | 42 | let keySWOPid = "SWOP_id" | |
43 | 43 | ||
44 | 44 | let SWOP = fromBase58String(getStringValue(farmingSWOPAddress, keySWOPid)) | |
45 | 45 | ||
46 | 46 | let scaleValue = 100000000 | |
47 | 47 | ||
48 | 48 | func throwNotEnoughSWOP () = throw("Not enough SWOP: userSWOPAmount - userTotalVoteAmount < voteSWOPAmount") | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func getLastInterestInfo () = { | |
52 | 52 | let lastInterest = valueOrElse(getInteger(this, keyLastInterest), 0) | |
53 | 53 | lastInterest | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func getUserSWOPAmount (user) = valueOrElse(getInteger(this, (toString(user) + keyUserSWOPAmount)), 0) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func getUserSWOPClaimedAmount (user) = valueOrElse(getInteger(this, (toString(user) + keyUserSWOPClaimedAmount)), 0) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func getUserInterestInfo (user,lastInterest) = { | |
64 | 64 | let userSWOPAmount = getUserSWOPAmount(user) | |
65 | 65 | let userLastInterest = getInteger(this, (toString(user) + keyUserLastInterest)) | |
66 | 66 | let userLastInterestValue = match userLastInterest { | |
67 | 67 | case userLastInterest: Int => | |
68 | 68 | userLastInterest | |
69 | 69 | case _ => | |
70 | 70 | lastInterest | |
71 | 71 | } | |
72 | 72 | $Tuple2(userLastInterestValue, userSWOPAmount) | |
73 | 73 | } | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func getTotalSWOPLocked () = valueOrElse(getInteger(this, keyTotalSWOPAmount), 0) | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func getUserTotalVoteAmount (user) = valueOrElse(getInteger(this, (toString(user) + keyUserVoteTotalAmount)), 0) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func getUserVoteOptionAmount (user) = valueOrElse(getInteger(this, (toString(user) + keyUserVoteOptionAmount)), 0) | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func getVotingStartHeight (voteName) = valueOrElse(getInteger(this, (voteName + keyVotingStartHeight)), 0) | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func getVoteOptionAmount (user,voteName,option) = valueOrErrorMessage({ | |
89 | 89 | let userVoteOptionAmount = getInteger(this, (((voteName + option) + toString(user)) + keyUserVoteOptionAmount)) | |
90 | 90 | let uvoa = match userVoteOptionAmount { | |
91 | 91 | case uvoa: Int => | |
92 | 92 | uvoa | |
93 | 93 | case uvoa: Unit => | |
94 | 94 | 0 | |
95 | 95 | case _ => | |
96 | 96 | throw("Match error") | |
97 | 97 | } | |
98 | 98 | uvoa | |
99 | 99 | }, (((("No data on the key: " + voteName) + option) + toString(user)) + keyUserVoteOptionAmount)) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func getVoteDuration (voteName) = valueOrErrorMessage(getInteger(this, (voteName + keyVoteDuration)), (("No data on the key: " + voteName) + keyVoteDuration)) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func getTotalVoteOptionAmount (voteName,option) = { | |
106 | 106 | let totalVoteOptionAmount = getInteger(this, ((voteName + option) + keyTotalVoteOptionAmount)) | |
107 | 107 | let tvoa = match totalVoteOptionAmount { | |
108 | 108 | case tvoa: Int => | |
109 | 109 | tvoa | |
110 | 110 | case tvoa: Unit => | |
111 | 111 | 0 | |
112 | 112 | case _ => | |
113 | 113 | throw("Match error") | |
114 | 114 | } | |
115 | 115 | tvoa | |
116 | 116 | } | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func getUserGetBackAmount (voteName,option,user,getBackSWOPHeight) = { | |
120 | 120 | let key = ((((((voteName + "_") + option) + "_") + toString(user)) + "_") + toString(getBackSWOPHeight)) | |
121 | 121 | valueOrErrorMessage(getInteger(this, key), ("No data on the key: " + key)) | |
122 | 122 | } | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func claimCalc (caller) = { | |
126 | 126 | let shareTokenLocked = getTotalSWOPLocked() | |
127 | 127 | let lastInterest = getLastInterestInfo() | |
128 | 128 | let $t044534540 = getUserInterestInfo(caller, lastInterest) | |
129 | 129 | let userLastInterest = $t044534540._1 | |
130 | 130 | let userShareTokensAmount = $t044534540._2 | |
131 | 131 | let claimAmount = fraction(userShareTokensAmount, (lastInterest - userLastInterest), scaleValue) | |
132 | 132 | let userNewInterest = lastInterest | |
133 | 133 | $Tuple2(userNewInterest, claimAmount) | |
134 | 134 | } | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | @Callable(i) | |
138 | 138 | func lockSWOP () = { | |
139 | 139 | let $t047524827 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
140 | 140 | let pmtAmount = $t047524827._1 | |
141 | 141 | let pmtAssetId = $t047524827._2 | |
142 | 142 | if ((pmtAssetId != SWOP)) | |
143 | 143 | then throw("Incorrect pmtAssetId") | |
144 | 144 | else { | |
145 | 145 | let lastInterest = getLastInterestInfo() | |
146 | 146 | let $t049435025 = getUserInterestInfo(i.caller, lastInterest) | |
147 | 147 | let userLastInterest = $t049435025._1 | |
148 | 148 | let userSWOPAmount = $t049435025._2 | |
149 | - | let claimAmount = fraction(userSWOPAmount, (lastInterest - userLastInterest), scaleValue) | |
150 | - | let userSWOPAmountNew = ((userSWOPAmount + pmtAmount) + claimAmount) | |
151 | - | let userNewInterest = lastInterest | |
152 | - | let totalSWOPAmount = getTotalSWOPLocked() | |
153 | - | let totalSWOPLockedNew = (totalSWOPAmount + pmtAmount) | |
149 | + | if (true) | |
150 | + | then throw(((toString(lastInterest) + "_") + toString(userLastInterest))) | |
151 | + | else { | |
152 | + | let claimAmount = fraction(userSWOPAmount, (lastInterest - userLastInterest), scaleValue) | |
153 | + | let userSWOPAmountNew = ((userSWOPAmount + pmtAmount) + claimAmount) | |
154 | + | let userNewInterest = lastInterest | |
155 | + | let totalSWOPAmount = getTotalSWOPLocked() | |
156 | + | let totalSWOPLockedNew = (totalSWOPAmount + pmtAmount) | |
154 | 157 | [IntegerEntry((toString(i.caller) + keyUserLastInterest), userNewInterest), IntegerEntry((toString(i.caller) + keyUserSWOPAmount), userSWOPAmountNew), IntegerEntry(keyTotalSWOPAmount, totalSWOPLockedNew)] | |
158 | + | } | |
155 | 159 | } | |
156 | 160 | } | |
157 | 161 | ||
158 | 162 | ||
159 | 163 | ||
160 | 164 | @Callable(i) | |
161 | 165 | func vote (voteName,option,voteAddSWOPAmount) = { | |
162 | 166 | let userSWOPAmount = getUserSWOPAmount(i.caller) | |
163 | 167 | let userTotalVoteAmount = getUserTotalVoteAmount(i.caller) | |
164 | 168 | let userVoteOptionAmount = getVoteOptionAmount(i.caller, voteName, option) | |
165 | 169 | if ((voteAddSWOPAmount > (userSWOPAmount - userTotalVoteAmount))) | |
166 | 170 | then throwNotEnoughSWOP() | |
167 | 171 | else { | |
168 | 172 | let totalVoteOptionAmount = getTotalVoteOptionAmount(voteName, option) | |
169 | 173 | let voteDuration = getVoteDuration(voteName) | |
170 | 174 | let votingStartHeight = getVotingStartHeight(option) | |
171 | 175 | let userTotalVoteAmountNew = (userTotalVoteAmount + voteAddSWOPAmount) | |
172 | 176 | let userVoteOptionAmountNew = (userVoteOptionAmount + voteAddSWOPAmount) | |
173 | 177 | let voteOptionAmountNew = (totalVoteOptionAmount + voteAddSWOPAmount) | |
174 | 178 | [IntegerEntry((((voteName + "_") + option) + keyTotalVoteOptionAmount), voteOptionAmountNew), IntegerEntry((((voteName + option) + toString(i.caller)) + keyUserVoteOptionAmount), userVoteOptionAmountNew), IntegerEntry((toString(i.caller) + keyUserVoteTotalAmount), userTotalVoteAmountNew)] | |
175 | 179 | } | |
176 | 180 | } | |
177 | 181 | ||
178 | 182 | ||
179 | 183 | ||
180 | 184 | @Callable(i) | |
181 | 185 | func unvote (voteName,option,unvoteSWOPAmount) = { | |
182 | 186 | let userSWOPAmount = getUserSWOPAmount(i.caller) | |
183 | 187 | let userTotalVoteAmount = getUserTotalVoteAmount(i.caller) | |
184 | 188 | let userVoteOptionAmount = getVoteOptionAmount(i.caller, voteName, option) | |
185 | 189 | if ((unvoteSWOPAmount > userVoteOptionAmount)) | |
186 | 190 | then throwNotEnoughSWOP() | |
187 | 191 | else { | |
188 | 192 | let totalVoteOptionAmount = getTotalVoteOptionAmount(voteName, option) | |
189 | 193 | let voteDuration = getVoteDuration(voteName) | |
190 | 194 | let votingStartHeight = getVotingStartHeight(option) | |
191 | 195 | let userVoteOptionAmountNew = (userVoteOptionAmount - unvoteSWOPAmount) | |
192 | 196 | let voteOptionAmountNew = (totalVoteOptionAmount - unvoteSWOPAmount) | |
193 | 197 | let getBackSWOPHeight = (votingStartHeight + (2 * voteDuration)) | |
194 | 198 | [IntegerEntry((((voteName + "_") + option) + keyTotalVoteOptionAmount), voteOptionAmountNew), IntegerEntry((((voteName + option) + toString(i.caller)) + keyUserVoteOptionAmount), userVoteOptionAmountNew), IntegerEntry(((((((voteName + "_") + option) + "_") + toString(i.caller)) + "_") + toString(getBackSWOPHeight)), unvoteSWOPAmount)] | |
195 | 199 | } | |
196 | 200 | } | |
197 | 201 | ||
198 | 202 | ||
199 | 203 | ||
200 | 204 | @Callable(i) | |
201 | 205 | func getBackSWOPfromOption (voteName,option,getBackSWOPHeight) = { | |
202 | 206 | let userTotalVoteAmount = getUserTotalVoteAmount(i.caller) | |
203 | 207 | let userGetBackAmount = getUserGetBackAmount(voteName, option, i.caller, getBackSWOPHeight) | |
204 | 208 | [IntegerEntry(((((((voteName + "_") + option) + "_") + toString(i.caller)) + "_") + toString(getBackSWOPHeight)), 0), ScriptTransfer(i.caller, userGetBackAmount, SWOP)] | |
205 | 209 | } | |
206 | 210 | ||
207 | 211 | ||
208 | 212 | ||
209 | 213 | @Callable(i) | |
210 | 214 | func airDrop () = { | |
211 | - | let $ | |
212 | - | let pmtAmount = $ | |
213 | - | let pmtAssetId = $ | |
215 | + | let $t084528527 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
216 | + | let pmtAmount = $t084528527._1 | |
217 | + | let pmtAssetId = $t084528527._2 | |
214 | 218 | if ((pmtAssetId != SWOP)) | |
215 | 219 | then throw("Incorrect pmtAssetId") | |
216 | 220 | else { | |
217 | 221 | let totalSWOPAmount = getTotalSWOPLocked() | |
218 | 222 | let totalSWOPAmountNew = (totalSWOPAmount + pmtAmount) | |
219 | 223 | let lastInterest = getLastInterestInfo() | |
220 | 224 | let interestNew = (lastInterest + fraction(pmtAmount, scaleValue, totalSWOPAmount)) | |
221 | 225 | [IntegerEntry(keyLastInterest, interestNew), IntegerEntry(keyTotalSWOPAmount, totalSWOPAmountNew)] | |
222 | 226 | } | |
223 | 227 | } | |
224 | 228 | ||
225 | 229 | ||
226 | 230 | ||
227 | 231 | @Callable(i) | |
228 | 232 | func claimSWOPandWithdraw () = { | |
229 | 233 | let totalSWOPLocked = getTotalSWOPLocked() | |
230 | 234 | let lastInterest = getLastInterestInfo() | |
231 | - | let $ | |
232 | - | let userNewInterest = $ | |
233 | - | let claimAmount = $ | |
235 | + | let $t091579212 = claimCalc(i.caller) | |
236 | + | let userNewInterest = $t091579212._1 | |
237 | + | let claimAmount = $t091579212._2 | |
234 | 238 | let userVoteAmount = getUserTotalVoteAmount(i.caller) | |
235 | 239 | let availableFund = ((getUserSWOPAmount(i.caller) + claimAmount) - userVoteAmount) | |
236 | 240 | let totalSWOPLockedNew = (totalSWOPLocked - availableFund) | |
237 | 241 | let userClaimedAmount = getUserSWOPClaimedAmount(i.caller) | |
238 | 242 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
239 | 243 | [IntegerEntry((toString(i.caller) + keyUserLastInterest), userNewInterest), IntegerEntry(keyLastInterest, lastInterest), IntegerEntry((toString(i.caller) + keyUserSWOPAmount), userVoteAmount), IntegerEntry(keyTotalSWOPAmount, totalSWOPLockedNew), IntegerEntry((toString(i.caller) + keyUserSWOPClaimedAmount), userClaimedAmountNew), ScriptTransfer(i.caller, availableFund, SWOP)] | |
240 | 244 | } | |
241 | 245 | ||
242 | 246 | ||
243 | 247 | ||
244 | 248 | @Callable(i) | |
245 | 249 | func claimSWOPandStake () = { | |
246 | 250 | let totalSWOPLocked = getTotalSWOPLocked() | |
247 | 251 | let lastInterest = getLastInterestInfo() | |
248 | - | let $ | |
249 | - | let userNewInterest = $ | |
250 | - | let claimAmount = $ | |
252 | + | let $t01011710172 = claimCalc(i.caller) | |
253 | + | let userNewInterest = $t01011710172._1 | |
254 | + | let claimAmount = $t01011710172._2 | |
251 | 255 | let userVoteAmount = getUserTotalVoteAmount(i.caller) | |
252 | 256 | let availableFund = ((getUserSWOPAmount(i.caller) + claimAmount) - userVoteAmount) | |
253 | 257 | let totalSWOPLockedNew = (totalSWOPLocked - availableFund) | |
254 | 258 | let userClaimedAmount = getUserSWOPClaimedAmount(i.caller) | |
255 | 259 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
256 | 260 | [IntegerEntry((toString(i.caller) + keyUserLastInterest), userNewInterest), IntegerEntry(keyLastInterest, lastInterest), IntegerEntry((toString(i.caller) + keyUserSWOPAmount), (availableFund + userVoteAmount)), IntegerEntry((toString(i.caller) + keyUserSWOPClaimedAmount), userClaimedAmountNew)] | |
257 | 261 | } | |
258 | 262 | ||
259 | 263 |
github/deemru/w8io/169f3d6 69.43 ms ◑