tx · cLn7pSKTvUPDA7kRF9LLbDscMU16HPvJLMnj8Fgp5Vi 3MvZpvvbmovEt3pvdDZKvhKRjjQxdbUD6Tv: -0.02400000 Waves 2022.11.02 19:24 [2299724] smart account 3MvZpvvbmovEt3pvdDZKvhKRjjQxdbUD6Tv > SELF 0.00000000 Waves
{ "type": 13, "id": "cLn7pSKTvUPDA7kRF9LLbDscMU16HPvJLMnj8Fgp5Vi", "fee": 2400000, "feeAssetId": null, "timestamp": 1667406266734, "version": 1, "sender": "3MvZpvvbmovEt3pvdDZKvhKRjjQxdbUD6Tv", "senderPublicKey": "39YkRD2qWXTcdNBr4CbDnm8g8SAB2FKVaDeGYahcFHHx", "proofs": [ "3TtJUdrJdFhAAQNdC6FYUuvdo21CZzX79xWzDdzCtnUn6GKGHg2pSeZyAmdPWm6rdzBPa8my9M1epYU533PgdaEd" ], "script": "base64:AAIFAAAAAAAADecIAhIJCgcBAQEBAQgBEgASBAoCCAgSBAoCCAgSBAoCCAgSAwoBCBIAIg9nZXRTdHJpbmdPckZhaWwiA2tleSIDU0VQIghCVUZTQ0FMRSIGc2NhbGU4Ih1jb252ZXJ0UHJpY2VBc3NldEludG9JZG9Bc3NldCIQcHJpY2VBc3NldEFtb3VudCIOcHJpY2VBc3NldE1VTFQiBXByaWNlIglwcmljZU1VTFQiDGlkb0Fzc2V0TVVMVCIPYlByaWNlQXNzZXRNVUxUIg1iSWRvQXNzZXRNVUxUIg5iUHJpY2VBc3NldEJVRiIPYkFtb3VudEFzc2V0QlVGIg5JZHhDZmdJZG9TdGFydCIRSWR4Q2ZnSWRvRHVyYXRpb24iEElkeENmZ0NsYWltU3RhcnQiE0lkeENmZ0NsYWltRHVyYXRpb24iC0lkeENmZ1ByaWNlIg9JZHhDZmdQcmljZU11bHQiEElkeENmZ0lkb0Fzc2V0SWQiEklkeENmZ0lkb0Fzc2V0TXVsdCISSWR4Q2ZnUHJpY2VBc3NldElkIhRJZHhDZmdQcmljZUFzc2V0TXVsdCIVSWR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UAAAABBQAAAAJjSAkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAACYUEAAAAABQAAAANuaWwJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAEAAAACY0sBAAAAAmNMAAAAAAQAAAACY00EAAAAAmJvCQEAAAACYlYAAAAAAwkAAAEAAAACBQAAAAJibwIAAAAKQnl0ZVZlY3RvcgQAAAACY2IFAAAAAmJvBQAAAAJjYgMJAAABAAAAAgUAAAACYm8CAAAABFVuaXQIBQAAAAJjSwAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAmNLAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACY0sAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAJjTfIzBIE=", "chainId": 84, "height": 2299724, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8TsecpdEE6i1S8ux9PTHTQ8WFid6DyVhFPpQhu8yogGD Next: iVezS8psV1r55PtN5XbtJNZWqJh4tKZYsgsSNKrtzdN Diff:
Old | New | Differences | |
---|---|---|---|
491 | 491 | let updatedCurrentPeriod = $t02534725759._8 | |
492 | 492 | let periodStart = $t02534725759._9 | |
493 | 493 | let periodEnd = $t02534725759._10 | |
494 | - | let resultString = makeString(["%d%d%d%d%d%d%d" | |
494 | + | let resultString = makeString(["%d%d%d%d%d%d%d", toString(availableIdoAmountToClaim), toString(periodMinAvailableToClaim), toString(periodTotalAvailableToClaim), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(endPeriodBlocksLeft)], SEP) | |
495 | 495 | $Tuple2(nil, resultString) | |
496 | 496 | } | |
497 | 497 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
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 convertPriceAssetIntoIdoAsset (priceAssetAmount,priceAssetMULT,price,priceMULT,idoAssetMULT) = { | |
14 | 14 | let bPriceAssetMULT = toBigInt(priceAssetMULT) | |
15 | 15 | let bIdoAssetMULT = toBigInt(idoAssetMULT) | |
16 | 16 | let bPriceAssetBUF = fraction(toBigInt(priceAssetAmount), BUFSCALE, bPriceAssetMULT) | |
17 | 17 | let bAmountAssetBUF = fraction(bPriceAssetBUF, toBigInt(priceMULT), toBigInt(price)) | |
18 | 18 | toInt(fraction(bAmountAssetBUF, toBigInt(idoAssetMULT), BUFSCALE)) | |
19 | 19 | } | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | let IdxCfgIdoStart = 1 | |
23 | 23 | ||
24 | 24 | let IdxCfgIdoDuration = 2 | |
25 | 25 | ||
26 | 26 | let IdxCfgClaimStart = 3 | |
27 | 27 | ||
28 | 28 | let IdxCfgClaimDuration = 4 | |
29 | 29 | ||
30 | 30 | let IdxCfgPrice = 5 | |
31 | 31 | ||
32 | 32 | let IdxCfgPriceMult = 6 | |
33 | 33 | ||
34 | 34 | let IdxCfgIdoAssetId = 7 | |
35 | 35 | ||
36 | 36 | let IdxCfgIdoAssetMult = 8 | |
37 | 37 | ||
38 | 38 | let IdxCfgPriceAssetId = 9 | |
39 | 39 | ||
40 | 40 | let IdxCfgPriceAssetMult = 10 | |
41 | 41 | ||
42 | 42 | let IdxCfgMinInvestAmount = 11 | |
43 | 43 | ||
44 | 44 | 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) | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | 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)) | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | let IdxInvTotalAmount = 1 | |
51 | 51 | ||
52 | 52 | let IdxInvRemainingAmount = 2 | |
53 | 53 | ||
54 | 54 | let IdxInvClaimedPriceAssetAmount = 3 | |
55 | 55 | ||
56 | 56 | let IdxInvClaimedIdoAssetAmount = 4 | |
57 | 57 | ||
58 | 58 | let IdxInvLastClaimedHeight = 5 | |
59 | 59 | ||
60 | 60 | func formatInvestorS (totalAmount,remainingAmount,claimedPriceAssetAmount,claimedIdoAssetAmount,lastClaimedHeight) = makeString(["%d%d%d%d%d", totalAmount, remainingAmount, claimedPriceAssetAmount, claimedIdoAssetAmount, lastClaimedHeight], SEP) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func formatInvestor (totalAmount,remainingAmount,claimedPriceAssetAmount,claimedIdoAssetAmount,lastClaimedHeight) = formatInvestorS(toString(totalAmount), toString(remainingAmount), toString(claimedPriceAssetAmount), toString(claimedIdoAssetAmount), toString(lastClaimedHeight)) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func formatHistoryRecord (priceAssetAmount,idoAssetAmount) = makeString(["%d%d%d%d", toString(height), toString(lastBlock.timestamp), toString(priceAssetAmount), toString(idoAssetAmount)], SEP) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func keyConfig () = "%s__config" | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func keyInvestor (userAddress) = ("%s__" + userAddress) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func keyTotals () = "%s__totals" | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func keyUSDNClaimDisabled () = "%s__usdnClaimDisabled" | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func keyUSDNClaimEndHeight () = "%s__usdnClaimEndHeight" | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func keyPeriodLength () = makeString(["%s", "periodLength"], SEP) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func keyCurrentPeriod () = makeString(["%s", "currentPeriod"], SEP) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func keyPeriodStartHeight (periodNum) = makeString(["%s%s", "periodStartHeight", toString(periodNum)], SEP) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func keyPeriodEndHeight (periodNum) = makeString(["%s%s", "periodEndHeight", toString(periodNum)], SEP) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func keyUsdtPriceAssetAllowableRatio () = makeString(["%s", "usdtPriceAssetAllowableRatio"], SEP) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func keyTotalPeriodAllowance (assetId) = makeString(["%s%s", "totalPeriodAllowance", assetId], SEP) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func keyUserPeriodAllowance (assetId) = makeString(["%s%s", "userPeriodAllowance", assetId], SEP) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func keyPeriodTotalAvailableToClaim (assetId,periodNum) = makeString(["%s%s%s", "periodTotalAvailableToClaim", assetId, toString(periodNum)], SEP) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func keyPeriodUserAvailableToClaim (assetId,periodNum,userAddress) = makeString(["%s%s%s%s", "periodUserAvailableToClaim", assetId, toString(periodNum), userAddress], SEP) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func keyUsdtPriceAssetStablePool () = makeString(["%s", "usdtPriceAssetStablePool"], SEP) | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func keyUsdtAssetId () = makeString(["%s", "usdtAssetId"], SEP) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func keyPriceAssetBalance (address) = makeString(["%s%s", "priceAssetBalance", address], SEP) | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func readConfigArray () = split(getStringOrFail(keyConfig()), SEP) | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func readTotalsArrayOrDefaultByCustomKey (customKey) = split(valueOrElse(getString(customKey), formatInvestorS("0", "0", "0", "0", "0")), SEP) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func readTotalsArrayOrDefault () = readTotalsArrayOrDefaultByCustomKey(keyTotals()) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func readInvestorArrayOrDefault (userAddress) = readTotalsArrayOrDefaultByCustomKey(keyInvestor(userAddress)) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func readInvestorArrayOrFail (userAddress) = split(getStringOrFail(keyInvestor(userAddress)), SEP) | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | let IdxDiffTotalIncrement = 0 | |
145 | 145 | ||
146 | 146 | let IdxDiffRemainingPriceAmountIncrement = 1 | |
147 | 147 | ||
148 | 148 | let IdxDiffClaimedPriceAmountIncrement = 2 | |
149 | 149 | ||
150 | 150 | let IdxDiffClaimedIdoAssetAmountIncrement = 3 | |
151 | 151 | ||
152 | 152 | func TotalsEntry (key,origArray,incrementDiff,newLastClaimedHeight) = { | |
153 | 153 | let totalAmount = parseIntValue(origArray[IdxInvTotalAmount]) | |
154 | 154 | let remainingAmount = parseIntValue(origArray[IdxInvRemainingAmount]) | |
155 | 155 | let claimedPriceAssetAmount = parseIntValue(origArray[IdxInvClaimedPriceAssetAmount]) | |
156 | 156 | let claimedIdoAssetAmount = parseIntValue(origArray[IdxInvClaimedIdoAssetAmount]) | |
157 | 157 | let lastClaimedHeight = parseIntValue(origArray[IdxInvLastClaimedHeight]) | |
158 | 158 | let newTotalAmount = (totalAmount + incrementDiff[IdxDiffTotalIncrement]) | |
159 | 159 | let newRemainingAmount = (remainingAmount + incrementDiff[IdxDiffRemainingPriceAmountIncrement]) | |
160 | 160 | let newClaimedPriceAssetAmount = (claimedPriceAssetAmount + incrementDiff[IdxDiffClaimedPriceAmountIncrement]) | |
161 | 161 | let newClaimedIdoAssetAmount = (claimedIdoAssetAmount + incrementDiff[IdxDiffClaimedIdoAssetAmountIncrement]) | |
162 | 162 | if ((0 > newRemainingAmount)) | |
163 | 163 | then throw("invalid math") | |
164 | 164 | else StringEntry(key, formatInvestor(newTotalAmount, newRemainingAmount, newClaimedPriceAssetAmount, newClaimedIdoAssetAmount, newLastClaimedHeight)) | |
165 | 165 | } | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func InvestOperationHistoryEntry (userAddress,priceAssetAmount,idoAssetAmount,txId) = StringEntry(keyOperationHistoryRecord("invest", userAddress, toBase58String(txId)), formatHistoryRecord(priceAssetAmount, idoAssetAmount)) | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func ClaimOperationHistoryEntry (userAddress,priceAssetAmount,idoAssetAmount,txId) = StringEntry(keyOperationHistoryRecord("claim", userAddress, toBase58String(txId)), formatHistoryRecord(priceAssetAmount, idoAssetAmount)) | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func internalClaim (claimedAssetId58,userAddress,txId) = { | |
175 | 175 | let cfgArray = readConfigArray() | |
176 | 176 | let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart]) | |
177 | 177 | let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration]) | |
178 | 178 | let claimEnd = (claimStart + claimDuration) | |
179 | 179 | let price = parseIntValue(cfgArray[IdxCfgPrice]) | |
180 | 180 | let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult]) | |
181 | 181 | let idoAssetId58 = cfgArray[IdxCfgIdoAssetId] | |
182 | 182 | let idoAssetId = fromBase58String(idoAssetId58) | |
183 | 183 | let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult]) | |
184 | 184 | let priceAssetId58 = cfgArray[IdxCfgPriceAssetId] | |
185 | 185 | let priceAssetId = fromBase58String(priceAssetId58) | |
186 | 186 | let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult]) | |
187 | 187 | let userAddress58 = toString(userAddress) | |
188 | 188 | let origInvestArray = readInvestorArrayOrFail(userAddress58) | |
189 | 189 | let investTotalAmount = parseIntValue(origInvestArray[IdxInvTotalAmount]) | |
190 | 190 | let investLastClaimedHeightTMP = parseIntValue(origInvestArray[IdxInvLastClaimedHeight]) | |
191 | 191 | let investLastClaimedHeight = if ((claimStart >= investLastClaimedHeightTMP)) | |
192 | 192 | then claimStart | |
193 | 193 | else investLastClaimedHeightTMP | |
194 | 194 | let newClaimPeriodHeight = if ((height > claimEnd)) | |
195 | 195 | then claimEnd | |
196 | 196 | else if ((claimStart > height)) | |
197 | 197 | then claimStart | |
198 | 198 | else height | |
199 | 199 | let claimingBlocks = (newClaimPeriodHeight - investLastClaimedHeight) | |
200 | 200 | let claimingPriceAssetAmount = fraction(investTotalAmount, claimingBlocks, claimDuration) | |
201 | 201 | let claimingIdoAssetAmount = convertPriceAssetIntoIdoAsset(claimingPriceAssetAmount, priceAssetMult, price, priceMult, idoAssetMult) | |
202 | 202 | let isUSDN = (claimedAssetId58 == priceAssetId58) | |
203 | 203 | let isUSDNClaimDisabled = valueOrElse(getBoolean(keyUSDNClaimDisabled()), false) | |
204 | 204 | let isUSDNClaimEnded = match getInteger(keyUSDNClaimEndHeight()) { | |
205 | 205 | case end: Int => | |
206 | 206 | (height > end) | |
207 | 207 | case _: Unit => | |
208 | 208 | false | |
209 | 209 | case _ => | |
210 | 210 | throw("Match error") | |
211 | 211 | } | |
212 | 212 | let checks = [if (!(if (isUSDN) | |
213 | 213 | then isUSDNClaimDisabled | |
214 | 214 | else false)) | |
215 | 215 | then true | |
216 | 216 | else throw("USDN claim is disabled"), if (!(if (isUSDN) | |
217 | 217 | then isUSDNClaimEnded | |
218 | 218 | else false)) | |
219 | 219 | then true | |
220 | 220 | else throw("USDN claim is ended")] | |
221 | 221 | if ((checks == checks)) | |
222 | 222 | then if ((claimedAssetId58 == priceAssetId58)) | |
223 | 223 | then $Tuple6([0, -(claimingPriceAssetAmount), claimingPriceAssetAmount, 0], claimingPriceAssetAmount, priceAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount]) | |
224 | 224 | else if ((claimedAssetId58 == idoAssetId58)) | |
225 | 225 | then $Tuple6([0, -(claimingPriceAssetAmount), 0, claimingIdoAssetAmount], claimingIdoAssetAmount, idoAssetId, origInvestArray, newClaimPeriodHeight, [claimingPriceAssetAmount, claimingIdoAssetAmount]) | |
226 | 226 | else throw(("unsupported assetId: " + claimedAssetId58)) | |
227 | 227 | else throw("Strict value is not equal to itself.") | |
228 | 228 | } | |
229 | 229 | ||
230 | 230 | ||
231 | 231 | func internalClaimV2 (priceAssetId58,userAddress58,outAmount,totalUserAvailableToClaim) = { | |
232 | 232 | let totalPeriodPriceAssetAllowance = value(getInteger(keyTotalPeriodAllowance(priceAssetId58))) | |
233 | 233 | let userPeriodPriceAssetAllowance = value(getInteger(keyUserPeriodAllowance(priceAssetId58))) | |
234 | 234 | let periodLength = value(getInteger(keyPeriodLength())) | |
235 | 235 | let currentPeriod = valueOrElse(getInteger(keyCurrentPeriod()), 0) | |
236 | 236 | let $t01187412792 = if ((currentPeriod > 0)) | |
237 | 237 | then { | |
238 | 238 | let lastPeriodStartHeight = value(getInteger(keyPeriodStartHeight((currentPeriod - 1)))) | |
239 | 239 | let lastPeriodEndHeight = value(getInteger(keyPeriodEndHeight((currentPeriod - 1)))) | |
240 | 240 | let $t01214212524 = if ((height > lastPeriodEndHeight)) | |
241 | 241 | then { | |
242 | 242 | let updatedCurrentPeriod = (currentPeriod + 1) | |
243 | 243 | let periodStart = (lastPeriodEndHeight + 1) | |
244 | 244 | let periodEnd = ((periodStart + periodLength) - 1) | |
245 | 245 | $Tuple3(updatedCurrentPeriod, periodStart, periodEnd) | |
246 | 246 | } | |
247 | 247 | else $Tuple3(currentPeriod, lastPeriodStartHeight, lastPeriodEndHeight) | |
248 | 248 | let updatedCurrentPeriod = $t01214212524._1 | |
249 | 249 | let periodStart = $t01214212524._2 | |
250 | 250 | let periodEnd = $t01214212524._3 | |
251 | 251 | $Tuple3(updatedCurrentPeriod, periodStart, periodEnd) | |
252 | 252 | } | |
253 | 253 | else $Tuple3(currentPeriod, valueOrElse(getInteger(keyPeriodStartHeight(currentPeriod)), height), valueOrElse(getInteger(keyPeriodEndHeight(currentPeriod)), ((height + periodLength) - 1))) | |
254 | 254 | let updatedCurrentPeriod = $t01187412792._1 | |
255 | 255 | let periodStart = $t01187412792._2 | |
256 | 256 | let periodEnd = $t01187412792._3 | |
257 | 257 | let periodTotalAvailableToClaim = valueOrElse(getInteger(keyPeriodTotalAvailableToClaim(priceAssetId58, updatedCurrentPeriod)), totalPeriodPriceAssetAllowance) | |
258 | 258 | let periodUserAvailableToClaim = valueOrElse(getInteger(keyPeriodUserAvailableToClaim(priceAssetId58, updatedCurrentPeriod, userAddress58)), userPeriodPriceAssetAllowance) | |
259 | 259 | let periodMinAvailableToClaim = min([outAmount, periodTotalAvailableToClaim, periodUserAvailableToClaim]) | |
260 | 260 | let usdtPriceAssetAllowableRatio = value(getInteger(keyUsdtPriceAssetAllowableRatio())) | |
261 | 261 | let putOneTknV2PriceAssetAmount = scale8 | |
262 | 262 | let $t01343513688 = { | |
263 | 263 | let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "putOneTknV2WithoutTakeFeeREADONLY", [putOneTknV2PriceAssetAmount, priceAssetId58], nil) | |
264 | 264 | if ($isInstanceOf(@, "(Int, Int, Int)")) | |
265 | 265 | then @ | |
266 | 266 | else throw("Couldn't cast Any to (Int, Int, Int)") | |
267 | 267 | } | |
268 | 268 | if (($t01343513688 == $t01343513688)) | |
269 | 269 | then { | |
270 | 270 | let bonus = $t01343513688._3 | |
271 | 271 | let feeAmount = $t01343513688._2 | |
272 | 272 | let lpAmount = $t01343513688._1 | |
273 | 273 | let usdtAssetId = value(getString(keyUsdtAssetId())) | |
274 | 274 | let $t01375013968 = { | |
275 | 275 | let @ = invoke(addressFromStringValue(value(getString(keyUsdtPriceAssetStablePool()))), "getOneTknV2READONLY", [usdtAssetId, lpAmount], nil) | |
276 | 276 | if ($isInstanceOf(@, "(Int, Int)")) | |
277 | 277 | then @ | |
278 | 278 | else throw("Couldn't cast Any to (Int, Int)") | |
279 | 279 | } | |
280 | 280 | if (($t01375013968 == $t01375013968)) | |
281 | 281 | then { | |
282 | 282 | let getOneTknV2FeeAmount = $t01375013968._2 | |
283 | 283 | let usdtAmount = $t01375013968._1 | |
284 | 284 | let currentUsdtPriceAssetRatio = fraction(usdtAmount, putOneTknV2PriceAssetAmount, scale8) | |
285 | 285 | let endPeriodBlocksLeft = (periodEnd - height) | |
286 | 286 | $Tuple10(periodMinAvailableToClaim, periodTotalAvailableToClaim, periodUserAvailableToClaim, totalUserAvailableToClaim, usdtPriceAssetAllowableRatio, currentUsdtPriceAssetRatio, endPeriodBlocksLeft, updatedCurrentPeriod, periodStart, periodEnd) | |
287 | 287 | } | |
288 | 288 | else throw("Strict value is not equal to itself.") | |
289 | 289 | } | |
290 | 290 | else throw("Strict value is not equal to itself.") | |
291 | 291 | } | |
292 | 292 | ||
293 | 293 | ||
294 | 294 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
295 | 295 | case s: String => | |
296 | 296 | fromBase58String(s) | |
297 | 297 | case _: Unit => | |
298 | 298 | unit | |
299 | 299 | case _ => | |
300 | 300 | throw("Match error") | |
301 | 301 | } | |
302 | 302 | ||
303 | 303 | ||
304 | 304 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
305 | 305 | case s: String => | |
306 | 306 | fromBase58String(s) | |
307 | 307 | case _: Unit => | |
308 | 308 | unit | |
309 | 309 | case _ => | |
310 | 310 | throw("Match error") | |
311 | 311 | } | |
312 | 312 | ||
313 | 313 | ||
314 | 314 | func mustManager (i) = { | |
315 | 315 | let pd = throw("Permission denied") | |
316 | 316 | match managerPublicKeyOrUnit() { | |
317 | 317 | case pk: ByteVector => | |
318 | 318 | if ((i.callerPublicKey == pk)) | |
319 | 319 | then true | |
320 | 320 | else pd | |
321 | 321 | case _: Unit => | |
322 | 322 | if ((i.caller == this)) | |
323 | 323 | then true | |
324 | 324 | else pd | |
325 | 325 | case _ => | |
326 | 326 | throw("Match error") | |
327 | 327 | } | |
328 | 328 | } | |
329 | 329 | ||
330 | 330 | ||
331 | 331 | @Callable(i) | |
332 | 332 | func constructor (idoStart,idoDuration,claimStart,claimDuration,price,priceAssetId58,minInvestAmount) = { | |
333 | 333 | let priceMult = ((100 * 1000) * 1000) | |
334 | 334 | let idoEnd = (idoStart + idoDuration) | |
335 | 335 | if (isDefined(getString(keyConfig()))) | |
336 | 336 | then throw("already initialized") | |
337 | 337 | else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString(i.caller))) | |
338 | 338 | then throw("not authorized") | |
339 | 339 | else if ((size(i.payments) != 1)) | |
340 | 340 | then throw("exactly 1 payment must be attached") | |
341 | 341 | else if ((idoEnd >= claimStart)) | |
342 | 342 | then throw("claimStart must be greater than idoEnd") | |
343 | 343 | else { | |
344 | 344 | let pmt = value(i.payments[0]) | |
345 | 345 | let idoAssetId = value(pmt.assetId) | |
346 | 346 | let idoAssetInfo = valueOrErrorMessage(assetInfo(idoAssetId), "fail to load ido asset info") | |
347 | 347 | let idoAssetId58 = toBase58String(idoAssetId) | |
348 | 348 | let idoAssetMult = pow(10, 0, idoAssetInfo.decimals, 0, 0, DOWN) | |
349 | 349 | let priceAssetId = fromBase58String(priceAssetId58) | |
350 | 350 | let priceAssetInfo = valueOrErrorMessage(assetInfo(priceAssetId), "fail to load price asset info") | |
351 | 351 | let priceAssetMult = pow(10, 0, priceAssetInfo.decimals, 0, 0, DOWN) | |
352 | 352 | let origTotalsArray = readTotalsArrayOrDefault() | |
353 | 353 | let totalsDiff = [0, 0, 0, 0] | |
354 | 354 | [StringEntry(keyConfig(), fromatConfig(idoStart, idoDuration, claimStart, claimDuration, price, priceMult, idoAssetId58, idoAssetMult, priceAssetId58, priceAssetMult, minInvestAmount, pmt.amount)), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart)] | |
355 | 355 | } | |
356 | 356 | } | |
357 | 357 | ||
358 | 358 | ||
359 | 359 | ||
360 | 360 | @Callable(i) | |
361 | 361 | func invest () = { | |
362 | 362 | let cfgArray = readConfigArray() | |
363 | 363 | let idoStart = parseIntValue(cfgArray[IdxCfgIdoStart]) | |
364 | 364 | let idoDuration = parseIntValue(cfgArray[IdxCfgIdoDuration]) | |
365 | 365 | let idoEnd = (idoStart + idoDuration) | |
366 | 366 | let claimStart = parseIntValue(cfgArray[IdxCfgClaimStart]) | |
367 | 367 | let claimDuration = parseIntValue(cfgArray[IdxCfgClaimDuration]) | |
368 | 368 | let price = parseIntValue(cfgArray[IdxCfgPrice]) | |
369 | 369 | let priceMult = parseIntValue(cfgArray[IdxCfgPriceMult]) | |
370 | 370 | let idoAssetId58 = cfgArray[IdxCfgIdoAssetId] | |
371 | 371 | let idoAssetId = fromBase58String(idoAssetId58) | |
372 | 372 | let idoAssetMult = parseIntValue(cfgArray[IdxCfgIdoAssetMult]) | |
373 | 373 | let priceAssetId58 = cfgArray[IdxCfgPriceAssetId] | |
374 | 374 | let priceAssetId = fromBase58String(priceAssetId58) | |
375 | 375 | let priceAssetMult = parseIntValue(cfgArray[IdxCfgPriceAssetMult]) | |
376 | 376 | let minIvestAmount = parseIntValue(cfgArray[IdxCfgMinInvestAmount]) | |
377 | 377 | let userAddress = toString(i.caller) | |
378 | 378 | if ((idoStart > height)) | |
379 | 379 | then throw("ido has not been started yet") | |
380 | 380 | else if ((height > idoEnd)) | |
381 | 381 | then throw("ido has been already ended") | |
382 | 382 | else if ((size(i.payments) != 1)) | |
383 | 383 | then throw("exactly 1 payment is expected") | |
384 | 384 | else { | |
385 | 385 | let pmt = value(i.payments[0]) | |
386 | 386 | let pmtAssetId = value(pmt.assetId) | |
387 | 387 | let pmtAmount = pmt.amount | |
388 | 388 | if ((pmtAssetId != priceAssetId)) | |
389 | 389 | then throw((("invalid payment asset id: " + toBase58String(pmtAssetId)) + " is expected")) | |
390 | 390 | else { | |
391 | 391 | let origInvestorArray = readInvestorArrayOrDefault(userAddress) | |
392 | 392 | let origTotalsArray = readTotalsArrayOrDefault() | |
393 | 393 | let newPriceTotalAmount = (parseIntValue(origTotalsArray[IdxInvTotalAmount]) + pmtAmount) | |
394 | 394 | let requiredIdoAssetAmount = (newPriceTotalAmount * 100) | |
395 | 395 | if ((requiredIdoAssetAmount > assetBalance(this, idoAssetId))) | |
396 | 396 | then throw("IDO asset has been - sold consider to use smaller payment") | |
397 | 397 | else { | |
398 | 398 | let totalsDiff = [pmtAmount, pmtAmount, 0, 0] | |
399 | 399 | [TotalsEntry(keyInvestor(userAddress), origInvestorArray, totalsDiff, claimStart), TotalsEntry(keyTotals(), origTotalsArray, totalsDiff, claimStart), InvestOperationHistoryEntry(userAddress, pmtAmount, 0, i.transactionId)] | |
400 | 400 | } | |
401 | 401 | } | |
402 | 402 | } | |
403 | 403 | } | |
404 | 404 | ||
405 | 405 | ||
406 | 406 | ||
407 | 407 | @Callable(i) | |
408 | 408 | func claim (claimedAssetId58,userAddress58) = { | |
409 | 409 | let callerAddress58 = toString(i.caller) | |
410 | 410 | if ((userAddress58 != callerAddress58)) | |
411 | 411 | then throw("not authorized") | |
412 | 412 | else { | |
413 | 413 | let cfgArray = readConfigArray() | |
414 | 414 | let priceAssetId58 = cfgArray[IdxCfgPriceAssetId] | |
415 | 415 | let claimResultTuple = internalClaim(claimedAssetId58, i.caller, i.transactionId) | |
416 | 416 | let totalsDiff = claimResultTuple._1 | |
417 | 417 | let outAmount = claimResultTuple._2 | |
418 | 418 | let outAssetId = claimResultTuple._3 | |
419 | 419 | let origInvestArray = claimResultTuple._4 | |
420 | 420 | let newClaimPeriodHeight = claimResultTuple._5 | |
421 | 421 | let claimedPriceAmountFromDiff = totalsDiff[IdxDiffClaimedPriceAmountIncrement] | |
422 | 422 | let claimedIdoAssetAmountFromDiff = totalsDiff[IdxDiffClaimedIdoAssetAmountIncrement] | |
423 | 423 | let entries = if ((claimedAssetId58 == priceAssetId58)) | |
424 | 424 | then { | |
425 | 425 | let $t01962420068 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement]) | |
426 | 426 | let periodMinAvailableToClaim = $t01962420068._1 | |
427 | 427 | let periodTotalAvailableToClaim = $t01962420068._2 | |
428 | 428 | let periodUserAvailableToClaim = $t01962420068._3 | |
429 | 429 | let totalUserAvailableToClaim = $t01962420068._4 | |
430 | 430 | let usdtPriceAssetAllowableRatio = $t01962420068._5 | |
431 | 431 | let currentUsdtPriceAssetRatio = $t01962420068._6 | |
432 | 432 | let endPeriodBlocksLeft = $t01962420068._7 | |
433 | 433 | let updatedCurrentPeriod = $t01962420068._8 | |
434 | 434 | let periodStart = $t01962420068._9 | |
435 | 435 | let periodEnd = $t01962420068._10 | |
436 | 436 | let priceAssetBalance = valueOrElse(getInteger(keyPriceAssetBalance(userAddress58)), 0) | |
437 | 437 | let updatedPeriodTotalAvailableToClaim = (periodTotalAvailableToClaim - periodMinAvailableToClaim) | |
438 | 438 | let updatedPeriodUserAvailableToClaim = (periodUserAvailableToClaim - periodMinAvailableToClaim) | |
439 | 439 | let entries = if ((priceAssetBalance >= periodMinAvailableToClaim)) | |
440 | 440 | then [ScriptTransfer(i.caller, periodMinAvailableToClaim, outAssetId), IntegerEntry(keyPriceAssetBalance(userAddress58), (priceAssetBalance - periodMinAvailableToClaim))] | |
441 | 441 | else { | |
442 | 442 | let updatedPriceAssetBalance = ((priceAssetBalance + outAmount) - periodMinAvailableToClaim) | |
443 | 443 | [ScriptTransfer(i.caller, periodMinAvailableToClaim, outAssetId), TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight), IntegerEntry(keyPriceAssetBalance(userAddress58), updatedPriceAssetBalance)] | |
444 | 444 | } | |
445 | 445 | $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, claimedPriceAmountFromDiff, claimedIdoAssetAmountFromDiff, i.transactionId)] ++ entries), unit) | |
446 | 446 | } | |
447 | 447 | else $Tuple2([ScriptTransfer(i.caller, outAmount, outAssetId), TotalsEntry(keyInvestor(userAddress58), origInvestArray, totalsDiff, newClaimPeriodHeight), TotalsEntry(keyTotals(), readTotalsArrayOrDefault(), totalsDiff, newClaimPeriodHeight), ClaimOperationHistoryEntry(userAddress58, claimedPriceAmountFromDiff, claimedIdoAssetAmountFromDiff, i.transactionId)], unit) | |
448 | 448 | entries | |
449 | 449 | } | |
450 | 450 | } | |
451 | 451 | ||
452 | 452 | ||
453 | 453 | ||
454 | 454 | @Callable(i) | |
455 | 455 | func claimREADONLY (claimedAssetId58,userAddress58) = { | |
456 | 456 | let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String("")) | |
457 | 457 | let totalsDiff = claimResultTuple._1 | |
458 | 458 | let outAmount = claimResultTuple._2 | |
459 | 459 | let outAssetId = claimResultTuple._3 | |
460 | 460 | let origInvestArray = claimResultTuple._4 | |
461 | 461 | let newClaimPeriodHeight = claimResultTuple._5 | |
462 | 462 | let availableToClaimArray = claimResultTuple._6 | |
463 | 463 | let availablePriceAmountToClaim = availableToClaimArray[0] | |
464 | 464 | let availableIdoAmountToClaim = availableToClaimArray[1] | |
465 | 465 | $Tuple2(nil, makeString(["%s%d%d", userAddress58, toString(availablePriceAmountToClaim), toString(availableIdoAmountToClaim)], SEP)) | |
466 | 466 | } | |
467 | 467 | ||
468 | 468 | ||
469 | 469 | ||
470 | 470 | @Callable(i) | |
471 | 471 | func claimV2READONLY (claimedAssetId58,userAddress58) = { | |
472 | 472 | let claimResultTuple = internalClaim(claimedAssetId58, addressFromStringValue(userAddress58), fromBase58String("")) | |
473 | 473 | let totalsDiff = claimResultTuple._1 | |
474 | 474 | let outAmount = claimResultTuple._2 | |
475 | 475 | let outAssetId = claimResultTuple._3 | |
476 | 476 | let origInvestArray = claimResultTuple._4 | |
477 | 477 | let newClaimPeriodHeight = claimResultTuple._5 | |
478 | 478 | let availableToClaimArray = claimResultTuple._6 | |
479 | 479 | let availablePriceAmountToClaim = availableToClaimArray[0] | |
480 | 480 | let availableIdoAmountToClaim = availableToClaimArray[1] | |
481 | 481 | let cfgArray = readConfigArray() | |
482 | 482 | let priceAssetId58 = cfgArray[IdxCfgPriceAssetId] | |
483 | 483 | let $t02534725759 = internalClaimV2(priceAssetId58, userAddress58, outAmount, totalsDiff[IdxDiffClaimedPriceAmountIncrement]) | |
484 | 484 | let periodMinAvailableToClaim = $t02534725759._1 | |
485 | 485 | let periodTotalAvailableToClaim = $t02534725759._2 | |
486 | 486 | let periodUserAvailableToClaim = $t02534725759._3 | |
487 | 487 | let totalUserAvailableToClaim = $t02534725759._4 | |
488 | 488 | let usdtPriceAssetAllowableRatio = $t02534725759._5 | |
489 | 489 | let currentUsdtPriceAssetRatio = $t02534725759._6 | |
490 | 490 | let endPeriodBlocksLeft = $t02534725759._7 | |
491 | 491 | let updatedCurrentPeriod = $t02534725759._8 | |
492 | 492 | let periodStart = $t02534725759._9 | |
493 | 493 | let periodEnd = $t02534725759._10 | |
494 | - | let resultString = makeString(["%d%d%d%d%d%d%d" | |
494 | + | let resultString = makeString(["%d%d%d%d%d%d%d", toString(availableIdoAmountToClaim), toString(periodMinAvailableToClaim), toString(periodTotalAvailableToClaim), toString(usdtPriceAssetAllowableRatio), toString(currentUsdtPriceAssetRatio), toString(endPeriodBlocksLeft)], SEP) | |
495 | 495 | $Tuple2(nil, resultString) | |
496 | 496 | } | |
497 | 497 | ||
498 | 498 | ||
499 | 499 | ||
500 | 500 | @Callable(i) | |
501 | 501 | func setManager (pendingManagerPublicKey) = { | |
502 | 502 | let checkCaller = mustManager(i) | |
503 | 503 | if ((checkCaller == checkCaller)) | |
504 | 504 | then { | |
505 | 505 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
506 | 506 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
507 | 507 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
508 | 508 | else throw("Strict value is not equal to itself.") | |
509 | 509 | } | |
510 | 510 | else throw("Strict value is not equal to itself.") | |
511 | 511 | } | |
512 | 512 | ||
513 | 513 | ||
514 | 514 | ||
515 | 515 | @Callable(i) | |
516 | 516 | func confirmManager () = { | |
517 | 517 | let pm = pendingManagerPublicKeyOrUnit() | |
518 | 518 | let hasPM = if (isDefined(pm)) | |
519 | 519 | then true | |
520 | 520 | else throw("No pending manager") | |
521 | 521 | if ((hasPM == hasPM)) | |
522 | 522 | then { | |
523 | 523 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
524 | 524 | then true | |
525 | 525 | else throw("You are not pending manager") | |
526 | 526 | if ((checkPM == checkPM)) | |
527 | 527 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
528 | 528 | else throw("Strict value is not equal to itself.") | |
529 | 529 | } | |
530 | 530 | else throw("Strict value is not equal to itself.") | |
531 | 531 | } | |
532 | 532 | ||
533 | 533 | ||
534 | 534 | @Verifier(tx) | |
535 | 535 | func verify () = { | |
536 | 536 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
537 | 537 | case pk: ByteVector => | |
538 | 538 | pk | |
539 | 539 | case _: Unit => | |
540 | 540 | tx.senderPublicKey | |
541 | 541 | case _ => | |
542 | 542 | throw("Match error") | |
543 | 543 | } | |
544 | 544 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
545 | 545 | } | |
546 | 546 |
github/deemru/w8io/026f985 307.66 ms ◑