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