tx · J5xk3tv5ZG3ejqi8Nb7LUtAzqNrUxLQh2U7ek9ud6Pa3 3Mp3nG9T5fKGziHW8mcCqx3jMFx3towh3WA: -0.02200000 Waves 2023.02.22 16:30 [2460915] smart account 3Mp3nG9T5fKGziHW8mcCqx3jMFx3towh3WA > SELF 0.00000000 Waves
{ "type": 13, "id": "J5xk3tv5ZG3ejqi8Nb7LUtAzqNrUxLQh2U7ek9ud6Pa3", "fee": 2200000, "feeAssetId": null, "timestamp": 1677072632295, "version": 2, "chainId": 84, "sender": "3Mp3nG9T5fKGziHW8mcCqx3jMFx3towh3WA", "senderPublicKey": "D46gQxzmdzdCTYRg6dMcwFoUrc6ZmxF6GKd5ZoTkvzp1", "proofs": [ "28UzqVpKVegKE7BLExznp5BaifouUrggNrfy17pYJj5PZRQ6bwJ1ncGzq1WfD1f9EfDaQ5zita8JdBNzWvzaD7Db" ], "script": "base64:BgKxFAgCEgMKAQgSABIECgIIARIHCgUICAgIARIECgIICBIFCgMICAESBAoCCAgSAwoBARIDCgEBEgQKAggIEgQKAggEEgASAwoBARIAEgQKAggIEgQKAggIEgQKAggIIglzZXBhcmF0b3IiDnBvb2xXZWlnaHRNdWx0Ig9tYXhEZXB0aERlZmF1bHQiFmZpbmFsaXphdGlvblN0YWdlVG90YWwiF2ZpbmFsaXphdGlvblN0YWdlU2hhcmVzIg5rZXlFcG9jaExlbmd0aCIRa2V5RXBvY2hMZW5ndGhOZXciFWtleUVwb2NoTGVuZ3RoQnlFcG9jaCIFZXBvY2giD2tleUN1cnJlbnRFcG9jaCILa2V5TWF4RGVwdGgiImtleVZvdGluZ0VtaXNzaW9uQ2FuZGlkYXRlQ29udHJhY3QiEmtleUZhY3RvcnlDb250cmFjdCITa2V5Qm9vc3RpbmdDb250cmFjdCISa2V5U3Rha2luZ0NvbnRyYWN0IhRrZXlGaW5hbGl6YXRpb25TdGFnZSILa2V5TmV4dFBvb2wiC2tleU5leHRVc2VyIg5rZXlTdGFydEhlaWdodCIRa2V5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YuAmFNAQpkZWxldGVOb2RlAgJhcgJhdgQCYVEJAQJhTgEFAmFNAwkAAAIFAmFRBQJhUQkAlAoCCQECYUUCBQJhcgUCYXYFBHVuaXQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAmNrAQJjbAAEAmNtBAFRCQECYUgAAwkAAQIFAVECCkJ5dGVWZWN0b3IEAmFPBQFRBQJhTwMJAAECBQFRAgRVbml0CAUCY2sPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAmNrCWJvZHlCeXRlcwkAkQMCCAUCY2sGcHJvb2ZzAAAFAmNtgymnFQ==", "height": 2460915, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9wNALryRHbvVdvYgPVX7w4vGaoXZQLuQt8cmdKQu1BjK Next: G69cBD6mnqUvtQv7x1MefQPAEzUQs1WqVk9UUc5gCHkd Diff:
Old | New | Differences | |
---|---|---|---|
88 | 88 | func keyTotalVotes (epoch) = makeString(["%s%d", "totalVotes", toString(epoch)], separator) | |
89 | 89 | ||
90 | 90 | ||
91 | - | func wrapErr (msg) = makeString(["voting_emission.ride:", msg], " ") | |
92 | - | ||
93 | - | ||
94 | - | func throwErr (msg) = throw(wrapErr(msg)) | |
95 | - | ||
96 | - | ||
97 | 91 | func getValueOrFail (address,key,type) = { | |
98 | 92 | let error = makeString(["mandatory ", toString(address), ".", key, " is not defined"], "") | |
99 | 93 | valueOrErrorMessage( match type { | |
151 | 145 | ||
152 | 146 | ||
153 | 147 | func checkWxEmissionPoolLabel (pool) = { | |
154 | - | let $ | |
155 | - | let amountAssetId = $ | |
156 | - | let priceAssetId = $ | |
148 | + | let $t047164756 = pool | |
149 | + | let amountAssetId = $t047164756._1 | |
150 | + | let priceAssetId = $t047164756._2 | |
157 | 151 | let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract)) | |
158 | 152 | let @ = invoke(factoryContract, "checkWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil) | |
159 | 153 | if ($isInstanceOf(@, "Boolean")) | |
165 | 159 | let poolsListName = "pools" | |
166 | 160 | ||
167 | 161 | func getVotesListName (pool) = { | |
168 | - | let $ | |
169 | - | let amountAssetId = $ | |
170 | - | let priceAssetId = $ | |
162 | + | let $t050575097 = pool | |
163 | + | let amountAssetId = $t050575097._1 | |
164 | + | let priceAssetId = $t050575097._2 | |
171 | 165 | makeString(["votes", amountAssetId, priceAssetId], separator) | |
172 | 166 | } | |
173 | 167 | ||
511 | 505 | if ((checkTargetEpoch == checkTargetEpoch)) | |
512 | 506 | then { | |
513 | 507 | let pool = stringToPool(poolStr) | |
514 | - | let $ | |
515 | - | let amountAssetId = $ | |
516 | - | let priceAssetId = $ | |
508 | + | let $t01754817588 = pool | |
509 | + | let amountAssetId = $t01754817588._1 | |
510 | + | let priceAssetId = $t01754817588._2 | |
517 | 511 | let wxEmission = checkWxEmissionPoolLabel(pool) | |
518 | 512 | let gwxAmountAtEndTotal = { | |
519 | 513 | let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil) | |
565 | 559 | if ((checkTargetEpoch == checkTargetEpoch)) | |
566 | 560 | then { | |
567 | 561 | let pool = stringToPool(poolStr) | |
568 | - | let $ | |
569 | - | let amountAssetId = $ | |
570 | - | let priceAssetId = $ | |
562 | + | let $t01931419354 = pool | |
563 | + | let amountAssetId = $t01931419354._1 | |
564 | + | let priceAssetId = $t01931419354._2 | |
571 | 565 | let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract)) | |
572 | 566 | let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract)) | |
573 | 567 | let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId) |
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 poolWeightMult = 100000000 | |
7 | 7 | ||
8 | 8 | let maxDepthDefault = 10 | |
9 | 9 | ||
10 | 10 | let finalizationStageTotal = 0 | |
11 | 11 | ||
12 | 12 | let finalizationStageShares = 1 | |
13 | 13 | ||
14 | 14 | let keyEpochLength = makeString(["%s", "epochLength"], separator) | |
15 | 15 | ||
16 | 16 | let keyEpochLengthNew = makeString(["%s%s", "epochLength__new"], separator) | |
17 | 17 | ||
18 | 18 | func keyEpochLengthByEpoch (epoch) = makeString(["%s%d", "epochLength", toString(epoch)], separator) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | let keyCurrentEpoch = makeString(["%s", "currentEpoch"], separator) | |
22 | 22 | ||
23 | 23 | let keyMaxDepth = makeString(["%s", "maxDepth"], separator) | |
24 | 24 | ||
25 | 25 | let keyVotingEmissionCandidateContract = makeString(["%s", "votingEmissionCandidateContract"], separator) | |
26 | 26 | ||
27 | 27 | let keyFactoryContract = makeString(["%s", "factoryContract"], separator) | |
28 | 28 | ||
29 | 29 | let keyBoostingContract = makeString(["%s", "boostingContract"], separator) | |
30 | 30 | ||
31 | 31 | let keyStakingContract = makeString(["%s", "stakingContract"], separator) | |
32 | 32 | ||
33 | 33 | let keyFinalizationStage = makeString(["%s", "finalizationStage"], separator) | |
34 | 34 | ||
35 | 35 | let keyNextPool = makeString(["%s", "nextPool"], separator) | |
36 | 36 | ||
37 | 37 | let keyNextUser = makeString(["%s", "nextUser"], separator) | |
38 | 38 | ||
39 | 39 | let keyStartHeight = makeString(["%s", "startHeight"], separator) | |
40 | 40 | ||
41 | 41 | let keyCurrentEpochUi = makeString(["%s", "currentEpochUi"], separator) | |
42 | 42 | ||
43 | 43 | let keyStartHeightUi = makeString(["%s", "startHeightUi"], separator) | |
44 | 44 | ||
45 | 45 | let keyFinalizationShouldBeForced = makeString(["%s", "force"], separator) | |
46 | 46 | ||
47 | 47 | func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], separator) | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func keyFinalized (epoch) = makeString(["%s%d", "finalized", toString(epoch)], separator) | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func keyInList (pool) = { | |
54 | 54 | let $t016931733 = pool | |
55 | 55 | let amountAssetId = $t016931733._1 | |
56 | 56 | let priceAssetId = $t016931733._2 | |
57 | 57 | makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator) | |
58 | 58 | } | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func keyUsed (address,epoch) = makeString(["%s%s%d", "used", toString(address), toString(epoch)], separator) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func keyVote (pool,address,epoch) = { | |
65 | 65 | let $t020072047 = pool | |
66 | 66 | let amountAssetId = $t020072047._1 | |
67 | 67 | let priceAssetId = $t020072047._2 | |
68 | 68 | makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], separator) | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func keyVotingResult (pool,epoch) = { | |
73 | 73 | let $t022292269 = pool | |
74 | 74 | let amountAssetId = $t022292269._1 | |
75 | 75 | let priceAssetId = $t022292269._2 | |
76 | 76 | makeString(["%s%s%s%d", "votingResult", amountAssetId, priceAssetId, toString(epoch)], separator) | |
77 | 77 | } | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func keyPoolShare (pool,epoch) = { | |
81 | 81 | let $t024342474 = pool | |
82 | 82 | let amountAssetId = $t024342474._1 | |
83 | 83 | let priceAssetId = $t024342474._2 | |
84 | 84 | makeString(["%s%s%s%d", "poolShare", amountAssetId, priceAssetId, toString(epoch)], separator) | |
85 | 85 | } | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func keyTotalVotes (epoch) = makeString(["%s%d", "totalVotes", toString(epoch)], separator) | |
89 | 89 | ||
90 | 90 | ||
91 | - | func wrapErr (msg) = makeString(["voting_emission.ride:", msg], " ") | |
92 | - | ||
93 | - | ||
94 | - | func throwErr (msg) = throw(wrapErr(msg)) | |
95 | - | ||
96 | - | ||
97 | 91 | func getValueOrFail (address,key,type) = { | |
98 | 92 | let error = makeString(["mandatory ", toString(address), ".", key, " is not defined"], "") | |
99 | 93 | valueOrErrorMessage( match type { | |
100 | 94 | case str: String => | |
101 | 95 | getString(address, key) | |
102 | 96 | case int: Int => | |
103 | 97 | getInteger(address, key) | |
104 | 98 | case _ => | |
105 | 99 | throw("invalid entry type") | |
106 | 100 | }, error) | |
107 | 101 | } | |
108 | 102 | ||
109 | 103 | ||
110 | 104 | func getStrOrFail (address,key) = { | |
111 | 105 | let @ = getValueOrFail(address, key, "") | |
112 | 106 | if ($isInstanceOf(@, "String")) | |
113 | 107 | then @ | |
114 | 108 | else throw(($getType(@) + " couldn't be cast to String")) | |
115 | 109 | } | |
116 | 110 | ||
117 | 111 | ||
118 | 112 | func getIntOrFail (address,key) = { | |
119 | 113 | let @ = getValueOrFail(address, key, 0) | |
120 | 114 | if ($isInstanceOf(@, "Int")) | |
121 | 115 | then @ | |
122 | 116 | else throw(($getType(@) + " couldn't be cast to Int")) | |
123 | 117 | } | |
124 | 118 | ||
125 | 119 | ||
126 | 120 | func poolToString (pool) = ((pool._1 + separator) + pool._2) | |
127 | 121 | ||
128 | 122 | ||
129 | 123 | func stringToPool (str) = { | |
130 | 124 | let parts = split(str, separator) | |
131 | 125 | if ((size(parts) == 2)) | |
132 | 126 | then $Tuple2(parts[0], parts[1]) | |
133 | 127 | else throw("invalid pool string") | |
134 | 128 | } | |
135 | 129 | ||
136 | 130 | ||
137 | 131 | func getLpAssetByPoolAssets (amountAssetId,priceAssetId) = { | |
138 | 132 | func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr) | |
139 | 133 | ||
140 | 134 | func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract") | |
141 | 135 | ||
142 | 136 | func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset") | |
143 | 137 | ||
144 | 138 | let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract)) | |
145 | 139 | let amountAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amountAssetId)) | |
146 | 140 | let priceAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAssetId)) | |
147 | 141 | let poolContractAddress = getStrOrFail(factoryContract, keyMappingPoolAssetsToPoolContractAddress(amountAssetInternalId, priceAssetInternalId)) | |
148 | 142 | let lpAssetId = getStrOrFail(factoryContract, keyMappingPoolContractToLPAsset(poolContractAddress)) | |
149 | 143 | lpAssetId | |
150 | 144 | } | |
151 | 145 | ||
152 | 146 | ||
153 | 147 | func checkWxEmissionPoolLabel (pool) = { | |
154 | - | let $ | |
155 | - | let amountAssetId = $ | |
156 | - | let priceAssetId = $ | |
148 | + | let $t047164756 = pool | |
149 | + | let amountAssetId = $t047164756._1 | |
150 | + | let priceAssetId = $t047164756._2 | |
157 | 151 | let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract)) | |
158 | 152 | let @ = invoke(factoryContract, "checkWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil) | |
159 | 153 | if ($isInstanceOf(@, "Boolean")) | |
160 | 154 | then @ | |
161 | 155 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
162 | 156 | } | |
163 | 157 | ||
164 | 158 | ||
165 | 159 | let poolsListName = "pools" | |
166 | 160 | ||
167 | 161 | func getVotesListName (pool) = { | |
168 | - | let $ | |
169 | - | let amountAssetId = $ | |
170 | - | let priceAssetId = $ | |
162 | + | let $t050575097 = pool | |
163 | + | let amountAssetId = $t050575097._1 | |
164 | + | let priceAssetId = $t050575097._2 | |
171 | 165 | makeString(["votes", amountAssetId, priceAssetId], separator) | |
172 | 166 | } | |
173 | 167 | ||
174 | 168 | ||
175 | 169 | func keyListHead (listName) = { | |
176 | 170 | let meta = if ((listName == poolsListName)) | |
177 | 171 | then "%s%s" | |
178 | 172 | else "%s%s%s%s" | |
179 | 173 | makeString([meta, listName, "head"], separator) | |
180 | 174 | } | |
181 | 175 | ||
182 | 176 | ||
183 | 177 | func keyListSize (listName) = { | |
184 | 178 | let meta = if ((listName == poolsListName)) | |
185 | 179 | then "%s%s" | |
186 | 180 | else "%s%s%s%s" | |
187 | 181 | makeString([meta, listName, "size"], separator) | |
188 | 182 | } | |
189 | 183 | ||
190 | 184 | ||
191 | 185 | func keyListPrev (listName,id) = { | |
192 | 186 | let meta = if ((listName == poolsListName)) | |
193 | 187 | then "%s%s%s%s" | |
194 | 188 | else "%s%s%s%s%s" | |
195 | 189 | makeString([meta, listName, id, "prev"], separator) | |
196 | 190 | } | |
197 | 191 | ||
198 | 192 | ||
199 | 193 | func keyListNext (listName,id) = { | |
200 | 194 | let meta = if ((listName == poolsListName)) | |
201 | 195 | then "%s%s%s%s" | |
202 | 196 | else "%s%s%s%s%s" | |
203 | 197 | makeString([meta, listName, id, "next"], separator) | |
204 | 198 | } | |
205 | 199 | ||
206 | 200 | ||
207 | 201 | func containsNode (listName,id) = { | |
208 | 202 | let headOrUnit = getString(this, keyListHead(listName)) | |
209 | 203 | let prevOrUnit = getString(this, keyListPrev(listName, id)) | |
210 | 204 | let nextOrUnit = getString(this, keyListNext(listName, id)) | |
211 | 205 | if (if ((id == valueOrElse(headOrUnit, ""))) | |
212 | 206 | then true | |
213 | 207 | else (prevOrUnit != unit)) | |
214 | 208 | then true | |
215 | 209 | else (nextOrUnit != unit) | |
216 | 210 | } | |
217 | 211 | ||
218 | 212 | ||
219 | 213 | func insertNodeActions (listName,id) = { | |
220 | 214 | let headOrUnit = getString(this, keyListHead(listName)) | |
221 | 215 | let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0) | |
222 | 216 | let checkNode = if (!(containsNode(listName, id))) | |
223 | 217 | then true | |
224 | 218 | else throw("Node exists") | |
225 | 219 | if ((checkNode == checkNode)) | |
226 | 220 | then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit)) | |
227 | 221 | then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)] | |
228 | 222 | else nil)) ++ [StringEntry(keyListHead(listName), id)]) | |
229 | 223 | else throw("Strict value is not equal to itself.") | |
230 | 224 | } | |
231 | 225 | ||
232 | 226 | ||
233 | 227 | func deleteNodeActions (listName,id) = { | |
234 | 228 | let headOrUnit = getString(this, keyListHead(listName)) | |
235 | 229 | let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0) | |
236 | 230 | let prevOrUnit = getString(this, keyListPrev(listName, id)) | |
237 | 231 | let nextOrUnit = getString(this, keyListNext(listName, id)) | |
238 | 232 | ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit)) | |
239 | 233 | then (nextOrUnit != unit) | |
240 | 234 | else false) | |
241 | 235 | then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))] | |
242 | 236 | else if ((nextOrUnit != unit)) | |
243 | 237 | then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))] | |
244 | 238 | else if ((prevOrUnit != unit)) | |
245 | 239 | then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))] | |
246 | 240 | else if ((id == valueOrElse(headOrUnit, ""))) | |
247 | 241 | then [DeleteEntry(keyListHead(listName))] | |
248 | 242 | else throw(((("invalid node: " + listName) + ".") + id)))) | |
249 | 243 | } | |
250 | 244 | ||
251 | 245 | ||
252 | 246 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
253 | 247 | ||
254 | 248 | ||
255 | 249 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
256 | 250 | ||
257 | 251 | ||
258 | 252 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
259 | 253 | case s: String => | |
260 | 254 | fromBase58String(s) | |
261 | 255 | case _: Unit => | |
262 | 256 | unit | |
263 | 257 | case _ => | |
264 | 258 | throw("Match error") | |
265 | 259 | } | |
266 | 260 | ||
267 | 261 | ||
268 | 262 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
269 | 263 | case s: String => | |
270 | 264 | fromBase58String(s) | |
271 | 265 | case _: Unit => | |
272 | 266 | unit | |
273 | 267 | case _ => | |
274 | 268 | throw("Match error") | |
275 | 269 | } | |
276 | 270 | ||
277 | 271 | ||
278 | 272 | let permissionDeniedError = throw("Permission denied") | |
279 | 273 | ||
280 | 274 | func mustThis (i) = if ((i.caller == this)) | |
281 | 275 | then true | |
282 | 276 | else permissionDeniedError | |
283 | 277 | ||
284 | 278 | ||
285 | 279 | func mustManager (i) = match managerPublicKeyOrUnit() { | |
286 | 280 | case pk: ByteVector => | |
287 | 281 | if ((i.callerPublicKey == pk)) | |
288 | 282 | then true | |
289 | 283 | else permissionDeniedError | |
290 | 284 | case _: Unit => | |
291 | 285 | mustThis(i) | |
292 | 286 | case _ => | |
293 | 287 | throw("Match error") | |
294 | 288 | } | |
295 | 289 | ||
296 | 290 | ||
297 | 291 | @Callable(i) | |
298 | 292 | func setManager (pendingManagerPublicKey) = { | |
299 | 293 | let checkCaller = mustManager(i) | |
300 | 294 | if ((checkCaller == checkCaller)) | |
301 | 295 | then { | |
302 | 296 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
303 | 297 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
304 | 298 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
305 | 299 | else throw("Strict value is not equal to itself.") | |
306 | 300 | } | |
307 | 301 | else throw("Strict value is not equal to itself.") | |
308 | 302 | } | |
309 | 303 | ||
310 | 304 | ||
311 | 305 | ||
312 | 306 | @Callable(i) | |
313 | 307 | func confirmManager () = { | |
314 | 308 | let pm = pendingManagerPublicKeyOrUnit() | |
315 | 309 | let hasPM = if (isDefined(pm)) | |
316 | 310 | then true | |
317 | 311 | else throw("No pending manager") | |
318 | 312 | if ((hasPM == hasPM)) | |
319 | 313 | then { | |
320 | 314 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
321 | 315 | then true | |
322 | 316 | else throw("You are not pending manager") | |
323 | 317 | if ((checkPM == checkPM)) | |
324 | 318 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
325 | 319 | else throw("Strict value is not equal to itself.") | |
326 | 320 | } | |
327 | 321 | else throw("Strict value is not equal to itself.") | |
328 | 322 | } | |
329 | 323 | ||
330 | 324 | ||
331 | 325 | ||
332 | 326 | @Callable(i) | |
333 | 327 | func getUserGwxAmountAtHeight (userAddress,targetHeight) = { | |
334 | 328 | let boostingContractAddress = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyBoostingContract)), "invalid boosting contract address") | |
335 | 329 | $Tuple2(nil, { | |
336 | 330 | let @ = invoke(boostingContractAddress, "getUserGwxAmountAtHeightREADONLY", [userAddress, targetHeight], nil) | |
337 | 331 | if ($isInstanceOf(@, "Int")) | |
338 | 332 | then @ | |
339 | 333 | else throw(($getType(@) + " couldn't be cast to Int")) | |
340 | 334 | }) | |
341 | 335 | } | |
342 | 336 | ||
343 | 337 | ||
344 | 338 | ||
345 | 339 | @Callable(i) | |
346 | 340 | func constructor (factoryContract,votingEmissionCandidateContract,boostingContract,stakingContract,epochLength) = { | |
347 | 341 | let checks = [mustManager(i), if ((addressFromString(factoryContract) != unit)) | |
348 | 342 | then true | |
349 | 343 | else "invalid factory contract address", if ((addressFromString(votingEmissionCandidateContract) != unit)) | |
350 | 344 | then true | |
351 | 345 | else "invalid voting emission candidate contract address", if ((addressFromString(boostingContract) != unit)) | |
352 | 346 | then true | |
353 | 347 | else "invalid boosting contract address", if ((addressFromString(stakingContract) != unit)) | |
354 | 348 | then true | |
355 | 349 | else "invalid staking contract address", if ((epochLength > 0)) | |
356 | 350 | then true | |
357 | 351 | else throw("invalid epoch length")] | |
358 | 352 | if ((checks == checks)) | |
359 | 353 | then $Tuple2([StringEntry(keyFactoryContract, factoryContract), StringEntry(keyVotingEmissionCandidateContract, votingEmissionCandidateContract), StringEntry(keyBoostingContract, boostingContract), StringEntry(keyStakingContract, stakingContract), IntegerEntry(keyEpochLength, epochLength)], unit) | |
360 | 354 | else throw("Strict value is not equal to itself.") | |
361 | 355 | } | |
362 | 356 | ||
363 | 357 | ||
364 | 358 | ||
365 | 359 | @Callable(i) | |
366 | 360 | func create (amountAssetId,priceAssetId) = { | |
367 | 361 | let checks = [if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionCandidateContract), ""))) | |
368 | 362 | then true | |
369 | 363 | else mustManager(i)] | |
370 | 364 | if ((checks == checks)) | |
371 | 365 | then { | |
372 | 366 | let pool = $Tuple2(amountAssetId, priceAssetId) | |
373 | 367 | let inListActions = ([BooleanEntry(keyInList(pool), true)] ++ insertNodeActions(poolsListName, poolToString(pool))) | |
374 | 368 | let currentEpochIsNotDefined = (getInteger(this, keyCurrentEpoch) == unit) | |
375 | 369 | let startHeightActions = if (currentEpochIsNotDefined) | |
376 | 370 | then { | |
377 | 371 | let epoch = 0 | |
378 | 372 | [IntegerEntry(keyCurrentEpoch, epoch), IntegerEntry(keyStartHeightByEpoch(epoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, height)] | |
379 | 373 | } | |
380 | 374 | else nil | |
381 | 375 | $Tuple2((inListActions ++ startHeightActions), unit) | |
382 | 376 | } | |
383 | 377 | else throw("Strict value is not equal to itself.") | |
384 | 378 | } | |
385 | 379 | ||
386 | 380 | ||
387 | 381 | ||
388 | 382 | @Callable(i) | |
389 | 383 | func vote (amountAssetId,priceAssetId,amount) = { | |
390 | 384 | let pool = $Tuple2(amountAssetId, priceAssetId) | |
391 | 385 | let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0) | |
392 | 386 | let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch)) | |
393 | 387 | let epochLength = getIntOrFail(this, keyEpochLength) | |
394 | 388 | let endHeight = (startHeight + epochLength) | |
395 | 389 | let finalizationStageOrUnit = getInteger(this, keyFinalizationStage) | |
396 | 390 | let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0) | |
397 | 391 | let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0) | |
398 | 392 | let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0) | |
399 | 393 | let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0) | |
400 | 394 | let gwxAmountAtEndTotal = { | |
401 | 395 | let @ = invoke(this, "getUserGwxAmountAtHeight", [toBase58String(i.caller.bytes), endHeight], nil) | |
402 | 396 | if ($isInstanceOf(@, "Int")) | |
403 | 397 | then @ | |
404 | 398 | else throw(($getType(@) + " couldn't be cast to Int")) | |
405 | 399 | } | |
406 | 400 | let available = (gwxAmountAtEndTotal - used) | |
407 | 401 | let newVote = (vote + amount) | |
408 | 402 | let wxEmission = checkWxEmissionPoolLabel(pool) | |
409 | 403 | let checks = [if ((getBoolean(keyInList(pool)) != unit)) | |
410 | 404 | then true | |
411 | 405 | else throw("invalid assets"), if ((endHeight > height)) | |
412 | 406 | then true | |
413 | 407 | else throw("invalid height"), if ((finalizationStageOrUnit == unit)) | |
414 | 408 | then true | |
415 | 409 | else throw("finalization in progress"), if ((gwxAmountAtEndTotal > 0)) | |
416 | 410 | then true | |
417 | 411 | else throw("you do not have gWX"), if (if ((amount > 0)) | |
418 | 412 | then (available >= amount) | |
419 | 413 | else false) | |
420 | 414 | then true | |
421 | 415 | else throw("invalid amount"), if (wxEmission) | |
422 | 416 | then true | |
423 | 417 | else throw("pool hasn't WX_EMISSION label")] | |
424 | 418 | if ((checks == checks)) | |
425 | 419 | then { | |
426 | 420 | let votesListName = getVotesListName(pool) | |
427 | 421 | let userAddressStr = toString(i.caller) | |
428 | 422 | let votesListActions = if (containsNode(votesListName, userAddressStr)) | |
429 | 423 | then nil | |
430 | 424 | else insertNodeActions(votesListName, userAddressStr) | |
431 | 425 | $Tuple2(([IntegerEntry(keyUsed(i.caller, epoch), (used + amount)), IntegerEntry(keyVote(pool, i.caller, epoch), newVote), IntegerEntry(keyVotingResult(pool, epoch), (poolResult + amount)), IntegerEntry(keyTotalVotes(epoch), (totalVotes + amount))] ++ votesListActions), unit) | |
432 | 426 | } | |
433 | 427 | else throw("Strict value is not equal to itself.") | |
434 | 428 | } | |
435 | 429 | ||
436 | 430 | ||
437 | 431 | ||
438 | 432 | @Callable(i) | |
439 | 433 | func cancelVote (amountAssetId,priceAssetId) = { | |
440 | 434 | let pool = $Tuple2(amountAssetId, priceAssetId) | |
441 | 435 | let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0) | |
442 | 436 | let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch)) | |
443 | 437 | let epochLength = getIntOrFail(this, keyEpochLength) | |
444 | 438 | let endHeight = (startHeight + epochLength) | |
445 | 439 | let finalizationStageOrUnit = getInteger(this, keyFinalizationStage) | |
446 | 440 | let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0) | |
447 | 441 | let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0) | |
448 | 442 | let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0) | |
449 | 443 | let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0) | |
450 | 444 | let checks = [if ((getBoolean(keyInList(pool)) != unit)) | |
451 | 445 | then true | |
452 | 446 | else throw("invalid assets"), if ((endHeight > height)) | |
453 | 447 | then true | |
454 | 448 | else throw("invalid height"), if ((finalizationStageOrUnit == unit)) | |
455 | 449 | then true | |
456 | 450 | else throw("finalization in progress"), if ((vote > 0)) | |
457 | 451 | then true | |
458 | 452 | else throw("no vote")] | |
459 | 453 | if ((checks == checks)) | |
460 | 454 | then { | |
461 | 455 | let votesListName = getVotesListName(pool) | |
462 | 456 | let userAddressStr = toString(i.caller) | |
463 | 457 | $Tuple2(([IntegerEntry(keyUsed(i.caller, epoch), max([(used - vote), 0])), DeleteEntry(keyVote(pool, i.caller, epoch)), IntegerEntry(keyVotingResult(pool, epoch), (poolResult - vote)), IntegerEntry(keyTotalVotes(epoch), (totalVotes - vote))] ++ deleteNodeActions(votesListName, userAddressStr)), unit) | |
464 | 458 | } | |
465 | 459 | else throw("Strict value is not equal to itself.") | |
466 | 460 | } | |
467 | 461 | ||
468 | 462 | ||
469 | 463 | ||
470 | 464 | @Callable(i) | |
471 | 465 | func setEpochLength (newEpochLength) = { | |
472 | 466 | let checks = [mustManager(i), if ((newEpochLength > 0)) | |
473 | 467 | then true | |
474 | 468 | else throw("invalid epoch length")] | |
475 | 469 | if ((checks == checks)) | |
476 | 470 | then $Tuple2([IntegerEntry(keyEpochLengthNew, newEpochLength)], unit) | |
477 | 471 | else throw("Strict value is not equal to itself.") | |
478 | 472 | } | |
479 | 473 | ||
480 | 474 | ||
481 | 475 | ||
482 | 476 | @Callable(i) | |
483 | 477 | func setMaxDepth (newMaxDepth) = { | |
484 | 478 | let checks = [mustManager(i), if ((newMaxDepth > 0)) | |
485 | 479 | then true | |
486 | 480 | else throw("invalid max depth")] | |
487 | 481 | if ((checks == checks)) | |
488 | 482 | then $Tuple2([IntegerEntry(keyMaxDepth, newMaxDepth)], unit) | |
489 | 483 | else throw("Strict value is not equal to itself.") | |
490 | 484 | } | |
491 | 485 | ||
492 | 486 | ||
493 | 487 | ||
494 | 488 | @Callable(i) | |
495 | 489 | func processVoteINTERNAL (poolStr,userAddressStr) = { | |
496 | 490 | let checkCaller = mustThis(i) | |
497 | 491 | if ((checkCaller == checkCaller)) | |
498 | 492 | then { | |
499 | 493 | let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), ("processVoteINTERNAL: invalid user address " + userAddressStr)) | |
500 | 494 | let epoch = getIntOrFail(this, keyCurrentEpoch) | |
501 | 495 | let epochPrevious = (epoch - 1) | |
502 | 496 | let epochLength = getIntOrFail(this, keyEpochLength) | |
503 | 497 | let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch)) | |
504 | 498 | let endHeight = (startHeight + epochLength) | |
505 | 499 | let startHeightPrevious = getIntOrFail(this, keyStartHeightByEpoch(epochPrevious)) | |
506 | 500 | let epochLengthPrevious = getIntOrFail(this, keyEpochLengthByEpoch(epochPrevious)) | |
507 | 501 | let endHeightPrevious = (startHeightPrevious + epochLengthPrevious) | |
508 | 502 | let checkTargetEpoch = if ((epochPrevious >= 0)) | |
509 | 503 | then true | |
510 | 504 | else throw("processVoteINTERNAL: invalid previous epoch") | |
511 | 505 | if ((checkTargetEpoch == checkTargetEpoch)) | |
512 | 506 | then { | |
513 | 507 | let pool = stringToPool(poolStr) | |
514 | - | let $ | |
515 | - | let amountAssetId = $ | |
516 | - | let priceAssetId = $ | |
508 | + | let $t01754817588 = pool | |
509 | + | let amountAssetId = $t01754817588._1 | |
510 | + | let priceAssetId = $t01754817588._2 | |
517 | 511 | let wxEmission = checkWxEmissionPoolLabel(pool) | |
518 | 512 | let gwxAmountAtEndTotal = { | |
519 | 513 | let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil) | |
520 | 514 | if ($isInstanceOf(@, "Int")) | |
521 | 515 | then @ | |
522 | 516 | else throw(($getType(@) + " couldn't be cast to Int")) | |
523 | 517 | } | |
524 | 518 | let gwxAmountAtEndTotalPrevious = { | |
525 | 519 | let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeightPrevious], nil) | |
526 | 520 | if ($isInstanceOf(@, "Int")) | |
527 | 521 | then @ | |
528 | 522 | else throw(($getType(@) + " couldn't be cast to Int")) | |
529 | 523 | } | |
530 | 524 | let totalVotes = valueOrElse(getInteger(keyTotalVotes(epoch)), 0) | |
531 | 525 | let votingResult = valueOrElse(getInteger(keyVotingResult(pool, epoch)), 0) | |
532 | 526 | let votePrevious = valueOrErrorMessage(getInteger(keyVote(pool, userAddress, epochPrevious)), (((("processVoteINTERNAL " + poolStr) + " ") + userAddressStr) + ": no previous vote")) | |
533 | 527 | let used = valueOrElse(getInteger(this, keyUsed(userAddress, epoch)), 0) | |
534 | 528 | let newVote = if ((gwxAmountAtEndTotalPrevious > 0)) | |
535 | 529 | then fraction(votePrevious, gwxAmountAtEndTotal, gwxAmountAtEndTotalPrevious) | |
536 | 530 | else 0 | |
537 | 531 | let actions = if (if ((newVote > 0)) | |
538 | 532 | then wxEmission | |
539 | 533 | else false) | |
540 | 534 | then [IntegerEntry(keyVote(pool, userAddress, epoch), newVote), IntegerEntry(keyTotalVotes(epoch), (totalVotes + newVote)), IntegerEntry(keyVotingResult(pool, epoch), (votingResult + newVote)), IntegerEntry(keyUsed(userAddress, epoch), (used + newVote))] | |
541 | 535 | else deleteNodeActions(getVotesListName(pool), userAddressStr) | |
542 | 536 | $Tuple2(actions, unit) | |
543 | 537 | } | |
544 | 538 | else throw("Strict value is not equal to itself.") | |
545 | 539 | } | |
546 | 540 | else throw("Strict value is not equal to itself.") | |
547 | 541 | } | |
548 | 542 | ||
549 | 543 | ||
550 | 544 | ||
551 | 545 | @Callable(i) | |
552 | 546 | func processPoolINTERNAL (poolStr,force) = { | |
553 | 547 | let checkCaller = mustThis(i) | |
554 | 548 | if ((checkCaller == checkCaller)) | |
555 | 549 | then { | |
556 | 550 | let targetEpoch = { | |
557 | 551 | let currentEpoch = getIntOrFail(this, keyCurrentEpoch) | |
558 | 552 | if (force) | |
559 | 553 | then currentEpoch | |
560 | 554 | else (currentEpoch - 1) | |
561 | 555 | } | |
562 | 556 | let checkTargetEpoch = if ((targetEpoch >= 0)) | |
563 | 557 | then true | |
564 | 558 | else throw("processPoolINTERNAL: invalid target epoch") | |
565 | 559 | if ((checkTargetEpoch == checkTargetEpoch)) | |
566 | 560 | then { | |
567 | 561 | let pool = stringToPool(poolStr) | |
568 | - | let $ | |
569 | - | let amountAssetId = $ | |
570 | - | let priceAssetId = $ | |
562 | + | let $t01931419354 = pool | |
563 | + | let amountAssetId = $t01931419354._1 | |
564 | + | let priceAssetId = $t01931419354._2 | |
571 | 565 | let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract)) | |
572 | 566 | let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract)) | |
573 | 567 | let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId) | |
574 | 568 | let r = { | |
575 | 569 | let @ = invoke(stakingContract, "usersListTraversal", [lpAssetId], nil) | |
576 | 570 | if ($isInstanceOf(@, "Boolean")) | |
577 | 571 | then @ | |
578 | 572 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
579 | 573 | } | |
580 | 574 | if ((r == r)) | |
581 | 575 | then if (r) | |
582 | 576 | then $Tuple2(nil, true) | |
583 | 577 | else { | |
584 | 578 | let wxEmission = checkWxEmissionPoolLabel(pool) | |
585 | 579 | let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(targetEpoch)), 0) | |
586 | 580 | let votingResult = valueOrElse(getInteger(this, keyVotingResult(pool, targetEpoch)), 0) | |
587 | 581 | let share = if (if ((totalVotes == 0)) | |
588 | 582 | then true | |
589 | 583 | else !(wxEmission)) | |
590 | 584 | then 0 | |
591 | 585 | else fraction(votingResult, poolWeightMult, totalVotes) | |
592 | 586 | let modifyWeightInv = invoke(factoryContract, "modifyWeight", [lpAssetId, share], nil) | |
593 | 587 | if ((modifyWeightInv == modifyWeightInv)) | |
594 | 588 | then { | |
595 | 589 | let poolsListActions = if (if (wxEmission) | |
596 | 590 | then true | |
597 | 591 | else force) | |
598 | 592 | then nil | |
599 | 593 | else ([DeleteEntry(keyInList(pool))] ++ deleteNodeActions(poolsListName, poolStr)) | |
600 | 594 | $Tuple2(([IntegerEntry(keyPoolShare(pool, targetEpoch), share)] ++ poolsListActions), false) | |
601 | 595 | } | |
602 | 596 | else throw("Strict value is not equal to itself.") | |
603 | 597 | } | |
604 | 598 | else throw("Strict value is not equal to itself.") | |
605 | 599 | } | |
606 | 600 | else throw("Strict value is not equal to itself.") | |
607 | 601 | } | |
608 | 602 | else throw("Strict value is not equal to itself.") | |
609 | 603 | } | |
610 | 604 | ||
611 | 605 | ||
612 | 606 | ||
613 | 607 | @Callable(i) | |
614 | 608 | func finalizeHelper () = { | |
615 | 609 | let force = valueOrElse(getBoolean(keyFinalizationShouldBeForced), false) | |
616 | 610 | let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0) | |
617 | 611 | let previousEpoch = (epoch - 1) | |
618 | 612 | let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch)) | |
619 | 613 | let epochLength = getIntOrFail(this, keyEpochLength) | |
620 | 614 | let endHeight = (startHeight + epochLength) | |
621 | 615 | let finalizationStageOrUnit = getInteger(this, keyFinalizationStage) | |
622 | 616 | if (if (if ((height >= endHeight)) | |
623 | 617 | then (finalizationStageOrUnit == unit) | |
624 | 618 | else false) | |
625 | 619 | then !(force) | |
626 | 620 | else false) | |
627 | 621 | then { | |
628 | 622 | let newEpoch = (epoch + 1) | |
629 | 623 | let newEpochLengthOption = getInteger(this, keyEpochLengthNew) | |
630 | 624 | let newEpochLengthActions = match newEpochLengthOption { | |
631 | 625 | case newEpochLength: Int => | |
632 | 626 | [IntegerEntry(keyEpochLength, newEpochLength), DeleteEntry(keyEpochLengthNew)] | |
633 | 627 | case _: Unit => | |
634 | 628 | nil | |
635 | 629 | case _ => | |
636 | 630 | throw("Match error") | |
637 | 631 | } | |
638 | 632 | $Tuple2(([IntegerEntry(keyStartHeightByEpoch(newEpoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpoch, newEpoch), IntegerEntry(keyFinalizationStage, finalizationStageTotal), IntegerEntry(keyEpochLengthByEpoch(epoch), epochLength)] ++ newEpochLengthActions), true) | |
639 | 633 | } | |
640 | 634 | else if (if (force) | |
641 | 635 | then (finalizationStageOrUnit == unit) | |
642 | 636 | else false) | |
643 | 637 | then $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares)], true) | |
644 | 638 | else if ((finalizationStageOrUnit == unit)) | |
645 | 639 | then $Tuple2(nil, false) | |
646 | 640 | else if ((finalizationStageOrUnit == finalizationStageTotal)) | |
647 | 641 | then { | |
648 | 642 | let poolOrUnit = getString(keyNextPool) | |
649 | 643 | let userOrUnit = getString(keyNextUser) | |
650 | 644 | match poolOrUnit { | |
651 | 645 | case _: Unit => | |
652 | 646 | match getString(keyListHead(poolsListName)) { | |
653 | 647 | case _: Unit => | |
654 | 648 | $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true) | |
655 | 649 | case poolsHeadStr: String => | |
656 | 650 | $Tuple2([StringEntry(keyNextPool, poolsHeadStr)], true) | |
657 | 651 | case _ => | |
658 | 652 | throw("Match error") | |
659 | 653 | } | |
660 | 654 | case poolStr: String => | |
661 | 655 | let pool = stringToPool(poolStr) | |
662 | 656 | let nextUserOrUnit = match userOrUnit { | |
663 | 657 | case _: Unit => | |
664 | 658 | getString(keyListHead(getVotesListName(pool))) | |
665 | 659 | case user: String => | |
666 | 660 | let next = getString(keyListNext(getVotesListName(pool), user)) | |
667 | 661 | if ((next == next)) | |
668 | 662 | then { | |
669 | 663 | let processVoteInv = invoke(this, "processVoteINTERNAL", [poolStr, user], nil) | |
670 | 664 | if ((processVoteInv == processVoteInv)) | |
671 | 665 | then next | |
672 | 666 | else throw("Strict value is not equal to itself.") | |
673 | 667 | } | |
674 | 668 | else throw("Strict value is not equal to itself.") | |
675 | 669 | case _ => | |
676 | 670 | throw("Match error") | |
677 | 671 | } | |
678 | 672 | match nextUserOrUnit { | |
679 | 673 | case _: Unit => | |
680 | 674 | let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr)) | |
681 | 675 | match nextPoolOrUnit { | |
682 | 676 | case _: Unit => | |
683 | 677 | $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true) | |
684 | 678 | case s: String => | |
685 | 679 | $Tuple2([StringEntry(keyNextPool, s), DeleteEntry(keyNextUser)], true) | |
686 | 680 | case _ => | |
687 | 681 | throw("Match error") | |
688 | 682 | } | |
689 | 683 | case nextUser: String => | |
690 | 684 | $Tuple2([StringEntry(keyNextUser, nextUser)], true) | |
691 | 685 | case _ => | |
692 | 686 | throw("Match error") | |
693 | 687 | } | |
694 | 688 | case _ => | |
695 | 689 | throw("Match error") | |
696 | 690 | } | |
697 | 691 | } | |
698 | 692 | else if ((finalizationStageOrUnit == finalizationStageShares)) | |
699 | 693 | then { | |
700 | 694 | let poolOrUnit = getString(keyNextPool) | |
701 | 695 | match poolOrUnit { | |
702 | 696 | case _: Unit => | |
703 | 697 | match getString(keyListHead(poolsListName)) { | |
704 | 698 | case _: Unit => | |
705 | 699 | let actions = if (force) | |
706 | 700 | then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced)] | |
707 | 701 | else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)] | |
708 | 702 | $Tuple2(actions, true) | |
709 | 703 | case nextPoolStr: String => | |
710 | 704 | $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true) | |
711 | 705 | case _ => | |
712 | 706 | throw("Match error") | |
713 | 707 | } | |
714 | 708 | case poolStr: String => | |
715 | 709 | let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr)) | |
716 | 710 | if ((nextPoolOrUnit == nextPoolOrUnit)) | |
717 | 711 | then { | |
718 | 712 | let r = { | |
719 | 713 | let @ = invoke(this, "processPoolINTERNAL", [poolStr, force], nil) | |
720 | 714 | if ($isInstanceOf(@, "Boolean")) | |
721 | 715 | then @ | |
722 | 716 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
723 | 717 | } | |
724 | 718 | if ((r == r)) | |
725 | 719 | then if (r) | |
726 | 720 | then $Tuple2(nil, true) | |
727 | 721 | else match nextPoolOrUnit { | |
728 | 722 | case _: Unit => | |
729 | 723 | let actions = if (force) | |
730 | 724 | then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced), DeleteEntry(keyNextPool)] | |
731 | 725 | else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)] | |
732 | 726 | $Tuple2(actions, true) | |
733 | 727 | case nextPoolStr: String => | |
734 | 728 | $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true) | |
735 | 729 | case _ => | |
736 | 730 | throw("Match error") | |
737 | 731 | } | |
738 | 732 | else throw("Strict value is not equal to itself.") | |
739 | 733 | } | |
740 | 734 | else throw("Strict value is not equal to itself.") | |
741 | 735 | case _ => | |
742 | 736 | throw("Match error") | |
743 | 737 | } | |
744 | 738 | } | |
745 | 739 | else throw("finalization is broken") | |
746 | 740 | } | |
747 | 741 | ||
748 | 742 | ||
749 | 743 | ||
750 | 744 | @Callable(i) | |
751 | 745 | func finalizeWrapper (counter) = { | |
752 | 746 | let result = { | |
753 | 747 | let @ = invoke(this, "finalizeHelper", nil, nil) | |
754 | 748 | if ($isInstanceOf(@, "Boolean")) | |
755 | 749 | then @ | |
756 | 750 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
757 | 751 | } | |
758 | 752 | if ((result == result)) | |
759 | 753 | then if (!(result)) | |
760 | 754 | then if ((counter == 0)) | |
761 | 755 | then throw("Current voting is not over yet") | |
762 | 756 | else $Tuple2(nil, unit) | |
763 | 757 | else { | |
764 | 758 | let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault) | |
765 | 759 | if ((maxDepth > counter)) | |
766 | 760 | then { | |
767 | 761 | let inv = invoke(this, "finalizeWrapper", [(counter + 1)], nil) | |
768 | 762 | if ((inv == inv)) | |
769 | 763 | then $Tuple2(nil, unit) | |
770 | 764 | else throw("Strict value is not equal to itself.") | |
771 | 765 | } | |
772 | 766 | else $Tuple2(nil, unit) | |
773 | 767 | } | |
774 | 768 | else throw("Strict value is not equal to itself.") | |
775 | 769 | } | |
776 | 770 | ||
777 | 771 | ||
778 | 772 | ||
779 | 773 | @Callable(i) | |
780 | 774 | func finalize () = { | |
781 | 775 | let inv = invoke(this, "finalizeWrapper", [0], nil) | |
782 | 776 | if ((inv == inv)) | |
783 | 777 | then $Tuple2(nil, unit) | |
784 | 778 | else throw("Strict value is not equal to itself.") | |
785 | 779 | } | |
786 | 780 | ||
787 | 781 | ||
788 | 782 | ||
789 | 783 | @Callable(i) | |
790 | 784 | func containsNodeREADONLY (listName,id) = $Tuple2(nil, containsNode(listName, id)) | |
791 | 785 | ||
792 | 786 | ||
793 | 787 | ||
794 | 788 | @Callable(i) | |
795 | 789 | func insertNode (listName,id) = { | |
796 | 790 | let checkCaller = mustManager(i) | |
797 | 791 | if ((checkCaller == checkCaller)) | |
798 | 792 | then $Tuple2(insertNodeActions(listName, id), unit) | |
799 | 793 | else throw("Strict value is not equal to itself.") | |
800 | 794 | } | |
801 | 795 | ||
802 | 796 | ||
803 | 797 | ||
804 | 798 | @Callable(i) | |
805 | 799 | func deleteNode (listName,id) = { | |
806 | 800 | let checkCaller = mustManager(i) | |
807 | 801 | if ((checkCaller == checkCaller)) | |
808 | 802 | then $Tuple2(deleteNodeActions(listName, id), unit) | |
809 | 803 | else throw("Strict value is not equal to itself.") | |
810 | 804 | } | |
811 | 805 | ||
812 | 806 | ||
813 | 807 | @Verifier(tx) | |
814 | 808 | func verify () = { | |
815 | 809 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
816 | 810 | case pk: ByteVector => | |
817 | 811 | pk | |
818 | 812 | case _: Unit => | |
819 | 813 | tx.senderPublicKey | |
820 | 814 | case _ => | |
821 | 815 | throw("Match error") | |
822 | 816 | } | |
823 | 817 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
824 | 818 | } | |
825 | 819 |
github/deemru/w8io/fabc49c 71.58 ms ◑