tx · Gi4bg8pyZJ2rsVf7xafLvH2PA3ezhkymzbbrfsLuJf5V 3N6CYoCsxrcXKe75pQvvV3JqJrwJjm1t4QN: -0.01400000 Waves 2021.04.28 13:49 [1502204] smart account 3N6CYoCsxrcXKe75pQvvV3JqJrwJjm1t4QN > SELF 0.00000000 Waves
{ "type": 13, "id": "Gi4bg8pyZJ2rsVf7xafLvH2PA3ezhkymzbbrfsLuJf5V", "fee": 1400000, "feeAssetId": null, "timestamp": 1619607005305, "version": 2, "chainId": 84, "sender": "3N6CYoCsxrcXKe75pQvvV3JqJrwJjm1t4QN", "senderPublicKey": "9NDcimsSfq5LxxqoVoq2nbMd1zPqZhFvr6mVUiXWwtM1", "proofs": [ "qWZKpLapGfTZ8FiD6fWxYDGc5nKG4PYz49JYHQnSW1FhaPuxkCdoS2Z9eZfsoYY89KSFLaowoCqsirVD93A5xXJ" ], "script": "base64:AAIEAAAAAAAAAAgIAhIECgIYEQAAAB0AAAAADGFkbWluUHViS2V5MQEAAAAgBM915WTQwQ9OZ7kfE2TEGg3qhCRCMX0zkF1AWAqdk0oAAAAADGFkbWluUHViS2V5MgEAAAAgBM915WTQwQ9OZ7kfE2TEGg3qhCRCMX0zkF1AWAqdk0oAAAAADGFkbWluUHViS2V5MwEAAAAgBM915WTQwQ9OZ7kfE2TEGg3qhCRCMX0zkF1AWAqdk0oAAAAAEWtVc2VyUG9vbFZvdGVTV09QAgAAAAVfdm90ZQAAAAAOa1VzZXJQb29sU3RydWMCAAAAEF91c2VyX3Bvb2xfc3RydWMAAAAAEmtVc2VyVG90YWxWb3RlU1dPUAIAAAAVX3VzZXJfdG90YWxfU1dPUF92b3RlAAAAAA9rVXNlclRvdGFsU3RydWMCAAAAEV91c2VyX3RvdGFsX3N0cnVjAAAAAA1rUG9vbFZvdGVTV09QAgAAAApfdm90ZV9TV09QAAAAAAprUG9vbFN0cnVjAgAAAAtfcG9vbF9zdHJ1YwAAAAAOa1RvdGFsVm90ZVNXT1ACAAAAD3Rvd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AAAAAgkABE4AAAACCQAETgAAAAIJAAROAAAAAgkABE4AAAACBQAAAA11c2VyUG9vbEVudHJ5BQAAAA51c2VyVG90YWxFbnRyeQUAAAAJcG9vbEVudHJ5BQAAAAp0b3RhbEVudHJ5CQEAAAAPY2FsY0RlbGV0ZUVudHJ5AAAAAwkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIFAAAAC3Bvb2xBZGRyZXNzBQAAABN1c2VyUG9vbFZvdGVTV09QbmV3BQAAABpwcmV2aW91c1RvdGFsVm90ZVNXT1BlbnRyeQAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5fYlC7w==", "height": 1502204, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FbvjGwhRhFbJdgS2hpUav6X5c9PuRghGTtYtfsn7XphX Next: DGATBgsJXU1ZktE1DAHGzHQfMAcCK5WorCyu2EADDQuY Diff:
Old | New | Differences | |
---|---|---|---|
47 | 47 | ||
48 | 48 | let minVotePower = valueOrErrorMessage(getInteger(this, kMinVotePower), "Empty kMinVotePower") | |
49 | 49 | ||
50 | - | let govAddr = Address(base58' | |
50 | + | let govAddr = Address(base58'3MzJZEn6jzxCPaHEfkrXd7FhbjTyVjdRPLS') | |
51 | 51 | ||
52 | 52 | let currPeriod = (basePeriod + ((height - startHeight) / periodLength)) | |
53 | 53 |
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 kPreviousTotalVoteSWOP = "previous_total_struc" | |
27 | 27 | ||
28 | 28 | let kStartHeight = "start_height" | |
29 | 29 | ||
30 | 30 | let kBasePeriod = "base_period" | |
31 | 31 | ||
32 | 32 | let kPeriodLength = "period_length" | |
33 | 33 | ||
34 | 34 | let kDurationFullVotePower = "duration_full_vote_power" | |
35 | 35 | ||
36 | 36 | let kMinVotePower = "min_vote_power" | |
37 | 37 | ||
38 | 38 | let scale8 = 100000000 | |
39 | 39 | ||
40 | 40 | let basePeriod = valueOrErrorMessage(getInteger(this, kBasePeriod), "Empty kBasePeriod") | |
41 | 41 | ||
42 | 42 | let startHeight = valueOrErrorMessage(getInteger(this, kStartHeight), "Empty kStartHeight") | |
43 | 43 | ||
44 | 44 | let periodLength = valueOrErrorMessage(getInteger(this, kPeriodLength), "Empty kPeriodLength") | |
45 | 45 | ||
46 | 46 | let durationFullVotePower = valueOrErrorMessage(getInteger(this, kDurationFullVotePower), "Empty kDurationFullVotePower") | |
47 | 47 | ||
48 | 48 | let minVotePower = valueOrErrorMessage(getInteger(this, kMinVotePower), "Empty kMinVotePower") | |
49 | 49 | ||
50 | - | let govAddr = Address(base58' | |
50 | + | let govAddr = Address(base58'3MzJZEn6jzxCPaHEfkrXd7FhbjTyVjdRPLS') | |
51 | 51 | ||
52 | 52 | let currPeriod = (basePeriod + ((height - startHeight) / periodLength)) | |
53 | 53 | ||
54 | 54 | func isCallerInGovernance (user) = if ((valueOrElse(getInteger(govAddr, (toString(user) + "_SWOP_amount")), 0) > 0)) | |
55 | 55 | then true | |
56 | 56 | else false | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func isPoolInGovernance (poolAddress) = isDefined(getInteger(govAddr, (poolAddress + "_current_pool_fraction_reward"))) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func votingCoef () = { | |
63 | 63 | let votingDuration = (height - (startHeight + (currPeriod * periodLength))) | |
64 | 64 | if ((durationFullVotePower > votingDuration)) | |
65 | 65 | then scale8 | |
66 | 66 | else { | |
67 | 67 | let x1 = durationFullVotePower | |
68 | 68 | let y1 = scale8 | |
69 | 69 | let x2 = periodLength | |
70 | 70 | let y2 = minVotePower | |
71 | 71 | let k = (((y2 - y1) * scale8) / (x2 - x1)) | |
72 | 72 | let b = ((y1 * scale8) - (k * x1)) | |
73 | 73 | (((votingDuration * k) / scale8) + (b / scale8)) | |
74 | 74 | } | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func calcDeleteEntry (caller,poolAddress,userPoolVoteSWOPnew) = { | |
79 | 79 | func deleteIfExists (list,key) = if (isDefined(getInteger(this, key))) | |
80 | 80 | then (list :+ DeleteEntry(key)) | |
81 | 81 | else list | |
82 | 82 | ||
83 | 83 | deleteIfExists(deleteIfExists(deleteIfExists(deleteIfExists(nil, (((caller + "_") + poolAddress) + kUserPoolVoteSWOP)), (caller + kUserTotalVoteSWOP)), (poolAddress + kPoolVoteSWOP)), kTotalVoteSWOP) | |
84 | 84 | } | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | @Callable(i) | |
88 | 88 | func votePoolWeight (poolAddressesL,poolsVoteSWOPNewL) = if (if ((size(poolAddressesL) > 1)) | |
89 | 89 | then true | |
90 | 90 | else (size(poolsVoteSWOPNewL) > 1)) | |
91 | 91 | then throw("poolAddressesL.size > 1 or poolsVoteSWOPNewL.size > 1") | |
92 | 92 | else { | |
93 | 93 | let poolAddress = poolAddressesL[0] | |
94 | 94 | let userPoolVoteSWOPnew = poolsVoteSWOPNewL[0] | |
95 | 95 | if (!(isPoolInGovernance(poolAddress))) | |
96 | 96 | then throw("This pool has no _current_pool_fraction_reward in Governance dApp") | |
97 | 97 | else { | |
98 | 98 | let userSWOPinGovernance = valueOrErrorMessage(getInteger(govAddr, (toString(i.caller) + "_SWOP_amount")), "Empty _SWOP_amount at gov. address") | |
99 | 99 | let $t034414074 = if (isDefined(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc)))) | |
100 | 100 | then { | |
101 | 101 | let data = split(valueOrErrorMessage(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc)), "Empty kUserPoolStruc"), "_") | |
102 | 102 | $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3])) | |
103 | 103 | } | |
104 | 104 | else { | |
105 | 105 | let uPoolVoteSWOP = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolVoteSWOP)), 0) | |
106 | 106 | $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, 0, 0) | |
107 | 107 | } | |
108 | 108 | let userPoolVoteSWOP = $t034414074._1 | |
109 | 109 | let userPoolActiveVoteSWOP = $t034414074._2 | |
110 | 110 | let userPoolVotePeriod = $t034414074._3 | |
111 | 111 | let userPoolFreezeSWOP = $t034414074._4 | |
112 | 112 | let $t040804588 = if (isDefined(getString(this, (toString(i.caller) + kUserTotalStruc)))) | |
113 | 113 | then { | |
114 | 114 | let data = split(valueOrErrorMessage(getString(this, (toString(i.caller) + kUserTotalStruc)), "Empty kUserTotalStruc"), "_") | |
115 | 115 | $Tuple3(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2])) | |
116 | 116 | } | |
117 | 117 | else { | |
118 | 118 | let uPoolTotalSWOP = valueOrElse(getInteger(this, (toString(i.caller) + kUserTotalVoteSWOP)), 0) | |
119 | 119 | $Tuple3(uPoolTotalSWOP, 0, 0) | |
120 | 120 | } | |
121 | 121 | let userTotalVoteSWOP = $t040804588._1 | |
122 | 122 | let userUnvoted = $t040804588._2 | |
123 | 123 | let userUnvotedPeriod = $t040804588._3 | |
124 | 124 | let $t045935061 = if (isDefined(getString(this, (poolAddress + kPoolStruc)))) | |
125 | 125 | then { | |
126 | 126 | let data = split(valueOrErrorMessage(getString(this, (poolAddress + kPoolStruc)), "Empty kPoolStruc"), "_") | |
127 | 127 | $Tuple3(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2])) | |
128 | 128 | } | |
129 | 129 | else { | |
130 | 130 | let uPoolVoteSWOP = valueOrElse(getInteger(this, (poolAddress + kPoolVoteSWOP)), 0) | |
131 | 131 | $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, 0, 0) | |
132 | 132 | } | |
133 | 133 | let poolVoteSWOP = $t045935061._1 | |
134 | 134 | let poolActiveSWOP = $t045935061._2 | |
135 | 135 | let poolPeriod = $t045935061._3 | |
136 | 136 | let $t050675503 = if (isDefined(getString(this, kTotalStruc))) | |
137 | 137 | then { | |
138 | 138 | let data = split(valueOrErrorMessage(getString(this, kTotalStruc), "Empty kTotalStruc"), "_") | |
139 | 139 | $Tuple3(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2])) | |
140 | 140 | } | |
141 | 141 | else { | |
142 | 142 | let uTotalVoteSWOP = valueOrElse(getInteger(this, kTotalVoteSWOP), 0) | |
143 | 143 | $Tuple4(uTotalVoteSWOP, uTotalVoteSWOP, 0, 0) | |
144 | 144 | } | |
145 | 145 | let totalVoteSWOP = $t050675503._1 | |
146 | 146 | let totalActiveSWOP = $t050675503._2 | |
147 | 147 | let totalPeriod = $t050675503._3 | |
148 | 148 | let poolVoteDiffSWOP = (userPoolVoteSWOPnew - userPoolVoteSWOP) | |
149 | 149 | let userTotalVoteSWOPnew = (userTotalVoteSWOP + poolVoteDiffSWOP) | |
150 | 150 | if (!(isCallerInGovernance(i.caller))) | |
151 | 151 | then throw("This address has 0 SWOP in Governance dApp") | |
152 | 152 | else if ((userTotalVoteSWOPnew > userSWOPinGovernance)) | |
153 | 153 | then throw(((((toString(this) + " has ") + toString(userSWOPinGovernance)) + " SWOP in governance. New SWOP in voting ") + toString(userTotalVoteSWOPnew))) | |
154 | 154 | else if ((0 > userTotalVoteSWOPnew)) | |
155 | 155 | then throw("New userTotalVoteSWOPnew < 0") | |
156 | 156 | else if ((0 > userPoolVoteSWOPnew)) | |
157 | 157 | then throw("New userPoolVoteSWOPnew < 0") | |
158 | 158 | else { | |
159 | 159 | let previousTotalVoteSWOPperiod = parseIntValue(split(getStringValue(this, kPreviousTotalVoteSWOP), "_")[1]) | |
160 | 160 | let previousTotalVoteSWOPentry = if ((previousTotalVoteSWOPperiod != currPeriod)) | |
161 | 161 | then { | |
162 | 162 | let previousTotalVoteSWOPstruc = ((toString(userTotalVoteSWOP) + "_") + toString((currPeriod - 1))) | |
163 | 163 | [StringEntry(kPreviousTotalVoteSWOP, previousTotalVoteSWOPstruc)] | |
164 | 164 | } | |
165 | 165 | else nil | |
166 | 166 | if ((userPoolVoteSWOPnew >= userPoolVoteSWOP)) | |
167 | 167 | then { | |
168 | 168 | let coef = votingCoef() | |
169 | 169 | let userPoolActiveVoteSWOPnew = if ((userPoolVotePeriod == currPeriod)) | |
170 | 170 | then (userPoolActiveVoteSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
171 | 171 | else (userPoolVoteSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
172 | 172 | let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod)) | |
173 | 173 | then userPoolFreezeSWOP | |
174 | 174 | else userPoolVoteSWOP | |
175 | 175 | let userUnvotedNew = if ((userUnvotedPeriod == currPeriod)) | |
176 | 176 | then max([0, (userUnvoted - poolVoteDiffSWOP)]) | |
177 | 177 | else 0 | |
178 | 178 | let userUnvotedPeriodNew = currPeriod | |
179 | 179 | let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew)) | |
180 | 180 | let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)] | |
181 | 181 | let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(userUnvotedPeriodNew)) | |
182 | 182 | let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)] | |
183 | 183 | let poolVoteSWOPnew = (poolVoteSWOP + poolVoteDiffSWOP) | |
184 | 184 | let poolActiveSWOPnew = if ((poolPeriod == currPeriod)) | |
185 | 185 | then (poolActiveSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
186 | 186 | else (poolVoteSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
187 | 187 | let poolStrucNew = ((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) | |
188 | 188 | let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)] | |
189 | 189 | let totalVoteSWOPnew = (totalVoteSWOP + poolVoteDiffSWOP) | |
190 | 190 | let totalActiveSWOPnew = if ((totalPeriod == currPeriod)) | |
191 | 191 | then (totalActiveSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
192 | 192 | else (totalVoteSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
193 | 193 | let totalStrucNew = ((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(currPeriod)) | |
194 | 194 | let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)] | |
195 | 195 | (((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew)) ++ previousTotalVoteSWOPentry) | |
196 | 196 | } | |
197 | 197 | else { | |
198 | 198 | let removePoolVote = -(poolVoteDiffSWOP) | |
199 | 199 | let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod)) | |
200 | 200 | then userPoolFreezeSWOP | |
201 | 201 | else userPoolVoteSWOP | |
202 | 202 | let userPoolFreezeSWOP2 = min([userPoolFreezeSWOP, userPoolVoteSWOP]) | |
203 | 203 | let userPoolFreezeSWOPnew2 = min([userPoolFreezeSWOPnew, userPoolVoteSWOPnew]) | |
204 | 204 | let userPoolActiveVoteSWOPnew = (userPoolFreezeSWOPnew2 + (if (((userPoolVoteSWOP - userPoolFreezeSWOP) == 0)) | |
205 | 205 | then 0 | |
206 | 206 | else fraction((userPoolActiveVoteSWOP - userPoolFreezeSWOP), (userPoolVoteSWOPnew - userPoolFreezeSWOPnew2), (userPoolVoteSWOP - userPoolFreezeSWOP)))) | |
207 | 207 | let userPoolActiveVoteDiff = (userPoolActiveVoteSWOPnew - (if ((userPoolVotePeriod == currPeriod)) | |
208 | 208 | then userPoolActiveVoteSWOP | |
209 | 209 | else userPoolVoteSWOP)) | |
210 | 210 | let newUnvoted = max([0, (removePoolVote - (if ((userPoolVotePeriod == currPeriod)) | |
211 | 211 | then (userPoolVoteSWOP - userPoolFreezeSWOP2) | |
212 | 212 | else 0))]) | |
213 | 213 | let userUnvotedNew = (newUnvoted + (if ((userUnvotedPeriod == currPeriod)) | |
214 | 214 | then userUnvoted | |
215 | 215 | else 0)) | |
216 | 216 | let userUnvotedPeriodNew = if ((newUnvoted > 0)) | |
217 | 217 | then currPeriod | |
218 | 218 | else userUnvotedPeriod | |
219 | 219 | let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew)) | |
220 | 220 | let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)] | |
221 | 221 | let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(userUnvotedPeriodNew)) | |
222 | 222 | let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)] | |
223 | 223 | let poolVoteSWOPnew = (poolVoteSWOP - removePoolVote) | |
224 | 224 | let poolActiveSWOPnew = if ((poolPeriod == currPeriod)) | |
225 | 225 | then (poolActiveSWOP + userPoolActiveVoteDiff) | |
226 | 226 | else (poolVoteSWOP + userPoolActiveVoteDiff) | |
227 | 227 | let poolStrucNew = ((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) | |
228 | 228 | let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)] | |
229 | 229 | let totalVoteSWOPnew = (totalVoteSWOP - removePoolVote) | |
230 | 230 | let totalActiveSWOPnew = if ((totalPeriod == currPeriod)) | |
231 | 231 | then (totalActiveSWOP + userPoolActiveVoteDiff) | |
232 | 232 | else (totalVoteSWOP + userPoolActiveVoteDiff) | |
233 | 233 | let totalStrucNew = ((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(currPeriod)) | |
234 | 234 | let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)] | |
235 | 235 | let allNewValues = [currPeriod, userPoolFreezeSWOPnew, userPoolActiveVoteSWOPnew, userPoolFreezeSWOPnew, userUnvotedNew, userUnvotedPeriodNew, poolVoteSWOPnew, poolActiveSWOPnew, totalVoteSWOPnew, totalActiveSWOPnew] | |
236 | 236 | if ((0 > min(allNewValues))) | |
237 | 237 | then throw("One or more values are negative") | |
238 | 238 | else (((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew)) ++ previousTotalVoteSWOPentry) | |
239 | 239 | } | |
240 | 240 | } | |
241 | 241 | } | |
242 | 242 | } | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | @Verifier(tx) | |
246 | 246 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
247 | 247 |
github/deemru/w8io/026f985 54.74 ms ◑