tx · 8MKav2rn1NUcv3tZgZwrCg8bSPQ92ATYwMXDyyvTPTqM 3N1Epwa6GQuTQr2K9WzeUcqSFCdERwuvL5T: -0.02300000 Waves 2022.09.12 13:15 [2225748] smart account 3N1Epwa6GQuTQr2K9WzeUcqSFCdERwuvL5T > SELF 0.00000000 Waves
{ "type": 13, "id": "8MKav2rn1NUcv3tZgZwrCg8bSPQ92ATYwMXDyyvTPTqM", "fee": 2300000, "feeAssetId": null, "timestamp": 1662977768726, "version": 1, "sender": "3N1Epwa6GQuTQr2K9WzeUcqSFCdERwuvL5T", "senderPublicKey": "7iXEgsFNsnbLZ3ca4tmz8jffnyxMu9keuBV6CuQPJLuA", "proofs": [ "3cJP6LNc4XUbit88pF5AZ8vydy7oDmxPXpfXiWqM2sqWBEB1RCQrydS1Zd7nnMVWRnMpVqpznBVGqfb9pZgErktK" ], "script": "base64:AAIFAAAAAAAAAEAIAhINCgsICAgICAgBCAEIARIDCgEBEgQKAggIEgUKAwgIBBIECgIICBIDCgEBEgMKAQESBAoCCAgSAwoBCBIAAAAAJAAAAAAJc2VwYXJhdG9yAgAAAAJfXwAAAAAMa2V5RmVlQW1vdW50CQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAADZmVlBQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAAOa2V5VXNkbkFzc2V0SWQJAAS5AAAAAgkABEwAAAACAgAAAAIlcwkABEwAAAACAgAAAAt1c2RuQXNzZXRJZAUAAAADbmlsBQAAAAlzZXBhcmF0b3IAAAAADmtleUVwb2NoTGVuZ3RoCQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAALZXBvY2hMZW5ndGgFAAAAA25pbAUAAAAJc2VwYXJhdG9yAAAAABFrZXlGaW5hbGl6ZVJld2FyZAkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAAAICAAAADmZpbmFsaXplUmV3YXJkBQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAAMa2V5V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AgUAAAAHY2hlY2tQTQUAAAAHY2hlY2tQTQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAATa2V5TWFuYWdlclB1YmxpY0tleQAAAAAJAAJYAAAAAQkBAAAABXZhbHVlAAAAAQUAAAACcG0JAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkBAAAAGmtleVBlbmRpbmdNYW5hZ2VyUHVibGljS2V5AAAAAAUAAAADbmlsCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAA90YXJnZXRQdWJsaWNLZXkEAAAAByRtYXRjaDAJAQAAABZtYW5hZ2VyUHVibGljS2V5T3JVbml0AAAAAAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAKQnl0ZVZlY3RvcgQAAAACcGsFAAAAByRtYXRjaDAFAAAAAnBrAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAARVbml0CAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5CQAAAgAAAAECAAAAC01hdGNoIGVycm9yCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAPdGFyZ2V0UHVibGljS2V5ojZuIA==", "chainId": 84, "height": 2225748, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8y85ZrncL4p65aih76BGhm1LVsVxLm514RftSrs6Q1rT Next: 8PNFMSFik4u3es5veAJi7nZdGpmqVvDmWR7C4TaGgmga Diff:
Old | New | Differences | |
---|---|---|---|
185 | 185 | then true | |
186 | 186 | else throw("invalid fee asset"), if ((payment.amount == value(getInteger(keyFeeAmount)))) | |
187 | 187 | then true | |
188 | - | else throw("invalid fee amount"), if (if (isManager(i)) | |
189 | - | then true | |
190 | - | else (priceAssetId == value(getString(keyUsdnAssetId)))) | |
191 | - | then true | |
192 | - | else throw("priceAssetId is not USDN"), if ((getInteger(keyInListAssetId(amountAssetId, priceAssetId)) == unit)) | |
188 | + | else throw("invalid fee amount"), if ((getInteger(keyInListAssetId(amountAssetId, priceAssetId)) == unit)) | |
193 | 189 | then true | |
194 | 190 | else throw("already in voting list"), if (!(valueOrElse(getBoolean(votingEmissionContract, keyInList(pool)), false))) | |
195 | 191 | then true |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "__" | |
5 | 5 | ||
6 | 6 | let keyFeeAmount = makeString(["%s", "fee"], separator) | |
7 | 7 | ||
8 | 8 | let keyUsdnAssetId = makeString(["%s", "usdnAssetId"], separator) | |
9 | 9 | ||
10 | 10 | let keyEpochLength = makeString(["%s", "epochLength"], separator) | |
11 | 11 | ||
12 | 12 | let keyFinalizeReward = makeString(["%s", "finalizeReward"], separator) | |
13 | 13 | ||
14 | 14 | let keyWxAssetId = makeString(["%s", "wxAssetId"], separator) | |
15 | 15 | ||
16 | 16 | let keyAssetsStoreContract = makeString(["%s", "assetsStoreContract"], separator) | |
17 | 17 | ||
18 | 18 | let keyUserPoolContract = makeString(["%s", "userPoolContract"], separator) | |
19 | 19 | ||
20 | 20 | let keyEmissionContract = makeString(["%s", "emissionContract"], separator) | |
21 | 21 | ||
22 | 22 | let keyBoostingContract = makeString(["%s", "boostingContract"], separator) | |
23 | 23 | ||
24 | 24 | let keyFactoryContract = makeString(["%s", "factoryContract"], separator) | |
25 | 25 | ||
26 | 26 | let keyVotingEmissionContract = makeString(["%s", "votingEmissionContract"], separator) | |
27 | 27 | ||
28 | 28 | let keyThreshold = makeString(["%s", "votingThreshold"], separator) | |
29 | 29 | ||
30 | 30 | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined")) | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), (key + " is not defined")) | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func keyInListAssetId (amountAssetId,priceAssetId) = makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator) | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func keySuggestIndex (amountAssetId,priceAssetId) = makeString(["%s%s%s", "suggestIndex", amountAssetId, priceAssetId], separator) | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func keyStartHeight (amountAssetId,priceAssetId,suggestIndex) = makeString(["%s%s%s%d", "startHeight", amountAssetId, priceAssetId, toString(suggestIndex)], separator) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func keyVotingResult (amountAssetId,priceAssetId,suggestIndex) = makeString(["%s%s%s%d", "votingResult", amountAssetId, priceAssetId, toString(suggestIndex)], separator) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func totalVotes (totalYes,totalNo) = makeString(["%d%d", totalYes, totalNo], separator) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func keyVote (amountAssetId,priceAssetId,suggestIndex,voterAddress) = makeString(["%s%s%s%d%s", "vote", amountAssetId, priceAssetId, toString(suggestIndex), voterAddress], separator) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func keyVoteValue (gwxAmount,vote) = { | |
55 | 55 | let key = if (vote) | |
56 | 56 | then makeString(["%d%s", gwxAmount, "yes"], separator) | |
57 | 57 | else makeString(["%d%s", gwxAmount, "no"], separator) | |
58 | 58 | key | |
59 | 59 | } | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func keyInList (pool) = { | |
63 | 63 | let $t024632503 = pool | |
64 | 64 | let amountAssetId = $t024632503._1 | |
65 | 65 | let priceAssetId = $t024632503._2 | |
66 | 66 | makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator) | |
67 | 67 | } | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | let assetsStoreContract = addressFromStringValue(getStringOrFail(keyAssetsStoreContract)) | |
77 | 77 | ||
78 | 78 | let boostingContract = addressFromStringValue(getStringOrFail(keyBoostingContract)) | |
79 | 79 | ||
80 | 80 | let emissionContract = addressFromStringValue(getStringOrFail(keyEmissionContract)) | |
81 | 81 | ||
82 | 82 | let factoryContract = addressFromStringValue(getStringOrFail(keyFactoryContract)) | |
83 | 83 | ||
84 | 84 | let userPoolContract = addressFromStringValue(getStringOrFail(keyUserPoolContract)) | |
85 | 85 | ||
86 | 86 | let votingEmissionContract = addressFromStringValue(getStringOrFail(keyVotingEmissionContract)) | |
87 | 87 | ||
88 | 88 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
89 | 89 | case s: String => | |
90 | 90 | fromBase58String(s) | |
91 | 91 | case _: Unit => | |
92 | 92 | unit | |
93 | 93 | case _ => | |
94 | 94 | throw("Match error") | |
95 | 95 | } | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
99 | 99 | case s: String => | |
100 | 100 | fromBase58String(s) | |
101 | 101 | case _: Unit => | |
102 | 102 | unit | |
103 | 103 | case _ => | |
104 | 104 | throw("Match error") | |
105 | 105 | } | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func isManager (i) = match managerPublicKeyOrUnit() { | |
109 | 109 | case pk: ByteVector => | |
110 | 110 | (i.callerPublicKey == pk) | |
111 | 111 | case _: Unit => | |
112 | 112 | (i.caller == this) | |
113 | 113 | case _ => | |
114 | 114 | throw("Match error") | |
115 | 115 | } | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func mustManager (i) = if (isManager(i)) | |
119 | 119 | then true | |
120 | 120 | else throw("permission denied") | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func asInt (val) = match val { | |
124 | 124 | case valInt: Int => | |
125 | 125 | valInt | |
126 | 126 | case _ => | |
127 | 127 | throw("failed to cast into Integer") | |
128 | 128 | } | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | @Callable(i) | |
132 | 132 | func constructor (assetsStoreContractPrm,boostingContractPrm,emissionContractPrm,factoryContractPrm,userPoolContractPrm,votingEmissionContractPrm,feeAmountPrm,wxAssetIdPrm,votingDurationPrm,usdnAssetIdPrm,finalizeRewardPrm) = { | |
133 | 133 | let checks = [mustManager(i), if (isDefined(addressFromString(assetsStoreContractPrm))) | |
134 | 134 | then true | |
135 | 135 | else throw("Invalid asset_store contract address"), if (isDefined(addressFromString(boostingContractPrm))) | |
136 | 136 | then true | |
137 | 137 | else throw("Invalid boosting contract address"), if (isDefined(addressFromString(userPoolContractPrm))) | |
138 | 138 | then true | |
139 | 139 | else throw("Invalid user_pools contract address"), if (isDefined(addressFromString(emissionContractPrm))) | |
140 | 140 | then true | |
141 | 141 | else throw("Invalid emission contract address"), if (isDefined(addressFromString(factoryContractPrm))) | |
142 | 142 | then true | |
143 | 143 | else throw("Invalid factory contract address"), if ((feeAmountPrm >= 0)) | |
144 | 144 | then true | |
145 | 145 | else throw("Invalid fee amount"), if ((votingDurationPrm > 0)) | |
146 | 146 | then true | |
147 | 147 | else throw("Invalid voting duration"), if ((finalizeRewardPrm >= 0)) | |
148 | 148 | then true | |
149 | 149 | else throw("Invalid finalize reward"), if (isDefined(assetInfo(fromBase58String(wxAssetIdPrm)))) | |
150 | 150 | then true | |
151 | 151 | else throw("Invalid WX asset ID"), if (isDefined(assetInfo(fromBase58String(usdnAssetIdPrm)))) | |
152 | 152 | then true | |
153 | 153 | else throw("Invalid USDN asset ID")] | |
154 | 154 | if ((checks == checks)) | |
155 | 155 | then $Tuple2([StringEntry(keyAssetsStoreContract, assetsStoreContractPrm), StringEntry(keyBoostingContract, boostingContractPrm), StringEntry(keyEmissionContract, emissionContractPrm), StringEntry(keyFactoryContract, factoryContractPrm), StringEntry(keyUserPoolContract, userPoolContractPrm), StringEntry(keyVotingEmissionContract, votingEmissionContractPrm), IntegerEntry(keyFeeAmount, feeAmountPrm), IntegerEntry(keyEpochLength, votingDurationPrm), IntegerEntry(keyFinalizeReward, finalizeRewardPrm), StringEntry(keyWxAssetId, wxAssetIdPrm), StringEntry(keyUsdnAssetId, usdnAssetIdPrm)], unit) | |
156 | 156 | else throw("Strict value is not equal to itself.") | |
157 | 157 | } | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | ||
161 | 161 | @Callable(i) | |
162 | 162 | func constructorV2 (threshold) = { | |
163 | 163 | let checks = [mustManager(i), if ((threshold > 0)) | |
164 | 164 | then true | |
165 | 165 | else throw("invalid threshold")] | |
166 | 166 | if ((checks == checks)) | |
167 | 167 | then $Tuple2([IntegerEntry(keyThreshold, threshold)], unit) | |
168 | 168 | else throw("Strict value is not equal to itself.") | |
169 | 169 | } | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | ||
173 | 173 | @Callable(i) | |
174 | 174 | func suggest (amountAssetId,priceAssetId) = { | |
175 | 175 | let pool = $Tuple2(amountAssetId, priceAssetId) | |
176 | 176 | let payment = value(i.payments[0]) | |
177 | 177 | let info = valueOrErrorMessage(assetInfo(fromBase58String(amountAssetId)), "invalid amountAssetId ID") | |
178 | 178 | let checks = [if (if (isManager(i)) | |
179 | 179 | then true | |
180 | 180 | else (info.issuer == i.caller)) | |
181 | 181 | then true | |
182 | 182 | else throw("asset can only be suggested by its issuer"), if ((info.scripted == false)) | |
183 | 183 | then true | |
184 | 184 | else throw("asset is smart"), if ((toBase58String(value(payment.assetId)) == value(getString(keyWxAssetId)))) | |
185 | 185 | then true | |
186 | 186 | else throw("invalid fee asset"), if ((payment.amount == value(getInteger(keyFeeAmount)))) | |
187 | 187 | then true | |
188 | - | else throw("invalid fee amount"), if (if (isManager(i)) | |
189 | - | then true | |
190 | - | else (priceAssetId == value(getString(keyUsdnAssetId)))) | |
191 | - | then true | |
192 | - | else throw("priceAssetId is not USDN"), if ((getInteger(keyInListAssetId(amountAssetId, priceAssetId)) == unit)) | |
188 | + | else throw("invalid fee amount"), if ((getInteger(keyInListAssetId(amountAssetId, priceAssetId)) == unit)) | |
193 | 189 | then true | |
194 | 190 | else throw("already in voting list"), if (!(valueOrElse(getBoolean(votingEmissionContract, keyInList(pool)), false))) | |
195 | 191 | then true | |
196 | 192 | else throw("pool is in emission voting list")] | |
197 | 193 | if ((checks == checks)) | |
198 | 194 | then { | |
199 | 195 | let ensureActive = match invoke(userPoolContract, "statusREADONLY", [amountAssetId, priceAssetId], nil) { | |
200 | 196 | case s: String => | |
201 | 197 | if ((s == "active")) | |
202 | 198 | then true | |
203 | 199 | else throw("user pool is not active") | |
204 | 200 | case _ => | |
205 | 201 | throw("user pool is not active") | |
206 | 202 | } | |
207 | 203 | if ((ensureActive == ensureActive)) | |
208 | 204 | then { | |
209 | 205 | let ensureAmountAssetVerified = if (isManager(i)) | |
210 | 206 | then unit | |
211 | 207 | else { | |
212 | 208 | let inv = match invoke(assetsStoreContract, "isVerifiedREADONLY", [amountAssetId], nil) { | |
213 | 209 | case b: Boolean => | |
214 | 210 | if (b) | |
215 | 211 | then true | |
216 | 212 | else throw("asset is not verified") | |
217 | 213 | case _ => | |
218 | 214 | throw("asset is not verified") | |
219 | 215 | } | |
220 | 216 | if ((inv == inv)) | |
221 | 217 | then unit | |
222 | 218 | else throw("Strict value is not equal to itself.") | |
223 | 219 | } | |
224 | 220 | if ((ensureAmountAssetVerified == ensureAmountAssetVerified)) | |
225 | 221 | then { | |
226 | 222 | let burnFeeInv = invoke(emissionContract, "burn", nil, [AttachedPayment(payment.assetId, payment.amount)]) | |
227 | 223 | if ((burnFeeInv == burnFeeInv)) | |
228 | 224 | then { | |
229 | 225 | let newSuggestIndex = match getInteger(keySuggestIndex(amountAssetId, priceAssetId)) { | |
230 | 226 | case int: Int => | |
231 | 227 | (int + 1) | |
232 | 228 | case _ => | |
233 | 229 | 0 | |
234 | 230 | } | |
235 | 231 | $Tuple2([IntegerEntry(keyInListAssetId(amountAssetId, priceAssetId), newSuggestIndex), IntegerEntry(keyStartHeight(amountAssetId, priceAssetId, newSuggestIndex), height), StringEntry(keyVotingResult(amountAssetId, priceAssetId, newSuggestIndex), totalVotes("0", "0")), IntegerEntry(keySuggestIndex(amountAssetId, priceAssetId), newSuggestIndex)], unit) | |
236 | 232 | } | |
237 | 233 | else throw("Strict value is not equal to itself.") | |
238 | 234 | } | |
239 | 235 | else throw("Strict value is not equal to itself.") | |
240 | 236 | } | |
241 | 237 | else throw("Strict value is not equal to itself.") | |
242 | 238 | } | |
243 | 239 | else throw("Strict value is not equal to itself.") | |
244 | 240 | } | |
245 | 241 | ||
246 | 242 | ||
247 | 243 | ||
248 | 244 | @Callable(i) | |
249 | 245 | func vote (amountAssetId,priceAssetId,inFavor) = { | |
250 | 246 | let suggestIndex = value(getInteger(keyInListAssetId(amountAssetId, priceAssetId))) | |
251 | 247 | let votingFinishHeight = (value(getInteger(keyStartHeight(amountAssetId, priceAssetId, suggestIndex))) + value(getInteger(keyEpochLength))) | |
252 | 248 | let checks = [if (isDefined(getInteger(keyInListAssetId(amountAssetId, priceAssetId)))) | |
253 | 249 | then true | |
254 | 250 | else throw("the token isn't on the voting list"), if ((votingFinishHeight > height)) | |
255 | 251 | then true | |
256 | 252 | else throw("too late to vote")] | |
257 | 253 | if ((checks == checks)) | |
258 | 254 | then { | |
259 | 255 | let gwxAmount = invoke(boostingContract, "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), votingFinishHeight], nil) | |
260 | 256 | let notZero = if ((asInt(gwxAmount) > 0)) | |
261 | 257 | then true | |
262 | 258 | else throw("you don't have gwx") | |
263 | 259 | if ((notZero == notZero)) | |
264 | 260 | then { | |
265 | 261 | let vote = match getString(keyVote(amountAssetId, priceAssetId, suggestIndex, toString(i.caller))) { | |
266 | 262 | case s: String => | |
267 | 263 | let vote = split(s, separator) | |
268 | 264 | let voteValue = vote[1] | |
269 | 265 | let voteType = vote[2] | |
270 | 266 | let isVoteTypeSimilar = if (if ((voteType == "yes")) | |
271 | 267 | then (inFavor == true) | |
272 | 268 | else false) | |
273 | 269 | then true | |
274 | 270 | else if ((voteType == "no")) | |
275 | 271 | then (inFavor == false) | |
276 | 272 | else false | |
277 | 273 | let isVoteValueSimilar = if (isVoteTypeSimilar) | |
278 | 274 | then (asInt(gwxAmount) == parseIntValue(voteValue)) | |
279 | 275 | else false | |
280 | 276 | let isNewVoteSimilar = if (if (isVoteTypeSimilar) | |
281 | 277 | then isVoteValueSimilar | |
282 | 278 | else false) | |
283 | 279 | then throw("you already voted") | |
284 | 280 | else invoke(this, "cancelVote", [amountAssetId, priceAssetId], nil) | |
285 | 281 | isNewVoteSimilar | |
286 | 282 | case u: Unit => | |
287 | 283 | u | |
288 | 284 | case _ => | |
289 | 285 | throw("Match error") | |
290 | 286 | } | |
291 | 287 | if ((vote == vote)) | |
292 | 288 | then { | |
293 | 289 | let votingResult = split(value(getString(keyVotingResult(amountAssetId, priceAssetId, suggestIndex))), separator) | |
294 | 290 | let positiveVotes = votingResult[1] | |
295 | 291 | let negativeVotes = votingResult[2] | |
296 | 292 | let newPositiveAndNegativeVotes = if (inFavor) | |
297 | 293 | then { | |
298 | 294 | let newPositiveVotes = (parseIntValue(positiveVotes) + asInt(gwxAmount)) | |
299 | 295 | [toString(newPositiveVotes), negativeVotes] | |
300 | 296 | } | |
301 | 297 | else { | |
302 | 298 | let newNegativeVotes = (parseIntValue(negativeVotes) + asInt(gwxAmount)) | |
303 | 299 | [positiveVotes, toString(newNegativeVotes)] | |
304 | 300 | } | |
305 | 301 | let voteKey = keyVote(amountAssetId, priceAssetId, suggestIndex, toString(i.caller)) | |
306 | 302 | let voteValue = keyVoteValue(toString(asInt(gwxAmount)), inFavor) | |
307 | 303 | $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId, suggestIndex), totalVotes(newPositiveAndNegativeVotes[0], newPositiveAndNegativeVotes[1])), StringEntry(voteKey, voteValue)], unit) | |
308 | 304 | } | |
309 | 305 | else throw("Strict value is not equal to itself.") | |
310 | 306 | } | |
311 | 307 | else throw("Strict value is not equal to itself.") | |
312 | 308 | } | |
313 | 309 | else throw("Strict value is not equal to itself.") | |
314 | 310 | } | |
315 | 311 | ||
316 | 312 | ||
317 | 313 | ||
318 | 314 | @Callable(i) | |
319 | 315 | func cancelVote (amountAssetId,priceAssetId) = { | |
320 | 316 | let userAddress = if ((i.caller == this)) | |
321 | 317 | then toString(i.originCaller) | |
322 | 318 | else toString(i.caller) | |
323 | 319 | let suggestIndex = value(getInteger(keyInListAssetId(amountAssetId, priceAssetId))) | |
324 | 320 | let checks = [if (isDefined(getString(keyVotingResult(amountAssetId, priceAssetId, suggestIndex)))) | |
325 | 321 | then true | |
326 | 322 | else throw("no vote for assets pair")] | |
327 | 323 | if ((checks == checks)) | |
328 | 324 | then { | |
329 | 325 | let vote = split(value(getString(keyVote(amountAssetId, priceAssetId, suggestIndex, userAddress))), separator) | |
330 | 326 | let voteValue = vote[1] | |
331 | 327 | let voteType = vote[2] | |
332 | 328 | let votingResult = split(value(getString(keyVotingResult(amountAssetId, priceAssetId, suggestIndex))), separator) | |
333 | 329 | let positiveVotes = votingResult[1] | |
334 | 330 | let negativeVotes = votingResult[2] | |
335 | 331 | let actions = if ((voteType == "yes")) | |
336 | 332 | then { | |
337 | 333 | let newPositiveVotes = (parseIntValue(positiveVotes) - parseIntValue(voteValue)) | |
338 | 334 | $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId, suggestIndex), totalVotes(toString(newPositiveVotes), negativeVotes)), DeleteEntry(keyVote(amountAssetId, priceAssetId, suggestIndex, userAddress))], unit) | |
339 | 335 | } | |
340 | 336 | else { | |
341 | 337 | let newNegativeVotes = (parseIntValue(negativeVotes) - parseIntValue(voteValue)) | |
342 | 338 | $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId, suggestIndex), totalVotes(positiveVotes, toString(newNegativeVotes))), DeleteEntry(keyVote(amountAssetId, priceAssetId, suggestIndex, userAddress))], unit) | |
343 | 339 | } | |
344 | 340 | actions | |
345 | 341 | } | |
346 | 342 | else throw("Strict value is not equal to itself.") | |
347 | 343 | } | |
348 | 344 | ||
349 | 345 | ||
350 | 346 | ||
351 | 347 | @Callable(i) | |
352 | 348 | func setFee (newFee) = { | |
353 | 349 | let checks = [mustManager(i)] | |
354 | 350 | if ((checks == checks)) | |
355 | 351 | then [IntegerEntry(keyFeeAmount, newFee)] | |
356 | 352 | else throw("Strict value is not equal to itself.") | |
357 | 353 | } | |
358 | 354 | ||
359 | 355 | ||
360 | 356 | ||
361 | 357 | @Callable(i) | |
362 | 358 | func setThreshold (newThreshold) = { | |
363 | 359 | let checks = [mustManager(i), if ((newThreshold > 0)) | |
364 | 360 | then true | |
365 | 361 | else throw("invalid threshold")] | |
366 | 362 | if ((checks == checks)) | |
367 | 363 | then $Tuple2([IntegerEntry(keyThreshold, newThreshold)], unit) | |
368 | 364 | else throw("Strict value is not equal to itself.") | |
369 | 365 | } | |
370 | 366 | ||
371 | 367 | ||
372 | 368 | ||
373 | 369 | @Callable(i) | |
374 | 370 | func finalize (amountAssetId,priceAssetId) = { | |
375 | 371 | let suggestIndex = value(getInteger(keyInListAssetId(amountAssetId, priceAssetId))) | |
376 | 372 | let votingFinishHeight = (value(getInteger(keyStartHeight(amountAssetId, priceAssetId, suggestIndex))) + value(getInteger(keyEpochLength))) | |
377 | 373 | let checks = [if (isDefined(getInteger(keyInListAssetId(amountAssetId, priceAssetId)))) | |
378 | 374 | then true | |
379 | 375 | else throw("no assets pair"), if ((height >= votingFinishHeight)) | |
380 | 376 | then true | |
381 | 377 | else throw("insufficient height for completion")] | |
382 | 378 | if ((checks == checks)) | |
383 | 379 | then { | |
384 | 380 | let votingResult = split(value(getString(keyVotingResult(amountAssetId, priceAssetId, suggestIndex))), separator) | |
385 | 381 | let positiveVotes = parseIntValue(votingResult[1]) | |
386 | 382 | let negativeVotes = parseIntValue(votingResult[2]) | |
387 | 383 | let allVotes = (positiveVotes + negativeVotes) | |
388 | 384 | let threshold = getIntOrFail(keyThreshold) | |
389 | 385 | let actions = if (if ((allVotes >= threshold)) | |
390 | 386 | then (positiveVotes > negativeVotes) | |
391 | 387 | else false) | |
392 | 388 | then { | |
393 | 389 | let res = invoke(factoryContract, "setWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil) | |
394 | 390 | if ((res == res)) | |
395 | 391 | then { | |
396 | 392 | let votingEmissionInv = invoke(votingEmissionContract, "create", [amountAssetId, priceAssetId], nil) | |
397 | 393 | if ((votingEmissionInv == votingEmissionInv)) | |
398 | 394 | then $Tuple2([DeleteEntry(keyInListAssetId(amountAssetId, priceAssetId))], unit) | |
399 | 395 | else throw("Strict value is not equal to itself.") | |
400 | 396 | } | |
401 | 397 | else throw("Strict value is not equal to itself.") | |
402 | 398 | } | |
403 | 399 | else $Tuple2([DeleteEntry(keyInListAssetId(amountAssetId, priceAssetId))], unit) | |
404 | 400 | actions | |
405 | 401 | } | |
406 | 402 | else throw("Strict value is not equal to itself.") | |
407 | 403 | } | |
408 | 404 | ||
409 | 405 | ||
410 | 406 | ||
411 | 407 | @Callable(i) | |
412 | 408 | func setManager (pendingManagerPublicKey) = { | |
413 | 409 | let checkCaller = mustManager(i) | |
414 | 410 | if ((checkCaller == checkCaller)) | |
415 | 411 | then { | |
416 | 412 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
417 | 413 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
418 | 414 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
419 | 415 | else throw("Strict value is not equal to itself.") | |
420 | 416 | } | |
421 | 417 | else throw("Strict value is not equal to itself.") | |
422 | 418 | } | |
423 | 419 | ||
424 | 420 | ||
425 | 421 | ||
426 | 422 | @Callable(i) | |
427 | 423 | func confirmManager () = { | |
428 | 424 | let pm = pendingManagerPublicKeyOrUnit() | |
429 | 425 | let hasPM = if (isDefined(pm)) | |
430 | 426 | then true | |
431 | 427 | else throw("no pending manager") | |
432 | 428 | if ((hasPM == hasPM)) | |
433 | 429 | then { | |
434 | 430 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
435 | 431 | then true | |
436 | 432 | else throw("you are not pending manager") | |
437 | 433 | if ((checkPM == checkPM)) | |
438 | 434 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
439 | 435 | else throw("Strict value is not equal to itself.") | |
440 | 436 | } | |
441 | 437 | else throw("Strict value is not equal to itself.") | |
442 | 438 | } | |
443 | 439 | ||
444 | 440 | ||
445 | 441 | @Verifier(tx) | |
446 | 442 | func verify () = { | |
447 | 443 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
448 | 444 | case pk: ByteVector => | |
449 | 445 | pk | |
450 | 446 | case _: Unit => | |
451 | 447 | tx.senderPublicKey | |
452 | 448 | case _ => | |
453 | 449 | throw("Match error") | |
454 | 450 | } | |
455 | 451 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
456 | 452 | } | |
457 | 453 |
github/deemru/w8io/026f985 52.95 ms ◑