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