tx · 5jse9r83Xi6pdG9gyExEz5BW21AAyKryZZSikNdyUjFB 3MqzKJcjfKxqGWSA84WR4kQwZksM5vjxiFp: -0.36000000 Waves 2022.12.02 18:01 [2342880] smart account 3MqzKJcjfKxqGWSA84WR4kQwZksM5vjxiFp > SELF 0.00000000 Waves
{ "type": 13, "id": "5jse9r83Xi6pdG9gyExEz5BW21AAyKryZZSikNdyUjFB", "fee": 36000000, "feeAssetId": null, "timestamp": 1669993296556, "version": 2, "chainId": 84, "sender": "3MqzKJcjfKxqGWSA84WR4kQwZksM5vjxiFp", "senderPublicKey": "bS6Cchmk25EdDcapkz8W5WkZgthTHHW6sSBbcidSrCb", "proofs": [ "v5aUSU2EwN17zo5Lb695jCs4HtUb64EqgAWsBRaYtBbZyVrGgNRE9izvsX9poVgj8jVom7A2ZcEorkgR5Msn9SM" ], "script": "base64:BgItCAISCQoHAQEBAQEIARIAEgQKAggIEgMKAQgSBAoCCAgSBAoCCAgSAwoBCBIAQwEPZ2V0U3RyaW5nT3JGYWlsAQNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAoggBBQNrZXkJAKwCAgkArAICAg9tYW5kYXRvcnkgdGhpcy4FA2tleQIPIGlzIG5vdCBkZWZpbmVkAANTRVACAl9fAAhCVUZTQ0FMRQkAtgIBAICAkLu61q3wDQAGc2NhbGU4AIDC1y8BCHRocm93RXJyAQNtc2cJAAIBCQC5CQIJAMwIAgIJaWRvLnJpZGU6CQDMCAIFA21zZwUDbmlsAgEgAQhhc1N0cmluZwEDdmFsBAckbWF0Y2gwBQN2YWwDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAZ2YWxTdHIFByRtYXRjaDAFBnZhbFN0cgkAAgECGGZhaWwgdG8gY2FzdCBpbnRvIFN0cmluZwEdY29udmVydFByaWNlQXNzZXRJbnRvSWRvQXNzZXQFEHByaWNlQXNzZXRBbW91bnQOcHJpY2VBc3NldE1VTFQFcHJpY2UJcHJpY2VNVUxUDGlkb0Fzc2V0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ev: DLYbAQLJr25n5a2B16wLLRu5eY8uLN9h6fZZAnqwpxyi Next: FUwBGt91eaTzwrgxUkcWTd8iuxQBXJRNxDR58JGuire9 Diff:
Old | New | Differences | |
---|---|---|---|
524 | 524 | } | |
525 | 525 | else { | |
526 | 526 | let priceAssetBalanceIdoDecimals = fraction(priceAssetBalance, scale8, pow(10, 0, priceAssetDecimals, 0, 0, DOWN)) | |
527 | - | let | |
528 | - | let | |
529 | - | let | |
530 | - | let entries = if ((height > | |
527 | + | let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart]) | |
528 | + | let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration]) | |
529 | + | let claimEnd = (claimStart + claimDuration) | |
530 | + | let entries = if ((height > claimEnd)) | |
531 | 531 | then [IntegerEntry(keyInvestorRemainingAmount(userAddress58), investorRemainingAmount), IntegerEntry(keyTotalRemainingAmount(), newTotalRemainingAmount), TotalsEntry(keyInvestor(userAddress58), newInvestArray, totalsDiff, newClaimPeriodHeight, priceAssetBalance), TotalsEntry(keyTotals(), newTotalArray, totalsDiff, newClaimPeriodHeight, priceAssetBalance)] | |
532 | 532 | else [TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight, priceAssetBalance), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight, priceAssetBalance)] | |
533 | 533 | $Tuple2(([ScriptTransfer(i.caller, (outAmount + priceAssetBalanceIdoDecimals), outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), 0), ClaimOperationHistoryEntry(userAddress58, claimedPriceAmountFromDiff, (claimedIdoAssetAmountFromDiff + priceAssetBalanceIdoDecimals), i.transactionId)] ++ entries), unit) | |
615 | 615 | let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0) | |
616 | 616 | let priceAssetBalanceIdoDecimals = (priceAssetBalance * 100) | |
617 | 617 | let availableIdoAmountToClaimWithPriceAssetBalance = (availableIdoAmountToClaim + priceAssetBalanceIdoDecimals) | |
618 | - | let $ | |
619 | - | let periodMinAvailableToClaim = $ | |
620 | - | let periodTotalAvailableToClaim = $ | |
621 | - | let periodUserAvailableToClaim = $ | |
622 | - | let totalUserAvailableToClaim = $ | |
623 | - | let usdtPriceAssetAllowableRatio = $ | |
624 | - | let currentUsdtPriceAssetRatio = $ | |
625 | - | let endPeriodBlocksLeft = $ | |
626 | - | let updatedCurrentPeriod = $ | |
627 | - | let periodStart = $ | |
628 | - | let periodEnd = $ | |
618 | + | let $t03416234574 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement]) | |
619 | + | let periodMinAvailableToClaim = $t03416234574._1 | |
620 | + | let periodTotalAvailableToClaim = $t03416234574._2 | |
621 | + | let periodUserAvailableToClaim = $t03416234574._3 | |
622 | + | let totalUserAvailableToClaim = $t03416234574._4 | |
623 | + | let usdtPriceAssetAllowableRatio = $t03416234574._5 | |
624 | + | let currentUsdtPriceAssetRatio = $t03416234574._6 | |
625 | + | let endPeriodBlocksLeft = $t03416234574._7 | |
626 | + | let updatedCurrentPeriod = $t03416234574._8 | |
627 | + | let periodStart = $t03416234574._9 | |
628 | + | let periodEnd = $t03416234574._10 | |
629 | 629 | let currentPeriodEndHeight = valueOrElse(getInteger(keyPeriodEndHeight(updatedCurrentPeriod)), 0) | |
630 | 630 | let userTotalPriceAssetClaimed = (parseIntValue(readInvestorArrayOrFail(userAddress58)[IdxInvClaimedPriceAssetAmount]) - priceAssetBalance) | |
631 | 631 | let resultString = if ((height > currentPeriodEndHeight)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined")) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | let SEP = "__" | |
8 | 8 | ||
9 | 9 | let BUFSCALE = toBigInt(1000000000000000000) | |
10 | 10 | ||
11 | 11 | let scale8 = 100000000 | |
12 | 12 | ||
13 | 13 | func throwErr (msg) = throw(makeString(["ido.ride:", msg], " ")) | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func asString (val) = match val { | |
17 | 17 | case valStr: String => | |
18 | 18 | valStr | |
19 | 19 | case _ => | |
20 | 20 | throw("fail to cast into String") | |
21 | 21 | } | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func convertPriceAssetIntoIdoAsset (priceAssetAmount,priceAssetMULT,price,priceMULT,idoAssetMULT) = { | |
25 | 25 | let bPriceAssetMULT = toBigInt(priceAssetMULT) | |
26 | 26 | let bIdoAssetMULT = toBigInt(idoAssetMULT) | |
27 | 27 | let bPriceAssetBUF = fraction(toBigInt(priceAssetAmount), BUFSCALE, bPriceAssetMULT) | |
28 | 28 | let bAmountAssetBUF = fraction(bPriceAssetBUF, toBigInt(priceMULT), toBigInt(price)) | |
29 | 29 | toInt(fraction(bAmountAssetBUF, toBigInt(idoAssetMULT), BUFSCALE)) | |
30 | 30 | } | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | let IdxCfgIdoStart = 1 | |
34 | 34 | ||
35 | 35 | let IdxCfgIdoDuration = 2 | |
36 | 36 | ||
37 | 37 | let IdxCfgClaimStart = 3 | |
38 | 38 | ||
39 | 39 | let IdxCfgClaimDuration = 4 | |
40 | 40 | ||
41 | 41 | let IdxCfgPrice = 5 | |
42 | 42 | ||
43 | 43 | let IdxCfgPriceMult = 6 | |
44 | 44 | ||
45 | 45 | let IdxCfgIdoAssetId = 7 | |
46 | 46 | ||
47 | 47 | let IdxCfgIdoAssetMult = 8 | |
48 | 48 | ||
49 | 49 | let IdxCfgPriceAssetId = 9 | |
50 | 50 | ||
51 | 51 | let IdxCfgPriceAssetMult = 10 | |
52 | 52 | ||
53 | 53 | let IdxCfgMinInvestAmount = 11 | |
54 | 54 | ||
55 | 55 | func fromatConfigS (idoStart,idoDuration,claimStart,claimDuration,price,priceMult,idoAssetId58,idoAssetMult,priceAssetId58,priceAssetMult,minInvestAmount,totalIdoAssetToSell) = makeString(["%d%d%d%d%d%d%s%d%s%d%d%d", idoStart, idoDuration, claimStart, claimDuration, price, priceMult, idoAssetId58, idoAssetMult, priceAssetId58, priceAssetMult, minInvestAmount, totalIdoAssetToSell], SEP) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func fromatConfig (idoStart,idoDuration,claimStart,claimDuration,price,priceMult,idoAssetId58,idoAssetMult,priceAssetId58,priceAssetMult,minInvestAmount,totalIdoAssetToSell) = fromatConfigS(toString(idoStart), toString(idoDuration), toString(claimStart), toString(claimDuration), toString(price), toString(priceMult), idoAssetId58, toString(idoAssetMult), priceAssetId58, toString(priceAssetMult), toString(minInvestAmount), toString(totalIdoAssetToSell)) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | let IdxInvTotalAmount = 1 | |
62 | 62 | ||
63 | 63 | let IdxInvRemainingAmount = 2 | |
64 | 64 | ||
65 | 65 | let IdxInvClaimedPriceAssetAmount = 3 | |
66 | 66 | ||
67 | 67 | let IdxInvClaimedIdoAssetAmount = 4 | |
68 | 68 | ||
69 | 69 | let IdxInvLastClaimedHeight = 5 | |
70 | 70 | ||
71 | 71 | func formatInvestorS (totalAmount,remainingAmount,claimedPriceAssetAmount,claimedIdoAssetAmount,lastClaimedHeight) = makeString(["%d%d%d%d%d", totalAmount, remainingAmount, claimedPriceAssetAmount, claimedIdoAssetAmount, lastClaimedHeight], SEP) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func formatInvestor (totalAmount,remainingAmount,claimedPriceAssetAmount,claimedIdoAssetAmount,lastClaimedHeight) = formatInvestorS(toString(totalAmount), toString(remainingAmount), toString(claimedPriceAssetAmount), toString(claimedIdoAssetAmount), toString(lastClaimedHeight)) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func formatHistoryRecord (priceAssetAmount,idoAssetAmount) = makeString(["%d%d%d%d", toString(height), toString(lastBlock.timestamp), toString(priceAssetAmount), toString(idoAssetAmount)], SEP) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func keyConfig () = "%s__config" | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func keyInvestor (userAddress) = ("%s__" + userAddress) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func keyTotals () = "%s__totals" | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP) | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func keyUSDNClaimDisabled () = "%s__usdnClaimDisabled" | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func keyUSDNClaimEndHeight () = "%s__usdnClaimEndHeight" | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func keyPeriodLength () = makeString(["%s", "periodLength"], SEP) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func keyCurrentPeriod () = makeString(["%s", "currentPeriod"], SEP) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func keyPeriodStartHeight (periodNum) = makeString(["%s%s", "periodStartHeight", toString(periodNum)], SEP) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func keyPeriodEndHeight (periodNum) = makeString(["%s%s", "periodEndHeight", toString(periodNum)], SEP) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func keyUsdtPriceAssetAllowableRatio () = makeString(["%s", "usdtPriceAssetAllowableRatio"], SEP) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func keyTotalPeriodAllowance (assetId) = makeString(["%s%s", "totalPeriodAllowance", assetId], SEP) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func keyUserPeriodAllowance (assetId) = makeString(["%s%s", "userPeriodAllowance", assetId], SEP) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func keyPeriodTotalAvailableToClaim (assetId,periodNum) = makeString(["%s%s%s", "periodTotalAvailableToClaim", assetId, toString(periodNum)], SEP) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func keyPeriodUserAvailableToClaim (assetId,periodNum,userAddress) = makeString(["%s%s%s%s", "periodUserAvailableToClaim", assetId, toString(periodNum), userAddress], SEP) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func keyUsdtPriceAssetStablePool () = makeString(["%s", "usdtPriceAssetStablePool"], SEP) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func keyUsdtAssetId () = makeString(["%s", "usdtAssetId"], SEP) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func keyPriceAssetBalance (address) = makeString(["%s%s", "priceAssetBalance", address], SEP) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func keyInvestorRemainingAmount (address) = makeString(["%s%s", "investorRemainingAmount", address], SEP) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func keyTotalRemainingAmount () = makeString(["%s", "totalRemainingAmount"], SEP) | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | func readConfigArray () = split(getStringOrFail(keyConfig()), SEP) | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func readTotalsArrayOrDefaultByCustomKey (customKey) = split(valueOrElse(getString(customKey), formatInvestorS("0", "0", "0", "0", "0")), SEP) | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func readTotalsArrayOrDefault () = readTotalsArrayOrDefaultByCustomKey(keyTotals()) | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func readInvestorArrayOrDefault (userAddress) = readTotalsArrayOrDefaultByCustomKey(keyInvestor(userAddress)) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func readInvestorArrayOrFail (userAddress) = split(getStringOrFail(keyInvestor(userAddress)), SEP) | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | let IdxDiffTotalIncrement = 0 | |
162 | 162 | ||
163 | 163 | let IdxDiffRemainingPriceAmountIncrement = 1 | |
164 | 164 | ||
165 | 165 | let IdxDiffClaimedPriceAmountIncrement = 2 | |
166 | 166 | ||
167 | 167 | let IdxDiffClaimedIdoAssetAmountIncrement = 3 | |
168 | 168 | ||
169 | 169 | func TotalsEntry (key,origArray,incrementDiff,newLastClaimedHeight,priceAssetBalance) = { | |
170 | 170 | let totalAmount = parseIntValue(origArray[IdxInvTotalAmount]) | |
171 | 171 | let remainingAmount = parseIntValue(origArray[IdxInvRemainingAmount]) | |
172 | 172 | let claimedPriceAssetAmount = parseIntValue(origArray[IdxInvClaimedPriceAssetAmount]) | |
173 | 173 | let claimedIdoAssetAmount = parseIntValue(origArray[IdxInvClaimedIdoAssetAmount]) | |
174 | 174 | let lastClaimedHeight = parseIntValue(origArray[IdxInvLastClaimedHeight]) | |
175 | 175 | let newTotalAmount = (totalAmount + incrementDiff[IdxDiffTotalIncrement]) | |
176 | 176 | let newRemainingAmount = (remainingAmount + incrementDiff[IdxDiffRemainingPriceAmountIncrement]) | |
177 | 177 | let cfgArray = readConfigArray() | |
178 | 178 | let priceAssetId58 = cfgArray[IdxCfgPriceAssetId] | |
179 | 179 | let priceAssetDecimals = value(assetInfo(fromBase58String(priceAssetId58))).decimals | |
180 | 180 | let priceAssetBalancePriceAssetDecimals = fraction(priceAssetBalance, scale8, pow(10, 0, priceAssetDecimals, 0, 0, DOWN)) | |
181 | 181 | let newClaimedPriceAssetAmount = ((claimedPriceAssetAmount + incrementDiff[IdxDiffClaimedPriceAmountIncrement]) - priceAssetBalance) | |
182 | 182 | let newClaimedIdoAssetAmount = ((claimedIdoAssetAmount + incrementDiff[IdxDiffClaimedIdoAssetAmountIncrement]) + priceAssetBalancePriceAssetDecimals) | |
183 | 183 | let entries = if ((0 > newRemainingAmount)) | |
184 | 184 | then { | |
185 | 185 | let diff = ((newTotalAmount - newClaimedPriceAssetAmount) - newClaimedIdoAssetAmount) | |
186 | 186 | let newLogicRemainingAmount = if ((0 > diff)) | |
187 | 187 | then 0 | |
188 | 188 | else diff | |
189 | 189 | StringEntry(key, formatInvestor(newTotalAmount, newLogicRemainingAmount, newClaimedPriceAssetAmount, newClaimedIdoAssetAmount, newLastClaimedHeight)) | |
190 | 190 | } | |
191 | 191 | else StringEntry(key, formatInvestor(newTotalAmount, newRemainingAmount, newClaimedPriceAssetAmount, newClaimedIdoAssetAmount, newLastClaimedHeight)) | |
192 | 192 | entries | |
193 | 193 | } | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | func InvestOperationHistoryEntry (userAddress,priceAssetAmount,idoAssetAmount,txId) = StringEntry(keyOperationHistoryRecord("invest", userAddress, toBase58String(txId)), formatHistoryRecord(priceAssetAmount, idoAssetAmount)) | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | func ClaimOperationHistoryEntry (userAddress,priceAssetAmount,idoAssetAmount,txId) = StringEntry(keyOperationHistoryRecord("claim", userAddress, toBase58String(txId)), formatHistoryRecord(priceAssetAmount, idoAssetAmount)) | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | func internalClaim (claimedAssetId58,userAddress,txId) = { | |
203 | 203 | let cfgArray = readConfigArray() | |
204 | 204 | let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart]) | |
205 | 205 | let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration]) | |
206 | 206 | let claimEnd = (claimStart + claimDuration) | |
207 | 207 | let price = parseIntValue(cfgArray[IdxCfgPrice]) | |
208 | 208 | let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult]) | |
209 | 209 | let idoAssetId58 = cfgArray[IdxCfgIdoAssetId] | |
210 | 210 | let idoAssetId = fromBase58String(idoAssetId58) | |
211 | 211 | let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult]) | |
212 | 212 | let priceAssetId58 = cfgArray[IdxCfgPriceAssetId] | |
213 | 213 | let priceAssetId = fromBase58String(priceAssetId58) | |
214 | 214 | let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult]) | |
215 | 215 | let userAddress58 = toString(userAddress) | |
216 | 216 | let origInvestArray = readInvestorArrayOrFail(userAddress58) | |
217 | 217 | let investTotalAmount = parseIntValue(origInvestArray[IdxInvTotalAmount]) | |
218 | 218 | let investLastClaimedHeightTMP = parseIntValue(origInvestArray[IdxInvLastClaimedHeight]) | |
219 | 219 | let investLastClaimedHeight = if ((claimStart >= investLastClaimedHeightTMP)) | |
220 | 220 | then claimStart | |
221 | 221 | else investLastClaimedHeightTMP | |
222 | 222 | let newClaimPeriodHeight = if ((height > claimEnd)) | |
223 | 223 | then claimEnd | |
224 | 224 | else if ((claimStart > height)) | |
225 | 225 | then claimStart | |
226 | 226 | else height | |
227 | 227 | let claimingBlocks = (newClaimPeriodHeight - investLastClaimedHeight) | |
228 | 228 | let claimingPriceAssetAmount = fraction(investTotalAmount, claimingBlocks, claimDuration) | |
229 | 229 | let claimingIdoAssetAmount = convertPriceAssetIntoIdoAsset(claimingPriceAssetAmount, priceAssetMult, price, priceMult, idoAssetMult) | |
230 | 230 | let isUSDN = (claimedAssetId58 == priceAssetId58) | |
231 | 231 | let isUSDNClaimDisabled = valueOrElse(getBoolean(keyUSDNClaimDisabled()), false) | |
232 | 232 | let checks = [if (!(if (isUSDN) | |
233 | 233 | then isUSDNClaimDisabled | |
234 | 234 | else false)) | |
235 | 235 | then true | |
236 | 236 | else throw("USDN claim is disabled")] | |
237 | 237 | if ((checks == checks)) | |
238 | 238 | then if ((claimedAssetId58 == priceAssetId58)) | |
239 | 239 | then $Tuple6([0, -(claimingPriceAssetAmount), claimingPriceAssetAmount, 0], claimingPriceAssetAmount, priceAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount]) | |
240 | 240 | else if ((claimedAssetId58 == idoAssetId58)) | |
241 | 241 | then $Tuple6([0, -(claimingPriceAssetAmount), 0, claimingIdoAssetAmount], claimingIdoAssetAmount, idoAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount]) | |
242 | 242 | else throw(("unsupported assetId: " + claimedAssetId58)) | |
243 | 243 | else throw("Strict value is not equal to itself.") | |
244 | 244 | } | |
245 | 245 | ||
246 | 246 | ||
247 | 247 | func internalClaimV2 (priceAssetId58,userAddress58,outAmount,totalUserAvailableToClaim) = { | |
248 | 248 | let totalPeriodPriceAssetAllowance = value(getInteger(keyTotalPeriodAllowance(priceAssetId58))) | |
249 | 249 | let userPeriodPriceAssetAllowance = value(getInteger(keyUserPeriodAllowance(priceAssetId58))) | |
250 | 250 | let periodLength = value(getInteger(keyPeriodLength())) | |
251 | 251 | let currentPeriod = valueOrElse(getInteger(keyCurrentPeriod()), 0) | |
252 | 252 | let zeroPeriodEndHeighIsDefined = isDefined(getInteger(keyPeriodEndHeight(0))) | |
253 | 253 | let $t01298714857 = if ((currentPeriod > 0)) | |
254 | 254 | then { | |
255 | 255 | let lastPeriodStartHeight = value(getInteger(keyPeriodStartHeight(currentPeriod))) | |
256 | 256 | let lastPeriodEndHeight = value(getInteger(keyPeriodEndHeight(currentPeriod))) | |
257 | 257 | let $t01324713952 = if ((height > lastPeriodEndHeight)) | |
258 | 258 | then { | |
259 | 259 | let updatedCurrentPeriod = (currentPeriod + 1) | |
260 | 260 | let periodStart = if ((height > (lastPeriodEndHeight + periodLength))) | |
261 | 261 | then { | |
262 | 262 | let blocksToLastPeriodStart = ((height - lastPeriodEndHeight) % periodLength) | |
263 | 263 | if ((blocksToLastPeriodStart == 0)) | |
264 | 264 | then ((height - periodLength) + 1) | |
265 | 265 | else (height - blocksToLastPeriodStart) | |
266 | 266 | } | |
267 | 267 | else (lastPeriodEndHeight + 1) | |
268 | 268 | let periodEnd = ((periodStart + periodLength) - 1) | |
269 | 269 | $Tuple3(updatedCurrentPeriod, periodStart, periodEnd) | |
270 | 270 | } | |
271 | 271 | else $Tuple3(currentPeriod, lastPeriodStartHeight, lastPeriodEndHeight) | |
272 | 272 | let updatedCurrentPeriod = $t01324713952._1 | |
273 | 273 | let periodStart = $t01324713952._2 | |
274 | 274 | let periodEnd = $t01324713952._3 | |
275 | 275 | $Tuple3(updatedCurrentPeriod, periodStart, periodEnd) | |
276 | 276 | } | |
277 | 277 | else if (zeroPeriodEndHeighIsDefined) | |
278 | 278 | then { | |
279 | 279 | let zeroPeriodStartHeight = value(getInteger(keyPeriodStartHeight(0))) | |
280 | 280 | let zeroPeriodEndHeight = value(getInteger(keyPeriodEndHeight(0))) | |
281 | 281 | let $t01420714589 = if ((height > zeroPeriodEndHeight)) | |
282 | 282 | then { | |
283 | 283 | let updatedCurrentPeriod = (currentPeriod + 1) | |
284 | 284 | let periodStart = (zeroPeriodEndHeight + 1) | |
285 | 285 | let periodEnd = ((periodStart + periodLength) - 1) | |
286 | 286 | $Tuple3(updatedCurrentPeriod, periodStart, periodEnd) | |
287 | 287 | } | |
288 | 288 | else $Tuple3(currentPeriod, zeroPeriodStartHeight, zeroPeriodEndHeight) | |
289 | 289 | let updatedCurrentPeriod = $t01420714589._1 | |
290 | 290 | let periodStart = $t01420714589._2 | |
291 | 291 | let periodEnd = $t01420714589._3 | |
292 | 292 | $Tuple3(updatedCurrentPeriod, periodStart, periodEnd) | |
293 | 293 | } | |
294 | 294 | else $Tuple3(currentPeriod, valueOrElse(getInteger(keyPeriodStartHeight(currentPeriod)), height), valueOrElse(getInteger(keyPeriodEndHeight(currentPeriod)), ((height + periodLength) - 1))) | |
295 | 295 | let updatedCurrentPeriod = $t01298714857._1 | |
296 | 296 | let periodStart = $t01298714857._2 | |
297 | 297 | let periodEnd = $t01298714857._3 | |
298 | 298 | let periodTotalAvailableToClaim = valueOrElse(getInteger(keyPeriodTotalAvailableToClaim(priceAssetId58, updatedCurrentPeriod)), totalPeriodPriceAssetAllowance) | |
299 | 299 | let periodUserAvailableToClaim = valueOrElse(getInteger(keyPeriodUserAvailableToClaim(priceAssetId58, updatedCurrentPeriod, userAddress58)), userPeriodPriceAssetAllowance) | |
300 | 300 | let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0) | |
301 | 301 | let periodMinAvailableToClaim = min([(outAmount + priceAssetBalance), periodTotalAvailableToClaim, periodUserAvailableToClaim]) | |
302 | 302 | let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio())) | |
303 | 303 | let putOneTknV2PriceAssetAmount = scale8 | |
304 | 304 | let $t01561215865 = { | |
305 | 305 | let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil) | |
306 | 306 | if ($isInstanceOf(@, "(Int, Int, Int)")) | |
307 | 307 | then @ | |
308 | 308 | else throw(($getType(@) + " couldn't be cast to (Int, Int, Int)")) | |
309 | 309 | } | |
310 | 310 | if (($t01561215865 == $t01561215865)) | |
311 | 311 | then { | |
312 | 312 | let bonus = $t01561215865._3 | |
313 | 313 | let feeAmount = $t01561215865._2 | |
314 | 314 | let lpAmount = $t01561215865._1 | |
315 | 315 | let usdtAssetId = value(getString(keyUsdtAssetId())) | |
316 | 316 | let $t01592716145 = { | |
317 | 317 | let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil) | |
318 | 318 | if ($isInstanceOf(@, "(Int, Int)")) | |
319 | 319 | then @ | |
320 | 320 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")) | |
321 | 321 | } | |
322 | 322 | if (($t01592716145 == $t01592716145)) | |
323 | 323 | then { | |
324 | 324 | let getOneTknV2FeeAmount = $t01592716145._2 | |
325 | 325 | let usdtAmount = $t01592716145._1 | |
326 | 326 | let currentUsdtPriceAssetRatio = fraction(putOneTknV2PriceAssetAmount, scale8, usdtAmount) | |
327 | 327 | let endPeriodBlocksLeft = (periodEnd - height) | |
328 | 328 | $Tuple10(periodMinAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim, totalUserAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft, updatedCurrentPeriod, periodStart, periodEnd) | |
329 | 329 | } | |
330 | 330 | else throw("Strict value is not equal to itself.") | |
331 | 331 | } | |
332 | 332 | else throw("Strict value is not equal to itself.") | |
333 | 333 | } | |
334 | 334 | ||
335 | 335 | ||
336 | 336 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
337 | 337 | case s: String => | |
338 | 338 | fromBase58String(s) | |
339 | 339 | case _: Unit => | |
340 | 340 | unit | |
341 | 341 | case _ => | |
342 | 342 | throw("Match error") | |
343 | 343 | } | |
344 | 344 | ||
345 | 345 | ||
346 | 346 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
347 | 347 | case s: String => | |
348 | 348 | fromBase58String(s) | |
349 | 349 | case _: Unit => | |
350 | 350 | unit | |
351 | 351 | case _ => | |
352 | 352 | throw("Match error") | |
353 | 353 | } | |
354 | 354 | ||
355 | 355 | ||
356 | 356 | func mustManager (i) = { | |
357 | 357 | let pd = throw("Permission denied") | |
358 | 358 | match managerPublicKeyOrUnit() { | |
359 | 359 | case pk: ByteVector => | |
360 | 360 | if ((i.callerPublicKey == pk)) | |
361 | 361 | then true | |
362 | 362 | else pd | |
363 | 363 | case _: Unit => | |
364 | 364 | if ((i.caller == this)) | |
365 | 365 | then true | |
366 | 366 | else pd | |
367 | 367 | case _ => | |
368 | 368 | throw("Match error") | |
369 | 369 | } | |
370 | 370 | } | |
371 | 371 | ||
372 | 372 | ||
373 | 373 | @Callable(i) | |
374 | 374 | func constructor (idoStart,idoDuration,claimStart,claimDuration,price,priceAssetId58,minInvestAmount) = { | |
375 | 375 | let priceMult = ((100 * 1000) * 1000) | |
376 | 376 | let idoEnd = (idoStart + idoDuration) | |
377 | 377 | if (isDefined(getString(keyConfig()))) | |
378 | 378 | then throw("already initialized") | |
379 | 379 | else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString(i.caller))) | |
380 | 380 | then throw("not authorized") | |
381 | 381 | else if ((size(i.payments) != 1)) | |
382 | 382 | then throw("exactly 1 payment must be attached") | |
383 | 383 | else if ((idoEnd >= claimStart)) | |
384 | 384 | then throw("claimStart must be greater than idoEnd") | |
385 | 385 | else { | |
386 | 386 | let pmt = value(i.payments[0]) | |
387 | 387 | let idoAssetId = value(pmt.assetId) | |
388 | 388 | let idoAssetInfo = valueOrErrorMessage(assetInfo(idoAssetId), "fail to load ido asset info") | |
389 | 389 | let idoAssetId58 = toBase58String(idoAssetId) | |
390 | 390 | let idoAssetMult = pow(10, 0, idoAssetInfo.decimals, 0, 0, DOWN) | |
391 | 391 | let priceAssetId = fromBase58String(priceAssetId58) | |
392 | 392 | let priceAssetInfo = valueOrErrorMessage(assetInfo(priceAssetId), "fail to load price asset info") | |
393 | 393 | let priceAssetMult = pow(10, 0, priceAssetInfo.decimals, 0, 0, DOWN) | |
394 | 394 | let origTotalsArray = readTotalsArrayOrDefault() | |
395 | 395 | let totalsDiff = [0, 0, 0, 0] | |
396 | 396 | [StringEntry(keyConfig(), fromatConfig(idoStart, idoDuration, claimStart, claimDuration, price, priceMult, idoAssetId58, idoAssetMult, priceAssetId58, priceAssetMult, minInvestAmount, pmt.amount)), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart, 0)] | |
397 | 397 | } | |
398 | 398 | } | |
399 | 399 | ||
400 | 400 | ||
401 | 401 | ||
402 | 402 | @Callable(i) | |
403 | 403 | func invest () = { | |
404 | 404 | let cfgArray = readConfigArray() | |
405 | 405 | let idoStart = parseIntValue(cfgArray[IdxCfgIdoStart]) | |
406 | 406 | let idoDuration = parseIntValue(cfgArray[IdxCfgIdoDuration]) | |
407 | 407 | let idoEnd = (idoStart + idoDuration) | |
408 | 408 | let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart]) | |
409 | 409 | let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration]) | |
410 | 410 | let price = parseIntValue(cfgArray[IdxCfgPrice]) | |
411 | 411 | let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult]) | |
412 | 412 | let idoAssetId58 = cfgArray[IdxCfgIdoAssetId] | |
413 | 413 | let idoAssetId = fromBase58String(idoAssetId58) | |
414 | 414 | let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult]) | |
415 | 415 | let priceAssetId58 = cfgArray[IdxCfgPriceAssetId] | |
416 | 416 | let priceAssetId = fromBase58String(priceAssetId58) | |
417 | 417 | let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult]) | |
418 | 418 | let minIvestAmount = parseIntValue(cfgArray[IdxCfgMinInvestAmount]) | |
419 | 419 | let userAddress = toString(i.caller) | |
420 | 420 | if ((idoStart > height)) | |
421 | 421 | then throw("ido has not been started yet") | |
422 | 422 | else if ((height > idoEnd)) | |
423 | 423 | then throw("ido has been already ended") | |
424 | 424 | else if ((size(i.payments) != 1)) | |
425 | 425 | then throw("exactly 1 payment is expected") | |
426 | 426 | else { | |
427 | 427 | let pmt = value(i.payments[0]) | |
428 | 428 | let pmtAssetId = value(pmt.assetId) | |
429 | 429 | let pmtAmount = pmt.amount | |
430 | 430 | if ((pmtAssetId != priceAssetId)) | |
431 | 431 | then throw((("invalid payment asset id: " + toBase58String(pmtAssetId)) + " is expected")) | |
432 | 432 | else { | |
433 | 433 | let origInvestorArray = readInvestorArrayOrDefault(userAddress) | |
434 | 434 | let origTotalsArray = readTotalsArrayOrDefault() | |
435 | 435 | let newPriceTotalAmount = (parseIntValue(origTotalsArray[IdxInvTotalAmount]) + pmtAmount) | |
436 | 436 | let requiredIdoAssetAmount = (newPriceTotalAmount * 100) | |
437 | 437 | if ((requiredIdoAssetAmount > assetBalance(this, idoAssetId))) | |
438 | 438 | then throw("IDO asset has been - sold consider to use smaller payment") | |
439 | 439 | else { | |
440 | 440 | let totalsDiff = [pmtAmount, pmtAmount, 0, 0] | |
441 | 441 | [TotalsEntry(keyInvestor(userAddress), origInvestorArray, totalsDiff, claimStart, 0), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart, 0), InvestOperationHistoryEntry(userAddress, pmtAmount, 0, i.transactionId)] | |
442 | 442 | } | |
443 | 443 | } | |
444 | 444 | } | |
445 | 445 | } | |
446 | 446 | ||
447 | 447 | ||
448 | 448 | ||
449 | 449 | @Callable(i) | |
450 | 450 | func claim (claimedAssetId58,userAddress58) = { | |
451 | 451 | let callerAddress58 = toString(i.caller) | |
452 | 452 | if ((userAddress58 != callerAddress58)) | |
453 | 453 | then throw("not authorized") | |
454 | 454 | else { | |
455 | 455 | let cfgArray = readConfigArray() | |
456 | 456 | let priceAssetId58 = cfgArray[IdxCfgPriceAssetId] | |
457 | 457 | let claimResultTuple = internalClaim(claimedAssetId58, i.caller, i.transactionId) | |
458 | 458 | let totalsDiff = claimResultTuple._1 | |
459 | 459 | let outAmount = claimResultTuple._2 | |
460 | 460 | let outAssetId = claimResultTuple._3 | |
461 | 461 | let origInvestArray = claimResultTuple._4 | |
462 | 462 | let newClaimPeriodHeight = claimResultTuple._5 | |
463 | 463 | let claimedPriceAmountFromDiff = totalsDiff[IdxDiffClaimedPriceAmountIncrement] | |
464 | 464 | let claimedIdoAssetAmountFromDiff = totalsDiff[IdxDiffClaimedIdoAssetAmountIncrement] | |
465 | 465 | let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0) | |
466 | 466 | let priceAssetDecimals = value(assetInfo(fromBase58String(priceAssetId58))).decimals | |
467 | 467 | let $t02199122403 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement]) | |
468 | 468 | let periodMinAvailableToClaim = $t02199122403._1 | |
469 | 469 | let periodTotalAvailableToClaim = $t02199122403._2 | |
470 | 470 | let periodUserAvailableToClaim = $t02199122403._3 | |
471 | 471 | let totalUserAvailableToClaim = $t02199122403._4 | |
472 | 472 | let usdtPriceAssetAllowableRatio = $t02199122403._5 | |
473 | 473 | let currentUsdtPriceAssetRatio = $t02199122403._6 | |
474 | 474 | let endPeriodBlocksLeft = $t02199122403._7 | |
475 | 475 | let updatedCurrentPeriod = $t02199122403._8 | |
476 | 476 | let periodStart = $t02199122403._9 | |
477 | 477 | let periodEnd = $t02199122403._10 | |
478 | 478 | let evaluateResult = split(asString(invoke(this, "claimREADONLY", [priceAssetId58, userAddress58], nil)), SEP) | |
479 | 479 | if ((evaluateResult == evaluateResult)) | |
480 | 480 | then { | |
481 | 481 | let availablePriceAmountToClaim = parseIntValue(evaluateResult[3]) | |
482 | 482 | let investorTotalAmount = parseIntValue(origInvestArray[IdxInvTotalAmount]) | |
483 | 483 | let investorRemainingAmount = parseIntValue(origInvestArray[IdxInvRemainingAmount]) | |
484 | 484 | let investorPriceAssetBalance = parseIntValue(origInvestArray[IdxInvClaimedPriceAssetAmount]) | |
485 | 485 | let investorIdoAssetBalance = parseIntValue(origInvestArray[IdxInvClaimedIdoAssetAmount]) | |
486 | 486 | let investorLastClaimedHeight = parseIntValue(origInvestArray[IdxInvLastClaimedHeight]) | |
487 | 487 | let newInvestArray = [toString(investorTotalAmount), "0", toString(investorPriceAssetBalance), toString(investorIdoAssetBalance), toString(investorLastClaimedHeight)] | |
488 | 488 | let totals = readTotalsArrayOrDefault() | |
489 | 489 | let totalsTotalAmount = parseIntValue(totals[IdxInvTotalAmount]) | |
490 | 490 | let totalsRemainingAmount = parseIntValue(totals[IdxInvRemainingAmount]) | |
491 | 491 | let totalsClaimedPriceAssetAmount = parseIntValue(totals[IdxInvRemainingAmount]) | |
492 | 492 | let totalsClaimedIdoAssetAmount = parseIntValue(totals[IdxInvClaimedPriceAssetAmount]) | |
493 | 493 | let totalsLastClaimedHeight = parseIntValue(totals[IdxInvLastClaimedHeight]) | |
494 | 494 | let newTotalsRemainingAmount = (totalsRemainingAmount - investorRemainingAmount) | |
495 | 495 | let newTotalArray = [toString(totalsTotalAmount), toString(newTotalsRemainingAmount), toString(totalsClaimedPriceAssetAmount), toString(totalsClaimedIdoAssetAmount), toString(totalsLastClaimedHeight)] | |
496 | 496 | let newTotalRemainingAmount = (valueOrElse(getInteger(keyTotalRemainingAmount()), 0) + investorRemainingAmount) | |
497 | 497 | let entries = if ((claimedAssetId58 == priceAssetId58)) | |
498 | 498 | then { | |
499 | 499 | let checks = [if ((periodUserAvailableToClaim > 0)) | |
500 | 500 | then true | |
501 | 501 | else throwErr("unavailable to claim because user period allowance reached"), if ((periodTotalAvailableToClaim > 0)) | |
502 | 502 | then true | |
503 | 503 | else throwErr("unavailable to claim because total period allowance reached"), if ((periodMinAvailableToClaim > 0)) | |
504 | 504 | then true | |
505 | 505 | else throwErr("nothing to claim"), if ((usdtPriceAssetAllowableRatio > currentUsdtPriceAssetRatio)) | |
506 | 506 | then true | |
507 | 507 | else throwErr("unavailable to claim because usdn price lower than usdtPriceAssetAllowableRatio")] | |
508 | 508 | if ((checks == checks)) | |
509 | 509 | then { | |
510 | 510 | let updatedPeriodTotalAvailableToClaim = (periodTotalAvailableToClaim - periodMinAvailableToClaim) | |
511 | 511 | let updatedPeriodUserAvailableToClaim = (periodUserAvailableToClaim - periodMinAvailableToClaim) | |
512 | 512 | let entries = if ((priceAssetBalance > periodMinAvailableToClaim)) | |
513 | 513 | then [ScriptTransfer(i.caller, periodMinAvailableToClaim, outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), (priceAssetBalance - periodMinAvailableToClaim))] | |
514 | 514 | else { | |
515 | 515 | let lastClaimEntries = if ((availablePriceAmountToClaim == periodMinAvailableToClaim)) | |
516 | 516 | then [IntegerEntry(keyInvestorRemainingAmount(userAddress58), investorRemainingAmount), IntegerEntry(keyTotalRemainingAmount(), newTotalRemainingAmount), TotalsEntry(keyInvestor(userAddress58), newInvestArray, totalsDiff, newClaimPeriodHeight, 0), TotalsEntry(keyTotals(), newTotalArray, totalsDiff, newClaimPeriodHeight, 0)] | |
517 | 517 | else [TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight, 0), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight, 0)] | |
518 | 518 | let updatedPriceAssetBalance = ((priceAssetBalance + outAmount) - periodMinAvailableToClaim) | |
519 | 519 | ([ScriptTransfer(i.caller, periodMinAvailableToClaim, outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), updatedPriceAssetBalance)] ++ lastClaimEntries) | |
520 | 520 | } | |
521 | 521 | $Tuple2(([IntegerEntry(keyCurrentPeriod(), updatedCurrentPeriod), IntegerEntry(keyPeriodStartHeight(updatedCurrentPeriod), periodStart), IntegerEntry(keyPeriodEndHeight(updatedCurrentPeriod), periodEnd), IntegerEntry(keyPeriodTotalAvailableToClaim(priceAssetId58, updatedCurrentPeriod), updatedPeriodTotalAvailableToClaim), IntegerEntry(keyPeriodUserAvailableToClaim(priceAssetId58, updatedCurrentPeriod, userAddress58), updatedPeriodUserAvailableToClaim), ClaimOperationHistoryEntry(userAddress58, periodMinAvailableToClaim, claimedIdoAssetAmountFromDiff, i.transactionId)] ++ entries), unit) | |
522 | 522 | } | |
523 | 523 | else throw("Strict value is not equal to itself.") | |
524 | 524 | } | |
525 | 525 | else { | |
526 | 526 | let priceAssetBalanceIdoDecimals = fraction(priceAssetBalance, scale8, pow(10, 0, priceAssetDecimals, 0, 0, DOWN)) | |
527 | - | let | |
528 | - | let | |
529 | - | let | |
530 | - | let entries = if ((height > | |
527 | + | let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart]) | |
528 | + | let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration]) | |
529 | + | let claimEnd = (claimStart + claimDuration) | |
530 | + | let entries = if ((height > claimEnd)) | |
531 | 531 | then [IntegerEntry(keyInvestorRemainingAmount(userAddress58), investorRemainingAmount), IntegerEntry(keyTotalRemainingAmount(), newTotalRemainingAmount), TotalsEntry(keyInvestor(userAddress58), newInvestArray, totalsDiff, newClaimPeriodHeight, priceAssetBalance), TotalsEntry(keyTotals(), newTotalArray, totalsDiff, newClaimPeriodHeight, priceAssetBalance)] | |
532 | 532 | else [TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight, priceAssetBalance), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight, priceAssetBalance)] | |
533 | 533 | $Tuple2(([ScriptTransfer(i.caller, (outAmount + priceAssetBalanceIdoDecimals), outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), 0), ClaimOperationHistoryEntry(userAddress58, claimedPriceAmountFromDiff, (claimedIdoAssetAmountFromDiff + priceAssetBalanceIdoDecimals), i.transactionId)] ++ entries), unit) | |
534 | 534 | } | |
535 | 535 | entries | |
536 | 536 | } | |
537 | 537 | else throw("Strict value is not equal to itself.") | |
538 | 538 | } | |
539 | 539 | } | |
540 | 540 | ||
541 | 541 | ||
542 | 542 | ||
543 | 543 | @Callable(i) | |
544 | 544 | func cleanRemaingAmount (userAddress58) = { | |
545 | 545 | let priceAssetId58 = readConfigArray()[IdxCfgPriceAssetId] | |
546 | 546 | let evaluateResult = split(asString(invoke(this, "claimREADONLY", [priceAssetId58, userAddress58], nil)), SEP) | |
547 | 547 | if ((evaluateResult == evaluateResult)) | |
548 | 548 | then { | |
549 | 549 | let availablePriceAmountToClaim = parseIntValue(evaluateResult[2]) | |
550 | 550 | let checkUnclaimedAssets = if ((availablePriceAmountToClaim == 0)) | |
551 | 551 | then true | |
552 | 552 | else throwErr("user have unclaimed assets") | |
553 | 553 | if ((checkUnclaimedAssets == checkUnclaimedAssets)) | |
554 | 554 | then { | |
555 | 555 | let investor = split(value(getString(keyInvestor(userAddress58))), SEP) | |
556 | 556 | let investorTotalAmount = parseIntValue(investor[IdxInvTotalAmount]) | |
557 | 557 | let investorRemainingAmount = parseIntValue(investor[IdxInvRemainingAmount]) | |
558 | 558 | let investorPriceAssetBalance = parseIntValue(investor[IdxInvClaimedPriceAssetAmount]) | |
559 | 559 | let investorIdoAssetBalance = parseIntValue(investor[IdxInvClaimedIdoAssetAmount]) | |
560 | 560 | let investorLastClaimedHeight = parseIntValue(investor[IdxInvLastClaimedHeight]) | |
561 | 561 | let investorRemainingAmountCheck = if ((investorRemainingAmount != 0)) | |
562 | 562 | then true | |
563 | 563 | else throwErr("investorRemainingAmount already zero") | |
564 | 564 | if ((investorRemainingAmountCheck == investorRemainingAmountCheck)) | |
565 | 565 | then { | |
566 | 566 | let newInvestor = makeString(["%d%d%d%d%d", toString(investorTotalAmount), "0", toString(investorPriceAssetBalance), toString(investorIdoAssetBalance), toString(investorLastClaimedHeight)], SEP) | |
567 | 567 | let totals = split(value(getString(keyTotals())), SEP) | |
568 | 568 | let totalsTotalAmount = parseIntValue(totals[IdxInvTotalAmount]) | |
569 | 569 | let totalsRemainingAmount = parseIntValue(totals[IdxInvRemainingAmount]) | |
570 | 570 | let totalsClaimedPriceAssetAmount = parseIntValue(totals[IdxInvClaimedPriceAssetAmount]) | |
571 | 571 | let totalsClaimedIdoAssetAmount = parseIntValue(totals[IdxInvClaimedIdoAssetAmount]) | |
572 | 572 | let totalsLastClaimedHeight = parseIntValue(totals[IdxInvLastClaimedHeight]) | |
573 | 573 | let newTotals = makeString(["%d%d%d%d%d", toString(totalsTotalAmount), toString((totalsRemainingAmount - investorRemainingAmount)), toString(totalsClaimedPriceAssetAmount), toString(totalsClaimedIdoAssetAmount), toString(totalsLastClaimedHeight)], SEP) | |
574 | 574 | let newTotalRemainingAmount = (valueOrElse(getInteger(keyTotalRemainingAmount()), 0) + investorRemainingAmount) | |
575 | 575 | [IntegerEntry(keyInvestorRemainingAmount(userAddress58), investorRemainingAmount), IntegerEntry(keyTotalRemainingAmount(), newTotalRemainingAmount), StringEntry(keyInvestor(userAddress58), newInvestor), StringEntry(keyTotals(), newTotals)] | |
576 | 576 | } | |
577 | 577 | else throw("Strict value is not equal to itself.") | |
578 | 578 | } | |
579 | 579 | else throw("Strict value is not equal to itself.") | |
580 | 580 | } | |
581 | 581 | else throw("Strict value is not equal to itself.") | |
582 | 582 | } | |
583 | 583 | ||
584 | 584 | ||
585 | 585 | ||
586 | 586 | @Callable(i) | |
587 | 587 | func claimREADONLY (claimedAssetId58,userAddress58) = { | |
588 | 588 | let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String("")) | |
589 | 589 | let totalsDiff = claimResultTuple._1 | |
590 | 590 | let outAmount = claimResultTuple._2 | |
591 | 591 | let outAssetId = claimResultTuple._3 | |
592 | 592 | let origInvestArray = claimResultTuple._4 | |
593 | 593 | let newClaimPeriodHeight = claimResultTuple._5 | |
594 | 594 | let availableToClaimArray = claimResultTuple._6 | |
595 | 595 | let availablePriceAmountToClaim = availableToClaimArray[0] | |
596 | 596 | let availableIdoAmountToClaim = availableToClaimArray[1] | |
597 | 597 | $Tuple2(nil, makeString(["%s%d%d", userAddress58, toString(availablePriceAmountToClaim), toString(availableIdoAmountToClaim)], SEP)) | |
598 | 598 | } | |
599 | 599 | ||
600 | 600 | ||
601 | 601 | ||
602 | 602 | @Callable(i) | |
603 | 603 | func claimV2READONLY (claimedAssetId58,userAddress58) = { | |
604 | 604 | let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String("")) | |
605 | 605 | let totalsDiff = claimResultTuple._1 | |
606 | 606 | let outAmount = claimResultTuple._2 | |
607 | 607 | let outAssetId = claimResultTuple._3 | |
608 | 608 | let origInvestArray = claimResultTuple._4 | |
609 | 609 | let newClaimPeriodHeight = claimResultTuple._5 | |
610 | 610 | let availableToClaimArray = claimResultTuple._6 | |
611 | 611 | let availablePriceAmountToClaim = availableToClaimArray[0] | |
612 | 612 | let availableIdoAmountToClaim = availableToClaimArray[1] | |
613 | 613 | let cfgArray = readConfigArray() | |
614 | 614 | let priceAssetId58 = cfgArray[IdxCfgPriceAssetId] | |
615 | 615 | let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0) | |
616 | 616 | let priceAssetBalanceIdoDecimals = (priceAssetBalance * 100) | |
617 | 617 | let availableIdoAmountToClaimWithPriceAssetBalance = (availableIdoAmountToClaim + priceAssetBalanceIdoDecimals) | |
618 | - | let $ | |
619 | - | let periodMinAvailableToClaim = $ | |
620 | - | let periodTotalAvailableToClaim = $ | |
621 | - | let periodUserAvailableToClaim = $ | |
622 | - | let totalUserAvailableToClaim = $ | |
623 | - | let usdtPriceAssetAllowableRatio = $ | |
624 | - | let currentUsdtPriceAssetRatio = $ | |
625 | - | let endPeriodBlocksLeft = $ | |
626 | - | let updatedCurrentPeriod = $ | |
627 | - | let periodStart = $ | |
628 | - | let periodEnd = $ | |
618 | + | let $t03416234574 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement]) | |
619 | + | let periodMinAvailableToClaim = $t03416234574._1 | |
620 | + | let periodTotalAvailableToClaim = $t03416234574._2 | |
621 | + | let periodUserAvailableToClaim = $t03416234574._3 | |
622 | + | let totalUserAvailableToClaim = $t03416234574._4 | |
623 | + | let usdtPriceAssetAllowableRatio = $t03416234574._5 | |
624 | + | let currentUsdtPriceAssetRatio = $t03416234574._6 | |
625 | + | let endPeriodBlocksLeft = $t03416234574._7 | |
626 | + | let updatedCurrentPeriod = $t03416234574._8 | |
627 | + | let periodStart = $t03416234574._9 | |
628 | + | let periodEnd = $t03416234574._10 | |
629 | 629 | let currentPeriodEndHeight = valueOrElse(getInteger(keyPeriodEndHeight(updatedCurrentPeriod)), 0) | |
630 | 630 | let userTotalPriceAssetClaimed = (parseIntValue(readInvestorArrayOrFail(userAddress58)[IdxInvClaimedPriceAssetAmount]) - priceAssetBalance) | |
631 | 631 | let resultString = if ((height > currentPeriodEndHeight)) | |
632 | 632 | then { | |
633 | 633 | let periodLenght = value(getInteger(keyPeriodLength())) | |
634 | 634 | let userPeriodAllowance = value(getInteger(keyUserPeriodAllowance(priceAssetId58))) | |
635 | 635 | let totalPeriodAllowance = value(getInteger(keyTotalPeriodAllowance(priceAssetId58))) | |
636 | 636 | makeString(["%d%d%d%d%d%d", toString(availableIdoAmountToClaimWithPriceAssetBalance), toString(userPeriodAllowance), toString(totalPeriodAllowance), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(periodLenght), toString(userTotalPriceAssetClaimed)], SEP) | |
637 | 637 | } | |
638 | 638 | else makeString(["%d%d%d%d%d%d", toString(availableIdoAmountToClaimWithPriceAssetBalance), toString(periodMinAvailableToClaim), toString(periodTotalAvailableToClaim), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(endPeriodBlocksLeft), toString(userTotalPriceAssetClaimed)], SEP) | |
639 | 639 | $Tuple2(nil, resultString) | |
640 | 640 | } | |
641 | 641 | ||
642 | 642 | ||
643 | 643 | ||
644 | 644 | @Callable(i) | |
645 | 645 | func setManager (pendingManagerPublicKey) = { | |
646 | 646 | let checkCaller = mustManager(i) | |
647 | 647 | if ((checkCaller == checkCaller)) | |
648 | 648 | then { | |
649 | 649 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
650 | 650 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
651 | 651 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
652 | 652 | else throw("Strict value is not equal to itself.") | |
653 | 653 | } | |
654 | 654 | else throw("Strict value is not equal to itself.") | |
655 | 655 | } | |
656 | 656 | ||
657 | 657 | ||
658 | 658 | ||
659 | 659 | @Callable(i) | |
660 | 660 | func confirmManager () = { | |
661 | 661 | let pm = pendingManagerPublicKeyOrUnit() | |
662 | 662 | let hasPM = if (isDefined(pm)) | |
663 | 663 | then true | |
664 | 664 | else throw("No pending manager") | |
665 | 665 | if ((hasPM == hasPM)) | |
666 | 666 | then { | |
667 | 667 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
668 | 668 | then true | |
669 | 669 | else throw("You are not pending manager") | |
670 | 670 | if ((checkPM == checkPM)) | |
671 | 671 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
672 | 672 | else throw("Strict value is not equal to itself.") | |
673 | 673 | } | |
674 | 674 | else throw("Strict value is not equal to itself.") | |
675 | 675 | } | |
676 | 676 | ||
677 | 677 | ||
678 | 678 | @Verifier(tx) | |
679 | 679 | func verify () = { | |
680 | 680 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
681 | 681 | case pk: ByteVector => | |
682 | 682 | pk | |
683 | 683 | case _: Unit => | |
684 | 684 | tx.senderPublicKey | |
685 | 685 | case _ => | |
686 | 686 | throw("Match error") | |
687 | 687 | } | |
688 | 688 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
689 | 689 | } | |
690 | 690 |
github/deemru/w8io/026f985 75.68 ms ◑