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