tx · 3rk8Yad1JzGBiLLTe18KXXeM4SH1ro2pc4HWcPkJ9vbJ 3MrGSjj1hmqSZCYaGGtU3eoskXtg5iAQQjj: -0.01400000 Waves 2021.01.23 22:55 [1366601] smart account 3MrGSjj1hmqSZCYaGGtU3eoskXtg5iAQQjj > SELF 0.00000000 Waves
{ "type": 13, "id": "3rk8Yad1JzGBiLLTe18KXXeM4SH1ro2pc4HWcPkJ9vbJ", "fee": 1400000, "feeAssetId": null, "timestamp": 1611431750132, "version": 1, "sender": "3MrGSjj1hmqSZCYaGGtU3eoskXtg5iAQQjj", "senderPublicKey": "4xNG9S8k3vK3ES8LiV3S6ygJd7WvmFAWePZvmjuNGgua", "proofs": [ "2Rgo4o7G6zUf3ycmMNbXiKRWiofta6qk1QF6VU2c8YF71RDKSsKH1NEFYXhtxkunWXZY6PsugQHU2X1ngdGSjfEy" ], "script": "base64:AAIEAAAAAAAAAB8IAhIAEgUKAwgIARIFCgMICAESBQoDCAgBEgASABIAAAAAJAAAAAAMYWRtaW5QdWJLZXkxAQAAACAQsOLq5CB1W9qjcQbPak46dbMqu5F1eul3gOhttbJnHwAAAAAMYWRtaW5QdWJLZXkyAQAAACAQsOLq5CB1W9qjcQbPak46dbMqu5F1eul3gOhttbJnHwAAAAAMYWRtaW5QdWJLZXkzAQAAACAQsOLq5CB1W9qjcQbPak46dbMqu5F1eul3gOhttbJnHwAAAAAUYWRtaW5QdWJLZXlTdGFydFN0b3ABAAAAIBCw4urkIHVb2qNxBs9qTjp1syq7kXV66XeA6G21smcfAAAAABJhZG1pblB1YktleVN0YWtpbmcBAAAAIBCw4urkIHVb2qNxBs9qTjp1syq7kXV66XeA6G21smcfAAAAAA9rZXlMYXN0SW50ZXJlc3QCAAAADWxhc3RfaW50ZXJlc3QAAAAAE2tleVVzZXJMYXN0SW50ZXJlc3QCAAAADl9sYXN0X2ludGVyZXN0AAAAABFrZXlVc2VyU1dPUEFtb3VudAIAAAAMX1NXT1BfYW1vdW50AAAAABRrZXl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NhbGxlcgUAAAALY2xhaW1BbW91bnQFAAAADnVzZXJWb3RlQW1vdW50BAAAABJ0b3RhbFNXT1BMb2NrZWROZXcJAABlAAAAAgUAAAAPdG90YWxTV09QTG9ja2VkBQAAAA1hdmFpbGFibGVGdW5kBAAAABF1c2VyQ2xhaW1lZEFtb3VudAkBAAAAGGdldFVzZXJTV09QQ2xhaW1lZEFtb3VudAAAAAEIBQAAAAFpAAAABmNhbGxlcgQAAAAUdXNlckNsYWltZWRBbW91bnROZXcJAABkAAAAAgUAAAARdXNlckNsYWltZWRBbW91bnQFAAAAC2NsYWltQW1vdW50CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyBQAAABNrZXlVc2VyTGFzdEludGVyZXN0BQAAAA91c2VyTmV3SW50ZXJlc3QJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAAD2tleUxhc3RJbnRlcmVzdAUAAAAMbGFzdEludGVyZXN0CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyBQAAABFrZXlVc2VyU1dPUEFtb3VudAkAAGQAAAACBQAAAA1hdmFpbGFibGVGdW5kBQAAAA51c2VyVm90ZUFtb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQAEJQAAAAEIBQAAAAFpAAAABmNhbGxlcgUAAAAYa2V5VXNlclNXT1BDbGFpbWVkQW1vdW50BQAAABR1c2VyQ2xhaW1lZEFtb3VudE5ldwUAAAADbmlsAAAAAJoDSlM=", "chainId": 84, "height": 1366601, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6LkLCeCH8BEHfbmCpSkR3kfX8RHFfMMukNQ4bkNWYrwK Next: 3WWxoUmkz8oQTgbVJtYzGeMfTJySz2q9TEdGjLnKwmhS Full:
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 | 149 | let claimAmount = fraction(userSWOPAmount, (lastInterest - userLastInterest), scaleValue) | |
150 | 150 | let userSWOPAmountNew = ((userSWOPAmount + pmtAmount) + claimAmount) | |
151 | 151 | let userNewInterest = lastInterest | |
152 | 152 | let totalSWOPAmount = getTotalSWOPLocked() | |
153 | 153 | let totalSWOPLockedNew = (totalSWOPAmount + pmtAmount) | |
154 | 154 | [IntegerEntry((toString(i.caller) + keyUserLastInterest), userNewInterest), IntegerEntry((toString(i.caller) + keyUserSWOPAmount), userSWOPAmountNew), IntegerEntry(keyTotalSWOPAmount, totalSWOPLockedNew)] | |
155 | 155 | } | |
156 | 156 | } | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | ||
160 | 160 | @Callable(i) | |
161 | 161 | func vote (voteName,option,voteAddSWOPAmount) = { | |
162 | 162 | let userSWOPAmount = getUserSWOPAmount(i.caller) | |
163 | 163 | let userTotalVoteAmount = getUserTotalVoteAmount(i.caller) | |
164 | 164 | let userVoteOptionAmount = getVoteOptionAmount(i.caller, voteName, option) | |
165 | 165 | if ((voteAddSWOPAmount > (userSWOPAmount - userTotalVoteAmount))) | |
166 | 166 | then throwNotEnoughSWOP() | |
167 | 167 | else { | |
168 | 168 | let totalVoteOptionAmount = getTotalVoteOptionAmount(voteName, option) | |
169 | 169 | let voteDuration = getVoteDuration(voteName) | |
170 | 170 | let votingStartHeight = getVotingStartHeight(option) | |
171 | 171 | let userTotalVoteAmountNew = (userTotalVoteAmount + voteAddSWOPAmount) | |
172 | 172 | let userVoteOptionAmountNew = (userVoteOptionAmount + voteAddSWOPAmount) | |
173 | 173 | let voteOptionAmountNew = (totalVoteOptionAmount + voteAddSWOPAmount) | |
174 | 174 | [IntegerEntry((((voteName + "_") + option) + keyTotalVoteOptionAmount), voteOptionAmountNew), IntegerEntry((((voteName + option) + toString(i.caller)) + keyUserVoteOptionAmount), userVoteOptionAmountNew), IntegerEntry((toString(i.caller) + keyUserVoteTotalAmount), userTotalVoteAmountNew)] | |
175 | 175 | } | |
176 | 176 | } | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | ||
180 | 180 | @Callable(i) | |
181 | 181 | func unvote (voteName,option,unvoteSWOPAmount) = { | |
182 | 182 | let userSWOPAmount = getUserSWOPAmount(i.caller) | |
183 | 183 | let userTotalVoteAmount = getUserTotalVoteAmount(i.caller) | |
184 | 184 | let userVoteOptionAmount = getVoteOptionAmount(i.caller, voteName, option) | |
185 | 185 | if ((unvoteSWOPAmount > userVoteOptionAmount)) | |
186 | 186 | then throwNotEnoughSWOP() | |
187 | 187 | else { | |
188 | 188 | let totalVoteOptionAmount = getTotalVoteOptionAmount(voteName, option) | |
189 | 189 | let voteDuration = getVoteDuration(voteName) | |
190 | 190 | let votingStartHeight = getVotingStartHeight(option) | |
191 | 191 | let userVoteOptionAmountNew = (userVoteOptionAmount - unvoteSWOPAmount) | |
192 | 192 | let voteOptionAmountNew = (totalVoteOptionAmount - unvoteSWOPAmount) | |
193 | 193 | let getBackSWOPHeight = (votingStartHeight + (2 * voteDuration)) | |
194 | 194 | [IntegerEntry((((voteName + "_") + option) + keyTotalVoteOptionAmount), voteOptionAmountNew), IntegerEntry((((voteName + option) + toString(i.caller)) + keyUserVoteOptionAmount), userVoteOptionAmountNew), IntegerEntry(((((((voteName + "_") + option) + "_") + toString(i.caller)) + "_") + toString(getBackSWOPHeight)), unvoteSWOPAmount)] | |
195 | 195 | } | |
196 | 196 | } | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | ||
200 | 200 | @Callable(i) | |
201 | 201 | func getBackSWOPfromOption (voteName,option,getBackSWOPHeight) = { | |
202 | 202 | let userTotalVoteAmount = getUserTotalVoteAmount(i.caller) | |
203 | 203 | let userGetBackAmount = getUserGetBackAmount(voteName, option, i.caller, getBackSWOPHeight) | |
204 | 204 | [IntegerEntry(((((((voteName + "_") + option) + "_") + toString(i.caller)) + "_") + toString(getBackSWOPHeight)), 0), ScriptTransfer(i.caller, userGetBackAmount, SWOP)] | |
205 | 205 | } | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | ||
209 | 209 | @Callable(i) | |
210 | 210 | func airDrop () = { | |
211 | 211 | let $t083658440 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
212 | 212 | let pmtAmount = $t083658440._1 | |
213 | 213 | let pmtAssetId = $t083658440._2 | |
214 | 214 | if ((pmtAssetId != SWOP)) | |
215 | 215 | then throw("Incorrect pmtAssetId") | |
216 | 216 | else { | |
217 | 217 | let totalSWOPAmount = getTotalSWOPLocked() | |
218 | 218 | let totalSWOPAmountNew = (totalSWOPAmount + pmtAmount) | |
219 | 219 | let lastInterest = getLastInterestInfo() | |
220 | 220 | let interestNew = (lastInterest + fraction(pmtAmount, scaleValue, totalSWOPAmount)) | |
221 | 221 | [IntegerEntry(keyLastInterest, interestNew), IntegerEntry(keyTotalSWOPAmount, totalSWOPAmountNew)] | |
222 | 222 | } | |
223 | 223 | } | |
224 | 224 | ||
225 | 225 | ||
226 | 226 | ||
227 | 227 | @Callable(i) | |
228 | 228 | func claimSWOPandWithdraw () = { | |
229 | 229 | let totalSWOPLocked = getTotalSWOPLocked() | |
230 | 230 | let lastInterest = getLastInterestInfo() | |
231 | 231 | let $t090709125 = claimCalc(i.caller) | |
232 | 232 | let userNewInterest = $t090709125._1 | |
233 | 233 | let claimAmount = $t090709125._2 | |
234 | 234 | let userVoteAmount = getUserTotalVoteAmount(i.caller) | |
235 | 235 | let availableFund = ((getUserSWOPAmount(i.caller) + claimAmount) - userVoteAmount) | |
236 | 236 | let totalSWOPLockedNew = (totalSWOPLocked - availableFund) | |
237 | 237 | let userClaimedAmount = getUserSWOPClaimedAmount(i.caller) | |
238 | 238 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
239 | 239 | [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 | 240 | } | |
241 | 241 | ||
242 | 242 | ||
243 | 243 | ||
244 | 244 | @Callable(i) | |
245 | 245 | func claimSWOPandStake () = { | |
246 | 246 | let totalSWOPLocked = getTotalSWOPLocked() | |
247 | 247 | let lastInterest = getLastInterestInfo() | |
248 | 248 | let $t01011710172 = claimCalc(i.caller) | |
249 | 249 | let userNewInterest = $t01011710172._1 | |
250 | 250 | let claimAmount = $t01011710172._2 | |
251 | 251 | let userVoteAmount = getUserTotalVoteAmount(i.caller) | |
252 | 252 | let availableFund = ((getUserSWOPAmount(i.caller) + claimAmount) - userVoteAmount) | |
253 | 253 | let totalSWOPLockedNew = (totalSWOPLocked - availableFund) | |
254 | 254 | let userClaimedAmount = getUserSWOPClaimedAmount(i.caller) | |
255 | 255 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
256 | 256 | [IntegerEntry((toString(i.caller) + keyUserLastInterest), userNewInterest), IntegerEntry(keyLastInterest, lastInterest), IntegerEntry((toString(i.caller) + keyUserSWOPAmount), (availableFund + userVoteAmount)), IntegerEntry((toString(i.caller) + keyUserSWOPClaimedAmount), userClaimedAmountNew)] | |
257 | 257 | } | |
258 | 258 | ||
259 | 259 |
github/deemru/w8io/169f3d6 36.24 ms ◑