tx · HFqCVY3kVGib5gm4JsSKBMGvGbFKKVLxB8jDHsodNUHg

3N2wcNfEWihUVJV2S6jKwcw3QDupKgXPBnp:  -0.01400000 Waves

2021.03.13 15:27 [1435910] smart account 3N2wcNfEWihUVJV2S6jKwcw3QDupKgXPBnp > SELF 0.00000000 Waves

{ "type": 13, "id": "HFqCVY3kVGib5gm4JsSKBMGvGbFKKVLxB8jDHsodNUHg", "fee": 1400000, "feeAssetId": null, "timestamp": 1615638483185, "version": 1, "sender": "3N2wcNfEWihUVJV2S6jKwcw3QDupKgXPBnp", "senderPublicKey": "2Ek8QRiW2SC3s4ZC79pXUmvJbmqU6agaNsjN2wmnzmSs", "proofs": [ "5WXg7fuPtX6YfLaRTJXnVwjHb5GYpmzihvi5H1kgnSGhj89VRNd6HjiTNax2xWS2R6PwHToHWeyQiDyuJjDFHGCE" ], "script": "base64:AAIEAAAAAAAAAAgIAhIECgIYEQAAAAcAAAAAEWtVc2VyUG9vbFZvdGVTV09QAgAAAAVfdm90ZQAAAAASa1VzZXJUb3RhbFZvdGVTV09QAgAAABVfdXNlcl90b3RhbF9TV09QX3ZvdGUAAAAADWtQb29sVm90ZVNXT1ACAAAACl92b3RlX1NXT1AAAAAADmtUb3RhbFZvdGVTV09QAgAAAA90b3RhbF92b3RlX1NXT1AAAAAAB2dvdkFkZHIJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVRAR/HWw3DxHB4C9lwcyuInima35raJGzsBAAAAFGlzQ2FsbGVySW5Hb3Zlcm5hbmNlAAAAAQAAAAR1c2VyAwMJAABmAAAAAgkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAdnb3ZBZGRyCQABLAAAAAIJAAQlAAAAAQUAAAAEdXNlcgIAAAAMX1NXT1BfYW1vdW50AAAAAAAAAAAAAAAAAAAAAAAABgkAAGYAAAACCQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIFAAAABHRoaXMJAAEsAAAAAgkABCUAAAABBQAAAAR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RhY2M0MzIzNzMyNzgJAAGRAAAAAgUAAAANJGxpc3QzMjM3MzI3OAAAAAAAAAAABAMJAAAAAAAAAgUAAAANJHNpemUzMjM3MzI3OAAAAAAAAAAABQUAAAANJGFjYzUzMjM3MzI3OAQAAAANJGFjYzYzMjM3MzI3OAkBAAAADXBvb2xWb3RlRW50cnkAAAACBQAAAA0kYWNjNTMyMzczMjc4CQABkQAAAAIFAAAADSRsaXN0MzIzNzMyNzgAAAAAAAAAAAUJAAACAAAAAQIAAAASTGlzdCBzaXplIGV4Y2VlZCA1AwkAAGYAAAACBQAAABR1c2VyU1dPUGluR292ZXJuYW5jZQUAAAAUdXNlclRvdGFsVm90ZVNXT1BOZXcJAAACAAAAAQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQAEJQAAAAEFAAAABHRoaXMCAAAABSBoYXMgCQABpAAAAAEFAAAAFHVzZXJTV09QaW5Hb3Zlcm5hbmNlAgAAACdTV09QIGluIGdvdmVybmFuY2UuIE5ldyBTV09QIGluIHZvdGluZyAJAAGkAAAAAQUAAAAUdXNlclRvdGFsVm90ZVNXT1BOZXcJAAROAAAAAgkABE4AAAACBQAAAA11c2VyRGF0YUVudHJ5BQAAAA1wb29sRGF0YUVudHJ5CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyBQAAABJrVXNlclRvdGFsVm90ZVNXT1AFAAAAFHVzZXJUb3RhbFZvdGVTV09QTmV3CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAAA5rVG90YWxWb3RlU1dPUAUAAAAQdG90YWxWb3RlU1dPUG5ldwUAAAADbmlsAAAAAB57Aks=", "chainId": 84, "height": 1435910, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: cnjgS154pFETMTS2p15gRPc4HpEWY1z3seEneB9D63g Next: 8FHWy6nxEbWwM6v6HwWfJDHiNwABYpP1J7Fj2zsiYTks Diff:
OldNewDifferences
3030 else {
3131 let poolIndex = value(indexOf(poolAddresses, poolAddress))
3232 let userPoolVoteSWOPNew = poolsVoteSWOPNew[poolIndex]
33- let userPoolVoteSWOP = valueOrElse(getInteger(this, (((toString(i.caller) + kUserPoolVoteSWOP) + "_") + poolAddress)), 0)
33+ let userPoolVoteSWOP = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolVoteSWOP)), 0)
3434 let poolVoteDiffSWOP = (userPoolVoteSWOPNew - userPoolVoteSWOP)
35- if (true)
36- then throw(((toString(userPoolVoteSWOPNew) + " ") + toString(userPoolVoteSWOP)))
37- else (accumulated + poolVoteDiffSWOP)
35+ (accumulated + poolVoteDiffSWOP)
3836 }
3937
4038 func userVoteEntry (accumulated,poolAddress) = {
6058 let userTotalVoteSWOP = valueOrElse(getInteger(this, (toString(i.caller) + kUserTotalVoteSWOP)), 0)
6159 let userSWOPinGovernance = getIntegerValue(govAddr, (toString(i.caller) + "_SWOP_amount"))
6260 let userVoteDiffSWOP = {
63- let $list29472990 = poolAddresses
64- let $size29472990 = size($list29472990)
65- let $acc029472990 = 0
66- if (($size29472990 == 0))
67- then $acc029472990
61+ let $list28482891 = poolAddresses
62+ let $size28482891 = size($list28482891)
63+ let $acc028482891 = 0
64+ if (($size28482891 == 0))
65+ then $acc028482891
6866 else {
69- let $acc129472990 = calcVoteDiffSWOP($acc029472990, $list29472990[0])
70- if (($size29472990 == 1))
71- then $acc129472990
67+ let $acc128482891 = calcVoteDiffSWOP($acc028482891, $list28482891[0])
68+ if (($size28482891 == 1))
69+ then $acc128482891
7270 else {
73- let $acc229472990 = calcVoteDiffSWOP($acc129472990, $list29472990[1])
74- if (($size29472990 == 2))
75- then $acc229472990
71+ let $acc228482891 = calcVoteDiffSWOP($acc128482891, $list28482891[1])
72+ if (($size28482891 == 2))
73+ then $acc228482891
7674 else {
77- let $acc329472990 = calcVoteDiffSWOP($acc229472990, $list29472990[2])
78- if (($size29472990 == 3))
79- then $acc329472990
75+ let $acc328482891 = calcVoteDiffSWOP($acc228482891, $list28482891[2])
76+ if (($size28482891 == 3))
77+ then $acc328482891
8078 else {
81- let $acc429472990 = calcVoteDiffSWOP($acc329472990, $list29472990[3])
82- if (($size29472990 == 4))
83- then $acc429472990
79+ let $acc428482891 = calcVoteDiffSWOP($acc328482891, $list28482891[3])
80+ if (($size28482891 == 4))
81+ then $acc428482891
8482 else {
85- let $acc529472990 = calcVoteDiffSWOP($acc429472990, $list29472990[4])
86- if (($size29472990 == 5))
87- then $acc529472990
83+ let $acc528482891 = calcVoteDiffSWOP($acc428482891, $list28482891[4])
84+ if (($size28482891 == 5))
85+ then $acc528482891
8886 else {
89- let $acc629472990 = calcVoteDiffSWOP($acc529472990, $list29472990[5])
87+ let $acc628482891 = calcVoteDiffSWOP($acc528482891, $list28482891[5])
9088 throw("List size exceed 5")
9189 }
9290 }
10199 then throw(((((toString(totalVoteSWOPnew) + " ") + toString(totalVoteSWOP)) + " ") + toString(userVoteDiffSWOP)))
102100 else {
103101 let userDataEntry = {
104- let $list32703311 = poolAddresses
105- let $size32703311 = size($list32703311)
106- let $acc032703311 = nil
107- if (($size32703311 == 0))
108- then $acc032703311
102+ let $list31713212 = poolAddresses
103+ let $size31713212 = size($list31713212)
104+ let $acc031713212 = nil
105+ if (($size31713212 == 0))
106+ then $acc031713212
109107 else {
110- let $acc132703311 = userVoteEntry($acc032703311, $list32703311[0])
111- if (($size32703311 == 1))
112- then $acc132703311
108+ let $acc131713212 = userVoteEntry($acc031713212, $list31713212[0])
109+ if (($size31713212 == 1))
110+ then $acc131713212
113111 else {
114- let $acc232703311 = userVoteEntry($acc132703311, $list32703311[1])
115- if (($size32703311 == 2))
116- then $acc232703311
112+ let $acc231713212 = userVoteEntry($acc131713212, $list31713212[1])
113+ if (($size31713212 == 2))
114+ then $acc231713212
117115 else {
118- let $acc332703311 = userVoteEntry($acc232703311, $list32703311[2])
119- if (($size32703311 == 3))
120- then $acc332703311
116+ let $acc331713212 = userVoteEntry($acc231713212, $list31713212[2])
117+ if (($size31713212 == 3))
118+ then $acc331713212
121119 else {
122- let $acc432703311 = userVoteEntry($acc332703311, $list32703311[3])
123- if (($size32703311 == 4))
124- then $acc432703311
120+ let $acc431713212 = userVoteEntry($acc331713212, $list31713212[3])
121+ if (($size31713212 == 4))
122+ then $acc431713212
125123 else {
126- let $acc532703311 = userVoteEntry($acc432703311, $list32703311[4])
127- if (($size32703311 == 5))
128- then $acc532703311
124+ let $acc531713212 = userVoteEntry($acc431713212, $list31713212[4])
125+ if (($size31713212 == 5))
126+ then $acc531713212
129127 else {
130- let $acc632703311 = userVoteEntry($acc532703311, $list32703311[5])
128+ let $acc631713212 = userVoteEntry($acc531713212, $list31713212[5])
131129 throw("List size exceed 5")
132130 }
133131 }
137135 }
138136 }
139137 let poolDataEntry = {
140- let $list33363377 = poolAddresses
141- let $size33363377 = size($list33363377)
142- let $acc033363377 = nil
143- if (($size33363377 == 0))
144- then $acc033363377
138+ let $list32373278 = poolAddresses
139+ let $size32373278 = size($list32373278)
140+ let $acc032373278 = nil
141+ if (($size32373278 == 0))
142+ then $acc032373278
145143 else {
146- let $acc133363377 = poolVoteEntry($acc033363377, $list33363377[0])
147- if (($size33363377 == 1))
148- then $acc133363377
144+ let $acc132373278 = poolVoteEntry($acc032373278, $list32373278[0])
145+ if (($size32373278 == 1))
146+ then $acc132373278
149147 else {
150- let $acc233363377 = poolVoteEntry($acc133363377, $list33363377[1])
151- if (($size33363377 == 2))
152- then $acc233363377
148+ let $acc232373278 = poolVoteEntry($acc132373278, $list32373278[1])
149+ if (($size32373278 == 2))
150+ then $acc232373278
153151 else {
154- let $acc333363377 = poolVoteEntry($acc233363377, $list33363377[2])
155- if (($size33363377 == 3))
156- then $acc333363377
152+ let $acc332373278 = poolVoteEntry($acc232373278, $list32373278[2])
153+ if (($size32373278 == 3))
154+ then $acc332373278
157155 else {
158- let $acc433363377 = poolVoteEntry($acc333363377, $list33363377[3])
159- if (($size33363377 == 4))
160- then $acc433363377
156+ let $acc432373278 = poolVoteEntry($acc332373278, $list32373278[3])
157+ if (($size32373278 == 4))
158+ then $acc432373278
161159 else {
162- let $acc533363377 = poolVoteEntry($acc433363377, $list33363377[4])
163- if (($size33363377 == 5))
164- then $acc533363377
160+ let $acc532373278 = poolVoteEntry($acc432373278, $list32373278[4])
161+ if (($size32373278 == 5))
162+ then $acc532373278
165163 else {
166- let $acc633363377 = poolVoteEntry($acc533363377, $list33363377[5])
164+ let $acc632373278 = poolVoteEntry($acc532373278, $list32373278[5])
167165 throw("List size exceed 5")
168166 }
169167 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let kUserPoolVoteSWOP = "_vote"
55
66 let kUserTotalVoteSWOP = "_user_total_SWOP_vote"
77
88 let kPoolVoteSWOP = "_vote_SWOP"
99
1010 let kTotalVoteSWOP = "total_vote_SWOP"
1111
1212 let govAddr = Address(base58'3MumyD14hrRb2Vj3HAifsnCcUpsELAZWxAE')
1313
1414 func isCallerInGovernance (user) = if (if ((valueOrElse(getInteger(govAddr, (toString(user) + "_SWOP_amount")), 0) > 0))
1515 then true
1616 else (valueOrElse(getInteger(this, (toString(user) + kUserTotalVoteSWOP)), 0) > 0))
1717 then true
1818 else false
1919
2020
2121 func isPoolInGovernance (poolAddress) = if ((valueOrElse(getInteger(govAddr, (poolAddress + "_current_pool_fraction_reward")), 0) > 0))
2222 then true
2323 else false
2424
2525
2626 @Callable(i)
2727 func votePoolWeight (poolAddresses,poolsVoteSWOPNew) = {
2828 func calcVoteDiffSWOP (accumulated,poolAddress) = if (!(isPoolInGovernance(poolAddress)))
2929 then throw("This pool has no _current_pool_fraction_reward in Governance dApp")
3030 else {
3131 let poolIndex = value(indexOf(poolAddresses, poolAddress))
3232 let userPoolVoteSWOPNew = poolsVoteSWOPNew[poolIndex]
33- let userPoolVoteSWOP = valueOrElse(getInteger(this, (((toString(i.caller) + kUserPoolVoteSWOP) + "_") + poolAddress)), 0)
33+ let userPoolVoteSWOP = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolVoteSWOP)), 0)
3434 let poolVoteDiffSWOP = (userPoolVoteSWOPNew - userPoolVoteSWOP)
35- if (true)
36- then throw(((toString(userPoolVoteSWOPNew) + " ") + toString(userPoolVoteSWOP)))
37- else (accumulated + poolVoteDiffSWOP)
35+ (accumulated + poolVoteDiffSWOP)
3836 }
3937
4038 func userVoteEntry (accumulated,poolAddress) = {
4139 let poolIndex = value(indexOf(poolAddresses, poolAddress))
4240 let userPoolVoteSWOPNew = poolsVoteSWOPNew[poolIndex]
4341 IntegerEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolVoteSWOP), userPoolVoteSWOPNew) :: accumulated
4442 }
4543
4644 func poolVoteEntry (accumulated,poolAddress) = {
4745 let poolIndex = value(indexOf(poolAddresses, poolAddress))
4846 let userPoolVoteSWOP = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolVoteSWOP)), 0)
4947 let userPoolVoteSWOPNew = poolsVoteSWOPNew[poolIndex]
5048 let poolVoteDiffSWOP = (userPoolVoteSWOPNew - userPoolVoteSWOP)
5149 let poolVoteSWOP = valueOrElse(getInteger(this, (poolAddress + kPoolVoteSWOP)), 0)
5250 let poolVoteSWOPnew = (poolVoteSWOP + poolVoteDiffSWOP)
5351 IntegerEntry((poolAddress + kPoolVoteSWOP), poolVoteSWOPnew) :: accumulated
5452 }
5553
5654 if (!(isCallerInGovernance(i.caller)))
5755 then throw("This address has 0 SWOP in Governance dApp")
5856 else {
5957 let totalVoteSWOP = valueOrElse(getInteger(this, kTotalVoteSWOP), 0)
6058 let userTotalVoteSWOP = valueOrElse(getInteger(this, (toString(i.caller) + kUserTotalVoteSWOP)), 0)
6159 let userSWOPinGovernance = getIntegerValue(govAddr, (toString(i.caller) + "_SWOP_amount"))
6260 let userVoteDiffSWOP = {
63- let $list29472990 = poolAddresses
64- let $size29472990 = size($list29472990)
65- let $acc029472990 = 0
66- if (($size29472990 == 0))
67- then $acc029472990
61+ let $list28482891 = poolAddresses
62+ let $size28482891 = size($list28482891)
63+ let $acc028482891 = 0
64+ if (($size28482891 == 0))
65+ then $acc028482891
6866 else {
69- let $acc129472990 = calcVoteDiffSWOP($acc029472990, $list29472990[0])
70- if (($size29472990 == 1))
71- then $acc129472990
67+ let $acc128482891 = calcVoteDiffSWOP($acc028482891, $list28482891[0])
68+ if (($size28482891 == 1))
69+ then $acc128482891
7270 else {
73- let $acc229472990 = calcVoteDiffSWOP($acc129472990, $list29472990[1])
74- if (($size29472990 == 2))
75- then $acc229472990
71+ let $acc228482891 = calcVoteDiffSWOP($acc128482891, $list28482891[1])
72+ if (($size28482891 == 2))
73+ then $acc228482891
7674 else {
77- let $acc329472990 = calcVoteDiffSWOP($acc229472990, $list29472990[2])
78- if (($size29472990 == 3))
79- then $acc329472990
75+ let $acc328482891 = calcVoteDiffSWOP($acc228482891, $list28482891[2])
76+ if (($size28482891 == 3))
77+ then $acc328482891
8078 else {
81- let $acc429472990 = calcVoteDiffSWOP($acc329472990, $list29472990[3])
82- if (($size29472990 == 4))
83- then $acc429472990
79+ let $acc428482891 = calcVoteDiffSWOP($acc328482891, $list28482891[3])
80+ if (($size28482891 == 4))
81+ then $acc428482891
8482 else {
85- let $acc529472990 = calcVoteDiffSWOP($acc429472990, $list29472990[4])
86- if (($size29472990 == 5))
87- then $acc529472990
83+ let $acc528482891 = calcVoteDiffSWOP($acc428482891, $list28482891[4])
84+ if (($size28482891 == 5))
85+ then $acc528482891
8886 else {
89- let $acc629472990 = calcVoteDiffSWOP($acc529472990, $list29472990[5])
87+ let $acc628482891 = calcVoteDiffSWOP($acc528482891, $list28482891[5])
9088 throw("List size exceed 5")
9189 }
9290 }
9391 }
9492 }
9593 }
9694 }
9795 }
9896 let userTotalVoteSWOPNew = (userTotalVoteSWOP + userVoteDiffSWOP)
9997 let totalVoteSWOPnew = (totalVoteSWOP + userVoteDiffSWOP)
10098 if (true)
10199 then throw(((((toString(totalVoteSWOPnew) + " ") + toString(totalVoteSWOP)) + " ") + toString(userVoteDiffSWOP)))
102100 else {
103101 let userDataEntry = {
104- let $list32703311 = poolAddresses
105- let $size32703311 = size($list32703311)
106- let $acc032703311 = nil
107- if (($size32703311 == 0))
108- then $acc032703311
102+ let $list31713212 = poolAddresses
103+ let $size31713212 = size($list31713212)
104+ let $acc031713212 = nil
105+ if (($size31713212 == 0))
106+ then $acc031713212
109107 else {
110- let $acc132703311 = userVoteEntry($acc032703311, $list32703311[0])
111- if (($size32703311 == 1))
112- then $acc132703311
108+ let $acc131713212 = userVoteEntry($acc031713212, $list31713212[0])
109+ if (($size31713212 == 1))
110+ then $acc131713212
113111 else {
114- let $acc232703311 = userVoteEntry($acc132703311, $list32703311[1])
115- if (($size32703311 == 2))
116- then $acc232703311
112+ let $acc231713212 = userVoteEntry($acc131713212, $list31713212[1])
113+ if (($size31713212 == 2))
114+ then $acc231713212
117115 else {
118- let $acc332703311 = userVoteEntry($acc232703311, $list32703311[2])
119- if (($size32703311 == 3))
120- then $acc332703311
116+ let $acc331713212 = userVoteEntry($acc231713212, $list31713212[2])
117+ if (($size31713212 == 3))
118+ then $acc331713212
121119 else {
122- let $acc432703311 = userVoteEntry($acc332703311, $list32703311[3])
123- if (($size32703311 == 4))
124- then $acc432703311
120+ let $acc431713212 = userVoteEntry($acc331713212, $list31713212[3])
121+ if (($size31713212 == 4))
122+ then $acc431713212
125123 else {
126- let $acc532703311 = userVoteEntry($acc432703311, $list32703311[4])
127- if (($size32703311 == 5))
128- then $acc532703311
124+ let $acc531713212 = userVoteEntry($acc431713212, $list31713212[4])
125+ if (($size31713212 == 5))
126+ then $acc531713212
129127 else {
130- let $acc632703311 = userVoteEntry($acc532703311, $list32703311[5])
128+ let $acc631713212 = userVoteEntry($acc531713212, $list31713212[5])
131129 throw("List size exceed 5")
132130 }
133131 }
134132 }
135133 }
136134 }
137135 }
138136 }
139137 let poolDataEntry = {
140- let $list33363377 = poolAddresses
141- let $size33363377 = size($list33363377)
142- let $acc033363377 = nil
143- if (($size33363377 == 0))
144- then $acc033363377
138+ let $list32373278 = poolAddresses
139+ let $size32373278 = size($list32373278)
140+ let $acc032373278 = nil
141+ if (($size32373278 == 0))
142+ then $acc032373278
145143 else {
146- let $acc133363377 = poolVoteEntry($acc033363377, $list33363377[0])
147- if (($size33363377 == 1))
148- then $acc133363377
144+ let $acc132373278 = poolVoteEntry($acc032373278, $list32373278[0])
145+ if (($size32373278 == 1))
146+ then $acc132373278
149147 else {
150- let $acc233363377 = poolVoteEntry($acc133363377, $list33363377[1])
151- if (($size33363377 == 2))
152- then $acc233363377
148+ let $acc232373278 = poolVoteEntry($acc132373278, $list32373278[1])
149+ if (($size32373278 == 2))
150+ then $acc232373278
153151 else {
154- let $acc333363377 = poolVoteEntry($acc233363377, $list33363377[2])
155- if (($size33363377 == 3))
156- then $acc333363377
152+ let $acc332373278 = poolVoteEntry($acc232373278, $list32373278[2])
153+ if (($size32373278 == 3))
154+ then $acc332373278
157155 else {
158- let $acc433363377 = poolVoteEntry($acc333363377, $list33363377[3])
159- if (($size33363377 == 4))
160- then $acc433363377
156+ let $acc432373278 = poolVoteEntry($acc332373278, $list32373278[3])
157+ if (($size32373278 == 4))
158+ then $acc432373278
161159 else {
162- let $acc533363377 = poolVoteEntry($acc433363377, $list33363377[4])
163- if (($size33363377 == 5))
164- then $acc533363377
160+ let $acc532373278 = poolVoteEntry($acc432373278, $list32373278[4])
161+ if (($size32373278 == 5))
162+ then $acc532373278
165163 else {
166- let $acc633363377 = poolVoteEntry($acc533363377, $list33363377[5])
164+ let $acc632373278 = poolVoteEntry($acc532373278, $list32373278[5])
167165 throw("List size exceed 5")
168166 }
169167 }
170168 }
171169 }
172170 }
173171 }
174172 }
175173 if ((userSWOPinGovernance > userTotalVoteSWOPNew))
176174 then throw(((((toString(this) + " has ") + toString(userSWOPinGovernance)) + "SWOP in governance. New SWOP in voting ") + toString(userTotalVoteSWOPNew)))
177175 else ((userDataEntry ++ poolDataEntry) ++ [IntegerEntry((toString(i.caller) + kUserTotalVoteSWOP), userTotalVoteSWOPNew), IntegerEntry(kTotalVoteSWOP, totalVoteSWOPnew)])
178176 }
179177 }
180178 }
181179
182180

github/deemru/w8io/169f3d6 
93.56 ms