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