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:BgIrCAISBQoDCAEIEgMKAQgSBAoCCAQSAwoBCBIDCgEIEgUKAwgBCBIECgIIATUACXNlcGFyYXRvcgICX18ABU1VTFQ4AIDC1y8BB3dyYXBFcnIBA21zZwkAuQkCCQDMCAICGHZvdGluZ192ZXJpZmllZF92Mi5yaWRlOgkAzAgCBQNtc2cFA25pbAIBIAEIdGhyb3dFcnIBA21zZwkAAgEJAQd3cmFwRXJyAQUDbXNnAQVhc0ludAEDdmFsBAckbWF0Y2gwBQN2YWwDCQABAgUHJG1hdGNoMAIDSW50BAZ2YWxJbnQFByRtYXRjaDAFBnZhbEludAkAAgECG0ZhaWxlZCB0byBjYXN0IGludG8gSW50ZWdlcgEQZ2V0SW50ZWdlck9yWmVybwIHYWRkcmVzcwNrZXkJAQt2YWx1ZU9yRWxzZQIJAJoIAgUHYWRkcmVzcwUDa2V5AAABEGdldEludGVnZXJPckZhaWwCB2FkZHJlc3MDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJoIAgUHYWRkcmVzcwUDa2V5CQEHd3JhcEVycgEJAKwCAgUDa2V5Ag8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b3RpbmdSZXdhcmRBc3NldElkU3RyBBN2b3RpbmdSZXdhcmRBc3NldElkCQDZBAEJAQV2YWx1ZQEFFnZvdGluZ1Jld2FyZEFzc2V0SWRTdHIJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwUNY2FsbGVyQWRkcmVzcwUMcmV3YXJkQW1vdW50BRN2b3RpbmdSZXdhcmRBc3NldElkCQDMCAIJAQxJbnRlZ2VyRW50cnkCBQ9jbGFpbUhpc3RvcnlLZXkFDHJld2FyZEFtb3VudAUDbmlsCQEIdGhyb3dFcnIBAhBub3RoaW5nIHRvIGNsYWltBQxyZXdhcmRBY3Rpb24JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkABA90YXJnZXRQdWJsaWNLZXkEByRtYXRjaDAJARZtYW5hZ2VyUHVibGljS2V5T3JVbml0AAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAJwawUHJG1hdGNoMAUCcGsDCQABAgUHJG1hdGNoMAIEVW5pdAgFAnR4D3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQ90YXJnZXRQdWJsaWNLZXkeh8wD", "height": 2611933, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Hcb2NQsvWn5HWzuRASG7VaqGpEKtAvtJvqyAgA3w8yjy Next: NkrWMQqaWLPBDGFc7jHJkpc7UBRE4ZhxE14iidRpbbr Diff:
Old | New | Differences | |
---|---|---|---|
399 | 399 | ||
400 | 400 | ||
401 | 401 | @Callable(i) | |
402 | - | func claimREADONLY (assetId,index) = { | |
403 | - | let | |
402 | + | func claimREADONLY (assetId,index,userAddressStr) = { | |
403 | + | let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid address")) | |
404 | 404 | let votingRewardAssetIdStr = getString(keyVotingRewardAssetId(assetId, index)) | |
405 | 405 | let rewardAmount = if (isDefined(votingRewardAssetIdStr)) | |
406 | - | then calculateReward( | |
406 | + | then calculateReward(userAddress, assetId, index) | |
407 | 407 | else 0 | |
408 | 408 | $Tuple2(nil, rewardAmount) | |
409 | 409 | } |
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 | func keyPeriodLengthAdd (assetId,index) = makeString(["%s%s%d", "periodLengthAdd", assetId, toString(index)], separator) | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | let keyPeriodLengthRemove = makeString(["%s", "periodLengthRemove"], separator) | |
60 | 60 | ||
61 | 61 | func keyCurrentVotingHeightStart (assetId,index) = makeString(["%s%s%d", "currentVotingHeightStart", assetId, toString(index)], separator) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func keyVerified (assetId) = makeString(["%s%s", "verified", assetId], separator) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func keyVerificationInProgress (assetId) = makeString(["%s%s%s", "verification", "inProgress", assetId], separator) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func keyDeverificationInProgress (assetId) = makeString(["%s%s%s", "deverification", "inProgress", assetId], separator) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | let keyMaxPeriodLength = makeString(["%s", "maxPeriodLength"], separator) | |
74 | 74 | ||
75 | 75 | let keyMinPeriodLength = makeString(["%s", "minPeriodLength"], separator) | |
76 | 76 | ||
77 | 77 | func keyVotingRewardAssetId (assetId,index) = makeString(["%s%s%d", "votingRewardAssetId", assetId, toString(index)], separator) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func keyVotingReward (userAddress,assetId,index) = makeString(["%s%s%s%d", "votingReward", toString(userAddress), assetId, toString(index)], separator) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func keyTotalVotingReward (assetId,index) = makeString(["%s%s%d", "votingReward", assetId, toString(index)], separator) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | let keyFinalizeCallRewardAmount = makeString(["%s", "finalizeCallRewardAmount"], separator) | |
87 | 87 | ||
88 | 88 | let keyMinSuggestRemoveBalance = makeString(["%s", "minSuggestRemoveBalance"], separator) | |
89 | 89 | ||
90 | 90 | func keyCurrentIndex (assetId) = makeString(["%s%s", "currentIndex", assetId], separator) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func keyVote (assetId,index,caller) = makeString(["%s%s%d%s", "vote", assetId, toString(index), toString(caller)], separator) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func voteValue (inFavor,gwxAmount) = makeString(["%s%d", toString(inFavor), toString(gwxAmount)], separator) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func keyVotingResult (assetId,index) = makeString(["%s%s%d", "votingResult", assetId, toString(index)], separator) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func votingValue (forAmount,againstAmount) = makeString(["%d%d", toString(forAmount), toString(againstAmount)], separator) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | let defaultVotingValue = makeString(["%d%d", "0", "0"], separator) | |
106 | 106 | ||
107 | 107 | func keySuggestIssuer (assetId,index) = makeString(["%s%s%d", "suggestIssuer", assetId, toString(index)], separator) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func keyClaimHistory (userAddress,assetId,index) = makeString(["%s%s%s%d", "history", toString(userAddress), assetId, toString(index)], separator) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func keyVotingEndHeight (assetId,index) = makeString(["%s%s%d", "votingEndHeight", assetId, toString(index)], separator) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | let keyFeePerBlock = makeString(["%s", "feePerBlock"], separator) | |
117 | 117 | ||
118 | 118 | let feePerBlock = getIntegerOrFail(this, keyFeePerBlock) | |
119 | 119 | ||
120 | 120 | let keyMinWxMinForSuggestAddAmountRequired = makeString(["%s", "wxMinForSuggestAddAmountRequired"], separator) | |
121 | 121 | ||
122 | 122 | let keyWxForSuggestRemoveAmountRequired = makeString(["%s", "wxForSuggestRemoveAmountRequired"], separator) | |
123 | 123 | ||
124 | 124 | func getUserGwxAmountAtHeight (userAddress,targetHeight) = { | |
125 | 125 | let gwxAmount = invoke(boostingContract, "getUserGwxAmountAtHeightREADONLY", [userAddress, targetHeight], nil) | |
126 | 126 | asInt(gwxAmount) | |
127 | 127 | } | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func keyManagerVaultAddress () = "%s__managerVaultAddress" | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) { | |
137 | 137 | case s: String => | |
138 | 138 | addressFromStringValue(s) | |
139 | 139 | case _ => | |
140 | 140 | this | |
141 | 141 | } | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func managerPublicKeyOrUnit () = { | |
145 | 145 | let managerVaultAddress = getManagerVaultAddressOrThis() | |
146 | 146 | match getString(managerVaultAddress, keyManagerPublicKey()) { | |
147 | 147 | case s: String => | |
148 | 148 | fromBase58String(s) | |
149 | 149 | case _: Unit => | |
150 | 150 | unit | |
151 | 151 | case _ => | |
152 | 152 | throw("Match error") | |
153 | 153 | } | |
154 | 154 | } | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func votingExistChecks (assetId,currentIndex) = { | |
158 | 158 | let verificationInProgress = valueOrElse(getBoolean(keyVerificationInProgress(assetId)), false) | |
159 | 159 | let deverificationInProgress = valueOrElse(getBoolean(keyDeverificationInProgress(assetId)), false) | |
160 | 160 | let suggestIssuer = valueOrErrorMessage(getString(keySuggestIssuer(assetId, currentIndex)), wrapErr("voting issuer not found")) | |
161 | 161 | let currentVotingHeightStart = valueOrErrorMessage(getInteger(keyCurrentVotingHeightStart(assetId, currentIndex)), wrapErr("voting start height not found")) | |
162 | 162 | let votingPeriodLenght = if (verificationInProgress) | |
163 | 163 | then valueOrErrorMessage(getInteger(keyPeriodLengthAdd(assetId, currentIndex)), wrapErr("voting period length not found")) | |
164 | 164 | else value(getInteger(keyPeriodLengthRemove)) | |
165 | 165 | let checks = [if (if (verificationInProgress) | |
166 | 166 | then true | |
167 | 167 | else deverificationInProgress) | |
168 | 168 | then true | |
169 | 169 | else throwErr("no voting in progress"), if (((currentVotingHeightStart + votingPeriodLenght) > height)) | |
170 | 170 | then true | |
171 | 171 | else throwErr("voting expired")] | |
172 | 172 | if ((checks == checks)) | |
173 | 173 | then $Tuple5(verificationInProgress, deverificationInProgress, currentVotingHeightStart, votingPeriodLenght, suggestIssuer) | |
174 | 174 | else throw("Strict value is not equal to itself.") | |
175 | 175 | } | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func calculateReward (voter,assetId,index) = { | |
179 | 179 | let voteKey = keyVote(assetId, index, voter) | |
180 | 180 | let lastVote = valueOrErrorMessage(getString(voteKey), wrapErr("you have not voted")) | |
181 | 181 | let lastVoteParts = split(lastVote, separator) | |
182 | 182 | let inFavor = lastVoteParts[1] | |
183 | 183 | let rewardAmount = if ((inFavor == "true")) | |
184 | 184 | then { | |
185 | 185 | let gwxAmount = parseIntValue(lastVoteParts[2]) | |
186 | 186 | let lastVotingValue = valueOrErrorMessage(getString(keyVotingResult(assetId, index)), wrapErr("voting does not exist")) | |
187 | 187 | let lastVotingValueParts = split(lastVotingValue, separator) | |
188 | 188 | let totalVotesFor = parseIntValue(lastVotingValueParts[1]) | |
189 | 189 | let partOfTheTotalVotesX8 = fraction(gwxAmount, MULT8, totalVotesFor) | |
190 | 190 | let totalVotingReward = valueOrElse(getInteger(keyTotalVotingReward(assetId, index)), 0) | |
191 | 191 | let rewardAmount = fraction(partOfTheTotalVotesX8, totalVotingReward, MULT8, FLOOR) | |
192 | 192 | rewardAmount | |
193 | 193 | } | |
194 | 194 | else 0 | |
195 | 195 | rewardAmount | |
196 | 196 | } | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | @Callable(i) | |
200 | 200 | func suggestAdd (assetId,periodLength,assetImage) = { | |
201 | 201 | let info = valueOrErrorMessage(assetInfo(fromBase58String(assetId)), "Invalid asset ID") | |
202 | 202 | if ((info == info)) | |
203 | 203 | then { | |
204 | 204 | let currentIndexKey = keyCurrentIndex(assetId) | |
205 | 205 | let currentIndex = getInteger(currentIndexKey) | |
206 | 206 | let newIndex = if (isDefined(currentIndex)) | |
207 | 207 | then (value(currentIndex) + 1) | |
208 | 208 | else 0 | |
209 | 209 | let wxPayment = i.payments[0] | |
210 | 210 | let wxPaymentAssetId = value(wxPayment.assetId) | |
211 | 211 | let wxPaymentAmount = value(wxPayment.amount) | |
212 | 212 | let votingRewardActions = if ((size(i.payments) > 1)) | |
213 | 213 | then { | |
214 | 214 | let votingRewardPayment = i.payments[1] | |
215 | 215 | let votingRewardPaymentAssetId = toBase58String(value(votingRewardPayment.assetId)) | |
216 | 216 | let votingRewardPaymentAmount = value(votingRewardPayment.amount) | |
217 | 217 | [StringEntry(keyVotingRewardAssetId(assetId, newIndex), votingRewardPaymentAssetId), IntegerEntry(keyTotalVotingReward(assetId, newIndex), votingRewardPaymentAmount)] | |
218 | 218 | } | |
219 | 219 | else nil | |
220 | 220 | let minPeriodLength = getIntegerValue(keyMinPeriodLength) | |
221 | 221 | let maxPeriodLength = getIntegerValue(keyMaxPeriodLength) | |
222 | 222 | let checks = [if (if ((periodLength >= minPeriodLength)) | |
223 | 223 | then (maxPeriodLength >= periodLength) | |
224 | 224 | else false) | |
225 | 225 | then true | |
226 | 226 | else throwErr("invalid periodLength"), if ((getBoolean(keyVerified(assetId)) == unit)) | |
227 | 227 | then true | |
228 | 228 | else throwErr("already verified"), if ((getBoolean(keyVerificationInProgress(assetId)) == unit)) | |
229 | 229 | then true | |
230 | 230 | else throwErr("already in progress"), if ((wxPaymentAmount > (periodLength * feePerBlock))) | |
231 | 231 | then true | |
232 | 232 | else throwErr("not enough wx for given period"), if ((wxPaymentAmount >= getIntegerValue(keyMinWxMinForSuggestAddAmountRequired))) | |
233 | 233 | then true | |
234 | 234 | else throwErr("payment less then min for suggest")] | |
235 | 235 | if ((checks == checks)) | |
236 | 236 | then { | |
237 | 237 | let assetsStoreCreateOrUpdateInv = invoke(assetsStoreContract, "createOrUpdate", [assetId, assetImage, false], nil) | |
238 | 238 | if ((assetsStoreCreateOrUpdateInv == assetsStoreCreateOrUpdateInv)) | |
239 | 239 | then { | |
240 | 240 | let votingEndHeight = (height + periodLength) | |
241 | 241 | let finalizeCallRewardAmount = valueOrElse(getInteger(keyFinalizeCallRewardAmount), 0) | |
242 | 242 | let burnWxAmount = (wxPaymentAmount - finalizeCallRewardAmount) | |
243 | 243 | ([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) | |
244 | 244 | } | |
245 | 245 | else throw("Strict value is not equal to itself.") | |
246 | 246 | } | |
247 | 247 | else throw("Strict value is not equal to itself.") | |
248 | 248 | } | |
249 | 249 | else throw("Strict value is not equal to itself.") | |
250 | 250 | } | |
251 | 251 | ||
252 | 252 | ||
253 | 253 | ||
254 | 254 | @Callable(i) | |
255 | 255 | func suggestRemove (assetId) = { | |
256 | 256 | let gwxAmountAtNow = getUserGwxAmountAtHeight(toString(i.caller), height) | |
257 | 257 | let minSuggestRemoveBalance = getIntegerValue(keyMinSuggestRemoveBalance) | |
258 | 258 | let wxPayment = i.payments[0] | |
259 | 259 | let wxPaymentAssetId = value(wxPayment.assetId) | |
260 | 260 | let wxPaymentAmount = value(wxPayment.amount) | |
261 | 261 | let isVerified = valueOrElse(getBoolean(keyVerified(assetId)), false) | |
262 | 262 | let checks = [if (isVerified) | |
263 | 263 | then true | |
264 | 264 | else throwErr(makeString([assetId, "not verified"], " ")), if ((gwxAmountAtNow >= minSuggestRemoveBalance)) | |
265 | 265 | then true | |
266 | 266 | else throwErr("not enough gWXes"), if ((wxPaymentAmount >= getIntegerValue(keyWxForSuggestRemoveAmountRequired))) | |
267 | 267 | then true | |
268 | 268 | else throwErr("payment less then min for suggest")] | |
269 | 269 | if ((checks == checks)) | |
270 | 270 | then { | |
271 | 271 | let currentIndexKey = keyCurrentIndex(assetId) | |
272 | 272 | let currentIndex = getInteger(currentIndexKey) | |
273 | 273 | let newIndex = if (isDefined(currentIndex)) | |
274 | 274 | then (value(currentIndex) + 1) | |
275 | 275 | else 0 | |
276 | 276 | let periodLength = valueOrErrorMessage(getInteger(keyPeriodLengthRemove), wrapErr("periodLengthRemove not set")) | |
277 | 277 | let votingEndHeight = (height + periodLength) | |
278 | 278 | [IntegerEntry(currentIndexKey, newIndex), BooleanEntry(keyDeverificationInProgress(assetId), true), IntegerEntry(keyCurrentVotingHeightStart(assetId, newIndex), height), StringEntry(keySuggestIssuer(assetId, newIndex), toString(i.caller)), IntegerEntry(keyVotingEndHeight(assetId, newIndex), votingEndHeight)] | |
279 | 279 | } | |
280 | 280 | else throw("Strict value is not equal to itself.") | |
281 | 281 | } | |
282 | 282 | ||
283 | 283 | ||
284 | 284 | ||
285 | 285 | @Callable(i) | |
286 | 286 | func vote (assetId,inFavor) = { | |
287 | 287 | let currentIndexKey = keyCurrentIndex(assetId) | |
288 | 288 | let currentIndex = valueOrErrorMessage(getInteger(currentIndexKey), wrapErr("voting does not exist")) | |
289 | 289 | let votingInfo = votingExistChecks(assetId, currentIndex) | |
290 | 290 | if ((votingInfo == votingInfo)) | |
291 | 291 | then { | |
292 | 292 | let currentVotingHeightStart = votingInfo._3 | |
293 | 293 | let votingPeriodLenght = votingInfo._4 | |
294 | 294 | let gwxAmountAtEnd = getUserGwxAmountAtHeight(toString(i.caller), (currentVotingHeightStart + votingPeriodLenght)) | |
295 | 295 | let voteKey = keyVote(assetId, currentIndex, i.caller) | |
296 | 296 | let votingResultKey = keyVotingResult(assetId, currentIndex) | |
297 | 297 | let checks = [if ((getString(voteKey) == unit)) | |
298 | 298 | then true | |
299 | 299 | else throwErr("You have already voted"), if ((gwxAmountAtEnd > 0)) | |
300 | 300 | then true | |
301 | 301 | else throw("You'll not have gWX at the end of voting")] | |
302 | 302 | if ((checks == checks)) | |
303 | 303 | then { | |
304 | 304 | let lastVotingValue = valueOrElse(getString(votingResultKey), defaultVotingValue) | |
305 | 305 | let lastVotingValueParts = split(lastVotingValue, separator) | |
306 | 306 | let newVotingValue = if (inFavor) | |
307 | 307 | then votingValue((parseIntValue(lastVotingValueParts[1]) + gwxAmountAtEnd), parseIntValue(lastVotingValueParts[2])) | |
308 | 308 | else votingValue(parseIntValue(lastVotingValueParts[1]), (parseIntValue(lastVotingValueParts[2]) + gwxAmountAtEnd)) | |
309 | 309 | [StringEntry(voteKey, voteValue(inFavor, gwxAmountAtEnd)), StringEntry(votingResultKey, newVotingValue), BooleanEntry(keyVotingReward(i.caller, assetId, currentIndex), true)] | |
310 | 310 | } | |
311 | 311 | else throw("Strict value is not equal to itself.") | |
312 | 312 | } | |
313 | 313 | else throw("Strict value is not equal to itself.") | |
314 | 314 | } | |
315 | 315 | ||
316 | 316 | ||
317 | 317 | ||
318 | 318 | @Callable(i) | |
319 | 319 | func cancelVote (assetId) = { | |
320 | 320 | let currentIndexKey = keyCurrentIndex(assetId) | |
321 | 321 | let currentIndex = valueOrErrorMessage(getInteger(currentIndexKey), wrapErr("voting does not exist")) | |
322 | 322 | let voteKey = keyVote(assetId, currentIndex, i.caller) | |
323 | 323 | let votingResultKey = keyVotingResult(assetId, currentIndex) | |
324 | 324 | let lastVote = valueOrErrorMessage(getString(voteKey), wrapErr("you have not voted")) | |
325 | 325 | let lastVoteParts = split(lastVote, separator) | |
326 | 326 | let inFavor = lastVoteParts[1] | |
327 | 327 | let gwxAmount = parseIntValue(lastVoteParts[2]) | |
328 | 328 | let votingInfo = votingExistChecks(assetId, currentIndex) | |
329 | 329 | if ((votingInfo == votingInfo)) | |
330 | 330 | then { | |
331 | 331 | let checks = [if (if ((inFavor == "true")) | |
332 | 332 | then true | |
333 | 333 | else (inFavor == "false")) | |
334 | 334 | then true | |
335 | 335 | else throwErr("invalid vote")] | |
336 | 336 | if ((checks == checks)) | |
337 | 337 | then { | |
338 | 338 | let lastVotingValue = valueOrElse(getString(votingResultKey), defaultVotingValue) | |
339 | 339 | let lastVotingValueParts = split(lastVotingValue, separator) | |
340 | 340 | let newVotingResultValue = if ((inFavor == "true")) | |
341 | 341 | then votingValue((parseIntValue(lastVotingValueParts[1]) - gwxAmount), parseIntValue(lastVotingValueParts[2])) | |
342 | 342 | else votingValue(parseIntValue(lastVotingValueParts[1]), (parseIntValue(lastVotingValueParts[2]) - gwxAmount)) | |
343 | 343 | [DeleteEntry(voteKey), StringEntry(votingResultKey, newVotingResultValue), DeleteEntry(keyVotingReward(i.caller, assetId, currentIndex))] | |
344 | 344 | } | |
345 | 345 | else throw("Strict value is not equal to itself.") | |
346 | 346 | } | |
347 | 347 | else throw("Strict value is not equal to itself.") | |
348 | 348 | } | |
349 | 349 | ||
350 | 350 | ||
351 | 351 | ||
352 | 352 | @Callable(i) | |
353 | 353 | func finalize (assetId) = { | |
354 | 354 | let verificationInProgress = valueOrElse(getBoolean(keyVerificationInProgress(assetId)), false) | |
355 | 355 | let deverificationInProgress = valueOrElse(getBoolean(keyDeverificationInProgress(assetId)), false) | |
356 | 356 | let currentIndexKey = keyCurrentIndex(assetId) | |
357 | 357 | let currentIndex = valueOrElse(getInteger(currentIndexKey), 0) | |
358 | 358 | let votingThresholdAdd = valueOrErrorMessage(getInteger(keyVotingThresholdAdd), wrapErr("votingThresholdAdd not set")) | |
359 | 359 | let votingThresholdRemove = valueOrErrorMessage(getInteger(keyVotingThresholdRemove), wrapErr("votingThresholdRemove not set")) | |
360 | 360 | let $t01501215451 = if (verificationInProgress) | |
361 | 361 | then $Tuple3([DeleteEntry(keyVerificationInProgress(assetId)), BooleanEntry(keyVerified(assetId), true)], true, votingThresholdAdd) | |
362 | 362 | else $Tuple3([DeleteEntry(keyDeverificationInProgress(assetId)), DeleteEntry(keyVerified(assetId))], true, votingThresholdRemove) | |
363 | 363 | let finalizeVotingActions = $t01501215451._1 | |
364 | 364 | let verified = $t01501215451._2 | |
365 | 365 | let threshold = $t01501215451._3 | |
366 | 366 | let lastVotingValue = valueOrElse(getString(keyVotingResult(assetId, currentIndex)), defaultVotingValue) | |
367 | 367 | let lastVotingValueParts = split(lastVotingValue, separator) | |
368 | 368 | let votesFor = parseIntValue(lastVotingValueParts[1]) | |
369 | 369 | let votesAgainst = parseIntValue(lastVotingValueParts[2]) | |
370 | 370 | let votesTotal = (votesFor + votesAgainst) | |
371 | 371 | let votingEndHeight = valueOrErrorMessage(getInteger(keyVotingEndHeight(assetId, currentIndex)), wrapErr("voting end height not found")) | |
372 | 372 | let checks = [if (if (verificationInProgress) | |
373 | 373 | then true | |
374 | 374 | else deverificationInProgress) | |
375 | 375 | then true | |
376 | 376 | else throwErr("nothing to finalize"), if ((height >= votingEndHeight)) | |
377 | 377 | then true | |
378 | 378 | else throwErr("voting not finished"), if ((votesTotal >= threshold)) | |
379 | 379 | then true | |
380 | 380 | else throwErr("not enough votes")] | |
381 | 381 | if ((checks == checks)) | |
382 | 382 | then { | |
383 | 383 | let finalizeCallRewardAction = if ((votesAgainst > votesFor)) | |
384 | 384 | then { | |
385 | 385 | let setVerifiedInvoke = invoke(assetsStoreContract, "setVerified", [assetId, verified], nil) | |
386 | 386 | if ((setVerifiedInvoke == setVerifiedInvoke)) | |
387 | 387 | then { | |
388 | 388 | let finalizeCallRewardAmount = valueOrElse(getInteger(keyFinalizeCallRewardAmount), 0) | |
389 | 389 | [ScriptTransfer(i.caller, finalizeCallRewardAmount, wxAssetId)] | |
390 | 390 | } | |
391 | 391 | else throw("Strict value is not equal to itself.") | |
392 | 392 | } | |
393 | 393 | else nil | |
394 | 394 | (finalizeVotingActions ++ finalizeCallRewardAction) | |
395 | 395 | } | |
396 | 396 | else throw("Strict value is not equal to itself.") | |
397 | 397 | } | |
398 | 398 | ||
399 | 399 | ||
400 | 400 | ||
401 | 401 | @Callable(i) | |
402 | - | func claimREADONLY (assetId,index) = { | |
403 | - | let | |
402 | + | func claimREADONLY (assetId,index,userAddressStr) = { | |
403 | + | let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid address")) | |
404 | 404 | let votingRewardAssetIdStr = getString(keyVotingRewardAssetId(assetId, index)) | |
405 | 405 | let rewardAmount = if (isDefined(votingRewardAssetIdStr)) | |
406 | - | then calculateReward( | |
406 | + | then calculateReward(userAddress, assetId, index) | |
407 | 407 | else 0 | |
408 | 408 | $Tuple2(nil, rewardAmount) | |
409 | 409 | } | |
410 | 410 | ||
411 | 411 | ||
412 | 412 | ||
413 | 413 | @Callable(i) | |
414 | 414 | func claim (assetId,index) = { | |
415 | 415 | let callerAddress = i.caller | |
416 | 416 | let claimHistoryKey = keyClaimHistory(callerAddress, assetId, index) | |
417 | 417 | let claimHistory = getInteger(claimHistoryKey) | |
418 | 418 | let checks = [if ((claimHistory == unit)) | |
419 | 419 | then true | |
420 | 420 | else throwErr("already claimed")] | |
421 | 421 | if ((checks == checks)) | |
422 | 422 | then { | |
423 | 423 | let rewardAmount = if ((calculateReward(callerAddress, assetId, index) > 0)) | |
424 | 424 | then calculateReward(callerAddress, assetId, index) | |
425 | 425 | else throwErr("nothing to claim") | |
426 | 426 | let votingRewardAssetIdStr = getString(keyVotingRewardAssetId(assetId, index)) | |
427 | 427 | let rewardAction = if (isDefined(votingRewardAssetIdStr)) | |
428 | 428 | then { | |
429 | 429 | let votingRewardAssetId = fromBase58String(value(votingRewardAssetIdStr)) | |
430 | 430 | [ScriptTransfer(callerAddress, rewardAmount, votingRewardAssetId), IntegerEntry(claimHistoryKey, rewardAmount)] | |
431 | 431 | } | |
432 | 432 | else throwErr("nothing to claim") | |
433 | 433 | rewardAction | |
434 | 434 | } | |
435 | 435 | else throw("Strict value is not equal to itself.") | |
436 | 436 | } | |
437 | 437 | ||
438 | 438 | ||
439 | 439 | @Verifier(tx) | |
440 | 440 | func verify () = { | |
441 | 441 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
442 | 442 | case pk: ByteVector => | |
443 | 443 | pk | |
444 | 444 | case _: Unit => | |
445 | 445 | tx.senderPublicKey | |
446 | 446 | case _ => | |
447 | 447 | throw("Match error") | |
448 | 448 | } | |
449 | 449 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
450 | 450 | } | |
451 | 451 |
github/deemru/w8io/026f985 62.56 ms ◑