tx · Hcb2NQsvWn5HWzuRASG7VaqGpEKtAvtJvqyAgA3w8yjy 3N1BEXuoepNEwqkbeZYKviaLQfvBQV3ibYE: -0.02100000 Waves 2023.06.02 16:20 [2605117] smart account 3N1BEXuoepNEwqkbeZYKviaLQfvBQV3ibYE > SELF 0.00000000 Waves
{ "type": 13, "id": "Hcb2NQsvWn5HWzuRASG7VaqGpEKtAvtJvqyAgA3w8yjy", "fee": 2100000, "feeAssetId": null, "timestamp": 1685712041590, "version": 2, "chainId": 84, "sender": "3N1BEXuoepNEwqkbeZYKviaLQfvBQV3ibYE", "senderPublicKey": "6t3vrhP1jCmG7CeKBmL8hUibtdP3cMXGC2XtPYEPPC5w", "proofs": [ "4qT4XgARwPZPXvyZTbDggEC8475CqGcAz39HyLEARELiNPHt9Zu8gUWpDxdgegz7ch9eg7n6PTdstong7ePyAEdb" ], "script": "base64:BgIqCAISBQoDCAEIEgMKAQgSBAoCCAQSAwoBCBIDCgEIEgQKAggBEgQKAggBNQAJc2VwYXJhdG9yAgJfXwAFTVVMVDgAgMLXLwEHd3JhcEVycgEDbXNnCQC5CQIJAMwIAgIYdm90aW5nX3ZlcmlmaWVkX3YyLnJpZGU6CQDMCAIFA21zZwUDbmlsAgEgAQh0aHJvd0VycgEDbXNnCQACAQkBB3dyYXBFcnIBBQNtc2cBBWFzSW50AQN2YWwEByRtYXRjaDAFA3ZhbAMJAAECBQckbWF0Y2gwAgNJbnQEBnZhbEludAUHJG1hdGNoMAUGdmFsSW50CQACAQIbRmFpbGVkIHRvIGNhc3QgaW50byBJbnRlZ2VyARBnZXRJbnRlZ2VyT3JaZXJvAgdhZGRyZXNzA2tleQkBC3ZhbHVlT3JFbHNlAgkAmggCBQdhZGRyZXNzBQNrZXkAAAEQZ2V0SW50ZWdlck9yRmFpbAIHYWRkcmVzcwNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAmggCBQdhZGRyZXNzBQNrZXkJAQd3cmFwRXJyAQkArAICBQNrZXkCD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GluZ1Jld2FyZEFzc2V0SWQJAMwIAgkBDEludGVnZXJFbnRyeQIFD2NsYWltSGlzdG9yeUtleQUMcmV3YXJkQW1vdW50BQNuaWwJAQh0aHJvd0VycgECEG5vdGhpbmcgdG8gY2xhaW0FDHJld2FyZEFjdGlvbgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAED3RhcmdldFB1YmxpY0tleQQHJG1hdGNoMAkBFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEAnBrBQckbWF0Y2gwBQJwawMJAAECBQckbWF0Y2gwAgRVbml0CAUCdHgPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFD3RhcmdldFB1YmxpY0tleZtvPxI=", "height": 2605117, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5sBtdFLYPfixMZ2Y4UB5CSPpDvH5hypwro9AtRBeCbbp Next: 8Pfv3ze8PfRA7ShnNi5oSAMpmowyp7Ke8QP2jPMHWfig Diff:
Old | New | Differences | |
---|---|---|---|
77 | 77 | func keyVotingRewardAssetId (assetId,index) = makeString(["%s%s%d", "votingRewardAssetId", assetId, toString(index)], separator) | |
78 | 78 | ||
79 | 79 | ||
80 | + | func keyVotingReward (userAddress,assetId,index) = makeString(["%s%s%s%d", "votingReward", toString(userAddress), assetId, toString(index)], separator) | |
81 | + | ||
82 | + | ||
80 | 83 | func keyTotalVotingReward (assetId,index) = makeString(["%s%s%d", "votingReward", assetId, toString(index)], separator) | |
81 | 84 | ||
82 | 85 | ||
105 | 108 | ||
106 | 109 | ||
107 | 110 | func keyClaimHistory (userAddress,assetId,index) = makeString(["%s%s%s%d", "history", toString(userAddress), assetId, toString(index)], separator) | |
108 | - | ||
109 | - | ||
110 | - | func claimHistoryValue (gwxAmount) = makeString(["%d%s", toString(gwxAmount)], separator) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func keyVotingEndHeight (assetId,index) = makeString(["%s%s%d", "votingEndHeight", assetId, toString(index)], 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 | - | [StringEntry(voteKey, voteValue(inFavor, gwxAmountAtEnd)), StringEntry(votingResultKey, newVotingValue)] | |
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 | } | |
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 | - | [DeleteEntry(voteKey), StringEntry(votingResultKey, newVotingResultValue)] | |
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 | } | |
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 | - | let $ | |
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 | - | let finalizeVotingActions = $ | |
364 | - | let verified = $ | |
365 | - | let threshold = $ | |
363 | + | let finalizeVotingActions = $t01501215451._1 | |
364 | + | let verified = $t01501215451._2 | |
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]) | |
414 | 414 | func claim (assetId,index) = { | |
415 | 415 | let callerAddress = i.caller | |
416 | 416 | let claimHistoryKey = keyClaimHistory(callerAddress, assetId, index) | |
417 | - | let claimHistory = | |
417 | + | let claimHistory = getInteger(claimHistoryKey) | |
418 | 418 | let checks = [if ((claimHistory == unit)) | |
419 | 419 | then true | |
420 | 420 | else throwErr("already claimed")] | |
427 | 427 | let rewardAction = if (isDefined(votingRewardAssetIdStr)) | |
428 | 428 | then { | |
429 | 429 | let votingRewardAssetId = fromBase58String(value(votingRewardAssetIdStr)) | |
430 | - | [ScriptTransfer(callerAddress, rewardAmount, votingRewardAssetId), | |
430 | + | [ScriptTransfer(callerAddress, rewardAmount, votingRewardAssetId), IntegerEntry(claimHistoryKey, rewardAmount)] | |
431 | 431 | } | |
432 | 432 | else throwErr("nothing to claim") | |
433 | 433 | rewardAction |
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 | + | func keyVotingReward (userAddress,assetId,index) = makeString(["%s%s%s%d", "votingReward", toString(userAddress), assetId, toString(index)], separator) | |
81 | + | ||
82 | + | ||
80 | 83 | func keyTotalVotingReward (assetId,index) = makeString(["%s%s%d", "votingReward", assetId, toString(index)], separator) | |
81 | 84 | ||
82 | 85 | ||
83 | 86 | let keyFinalizeCallRewardAmount = makeString(["%s", "finalizeCallRewardAmount"], separator) | |
84 | 87 | ||
85 | 88 | let keyMinSuggestRemoveBalance = makeString(["%s", "minSuggestRemoveBalance"], separator) | |
86 | 89 | ||
87 | 90 | func keyCurrentIndex (assetId) = makeString(["%s%s", "currentIndex", assetId], separator) | |
88 | 91 | ||
89 | 92 | ||
90 | 93 | func keyVote (assetId,index,caller) = makeString(["%s%s%d%s", "vote", assetId, toString(index), toString(caller)], separator) | |
91 | 94 | ||
92 | 95 | ||
93 | 96 | func voteValue (inFavor,gwxAmount) = makeString(["%s%d", toString(inFavor), toString(gwxAmount)], separator) | |
94 | 97 | ||
95 | 98 | ||
96 | 99 | func keyVotingResult (assetId,index) = makeString(["%s%s%d", "votingResult", assetId, toString(index)], separator) | |
97 | 100 | ||
98 | 101 | ||
99 | 102 | func votingValue (forAmount,againstAmount) = makeString(["%d%d", toString(forAmount), toString(againstAmount)], separator) | |
100 | 103 | ||
101 | 104 | ||
102 | 105 | let defaultVotingValue = makeString(["%d%d", "0", "0"], separator) | |
103 | 106 | ||
104 | 107 | func keySuggestIssuer (assetId,index) = makeString(["%s%s%d", "suggestIssuer", assetId, toString(index)], separator) | |
105 | 108 | ||
106 | 109 | ||
107 | 110 | func keyClaimHistory (userAddress,assetId,index) = makeString(["%s%s%s%d", "history", toString(userAddress), assetId, toString(index)], separator) | |
108 | - | ||
109 | - | ||
110 | - | func claimHistoryValue (gwxAmount) = makeString(["%d%s", toString(gwxAmount)], 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 | - | [StringEntry(voteKey, voteValue(inFavor, gwxAmountAtEnd)), StringEntry(votingResultKey, newVotingValue)] | |
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 | - | [DeleteEntry(voteKey), StringEntry(votingResultKey, newVotingResultValue)] | |
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 | - | let $ | |
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 | - | let finalizeVotingActions = $ | |
364 | - | let verified = $ | |
365 | - | let threshold = $ | |
363 | + | let finalizeVotingActions = $t01501215451._1 | |
364 | + | let verified = $t01501215451._2 | |
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 | 402 | func claimREADONLY (assetId,index) = { | |
403 | 403 | let callerAddress = i.caller | |
404 | 404 | let votingRewardAssetIdStr = getString(keyVotingRewardAssetId(assetId, index)) | |
405 | 405 | let rewardAmount = if (isDefined(votingRewardAssetIdStr)) | |
406 | 406 | then calculateReward(callerAddress, 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 | - | let claimHistory = | |
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 | - | [ScriptTransfer(callerAddress, rewardAmount, votingRewardAssetId), | |
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/169f3d6 56.55 ms ◑