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