tx · HzBMSnoFxKaPuSF3FGfck87qfDnwTRPhN4wxbtaFXJou 3N1BEXuoepNEwqkbeZYKviaLQfvBQV3ibYE: -0.02200000 Waves 2023.06.13 16:31 [2620967] smart account 3N1BEXuoepNEwqkbeZYKviaLQfvBQV3ibYE > SELF 0.00000000 Waves
{ "type": 13, "id": "HzBMSnoFxKaPuSF3FGfck87qfDnwTRPhN4wxbtaFXJou", "fee": 2200000, "feeAssetId": null, "timestamp": 1686663122546, "version": 2, "chainId": 84, "sender": "3N1BEXuoepNEwqkbeZYKviaLQfvBQV3ibYE", "senderPublicKey": "6t3vrhP1jCmG7CeKBmL8hUibtdP3cMXGC2XtPYEPPC5w", "proofs": [ "63GTykGCgz1sEd7Gd5Y8ENrvuQawFTDBztmDPPXY2LCZJDaUoJ8DxT7Fof3iv9aQF7St3ssfdg7adt3QKARux7vJ" ], "script": "base64:BgIrCAISBQoDCAEIEgMKAQgSBAoCCAQSAwoBCBIDCgEIEgUKAwgBCBIECgIIAS8ACXNlcGFyYXRvcgICX18ABU1VTFQ4AIDC1y8BB3dyYXBFcnIBA21zZwkAuQkCCQDMCAICGHZvdGluZ192ZXJpZmllZF92Mi5yaWRlOgkAzAgCBQNtc2cFA25pbAIBIAEIdGhyb3dFcnIBA21zZwkAAgEJAQd3cmFwRXJyAQUDbXNnAQVhc0ludAEDdmFsBAckbWF0Y2gwBQN2YWwDCQABAgUHJG1hdGNoMAIDSW50BAZ2YWxJbnQFByRtYXRjaDAFBnZhbEludAkAAgECG0ZhaWxlZCB0byBjYXN0IGludG8gSW50ZWdlcgEQZ2V0SW50ZWdlck9yWmVybwIHYWRkcmVzcwNrZXkJAQt2YWx1ZU9yRWxzZQIJAJoIAgUHYWRkcmVzcwUDa2V5AAABEGdldEludGVnZXJPckZhaWwCB2FkZHJlc3MDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJoIAgUHYWRkcmVzcwUDa2V5CQEHd3JhcEVycgEJAKwCAgUDa2V5Ag8gaXMg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JpZnkABA90YXJnZXRQdWJsaWNLZXkEByRtYXRjaDAJARZtYW5hZ2VyUHVibGljS2V5T3JVbml0AAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAJwawUHJG1hdGNoMAUCcGsDCQABAgUHJG1hdGNoMAIEVW5pdAgFAnR4D3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQ90YXJnZXRQdWJsaWNLZXld29li", "height": 2620967, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 54bZEzydrBwoceZ3aWWjkF75NZVRJcZC4d8uP2aEWgb Next: 5qZB1QnbYTeRULbt6RD5vY9rLsiMSkgmfYtofo2wD67C Diff:
Old | New | Differences | |
---|---|---|---|
193 | 193 | let wxPaymentAmount = value(wxPayment.amount) | |
194 | 194 | let minPeriodLength = getIntegerValue(keyMinPeriodLength) | |
195 | 195 | let maxPeriodLength = getIntegerValue(keyMaxPeriodLength) | |
196 | + | let tokenIsVerified = { | |
197 | + | let @ = invoke(assetsStoreContract, "isVerifiedREADONLY", [assetId], nil) | |
198 | + | if ($isInstanceOf(@, "Boolean")) | |
199 | + | then @ | |
200 | + | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
201 | + | } | |
196 | 202 | let checks = [if (if ((periodLength >= minPeriodLength)) | |
197 | 203 | then (maxPeriodLength >= periodLength) | |
198 | 204 | else false) | |
199 | 205 | then true | |
200 | - | else throwErr("invalid periodLength"), if ((wxPaymentAmount > (periodLength * feePerBlock))) | |
206 | + | else throwErr("invalid periodLength"), if ((tokenIsVerified == false)) | |
207 | + | then true | |
208 | + | else throwErr("token already verified"), if ((wxPaymentAmount > (periodLength * feePerBlock))) | |
201 | 209 | then true | |
202 | 210 | else throwErr("not enough wx for given period"), if ((wxPaymentAmount >= getIntegerValue(keyMinWxMinForSuggestAddAmountRequired))) | |
203 | 211 | then true | |
209 | 217 | let newIndex = if (isDefined(currentIndex)) | |
210 | 218 | then (value(currentIndex) + 1) | |
211 | 219 | else 0 | |
212 | - | let $ | |
220 | + | let $t086859325 = if ((size(i.payments) > 1)) | |
213 | 221 | then { | |
214 | 222 | let votingRewardPayment = i.payments[1] | |
215 | 223 | let votingRewardPaymentAssetId = toBase58String(value(votingRewardPayment.assetId)) | |
217 | 225 | $Tuple4(true, votingRewardPaymentAssetId, votingRewardPaymentAmount, [StringEntry(keyVotingRewardAssetId(assetId, newIndex), votingRewardPaymentAssetId), IntegerEntry(keyTotalVotingReward(assetId, newIndex), votingRewardPaymentAmount)]) | |
218 | 226 | } | |
219 | 227 | else $Tuple4(false, "EMPTY", 0, nil) | |
220 | - | let isRewardExist = $ | |
221 | - | let rewardAssetId = $ | |
222 | - | let rewardAmount = $ | |
223 | - | let votingRewardActions = $ | |
228 | + | let isRewardExist = $t086859325._1 | |
229 | + | let rewardAssetId = $t086859325._2 | |
230 | + | let rewardAmount = $t086859325._3 | |
231 | + | let votingRewardActions = $t086859325._4 | |
224 | 232 | let votesQuorum = valueOrErrorMessage(getInteger(keyVotingThresholdAdd), wrapErr("votingThresholdAdd not set")) | |
225 | 233 | let votingInfo = votingInfoValue(isRewardExist, rewardAssetId, rewardAmount, "verification", "inProgress", height, (height + periodLength), votesQuorum, 0, 0) | |
226 | 234 | let finalizeCallRewardAmount = valueOrElse(getInteger(keyFinalizeCallRewardAmount), 0) | |
242 | 250 | let wxPayment = i.payments[0] | |
243 | 251 | let wxPaymentAssetId = value(wxPayment.assetId) | |
244 | 252 | let wxPaymentAmount = value(wxPayment.amount) | |
245 | - | let checks = [if ((gwxAmountAtNow >= minSuggestRemoveBalance)) | |
253 | + | let tokenIsVerified = { | |
254 | + | let @ = invoke(assetsStoreContract, "isVerifiedREADONLY", [assetId], nil) | |
255 | + | if ($isInstanceOf(@, "Boolean")) | |
256 | + | then @ | |
257 | + | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
258 | + | } | |
259 | + | let checks = [if (tokenIsVerified) | |
260 | + | then true | |
261 | + | else throwErr("token not verified"), if ((gwxAmountAtNow >= minSuggestRemoveBalance)) | |
246 | 262 | then true | |
247 | 263 | else throwErr("not enough gWXes"), if ((wxPaymentAmount >= getIntegerValue(keyWxForSuggestRemoveAmountRequired))) | |
248 | 264 | then true | |
286 | 302 | let votingInfoParts = getVotingInfoParts(votingInfoStr) | |
287 | 303 | let votesFor = votingInfoParts._9 | |
288 | 304 | let votesAgainst = votingInfoParts._10 | |
289 | - | let $ | |
305 | + | let $t01272312884 = if (inFavor) | |
290 | 306 | then $Tuple2((votesFor + gwxAmountAtEnd), votesAgainst) | |
291 | 307 | else $Tuple2(votesFor, (votesAgainst + gwxAmountAtEnd)) | |
292 | - | let newVotesFor = $ | |
293 | - | let newVotesAgainst = $ | |
308 | + | let newVotesFor = $t01272312884._1 | |
309 | + | let newVotesAgainst = $t01272312884._2 | |
294 | 310 | let newVotingInfoValue = votingInfoValue(votingInfoParts._1, votingInfoParts._2, votingInfoParts._3, votingInfoParts._4, votingInfoParts._5, votingInfoParts._6, votingInfoParts._7, votingInfoParts._8, newVotesFor, newVotesAgainst) | |
295 | 311 | let votingRewardAction = match getString(keyVotingRewardAssetId(assetId, currentIndex)) { | |
296 | 312 | case pk: String => | |
332 | 348 | let votingInfoParts = getVotingInfoParts(votingInfoStr) | |
333 | 349 | let votesFor = votingInfoParts._9 | |
334 | 350 | let votesAgainst = votingInfoParts._10 | |
335 | - | let $ | |
351 | + | let $t01450914670 = if ((inFavor == "true")) | |
336 | 352 | then $Tuple2((votesFor - gwxAmount), votesAgainst) | |
337 | 353 | else $Tuple2(votesFor, (votesAgainst - gwxAmount)) | |
338 | - | let newVotesFor = $ | |
339 | - | let newVotesAgainst = $ | |
354 | + | let newVotesFor = $t01450914670._1 | |
355 | + | let newVotesAgainst = $t01450914670._2 | |
340 | 356 | let newVotingInfoValue = votingInfoValue(votingInfoParts._1, votingInfoParts._2, votingInfoParts._3, votingInfoParts._4, votingInfoParts._5, votingInfoParts._6, votingInfoParts._7, votingInfoParts._8, newVotesFor, newVotesAgainst) | |
341 | 357 | [StringEntry(keyVotingInfo(assetId, currentIndex), newVotingInfoValue), DeleteEntry(voteKey), DeleteEntry(keyVotingReward(i.caller, assetId, currentIndex))] | |
342 | 358 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "__" | |
5 | 5 | ||
6 | 6 | let MULT8 = 100000000 | |
7 | 7 | ||
8 | 8 | func wrapErr (msg) = makeString(["voting_verified_v2.ride:", msg], " ") | |
9 | 9 | ||
10 | 10 | ||
11 | 11 | func throwErr (msg) = throw(wrapErr(msg)) | |
12 | 12 | ||
13 | 13 | ||
14 | 14 | func asInt (val) = match val { | |
15 | 15 | case valInt: Int => | |
16 | 16 | valInt | |
17 | 17 | case _ => | |
18 | 18 | throw("Failed to cast into Integer") | |
19 | 19 | } | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func getIntegerOrZero (address,key) = valueOrElse(getInteger(address, key), 0) | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func getIntegerOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), wrapErr((key + " is not defined"))) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func getStringOrEmpty (address,key) = valueOrElse(getString(address, key), "") | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), wrapErr((key + " is not defined"))) | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | let keyBoostingContract = makeString(["%s", "boostingContract"], separator) | |
35 | 35 | ||
36 | 36 | let keyEmissionContract = makeString(["%s", "emissionContract"], separator) | |
37 | 37 | ||
38 | 38 | let keyAssetsStoreContract = makeString(["%s", "assetsStoreContract"], separator) | |
39 | 39 | ||
40 | 40 | let boostingContract = addressFromStringValue(getStringValue(keyBoostingContract)) | |
41 | 41 | ||
42 | 42 | let emissionContract = addressFromStringValue(getStringValue(keyEmissionContract)) | |
43 | 43 | ||
44 | 44 | let assetsStoreContract = addressFromStringValue(getStringValue(keyAssetsStoreContract)) | |
45 | 45 | ||
46 | 46 | let keyEmissionConfig = makeString(["%s", "config"], separator) | |
47 | 47 | ||
48 | 48 | let wxAssetIdStr = split(getStringOrFail(emissionContract, keyEmissionConfig), separator)[1] | |
49 | 49 | ||
50 | 50 | let wxAssetId = fromBase58String(wxAssetIdStr) | |
51 | 51 | ||
52 | 52 | let keyVotingThresholdAdd = makeString(["%s%s", "votingThreshold", "add"], separator) | |
53 | 53 | ||
54 | 54 | let keyVotingThresholdRemove = makeString(["%s%s", "votingThreshold", "remove"], separator) | |
55 | 55 | ||
56 | 56 | let keyPeriodLengthRemove = makeString(["%s", "periodLengthRemove"], separator) | |
57 | 57 | ||
58 | 58 | let keyMaxPeriodLength = makeString(["%s", "maxPeriodLength"], separator) | |
59 | 59 | ||
60 | 60 | let keyMinPeriodLength = makeString(["%s", "minPeriodLength"], separator) | |
61 | 61 | ||
62 | 62 | func keyVotingRewardAssetId (assetId,index) = makeString(["%s%s%d", "votingRewardAssetId", assetId, toString(index)], separator) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func keyVotingReward (userAddress,assetId,index) = makeString(["%s%s%s%d", "votingReward", toString(userAddress), assetId, toString(index)], separator) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func keyTotalVotingReward (assetId,index) = makeString(["%s%s%d", "totalVotingReward", assetId, toString(index)], separator) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | let keyFinalizeCallRewardAmount = makeString(["%s", "finalizeCallRewardAmount"], separator) | |
72 | 72 | ||
73 | 73 | let keyMinSuggestRemoveBalance = makeString(["%s", "minSuggestRemoveBalance"], separator) | |
74 | 74 | ||
75 | 75 | func keyCurrentIndex (assetId) = makeString(["%s%s", "currentIndex", assetId], separator) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func keyVote (assetId,index,caller) = makeString(["%s%s%d%s", "vote", assetId, toString(index), toString(caller)], separator) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func voteValue (inFavor,gwxAmount) = makeString(["%s%d", toString(inFavor), toString(gwxAmount)], separator) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func keySuggestIssuer (assetId,index) = makeString(["%s%s%d", "suggestIssuer", assetId, toString(index)], separator) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func keyClaimHistory (userAddress,assetId,index) = makeString(["%s%s%s%d", "history", toString(userAddress), assetId, toString(index)], separator) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | let keyFeePerBlock = makeString(["%s", "feePerBlock"], separator) | |
91 | 91 | ||
92 | 92 | let feePerBlock = getIntegerOrFail(this, keyFeePerBlock) | |
93 | 93 | ||
94 | 94 | let keyMinWxMinForSuggestAddAmountRequired = makeString(["%s", "wxMinForSuggestAddAmountRequired"], separator) | |
95 | 95 | ||
96 | 96 | let keyWxForSuggestRemoveAmountRequired = makeString(["%s", "wxForSuggestRemoveAmountRequired"], separator) | |
97 | 97 | ||
98 | 98 | func keyVotingInfo (assetId,index) = makeString(["%s%s%d", "votingInfo", assetId, toString(index)], separator) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func votingInfoValue (isRewardExist,rewardAssetId,rewardAmount,votingType,status,votingStartHeight,votingEndHeight,votesQuorum,votesFor,votesAgainst) = makeString(["%s%s%d%s%s%d%d%d%d%d", toString(isRewardExist), rewardAssetId, toString(rewardAmount), votingType, status, toString(votingStartHeight), toString(votingEndHeight), toString(votesQuorum), toString(votesFor), toString(votesAgainst)], separator) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func getUserGwxAmountAtHeight (userAddress,targetHeight) = { | |
105 | 105 | let gwxAmount = invoke(boostingContract, "getUserGwxAmountAtHeightREADONLY", [userAddress, targetHeight], nil) | |
106 | 106 | asInt(gwxAmount) | |
107 | 107 | } | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func keyManagerVaultAddress () = "%s__managerVaultAddress" | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) { | |
117 | 117 | case s: String => | |
118 | 118 | addressFromStringValue(s) | |
119 | 119 | case _ => | |
120 | 120 | this | |
121 | 121 | } | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func managerPublicKeyOrUnit () = { | |
125 | 125 | let managerVaultAddress = getManagerVaultAddressOrThis() | |
126 | 126 | match getString(managerVaultAddress, keyManagerPublicKey()) { | |
127 | 127 | case s: String => | |
128 | 128 | fromBase58String(s) | |
129 | 129 | case _: Unit => | |
130 | 130 | unit | |
131 | 131 | case _ => | |
132 | 132 | throw("Match error") | |
133 | 133 | } | |
134 | 134 | } | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func getVotingInfoParts (votingInfo) = { | |
138 | 138 | let votingInfoParts = split(votingInfo, separator) | |
139 | 139 | let isRewardExistStr = votingInfoParts[1] | |
140 | 140 | let isRewardExist = if ((isRewardExistStr == "true")) | |
141 | 141 | then true | |
142 | 142 | else false | |
143 | 143 | let rewardAssetId = votingInfoParts[2] | |
144 | 144 | let rewardAmount = parseIntValue(votingInfoParts[3]) | |
145 | 145 | let votingType = votingInfoParts[4] | |
146 | 146 | let status = votingInfoParts[5] | |
147 | 147 | let votingStartHeight = parseIntValue(votingInfoParts[6]) | |
148 | 148 | let votingEndHeight = parseIntValue(votingInfoParts[7]) | |
149 | 149 | let votesQuorum = parseIntValue(votingInfoParts[8]) | |
150 | 150 | let votesFor = parseIntValue(votingInfoParts[9]) | |
151 | 151 | let votesAgainst = parseIntValue(votingInfoParts[10]) | |
152 | 152 | $Tuple10(isRewardExist, rewardAssetId, rewardAmount, votingType, status, votingStartHeight, votingEndHeight, votesQuorum, votesFor, votesAgainst) | |
153 | 153 | } | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func votingExistChecks (assetId,currentIndex) = { | |
157 | 157 | let votingInfo = valueOrErrorMessage(getString(keyVotingInfo(assetId, currentIndex)), wrapErr("voting info not found")) | |
158 | 158 | let votingInfoArray = split(votingInfo, separator) | |
159 | 159 | let status = votingInfoArray[5] | |
160 | 160 | let votingEndHeight = valueOrErrorMessage(parseIntValue(votingInfoArray[7]), wrapErr("voting start height not found")) | |
161 | 161 | let suggestIssuer = valueOrErrorMessage(getString(keySuggestIssuer(assetId, currentIndex)), wrapErr("voting issuer not found")) | |
162 | 162 | let checks = [if ((status == "inProgress")) | |
163 | 163 | then true | |
164 | 164 | else throwErr("no voting in progress"), if ((votingEndHeight > height)) | |
165 | 165 | then true | |
166 | 166 | else throwErr("voting expired")] | |
167 | 167 | if ((checks == checks)) | |
168 | 168 | then $Tuple3(status, votingEndHeight, suggestIssuer) | |
169 | 169 | else throw("Strict value is not equal to itself.") | |
170 | 170 | } | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | func calculateReward (voter,assetId,index) = { | |
174 | 174 | let voteKey = keyVote(assetId, index, voter) | |
175 | 175 | let lastVote = valueOrErrorMessage(getString(voteKey), wrapErr("you have not voted")) | |
176 | 176 | let lastVoteParts = split(lastVote, separator) | |
177 | 177 | let gwxAmount = parseIntValue(lastVoteParts[2]) | |
178 | 178 | let votingInfoStr = valueOrErrorMessage(getString(keyVotingInfo(assetId, index)), wrapErr("voting info not found")) | |
179 | 179 | let votingParts = getVotingInfoParts(votingInfoStr) | |
180 | 180 | let votesFor = votingParts._9 | |
181 | 181 | let votesAgainst = votingParts._10 | |
182 | 182 | let partOfTheTotalVotesX8 = fraction(gwxAmount, MULT8, (votesFor + votesAgainst)) | |
183 | 183 | let totalVotingReward = valueOrElse(getInteger(keyTotalVotingReward(assetId, index)), 0) | |
184 | 184 | let voterRewardAmount = fraction(partOfTheTotalVotesX8, totalVotingReward, MULT8, FLOOR) | |
185 | 185 | voterRewardAmount | |
186 | 186 | } | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | @Callable(i) | |
190 | 190 | func suggestAdd (assetId,periodLength,assetImage) = { | |
191 | 191 | let wxPayment = i.payments[0] | |
192 | 192 | let wxPaymentAssetId = value(wxPayment.assetId) | |
193 | 193 | let wxPaymentAmount = value(wxPayment.amount) | |
194 | 194 | let minPeriodLength = getIntegerValue(keyMinPeriodLength) | |
195 | 195 | let maxPeriodLength = getIntegerValue(keyMaxPeriodLength) | |
196 | + | let tokenIsVerified = { | |
197 | + | let @ = invoke(assetsStoreContract, "isVerifiedREADONLY", [assetId], nil) | |
198 | + | if ($isInstanceOf(@, "Boolean")) | |
199 | + | then @ | |
200 | + | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
201 | + | } | |
196 | 202 | let checks = [if (if ((periodLength >= minPeriodLength)) | |
197 | 203 | then (maxPeriodLength >= periodLength) | |
198 | 204 | else false) | |
199 | 205 | then true | |
200 | - | else throwErr("invalid periodLength"), if ((wxPaymentAmount > (periodLength * feePerBlock))) | |
206 | + | else throwErr("invalid periodLength"), if ((tokenIsVerified == false)) | |
207 | + | then true | |
208 | + | else throwErr("token already verified"), if ((wxPaymentAmount > (periodLength * feePerBlock))) | |
201 | 209 | then true | |
202 | 210 | else throwErr("not enough wx for given period"), if ((wxPaymentAmount >= getIntegerValue(keyMinWxMinForSuggestAddAmountRequired))) | |
203 | 211 | then true | |
204 | 212 | else throwErr("payment less then min for suggest")] | |
205 | 213 | if ((checks == checks)) | |
206 | 214 | then { | |
207 | 215 | let currentIndexKey = keyCurrentIndex(assetId) | |
208 | 216 | let currentIndex = getInteger(currentIndexKey) | |
209 | 217 | let newIndex = if (isDefined(currentIndex)) | |
210 | 218 | then (value(currentIndex) + 1) | |
211 | 219 | else 0 | |
212 | - | let $ | |
220 | + | let $t086859325 = if ((size(i.payments) > 1)) | |
213 | 221 | then { | |
214 | 222 | let votingRewardPayment = i.payments[1] | |
215 | 223 | let votingRewardPaymentAssetId = toBase58String(value(votingRewardPayment.assetId)) | |
216 | 224 | let votingRewardPaymentAmount = value(votingRewardPayment.amount) | |
217 | 225 | $Tuple4(true, votingRewardPaymentAssetId, votingRewardPaymentAmount, [StringEntry(keyVotingRewardAssetId(assetId, newIndex), votingRewardPaymentAssetId), IntegerEntry(keyTotalVotingReward(assetId, newIndex), votingRewardPaymentAmount)]) | |
218 | 226 | } | |
219 | 227 | else $Tuple4(false, "EMPTY", 0, nil) | |
220 | - | let isRewardExist = $ | |
221 | - | let rewardAssetId = $ | |
222 | - | let rewardAmount = $ | |
223 | - | let votingRewardActions = $ | |
228 | + | let isRewardExist = $t086859325._1 | |
229 | + | let rewardAssetId = $t086859325._2 | |
230 | + | let rewardAmount = $t086859325._3 | |
231 | + | let votingRewardActions = $t086859325._4 | |
224 | 232 | let votesQuorum = valueOrErrorMessage(getInteger(keyVotingThresholdAdd), wrapErr("votingThresholdAdd not set")) | |
225 | 233 | let votingInfo = votingInfoValue(isRewardExist, rewardAssetId, rewardAmount, "verification", "inProgress", height, (height + periodLength), votesQuorum, 0, 0) | |
226 | 234 | let finalizeCallRewardAmount = valueOrElse(getInteger(keyFinalizeCallRewardAmount), 0) | |
227 | 235 | let burnWxAmount = (wxPaymentAmount - finalizeCallRewardAmount) | |
228 | 236 | let assetsStoreCreateOrUpdateInv = invoke(assetsStoreContract, "createOrUpdate", [assetId, assetImage, false], nil) | |
229 | 237 | if ((assetsStoreCreateOrUpdateInv == assetsStoreCreateOrUpdateInv)) | |
230 | 238 | then ([IntegerEntry(currentIndexKey, newIndex), StringEntry(keySuggestIssuer(assetId, newIndex), toString(i.caller)), StringEntry(keyVotingInfo(assetId, newIndex), votingInfo), Burn(wxPaymentAssetId, burnWxAmount)] ++ votingRewardActions) | |
231 | 239 | else throw("Strict value is not equal to itself.") | |
232 | 240 | } | |
233 | 241 | else throw("Strict value is not equal to itself.") | |
234 | 242 | } | |
235 | 243 | ||
236 | 244 | ||
237 | 245 | ||
238 | 246 | @Callable(i) | |
239 | 247 | func suggestRemove (assetId) = { | |
240 | 248 | let gwxAmountAtNow = getUserGwxAmountAtHeight(toString(i.caller), height) | |
241 | 249 | let minSuggestRemoveBalance = getIntegerValue(keyMinSuggestRemoveBalance) | |
242 | 250 | let wxPayment = i.payments[0] | |
243 | 251 | let wxPaymentAssetId = value(wxPayment.assetId) | |
244 | 252 | let wxPaymentAmount = value(wxPayment.amount) | |
245 | - | let checks = [if ((gwxAmountAtNow >= minSuggestRemoveBalance)) | |
253 | + | let tokenIsVerified = { | |
254 | + | let @ = invoke(assetsStoreContract, "isVerifiedREADONLY", [assetId], nil) | |
255 | + | if ($isInstanceOf(@, "Boolean")) | |
256 | + | then @ | |
257 | + | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
258 | + | } | |
259 | + | let checks = [if (tokenIsVerified) | |
260 | + | then true | |
261 | + | else throwErr("token not verified"), if ((gwxAmountAtNow >= minSuggestRemoveBalance)) | |
246 | 262 | then true | |
247 | 263 | else throwErr("not enough gWXes"), if ((wxPaymentAmount >= getIntegerValue(keyWxForSuggestRemoveAmountRequired))) | |
248 | 264 | then true | |
249 | 265 | else throwErr("payment less then min for suggest")] | |
250 | 266 | if ((checks == checks)) | |
251 | 267 | then { | |
252 | 268 | let currentIndexKey = keyCurrentIndex(assetId) | |
253 | 269 | let currentIndex = getInteger(currentIndexKey) | |
254 | 270 | let newIndex = if (isDefined(currentIndex)) | |
255 | 271 | then (value(currentIndex) + 1) | |
256 | 272 | else 0 | |
257 | 273 | let periodLength = valueOrErrorMessage(getInteger(keyPeriodLengthRemove), wrapErr("periodLengthRemove not set")) | |
258 | 274 | let votingEndHeight = (height + periodLength) | |
259 | 275 | let votesQuorum = valueOrErrorMessage(getInteger(keyVotingThresholdRemove), wrapErr("votingThresholdRemove not set")) | |
260 | 276 | let votingInfo = votingInfoValue(false, "EMPTY", 0, "deverification", "inProgress", height, (height + periodLength), votesQuorum, 0, 0) | |
261 | 277 | [IntegerEntry(currentIndexKey, newIndex), StringEntry(keySuggestIssuer(assetId, newIndex), toString(i.caller)), StringEntry(keyVotingInfo(assetId, newIndex), votingInfo)] | |
262 | 278 | } | |
263 | 279 | else throw("Strict value is not equal to itself.") | |
264 | 280 | } | |
265 | 281 | ||
266 | 282 | ||
267 | 283 | ||
268 | 284 | @Callable(i) | |
269 | 285 | func vote (assetId,inFavor) = { | |
270 | 286 | let currentIndexKey = keyCurrentIndex(assetId) | |
271 | 287 | let currentIndex = valueOrErrorMessage(getInteger(currentIndexKey), wrapErr("voting does not exist")) | |
272 | 288 | let votingInfo = votingExistChecks(assetId, currentIndex) | |
273 | 289 | if ((votingInfo == votingInfo)) | |
274 | 290 | then { | |
275 | 291 | let currentVotingEndHeight = votingInfo._2 | |
276 | 292 | let gwxAmountAtEnd = getUserGwxAmountAtHeight(toString(i.caller), currentVotingEndHeight) | |
277 | 293 | let voteKey = keyVote(assetId, currentIndex, i.caller) | |
278 | 294 | let checks = [if ((getString(voteKey) == unit)) | |
279 | 295 | then true | |
280 | 296 | else throwErr("You have already voted"), if ((gwxAmountAtEnd > 0)) | |
281 | 297 | then true | |
282 | 298 | else throw("You'll not have gWX at the end of voting")] | |
283 | 299 | if ((checks == checks)) | |
284 | 300 | then { | |
285 | 301 | let votingInfoStr = valueOrErrorMessage(getString(keyVotingInfo(assetId, currentIndex)), wrapErr("voting info not found")) | |
286 | 302 | let votingInfoParts = getVotingInfoParts(votingInfoStr) | |
287 | 303 | let votesFor = votingInfoParts._9 | |
288 | 304 | let votesAgainst = votingInfoParts._10 | |
289 | - | let $ | |
305 | + | let $t01272312884 = if (inFavor) | |
290 | 306 | then $Tuple2((votesFor + gwxAmountAtEnd), votesAgainst) | |
291 | 307 | else $Tuple2(votesFor, (votesAgainst + gwxAmountAtEnd)) | |
292 | - | let newVotesFor = $ | |
293 | - | let newVotesAgainst = $ | |
308 | + | let newVotesFor = $t01272312884._1 | |
309 | + | let newVotesAgainst = $t01272312884._2 | |
294 | 310 | let newVotingInfoValue = votingInfoValue(votingInfoParts._1, votingInfoParts._2, votingInfoParts._3, votingInfoParts._4, votingInfoParts._5, votingInfoParts._6, votingInfoParts._7, votingInfoParts._8, newVotesFor, newVotesAgainst) | |
295 | 311 | let votingRewardAction = match getString(keyVotingRewardAssetId(assetId, currentIndex)) { | |
296 | 312 | case pk: String => | |
297 | 313 | [StringEntry(keyVotingReward(i.caller, assetId, currentIndex), voteValue(inFavor, gwxAmountAtEnd))] | |
298 | 314 | case _: Unit => | |
299 | 315 | nil | |
300 | 316 | case _ => | |
301 | 317 | throw("Match error") | |
302 | 318 | } | |
303 | 319 | ([StringEntry(voteKey, voteValue(inFavor, gwxAmountAtEnd)), StringEntry(keyVotingInfo(assetId, currentIndex), newVotingInfoValue)] ++ votingRewardAction) | |
304 | 320 | } | |
305 | 321 | else throw("Strict value is not equal to itself.") | |
306 | 322 | } | |
307 | 323 | else throw("Strict value is not equal to itself.") | |
308 | 324 | } | |
309 | 325 | ||
310 | 326 | ||
311 | 327 | ||
312 | 328 | @Callable(i) | |
313 | 329 | func cancelVote (assetId) = { | |
314 | 330 | let currentIndexKey = keyCurrentIndex(assetId) | |
315 | 331 | let currentIndex = valueOrErrorMessage(getInteger(currentIndexKey), wrapErr("voting does not exist")) | |
316 | 332 | let voteKey = keyVote(assetId, currentIndex, i.caller) | |
317 | 333 | let lastVote = valueOrErrorMessage(getString(voteKey), wrapErr("you have not voted")) | |
318 | 334 | let lastVoteParts = split(lastVote, separator) | |
319 | 335 | let inFavor = lastVoteParts[1] | |
320 | 336 | let gwxAmount = parseIntValue(lastVoteParts[2]) | |
321 | 337 | let votingInfo = votingExistChecks(assetId, currentIndex) | |
322 | 338 | if ((votingInfo == votingInfo)) | |
323 | 339 | then { | |
324 | 340 | let checks = [if (if ((inFavor == "true")) | |
325 | 341 | then true | |
326 | 342 | else (inFavor == "false")) | |
327 | 343 | then true | |
328 | 344 | else throwErr("invalid vote")] | |
329 | 345 | if ((checks == checks)) | |
330 | 346 | then { | |
331 | 347 | let votingInfoStr = valueOrErrorMessage(getString(keyVotingInfo(assetId, currentIndex)), wrapErr("voting info not found")) | |
332 | 348 | let votingInfoParts = getVotingInfoParts(votingInfoStr) | |
333 | 349 | let votesFor = votingInfoParts._9 | |
334 | 350 | let votesAgainst = votingInfoParts._10 | |
335 | - | let $ | |
351 | + | let $t01450914670 = if ((inFavor == "true")) | |
336 | 352 | then $Tuple2((votesFor - gwxAmount), votesAgainst) | |
337 | 353 | else $Tuple2(votesFor, (votesAgainst - gwxAmount)) | |
338 | - | let newVotesFor = $ | |
339 | - | let newVotesAgainst = $ | |
354 | + | let newVotesFor = $t01450914670._1 | |
355 | + | let newVotesAgainst = $t01450914670._2 | |
340 | 356 | let newVotingInfoValue = votingInfoValue(votingInfoParts._1, votingInfoParts._2, votingInfoParts._3, votingInfoParts._4, votingInfoParts._5, votingInfoParts._6, votingInfoParts._7, votingInfoParts._8, newVotesFor, newVotesAgainst) | |
341 | 357 | [StringEntry(keyVotingInfo(assetId, currentIndex), newVotingInfoValue), DeleteEntry(voteKey), DeleteEntry(keyVotingReward(i.caller, assetId, currentIndex))] | |
342 | 358 | } | |
343 | 359 | else throw("Strict value is not equal to itself.") | |
344 | 360 | } | |
345 | 361 | else throw("Strict value is not equal to itself.") | |
346 | 362 | } | |
347 | 363 | ||
348 | 364 | ||
349 | 365 | ||
350 | 366 | @Callable(i) | |
351 | 367 | func finalize (assetId) = { | |
352 | 368 | let currentIndexKey = keyCurrentIndex(assetId) | |
353 | 369 | let currentIndex = valueOrElse(getInteger(currentIndexKey), 0) | |
354 | 370 | let votingThresholdAdd = valueOrErrorMessage(getInteger(keyVotingThresholdAdd), wrapErr("votingThresholdAdd not set")) | |
355 | 371 | let votingThresholdRemove = valueOrErrorMessage(getInteger(keyVotingThresholdRemove), wrapErr("votingThresholdRemove not set")) | |
356 | 372 | let votingInfoStr = valueOrErrorMessage(getString(keyVotingInfo(assetId, currentIndex)), wrapErr("voting info not found")) | |
357 | 373 | let votingInfoParts = getVotingInfoParts(votingInfoStr) | |
358 | 374 | let votingType = votingInfoParts._4 | |
359 | 375 | let status = votingInfoParts._5 | |
360 | 376 | let votingEndHeight = votingInfoParts._7 | |
361 | 377 | let votingQuorum = votingInfoParts._8 | |
362 | 378 | let votesFor = votingInfoParts._9 | |
363 | 379 | let votesAgainst = votingInfoParts._10 | |
364 | 380 | let checks = [if ((status == "inProgress")) | |
365 | 381 | then true | |
366 | 382 | else throwErr("voting not in progress"), if ((height >= votingEndHeight)) | |
367 | 383 | then true | |
368 | 384 | else throwErr("voting not finished")] | |
369 | 385 | if ((checks == checks)) | |
370 | 386 | then { | |
371 | 387 | let votingAccepted = if (if (((votesFor + votesAgainst) >= votingQuorum)) | |
372 | 388 | then (votesFor > votesAgainst) | |
373 | 389 | else false) | |
374 | 390 | then true | |
375 | 391 | else false | |
376 | 392 | let newStatus = if (votingAccepted) | |
377 | 393 | then "accepted" | |
378 | 394 | else "rejected" | |
379 | 395 | let verified = if ((votingType == "verification")) | |
380 | 396 | then true | |
381 | 397 | else false | |
382 | 398 | let finalizeCallRewardAction = if (votingAccepted) | |
383 | 399 | then { | |
384 | 400 | let setVerifiedInvoke = invoke(assetsStoreContract, "setVerified", [assetId, verified], nil) | |
385 | 401 | if ((setVerifiedInvoke == setVerifiedInvoke)) | |
386 | 402 | then { | |
387 | 403 | let finalizeCallRewardAmount = valueOrElse(getInteger(keyFinalizeCallRewardAmount), 0) | |
388 | 404 | [ScriptTransfer(i.caller, finalizeCallRewardAmount, wxAssetId)] | |
389 | 405 | } | |
390 | 406 | else throw("Strict value is not equal to itself.") | |
391 | 407 | } | |
392 | 408 | else nil | |
393 | 409 | let newVotingInfoValue = votingInfoValue(votingInfoParts._1, votingInfoParts._2, votingInfoParts._3, votingInfoParts._4, newStatus, votingInfoParts._6, votingInfoParts._7, votingInfoParts._8, votingInfoParts._9, votingInfoParts._10) | |
394 | 410 | ([StringEntry(keyVotingInfo(assetId, currentIndex), newVotingInfoValue)] ++ finalizeCallRewardAction) | |
395 | 411 | } | |
396 | 412 | else throw("Strict value is not equal to itself.") | |
397 | 413 | } | |
398 | 414 | ||
399 | 415 | ||
400 | 416 | ||
401 | 417 | @Callable(i) | |
402 | 418 | func claimREADONLY (assetId,index,userAddressStr) = { | |
403 | 419 | let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid address")) | |
404 | 420 | let votingRewardAssetIdStr = getString(keyVotingRewardAssetId(assetId, index)) | |
405 | 421 | let rewardAmount = if (isDefined(votingRewardAssetIdStr)) | |
406 | 422 | then calculateReward(userAddress, assetId, index) | |
407 | 423 | else 0 | |
408 | 424 | $Tuple2(nil, rewardAmount) | |
409 | 425 | } | |
410 | 426 | ||
411 | 427 | ||
412 | 428 | ||
413 | 429 | @Callable(i) | |
414 | 430 | func claim (assetId,index) = { | |
415 | 431 | let callerAddress = i.caller | |
416 | 432 | let claimHistoryKey = keyClaimHistory(callerAddress, assetId, index) | |
417 | 433 | let claimHistory = getInteger(claimHistoryKey) | |
418 | 434 | let checks = [if ((claimHistory == unit)) | |
419 | 435 | then true | |
420 | 436 | else throwErr("already claimed")] | |
421 | 437 | if ((checks == checks)) | |
422 | 438 | then { | |
423 | 439 | let rewardAmount = if ((calculateReward(callerAddress, assetId, index) > 0)) | |
424 | 440 | then calculateReward(callerAddress, assetId, index) | |
425 | 441 | else throwErr("nothing to claim") | |
426 | 442 | let votingRewardAssetIdStr = getString(keyVotingRewardAssetId(assetId, index)) | |
427 | 443 | let rewardAction = if (isDefined(votingRewardAssetIdStr)) | |
428 | 444 | then { | |
429 | 445 | let votingRewardAssetId = fromBase58String(value(votingRewardAssetIdStr)) | |
430 | 446 | [ScriptTransfer(callerAddress, rewardAmount, votingRewardAssetId), IntegerEntry(claimHistoryKey, rewardAmount), DeleteEntry(keyVotingReward(callerAddress, assetId, index))] | |
431 | 447 | } | |
432 | 448 | else throwErr("nothing to claim") | |
433 | 449 | rewardAction | |
434 | 450 | } | |
435 | 451 | else throw("Strict value is not equal to itself.") | |
436 | 452 | } | |
437 | 453 | ||
438 | 454 | ||
439 | 455 | @Verifier(tx) | |
440 | 456 | func verify () = { | |
441 | 457 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
442 | 458 | case pk: ByteVector => | |
443 | 459 | pk | |
444 | 460 | case _: Unit => | |
445 | 461 | tx.senderPublicKey | |
446 | 462 | case _ => | |
447 | 463 | throw("Match error") | |
448 | 464 | } | |
449 | 465 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
450 | 466 | } | |
451 | 467 |
github/deemru/w8io/fabc49c 72.65 ms ◑