tx · KTryZkBiizn7FmoWa3HxgrzWHARH3brtXuWu8ijAznF 3N9Zi6AcWcGbM23jQJ4fnzFsoHoTsxYDznr: -0.02800000 Waves 2024.04.17 13:20 [3066620] smart account 3N9Zi6AcWcGbM23jQJ4fnzFsoHoTsxYDznr > SELF 0.00000000 Waves
{ "type": 13, "id": "KTryZkBiizn7FmoWa3HxgrzWHARH3brtXuWu8ijAznF", "fee": 2800000, "feeAssetId": null, "timestamp": 1713349251367, "version": 2, "chainId": 84, "sender": "3N9Zi6AcWcGbM23jQJ4fnzFsoHoTsxYDznr", "senderPublicKey": "GFbasS3jufhZkK4xR7tdTjjnP8K33KvJFEDHRtxXDkaJ", "proofs": [ "4SykNKhabRQCkjHbpSkYMXwETmyspdxF5A9jNa1eMHvSTcqDSbfmh5mRgyZm62RuenhD3V3dqBJisYiJnjrJRDgD" ], "script": "base64:BgLoHAgCEgQKAggBEgcKBQgICAgBEgQKAggIEgUKAwgIARIECgIICBIDCgEBEgMKAQESAwoBCBIECgIICBIECgIIBBIAEgMKAQESABIECgIICBIECgIICBIECgIICBIAEgQKAggIEgUKAwgIASIJc2VwYXJhdG9yIg5wb29sV2VpZ2h0TXVsdCIPbWF4RGVwdGhEZWZhdWx0IhlmaW5hbGl6YXRpb25TdGFnZUJhbGFuY2VzIhZmaW5hbGl6YXRpb25TdGFnZVRvdGFsIhdmaW5hbGl6YXRpb25TdGFnZVNoYXJlcyILd2F2ZXNTdHJpbmciDmtleUVwb2NoTGVuZ3RoIhFrZXlFcG9jaExlbmd0aE5ldyIVa2V5RXBvY2hMZW5ndGhCeUVwb2NoIgVlcG9jaCIPa2V5Q3VycmVudEVwb2NoIgtrZXlNYXhEZXB0aCIQa2V5UmVzdW1wdGlvbkZlZSIia2V5Vm90aW5nRW1pc3Npb25DYW5kaWRhdGVDb250cmFjdCIda2V5Vm90aW5nRW1pc3Npb25SYXRlQ29udHJhY3QiEmtleUZhY3RvcnlDb250cmFjdCITa2V5Qm9vc3RpbmdDb250c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huth8E4erWybLPu7ULFa7bpB7QgAw6YLn3amCMAga4 Next: BL3oJzDQxq8t8jLPudSUKH8mn4h5SHVfixt7y6njYRmi Diff:
Old | New | Differences | |
---|---|---|---|
12 | 12 | let finalizationStageTotal = 1 | |
13 | 13 | ||
14 | 14 | let finalizationStageShares = 2 | |
15 | + | ||
16 | + | let wavesString = "WAVES" | |
15 | 17 | ||
16 | 18 | let keyEpochLength = makeString(["%s", "epochLength"], separator) | |
17 | 19 | ||
52 | 54 | ||
53 | 55 | let keyFinalizationShouldBeForced = makeString(["%s", "force"], separator) | |
54 | 56 | ||
57 | + | func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash" | |
58 | + | ||
59 | + | ||
60 | + | func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash" | |
61 | + | ||
62 | + | ||
55 | 63 | func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], separator) | |
56 | 64 | ||
57 | 65 | ||
59 | 67 | ||
60 | 68 | ||
61 | 69 | func keyInList (pool) = { | |
62 | - | let $ | |
63 | - | let amountAssetId = $ | |
64 | - | let priceAssetId = $ | |
70 | + | let $t021272167 = pool | |
71 | + | let amountAssetId = $t021272167._1 | |
72 | + | let priceAssetId = $t021272167._2 | |
65 | 73 | makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator) | |
66 | 74 | } | |
67 | 75 | ||
68 | 76 | ||
69 | 77 | func keyInsufficientBalances (pool,epoch) = { | |
70 | - | let $ | |
71 | - | let amountAssetId = $ | |
72 | - | let priceAssetId = $ | |
78 | + | let $t023162356 = pool | |
79 | + | let amountAssetId = $t023162356._1 | |
80 | + | let priceAssetId = $t023162356._2 | |
73 | 81 | makeString(["%s%s%s%d", "insufficientBalances", amountAssetId, priceAssetId, toString(epoch)], separator) | |
74 | 82 | } | |
75 | 83 | ||
78 | 86 | ||
79 | 87 | ||
80 | 88 | func keyVote (pool,address,epoch) = { | |
81 | - | let $ | |
82 | - | let amountAssetId = $ | |
83 | - | let priceAssetId = $ | |
89 | + | let $t026642704 = pool | |
90 | + | let amountAssetId = $t026642704._1 | |
91 | + | let priceAssetId = $t026642704._2 | |
84 | 92 | makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], separator) | |
85 | 93 | } | |
86 | 94 | ||
87 | 95 | ||
88 | 96 | func keyVotingResult (pool,epoch) = { | |
89 | - | let $ | |
90 | - | let amountAssetId = $ | |
91 | - | let priceAssetId = $ | |
97 | + | let $t028862926 = pool | |
98 | + | let amountAssetId = $t028862926._1 | |
99 | + | let priceAssetId = $t028862926._2 | |
92 | 100 | makeString(["%s%s%s%d", "votingResult", amountAssetId, priceAssetId, toString(epoch)], separator) | |
93 | 101 | } | |
94 | 102 | ||
97 | 105 | ||
98 | 106 | ||
99 | 107 | func keyPoolShare (pool,epoch) = { | |
100 | - | let $ | |
101 | - | let amountAssetId = $ | |
102 | - | let priceAssetId = $ | |
108 | + | let $t032473287 = pool | |
109 | + | let amountAssetId = $t032473287._1 | |
110 | + | let priceAssetId = $t032473287._2 | |
103 | 111 | makeString(["%s%s%s%d", "poolShare", amountAssetId, priceAssetId, toString(epoch)], separator) | |
104 | 112 | } | |
105 | 113 | ||
169 | 177 | func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp]) | |
170 | 178 | ||
171 | 179 | ||
180 | + | func parseAssetId (input) = if ((input == wavesString)) | |
181 | + | then unit | |
182 | + | else fromBase58String(input) | |
183 | + | ||
184 | + | ||
185 | + | func assetIdToString (input) = if ((input == unit)) | |
186 | + | then wavesString | |
187 | + | else toBase58String(value(input)) | |
188 | + | ||
189 | + | ||
172 | 190 | func getPoolInfo (amountAssetId,priceAssetId) = { | |
173 | 191 | let poolInfoOption = { | |
174 | 192 | let @ = invoke(factoryContract, "poolInfoREADONLY", [amountAssetId, priceAssetId], nil) | |
196 | 214 | ||
197 | 215 | ||
198 | 216 | func checkWxEmissionPoolLabel (pool) = { | |
199 | - | let $ | |
200 | - | let amountAssetId = $ | |
201 | - | let priceAssetId = $ | |
217 | + | let $t066476687 = pool | |
218 | + | let amountAssetId = $t066476687._1 | |
219 | + | let priceAssetId = $t066476687._2 | |
202 | 220 | let @ = invoke(factoryContract, "checkWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil) | |
203 | 221 | if ($isInstanceOf(@, "Boolean")) | |
204 | 222 | then @ | |
216 | 234 | let poolsListName = "pools" | |
217 | 235 | ||
218 | 236 | func getVotesListName (pool) = { | |
219 | - | let $ | |
220 | - | let amountAssetId = $ | |
221 | - | let priceAssetId = $ | |
237 | + | let $t071047144 = pool | |
238 | + | let amountAssetId = $t071047144._1 | |
239 | + | let priceAssetId = $t071047144._2 | |
222 | 240 | makeString(["votes", amountAssetId, priceAssetId], separator) | |
223 | 241 | } | |
224 | 242 | ||
517 | 535 | let epoch = getIntOrFail(this, keyCurrentEpoch) | |
518 | 536 | let epochPrevious = (epoch - 1) | |
519 | 537 | let pool = stringToPool(poolStr) | |
520 | - | let $ | |
521 | - | let amountAssetId = $ | |
522 | - | let priceAssetId = $ | |
538 | + | let $t01736817408 = pool | |
539 | + | let amountAssetId = $t01736817408._1 | |
540 | + | let priceAssetId = $t01736817408._2 | |
523 | 541 | let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId) | |
524 | 542 | let balanceIsOkCurrent = { | |
525 | 543 | let @ = invoke(factoryContract, "checkBalance", [lpAssetId], nil) | |
580 | 598 | if ((checkTargetEpoch == checkTargetEpoch)) | |
581 | 599 | then { | |
582 | 600 | let pool = stringToPool(poolStr) | |
583 | - | let $ | |
584 | - | let amountAssetId = $ | |
585 | - | let priceAssetId = $ | |
601 | + | let $t01976119801 = pool | |
602 | + | let amountAssetId = $t01976119801._1 | |
603 | + | let priceAssetId = $t01976119801._2 | |
586 | 604 | let gwxAmountAtEndTotal = { | |
587 | 605 | let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil) | |
588 | 606 | if ($isInstanceOf(@, "Int")) | |
639 | 657 | if ((checkTargetEpoch == checkTargetEpoch)) | |
640 | 658 | then { | |
641 | 659 | let pool = stringToPool(poolStr) | |
642 | - | let $ | |
643 | - | let amountAssetId = $ | |
644 | - | let priceAssetId = $ | |
660 | + | let $t02216422204 = pool | |
661 | + | let amountAssetId = $t02216422204._1 | |
662 | + | let priceAssetId = $t02216422204._2 | |
645 | 663 | let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract)) | |
646 | 664 | let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId) | |
647 | 665 | let r = { | |
953 | 971 | ||
954 | 972 | ||
955 | 973 | @Callable(i) | |
956 | - | func resume (amountAssetId,priceAssetId) = { | |
957 | - | let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId) | |
958 | - | let balanceIsOk = { | |
959 | - | let @ = invoke(factoryContract, "checkBalance", [lpAssetId], nil) | |
960 | - | if ($isInstanceOf(@, "Boolean")) | |
961 | - | then @ | |
962 | - | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
963 | - | } | |
964 | - | let payment = i.payments[0] | |
974 | + | func resume (amountAssetId,priceAssetId,slippageToleranceOrMinOutAmount) = { | |
975 | + | let $t03308533215 = valueOrErrorMessage(getPoolInfo(amountAssetId, priceAssetId), wrapErr("invalid assets")) | |
976 | + | let poolAddress = $t03308533215._1 | |
977 | + | let lpAssetId = $t03308533215._2 | |
978 | + | let feePayment = i.payments[0] | |
965 | 979 | let assetsStoreContract = addressFromStringValue(getStringValue(this, keyAssetsStoreContract)) | |
966 | 980 | let kBoostingConfig = "%s__config" | |
967 | 981 | let idxCfgAssetId = 1 | |
980 | 994 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
981 | 995 | } | |
982 | 996 | let resumptionFee = valueOrErrorMessage(getInteger(this, keyResumptionFee), "invalid resumption fee") | |
983 | - | let checks = [if ( | |
997 | + | let checks = [if ((feePayment.assetId == wxAssetId)) | |
984 | 998 | then true | |
985 | - | else throwErr(" | |
999 | + | else throwErr("invalid fee payment asset id"), if ((feePayment.amount == resumptionFee)) | |
986 | 1000 | then true | |
987 | - | else throwErr("1 payment is required"), if ((payment.assetId == wxAssetId)) | |
988 | - | then true | |
989 | - | else throwErr("invalid payment asset id"), if ((payment.amount == resumptionFee)) | |
990 | - | then true | |
991 | - | else throwErr("invalid payment amount"), if (if (amountAssetVerified) | |
1001 | + | else throwErr("invalid fee payment amount"), if (if (amountAssetVerified) | |
992 | 1002 | then priceAssetVerified | |
993 | 1003 | else false) | |
994 | 1004 | then true | |
995 | 1005 | else throwErr("both assets should be verified")] | |
996 | 1006 | if ((checks == checks)) | |
997 | 1007 | then { | |
998 | - | let | |
999 | - | if (( | |
1008 | + | let lpAssetBalanceBefore = assetBalance(this, lpAssetId) | |
1009 | + | if ((lpAssetBalanceBefore == lpAssetBalanceBefore)) | |
1000 | 1010 | then { | |
1001 | - | let pool = $Tuple2(amountAssetId, priceAssetId) | |
1002 | - | let inListActions = ([BooleanEntry(keyInList(pool), true)] ++ insertNodeActions(poolsListName, poolToString(pool))) | |
1003 | - | $Tuple2(inListActions, unit) | |
1011 | + | let autoStake = false | |
1012 | + | let put = if ((size(i.payments) == 1)) | |
1013 | + | then { | |
1014 | + | let balanceIsOk = { | |
1015 | + | let @ = invoke(factoryContract, "checkBalance", [assetIdToString(lpAssetId)], nil) | |
1016 | + | if ($isInstanceOf(@, "Boolean")) | |
1017 | + | then @ | |
1018 | + | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
1019 | + | } | |
1020 | + | if (balanceIsOk) | |
1021 | + | then true | |
1022 | + | else throwErr("assets should be attached") | |
1023 | + | } | |
1024 | + | else if ((size(i.payments) == 2)) | |
1025 | + | then { | |
1026 | + | let poolScriptHash = valueOrErrorMessage(scriptHash(poolAddress), wrapErr("pool address is not scripted")) | |
1027 | + | let allowedScriptHash = fromBase64String(valueOrErrorMessage(getString(factoryContract, keyAllowedLpStableScriptHash()), wrapErr("allowed lp stable script hash is not set"))) | |
1028 | + | let isStable = (poolScriptHash == allowedScriptHash) | |
1029 | + | let functionName = if (isStable) | |
1030 | + | then "putOneTknV2" | |
1031 | + | else "putOneTkn" | |
1032 | + | invoke(poolAddress, functionName, [slippageToleranceOrMinOutAmount, autoStake], [i.payments[1]]) | |
1033 | + | } | |
1034 | + | else if ((size(i.payments) == 3)) | |
1035 | + | then invoke(poolAddress, "put", [slippageToleranceOrMinOutAmount, autoStake], [i.payments[1], i.payments[2]]) | |
1036 | + | else throwErr("invalid payments size") | |
1037 | + | if ((put == put)) | |
1038 | + | then { | |
1039 | + | let lpAssetBalanceAfter = assetBalance(this, lpAssetId) | |
1040 | + | if ((lpAssetBalanceAfter == lpAssetBalanceAfter)) | |
1041 | + | then { | |
1042 | + | let lpAssetBalanceDiff = (lpAssetBalanceAfter - lpAssetBalanceBefore) | |
1043 | + | let lpAssetTransferActions = if ((lpAssetBalanceDiff > 0)) | |
1044 | + | then [ScriptTransfer(i.caller, lpAssetBalanceDiff, lpAssetId)] | |
1045 | + | else nil | |
1046 | + | let setWxEmissionInv = invoke(factoryContract, "setWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil) | |
1047 | + | if ((setWxEmissionInv == setWxEmissionInv)) | |
1048 | + | then { | |
1049 | + | let pool = $Tuple2(amountAssetId, priceAssetId) | |
1050 | + | let inListActions = ([BooleanEntry(keyInList(pool), true)] ++ insertNodeActions(poolsListName, poolToString(pool))) | |
1051 | + | $Tuple2((inListActions ++ lpAssetTransferActions), unit) | |
1052 | + | } | |
1053 | + | else throw("Strict value is not equal to itself.") | |
1054 | + | } | |
1055 | + | else throw("Strict value is not equal to itself.") | |
1056 | + | } | |
1057 | + | else throw("Strict value is not equal to itself.") | |
1004 | 1058 | } | |
1005 | 1059 | else throw("Strict value is not equal to itself.") | |
1006 | 1060 | } |
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 finalizationStageBalances = 0 | |
11 | 11 | ||
12 | 12 | let finalizationStageTotal = 1 | |
13 | 13 | ||
14 | 14 | let finalizationStageShares = 2 | |
15 | + | ||
16 | + | let wavesString = "WAVES" | |
15 | 17 | ||
16 | 18 | let keyEpochLength = makeString(["%s", "epochLength"], separator) | |
17 | 19 | ||
18 | 20 | let keyEpochLengthNew = makeString(["%s%s", "epochLength__new"], separator) | |
19 | 21 | ||
20 | 22 | func keyEpochLengthByEpoch (epoch) = makeString(["%s%d", "epochLength", toString(epoch)], separator) | |
21 | 23 | ||
22 | 24 | ||
23 | 25 | let keyCurrentEpoch = makeString(["%s", "currentEpoch"], separator) | |
24 | 26 | ||
25 | 27 | let keyMaxDepth = makeString(["%s", "maxDepth"], separator) | |
26 | 28 | ||
27 | 29 | let keyResumptionFee = makeString(["%s", "resumptionFee"], separator) | |
28 | 30 | ||
29 | 31 | let keyVotingEmissionCandidateContract = makeString(["%s", "votingEmissionCandidateContract"], separator) | |
30 | 32 | ||
31 | 33 | let keyVotingEmissionRateContract = makeString(["%s", "votingEmissionRateContract"], separator) | |
32 | 34 | ||
33 | 35 | let keyFactoryContract = makeString(["%s", "factoryContract"], separator) | |
34 | 36 | ||
35 | 37 | let keyBoostingContract = makeString(["%s", "boostingContract"], separator) | |
36 | 38 | ||
37 | 39 | let keyStakingContract = makeString(["%s", "stakingContract"], separator) | |
38 | 40 | ||
39 | 41 | let keyAssetsStoreContract = makeString(["%s", "assetsStoreContract"], separator) | |
40 | 42 | ||
41 | 43 | let keyFinalizationStage = makeString(["%s", "finalizationStage"], separator) | |
42 | 44 | ||
43 | 45 | let keyNextPool = makeString(["%s", "nextPool"], separator) | |
44 | 46 | ||
45 | 47 | let keyNextUser = makeString(["%s", "nextUser"], separator) | |
46 | 48 | ||
47 | 49 | let keyStartHeight = makeString(["%s", "startHeight"], separator) | |
48 | 50 | ||
49 | 51 | let keyCurrentEpochUi = makeString(["%s", "currentEpochUi"], separator) | |
50 | 52 | ||
51 | 53 | let keyStartHeightUi = makeString(["%s", "startHeightUi"], separator) | |
52 | 54 | ||
53 | 55 | let keyFinalizationShouldBeForced = makeString(["%s", "force"], separator) | |
54 | 56 | ||
57 | + | func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash" | |
58 | + | ||
59 | + | ||
60 | + | func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash" | |
61 | + | ||
62 | + | ||
55 | 63 | func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], separator) | |
56 | 64 | ||
57 | 65 | ||
58 | 66 | func keyFinalized (epoch) = makeString(["%s%d", "finalized", toString(epoch)], separator) | |
59 | 67 | ||
60 | 68 | ||
61 | 69 | func keyInList (pool) = { | |
62 | - | let $ | |
63 | - | let amountAssetId = $ | |
64 | - | let priceAssetId = $ | |
70 | + | let $t021272167 = pool | |
71 | + | let amountAssetId = $t021272167._1 | |
72 | + | let priceAssetId = $t021272167._2 | |
65 | 73 | makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator) | |
66 | 74 | } | |
67 | 75 | ||
68 | 76 | ||
69 | 77 | func keyInsufficientBalances (pool,epoch) = { | |
70 | - | let $ | |
71 | - | let amountAssetId = $ | |
72 | - | let priceAssetId = $ | |
78 | + | let $t023162356 = pool | |
79 | + | let amountAssetId = $t023162356._1 | |
80 | + | let priceAssetId = $t023162356._2 | |
73 | 81 | makeString(["%s%s%s%d", "insufficientBalances", amountAssetId, priceAssetId, toString(epoch)], separator) | |
74 | 82 | } | |
75 | 83 | ||
76 | 84 | ||
77 | 85 | func keyUsed (address,epoch) = makeString(["%s%s%d", "used", toString(address), toString(epoch)], separator) | |
78 | 86 | ||
79 | 87 | ||
80 | 88 | func keyVote (pool,address,epoch) = { | |
81 | - | let $ | |
82 | - | let amountAssetId = $ | |
83 | - | let priceAssetId = $ | |
89 | + | let $t026642704 = pool | |
90 | + | let amountAssetId = $t026642704._1 | |
91 | + | let priceAssetId = $t026642704._2 | |
84 | 92 | makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], separator) | |
85 | 93 | } | |
86 | 94 | ||
87 | 95 | ||
88 | 96 | func keyVotingResult (pool,epoch) = { | |
89 | - | let $ | |
90 | - | let amountAssetId = $ | |
91 | - | let priceAssetId = $ | |
97 | + | let $t028862926 = pool | |
98 | + | let amountAssetId = $t028862926._1 | |
99 | + | let priceAssetId = $t028862926._2 | |
92 | 100 | makeString(["%s%s%s%d", "votingResult", amountAssetId, priceAssetId, toString(epoch)], separator) | |
93 | 101 | } | |
94 | 102 | ||
95 | 103 | ||
96 | 104 | func keyVotingResultStaked (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStaked", lpAssetIdStr, toString(epoch)], separator) | |
97 | 105 | ||
98 | 106 | ||
99 | 107 | func keyPoolShare (pool,epoch) = { | |
100 | - | let $ | |
101 | - | let amountAssetId = $ | |
102 | - | let priceAssetId = $ | |
108 | + | let $t032473287 = pool | |
109 | + | let amountAssetId = $t032473287._1 | |
110 | + | let priceAssetId = $t032473287._2 | |
103 | 111 | makeString(["%s%s%s%d", "poolShare", amountAssetId, priceAssetId, toString(epoch)], separator) | |
104 | 112 | } | |
105 | 113 | ||
106 | 114 | ||
107 | 115 | func keyTotalVotes (epoch) = makeString(["%s%d", "totalVotes", toString(epoch)], separator) | |
108 | 116 | ||
109 | 117 | ||
110 | 118 | func keyStakedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s", "staked", userAddressStr, lpAssetIdStr], separator) | |
111 | 119 | ||
112 | 120 | ||
113 | 121 | func wrapErr (msg) = makeString(["voting_emission.ride:", msg], " ") | |
114 | 122 | ||
115 | 123 | ||
116 | 124 | func throwErr (msg) = throw(wrapErr(msg)) | |
117 | 125 | ||
118 | 126 | ||
119 | 127 | func getValueOrFail (address,key,type) = { | |
120 | 128 | let error = wrapErr(makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
121 | 129 | valueOrErrorMessage( match type { | |
122 | 130 | case str: String => | |
123 | 131 | getString(address, key) | |
124 | 132 | case int: Int => | |
125 | 133 | getInteger(address, key) | |
126 | 134 | case _ => | |
127 | 135 | throwErr("invalid entry type") | |
128 | 136 | }, error) | |
129 | 137 | } | |
130 | 138 | ||
131 | 139 | ||
132 | 140 | func getStrOrFail (address,key) = { | |
133 | 141 | let @ = getValueOrFail(address, key, "") | |
134 | 142 | if ($isInstanceOf(@, "String")) | |
135 | 143 | then @ | |
136 | 144 | else throw(($getType(@) + " couldn't be cast to String")) | |
137 | 145 | } | |
138 | 146 | ||
139 | 147 | ||
140 | 148 | func getIntOrFail (address,key) = { | |
141 | 149 | let @ = getValueOrFail(address, key, 0) | |
142 | 150 | if ($isInstanceOf(@, "Int")) | |
143 | 151 | then @ | |
144 | 152 | else throw(($getType(@) + " couldn't be cast to Int")) | |
145 | 153 | } | |
146 | 154 | ||
147 | 155 | ||
148 | 156 | func poolToString (pool) = ((pool._1 + separator) + pool._2) | |
149 | 157 | ||
150 | 158 | ||
151 | 159 | func stringToPool (str) = { | |
152 | 160 | let parts = split(str, separator) | |
153 | 161 | if ((size(parts) == 2)) | |
154 | 162 | then $Tuple2(parts[0], parts[1]) | |
155 | 163 | else throwErr("invalid pool string") | |
156 | 164 | } | |
157 | 165 | ||
158 | 166 | ||
159 | 167 | let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract)) | |
160 | 168 | ||
161 | 169 | let IdxFactoryCfgGwxRewardDapp = 10 | |
162 | 170 | ||
163 | 171 | func keyFactoryCfg () = "%s__factoryConfig" | |
164 | 172 | ||
165 | 173 | ||
166 | 174 | func readFactoryCfgOrFail (factory) = split(getStrOrFail(factory, keyFactoryCfg()), separator) | |
167 | 175 | ||
168 | 176 | ||
169 | 177 | func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp]) | |
170 | 178 | ||
171 | 179 | ||
180 | + | func parseAssetId (input) = if ((input == wavesString)) | |
181 | + | then unit | |
182 | + | else fromBase58String(input) | |
183 | + | ||
184 | + | ||
185 | + | func assetIdToString (input) = if ((input == unit)) | |
186 | + | then wavesString | |
187 | + | else toBase58String(value(input)) | |
188 | + | ||
189 | + | ||
172 | 190 | func getPoolInfo (amountAssetId,priceAssetId) = { | |
173 | 191 | let poolInfoOption = { | |
174 | 192 | let @ = invoke(factoryContract, "poolInfoREADONLY", [amountAssetId, priceAssetId], nil) | |
175 | 193 | if ($isInstanceOf(@, "(Address, ByteVector)")) | |
176 | 194 | then @ | |
177 | 195 | else unit | |
178 | 196 | } | |
179 | 197 | poolInfoOption | |
180 | 198 | } | |
181 | 199 | ||
182 | 200 | ||
183 | 201 | func getLpAssetByPoolAssets (amountAssetId,priceAssetId) = { | |
184 | 202 | func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr) | |
185 | 203 | ||
186 | 204 | func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract") | |
187 | 205 | ||
188 | 206 | func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset") | |
189 | 207 | ||
190 | 208 | let amountAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amountAssetId)) | |
191 | 209 | let priceAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAssetId)) | |
192 | 210 | let poolContractAddress = getStrOrFail(factoryContract, keyMappingPoolAssetsToPoolContractAddress(amountAssetInternalId, priceAssetInternalId)) | |
193 | 211 | let lpAssetId = getStrOrFail(factoryContract, keyMappingPoolContractToLPAsset(poolContractAddress)) | |
194 | 212 | lpAssetId | |
195 | 213 | } | |
196 | 214 | ||
197 | 215 | ||
198 | 216 | func checkWxEmissionPoolLabel (pool) = { | |
199 | - | let $ | |
200 | - | let amountAssetId = $ | |
201 | - | let priceAssetId = $ | |
217 | + | let $t066476687 = pool | |
218 | + | let amountAssetId = $t066476687._1 | |
219 | + | let priceAssetId = $t066476687._2 | |
202 | 220 | let @ = invoke(factoryContract, "checkWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil) | |
203 | 221 | if ($isInstanceOf(@, "Boolean")) | |
204 | 222 | then @ | |
205 | 223 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
206 | 224 | } | |
207 | 225 | ||
208 | 226 | ||
209 | 227 | func gwxRewardDeposit () = { | |
210 | 228 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
211 | 229 | let gwxRewardsContract = getGwxRewardAddressOrFail(factoryCfg) | |
212 | 230 | invoke(gwxRewardsContract, "deposit", nil, nil) | |
213 | 231 | } | |
214 | 232 | ||
215 | 233 | ||
216 | 234 | let poolsListName = "pools" | |
217 | 235 | ||
218 | 236 | func getVotesListName (pool) = { | |
219 | - | let $ | |
220 | - | let amountAssetId = $ | |
221 | - | let priceAssetId = $ | |
237 | + | let $t071047144 = pool | |
238 | + | let amountAssetId = $t071047144._1 | |
239 | + | let priceAssetId = $t071047144._2 | |
222 | 240 | makeString(["votes", amountAssetId, priceAssetId], separator) | |
223 | 241 | } | |
224 | 242 | ||
225 | 243 | ||
226 | 244 | func keyListHead (listName) = { | |
227 | 245 | let meta = if ((listName == poolsListName)) | |
228 | 246 | then "%s%s" | |
229 | 247 | else "%s%s%s%s" | |
230 | 248 | makeString([meta, listName, "head"], separator) | |
231 | 249 | } | |
232 | 250 | ||
233 | 251 | ||
234 | 252 | func keyListSize (listName) = { | |
235 | 253 | let meta = if ((listName == poolsListName)) | |
236 | 254 | then "%s%s" | |
237 | 255 | else "%s%s%s%s" | |
238 | 256 | makeString([meta, listName, "size"], separator) | |
239 | 257 | } | |
240 | 258 | ||
241 | 259 | ||
242 | 260 | func keyListPrev (listName,id) = { | |
243 | 261 | let meta = if ((listName == poolsListName)) | |
244 | 262 | then "%s%s%s%s" | |
245 | 263 | else "%s%s%s%s%s" | |
246 | 264 | makeString([meta, listName, id, "prev"], separator) | |
247 | 265 | } | |
248 | 266 | ||
249 | 267 | ||
250 | 268 | func keyListNext (listName,id) = { | |
251 | 269 | let meta = if ((listName == poolsListName)) | |
252 | 270 | then "%s%s%s%s" | |
253 | 271 | else "%s%s%s%s%s" | |
254 | 272 | makeString([meta, listName, id, "next"], separator) | |
255 | 273 | } | |
256 | 274 | ||
257 | 275 | ||
258 | 276 | func containsNode (listName,id) = { | |
259 | 277 | let headOrUnit = getString(this, keyListHead(listName)) | |
260 | 278 | let prevOrUnit = getString(this, keyListPrev(listName, id)) | |
261 | 279 | let nextOrUnit = getString(this, keyListNext(listName, id)) | |
262 | 280 | if (if ((id == valueOrElse(headOrUnit, ""))) | |
263 | 281 | then true | |
264 | 282 | else (prevOrUnit != unit)) | |
265 | 283 | then true | |
266 | 284 | else (nextOrUnit != unit) | |
267 | 285 | } | |
268 | 286 | ||
269 | 287 | ||
270 | 288 | func insertNodeActions (listName,id) = { | |
271 | 289 | let headOrUnit = getString(this, keyListHead(listName)) | |
272 | 290 | let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0) | |
273 | 291 | let checkNode = if (!(containsNode(listName, id))) | |
274 | 292 | then true | |
275 | 293 | else throwErr("Node exists") | |
276 | 294 | if ((checkNode == checkNode)) | |
277 | 295 | then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit)) | |
278 | 296 | then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)] | |
279 | 297 | else nil)) ++ [StringEntry(keyListHead(listName), id)]) | |
280 | 298 | else throw("Strict value is not equal to itself.") | |
281 | 299 | } | |
282 | 300 | ||
283 | 301 | ||
284 | 302 | func deleteNodeActions (listName,id) = { | |
285 | 303 | let headOrUnit = getString(this, keyListHead(listName)) | |
286 | 304 | let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0) | |
287 | 305 | let prevOrUnit = getString(this, keyListPrev(listName, id)) | |
288 | 306 | let nextOrUnit = getString(this, keyListNext(listName, id)) | |
289 | 307 | ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit)) | |
290 | 308 | then (nextOrUnit != unit) | |
291 | 309 | else false) | |
292 | 310 | then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))] | |
293 | 311 | else if ((nextOrUnit != unit)) | |
294 | 312 | then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))] | |
295 | 313 | else if ((prevOrUnit != unit)) | |
296 | 314 | then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))] | |
297 | 315 | else if ((id == valueOrElse(headOrUnit, ""))) | |
298 | 316 | then [DeleteEntry(keyListHead(listName))] | |
299 | 317 | else throwErr(((("invalid node: " + listName) + ".") + id)))) | |
300 | 318 | } | |
301 | 319 | ||
302 | 320 | ||
303 | 321 | func keyManagerVaultAddress () = "%s__managerVaultAddress" | |
304 | 322 | ||
305 | 323 | ||
306 | 324 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
307 | 325 | ||
308 | 326 | ||
309 | 327 | func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) { | |
310 | 328 | case s: String => | |
311 | 329 | addressFromStringValue(s) | |
312 | 330 | case _ => | |
313 | 331 | this | |
314 | 332 | } | |
315 | 333 | ||
316 | 334 | ||
317 | 335 | func managerPublicKeyOrUnit () = { | |
318 | 336 | let managerVaultAddress = getManagerVaultAddressOrThis() | |
319 | 337 | match getString(managerVaultAddress, keyManagerPublicKey()) { | |
320 | 338 | case s: String => | |
321 | 339 | fromBase58String(s) | |
322 | 340 | case _: Unit => | |
323 | 341 | unit | |
324 | 342 | case _ => | |
325 | 343 | throw("Match error") | |
326 | 344 | } | |
327 | 345 | } | |
328 | 346 | ||
329 | 347 | ||
330 | 348 | func isManager (i) = match managerPublicKeyOrUnit() { | |
331 | 349 | case pk: ByteVector => | |
332 | 350 | (i.callerPublicKey == pk) | |
333 | 351 | case _: Unit => | |
334 | 352 | (i.caller == this) | |
335 | 353 | case _ => | |
336 | 354 | throw("Match error") | |
337 | 355 | } | |
338 | 356 | ||
339 | 357 | ||
340 | 358 | func mustManager (i) = if (isManager(i)) | |
341 | 359 | then true | |
342 | 360 | else throw("permission denied") | |
343 | 361 | ||
344 | 362 | ||
345 | 363 | func mustThis (i) = if ((i.caller == this)) | |
346 | 364 | then true | |
347 | 365 | else throw("permission denied") | |
348 | 366 | ||
349 | 367 | ||
350 | 368 | @Callable(i) | |
351 | 369 | func getUserGwxAmountAtHeight (userAddress,targetHeight) = { | |
352 | 370 | let boostingContractAddress = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyBoostingContract)), wrapErr("invalid boosting contract address")) | |
353 | 371 | $Tuple2(nil, { | |
354 | 372 | let @ = invoke(boostingContractAddress, "getUserGwxAmountAtHeightREADONLY", [userAddress, targetHeight], nil) | |
355 | 373 | if ($isInstanceOf(@, "Int")) | |
356 | 374 | then @ | |
357 | 375 | else throw(($getType(@) + " couldn't be cast to Int")) | |
358 | 376 | }) | |
359 | 377 | } | |
360 | 378 | ||
361 | 379 | ||
362 | 380 | ||
363 | 381 | @Callable(i) | |
364 | 382 | func constructor (factoryContract,votingEmissionCandidateContract,boostingContract,stakingContract,epochLength) = { | |
365 | 383 | let checks = [mustManager(i), if ((addressFromString(factoryContract) != unit)) | |
366 | 384 | then true | |
367 | 385 | else "invalid factory contract address", if ((addressFromString(votingEmissionCandidateContract) != unit)) | |
368 | 386 | then true | |
369 | 387 | else "invalid voting emission candidate contract address", if ((addressFromString(boostingContract) != unit)) | |
370 | 388 | then true | |
371 | 389 | else "invalid boosting contract address", if ((addressFromString(stakingContract) != unit)) | |
372 | 390 | then true | |
373 | 391 | else "invalid staking contract address", if ((epochLength > 0)) | |
374 | 392 | then true | |
375 | 393 | else throwErr("invalid epoch length")] | |
376 | 394 | if ((checks == checks)) | |
377 | 395 | then $Tuple2([StringEntry(keyFactoryContract, factoryContract), StringEntry(keyVotingEmissionCandidateContract, votingEmissionCandidateContract), StringEntry(keyBoostingContract, boostingContract), StringEntry(keyStakingContract, stakingContract), IntegerEntry(keyEpochLength, epochLength)], unit) | |
378 | 396 | else throw("Strict value is not equal to itself.") | |
379 | 397 | } | |
380 | 398 | ||
381 | 399 | ||
382 | 400 | ||
383 | 401 | @Callable(i) | |
384 | 402 | func create (amountAssetId,priceAssetId) = { | |
385 | 403 | let checks = [if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionCandidateContract), ""))) | |
386 | 404 | then true | |
387 | 405 | else mustManager(i)] | |
388 | 406 | if ((checks == checks)) | |
389 | 407 | then { | |
390 | 408 | let pool = $Tuple2(amountAssetId, priceAssetId) | |
391 | 409 | let inListActions = ([BooleanEntry(keyInList(pool), true)] ++ insertNodeActions(poolsListName, poolToString(pool))) | |
392 | 410 | let currentEpochIsNotDefined = (getInteger(this, keyCurrentEpoch) == unit) | |
393 | 411 | let startHeightActions = if (currentEpochIsNotDefined) | |
394 | 412 | then { | |
395 | 413 | let epoch = 0 | |
396 | 414 | [IntegerEntry(keyCurrentEpoch, epoch), IntegerEntry(keyStartHeightByEpoch(epoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, height)] | |
397 | 415 | } | |
398 | 416 | else nil | |
399 | 417 | $Tuple2((inListActions ++ startHeightActions), unit) | |
400 | 418 | } | |
401 | 419 | else throw("Strict value is not equal to itself.") | |
402 | 420 | } | |
403 | 421 | ||
404 | 422 | ||
405 | 423 | ||
406 | 424 | @Callable(i) | |
407 | 425 | func vote (amountAssetId,priceAssetId,amount) = { | |
408 | 426 | let pool = $Tuple2(amountAssetId, priceAssetId) | |
409 | 427 | let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0) | |
410 | 428 | let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch)) | |
411 | 429 | let epochLength = getIntOrFail(this, keyEpochLength) | |
412 | 430 | let endHeight = (startHeight + epochLength) | |
413 | 431 | let finalizationStageOrUnit = getInteger(this, keyFinalizationStage) | |
414 | 432 | let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0) | |
415 | 433 | let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0) | |
416 | 434 | let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0) | |
417 | 435 | let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0) | |
418 | 436 | let gwxAmountAtEndTotal = { | |
419 | 437 | let @ = invoke(this, "getUserGwxAmountAtHeight", [toBase58String(i.caller.bytes), endHeight], nil) | |
420 | 438 | if ($isInstanceOf(@, "Int")) | |
421 | 439 | then @ | |
422 | 440 | else throw(($getType(@) + " couldn't be cast to Int")) | |
423 | 441 | } | |
424 | 442 | let available = (gwxAmountAtEndTotal - used) | |
425 | 443 | let newVote = (vote + amount) | |
426 | 444 | let wxEmission = checkWxEmissionPoolLabel(pool) | |
427 | 445 | let checks = [if ((getBoolean(keyInList(pool)) != unit)) | |
428 | 446 | then true | |
429 | 447 | else throwErr("invalid assets"), if ((endHeight > height)) | |
430 | 448 | then true | |
431 | 449 | else throwErr("invalid height"), if ((finalizationStageOrUnit == unit)) | |
432 | 450 | then true | |
433 | 451 | else throwErr("finalization in progress"), if ((gwxAmountAtEndTotal > 0)) | |
434 | 452 | then true | |
435 | 453 | else throwErr("you do not have gWX"), if (if ((amount > 0)) | |
436 | 454 | then (available >= amount) | |
437 | 455 | else false) | |
438 | 456 | then true | |
439 | 457 | else throwErr("invalid amount"), if (wxEmission) | |
440 | 458 | then true | |
441 | 459 | else throwErr("pool hasn't WX_EMISSION label")] | |
442 | 460 | if ((checks == checks)) | |
443 | 461 | then { | |
444 | 462 | let votesListName = getVotesListName(pool) | |
445 | 463 | let userAddressStr = toString(i.caller) | |
446 | 464 | let votesListActions = if (containsNode(votesListName, userAddressStr)) | |
447 | 465 | then nil | |
448 | 466 | else insertNodeActions(votesListName, userAddressStr) | |
449 | 467 | $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) | |
450 | 468 | } | |
451 | 469 | else throw("Strict value is not equal to itself.") | |
452 | 470 | } | |
453 | 471 | ||
454 | 472 | ||
455 | 473 | ||
456 | 474 | @Callable(i) | |
457 | 475 | func cancelVote (amountAssetId,priceAssetId) = { | |
458 | 476 | let pool = $Tuple2(amountAssetId, priceAssetId) | |
459 | 477 | let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0) | |
460 | 478 | let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch)) | |
461 | 479 | let epochLength = getIntOrFail(this, keyEpochLength) | |
462 | 480 | let endHeight = (startHeight + epochLength) | |
463 | 481 | let finalizationStageOrUnit = getInteger(this, keyFinalizationStage) | |
464 | 482 | let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0) | |
465 | 483 | let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0) | |
466 | 484 | let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0) | |
467 | 485 | let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0) | |
468 | 486 | let checks = [if ((getBoolean(keyInList(pool)) != unit)) | |
469 | 487 | then true | |
470 | 488 | else throwErr("invalid assets"), if ((endHeight > height)) | |
471 | 489 | then true | |
472 | 490 | else throwErr("invalid height"), if ((finalizationStageOrUnit == unit)) | |
473 | 491 | then true | |
474 | 492 | else throwErr("finalization in progress"), if ((vote > 0)) | |
475 | 493 | then true | |
476 | 494 | else throwErr("no vote")] | |
477 | 495 | if ((checks == checks)) | |
478 | 496 | then { | |
479 | 497 | let votesListName = getVotesListName(pool) | |
480 | 498 | let userAddressStr = toString(i.caller) | |
481 | 499 | $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) | |
482 | 500 | } | |
483 | 501 | else throw("Strict value is not equal to itself.") | |
484 | 502 | } | |
485 | 503 | ||
486 | 504 | ||
487 | 505 | ||
488 | 506 | @Callable(i) | |
489 | 507 | func setEpochLength (newEpochLength) = { | |
490 | 508 | let checks = [mustManager(i), if ((newEpochLength > 0)) | |
491 | 509 | then true | |
492 | 510 | else throwErr("invalid epoch length")] | |
493 | 511 | if ((checks == checks)) | |
494 | 512 | then $Tuple2([IntegerEntry(keyEpochLengthNew, newEpochLength)], unit) | |
495 | 513 | else throw("Strict value is not equal to itself.") | |
496 | 514 | } | |
497 | 515 | ||
498 | 516 | ||
499 | 517 | ||
500 | 518 | @Callable(i) | |
501 | 519 | func setMaxDepth (newMaxDepth) = { | |
502 | 520 | let checks = [mustManager(i), if ((newMaxDepth > 0)) | |
503 | 521 | then true | |
504 | 522 | else throwErr("invalid max depth")] | |
505 | 523 | if ((checks == checks)) | |
506 | 524 | then $Tuple2([IntegerEntry(keyMaxDepth, newMaxDepth)], unit) | |
507 | 525 | else throw("Strict value is not equal to itself.") | |
508 | 526 | } | |
509 | 527 | ||
510 | 528 | ||
511 | 529 | ||
512 | 530 | @Callable(i) | |
513 | 531 | func processPoolBalanceINTERNAL (poolStr) = { | |
514 | 532 | let checkCaller = mustThis(i) | |
515 | 533 | if ((checkCaller == checkCaller)) | |
516 | 534 | then { | |
517 | 535 | let epoch = getIntOrFail(this, keyCurrentEpoch) | |
518 | 536 | let epochPrevious = (epoch - 1) | |
519 | 537 | let pool = stringToPool(poolStr) | |
520 | - | let $ | |
521 | - | let amountAssetId = $ | |
522 | - | let priceAssetId = $ | |
538 | + | let $t01736817408 = pool | |
539 | + | let amountAssetId = $t01736817408._1 | |
540 | + | let priceAssetId = $t01736817408._2 | |
523 | 541 | let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId) | |
524 | 542 | let balanceIsOkCurrent = { | |
525 | 543 | let @ = invoke(factoryContract, "checkBalance", [lpAssetId], nil) | |
526 | 544 | if ($isInstanceOf(@, "Boolean")) | |
527 | 545 | then @ | |
528 | 546 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
529 | 547 | } | |
530 | 548 | let balanceIsOkPrevious = !(valueOrElse(getBoolean(this, keyInsufficientBalances(pool, (epochPrevious - 1))), false)) | |
531 | 549 | let actions = if (!(balanceIsOkCurrent)) | |
532 | 550 | then if (!(balanceIsOkPrevious)) | |
533 | 551 | then { | |
534 | 552 | let deleteWxEmissionInv = invoke(factoryContract, "deleteWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil) | |
535 | 553 | if ((deleteWxEmissionInv == deleteWxEmissionInv)) | |
536 | 554 | then { | |
537 | 555 | let modifyWeightInv = invoke(factoryContract, "modifyWeight", [lpAssetId, 0], nil) | |
538 | 556 | if ((modifyWeightInv == modifyWeightInv)) | |
539 | 557 | then { | |
540 | 558 | let poolAddress = valueOrErrorMessage(getPoolInfo(amountAssetId, priceAssetId), wrapErr("invalid assets"))._1 | |
541 | 559 | let newStatus = 3 | |
542 | 560 | let setPoolStatusInv = invoke(factoryContract, "managePool", [toString(poolAddress), newStatus], nil) | |
543 | 561 | if ((setPoolStatusInv == setPoolStatusInv)) | |
544 | 562 | then { | |
545 | 563 | let listActions = ([DeleteEntry(keyInList(pool))] ++ deleteNodeActions(poolsListName, poolToString(pool))) | |
546 | 564 | ([IntegerEntry(keyPoolShare(pool, epochPrevious), 0)] ++ listActions) | |
547 | 565 | } | |
548 | 566 | else throw("Strict value is not equal to itself.") | |
549 | 567 | } | |
550 | 568 | else throw("Strict value is not equal to itself.") | |
551 | 569 | } | |
552 | 570 | else throw("Strict value is not equal to itself.") | |
553 | 571 | } | |
554 | 572 | else [BooleanEntry(keyInsufficientBalances(pool, epochPrevious), true)] | |
555 | 573 | else nil | |
556 | 574 | $Tuple2(actions, unit) | |
557 | 575 | } | |
558 | 576 | else throw("Strict value is not equal to itself.") | |
559 | 577 | } | |
560 | 578 | ||
561 | 579 | ||
562 | 580 | ||
563 | 581 | @Callable(i) | |
564 | 582 | func processVoteINTERNAL (poolStr,userAddressStr) = { | |
565 | 583 | let checkCaller = mustThis(i) | |
566 | 584 | if ((checkCaller == checkCaller)) | |
567 | 585 | then { | |
568 | 586 | let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr(("processVoteINTERNAL: invalid user address " + userAddressStr))) | |
569 | 587 | let epoch = getIntOrFail(this, keyCurrentEpoch) | |
570 | 588 | let epochPrevious = (epoch - 1) | |
571 | 589 | let epochLength = getIntOrFail(this, keyEpochLength) | |
572 | 590 | let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch)) | |
573 | 591 | let endHeight = (startHeight + epochLength) | |
574 | 592 | let startHeightPrevious = getIntOrFail(this, keyStartHeightByEpoch(epochPrevious)) | |
575 | 593 | let epochLengthPrevious = getIntOrFail(this, keyEpochLengthByEpoch(epochPrevious)) | |
576 | 594 | let endHeightPrevious = (startHeightPrevious + epochLengthPrevious) | |
577 | 595 | let checkTargetEpoch = if ((epochPrevious >= 0)) | |
578 | 596 | then true | |
579 | 597 | else throwErr("processVoteINTERNAL: invalid previous epoch") | |
580 | 598 | if ((checkTargetEpoch == checkTargetEpoch)) | |
581 | 599 | then { | |
582 | 600 | let pool = stringToPool(poolStr) | |
583 | - | let $ | |
584 | - | let amountAssetId = $ | |
585 | - | let priceAssetId = $ | |
601 | + | let $t01976119801 = pool | |
602 | + | let amountAssetId = $t01976119801._1 | |
603 | + | let priceAssetId = $t01976119801._2 | |
586 | 604 | let gwxAmountAtEndTotal = { | |
587 | 605 | let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil) | |
588 | 606 | if ($isInstanceOf(@, "Int")) | |
589 | 607 | then @ | |
590 | 608 | else throw(($getType(@) + " couldn't be cast to Int")) | |
591 | 609 | } | |
592 | 610 | let gwxAmountAtEndTotalPrevious = { | |
593 | 611 | let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeightPrevious], nil) | |
594 | 612 | if ($isInstanceOf(@, "Int")) | |
595 | 613 | then @ | |
596 | 614 | else throw(($getType(@) + " couldn't be cast to Int")) | |
597 | 615 | } | |
598 | 616 | let totalVotes = valueOrElse(getInteger(keyTotalVotes(epoch)), 0) | |
599 | 617 | let votingResult = valueOrElse(getInteger(keyVotingResult(pool, epoch)), 0) | |
600 | 618 | let votePrevious = valueOrErrorMessage(getInteger(keyVote(pool, userAddress, epochPrevious)), wrapErr((((("processVoteINTERNAL " + poolStr) + " ") + userAddressStr) + ": no previous vote"))) | |
601 | 619 | let used = valueOrElse(getInteger(this, keyUsed(userAddress, epoch)), 0) | |
602 | 620 | let lpAssetIdStr = getLpAssetByPoolAssets(amountAssetId, priceAssetId) | |
603 | 621 | let votingResultStakedPrevious = valueOrElse(getInteger(keyVotingResultStaked(lpAssetIdStr, epochPrevious)), 0) | |
604 | 622 | let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract)) | |
605 | 623 | let stakedByUser = valueOrElse(getInteger(stakingContract, keyStakedByUser(lpAssetIdStr, userAddressStr)), 0) | |
606 | 624 | let votingResultStakedActions = if ((stakedByUser == 0)) | |
607 | 625 | then nil | |
608 | 626 | else [IntegerEntry(keyVotingResultStaked(lpAssetIdStr, epochPrevious), (votingResultStakedPrevious + votePrevious))] | |
609 | 627 | let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId) | |
610 | 628 | let newVote = if ((gwxAmountAtEndTotalPrevious > 0)) | |
611 | 629 | then fraction(votePrevious, gwxAmountAtEndTotal, gwxAmountAtEndTotalPrevious) | |
612 | 630 | else 0 | |
613 | 631 | let actions = if ((newVote > 0)) | |
614 | 632 | then [IntegerEntry(keyVote(pool, userAddress, epoch), newVote), IntegerEntry(keyTotalVotes(epoch), (totalVotes + newVote)), IntegerEntry(keyVotingResult(pool, epoch), (votingResult + newVote)), IntegerEntry(keyUsed(userAddress, epoch), (used + newVote))] | |
615 | 633 | else deleteNodeActions(getVotesListName(pool), userAddressStr) | |
616 | 634 | $Tuple2((actions ++ votingResultStakedActions), unit) | |
617 | 635 | } | |
618 | 636 | else throw("Strict value is not equal to itself.") | |
619 | 637 | } | |
620 | 638 | else throw("Strict value is not equal to itself.") | |
621 | 639 | } | |
622 | 640 | ||
623 | 641 | ||
624 | 642 | ||
625 | 643 | @Callable(i) | |
626 | 644 | func processPoolINTERNAL (poolStr,force) = { | |
627 | 645 | let checkCaller = mustThis(i) | |
628 | 646 | if ((checkCaller == checkCaller)) | |
629 | 647 | then { | |
630 | 648 | let targetEpoch = { | |
631 | 649 | let currentEpoch = getIntOrFail(this, keyCurrentEpoch) | |
632 | 650 | if (force) | |
633 | 651 | then currentEpoch | |
634 | 652 | else (currentEpoch - 1) | |
635 | 653 | } | |
636 | 654 | let checkTargetEpoch = if ((targetEpoch >= 0)) | |
637 | 655 | then true | |
638 | 656 | else throwErr("processPoolINTERNAL: invalid target epoch") | |
639 | 657 | if ((checkTargetEpoch == checkTargetEpoch)) | |
640 | 658 | then { | |
641 | 659 | let pool = stringToPool(poolStr) | |
642 | - | let $ | |
643 | - | let amountAssetId = $ | |
644 | - | let priceAssetId = $ | |
660 | + | let $t02216422204 = pool | |
661 | + | let amountAssetId = $t02216422204._1 | |
662 | + | let priceAssetId = $t02216422204._2 | |
645 | 663 | let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract)) | |
646 | 664 | let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId) | |
647 | 665 | let r = { | |
648 | 666 | let @ = invoke(stakingContract, "usersListTraversal", [lpAssetId], nil) | |
649 | 667 | if ($isInstanceOf(@, "Boolean")) | |
650 | 668 | then @ | |
651 | 669 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
652 | 670 | } | |
653 | 671 | if ((r == r)) | |
654 | 672 | then if (r) | |
655 | 673 | then $Tuple2(nil, true) | |
656 | 674 | else { | |
657 | 675 | let assetsStoreContract = addressFromStringValue(valueOrErrorMessage(getString(factoryContract, keyAssetsStoreContract), "invalid assets store contract")) | |
658 | 676 | let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(targetEpoch)), 0) | |
659 | 677 | let votingResult = valueOrElse(getInteger(this, keyVotingResult(pool, targetEpoch)), 0) | |
660 | 678 | let share = if ((totalVotes == 0)) | |
661 | 679 | then 0 | |
662 | 680 | else fraction(votingResult, poolWeightMult, totalVotes) | |
663 | 681 | let modifyWeightInv = invoke(factoryContract, "modifyWeight", [lpAssetId, share], nil) | |
664 | 682 | if ((modifyWeightInv == modifyWeightInv)) | |
665 | 683 | then $Tuple2([IntegerEntry(keyPoolShare(pool, targetEpoch), share)], false) | |
666 | 684 | else throw("Strict value is not equal to itself.") | |
667 | 685 | } | |
668 | 686 | else throw("Strict value is not equal to itself.") | |
669 | 687 | } | |
670 | 688 | else throw("Strict value is not equal to itself.") | |
671 | 689 | } | |
672 | 690 | else throw("Strict value is not equal to itself.") | |
673 | 691 | } | |
674 | 692 | ||
675 | 693 | ||
676 | 694 | ||
677 | 695 | @Callable(i) | |
678 | 696 | func finalizeHelper () = { | |
679 | 697 | let force = valueOrElse(getBoolean(keyFinalizationShouldBeForced), false) | |
680 | 698 | let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0) | |
681 | 699 | let previousEpoch = (epoch - 1) | |
682 | 700 | let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch)) | |
683 | 701 | let epochLength = getIntOrFail(this, keyEpochLength) | |
684 | 702 | let endHeight = (startHeight + epochLength) | |
685 | 703 | let finalizationStageOrUnit = getInteger(this, keyFinalizationStage) | |
686 | 704 | if (if (if ((height >= endHeight)) | |
687 | 705 | then (finalizationStageOrUnit == unit) | |
688 | 706 | else false) | |
689 | 707 | then !(force) | |
690 | 708 | else false) | |
691 | 709 | then { | |
692 | 710 | let newEpoch = (epoch + 1) | |
693 | 711 | let newEpochLengthOption = getInteger(this, keyEpochLengthNew) | |
694 | 712 | let newEpochLengthActions = match newEpochLengthOption { | |
695 | 713 | case newEpochLength: Int => | |
696 | 714 | [IntegerEntry(keyEpochLength, newEpochLength), DeleteEntry(keyEpochLengthNew)] | |
697 | 715 | case _: Unit => | |
698 | 716 | nil | |
699 | 717 | case _ => | |
700 | 718 | throw("Match error") | |
701 | 719 | } | |
702 | 720 | $Tuple2(([IntegerEntry(keyStartHeightByEpoch(newEpoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpoch, newEpoch), IntegerEntry(keyFinalizationStage, finalizationStageBalances), IntegerEntry(keyEpochLengthByEpoch(epoch), epochLength)] ++ newEpochLengthActions), true) | |
703 | 721 | } | |
704 | 722 | else if (if (force) | |
705 | 723 | then (finalizationStageOrUnit == unit) | |
706 | 724 | else false) | |
707 | 725 | then $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares)], true) | |
708 | 726 | else if ((finalizationStageOrUnit == unit)) | |
709 | 727 | then $Tuple2(nil, false) | |
710 | 728 | else if ((finalizationStageOrUnit == finalizationStageBalances)) | |
711 | 729 | then { | |
712 | 730 | let poolOrUnit = getString(keyNextPool) | |
713 | 731 | match poolOrUnit { | |
714 | 732 | case _: Unit => | |
715 | 733 | match getString(keyListHead(poolsListName)) { | |
716 | 734 | case _: Unit => | |
717 | 735 | $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageTotal), DeleteEntry(keyNextPool)], true) | |
718 | 736 | case nextPoolStr: String => | |
719 | 737 | $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true) | |
720 | 738 | case _ => | |
721 | 739 | throw("Match error") | |
722 | 740 | } | |
723 | 741 | case poolStr: String => | |
724 | 742 | let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr)) | |
725 | 743 | if ((nextPoolOrUnit == nextPoolOrUnit)) | |
726 | 744 | then { | |
727 | 745 | let r = invoke(this, "processPoolBalanceINTERNAL", [poolStr], nil) | |
728 | 746 | if ((r == r)) | |
729 | 747 | then match nextPoolOrUnit { | |
730 | 748 | case _: Unit => | |
731 | 749 | $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageTotal), DeleteEntry(keyNextPool)], true) | |
732 | 750 | case nextPoolStr: String => | |
733 | 751 | $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true) | |
734 | 752 | case _ => | |
735 | 753 | throw("Match error") | |
736 | 754 | } | |
737 | 755 | else throw("Strict value is not equal to itself.") | |
738 | 756 | } | |
739 | 757 | else throw("Strict value is not equal to itself.") | |
740 | 758 | case _ => | |
741 | 759 | throw("Match error") | |
742 | 760 | } | |
743 | 761 | } | |
744 | 762 | else if ((finalizationStageOrUnit == finalizationStageTotal)) | |
745 | 763 | then { | |
746 | 764 | let poolOrUnit = getString(keyNextPool) | |
747 | 765 | let userOrUnit = getString(keyNextUser) | |
748 | 766 | match poolOrUnit { | |
749 | 767 | case _: Unit => | |
750 | 768 | match getString(keyListHead(poolsListName)) { | |
751 | 769 | case _: Unit => | |
752 | 770 | $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true) | |
753 | 771 | case poolsHeadStr: String => | |
754 | 772 | $Tuple2([StringEntry(keyNextPool, poolsHeadStr)], true) | |
755 | 773 | case _ => | |
756 | 774 | throw("Match error") | |
757 | 775 | } | |
758 | 776 | case poolStr: String => | |
759 | 777 | let pool = stringToPool(poolStr) | |
760 | 778 | let nextUserOrUnit = match userOrUnit { | |
761 | 779 | case _: Unit => | |
762 | 780 | getString(keyListHead(getVotesListName(pool))) | |
763 | 781 | case user: String => | |
764 | 782 | let next = getString(keyListNext(getVotesListName(pool), user)) | |
765 | 783 | if ((next == next)) | |
766 | 784 | then { | |
767 | 785 | let processVoteInv = invoke(this, "processVoteINTERNAL", [poolStr, user], nil) | |
768 | 786 | if ((processVoteInv == processVoteInv)) | |
769 | 787 | then next | |
770 | 788 | else throw("Strict value is not equal to itself.") | |
771 | 789 | } | |
772 | 790 | else throw("Strict value is not equal to itself.") | |
773 | 791 | case _ => | |
774 | 792 | throw("Match error") | |
775 | 793 | } | |
776 | 794 | match nextUserOrUnit { | |
777 | 795 | case _: Unit => | |
778 | 796 | let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr)) | |
779 | 797 | match nextPoolOrUnit { | |
780 | 798 | case _: Unit => | |
781 | 799 | $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true) | |
782 | 800 | case s: String => | |
783 | 801 | $Tuple2([StringEntry(keyNextPool, s), DeleteEntry(keyNextUser)], true) | |
784 | 802 | case _ => | |
785 | 803 | throw("Match error") | |
786 | 804 | } | |
787 | 805 | case nextUser: String => | |
788 | 806 | $Tuple2([StringEntry(keyNextUser, nextUser)], true) | |
789 | 807 | case _ => | |
790 | 808 | throw("Match error") | |
791 | 809 | } | |
792 | 810 | case _ => | |
793 | 811 | throw("Match error") | |
794 | 812 | } | |
795 | 813 | } | |
796 | 814 | else if ((finalizationStageOrUnit == finalizationStageShares)) | |
797 | 815 | then { | |
798 | 816 | let poolOrUnit = getString(keyNextPool) | |
799 | 817 | match poolOrUnit { | |
800 | 818 | case _: Unit => | |
801 | 819 | match getString(keyListHead(poolsListName)) { | |
802 | 820 | case _: Unit => | |
803 | 821 | let actions = if (force) | |
804 | 822 | then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced)] | |
805 | 823 | else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)] | |
806 | 824 | let gwxRewardDepositInv = gwxRewardDeposit() | |
807 | 825 | if ((gwxRewardDepositInv == gwxRewardDepositInv)) | |
808 | 826 | then $Tuple2(actions, true) | |
809 | 827 | else throw("Strict value is not equal to itself.") | |
810 | 828 | case nextPoolStr: String => | |
811 | 829 | $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true) | |
812 | 830 | case _ => | |
813 | 831 | throw("Match error") | |
814 | 832 | } | |
815 | 833 | case poolStr: String => | |
816 | 834 | let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr)) | |
817 | 835 | if ((nextPoolOrUnit == nextPoolOrUnit)) | |
818 | 836 | then { | |
819 | 837 | let r = { | |
820 | 838 | let @ = invoke(this, "processPoolINTERNAL", [poolStr, force], nil) | |
821 | 839 | if ($isInstanceOf(@, "Boolean")) | |
822 | 840 | then @ | |
823 | 841 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
824 | 842 | } | |
825 | 843 | if ((r == r)) | |
826 | 844 | then if (r) | |
827 | 845 | then $Tuple2(nil, true) | |
828 | 846 | else match nextPoolOrUnit { | |
829 | 847 | case _: Unit => | |
830 | 848 | let actions = if (force) | |
831 | 849 | then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced), DeleteEntry(keyNextPool)] | |
832 | 850 | else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)] | |
833 | 851 | let gwxRewardDepositInv = gwxRewardDeposit() | |
834 | 852 | if ((gwxRewardDepositInv == gwxRewardDepositInv)) | |
835 | 853 | then $Tuple2(actions, true) | |
836 | 854 | else throw("Strict value is not equal to itself.") | |
837 | 855 | case nextPoolStr: String => | |
838 | 856 | $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true) | |
839 | 857 | case _ => | |
840 | 858 | throw("Match error") | |
841 | 859 | } | |
842 | 860 | else throw("Strict value is not equal to itself.") | |
843 | 861 | } | |
844 | 862 | else throw("Strict value is not equal to itself.") | |
845 | 863 | case _ => | |
846 | 864 | throw("Match error") | |
847 | 865 | } | |
848 | 866 | } | |
849 | 867 | else throwErr("finalization is broken") | |
850 | 868 | } | |
851 | 869 | ||
852 | 870 | ||
853 | 871 | ||
854 | 872 | @Callable(i) | |
855 | 873 | func finalizeWrapper (counter) = { | |
856 | 874 | let votingEmissionRateContract = addressFromStringValue(getStringValue(this, keyVotingEmissionRateContract)) | |
857 | 875 | let result = { | |
858 | 876 | let @ = invoke(this, "finalizeHelper", nil, nil) | |
859 | 877 | if ($isInstanceOf(@, "Boolean")) | |
860 | 878 | then @ | |
861 | 879 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
862 | 880 | } | |
863 | 881 | if ((result == result)) | |
864 | 882 | then if (!(result)) | |
865 | 883 | then if ((counter == 0)) | |
866 | 884 | then throwErr("Current voting is not over yet") | |
867 | 885 | else { | |
868 | 886 | let inv = invoke(votingEmissionRateContract, "finalize", nil, nil) | |
869 | 887 | if ((inv == inv)) | |
870 | 888 | then $Tuple2(nil, unit) | |
871 | 889 | else throw("Strict value is not equal to itself.") | |
872 | 890 | } | |
873 | 891 | else { | |
874 | 892 | let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault) | |
875 | 893 | if ((maxDepth > counter)) | |
876 | 894 | then { | |
877 | 895 | let inv = invoke(this, "finalizeWrapper", [(counter + 1)], nil) | |
878 | 896 | if ((inv == inv)) | |
879 | 897 | then $Tuple2(nil, unit) | |
880 | 898 | else throw("Strict value is not equal to itself.") | |
881 | 899 | } | |
882 | 900 | else $Tuple2(nil, unit) | |
883 | 901 | } | |
884 | 902 | else throw("Strict value is not equal to itself.") | |
885 | 903 | } | |
886 | 904 | ||
887 | 905 | ||
888 | 906 | ||
889 | 907 | @Callable(i) | |
890 | 908 | func finalize () = { | |
891 | 909 | let inv = invoke(this, "finalizeWrapper", [0], nil) | |
892 | 910 | if ((inv == inv)) | |
893 | 911 | then $Tuple2(nil, unit) | |
894 | 912 | else throw("Strict value is not equal to itself.") | |
895 | 913 | } | |
896 | 914 | ||
897 | 915 | ||
898 | 916 | ||
899 | 917 | @Callable(i) | |
900 | 918 | func containsNodeREADONLY (listName,id) = $Tuple2(nil, containsNode(listName, id)) | |
901 | 919 | ||
902 | 920 | ||
903 | 921 | ||
904 | 922 | @Callable(i) | |
905 | 923 | func insertNode (listName,id) = { | |
906 | 924 | let checkCaller = mustManager(i) | |
907 | 925 | if ((checkCaller == checkCaller)) | |
908 | 926 | then $Tuple2(insertNodeActions(listName, id), unit) | |
909 | 927 | else throw("Strict value is not equal to itself.") | |
910 | 928 | } | |
911 | 929 | ||
912 | 930 | ||
913 | 931 | ||
914 | 932 | @Callable(i) | |
915 | 933 | func deleteNode (listName,id) = { | |
916 | 934 | let checkCaller = mustManager(i) | |
917 | 935 | if ((checkCaller == checkCaller)) | |
918 | 936 | then $Tuple2(deleteNodeActions(listName, id), unit) | |
919 | 937 | else throw("Strict value is not equal to itself.") | |
920 | 938 | } | |
921 | 939 | ||
922 | 940 | ||
923 | 941 | ||
924 | 942 | @Callable(i) | |
925 | 943 | func isFinalizationInProgress () = { | |
926 | 944 | let finalizationStageOrUnit = getInteger(this, keyFinalizationStage) | |
927 | 945 | let finalizationInProgress = (finalizationStageOrUnit != unit) | |
928 | 946 | $Tuple2(nil, finalizationInProgress) | |
929 | 947 | } | |
930 | 948 | ||
931 | 949 | ||
932 | 950 | ||
933 | 951 | @Callable(i) | |
934 | 952 | func deletePool (amountAssetId,priceAssetId) = { | |
935 | 953 | let checkCaller = if (if ((i.caller == factoryContract)) | |
936 | 954 | then true | |
937 | 955 | else mustManager(i)) | |
938 | 956 | then true | |
939 | 957 | else throwErr("Permission denied") | |
940 | 958 | if ((checkCaller == checkCaller)) | |
941 | 959 | then { | |
942 | 960 | let listName = "pools" | |
943 | 961 | let pool = $Tuple2(amountAssetId, priceAssetId) | |
944 | 962 | let id = makeString([amountAssetId, priceAssetId], separator) | |
945 | 963 | let actions = if (containsNode(listName, id)) | |
946 | 964 | then deleteNodeActions(listName, id) | |
947 | 965 | else nil | |
948 | 966 | ([DeleteEntry(keyInList(pool))] ++ actions) | |
949 | 967 | } | |
950 | 968 | else throw("Strict value is not equal to itself.") | |
951 | 969 | } | |
952 | 970 | ||
953 | 971 | ||
954 | 972 | ||
955 | 973 | @Callable(i) | |
956 | - | func resume (amountAssetId,priceAssetId) = { | |
957 | - | let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId) | |
958 | - | let balanceIsOk = { | |
959 | - | let @ = invoke(factoryContract, "checkBalance", [lpAssetId], nil) | |
960 | - | if ($isInstanceOf(@, "Boolean")) | |
961 | - | then @ | |
962 | - | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
963 | - | } | |
964 | - | let payment = i.payments[0] | |
974 | + | func resume (amountAssetId,priceAssetId,slippageToleranceOrMinOutAmount) = { | |
975 | + | let $t03308533215 = valueOrErrorMessage(getPoolInfo(amountAssetId, priceAssetId), wrapErr("invalid assets")) | |
976 | + | let poolAddress = $t03308533215._1 | |
977 | + | let lpAssetId = $t03308533215._2 | |
978 | + | let feePayment = i.payments[0] | |
965 | 979 | let assetsStoreContract = addressFromStringValue(getStringValue(this, keyAssetsStoreContract)) | |
966 | 980 | let kBoostingConfig = "%s__config" | |
967 | 981 | let idxCfgAssetId = 1 | |
968 | 982 | let boostingContract = addressFromStringValue(getStrOrFail(this, keyBoostingContract)) | |
969 | 983 | let wxAssetId = fromBase58String(split(getStringValue(boostingContract, kBoostingConfig), separator)[idxCfgAssetId]) | |
970 | 984 | let amountAssetVerified = { | |
971 | 985 | let @ = invoke(assetsStoreContract, "isVerifiedREADONLY", [amountAssetId], nil) | |
972 | 986 | if ($isInstanceOf(@, "Boolean")) | |
973 | 987 | then @ | |
974 | 988 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
975 | 989 | } | |
976 | 990 | let priceAssetVerified = { | |
977 | 991 | let @ = invoke(assetsStoreContract, "isVerifiedREADONLY", [priceAssetId], nil) | |
978 | 992 | if ($isInstanceOf(@, "Boolean")) | |
979 | 993 | then @ | |
980 | 994 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
981 | 995 | } | |
982 | 996 | let resumptionFee = valueOrErrorMessage(getInteger(this, keyResumptionFee), "invalid resumption fee") | |
983 | - | let checks = [if ( | |
997 | + | let checks = [if ((feePayment.assetId == wxAssetId)) | |
984 | 998 | then true | |
985 | - | else throwErr(" | |
999 | + | else throwErr("invalid fee payment asset id"), if ((feePayment.amount == resumptionFee)) | |
986 | 1000 | then true | |
987 | - | else throwErr("1 payment is required"), if ((payment.assetId == wxAssetId)) | |
988 | - | then true | |
989 | - | else throwErr("invalid payment asset id"), if ((payment.amount == resumptionFee)) | |
990 | - | then true | |
991 | - | else throwErr("invalid payment amount"), if (if (amountAssetVerified) | |
1001 | + | else throwErr("invalid fee payment amount"), if (if (amountAssetVerified) | |
992 | 1002 | then priceAssetVerified | |
993 | 1003 | else false) | |
994 | 1004 | then true | |
995 | 1005 | else throwErr("both assets should be verified")] | |
996 | 1006 | if ((checks == checks)) | |
997 | 1007 | then { | |
998 | - | let | |
999 | - | if (( | |
1008 | + | let lpAssetBalanceBefore = assetBalance(this, lpAssetId) | |
1009 | + | if ((lpAssetBalanceBefore == lpAssetBalanceBefore)) | |
1000 | 1010 | then { | |
1001 | - | let pool = $Tuple2(amountAssetId, priceAssetId) | |
1002 | - | let inListActions = ([BooleanEntry(keyInList(pool), true)] ++ insertNodeActions(poolsListName, poolToString(pool))) | |
1003 | - | $Tuple2(inListActions, unit) | |
1011 | + | let autoStake = false | |
1012 | + | let put = if ((size(i.payments) == 1)) | |
1013 | + | then { | |
1014 | + | let balanceIsOk = { | |
1015 | + | let @ = invoke(factoryContract, "checkBalance", [assetIdToString(lpAssetId)], nil) | |
1016 | + | if ($isInstanceOf(@, "Boolean")) | |
1017 | + | then @ | |
1018 | + | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
1019 | + | } | |
1020 | + | if (balanceIsOk) | |
1021 | + | then true | |
1022 | + | else throwErr("assets should be attached") | |
1023 | + | } | |
1024 | + | else if ((size(i.payments) == 2)) | |
1025 | + | then { | |
1026 | + | let poolScriptHash = valueOrErrorMessage(scriptHash(poolAddress), wrapErr("pool address is not scripted")) | |
1027 | + | let allowedScriptHash = fromBase64String(valueOrErrorMessage(getString(factoryContract, keyAllowedLpStableScriptHash()), wrapErr("allowed lp stable script hash is not set"))) | |
1028 | + | let isStable = (poolScriptHash == allowedScriptHash) | |
1029 | + | let functionName = if (isStable) | |
1030 | + | then "putOneTknV2" | |
1031 | + | else "putOneTkn" | |
1032 | + | invoke(poolAddress, functionName, [slippageToleranceOrMinOutAmount, autoStake], [i.payments[1]]) | |
1033 | + | } | |
1034 | + | else if ((size(i.payments) == 3)) | |
1035 | + | then invoke(poolAddress, "put", [slippageToleranceOrMinOutAmount, autoStake], [i.payments[1], i.payments[2]]) | |
1036 | + | else throwErr("invalid payments size") | |
1037 | + | if ((put == put)) | |
1038 | + | then { | |
1039 | + | let lpAssetBalanceAfter = assetBalance(this, lpAssetId) | |
1040 | + | if ((lpAssetBalanceAfter == lpAssetBalanceAfter)) | |
1041 | + | then { | |
1042 | + | let lpAssetBalanceDiff = (lpAssetBalanceAfter - lpAssetBalanceBefore) | |
1043 | + | let lpAssetTransferActions = if ((lpAssetBalanceDiff > 0)) | |
1044 | + | then [ScriptTransfer(i.caller, lpAssetBalanceDiff, lpAssetId)] | |
1045 | + | else nil | |
1046 | + | let setWxEmissionInv = invoke(factoryContract, "setWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil) | |
1047 | + | if ((setWxEmissionInv == setWxEmissionInv)) | |
1048 | + | then { | |
1049 | + | let pool = $Tuple2(amountAssetId, priceAssetId) | |
1050 | + | let inListActions = ([BooleanEntry(keyInList(pool), true)] ++ insertNodeActions(poolsListName, poolToString(pool))) | |
1051 | + | $Tuple2((inListActions ++ lpAssetTransferActions), unit) | |
1052 | + | } | |
1053 | + | else throw("Strict value is not equal to itself.") | |
1054 | + | } | |
1055 | + | else throw("Strict value is not equal to itself.") | |
1056 | + | } | |
1057 | + | else throw("Strict value is not equal to itself.") | |
1004 | 1058 | } | |
1005 | 1059 | else throw("Strict value is not equal to itself.") | |
1006 | 1060 | } | |
1007 | 1061 | else throw("Strict value is not equal to itself.") | |
1008 | 1062 | } | |
1009 | 1063 | ||
1010 | 1064 | ||
1011 | 1065 | @Verifier(tx) | |
1012 | 1066 | func verify () = { | |
1013 | 1067 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
1014 | 1068 | case pk: ByteVector => | |
1015 | 1069 | pk | |
1016 | 1070 | case _: Unit => | |
1017 | 1071 | tx.senderPublicKey | |
1018 | 1072 | case _ => | |
1019 | 1073 | throw("Match error") | |
1020 | 1074 | } | |
1021 | 1075 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
1022 | 1076 | } | |
1023 | 1077 |
github/deemru/w8io/026f985 499.05 ms ◑