tx · FsHxQtZZPN4eLWzWpPNVpEgF47kkkBha77o4pstxvapi 3N5F5DCmWNzT8ZPe1tBfiXaVYzWJriaJZ9E: -0.01400000 Waves 2021.01.23 21:16 [1366505] smart account 3N5F5DCmWNzT8ZPe1tBfiXaVYzWJriaJZ9E > SELF 0.00000000 Waves
{ "type": 13, "id": "FsHxQtZZPN4eLWzWpPNVpEgF47kkkBha77o4pstxvapi", "fee": 1400000, "feeAssetId": null, "timestamp": 1611425849419, "version": 1, "sender": "3N5F5DCmWNzT8ZPe1tBfiXaVYzWJriaJZ9E", "senderPublicKey": "ApZ1ntZBf9PT4kWa9ZRVbLxk43jqkqWHP5NWpjujGBw2", "proofs": [ "PieghyNqzT8GRq9obTJvNNXpvLf4rvkgDKqh5C2igXyfLiEdW193BW6BMC4D2hPY9CTzFMZKppztVMdMmz4VGUQ" ], "script": "base64:AAIEAAAAAAAAAB0IAhIAEgUKAwgIARIFCgMICAESBQoDCAgBEgASAAAAACIAAAAADGFkbWluUHViS2V5MQEAAAAgELDi6uQgdVvao3EGz2pOOnWzKruRdXrpd4DobbWyZx8AAAAADGFkbWluUHViS2V5MgEAAAAgELDi6uQgdVvao3EGz2pOOnWzKruRdXrpd4DobbWyZx8AAAAADGFkbWluUHViS2V5MwEAAAAgELDi6uQgdVvao3EGz2pOOnWzKruRdXrpd4DobbWyZx8AAAAAFGFkbWluUHViS2V5U3RhcnRTdG9wAQAAACAQsOLq5CB1W9qjcQbPak46dbMqu5F1eul3gOhttbJnHwAAAAASYWRtaW5QdWJLZXlTdGFraW5nAQAAACAQsOLq5CB1W9qjcQbPak46dbMqu5F1eul3gOhttbJnHwAAAAAPa2V5TGFzdEludGVyZXN0AgAAAA1sYXN0X2ludGVyZXN0AAAAABNrZXlVc2VyTGFzdEludGVyZXN0AgAAAA5fbGFzdF9pbnRlcmVzdAAAAAARa2V5VXNlclNXT1BBbW91bnQCAAAADF9TV09QX2Ftb3VudAAAAAAUa2V5VXNlckdldEJhY2tIZWlnaH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vY2tlZAAAAAAEAAAADGxhc3RJbnRlcmVzdAkBAAAAE2dldExhc3RJbnRlcmVzdEluZm8AAAAABAAAAAskdDA4OTU2OTAxMQkBAAAACWNsYWltQ2FsYwAAAAEIBQAAAAFpAAAABmNhbGxlcgQAAAAPdXNlck5ld0ludGVyZXN0CAUAAAALJHQwODk1NjkwMTEAAAACXzEEAAAAC2NsYWltQW1vdW50CAUAAAALJHQwODk1NjkwMTEAAAACXzIEAAAADnVzZXJWb3RlQW1vdW50CQEAAAAWZ2V0VXNlclRvdGFsVm90ZUFtb3VudAAAAAEIBQAAAAFpAAAABmNhbGxlcgQAAAANYXZhaWxhYmxlRnVuZAkAAGUAAAACCQAAZAAAAAIJAQAAABFnZXRVc2VyU1dPUEFtb3VudAAAAAEIBQAAAAFpAAAABmNhbGxlcgUAAAALY2xhaW1BbW91bnQFAAAADnVzZXJWb3RlQW1vdW50CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyBQAAABNrZXlVc2VyTGFzdEludGVyZXN0BQAAAA91c2VyTmV3SW50ZXJlc3QJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAAD2tleUxhc3RJbnRlcmVzdAUAAAAMbGFzdEludGVyZXN0CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkABCUAAAABCAUAAAABaQAAAAZjYWxsZXICAAAAAV8FAAAAEWtleVVzZXJTV09QQW1vdW50BQAAAA51c2VyVm90ZUFtb3VudAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAADWF2YWlsYWJsZUZ1bmQFAAAABFNXT1AFAAAAA25pbAAAAADSGSUd", "chainId": 84, "height": 1366505, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8kGXehA8SFTkKnqSeLHfdv22YvBAv8zwMiSWL3eUN3Pt Next: 7pe1bH26Rqu2omtNaMmvoC3ek9cboPxsnk7g4ysC14eF Diff:
Old | New | Differences | |
---|---|---|---|
47 | 47 | ||
48 | 48 | ||
49 | 49 | func getLastInterestInfo () = { | |
50 | - | let lastInterest = | |
50 | + | let lastInterest = valueOrElse(getInteger(this, keyLastInterest), 0) | |
51 | 51 | lastInterest | |
52 | 52 | } | |
53 | 53 | ||
120 | 120 | func claimCalc (caller) = { | |
121 | 121 | let shareTokenLocked = getTotalSWOPLocked() | |
122 | 122 | let lastInterest = getLastInterestInfo() | |
123 | - | let $ | |
124 | - | let userLastInterest = $ | |
125 | - | let userShareTokensAmount = $ | |
123 | + | let $t044164503 = getUserInterestInfo(caller, lastInterest) | |
124 | + | let userLastInterest = $t044164503._1 | |
125 | + | let userShareTokensAmount = $t044164503._2 | |
126 | 126 | let claimAmount = fraction(userShareTokensAmount, (lastInterest - userLastInterest), scaleValue) | |
127 | 127 | let userNewInterest = lastInterest | |
128 | 128 | $Tuple2(userNewInterest, claimAmount) | |
131 | 131 | ||
132 | 132 | @Callable(i) | |
133 | 133 | func lockSWOP () = { | |
134 | - | let $ | |
135 | - | let pmtAmount = $ | |
136 | - | let pmtAssetId = $ | |
134 | + | let $t047154790 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
135 | + | let pmtAmount = $t047154790._1 | |
136 | + | let pmtAssetId = $t047154790._2 | |
137 | 137 | if ((pmtAssetId != SWOP)) | |
138 | 138 | then throw("Incorrect pmtAssetId") | |
139 | 139 | else { | |
141 | 141 | if (true) | |
142 | 142 | then throw(toString(lastInterest)) | |
143 | 143 | else { | |
144 | - | let $ | |
145 | - | let userLastInterest = $ | |
146 | - | let userSWOPAmount = $ | |
144 | + | let $t049595041 = getUserInterestInfo(i.caller, lastInterest) | |
145 | + | let userLastInterest = $t049595041._1 | |
146 | + | let userSWOPAmount = $t049595041._2 | |
147 | 147 | let claimAmount = fraction(userSWOPAmount, (lastInterest - userLastInterest), scaleValue) | |
148 | 148 | let userSWOPAmountNew = ((userSWOPAmount + pmtAmount) + claimAmount) | |
149 | 149 | let userNewInterest = lastInterest | |
207 | 207 | ||
208 | 208 | @Callable(i) | |
209 | 209 | func airDrop () = { | |
210 | - | let $ | |
211 | - | let pmtAmount = $ | |
212 | - | let pmtAssetId = $ | |
210 | + | let $t083818456 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
211 | + | let pmtAmount = $t083818456._1 | |
212 | + | let pmtAssetId = $t083818456._2 | |
213 | 213 | if ((pmtAssetId != SWOP)) | |
214 | 214 | then throw("Incorrect pmtAssetId") | |
215 | 215 | else { | |
226 | 226 | func claimSWOP () = { | |
227 | 227 | let totalSWOPLocked = getTotalSWOPLocked() | |
228 | 228 | let lastInterest = getLastInterestInfo() | |
229 | - | let $ | |
230 | - | let userNewInterest = $ | |
231 | - | let claimAmount = $ | |
229 | + | let $t089569011 = claimCalc(i.caller) | |
230 | + | let userNewInterest = $t089569011._1 | |
231 | + | let claimAmount = $t089569011._2 | |
232 | 232 | let userVoteAmount = getUserTotalVoteAmount(i.caller) | |
233 | 233 | let availableFund = ((getUserSWOPAmount(i.caller) + claimAmount) - userVoteAmount) | |
234 | 234 | [IntegerEntry((toString(i.caller) + keyUserLastInterest), userNewInterest), IntegerEntry(keyLastInterest, lastInterest), IntegerEntry(((toString(i.caller) + "_") + keyUserSWOPAmount), userVoteAmount), ScriptTransfer(i.caller, availableFund, SWOP)] |
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 keyTotalVoteOptionAmount = "total_SWOP_option_amount" | |
29 | 29 | ||
30 | 30 | let keyVoteName = "vote_name" | |
31 | 31 | ||
32 | 32 | let keyOptionName = "_option_name" | |
33 | 33 | ||
34 | 34 | let keyVotingStartHeight = "_startHeight" | |
35 | 35 | ||
36 | 36 | let keyVoteDuration = "_vote_duration" | |
37 | 37 | ||
38 | 38 | let farmingSWOPAddress = Address(base58'3N5F5DCmWNzT8ZPe1tBfiXaVYzWJriaJZ9E') | |
39 | 39 | ||
40 | 40 | let keySWOPid = "SWOP_id" | |
41 | 41 | ||
42 | 42 | let SWOP = fromBase58String(getStringValue(farmingSWOPAddress, keySWOPid)) | |
43 | 43 | ||
44 | 44 | let scaleValue = 100000000 | |
45 | 45 | ||
46 | 46 | func throwNotEnoughSWOP () = throw("Not enough SWOP: userSWOPAmount - userTotalVoteAmount < voteSWOPAmount") | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func getLastInterestInfo () = { | |
50 | - | let lastInterest = | |
50 | + | let lastInterest = valueOrElse(getInteger(this, keyLastInterest), 0) | |
51 | 51 | lastInterest | |
52 | 52 | } | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func getUserSWOPAmount (user) = valueOrElse(getInteger(this, (toString(user) + keyUserSWOPAmount)), 0) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func getUserInterestInfo (user,lastInterest) = { | |
59 | 59 | let userSWOPAmount = getUserSWOPAmount(user) | |
60 | 60 | let userLastInterest = getInteger(this, (toString(user) + keyUserLastInterest)) | |
61 | 61 | let userLastInterestValue = match userLastInterest { | |
62 | 62 | case userLastInterest: Int => | |
63 | 63 | userLastInterest | |
64 | 64 | case _ => | |
65 | 65 | lastInterest | |
66 | 66 | } | |
67 | 67 | $Tuple2(userLastInterestValue, userSWOPAmount) | |
68 | 68 | } | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func getTotalSWOPLocked () = valueOrErrorMessage(getInteger(this, keyTotalSWOPAmount), ("No data on the key: " + keyTotalSWOPAmount)) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func getUserTotalVoteAmount (user) = valueOrElse(getInteger(this, (toString(user) + keyUserVoteTotalAmount)), 0) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func getUserVoteOptionAmount (user) = valueOrErrorMessage(getInteger(this, (toString(user) + keyUserVoteOptionAmount)), (("No data on the key: " + toString(user)) + keyUserVoteOptionAmount)) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func getVotingStartHeight (voteName) = valueOrErrorMessage(getInteger(this, (voteName + keyVotingStartHeight)), (("No data on the key: " + voteName) + keyVotingStartHeight)) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func getVoteOptionAmount (user,voteName,option) = valueOrErrorMessage({ | |
84 | 84 | let userVoteOptionAmount = getInteger(this, (((voteName + option) + toString(user)) + keyUserVoteOptionAmount)) | |
85 | 85 | let uvoa = match userVoteOptionAmount { | |
86 | 86 | case uvoa: Int => | |
87 | 87 | uvoa | |
88 | 88 | case uvoa: Unit => | |
89 | 89 | 0 | |
90 | 90 | case _ => | |
91 | 91 | throw("Match error") | |
92 | 92 | } | |
93 | 93 | uvoa | |
94 | 94 | }, (((("No data on the key: " + voteName) + option) + toString(user)) + keyUserVoteOptionAmount)) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func getVoteDuration (voteName) = valueOrErrorMessage(getInteger(this, (voteName + keyVoteDuration)), (("No data on the key: " + voteName) + keyVoteDuration)) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func getTotalVoteOptionAmount (voteName,option) = { | |
101 | 101 | let totalVoteOptionAmount = getInteger(this, ((voteName + option) + keyTotalVoteOptionAmount)) | |
102 | 102 | let tvoa = match totalVoteOptionAmount { | |
103 | 103 | case tvoa: Int => | |
104 | 104 | tvoa | |
105 | 105 | case tvoa: Unit => | |
106 | 106 | 0 | |
107 | 107 | case _ => | |
108 | 108 | throw("Match error") | |
109 | 109 | } | |
110 | 110 | tvoa | |
111 | 111 | } | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func getUserGetBackAmount (voteName,option,user,getBackSWOPHeight) = { | |
115 | 115 | let key = ((((((voteName + "_") + option) + "_") + toString(user)) + "_") + toString(getBackSWOPHeight)) | |
116 | 116 | valueOrErrorMessage(getInteger(this, key), ("No data on the key: " + key)) | |
117 | 117 | } | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func claimCalc (caller) = { | |
121 | 121 | let shareTokenLocked = getTotalSWOPLocked() | |
122 | 122 | let lastInterest = getLastInterestInfo() | |
123 | - | let $ | |
124 | - | let userLastInterest = $ | |
125 | - | let userShareTokensAmount = $ | |
123 | + | let $t044164503 = getUserInterestInfo(caller, lastInterest) | |
124 | + | let userLastInterest = $t044164503._1 | |
125 | + | let userShareTokensAmount = $t044164503._2 | |
126 | 126 | let claimAmount = fraction(userShareTokensAmount, (lastInterest - userLastInterest), scaleValue) | |
127 | 127 | let userNewInterest = lastInterest | |
128 | 128 | $Tuple2(userNewInterest, claimAmount) | |
129 | 129 | } | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | @Callable(i) | |
133 | 133 | func lockSWOP () = { | |
134 | - | let $ | |
135 | - | let pmtAmount = $ | |
136 | - | let pmtAssetId = $ | |
134 | + | let $t047154790 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
135 | + | let pmtAmount = $t047154790._1 | |
136 | + | let pmtAssetId = $t047154790._2 | |
137 | 137 | if ((pmtAssetId != SWOP)) | |
138 | 138 | then throw("Incorrect pmtAssetId") | |
139 | 139 | else { | |
140 | 140 | let lastInterest = getLastInterestInfo() | |
141 | 141 | if (true) | |
142 | 142 | then throw(toString(lastInterest)) | |
143 | 143 | else { | |
144 | - | let $ | |
145 | - | let userLastInterest = $ | |
146 | - | let userSWOPAmount = $ | |
144 | + | let $t049595041 = getUserInterestInfo(i.caller, lastInterest) | |
145 | + | let userLastInterest = $t049595041._1 | |
146 | + | let userSWOPAmount = $t049595041._2 | |
147 | 147 | let claimAmount = fraction(userSWOPAmount, (lastInterest - userLastInterest), scaleValue) | |
148 | 148 | let userSWOPAmountNew = ((userSWOPAmount + pmtAmount) + claimAmount) | |
149 | 149 | let userNewInterest = lastInterest | |
150 | 150 | let totalSWOPAmount = getTotalSWOPLocked() | |
151 | 151 | let totalSWOPLockedNew = (totalSWOPAmount + pmtAmount) | |
152 | 152 | [IntegerEntry((toString(i.caller) + keyUserLastInterest), userNewInterest), IntegerEntry((toString(i.caller) + keyUserSWOPAmount), userSWOPAmountNew), IntegerEntry(keyTotalSWOPAmount, totalSWOPLockedNew)] | |
153 | 153 | } | |
154 | 154 | } | |
155 | 155 | } | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | ||
159 | 159 | @Callable(i) | |
160 | 160 | func vote (voteName,option,voteAddSWOPAmount) = { | |
161 | 161 | let userSWOPAmount = getUserSWOPAmount(i.caller) | |
162 | 162 | let userTotalVoteAmount = getUserTotalVoteAmount(i.caller) | |
163 | 163 | let userVoteOptionAmount = getVoteOptionAmount(i.caller, voteName, option) | |
164 | 164 | if ((voteAddSWOPAmount > (userSWOPAmount - userTotalVoteAmount))) | |
165 | 165 | then throwNotEnoughSWOP() | |
166 | 166 | else { | |
167 | 167 | let totalVoteOptionAmount = getTotalVoteOptionAmount(voteName, option) | |
168 | 168 | let voteDuration = getVoteDuration(voteName) | |
169 | 169 | let votingStartHeight = getVotingStartHeight(option) | |
170 | 170 | let userTotalVoteAmountNew = (userTotalVoteAmount + voteAddSWOPAmount) | |
171 | 171 | let userVoteOptionAmountNew = (userVoteOptionAmount + voteAddSWOPAmount) | |
172 | 172 | let voteOptionAmountNew = (totalVoteOptionAmount + voteAddSWOPAmount) | |
173 | 173 | [IntegerEntry((((voteName + "_") + option) + keyTotalVoteOptionAmount), voteOptionAmountNew), IntegerEntry((((voteName + option) + toString(i.caller)) + keyUserVoteOptionAmount), userVoteOptionAmountNew), IntegerEntry((toString(i.caller) + keyUserVoteTotalAmount), userTotalVoteAmountNew)] | |
174 | 174 | } | |
175 | 175 | } | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | ||
179 | 179 | @Callable(i) | |
180 | 180 | func unvote (voteName,option,unvoteSWOPAmount) = { | |
181 | 181 | let userSWOPAmount = getUserSWOPAmount(i.caller) | |
182 | 182 | let userTotalVoteAmount = getUserTotalVoteAmount(i.caller) | |
183 | 183 | let userVoteOptionAmount = getVoteOptionAmount(i.caller, voteName, option) | |
184 | 184 | if ((unvoteSWOPAmount > userVoteOptionAmount)) | |
185 | 185 | then throwNotEnoughSWOP() | |
186 | 186 | else { | |
187 | 187 | let totalVoteOptionAmount = getTotalVoteOptionAmount(voteName, option) | |
188 | 188 | let voteDuration = getVoteDuration(voteName) | |
189 | 189 | let votingStartHeight = getVotingStartHeight(option) | |
190 | 190 | let userVoteOptionAmountNew = (userVoteOptionAmount - unvoteSWOPAmount) | |
191 | 191 | let voteOptionAmountNew = (totalVoteOptionAmount - unvoteSWOPAmount) | |
192 | 192 | let getBackSWOPHeight = (votingStartHeight + (2 * voteDuration)) | |
193 | 193 | [IntegerEntry((((voteName + "_") + option) + keyTotalVoteOptionAmount), voteOptionAmountNew), IntegerEntry((((voteName + option) + toString(i.caller)) + keyUserVoteOptionAmount), userVoteOptionAmountNew), IntegerEntry(((((((voteName + "_") + option) + "_") + toString(i.caller)) + "_") + toString(getBackSWOPHeight)), unvoteSWOPAmount)] | |
194 | 194 | } | |
195 | 195 | } | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | ||
199 | 199 | @Callable(i) | |
200 | 200 | func getBackSWOPfromOption (voteName,option,getBackSWOPHeight) = { | |
201 | 201 | let userTotalVoteAmount = getUserTotalVoteAmount(i.caller) | |
202 | 202 | let userGetBackAmount = getUserGetBackAmount(voteName, option, i.caller, getBackSWOPHeight) | |
203 | 203 | [IntegerEntry(((((((voteName + "_") + option) + "_") + toString(i.caller)) + "_") + toString(getBackSWOPHeight)), 0), ScriptTransfer(i.caller, userGetBackAmount, SWOP)] | |
204 | 204 | } | |
205 | 205 | ||
206 | 206 | ||
207 | 207 | ||
208 | 208 | @Callable(i) | |
209 | 209 | func airDrop () = { | |
210 | - | let $ | |
211 | - | let pmtAmount = $ | |
212 | - | let pmtAssetId = $ | |
210 | + | let $t083818456 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
211 | + | let pmtAmount = $t083818456._1 | |
212 | + | let pmtAssetId = $t083818456._2 | |
213 | 213 | if ((pmtAssetId != SWOP)) | |
214 | 214 | then throw("Incorrect pmtAssetId") | |
215 | 215 | else { | |
216 | 216 | let totalSWOPAmount = getTotalSWOPLocked() | |
217 | 217 | let lastInterest = getLastInterestInfo() | |
218 | 218 | let interestNew = (lastInterest + fraction(pmtAmount, scaleValue, totalSWOPAmount)) | |
219 | 219 | [IntegerEntry(keyLastInterest, interestNew)] | |
220 | 220 | } | |
221 | 221 | } | |
222 | 222 | ||
223 | 223 | ||
224 | 224 | ||
225 | 225 | @Callable(i) | |
226 | 226 | func claimSWOP () = { | |
227 | 227 | let totalSWOPLocked = getTotalSWOPLocked() | |
228 | 228 | let lastInterest = getLastInterestInfo() | |
229 | - | let $ | |
230 | - | let userNewInterest = $ | |
231 | - | let claimAmount = $ | |
229 | + | let $t089569011 = claimCalc(i.caller) | |
230 | + | let userNewInterest = $t089569011._1 | |
231 | + | let claimAmount = $t089569011._2 | |
232 | 232 | let userVoteAmount = getUserTotalVoteAmount(i.caller) | |
233 | 233 | let availableFund = ((getUserSWOPAmount(i.caller) + claimAmount) - userVoteAmount) | |
234 | 234 | [IntegerEntry((toString(i.caller) + keyUserLastInterest), userNewInterest), IntegerEntry(keyLastInterest, lastInterest), IntegerEntry(((toString(i.caller) + "_") + keyUserSWOPAmount), userVoteAmount), ScriptTransfer(i.caller, availableFund, SWOP)] | |
235 | 235 | } | |
236 | 236 | ||
237 | 237 |
github/deemru/w8io/169f3d6 48.30 ms ◑