tx · 8Pfv3ze8PfRA7ShnNi5oSAMpmowyp7Ke8QP2jPMHWfig

3N1BEXuoepNEwqkbeZYKviaLQfvBQV3ibYE:  -0.02100000 Waves

2023.06.07 10:05 [2611933] smart account 3N1BEXuoepNEwqkbeZYKviaLQfvBQV3ibYE > SELF 0.00000000 Waves

{ "type": 13, "id": "8Pfv3ze8PfRA7ShnNi5oSAMpmowyp7Ke8QP2jPMHWfig", "fee": 2100000, "feeAssetId": null, "timestamp": 1686121532317, "version": 2, "chainId": 84, "sender": "3N1BEXuoepNEwqkbeZYKviaLQfvBQV3ibYE", "senderPublicKey": "6t3vrhP1jCmG7CeKBmL8hUibtdP3cMXGC2XtPYEPPC5w", "proofs": [ "t1MwRXW1cNMVS8viKyrV9Ao1XrM2cbUPJCzxuh3n2zrWSNA6B5dVk2fbmCtyAhfrCjLviigiv9hxEdEDjLihBo1" ], "script": "base64:BgIrCAISBQoDCAEIEgMKAQgSBAoCCAQSAwoBCBIDCgEIEgUKAwgBCBIECgIIATUACXNlcGFyYXRvcgICX18ABU1VTFQ4AIDC1y8BB3dyYXBFcnIBA21zZwkAuQkCCQDMCAICGHZvdGluZ192ZXJpZmllZF92Mi5yaWRlOgkAzAgCBQNtc2cFA25pbAIBIAEIdGhyb3dFcnIBA21zZwkAAgEJAQd3cmFwRXJyAQUDbXNnAQVhc0ludAEDdmFsBAckbWF0Y2gwBQN2YWwDCQABAgUHJG1hdGNoMAIDSW50BAZ2YWxJbnQFByRtYXRjaDAFBnZhbEludAkAAgECG0ZhaWxlZCB0byBjYXN0IGludG8gSW50ZWdlcgEQZ2V0SW50ZWdlck9yWmVybwIHYWRkcmVzcwNrZXkJAQt2YWx1ZU9yRWxzZQIJAJoIAgUHYWRkcmVzcwUDa2V5AAABEGdldEludGVnZXJPckZhaWwCB2FkZHJlc3MDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJoIAgUHYWRkcmVzcwUDa2V5CQEHd3JhcEVycgEJAKwCAgUDa2V5Ag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2b3RpbmdSZXdhcmRBc3NldElkU3RyBBN2b3RpbmdSZXdhcmRBc3NldElkCQDZBAEJAQV2YWx1ZQEFFnZvdGluZ1Jld2FyZEFzc2V0SWRTdHIJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwUNY2FsbGVyQWRkcmVzcwUMcmV3YXJkQW1vdW50BRN2b3RpbmdSZXdhcmRBc3NldElkCQDMCAIJAQxJbnRlZ2VyRW50cnkCBQ9jbGFpbUhpc3RvcnlLZXkFDHJld2FyZEFtb3VudAUDbmlsCQEIdGhyb3dFcnIBAhBub3RoaW5nIHRvIGNsYWltBQxyZXdhcmRBY3Rpb24JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkABA90YXJnZXRQdWJsaWNLZXkEByRtYXRjaDAJARZtYW5hZ2VyUHVibGljS2V5T3JVbml0AAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAJwawUHJG1hdGNoMAUCcGsDCQABAgUHJG1hdGNoMAIEVW5pdAgFAnR4D3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQ90YXJnZXRQdWJsaWNLZXkeh8wD", "height": 2611933, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Hcb2NQsvWn5HWzuRASG7VaqGpEKtAvtJvqyAgA3w8yjy Next: NkrWMQqaWLPBDGFc7jHJkpc7UBRE4ZhxE14iidRpbbr Diff:
OldNewDifferences
399399
400400
401401 @Callable(i)
402-func claimREADONLY (assetId,index) = {
403- let callerAddress = i.caller
402+func claimREADONLY (assetId,index,userAddressStr) = {
403+ let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid address"))
404404 let votingRewardAssetIdStr = getString(keyVotingRewardAssetId(assetId, index))
405405 let rewardAmount = if (isDefined(votingRewardAssetIdStr))
406- then calculateReward(callerAddress, assetId, index)
406+ then calculateReward(userAddress, assetId, index)
407407 else 0
408408 $Tuple2(nil, rewardAmount)
409409 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = "__"
55
66 let MULT8 = 100000000
77
88 func wrapErr (msg) = makeString(["voting_verified_v2.ride:", msg], " ")
99
1010
1111 func throwErr (msg) = throw(wrapErr(msg))
1212
1313
1414 func asInt (val) = match val {
1515 case valInt: Int =>
1616 valInt
1717 case _ =>
1818 throw("Failed to cast into Integer")
1919 }
2020
2121
2222 func getIntegerOrZero (address,key) = valueOrElse(getInteger(address, key), 0)
2323
2424
2525 func getIntegerOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), wrapErr((key + " is not defined")))
2626
2727
2828 func getStringOrEmpty (address,key) = valueOrElse(getString(address, key), "")
2929
3030
3131 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), wrapErr((key + " is not defined")))
3232
3333
3434 let keyBoostingContract = makeString(["%s", "boostingContract"], separator)
3535
3636 let keyEmissionContract = makeString(["%s", "emissionContract"], separator)
3737
3838 let keyAssetsStoreContract = makeString(["%s", "assetsStoreContract"], separator)
3939
4040 let boostingContract = addressFromStringValue(getStringValue(keyBoostingContract))
4141
4242 let emissionContract = addressFromStringValue(getStringValue(keyEmissionContract))
4343
4444 let assetsStoreContract = addressFromStringValue(getStringValue(keyAssetsStoreContract))
4545
4646 let keyEmissionConfig = makeString(["%s", "config"], separator)
4747
4848 let wxAssetIdStr = split(getStringOrFail(emissionContract, keyEmissionConfig), separator)[1]
4949
5050 let wxAssetId = fromBase58String(wxAssetIdStr)
5151
5252 let keyVotingThresholdAdd = makeString(["%s%s", "votingThreshold", "add"], separator)
5353
5454 let keyVotingThresholdRemove = makeString(["%s%s", "votingThreshold", "remove"], separator)
5555
5656 func keyPeriodLengthAdd (assetId,index) = makeString(["%s%s%d", "periodLengthAdd", assetId, toString(index)], separator)
5757
5858
5959 let keyPeriodLengthRemove = makeString(["%s", "periodLengthRemove"], separator)
6060
6161 func keyCurrentVotingHeightStart (assetId,index) = makeString(["%s%s%d", "currentVotingHeightStart", assetId, toString(index)], separator)
6262
6363
6464 func keyVerified (assetId) = makeString(["%s%s", "verified", assetId], separator)
6565
6666
6767 func keyVerificationInProgress (assetId) = makeString(["%s%s%s", "verification", "inProgress", assetId], separator)
6868
6969
7070 func keyDeverificationInProgress (assetId) = makeString(["%s%s%s", "deverification", "inProgress", assetId], separator)
7171
7272
7373 let keyMaxPeriodLength = makeString(["%s", "maxPeriodLength"], separator)
7474
7575 let keyMinPeriodLength = makeString(["%s", "minPeriodLength"], separator)
7676
7777 func keyVotingRewardAssetId (assetId,index) = makeString(["%s%s%d", "votingRewardAssetId", assetId, toString(index)], separator)
7878
7979
8080 func keyVotingReward (userAddress,assetId,index) = makeString(["%s%s%s%d", "votingReward", toString(userAddress), assetId, toString(index)], separator)
8181
8282
8383 func keyTotalVotingReward (assetId,index) = makeString(["%s%s%d", "votingReward", assetId, toString(index)], separator)
8484
8585
8686 let keyFinalizeCallRewardAmount = makeString(["%s", "finalizeCallRewardAmount"], separator)
8787
8888 let keyMinSuggestRemoveBalance = makeString(["%s", "minSuggestRemoveBalance"], separator)
8989
9090 func keyCurrentIndex (assetId) = makeString(["%s%s", "currentIndex", assetId], separator)
9191
9292
9393 func keyVote (assetId,index,caller) = makeString(["%s%s%d%s", "vote", assetId, toString(index), toString(caller)], separator)
9494
9595
9696 func voteValue (inFavor,gwxAmount) = makeString(["%s%d", toString(inFavor), toString(gwxAmount)], separator)
9797
9898
9999 func keyVotingResult (assetId,index) = makeString(["%s%s%d", "votingResult", assetId, toString(index)], separator)
100100
101101
102102 func votingValue (forAmount,againstAmount) = makeString(["%d%d", toString(forAmount), toString(againstAmount)], separator)
103103
104104
105105 let defaultVotingValue = makeString(["%d%d", "0", "0"], separator)
106106
107107 func keySuggestIssuer (assetId,index) = makeString(["%s%s%d", "suggestIssuer", assetId, toString(index)], separator)
108108
109109
110110 func keyClaimHistory (userAddress,assetId,index) = makeString(["%s%s%s%d", "history", toString(userAddress), assetId, toString(index)], separator)
111111
112112
113113 func keyVotingEndHeight (assetId,index) = makeString(["%s%s%d", "votingEndHeight", assetId, toString(index)], separator)
114114
115115
116116 let keyFeePerBlock = makeString(["%s", "feePerBlock"], separator)
117117
118118 let feePerBlock = getIntegerOrFail(this, keyFeePerBlock)
119119
120120 let keyMinWxMinForSuggestAddAmountRequired = makeString(["%s", "wxMinForSuggestAddAmountRequired"], separator)
121121
122122 let keyWxForSuggestRemoveAmountRequired = makeString(["%s", "wxForSuggestRemoveAmountRequired"], separator)
123123
124124 func getUserGwxAmountAtHeight (userAddress,targetHeight) = {
125125 let gwxAmount = invoke(boostingContract, "getUserGwxAmountAtHeightREADONLY", [userAddress, targetHeight], nil)
126126 asInt(gwxAmount)
127127 }
128128
129129
130130 func keyManagerVaultAddress () = "%s__managerVaultAddress"
131131
132132
133133 func keyManagerPublicKey () = "%s__managerPublicKey"
134134
135135
136136 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
137137 case s: String =>
138138 addressFromStringValue(s)
139139 case _ =>
140140 this
141141 }
142142
143143
144144 func managerPublicKeyOrUnit () = {
145145 let managerVaultAddress = getManagerVaultAddressOrThis()
146146 match getString(managerVaultAddress, keyManagerPublicKey()) {
147147 case s: String =>
148148 fromBase58String(s)
149149 case _: Unit =>
150150 unit
151151 case _ =>
152152 throw("Match error")
153153 }
154154 }
155155
156156
157157 func votingExistChecks (assetId,currentIndex) = {
158158 let verificationInProgress = valueOrElse(getBoolean(keyVerificationInProgress(assetId)), false)
159159 let deverificationInProgress = valueOrElse(getBoolean(keyDeverificationInProgress(assetId)), false)
160160 let suggestIssuer = valueOrErrorMessage(getString(keySuggestIssuer(assetId, currentIndex)), wrapErr("voting issuer not found"))
161161 let currentVotingHeightStart = valueOrErrorMessage(getInteger(keyCurrentVotingHeightStart(assetId, currentIndex)), wrapErr("voting start height not found"))
162162 let votingPeriodLenght = if (verificationInProgress)
163163 then valueOrErrorMessage(getInteger(keyPeriodLengthAdd(assetId, currentIndex)), wrapErr("voting period length not found"))
164164 else value(getInteger(keyPeriodLengthRemove))
165165 let checks = [if (if (verificationInProgress)
166166 then true
167167 else deverificationInProgress)
168168 then true
169169 else throwErr("no voting in progress"), if (((currentVotingHeightStart + votingPeriodLenght) > height))
170170 then true
171171 else throwErr("voting expired")]
172172 if ((checks == checks))
173173 then $Tuple5(verificationInProgress, deverificationInProgress, currentVotingHeightStart, votingPeriodLenght, suggestIssuer)
174174 else throw("Strict value is not equal to itself.")
175175 }
176176
177177
178178 func calculateReward (voter,assetId,index) = {
179179 let voteKey = keyVote(assetId, index, voter)
180180 let lastVote = valueOrErrorMessage(getString(voteKey), wrapErr("you have not voted"))
181181 let lastVoteParts = split(lastVote, separator)
182182 let inFavor = lastVoteParts[1]
183183 let rewardAmount = if ((inFavor == "true"))
184184 then {
185185 let gwxAmount = parseIntValue(lastVoteParts[2])
186186 let lastVotingValue = valueOrErrorMessage(getString(keyVotingResult(assetId, index)), wrapErr("voting does not exist"))
187187 let lastVotingValueParts = split(lastVotingValue, separator)
188188 let totalVotesFor = parseIntValue(lastVotingValueParts[1])
189189 let partOfTheTotalVotesX8 = fraction(gwxAmount, MULT8, totalVotesFor)
190190 let totalVotingReward = valueOrElse(getInteger(keyTotalVotingReward(assetId, index)), 0)
191191 let rewardAmount = fraction(partOfTheTotalVotesX8, totalVotingReward, MULT8, FLOOR)
192192 rewardAmount
193193 }
194194 else 0
195195 rewardAmount
196196 }
197197
198198
199199 @Callable(i)
200200 func suggestAdd (assetId,periodLength,assetImage) = {
201201 let info = valueOrErrorMessage(assetInfo(fromBase58String(assetId)), "Invalid asset ID")
202202 if ((info == info))
203203 then {
204204 let currentIndexKey = keyCurrentIndex(assetId)
205205 let currentIndex = getInteger(currentIndexKey)
206206 let newIndex = if (isDefined(currentIndex))
207207 then (value(currentIndex) + 1)
208208 else 0
209209 let wxPayment = i.payments[0]
210210 let wxPaymentAssetId = value(wxPayment.assetId)
211211 let wxPaymentAmount = value(wxPayment.amount)
212212 let votingRewardActions = if ((size(i.payments) > 1))
213213 then {
214214 let votingRewardPayment = i.payments[1]
215215 let votingRewardPaymentAssetId = toBase58String(value(votingRewardPayment.assetId))
216216 let votingRewardPaymentAmount = value(votingRewardPayment.amount)
217217 [StringEntry(keyVotingRewardAssetId(assetId, newIndex), votingRewardPaymentAssetId), IntegerEntry(keyTotalVotingReward(assetId, newIndex), votingRewardPaymentAmount)]
218218 }
219219 else nil
220220 let minPeriodLength = getIntegerValue(keyMinPeriodLength)
221221 let maxPeriodLength = getIntegerValue(keyMaxPeriodLength)
222222 let checks = [if (if ((periodLength >= minPeriodLength))
223223 then (maxPeriodLength >= periodLength)
224224 else false)
225225 then true
226226 else throwErr("invalid periodLength"), if ((getBoolean(keyVerified(assetId)) == unit))
227227 then true
228228 else throwErr("already verified"), if ((getBoolean(keyVerificationInProgress(assetId)) == unit))
229229 then true
230230 else throwErr("already in progress"), if ((wxPaymentAmount > (periodLength * feePerBlock)))
231231 then true
232232 else throwErr("not enough wx for given period"), if ((wxPaymentAmount >= getIntegerValue(keyMinWxMinForSuggestAddAmountRequired)))
233233 then true
234234 else throwErr("payment less then min for suggest")]
235235 if ((checks == checks))
236236 then {
237237 let assetsStoreCreateOrUpdateInv = invoke(assetsStoreContract, "createOrUpdate", [assetId, assetImage, false], nil)
238238 if ((assetsStoreCreateOrUpdateInv == assetsStoreCreateOrUpdateInv))
239239 then {
240240 let votingEndHeight = (height + periodLength)
241241 let finalizeCallRewardAmount = valueOrElse(getInteger(keyFinalizeCallRewardAmount), 0)
242242 let burnWxAmount = (wxPaymentAmount - finalizeCallRewardAmount)
243243 ([IntegerEntry(currentIndexKey, newIndex), BooleanEntry(keyVerificationInProgress(assetId), true), IntegerEntry(keyCurrentVotingHeightStart(assetId, newIndex), height), IntegerEntry(keyPeriodLengthAdd(assetId, newIndex), periodLength), StringEntry(keySuggestIssuer(assetId, newIndex), toString(i.caller)), IntegerEntry(keyVotingEndHeight(assetId, newIndex), votingEndHeight), Burn(wxPaymentAssetId, burnWxAmount)] ++ votingRewardActions)
244244 }
245245 else throw("Strict value is not equal to itself.")
246246 }
247247 else throw("Strict value is not equal to itself.")
248248 }
249249 else throw("Strict value is not equal to itself.")
250250 }
251251
252252
253253
254254 @Callable(i)
255255 func suggestRemove (assetId) = {
256256 let gwxAmountAtNow = getUserGwxAmountAtHeight(toString(i.caller), height)
257257 let minSuggestRemoveBalance = getIntegerValue(keyMinSuggestRemoveBalance)
258258 let wxPayment = i.payments[0]
259259 let wxPaymentAssetId = value(wxPayment.assetId)
260260 let wxPaymentAmount = value(wxPayment.amount)
261261 let isVerified = valueOrElse(getBoolean(keyVerified(assetId)), false)
262262 let checks = [if (isVerified)
263263 then true
264264 else throwErr(makeString([assetId, "not verified"], " ")), if ((gwxAmountAtNow >= minSuggestRemoveBalance))
265265 then true
266266 else throwErr("not enough gWXes"), if ((wxPaymentAmount >= getIntegerValue(keyWxForSuggestRemoveAmountRequired)))
267267 then true
268268 else throwErr("payment less then min for suggest")]
269269 if ((checks == checks))
270270 then {
271271 let currentIndexKey = keyCurrentIndex(assetId)
272272 let currentIndex = getInteger(currentIndexKey)
273273 let newIndex = if (isDefined(currentIndex))
274274 then (value(currentIndex) + 1)
275275 else 0
276276 let periodLength = valueOrErrorMessage(getInteger(keyPeriodLengthRemove), wrapErr("periodLengthRemove not set"))
277277 let votingEndHeight = (height + periodLength)
278278 [IntegerEntry(currentIndexKey, newIndex), BooleanEntry(keyDeverificationInProgress(assetId), true), IntegerEntry(keyCurrentVotingHeightStart(assetId, newIndex), height), StringEntry(keySuggestIssuer(assetId, newIndex), toString(i.caller)), IntegerEntry(keyVotingEndHeight(assetId, newIndex), votingEndHeight)]
279279 }
280280 else throw("Strict value is not equal to itself.")
281281 }
282282
283283
284284
285285 @Callable(i)
286286 func vote (assetId,inFavor) = {
287287 let currentIndexKey = keyCurrentIndex(assetId)
288288 let currentIndex = valueOrErrorMessage(getInteger(currentIndexKey), wrapErr("voting does not exist"))
289289 let votingInfo = votingExistChecks(assetId, currentIndex)
290290 if ((votingInfo == votingInfo))
291291 then {
292292 let currentVotingHeightStart = votingInfo._3
293293 let votingPeriodLenght = votingInfo._4
294294 let gwxAmountAtEnd = getUserGwxAmountAtHeight(toString(i.caller), (currentVotingHeightStart + votingPeriodLenght))
295295 let voteKey = keyVote(assetId, currentIndex, i.caller)
296296 let votingResultKey = keyVotingResult(assetId, currentIndex)
297297 let checks = [if ((getString(voteKey) == unit))
298298 then true
299299 else throwErr("You have already voted"), if ((gwxAmountAtEnd > 0))
300300 then true
301301 else throw("You'll not have gWX at the end of voting")]
302302 if ((checks == checks))
303303 then {
304304 let lastVotingValue = valueOrElse(getString(votingResultKey), defaultVotingValue)
305305 let lastVotingValueParts = split(lastVotingValue, separator)
306306 let newVotingValue = if (inFavor)
307307 then votingValue((parseIntValue(lastVotingValueParts[1]) + gwxAmountAtEnd), parseIntValue(lastVotingValueParts[2]))
308308 else votingValue(parseIntValue(lastVotingValueParts[1]), (parseIntValue(lastVotingValueParts[2]) + gwxAmountAtEnd))
309309 [StringEntry(voteKey, voteValue(inFavor, gwxAmountAtEnd)), StringEntry(votingResultKey, newVotingValue), BooleanEntry(keyVotingReward(i.caller, assetId, currentIndex), true)]
310310 }
311311 else throw("Strict value is not equal to itself.")
312312 }
313313 else throw("Strict value is not equal to itself.")
314314 }
315315
316316
317317
318318 @Callable(i)
319319 func cancelVote (assetId) = {
320320 let currentIndexKey = keyCurrentIndex(assetId)
321321 let currentIndex = valueOrErrorMessage(getInteger(currentIndexKey), wrapErr("voting does not exist"))
322322 let voteKey = keyVote(assetId, currentIndex, i.caller)
323323 let votingResultKey = keyVotingResult(assetId, currentIndex)
324324 let lastVote = valueOrErrorMessage(getString(voteKey), wrapErr("you have not voted"))
325325 let lastVoteParts = split(lastVote, separator)
326326 let inFavor = lastVoteParts[1]
327327 let gwxAmount = parseIntValue(lastVoteParts[2])
328328 let votingInfo = votingExistChecks(assetId, currentIndex)
329329 if ((votingInfo == votingInfo))
330330 then {
331331 let checks = [if (if ((inFavor == "true"))
332332 then true
333333 else (inFavor == "false"))
334334 then true
335335 else throwErr("invalid vote")]
336336 if ((checks == checks))
337337 then {
338338 let lastVotingValue = valueOrElse(getString(votingResultKey), defaultVotingValue)
339339 let lastVotingValueParts = split(lastVotingValue, separator)
340340 let newVotingResultValue = if ((inFavor == "true"))
341341 then votingValue((parseIntValue(lastVotingValueParts[1]) - gwxAmount), parseIntValue(lastVotingValueParts[2]))
342342 else votingValue(parseIntValue(lastVotingValueParts[1]), (parseIntValue(lastVotingValueParts[2]) - gwxAmount))
343343 [DeleteEntry(voteKey), StringEntry(votingResultKey, newVotingResultValue), DeleteEntry(keyVotingReward(i.caller, assetId, currentIndex))]
344344 }
345345 else throw("Strict value is not equal to itself.")
346346 }
347347 else throw("Strict value is not equal to itself.")
348348 }
349349
350350
351351
352352 @Callable(i)
353353 func finalize (assetId) = {
354354 let verificationInProgress = valueOrElse(getBoolean(keyVerificationInProgress(assetId)), false)
355355 let deverificationInProgress = valueOrElse(getBoolean(keyDeverificationInProgress(assetId)), false)
356356 let currentIndexKey = keyCurrentIndex(assetId)
357357 let currentIndex = valueOrElse(getInteger(currentIndexKey), 0)
358358 let votingThresholdAdd = valueOrErrorMessage(getInteger(keyVotingThresholdAdd), wrapErr("votingThresholdAdd not set"))
359359 let votingThresholdRemove = valueOrErrorMessage(getInteger(keyVotingThresholdRemove), wrapErr("votingThresholdRemove not set"))
360360 let $t01501215451 = if (verificationInProgress)
361361 then $Tuple3([DeleteEntry(keyVerificationInProgress(assetId)), BooleanEntry(keyVerified(assetId), true)], true, votingThresholdAdd)
362362 else $Tuple3([DeleteEntry(keyDeverificationInProgress(assetId)), DeleteEntry(keyVerified(assetId))], true, votingThresholdRemove)
363363 let finalizeVotingActions = $t01501215451._1
364364 let verified = $t01501215451._2
365365 let threshold = $t01501215451._3
366366 let lastVotingValue = valueOrElse(getString(keyVotingResult(assetId, currentIndex)), defaultVotingValue)
367367 let lastVotingValueParts = split(lastVotingValue, separator)
368368 let votesFor = parseIntValue(lastVotingValueParts[1])
369369 let votesAgainst = parseIntValue(lastVotingValueParts[2])
370370 let votesTotal = (votesFor + votesAgainst)
371371 let votingEndHeight = valueOrErrorMessage(getInteger(keyVotingEndHeight(assetId, currentIndex)), wrapErr("voting end height not found"))
372372 let checks = [if (if (verificationInProgress)
373373 then true
374374 else deverificationInProgress)
375375 then true
376376 else throwErr("nothing to finalize"), if ((height >= votingEndHeight))
377377 then true
378378 else throwErr("voting not finished"), if ((votesTotal >= threshold))
379379 then true
380380 else throwErr("not enough votes")]
381381 if ((checks == checks))
382382 then {
383383 let finalizeCallRewardAction = if ((votesAgainst > votesFor))
384384 then {
385385 let setVerifiedInvoke = invoke(assetsStoreContract, "setVerified", [assetId, verified], nil)
386386 if ((setVerifiedInvoke == setVerifiedInvoke))
387387 then {
388388 let finalizeCallRewardAmount = valueOrElse(getInteger(keyFinalizeCallRewardAmount), 0)
389389 [ScriptTransfer(i.caller, finalizeCallRewardAmount, wxAssetId)]
390390 }
391391 else throw("Strict value is not equal to itself.")
392392 }
393393 else nil
394394 (finalizeVotingActions ++ finalizeCallRewardAction)
395395 }
396396 else throw("Strict value is not equal to itself.")
397397 }
398398
399399
400400
401401 @Callable(i)
402-func claimREADONLY (assetId,index) = {
403- let callerAddress = i.caller
402+func claimREADONLY (assetId,index,userAddressStr) = {
403+ let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid address"))
404404 let votingRewardAssetIdStr = getString(keyVotingRewardAssetId(assetId, index))
405405 let rewardAmount = if (isDefined(votingRewardAssetIdStr))
406- then calculateReward(callerAddress, assetId, index)
406+ then calculateReward(userAddress, assetId, index)
407407 else 0
408408 $Tuple2(nil, rewardAmount)
409409 }
410410
411411
412412
413413 @Callable(i)
414414 func claim (assetId,index) = {
415415 let callerAddress = i.caller
416416 let claimHistoryKey = keyClaimHistory(callerAddress, assetId, index)
417417 let claimHistory = getInteger(claimHistoryKey)
418418 let checks = [if ((claimHistory == unit))
419419 then true
420420 else throwErr("already claimed")]
421421 if ((checks == checks))
422422 then {
423423 let rewardAmount = if ((calculateReward(callerAddress, assetId, index) > 0))
424424 then calculateReward(callerAddress, assetId, index)
425425 else throwErr("nothing to claim")
426426 let votingRewardAssetIdStr = getString(keyVotingRewardAssetId(assetId, index))
427427 let rewardAction = if (isDefined(votingRewardAssetIdStr))
428428 then {
429429 let votingRewardAssetId = fromBase58String(value(votingRewardAssetIdStr))
430430 [ScriptTransfer(callerAddress, rewardAmount, votingRewardAssetId), IntegerEntry(claimHistoryKey, rewardAmount)]
431431 }
432432 else throwErr("nothing to claim")
433433 rewardAction
434434 }
435435 else throw("Strict value is not equal to itself.")
436436 }
437437
438438
439439 @Verifier(tx)
440440 func verify () = {
441441 let targetPublicKey = match managerPublicKeyOrUnit() {
442442 case pk: ByteVector =>
443443 pk
444444 case _: Unit =>
445445 tx.senderPublicKey
446446 case _ =>
447447 throw("Match error")
448448 }
449449 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
450450 }
451451

github/deemru/w8io/026f985 
62.56 ms