tx · 8kGXehA8SFTkKnqSeLHfdv22YvBAv8zwMiSWL3eUN3Pt 3N5F5DCmWNzT8ZPe1tBfiXaVYzWJriaJZ9E: -0.01400000 Waves 2021.01.23 21:16 [1366505] smart account 3N5F5DCmWNzT8ZPe1tBfiXaVYzWJriaJZ9E > SELF 0.00000000 Waves
{ "type": 13, "id": "8kGXehA8SFTkKnqSeLHfdv22YvBAv8zwMiSWL3eUN3Pt", "fee": 1400000, "feeAssetId": null, "timestamp": 1611425808494, "version": 1, "sender": "3N5F5DCmWNzT8ZPe1tBfiXaVYzWJriaJZ9E", "senderPublicKey": "ApZ1ntZBf9PT4kWa9ZRVbLxk43jqkqWHP5NWpjujGBw2", "proofs": [ "5hEavDbyXefXwALhKkL6re3KMTonPMse96xRZjxpHJfHgGk3AK7VyASCrswxfLaFH3dLDX52Ga4ss3vDAyqgYVbZ" ], "script": "base64:AAIEAAAAAAAAAB0IAhIAEgUKAwgIARIFCgMICAESBQoDCAgBEgASAAAAACIAAAAADGFkbWluUHViS2V5MQEAAAAgELDi6uQgdVvao3EGz2pOOnWzKruRdXrpd4DobbWyZx8AAAAADGFkbWluUHViS2V5MgEAAAAgELDi6uQgdVvao3EGz2pOOnWzKruRdXrpd4DobbWyZx8AAAAADGFkbWluUHViS2V5MwEAAAAgELDi6uQgdVvao3EGz2pOOnWzKruRdXrpd4DobbWyZx8AAAAAFGFkbWluUHViS2V5U3RhcnRTdG9wAQAAACAQsOLq5CB1W9qjcQbPak46dbMqu5F1eul3gOhttbJnHwAAAAASYWRtaW5QdWJLZXlTdGFraW5nAQAAACAQsOLq5CB1W9qjcQbPak46dbMqu5F1eul3gOhttbJnHwAAAAAPa2V5TGFzdEludGVyZXN0AgAAAA1sYXN0X2ludGVyZXN0AAAAABNrZXlVc2VyTGFzdEludGVyZXN0AgAAAA5fbGFzdF9pbnRlcmVzdAAAAAARa2V5VXNlclNXT1BBbW91bnQCAAAADF9TV09QX2Ftb3VudAAAAAAUa2V5VXNlckdldEJhY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2NrZWQJAQAAABJnZXRUb3RhbFNXT1BMb2NrZWQAAAAABAAAAAxsYXN0SW50ZXJlc3QJAQAAABNnZXRMYXN0SW50ZXJlc3RJbmZvAAAAAAQAAAALJHQwOTAwODkwNjMJAQAAAAljbGFpbUNhbGMAAAABCAUAAAABaQAAAAZjYWxsZXIEAAAAD3VzZXJOZXdJbnRlcmVzdAgFAAAACyR0MDkwMDg5MDYzAAAAAl8xBAAAAAtjbGFpbUFtb3VudAgFAAAACyR0MDkwMDg5MDYzAAAAAl8yBAAAAA51c2VyVm90ZUFtb3VudAkBAAAAFmdldFVzZXJUb3RhbFZvdGVBbW91bnQAAAABCAUAAAABaQAAAAZjYWxsZXIEAAAADWF2YWlsYWJsZUZ1bmQJAABlAAAAAgkAAGQAAAACCQEAAAARZ2V0VXNlclNXT1BBbW91bnQAAAABCAUAAAABaQAAAAZjYWxsZXIFAAAAC2NsYWltQW1vdW50BQAAAA51c2VyVm90ZUFtb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQAEJQAAAAEIBQAAAAFpAAAABmNhbGxlcgUAAAATa2V5VXNlckxhc3RJbnRlcmVzdAUAAAAPdXNlck5ld0ludGVyZXN0CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAAA9rZXlMYXN0SW50ZXJlc3QFAAAADGxhc3RJbnRlcmVzdAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyAgAAAAFfBQAAABFrZXlVc2VyU1dPUEFtb3VudAUAAAAOdXNlclZvdGVBbW91bnQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAA1hdmFpbGFibGVGdW5kBQAAAARTV09QBQAAAANuaWwAAAAA6mqrYQ==", "chainId": 84, "height": 1366505, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C29ZGAXjKxHhPnaAsJR9SiWRha4dhdjcRyz8wJ8LQU8n Next: FsHxQtZZPN4eLWzWpPNVpEgF47kkkBha77o4pstxvapi Diff:
Old | New | Differences | |
---|---|---|---|
134 | 134 | let $t047674842 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
135 | 135 | let pmtAmount = $t047674842._1 | |
136 | 136 | let pmtAssetId = $t047674842._2 | |
137 | - | if (true) | |
138 | - | then throw(toString(pmtAmount)) | |
139 | - | else if ((pmtAssetId != SWOP)) | |
140 | - | then throw("Incorrect pmtAssetId") | |
141 | - | else { | |
142 | - | let lastInterest = getLastInterestInfo() | |
143 | - | let $t050085090 = getUserInterestInfo(i.caller, lastInterest) | |
144 | - | let userLastInterest = $t050085090._1 | |
145 | - | let userSWOPAmount = $t050085090._2 | |
146 | - | let claimAmount = fraction(userSWOPAmount, (lastInterest - userLastInterest), scaleValue) | |
147 | - | let userSWOPAmountNew = ((userSWOPAmount + pmtAmount) + claimAmount) | |
148 | - | let userNewInterest = lastInterest | |
149 | - | let totalSWOPAmount = getTotalSWOPLocked() | |
150 | - | let totalSWOPLockedNew = (totalSWOPAmount + pmtAmount) | |
137 | + | if ((pmtAssetId != SWOP)) | |
138 | + | then throw("Incorrect pmtAssetId") | |
139 | + | else { | |
140 | + | let lastInterest = getLastInterestInfo() | |
141 | + | if (true) | |
142 | + | then throw(toString(lastInterest)) | |
143 | + | else { | |
144 | + | let $t050115093 = getUserInterestInfo(i.caller, lastInterest) | |
145 | + | let userLastInterest = $t050115093._1 | |
146 | + | let userSWOPAmount = $t050115093._2 | |
147 | + | let claimAmount = fraction(userSWOPAmount, (lastInterest - userLastInterest), scaleValue) | |
148 | + | let userSWOPAmountNew = ((userSWOPAmount + pmtAmount) + claimAmount) | |
149 | + | let userNewInterest = lastInterest | |
150 | + | let totalSWOPAmount = getTotalSWOPLocked() | |
151 | + | let totalSWOPLockedNew = (totalSWOPAmount + pmtAmount) | |
151 | 152 | [IntegerEntry((toString(i.caller) + keyUserLastInterest), userNewInterest), IntegerEntry((toString(i.caller) + keyUserSWOPAmount), userSWOPAmountNew), IntegerEntry(keyTotalSWOPAmount, totalSWOPLockedNew)] | |
152 | - | } | |
153 | + | } | |
154 | + | } | |
153 | 155 | } | |
154 | 156 | ||
155 | 157 | ||
205 | 207 | ||
206 | 208 | @Callable(i) | |
207 | 209 | func airDrop () = { | |
208 | - | let $ | |
209 | - | let pmtAmount = $ | |
210 | - | let pmtAssetId = $ | |
210 | + | let $t084338508 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
211 | + | let pmtAmount = $t084338508._1 | |
212 | + | let pmtAssetId = $t084338508._2 | |
211 | 213 | if ((pmtAssetId != SWOP)) | |
212 | 214 | then throw("Incorrect pmtAssetId") | |
213 | 215 | else { | |
224 | 226 | func claimSWOP () = { | |
225 | 227 | let totalSWOPLocked = getTotalSWOPLocked() | |
226 | 228 | let lastInterest = getLastInterestInfo() | |
227 | - | let $ | |
228 | - | let userNewInterest = $ | |
229 | - | let claimAmount = $ | |
229 | + | let $t090089063 = claimCalc(i.caller) | |
230 | + | let userNewInterest = $t090089063._1 | |
231 | + | let claimAmount = $t090089063._2 | |
230 | 232 | let userVoteAmount = getUserTotalVoteAmount(i.caller) | |
231 | 233 | let availableFund = ((getUserSWOPAmount(i.caller) + claimAmount) - userVoteAmount) | |
232 | 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 | 50 | let lastInterest = valueOrErrorMessage(getInteger(this, keyLastInterest), ("No data on the key: " + keyLastInterest)) | |
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 | 123 | let $t044634550 = getUserInterestInfo(caller, lastInterest) | |
124 | 124 | let userLastInterest = $t044634550._1 | |
125 | 125 | let userShareTokensAmount = $t044634550._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 | 134 | let $t047674842 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
135 | 135 | let pmtAmount = $t047674842._1 | |
136 | 136 | let pmtAssetId = $t047674842._2 | |
137 | - | if (true) | |
138 | - | then throw(toString(pmtAmount)) | |
139 | - | else if ((pmtAssetId != SWOP)) | |
140 | - | then throw("Incorrect pmtAssetId") | |
141 | - | else { | |
142 | - | let lastInterest = getLastInterestInfo() | |
143 | - | let $t050085090 = getUserInterestInfo(i.caller, lastInterest) | |
144 | - | let userLastInterest = $t050085090._1 | |
145 | - | let userSWOPAmount = $t050085090._2 | |
146 | - | let claimAmount = fraction(userSWOPAmount, (lastInterest - userLastInterest), scaleValue) | |
147 | - | let userSWOPAmountNew = ((userSWOPAmount + pmtAmount) + claimAmount) | |
148 | - | let userNewInterest = lastInterest | |
149 | - | let totalSWOPAmount = getTotalSWOPLocked() | |
150 | - | let totalSWOPLockedNew = (totalSWOPAmount + pmtAmount) | |
137 | + | if ((pmtAssetId != SWOP)) | |
138 | + | then throw("Incorrect pmtAssetId") | |
139 | + | else { | |
140 | + | let lastInterest = getLastInterestInfo() | |
141 | + | if (true) | |
142 | + | then throw(toString(lastInterest)) | |
143 | + | else { | |
144 | + | let $t050115093 = getUserInterestInfo(i.caller, lastInterest) | |
145 | + | let userLastInterest = $t050115093._1 | |
146 | + | let userSWOPAmount = $t050115093._2 | |
147 | + | let claimAmount = fraction(userSWOPAmount, (lastInterest - userLastInterest), scaleValue) | |
148 | + | let userSWOPAmountNew = ((userSWOPAmount + pmtAmount) + claimAmount) | |
149 | + | let userNewInterest = lastInterest | |
150 | + | let totalSWOPAmount = getTotalSWOPLocked() | |
151 | + | let totalSWOPLockedNew = (totalSWOPAmount + pmtAmount) | |
151 | 152 | [IntegerEntry((toString(i.caller) + keyUserLastInterest), userNewInterest), IntegerEntry((toString(i.caller) + keyUserSWOPAmount), userSWOPAmountNew), IntegerEntry(keyTotalSWOPAmount, totalSWOPLockedNew)] | |
152 | - | } | |
153 | + | } | |
154 | + | } | |
153 | 155 | } | |
154 | 156 | ||
155 | 157 | ||
156 | 158 | ||
157 | 159 | @Callable(i) | |
158 | 160 | func vote (voteName,option,voteAddSWOPAmount) = { | |
159 | 161 | let userSWOPAmount = getUserSWOPAmount(i.caller) | |
160 | 162 | let userTotalVoteAmount = getUserTotalVoteAmount(i.caller) | |
161 | 163 | let userVoteOptionAmount = getVoteOptionAmount(i.caller, voteName, option) | |
162 | 164 | if ((voteAddSWOPAmount > (userSWOPAmount - userTotalVoteAmount))) | |
163 | 165 | then throwNotEnoughSWOP() | |
164 | 166 | else { | |
165 | 167 | let totalVoteOptionAmount = getTotalVoteOptionAmount(voteName, option) | |
166 | 168 | let voteDuration = getVoteDuration(voteName) | |
167 | 169 | let votingStartHeight = getVotingStartHeight(option) | |
168 | 170 | let userTotalVoteAmountNew = (userTotalVoteAmount + voteAddSWOPAmount) | |
169 | 171 | let userVoteOptionAmountNew = (userVoteOptionAmount + voteAddSWOPAmount) | |
170 | 172 | let voteOptionAmountNew = (totalVoteOptionAmount + voteAddSWOPAmount) | |
171 | 173 | [IntegerEntry((((voteName + "_") + option) + keyTotalVoteOptionAmount), voteOptionAmountNew), IntegerEntry((((voteName + option) + toString(i.caller)) + keyUserVoteOptionAmount), userVoteOptionAmountNew), IntegerEntry((toString(i.caller) + keyUserVoteTotalAmount), userTotalVoteAmountNew)] | |
172 | 174 | } | |
173 | 175 | } | |
174 | 176 | ||
175 | 177 | ||
176 | 178 | ||
177 | 179 | @Callable(i) | |
178 | 180 | func unvote (voteName,option,unvoteSWOPAmount) = { | |
179 | 181 | let userSWOPAmount = getUserSWOPAmount(i.caller) | |
180 | 182 | let userTotalVoteAmount = getUserTotalVoteAmount(i.caller) | |
181 | 183 | let userVoteOptionAmount = getVoteOptionAmount(i.caller, voteName, option) | |
182 | 184 | if ((unvoteSWOPAmount > userVoteOptionAmount)) | |
183 | 185 | then throwNotEnoughSWOP() | |
184 | 186 | else { | |
185 | 187 | let totalVoteOptionAmount = getTotalVoteOptionAmount(voteName, option) | |
186 | 188 | let voteDuration = getVoteDuration(voteName) | |
187 | 189 | let votingStartHeight = getVotingStartHeight(option) | |
188 | 190 | let userVoteOptionAmountNew = (userVoteOptionAmount - unvoteSWOPAmount) | |
189 | 191 | let voteOptionAmountNew = (totalVoteOptionAmount - unvoteSWOPAmount) | |
190 | 192 | let getBackSWOPHeight = (votingStartHeight + (2 * voteDuration)) | |
191 | 193 | [IntegerEntry((((voteName + "_") + option) + keyTotalVoteOptionAmount), voteOptionAmountNew), IntegerEntry((((voteName + option) + toString(i.caller)) + keyUserVoteOptionAmount), userVoteOptionAmountNew), IntegerEntry(((((((voteName + "_") + option) + "_") + toString(i.caller)) + "_") + toString(getBackSWOPHeight)), unvoteSWOPAmount)] | |
192 | 194 | } | |
193 | 195 | } | |
194 | 196 | ||
195 | 197 | ||
196 | 198 | ||
197 | 199 | @Callable(i) | |
198 | 200 | func getBackSWOPfromOption (voteName,option,getBackSWOPHeight) = { | |
199 | 201 | let userTotalVoteAmount = getUserTotalVoteAmount(i.caller) | |
200 | 202 | let userGetBackAmount = getUserGetBackAmount(voteName, option, i.caller, getBackSWOPHeight) | |
201 | 203 | [IntegerEntry(((((((voteName + "_") + option) + "_") + toString(i.caller)) + "_") + toString(getBackSWOPHeight)), 0), ScriptTransfer(i.caller, userGetBackAmount, SWOP)] | |
202 | 204 | } | |
203 | 205 | ||
204 | 206 | ||
205 | 207 | ||
206 | 208 | @Callable(i) | |
207 | 209 | func airDrop () = { | |
208 | - | let $ | |
209 | - | let pmtAmount = $ | |
210 | - | let pmtAssetId = $ | |
210 | + | let $t084338508 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
211 | + | let pmtAmount = $t084338508._1 | |
212 | + | let pmtAssetId = $t084338508._2 | |
211 | 213 | if ((pmtAssetId != SWOP)) | |
212 | 214 | then throw("Incorrect pmtAssetId") | |
213 | 215 | else { | |
214 | 216 | let totalSWOPAmount = getTotalSWOPLocked() | |
215 | 217 | let lastInterest = getLastInterestInfo() | |
216 | 218 | let interestNew = (lastInterest + fraction(pmtAmount, scaleValue, totalSWOPAmount)) | |
217 | 219 | [IntegerEntry(keyLastInterest, interestNew)] | |
218 | 220 | } | |
219 | 221 | } | |
220 | 222 | ||
221 | 223 | ||
222 | 224 | ||
223 | 225 | @Callable(i) | |
224 | 226 | func claimSWOP () = { | |
225 | 227 | let totalSWOPLocked = getTotalSWOPLocked() | |
226 | 228 | let lastInterest = getLastInterestInfo() | |
227 | - | let $ | |
228 | - | let userNewInterest = $ | |
229 | - | let claimAmount = $ | |
229 | + | let $t090089063 = claimCalc(i.caller) | |
230 | + | let userNewInterest = $t090089063._1 | |
231 | + | let claimAmount = $t090089063._2 | |
230 | 232 | let userVoteAmount = getUserTotalVoteAmount(i.caller) | |
231 | 233 | let availableFund = ((getUserSWOPAmount(i.caller) + claimAmount) - userVoteAmount) | |
232 | 234 | [IntegerEntry((toString(i.caller) + keyUserLastInterest), userNewInterest), IntegerEntry(keyLastInterest, lastInterest), IntegerEntry(((toString(i.caller) + "_") + keyUserSWOPAmount), userVoteAmount), ScriptTransfer(i.caller, availableFund, SWOP)] | |
233 | 235 | } | |
234 | 236 | ||
235 | 237 |
github/deemru/w8io/169f3d6 37.53 ms ◑