tx · EE21VQun1xkeTFFSTsz3JdFCmRxbvRyZXN1Vp9K39oxy 3N6CYoCsxrcXKe75pQvvV3JqJrwJjm1t4QN: -0.01400000 Waves 2021.04.14 13:37 [1482010] smart account 3N6CYoCsxrcXKe75pQvvV3JqJrwJjm1t4QN > SELF 0.00000000 Waves
{ "type": 13, "id": "EE21VQun1xkeTFFSTsz3JdFCmRxbvRyZXN1Vp9K39oxy", "fee": 1400000, "feeAssetId": null, "timestamp": 1618396788703, "version": 2, "chainId": 84, "sender": "3N6CYoCsxrcXKe75pQvvV3JqJrwJjm1t4QN", "senderPublicKey": "9NDcimsSfq5LxxqoVoq2nbMd1zPqZhFvr6mVUiXWwtM1", "proofs": [ "ZGwxR2XqshrLF8htmaDJRpSfCEFUsXZNSuDUS4qHXPsAvKVEEHcMCe3PgwsCXeJCMWQVpUyN4jmHcmVJKGYqu9L" ], "script": "base64:AAIEAAAAAAAAAAgIAhIECgIIAQAAABwAAAAADGFkbWluUHViS2V5MQEAAAAgBM915WTQwQ9OZ7kfE2TEGg3qhCRCMX0zkF1AWAqdk0oAAAAADGFkbWluUHViS2V5MgEAAAAgBM915WTQwQ9OZ7kfE2TEGg3qhCRCMX0zkF1AWAqdk0oAAAAADGFkbWluUHViS2V5MwEAAAAgBM915WTQwQ9OZ7kfE2TEGg3qhCRCMX0zkF1AWAqdk0oAAAAAEWtVc2VyUG9vbFZvdGVTV09QAgAAAAVfdm90ZQAAAAAOa1VzZXJQb29sU3RydWMCAAAAEF91c2VyX3Bvb2xfc3RydWMAAAAAEmtVc2VyVG90YWxWb3RlU1dPUAIAAAAVX3VzZXJfdG90YWxfU1dPUF92b3RlAAAAAA9rVXNlclRvdGFsU3RydWMCAAAAEV91c2VyX3RvdGFsX3N0cnVjAAAAAA1rUG9vbFZvdGVTV09QAgAAAApfdm90ZV9TV09QAAAAAAprUG9vbFN0cnVjAgAAAAtfcG9vbF9zdHJ1YwAAAAAOa1RvdGFsVm90ZVNXT1ACAAAAD3RvdGFs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90ZVNXT1BuZXcAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleetWmsM=", "height": 1482010, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FcHgQrEbB5nxyZ5p1Y4AoCsYhF1wE1wSahrKHU9E7Uoh Next: 58vCymQXckcpzY74hWKSW6BF9cW2g4oUq6fmDhMsKqN7 Diff:
Old | New | Differences | |
---|---|---|---|
148 | 148 | let userTotalVoteSWOPnew = (userTotalVoteSWOP + poolVoteDiffSWOP) | |
149 | 149 | if (!(isCallerInGovernance(i.caller))) | |
150 | 150 | then throw("This address has 0 SWOP in Governance dApp") | |
151 | - | else if ( | |
152 | - | then throw(" | |
151 | + | else if (false) | |
152 | + | then throw((((" has " + toString(userSWOPinGovernance)) + " SWOP in governance. New SWOP in voting ") + toString(userTotalVoteSWOPnew))) | |
153 | 153 | else if ((0 > userTotalVoteSWOPnew)) | |
154 | 154 | then throw("New userPoolVoteSWOPnew < 0") | |
155 | 155 | else if (true) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let adminPubKey1 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
5 | 5 | ||
6 | 6 | let adminPubKey2 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
7 | 7 | ||
8 | 8 | let adminPubKey3 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
9 | 9 | ||
10 | 10 | let kUserPoolVoteSWOP = "_vote" | |
11 | 11 | ||
12 | 12 | let kUserPoolStruc = "_user_pool_struc" | |
13 | 13 | ||
14 | 14 | let kUserTotalVoteSWOP = "_user_total_SWOP_vote" | |
15 | 15 | ||
16 | 16 | let kUserTotalStruc = "_user_total_struc" | |
17 | 17 | ||
18 | 18 | let kPoolVoteSWOP = "_vote_SWOP" | |
19 | 19 | ||
20 | 20 | let kPoolStruc = "_pool_struc" | |
21 | 21 | ||
22 | 22 | let kTotalVoteSWOP = "total_vote_SWOP" | |
23 | 23 | ||
24 | 24 | let kTotalStruc = "total_struc" | |
25 | 25 | ||
26 | 26 | let kStartHeight = "start_height" | |
27 | 27 | ||
28 | 28 | let kBasePeriod = "base_period" | |
29 | 29 | ||
30 | 30 | let kPeriodLength = "period_length" | |
31 | 31 | ||
32 | 32 | let kDurationFullVotePower = "duration_full_vote_power" | |
33 | 33 | ||
34 | 34 | let kMinVotePower = "min_vote_power" | |
35 | 35 | ||
36 | 36 | let scale8 = 100000000 | |
37 | 37 | ||
38 | 38 | let basePeriod = valueOrErrorMessage(getInteger(this, kBasePeriod), "Empty kBasePeriod") | |
39 | 39 | ||
40 | 40 | let startHeight = valueOrErrorMessage(getInteger(this, kStartHeight), "Empty kStartHeight") | |
41 | 41 | ||
42 | 42 | let periodLength = valueOrErrorMessage(getInteger(this, kPeriodLength), "Empty kPeriodLength") | |
43 | 43 | ||
44 | 44 | let durationFullVotePower = valueOrErrorMessage(getInteger(this, kDurationFullVotePower), "Empty kDurationFullVotePower") | |
45 | 45 | ||
46 | 46 | let minVotePower = valueOrErrorMessage(getInteger(this, kMinVotePower), "Empty kMinVotePower") | |
47 | 47 | ||
48 | 48 | let govAddr = Address(base58'3MzJZEn6jzxCPaHEfkrXd7FhbjTyVjdRPLS') | |
49 | 49 | ||
50 | 50 | let currPeriod = (basePeriod + ((height - startHeight) / periodLength)) | |
51 | 51 | ||
52 | 52 | func isCallerInGovernance (user) = if ((valueOrElse(getInteger(govAddr, (toString(user) + "_SWOP_amount")), 0) > 0)) | |
53 | 53 | then true | |
54 | 54 | else false | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func isPoolInGovernance (poolAddress) = isDefined(getInteger(govAddr, (poolAddress + "_current_pool_fraction_reward"))) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func votingCoef () = { | |
61 | 61 | let votingDuration = (height - (startHeight + (currPeriod * periodLength))) | |
62 | 62 | if ((durationFullVotePower > votingDuration)) | |
63 | 63 | then scale8 | |
64 | 64 | else { | |
65 | 65 | let x1 = durationFullVotePower | |
66 | 66 | let y1 = scale8 | |
67 | 67 | let x2 = periodLength | |
68 | 68 | let y2 = minVotePower | |
69 | 69 | let k = (((y2 - y1) * scale8) / (x2 - x1)) | |
70 | 70 | let b = ((y1 * scale8) - (k * x1)) | |
71 | 71 | (((votingDuration * k) / scale8) + (b / scale8)) | |
72 | 72 | } | |
73 | 73 | } | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func calcDeleteEntry (caller,poolAddress,userPoolVoteSWOPnew) = { | |
77 | 77 | let deleteKeyUserPoolVoteSWOP = if (isDefined(getInteger(this, (((caller + "_") + poolAddress) + kUserPoolVoteSWOP)))) | |
78 | 78 | then DeleteEntry((((caller + "_") + poolAddress) + kUserPoolVoteSWOP)) | |
79 | 79 | else DeleteEntry(".") | |
80 | 80 | let deleteKeyUserTotalVoteSWOP = if (isDefined(getInteger(this, (caller + kUserTotalVoteSWOP)))) | |
81 | 81 | then DeleteEntry((caller + kUserTotalVoteSWOP)) | |
82 | 82 | else DeleteEntry(".") | |
83 | 83 | let deleteKeyPoolVoteSWOP = if (isDefined(getInteger(this, (poolAddress + kPoolVoteSWOP)))) | |
84 | 84 | then DeleteEntry((poolAddress + kPoolVoteSWOP)) | |
85 | 85 | else DeleteEntry(".") | |
86 | 86 | let deleteKeyTotalVoteSWOP = if (isDefined(getInteger(this, kTotalVoteSWOP))) | |
87 | 87 | then DeleteEntry(kTotalVoteSWOP) | |
88 | 88 | else DeleteEntry(".") | |
89 | 89 | [deleteKeyUserPoolVoteSWOP, deleteKeyUserTotalVoteSWOP, deleteKeyPoolVoteSWOP, deleteKeyTotalVoteSWOP] | |
90 | 90 | } | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | @Callable(i) | |
94 | 94 | func votePoolWeight (poolAddress,userPoolVoteSWOPnew) = { | |
95 | 95 | let userSWOPinGovernance = valueOrErrorMessage(getInteger(govAddr, (toString(i.caller) + "_SWOP_amount")), "Empty _SWOP_amount at gov. address") | |
96 | 96 | let $t035564198 = if (isDefined(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc)))) | |
97 | 97 | then { | |
98 | 98 | let data = split(valueOrErrorMessage(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc)), "Empty kUserPoolStruc"), "_") | |
99 | 99 | $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3])) | |
100 | 100 | } | |
101 | 101 | else { | |
102 | 102 | let uPoolVoteSWOP = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolVoteSWOP)), 0) | |
103 | 103 | $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, currPeriod, 0) | |
104 | 104 | } | |
105 | 105 | let userPoolVoteSWOP = $t035564198._1 | |
106 | 106 | let userPoolActiveVoteSWOP = $t035564198._2 | |
107 | 107 | let userPoolVotePeriod = $t035564198._3 | |
108 | 108 | let userPoolFreezeSWOP = $t035564198._4 | |
109 | 109 | let $t042044721 = if (isDefined(getString(this, (toString(i.caller) + kUserTotalStruc)))) | |
110 | 110 | then { | |
111 | 111 | let data = split(valueOrErrorMessage(getString(this, (toString(i.caller) + kUserTotalStruc)), "Empty kUserTotalStruc"), "_") | |
112 | 112 | $Tuple3(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2])) | |
113 | 113 | } | |
114 | 114 | else { | |
115 | 115 | let uPoolTotalSWOP = valueOrElse(getInteger(this, (toString(i.caller) + kUserTotalVoteSWOP)), 0) | |
116 | 116 | $Tuple3(uPoolTotalSWOP, 0, currPeriod) | |
117 | 117 | } | |
118 | 118 | let userTotalVoteSWOP = $t042044721._1 | |
119 | 119 | let userUnvoted = $t042044721._2 | |
120 | 120 | let userUnvotedPeriod = $t042044721._3 | |
121 | 121 | let $t047265233 = if (isDefined(getString(this, (poolAddress + kPoolStruc)))) | |
122 | 122 | then { | |
123 | 123 | let data = split(valueOrErrorMessage(getString(this, (poolAddress + kPoolStruc)), "Empty kPoolStruc"), "_") | |
124 | 124 | $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3])) | |
125 | 125 | } | |
126 | 126 | else { | |
127 | 127 | let uPoolVoteSWOP = valueOrElse(getInteger(this, (poolAddress + kPoolVoteSWOP)), 0) | |
128 | 128 | $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, 0, 0) | |
129 | 129 | } | |
130 | 130 | let poolVoteSWOP = $t047265233._1 | |
131 | 131 | let poolActiveSWOP = $t047265233._2 | |
132 | 132 | let poolPeriod = $t047265233._3 | |
133 | 133 | let poolFreezeSWOP = $t047265233._4 | |
134 | 134 | let $t052395734 = if (isDefined(getString(this, kTotalStruc))) | |
135 | 135 | then { | |
136 | 136 | let data = split(valueOrErrorMessage(getString(this, kTotalStruc), "Empty kTotalStruc"), "_") | |
137 | 137 | $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3])) | |
138 | 138 | } | |
139 | 139 | else { | |
140 | 140 | let uTotalVoteSWOP = valueOrElse(getInteger(this, kTotalVoteSWOP), 0) | |
141 | 141 | $Tuple4(uTotalVoteSWOP, uTotalVoteSWOP, 0, 0) | |
142 | 142 | } | |
143 | 143 | let totalVoteSWOP = $t052395734._1 | |
144 | 144 | let totalActiveSWOP = $t052395734._2 | |
145 | 145 | let totalPeriod = $t052395734._3 | |
146 | 146 | let totalFreezeSWOP = $t052395734._4 | |
147 | 147 | let poolVoteDiffSWOP = (userPoolVoteSWOPnew - userPoolVoteSWOP) | |
148 | 148 | let userTotalVoteSWOPnew = (userTotalVoteSWOP + poolVoteDiffSWOP) | |
149 | 149 | if (!(isCallerInGovernance(i.caller))) | |
150 | 150 | then throw("This address has 0 SWOP in Governance dApp") | |
151 | - | else if ( | |
152 | - | then throw(" | |
151 | + | else if (false) | |
152 | + | then throw((((" has " + toString(userSWOPinGovernance)) + " SWOP in governance. New SWOP in voting ") + toString(userTotalVoteSWOPnew))) | |
153 | 153 | else if ((0 > userTotalVoteSWOPnew)) | |
154 | 154 | then throw("New userPoolVoteSWOPnew < 0") | |
155 | 155 | else if (true) | |
156 | 156 | then throw("line 121") | |
157 | 157 | else if ((userPoolVoteSWOPnew >= userPoolVoteSWOP)) | |
158 | 158 | then { | |
159 | 159 | let coef = votingCoef() | |
160 | 160 | let userPoolActiveVoteSWOPnew = if ((userPoolVotePeriod == currPeriod)) | |
161 | 161 | then (userPoolActiveVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8)) | |
162 | 162 | else (userPoolVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8)) | |
163 | 163 | let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod)) | |
164 | 164 | then userPoolFreezeSWOP | |
165 | 165 | else userPoolVoteSWOP | |
166 | 166 | let userUnvotedNew = if ((userUnvoted == currPeriod)) | |
167 | 167 | then userUnvoted | |
168 | 168 | else max([0, (userUnvoted - poolVoteDiffSWOP)]) | |
169 | 169 | let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew)) | |
170 | 170 | let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)] | |
171 | 171 | let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(currPeriod)) | |
172 | 172 | let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)] | |
173 | 173 | let poolVoteSWOPnew = (poolVoteSWOP + poolVoteDiffSWOP) | |
174 | 174 | let poolActiveSWOPnew = if ((poolPeriod == currPeriod)) | |
175 | 175 | then (poolActiveSWOP + ((poolVoteDiffSWOP * coef) / scale8)) | |
176 | 176 | else (poolVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8)) | |
177 | 177 | let poolFreezeSWOPnew = if ((poolPeriod == currPeriod)) | |
178 | 178 | then poolFreezeSWOP | |
179 | 179 | else poolVoteSWOP | |
180 | 180 | let poolStrucNew = ((((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(poolFreezeSWOPnew)) | |
181 | 181 | let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)] | |
182 | 182 | let totalVoteSWOPnew = (totalVoteSWOP + poolVoteDiffSWOP) | |
183 | 183 | let totalActiveSWOPnew = if ((totalPeriod == currPeriod)) | |
184 | 184 | then (totalActiveSWOP + ((poolVoteDiffSWOP * coef) / scale8)) | |
185 | 185 | else (totalVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8)) | |
186 | 186 | let totalFreezeSWOPnew = if ((poolPeriod == currPeriod)) | |
187 | 187 | then totalFreezeSWOP | |
188 | 188 | else totalVoteSWOP | |
189 | 189 | let totalStrucNew = ((((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(totalPeriod)) + "_") + toString(totalFreezeSWOPnew)) | |
190 | 190 | let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)] | |
191 | 191 | ((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew)) | |
192 | 192 | } | |
193 | 193 | else { | |
194 | 194 | let removePoolVote = -(poolVoteDiffSWOP) | |
195 | 195 | let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod)) | |
196 | 196 | then min([userPoolFreezeSWOP, userPoolVoteSWOPnew]) | |
197 | 197 | else userPoolVoteSWOPnew | |
198 | 198 | let userPoolActiveVoteSWOPnew = if (((userPoolVoteSWOP - userPoolFreezeSWOP) == 0)) | |
199 | 199 | then 0 | |
200 | 200 | else (userPoolFreezeSWOPnew + (((userPoolActiveVoteSWOP - userPoolFreezeSWOP) * (userPoolVoteSWOPnew - userPoolFreezeSWOPnew)) / (userPoolVoteSWOP - userPoolFreezeSWOP))) | |
201 | 201 | let newUnvoted = max([0, (removePoolVote - (if ((userUnvotedPeriod == currPeriod)) | |
202 | 202 | then (userPoolVoteSWOP - userPoolFreezeSWOP) | |
203 | 203 | else 0))]) | |
204 | 204 | let userUnvotedNew = if ((userUnvotedPeriod == currPeriod)) | |
205 | 205 | then userUnvoted | |
206 | 206 | else (0 + newUnvoted) | |
207 | 207 | let userUnvotedPeriodNew = if ((newUnvoted > 0)) | |
208 | 208 | then currPeriod | |
209 | 209 | else userUnvotedPeriod | |
210 | 210 | let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew)) | |
211 | 211 | let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)] | |
212 | 212 | let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(currPeriod)) | |
213 | 213 | let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)] | |
214 | 214 | let poolVoteSWOPnew = (poolVoteSWOP - removePoolVote) | |
215 | 215 | let poolFreezeSWOPnew = if ((poolPeriod == currPeriod)) | |
216 | 216 | then min([poolFreezeSWOP, poolVoteSWOPnew]) | |
217 | 217 | else poolVoteSWOPnew | |
218 | 218 | let poolActiveSWOPnew = if (((poolVoteSWOP - poolFreezeSWOP) == 0)) | |
219 | 219 | then 0 | |
220 | 220 | else (poolFreezeSWOPnew + (((poolActiveSWOP - poolFreezeSWOP) * (poolVoteSWOPnew - poolFreezeSWOPnew)) / (poolVoteSWOP - poolFreezeSWOP))) | |
221 | 221 | let poolStrucNew = ((((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(poolFreezeSWOPnew)) | |
222 | 222 | let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)] | |
223 | 223 | let totalVoteSWOPnew = (totalVoteSWOP - removePoolVote) | |
224 | 224 | let totalFreezeSWOPnew = if ((totalPeriod == currPeriod)) | |
225 | 225 | then min([totalFreezeSWOP, totalVoteSWOPnew]) | |
226 | 226 | else totalVoteSWOPnew | |
227 | 227 | let totalActiveSWOPnew = if (((totalVoteSWOP - totalFreezeSWOP) == 0)) | |
228 | 228 | then 0 | |
229 | 229 | else (totalFreezeSWOPnew + (((totalActiveSWOP - totalFreezeSWOP) * (totalVoteSWOPnew - totalFreezeSWOPnew)) / (totalVoteSWOP - totalFreezeSWOP))) | |
230 | 230 | let totalStrucNew = ((((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(totalPeriod)) + "_") + toString(totalFreezeSWOPnew)) | |
231 | 231 | let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)] | |
232 | 232 | ((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew)) | |
233 | 233 | } | |
234 | 234 | } | |
235 | 235 | ||
236 | 236 | ||
237 | 237 | @Verifier(tx) | |
238 | 238 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
239 | 239 |
github/deemru/w8io/026f985 44.00 ms ◑