tx · cnjgS154pFETMTS2p15gRPc4HpEWY1z3seEneB9D63g 3N2wcNfEWihUVJV2S6jKwcw3QDupKgXPBnp: -0.01400000 Waves 2021.03.13 15:25 [1435909] smart account 3N2wcNfEWihUVJV2S6jKwcw3QDupKgXPBnp > SELF 0.00000000 Waves
{ "type": 13, "id": "cnjgS154pFETMTS2p15gRPc4HpEWY1z3seEneB9D63g", "fee": 1400000, "feeAssetId": null, "timestamp": 1615638437617, "version": 1, "sender": "3N2wcNfEWihUVJV2S6jKwcw3QDupKgXPBnp", "senderPublicKey": "2Ek8QRiW2SC3s4ZC79pXUmvJbmqU6agaNsjN2wmnzmSs", "proofs": [ "3QQivAWFUujURuuZb1MD9LDmUNtHanWyXyAiumxgQjY9unoXsVakpdaqdfuuQG71F7N9Qhiq4oXTzw2Pzut9w21Q" ], "script": "base64:AAIEAAAAAAAAAAgIAhIECgIYEQAAAAcAAAAAEWtVc2VyUG9vbFZvdGVTV09QAgAAAAVfdm90ZQAAAAASa1VzZXJUb3RhbFZvdGVTV09QAgAAABVfdXNlcl90b3RhbF9TV09QX3ZvdGUAAAAADWtQb29sVm90ZVNXT1ACAAAACl92b3RlX1NXT1AAAAAADmtUb3RhbFZvdGVTV09QAgAAAA90b3RhbF92b3RlX1NXT1AAAAAAB2dvdkFkZHIJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVRAR/HWw3DxHB4C9lwcyuInima35raJGzsBAAAAFGlzQ2FsbGVySW5Hb3Zlcm5hbmNlAAAAAQAAAAR1c2VyAwMJAABmAAAAAgkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAdnb3ZBZGRyCQABLAAAAAIJAAQlAAAAAQUAAAAEdXNlcgIAAAAMX1NXT1BfYW1vdW50AAAAAAAAAAAAAAAAAAAAAAAABgkAAGYAAAACCQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIFAAAABHRoaXMJAAEsAAAAAgkABCUAAAABBQAAAAR1c2VyBQAAABJrVXNl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=", "chainId": 84, "height": 1435909, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CGEX7wrP9sPkHo3ZUuBk1iTH3nGe4sWB3s5DSWfkJiHn Next: HFqCVY3kVGib5gm4JsSKBMGvGbFKKVLxB8jDHsodNUHg Diff:
Old | New | Differences | |
---|---|---|---|
33 | 33 | let userPoolVoteSWOP = valueOrElse(getInteger(this, (((toString(i.caller) + kUserPoolVoteSWOP) + "_") + poolAddress)), 0) | |
34 | 34 | let poolVoteDiffSWOP = (userPoolVoteSWOPNew - userPoolVoteSWOP) | |
35 | 35 | if (true) | |
36 | - | then throw(toString( | |
36 | + | then throw(((toString(userPoolVoteSWOPNew) + " ") + toString(userPoolVoteSWOP))) | |
37 | 37 | else (accumulated + poolVoteDiffSWOP) | |
38 | 38 | } | |
39 | 39 | ||
60 | 60 | let userTotalVoteSWOP = valueOrElse(getInteger(this, (toString(i.caller) + kUserTotalVoteSWOP)), 0) | |
61 | 61 | let userSWOPinGovernance = getIntegerValue(govAddr, (toString(i.caller) + "_SWOP_amount")) | |
62 | 62 | let userVoteDiffSWOP = { | |
63 | - | let $ | |
64 | - | let $ | |
65 | - | let $ | |
66 | - | if (($ | |
67 | - | then $ | |
63 | + | let $list29472990 = poolAddresses | |
64 | + | let $size29472990 = size($list29472990) | |
65 | + | let $acc029472990 = 0 | |
66 | + | if (($size29472990 == 0)) | |
67 | + | then $acc029472990 | |
68 | 68 | else { | |
69 | - | let $ | |
70 | - | if (($ | |
71 | - | then $ | |
69 | + | let $acc129472990 = calcVoteDiffSWOP($acc029472990, $list29472990[0]) | |
70 | + | if (($size29472990 == 1)) | |
71 | + | then $acc129472990 | |
72 | 72 | else { | |
73 | - | let $ | |
74 | - | if (($ | |
75 | - | then $ | |
73 | + | let $acc229472990 = calcVoteDiffSWOP($acc129472990, $list29472990[1]) | |
74 | + | if (($size29472990 == 2)) | |
75 | + | then $acc229472990 | |
76 | 76 | else { | |
77 | - | let $ | |
78 | - | if (($ | |
79 | - | then $ | |
77 | + | let $acc329472990 = calcVoteDiffSWOP($acc229472990, $list29472990[2]) | |
78 | + | if (($size29472990 == 3)) | |
79 | + | then $acc329472990 | |
80 | 80 | else { | |
81 | - | let $ | |
82 | - | if (($ | |
83 | - | then $ | |
81 | + | let $acc429472990 = calcVoteDiffSWOP($acc329472990, $list29472990[3]) | |
82 | + | if (($size29472990 == 4)) | |
83 | + | then $acc429472990 | |
84 | 84 | else { | |
85 | - | let $ | |
86 | - | if (($ | |
87 | - | then $ | |
85 | + | let $acc529472990 = calcVoteDiffSWOP($acc429472990, $list29472990[4]) | |
86 | + | if (($size29472990 == 5)) | |
87 | + | then $acc529472990 | |
88 | 88 | else { | |
89 | - | let $acc629102953 = calcVoteDiffSWOP($acc529102953, $list29102953[5]) | |
90 | - | if (($size29102953 == 6)) | |
91 | - | then $acc629102953 | |
92 | - | else { | |
93 | - | let $acc729102953 = calcVoteDiffSWOP($acc629102953, $list29102953[6]) | |
94 | - | if (($size29102953 == 7)) | |
95 | - | then $acc729102953 | |
96 | - | else { | |
97 | - | let $acc829102953 = calcVoteDiffSWOP($acc729102953, $list29102953[7]) | |
98 | - | if (($size29102953 == 8)) | |
99 | - | then $acc829102953 | |
100 | - | else { | |
101 | - | let $acc929102953 = calcVoteDiffSWOP($acc829102953, $list29102953[8]) | |
102 | - | throw("List size exceed 8") | |
103 | - | } | |
104 | - | } | |
105 | - | } | |
89 | + | let $acc629472990 = calcVoteDiffSWOP($acc529472990, $list29472990[5]) | |
90 | + | throw("List size exceed 5") | |
106 | 91 | } | |
107 | 92 | } | |
108 | 93 | } | |
116 | 101 | then throw(((((toString(totalVoteSWOPnew) + " ") + toString(totalVoteSWOP)) + " ") + toString(userVoteDiffSWOP))) | |
117 | 102 | else { | |
118 | 103 | let userDataEntry = { | |
119 | - | let $ | |
120 | - | let $ | |
121 | - | let $ | |
122 | - | if (($ | |
123 | - | then $ | |
104 | + | let $list32703311 = poolAddresses | |
105 | + | let $size32703311 = size($list32703311) | |
106 | + | let $acc032703311 = nil | |
107 | + | if (($size32703311 == 0)) | |
108 | + | then $acc032703311 | |
124 | 109 | else { | |
125 | - | let $ | |
126 | - | if (($ | |
127 | - | then $ | |
110 | + | let $acc132703311 = userVoteEntry($acc032703311, $list32703311[0]) | |
111 | + | if (($size32703311 == 1)) | |
112 | + | then $acc132703311 | |
128 | 113 | else { | |
129 | - | let $ | |
130 | - | if (($ | |
131 | - | then $ | |
114 | + | let $acc232703311 = userVoteEntry($acc132703311, $list32703311[1]) | |
115 | + | if (($size32703311 == 2)) | |
116 | + | then $acc232703311 | |
132 | 117 | else { | |
133 | - | let $ | |
134 | - | if (($ | |
135 | - | then $ | |
118 | + | let $acc332703311 = userVoteEntry($acc232703311, $list32703311[2]) | |
119 | + | if (($size32703311 == 3)) | |
120 | + | then $acc332703311 | |
136 | 121 | else { | |
137 | - | let $ | |
138 | - | if (($ | |
139 | - | then $ | |
122 | + | let $acc432703311 = userVoteEntry($acc332703311, $list32703311[3]) | |
123 | + | if (($size32703311 == 4)) | |
124 | + | then $acc432703311 | |
140 | 125 | else { | |
141 | - | let $ | |
142 | - | if (($ | |
143 | - | then $ | |
126 | + | let $acc532703311 = userVoteEntry($acc432703311, $list32703311[4]) | |
127 | + | if (($size32703311 == 5)) | |
128 | + | then $acc532703311 | |
144 | 129 | else { | |
145 | - | let $acc632333274 = userVoteEntry($acc532333274, $list32333274[5]) | |
146 | - | if (($size32333274 == 6)) | |
147 | - | then $acc632333274 | |
148 | - | else { | |
149 | - | let $acc732333274 = userVoteEntry($acc632333274, $list32333274[6]) | |
150 | - | if (($size32333274 == 7)) | |
151 | - | then $acc732333274 | |
152 | - | else { | |
153 | - | let $acc832333274 = userVoteEntry($acc732333274, $list32333274[7]) | |
154 | - | if (($size32333274 == 8)) | |
155 | - | then $acc832333274 | |
156 | - | else { | |
157 | - | let $acc932333274 = userVoteEntry($acc832333274, $list32333274[8]) | |
158 | - | throw("List size exceed 8") | |
159 | - | } | |
160 | - | } | |
161 | - | } | |
130 | + | let $acc632703311 = userVoteEntry($acc532703311, $list32703311[5]) | |
131 | + | throw("List size exceed 5") | |
162 | 132 | } | |
163 | 133 | } | |
164 | 134 | } | |
167 | 137 | } | |
168 | 138 | } | |
169 | 139 | let poolDataEntry = { | |
170 | - | let $ | |
171 | - | let $ | |
172 | - | let $ | |
173 | - | if (($ | |
174 | - | then $ | |
140 | + | let $list33363377 = poolAddresses | |
141 | + | let $size33363377 = size($list33363377) | |
142 | + | let $acc033363377 = nil | |
143 | + | if (($size33363377 == 0)) | |
144 | + | then $acc033363377 | |
175 | 145 | else { | |
176 | - | let $ | |
177 | - | if (($ | |
178 | - | then $ | |
146 | + | let $acc133363377 = poolVoteEntry($acc033363377, $list33363377[0]) | |
147 | + | if (($size33363377 == 1)) | |
148 | + | then $acc133363377 | |
179 | 149 | else { | |
180 | - | let $ | |
181 | - | if (($ | |
182 | - | then $ | |
150 | + | let $acc233363377 = poolVoteEntry($acc133363377, $list33363377[1]) | |
151 | + | if (($size33363377 == 2)) | |
152 | + | then $acc233363377 | |
183 | 153 | else { | |
184 | - | let $ | |
185 | - | if (($ | |
186 | - | then $ | |
154 | + | let $acc333363377 = poolVoteEntry($acc233363377, $list33363377[2]) | |
155 | + | if (($size33363377 == 3)) | |
156 | + | then $acc333363377 | |
187 | 157 | else { | |
188 | - | let $ | |
189 | - | if (($ | |
190 | - | then $ | |
158 | + | let $acc433363377 = poolVoteEntry($acc333363377, $list33363377[3]) | |
159 | + | if (($size33363377 == 4)) | |
160 | + | then $acc433363377 | |
191 | 161 | else { | |
192 | - | let $ | |
193 | - | if (($ | |
194 | - | then $ | |
162 | + | let $acc533363377 = poolVoteEntry($acc433363377, $list33363377[4]) | |
163 | + | if (($size33363377 == 5)) | |
164 | + | then $acc533363377 | |
195 | 165 | else { | |
196 | - | let $acc632993340 = poolVoteEntry($acc532993340, $list32993340[5]) | |
197 | - | if (($size32993340 == 6)) | |
198 | - | then $acc632993340 | |
199 | - | else { | |
200 | - | let $acc732993340 = poolVoteEntry($acc632993340, $list32993340[6]) | |
201 | - | if (($size32993340 == 7)) | |
202 | - | then $acc732993340 | |
203 | - | else { | |
204 | - | let $acc832993340 = poolVoteEntry($acc732993340, $list32993340[7]) | |
205 | - | if (($size32993340 == 8)) | |
206 | - | then $acc832993340 | |
207 | - | else { | |
208 | - | let $acc932993340 = poolVoteEntry($acc832993340, $list32993340[8]) | |
209 | - | throw("List size exceed 8") | |
210 | - | } | |
211 | - | } | |
212 | - | } | |
166 | + | let $acc633363377 = poolVoteEntry($acc533363377, $list33363377[5]) | |
167 | + | throw("List size exceed 5") | |
213 | 168 | } | |
214 | 169 | } | |
215 | 170 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let kUserPoolVoteSWOP = "_vote" | |
5 | 5 | ||
6 | 6 | let kUserTotalVoteSWOP = "_user_total_SWOP_vote" | |
7 | 7 | ||
8 | 8 | let kPoolVoteSWOP = "_vote_SWOP" | |
9 | 9 | ||
10 | 10 | let kTotalVoteSWOP = "total_vote_SWOP" | |
11 | 11 | ||
12 | 12 | let govAddr = Address(base58'3MumyD14hrRb2Vj3HAifsnCcUpsELAZWxAE') | |
13 | 13 | ||
14 | 14 | func isCallerInGovernance (user) = if (if ((valueOrElse(getInteger(govAddr, (toString(user) + "_SWOP_amount")), 0) > 0)) | |
15 | 15 | then true | |
16 | 16 | else (valueOrElse(getInteger(this, (toString(user) + kUserTotalVoteSWOP)), 0) > 0)) | |
17 | 17 | then true | |
18 | 18 | else false | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func isPoolInGovernance (poolAddress) = if ((valueOrElse(getInteger(govAddr, (poolAddress + "_current_pool_fraction_reward")), 0) > 0)) | |
22 | 22 | then true | |
23 | 23 | else false | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | @Callable(i) | |
27 | 27 | func votePoolWeight (poolAddresses,poolsVoteSWOPNew) = { | |
28 | 28 | func calcVoteDiffSWOP (accumulated,poolAddress) = if (!(isPoolInGovernance(poolAddress))) | |
29 | 29 | then throw("This pool has no _current_pool_fraction_reward in Governance dApp") | |
30 | 30 | else { | |
31 | 31 | let poolIndex = value(indexOf(poolAddresses, poolAddress)) | |
32 | 32 | let userPoolVoteSWOPNew = poolsVoteSWOPNew[poolIndex] | |
33 | 33 | let userPoolVoteSWOP = valueOrElse(getInteger(this, (((toString(i.caller) + kUserPoolVoteSWOP) + "_") + poolAddress)), 0) | |
34 | 34 | let poolVoteDiffSWOP = (userPoolVoteSWOPNew - userPoolVoteSWOP) | |
35 | 35 | if (true) | |
36 | - | then throw(toString( | |
36 | + | then throw(((toString(userPoolVoteSWOPNew) + " ") + toString(userPoolVoteSWOP))) | |
37 | 37 | else (accumulated + poolVoteDiffSWOP) | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | func userVoteEntry (accumulated,poolAddress) = { | |
41 | 41 | let poolIndex = value(indexOf(poolAddresses, poolAddress)) | |
42 | 42 | let userPoolVoteSWOPNew = poolsVoteSWOPNew[poolIndex] | |
43 | 43 | IntegerEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolVoteSWOP), userPoolVoteSWOPNew) :: accumulated | |
44 | 44 | } | |
45 | 45 | ||
46 | 46 | func poolVoteEntry (accumulated,poolAddress) = { | |
47 | 47 | let poolIndex = value(indexOf(poolAddresses, poolAddress)) | |
48 | 48 | let userPoolVoteSWOP = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolVoteSWOP)), 0) | |
49 | 49 | let userPoolVoteSWOPNew = poolsVoteSWOPNew[poolIndex] | |
50 | 50 | let poolVoteDiffSWOP = (userPoolVoteSWOPNew - userPoolVoteSWOP) | |
51 | 51 | let poolVoteSWOP = valueOrElse(getInteger(this, (poolAddress + kPoolVoteSWOP)), 0) | |
52 | 52 | let poolVoteSWOPnew = (poolVoteSWOP + poolVoteDiffSWOP) | |
53 | 53 | IntegerEntry((poolAddress + kPoolVoteSWOP), poolVoteSWOPnew) :: accumulated | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | if (!(isCallerInGovernance(i.caller))) | |
57 | 57 | then throw("This address has 0 SWOP in Governance dApp") | |
58 | 58 | else { | |
59 | 59 | let totalVoteSWOP = valueOrElse(getInteger(this, kTotalVoteSWOP), 0) | |
60 | 60 | let userTotalVoteSWOP = valueOrElse(getInteger(this, (toString(i.caller) + kUserTotalVoteSWOP)), 0) | |
61 | 61 | let userSWOPinGovernance = getIntegerValue(govAddr, (toString(i.caller) + "_SWOP_amount")) | |
62 | 62 | let userVoteDiffSWOP = { | |
63 | - | let $ | |
64 | - | let $ | |
65 | - | let $ | |
66 | - | if (($ | |
67 | - | then $ | |
63 | + | let $list29472990 = poolAddresses | |
64 | + | let $size29472990 = size($list29472990) | |
65 | + | let $acc029472990 = 0 | |
66 | + | if (($size29472990 == 0)) | |
67 | + | then $acc029472990 | |
68 | 68 | else { | |
69 | - | let $ | |
70 | - | if (($ | |
71 | - | then $ | |
69 | + | let $acc129472990 = calcVoteDiffSWOP($acc029472990, $list29472990[0]) | |
70 | + | if (($size29472990 == 1)) | |
71 | + | then $acc129472990 | |
72 | 72 | else { | |
73 | - | let $ | |
74 | - | if (($ | |
75 | - | then $ | |
73 | + | let $acc229472990 = calcVoteDiffSWOP($acc129472990, $list29472990[1]) | |
74 | + | if (($size29472990 == 2)) | |
75 | + | then $acc229472990 | |
76 | 76 | else { | |
77 | - | let $ | |
78 | - | if (($ | |
79 | - | then $ | |
77 | + | let $acc329472990 = calcVoteDiffSWOP($acc229472990, $list29472990[2]) | |
78 | + | if (($size29472990 == 3)) | |
79 | + | then $acc329472990 | |
80 | 80 | else { | |
81 | - | let $ | |
82 | - | if (($ | |
83 | - | then $ | |
81 | + | let $acc429472990 = calcVoteDiffSWOP($acc329472990, $list29472990[3]) | |
82 | + | if (($size29472990 == 4)) | |
83 | + | then $acc429472990 | |
84 | 84 | else { | |
85 | - | let $ | |
86 | - | if (($ | |
87 | - | then $ | |
85 | + | let $acc529472990 = calcVoteDiffSWOP($acc429472990, $list29472990[4]) | |
86 | + | if (($size29472990 == 5)) | |
87 | + | then $acc529472990 | |
88 | 88 | else { | |
89 | - | let $acc629102953 = calcVoteDiffSWOP($acc529102953, $list29102953[5]) | |
90 | - | if (($size29102953 == 6)) | |
91 | - | then $acc629102953 | |
92 | - | else { | |
93 | - | let $acc729102953 = calcVoteDiffSWOP($acc629102953, $list29102953[6]) | |
94 | - | if (($size29102953 == 7)) | |
95 | - | then $acc729102953 | |
96 | - | else { | |
97 | - | let $acc829102953 = calcVoteDiffSWOP($acc729102953, $list29102953[7]) | |
98 | - | if (($size29102953 == 8)) | |
99 | - | then $acc829102953 | |
100 | - | else { | |
101 | - | let $acc929102953 = calcVoteDiffSWOP($acc829102953, $list29102953[8]) | |
102 | - | throw("List size exceed 8") | |
103 | - | } | |
104 | - | } | |
105 | - | } | |
89 | + | let $acc629472990 = calcVoteDiffSWOP($acc529472990, $list29472990[5]) | |
90 | + | throw("List size exceed 5") | |
106 | 91 | } | |
107 | 92 | } | |
108 | 93 | } | |
109 | 94 | } | |
110 | 95 | } | |
111 | 96 | } | |
112 | 97 | } | |
113 | 98 | let userTotalVoteSWOPNew = (userTotalVoteSWOP + userVoteDiffSWOP) | |
114 | 99 | let totalVoteSWOPnew = (totalVoteSWOP + userVoteDiffSWOP) | |
115 | 100 | if (true) | |
116 | 101 | then throw(((((toString(totalVoteSWOPnew) + " ") + toString(totalVoteSWOP)) + " ") + toString(userVoteDiffSWOP))) | |
117 | 102 | else { | |
118 | 103 | let userDataEntry = { | |
119 | - | let $ | |
120 | - | let $ | |
121 | - | let $ | |
122 | - | if (($ | |
123 | - | then $ | |
104 | + | let $list32703311 = poolAddresses | |
105 | + | let $size32703311 = size($list32703311) | |
106 | + | let $acc032703311 = nil | |
107 | + | if (($size32703311 == 0)) | |
108 | + | then $acc032703311 | |
124 | 109 | else { | |
125 | - | let $ | |
126 | - | if (($ | |
127 | - | then $ | |
110 | + | let $acc132703311 = userVoteEntry($acc032703311, $list32703311[0]) | |
111 | + | if (($size32703311 == 1)) | |
112 | + | then $acc132703311 | |
128 | 113 | else { | |
129 | - | let $ | |
130 | - | if (($ | |
131 | - | then $ | |
114 | + | let $acc232703311 = userVoteEntry($acc132703311, $list32703311[1]) | |
115 | + | if (($size32703311 == 2)) | |
116 | + | then $acc232703311 | |
132 | 117 | else { | |
133 | - | let $ | |
134 | - | if (($ | |
135 | - | then $ | |
118 | + | let $acc332703311 = userVoteEntry($acc232703311, $list32703311[2]) | |
119 | + | if (($size32703311 == 3)) | |
120 | + | then $acc332703311 | |
136 | 121 | else { | |
137 | - | let $ | |
138 | - | if (($ | |
139 | - | then $ | |
122 | + | let $acc432703311 = userVoteEntry($acc332703311, $list32703311[3]) | |
123 | + | if (($size32703311 == 4)) | |
124 | + | then $acc432703311 | |
140 | 125 | else { | |
141 | - | let $ | |
142 | - | if (($ | |
143 | - | then $ | |
126 | + | let $acc532703311 = userVoteEntry($acc432703311, $list32703311[4]) | |
127 | + | if (($size32703311 == 5)) | |
128 | + | then $acc532703311 | |
144 | 129 | else { | |
145 | - | let $acc632333274 = userVoteEntry($acc532333274, $list32333274[5]) | |
146 | - | if (($size32333274 == 6)) | |
147 | - | then $acc632333274 | |
148 | - | else { | |
149 | - | let $acc732333274 = userVoteEntry($acc632333274, $list32333274[6]) | |
150 | - | if (($size32333274 == 7)) | |
151 | - | then $acc732333274 | |
152 | - | else { | |
153 | - | let $acc832333274 = userVoteEntry($acc732333274, $list32333274[7]) | |
154 | - | if (($size32333274 == 8)) | |
155 | - | then $acc832333274 | |
156 | - | else { | |
157 | - | let $acc932333274 = userVoteEntry($acc832333274, $list32333274[8]) | |
158 | - | throw("List size exceed 8") | |
159 | - | } | |
160 | - | } | |
161 | - | } | |
130 | + | let $acc632703311 = userVoteEntry($acc532703311, $list32703311[5]) | |
131 | + | throw("List size exceed 5") | |
162 | 132 | } | |
163 | 133 | } | |
164 | 134 | } | |
165 | 135 | } | |
166 | 136 | } | |
167 | 137 | } | |
168 | 138 | } | |
169 | 139 | let poolDataEntry = { | |
170 | - | let $ | |
171 | - | let $ | |
172 | - | let $ | |
173 | - | if (($ | |
174 | - | then $ | |
140 | + | let $list33363377 = poolAddresses | |
141 | + | let $size33363377 = size($list33363377) | |
142 | + | let $acc033363377 = nil | |
143 | + | if (($size33363377 == 0)) | |
144 | + | then $acc033363377 | |
175 | 145 | else { | |
176 | - | let $ | |
177 | - | if (($ | |
178 | - | then $ | |
146 | + | let $acc133363377 = poolVoteEntry($acc033363377, $list33363377[0]) | |
147 | + | if (($size33363377 == 1)) | |
148 | + | then $acc133363377 | |
179 | 149 | else { | |
180 | - | let $ | |
181 | - | if (($ | |
182 | - | then $ | |
150 | + | let $acc233363377 = poolVoteEntry($acc133363377, $list33363377[1]) | |
151 | + | if (($size33363377 == 2)) | |
152 | + | then $acc233363377 | |
183 | 153 | else { | |
184 | - | let $ | |
185 | - | if (($ | |
186 | - | then $ | |
154 | + | let $acc333363377 = poolVoteEntry($acc233363377, $list33363377[2]) | |
155 | + | if (($size33363377 == 3)) | |
156 | + | then $acc333363377 | |
187 | 157 | else { | |
188 | - | let $ | |
189 | - | if (($ | |
190 | - | then $ | |
158 | + | let $acc433363377 = poolVoteEntry($acc333363377, $list33363377[3]) | |
159 | + | if (($size33363377 == 4)) | |
160 | + | then $acc433363377 | |
191 | 161 | else { | |
192 | - | let $ | |
193 | - | if (($ | |
194 | - | then $ | |
162 | + | let $acc533363377 = poolVoteEntry($acc433363377, $list33363377[4]) | |
163 | + | if (($size33363377 == 5)) | |
164 | + | then $acc533363377 | |
195 | 165 | else { | |
196 | - | let $acc632993340 = poolVoteEntry($acc532993340, $list32993340[5]) | |
197 | - | if (($size32993340 == 6)) | |
198 | - | then $acc632993340 | |
199 | - | else { | |
200 | - | let $acc732993340 = poolVoteEntry($acc632993340, $list32993340[6]) | |
201 | - | if (($size32993340 == 7)) | |
202 | - | then $acc732993340 | |
203 | - | else { | |
204 | - | let $acc832993340 = poolVoteEntry($acc732993340, $list32993340[7]) | |
205 | - | if (($size32993340 == 8)) | |
206 | - | then $acc832993340 | |
207 | - | else { | |
208 | - | let $acc932993340 = poolVoteEntry($acc832993340, $list32993340[8]) | |
209 | - | throw("List size exceed 8") | |
210 | - | } | |
211 | - | } | |
212 | - | } | |
166 | + | let $acc633363377 = poolVoteEntry($acc533363377, $list33363377[5]) | |
167 | + | throw("List size exceed 5") | |
213 | 168 | } | |
214 | 169 | } | |
215 | 170 | } | |
216 | 171 | } | |
217 | 172 | } | |
218 | 173 | } | |
219 | 174 | } | |
220 | 175 | if ((userSWOPinGovernance > userTotalVoteSWOPNew)) | |
221 | 176 | then throw(((((toString(this) + " has ") + toString(userSWOPinGovernance)) + "SWOP in governance. New SWOP in voting ") + toString(userTotalVoteSWOPNew))) | |
222 | 177 | else ((userDataEntry ++ poolDataEntry) ++ [IntegerEntry((toString(i.caller) + kUserTotalVoteSWOP), userTotalVoteSWOPNew), IntegerEntry(kTotalVoteSWOP, totalVoteSWOPnew)]) | |
223 | 178 | } | |
224 | 179 | } | |
225 | 180 | } | |
226 | 181 | ||
227 | 182 |
github/deemru/w8io/169f3d6 77.20 ms ◑