tx · F6XVGrwNfKoawn776NeSWJoTD3C1VpuxQxipH3TbBp3F 3NC9wWawxuFG6a3sZdfckGwoMeVhLFjZFwH: -0.01400000 Waves 2021.03.25 10:48 [1452996] smart account 3NC9wWawxuFG6a3sZdfckGwoMeVhLFjZFwH > SELF 0.00000000 Waves
{ "type": 13, "id": "F6XVGrwNfKoawn776NeSWJoTD3C1VpuxQxipH3TbBp3F", "fee": 1400000, "feeAssetId": null, "timestamp": 1616658624666, "version": 1, "sender": "3NC9wWawxuFG6a3sZdfckGwoMeVhLFjZFwH", "senderPublicKey": "HoEvP2nFKMAsffQ9PUyAm6auWisyHgusY9HxDeMASrzZ", "proofs": [ "2kyGAfj9tyhgebmJSsXLfhPQkbiKs2cK85eJn2MP1yw71CFtbsAseTTiKkz9BNZkrj1rvCNDdxH8aKLXUVf9KBzk" ], "script": "base64:AAIEAAAAAAAAADUIAhIPCg0ICAgBCAEBAQgBAQEBEgMKAQESABIAEgUKAwgICBIFCgMICAgSBAoCCAESAwoBCAAAAEUAAAAAA1NFUAIAAAACX18BAAAAD2dldFN0cmluZ09yRmFpbAAAAAEAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5CQABLAAAAAICAAAAFU5vIGRhdGEgZm9yIHRoaXMua2V5PQUAAAADa2V5AQAAABBnZXRCb29sZWFuT3JGYWlsAAAAAQAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABBsAAAACBQAAAAR0aGlzBQAAAANrZXkJAAEsAAAAAgIAAAAVTm8gZGF0YSBmb3IgdGhpcy5rZXk9BQAAAANrZXkBAAAADGdldEludE9yRmFpbAAAAAEAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5CQABLAAAAAICAAAAFU5vIGRhdGEgZm9yIHRoaXMua2V5PQUAAAADa2V5AQAAAA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XN5c1N0YXRlVHVwbGUAAAACXzQAAAAFdmFsdWUEAAAAH2Jhc2VBc3NldEJhbGFuY2VDb25zaWRlcmluZ0xvY2sICAUAAAANc3lzU3RhdGVUdXBsZQAAAAJfNQAAAAV2YWx1ZQQAAAANc2hhcmVFbWlzc2lvbggIBQAAAA1zeXNTdGF0ZVR1cGxlAAAAAl82AAAABXZhbHVlBAAAAAhyZXN0RGF0YQkABLkAAAACCQAETAAAAAICAAAAGXN0YXJ0Q3VycmVudFN5c1BhcmFtc1JFU1QJAARMAAAAAgkAAaQAAAABBQAAAAVwcmljZQkABEwAAAACCQABpAAAAAEFAAAAEWRlY2ltYWxzTXVsdFByaWNlCQAETAAAAAIJAAGkAAAAAQUAAAAQYmFzZUFzc2V0QmFsYW5jZQkABEwAAAACCQABpAAAAAEFAAAAFXRvdGFsTG9ja2VkQmFzZUFtb3VudAkABEwAAAACCQABpAAAAAEFAAAAH2Jhc2VBc3NldEJhbGFuY2VDb25zaWRlcmluZ0xvY2sJAARMAAAAAgkAAaQAAAABBQAAAA1zaGFyZUVtaXNzaW9uCQAETAAAAAICAAAAF2VuZEN1cnJlbnRTeXNQYXJhbXNSRVNUBQAAAANuaWwFAAAAA1NFUAkAAAIAAAABBQAAAAhyZXN0RGF0YQAAAACEbu6d", "chainId": 84, "height": 1452996, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AtmcApaBYr5XgwQW1KJ8fpAq4uAU7AWqLAWBaV8f4qns Next: DtnPPqZXor71n3iJtMQAB13ee419iGiCDx5qvcKjrPbD Diff:
Old | New | Differences | |
---|---|---|---|
230 | 230 | if ((0 > baseAssetBalanceCALC)) | |
231 | 231 | then throw(((("baseAssetBalanceCALC < 0: baseAssetBalance=" + toString(baseAssetBalance)) + " baseAssetBalanceCALC=") + toString(baseAssetBalanceCALC))) | |
232 | 232 | else { | |
233 | + | let lastPrice = getIntOrFail(keyPriceLast(internalBaseAssetStr)) | |
233 | 234 | let price = if ((shareEmission == 0)) | |
234 | - | then | |
235 | + | then lastPrice | |
235 | 236 | else fraction(baseAssetBalanceCALC, decimalsMultPrice, shareEmissionCALC) | |
236 | 237 | $Tuple5(price, baseAssetBalance, totalLockedOutBaseAmount, baseAssetBalanceCALC, shareEmission) | |
237 | 238 | } | |
409 | 410 | let topupIntervalInBlocks = parseIntValue(assetCfgArray[IdxCfgTopupIntervalInBlocks]) | |
410 | 411 | let topupMaxNegativePart = parseIntValue(assetCfgArray[IdxCfgTopupMaxNegativePart]) | |
411 | 412 | let internalBaseAssetStr = assetCfgArray[IdxCfgInternalBaseAsset] | |
413 | + | let topUpManagerAddressStr = assetCfgArray[IdxCfgTopupManagerAddress] | |
412 | 414 | let topUpCurrentIdxKEY = keyTopUpCurrentIdx(internalBaseAssetStr) | |
413 | 415 | let prevTopUpIdx = getIntOrFail(topUpCurrentIdxKEY) | |
414 | 416 | let currentTopUpIdx = (prevTopUpIdx + 1) | |
435 | 437 | else throw("zero amount is not allowed") | |
436 | 438 | let topUpLastHeightKEY = keyTopUpLastHeight(internalBaseAssetStr, toString(i.caller)) | |
437 | 439 | let topUpLastHeight = valueOrElse(getInteger(this, topUpLastHeightKEY), 0) | |
438 | - | if (!(valid)) | |
439 | - | then throw("validation failed") | |
440 | - | else if ((topupIntervalInBlocks > (height - topUpLastHeight))) | |
441 | - | then throw((("1 topup per " + toString(topupIntervalInBlocks)) + " blocks from the same address is allowed")) | |
442 | - | else { | |
443 | - | let price = genericCalcPrice(internalBaseAssetStr, baseAssetId, amount, shareAssetId, priceMult)._1 | |
444 | - | let diffTuple = calcTotalLockedDiff("topup", "", internalBaseAssetStr, price, priceMult, 0, baseAssetId, shareAssetId) | |
445 | - | let topupTotalDiff = diffTuple._1 | |
446 | - | let priceAthKEY = keyPriceATH(internalBaseAssetStr) | |
447 | - | let prevPriceATH = valueOrElse(getInteger(this, priceAthKEY), 0) | |
448 | - | (([IntegerEntry(keyPriceLast(internalBaseAssetStr), price), IntegerEntry(keyPriceHistory(internalBaseAssetStr, height, lastBlock.timestamp), price), IntegerEntry(keyPriceByTopUpIdx(internalBaseAssetStr, currentTopUpIdx), price), IntegerEntry(topUpCurrentIdxKEY, currentTopUpIdx), IntegerEntry(priceAthKEY, if ((price > prevPriceATH)) | |
449 | - | then price | |
450 | - | else prevPriceATH), IntegerEntry(topUpLastHeightKEY, height)] :+ TotalLockedStringEntry("DECREMENT", keyTotalLocked(internalBaseAssetStr), topupTotalDiff)) :+ Burn(shareAssetId, topupTotalDiff[IdxTotalLockedInShare])) | |
451 | - | } | |
440 | + | if ((toString(i.caller) != topUpManagerAddressStr)) | |
441 | + | then throw((("only topUpManager=" + topUpManagerAddressStr) + " can send topUp transactions")) | |
442 | + | else if (!(valid)) | |
443 | + | then throw("validation failed") | |
444 | + | else if ((topupIntervalInBlocks > (height - topUpLastHeight))) | |
445 | + | then throw((("1 topup per " + toString(topupIntervalInBlocks)) + " blocks from the same address is allowed")) | |
446 | + | else { | |
447 | + | let price = genericCalcPrice(internalBaseAssetStr, baseAssetId, amount, shareAssetId, priceMult)._1 | |
448 | + | let diffTuple = calcTotalLockedDiff("topup", "", internalBaseAssetStr, price, priceMult, 0, baseAssetId, shareAssetId) | |
449 | + | let topupTotalDiff = diffTuple._1 | |
450 | + | let priceAthKEY = keyPriceATH(internalBaseAssetStr) | |
451 | + | let prevPriceATH = valueOrElse(getInteger(this, priceAthKEY), 0) | |
452 | + | ((([IntegerEntry(keyPriceLast(internalBaseAssetStr), price), IntegerEntry(keyPriceHistory(internalBaseAssetStr, height, lastBlock.timestamp), price), IntegerEntry(keyPriceByTopUpIdx(internalBaseAssetStr, currentTopUpIdx), price), IntegerEntry(topUpCurrentIdxKEY, currentTopUpIdx), IntegerEntry(priceAthKEY, if ((price > prevPriceATH)) | |
453 | + | then price | |
454 | + | else prevPriceATH), IntegerEntry(topUpLastHeightKEY, height)] :+ TotalLockedStringEntry("DECREMENT", keyTotalLocked(internalBaseAssetStr), topupTotalDiff)) :+ Burn(shareAssetId, topupTotalDiff[IdxTotalLockedInShare])) ++ (if ((0 > amount)) | |
455 | + | then [ScriptTransfer(i.caller, -(amount), baseAssetId)] | |
456 | + | else nil)) | |
457 | + | } | |
452 | 458 | } | |
453 | 459 | ||
454 | 460 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), ("No data for this.key=" + key)) | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | func getBooleanOrFail (key) = valueOrErrorMessage(getBoolean(this, key), ("No data for this.key=" + key)) | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), ("No data for this.key=" + key)) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func failExecuteGet (msg,baseAssetStr,userAddressStr,submitTxIdStr,operationType) = throw(((((((((msg + ": baseAssetStr=") + baseAssetStr) + " userAddressStr=") + userAddressStr) + " submitTxIdStr=") + submitTxIdStr) + " operationType=") + operationType)) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func failSubmitLimitsExceeds (remainingBase,remainingShare,newRemainingBase,newRemainingShare) = throw((((((((("submit operation limits have been reached: " + " remainingBase=") + toString(remainingBase)) + " remainingShare=") + toString(remainingShare)) + " newRemainingBase=") + toString(newRemainingBase)) + " newRemainingShare=") + toString(newRemainingShare))) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func convertShare2Base (shareAmount,price,priceMult) = fraction(shareAmount, price, priceMult) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func convertBase2Share (baseAmount,price,priceMult) = fraction(baseAmount, priceMult, price) | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func keyAssetCfg (baseAssetStr) = ("%s%s%s__config__asset__" + baseAssetStr) | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func keyNextInternalAssetId () = "%s__nextInternalAssetId" | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func keyPriceLast (internalBasetAssetStr) = ("%s%s%d__price__last__" + internalBasetAssetStr) | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func keyPriceATH (internalBasetAssetStr) = ("%s%s%d__price__ath__" + internalBasetAssetStr) | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func keyPriceByTopUpIdx (internalBaseAssetStr,topUpIdx) = makeString(["%s%s%d%d__price__byTopUpIdx", internalBaseAssetStr, toString(topUpIdx)], SEP) | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func keyPriceHistory (internalBasetAssetStr,h,timestamp) = makeString(["%s%s%d%d%d__price__history", internalBasetAssetStr, toString(h), toString(timestamp)], SEP) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func keyTotalLocked (internalBasetAssetStr) = ("%s%s%d__total__locked__" + internalBasetAssetStr) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func keyTotalLockedByUser (internalBaseAssetStr,userAddressStr) = makeString(["%s%s%d%s__total__locked", internalBaseAssetStr, userAddressStr], SEP) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func keyMappingsInternal2baseAssetId (internalBaseAsset) = ("%s%s%d__mappings__internal2baseAssetId__" + toString(internalBaseAsset)) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func keyMappingsShare2baseAssetId (shareAssetStr) = ("%s%s%s__mappings__share2baseAssetId__" + shareAssetStr) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func keyMappingsBaseAsset2shareId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2shareId__" + baseAssetStr) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func keyShutdownPutOperation (internalBaseAssetStr) = ("%s%s%d__shutdown__put__" + internalBaseAssetStr) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func keyShutdownManager (internalBaseAssetStr) = ("%s%s%d__shutdown__manager__" + internalBaseAssetStr) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func keyTopUpCurrentIdx (internalBaseAssetStr) = ("%s%s%d__topup__currentIdx__" + internalBaseAssetStr) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func keyTopUpLastHeight (internalBasetAssetStr,sender) = makeString(["%s%s%s%d%s__topup__last__height", internalBasetAssetStr, sender], SEP) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func keyLimitsRemaining (internalBasetAssetStr) = ("%s%s%d__limits__remaining__" + internalBasetAssetStr) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | let IdxCfgShareAssetId = 1 | |
79 | 79 | ||
80 | 80 | let IdxCfgInternalBaseAsset = 2 | |
81 | 81 | ||
82 | 82 | let IdxCfgDecimalsMultBothAssets = 3 | |
83 | 83 | ||
84 | 84 | let IdxCfgDecimalsMultPrice = 4 | |
85 | 85 | ||
86 | 86 | let IdxCfgGetDelayBlocks = 5 | |
87 | 87 | ||
88 | 88 | let IdxCfgTopupIntervalInBlocks = 6 | |
89 | 89 | ||
90 | 90 | let IdxCfgTopupMaxNegativePart = 7 | |
91 | 91 | ||
92 | 92 | let IdxCfgTopupManagerAddress = 8 | |
93 | 93 | ||
94 | 94 | let IdxCfgSubmitLimitsBaseMax = 9 | |
95 | 95 | ||
96 | 96 | let IdxCfgSubmitLimitsBaseReset = 10 | |
97 | 97 | ||
98 | 98 | let IdxCfgSubmitLimitsShareMax = 11 | |
99 | 99 | ||
100 | 100 | let IdxCfgSubmitLimitsShareReset = 12 | |
101 | 101 | ||
102 | 102 | func dataAssetCfg (shareAssetStr,internalBaseAssetStr,decimalsMultBothAssets,decimalsMultPrice,getDelayInBlocks,topupIntervalInBlocks,topupMaxNegativePart,topupManagerAddress,submitLimitsBaseMax,submitLimitsBaseReset,submitLimitsShareMax,submitLimitsShareReset) = makeString(["%s%d%d%d%d%d%d%s%d%d%d%d", shareAssetStr, internalBaseAssetStr, toString(decimalsMultBothAssets), toString(decimalsMultPrice), toString(getDelayInBlocks), toString(topupIntervalInBlocks), toString(topupMaxNegativePart), topupManagerAddress, toString(submitLimitsBaseMax), toString(submitLimitsBaseReset), toString(submitLimitsShareMax), toString(submitLimitsShareReset)], SEP) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | let IdxTotalLockedInShare = 1 | |
106 | 106 | ||
107 | 107 | let IdxTotalLockedOutBase = 2 | |
108 | 108 | ||
109 | 109 | let IdxTotalLockedInBase = 3 | |
110 | 110 | ||
111 | 111 | let IdxTotalLockedOutShare = 4 | |
112 | 112 | ||
113 | 113 | func dataTotalLocked (inShareAmount,outBaseAmount,inBaseAmount,outShareAmount) = makeString(["%d%d%d%d", toString(inShareAmount), toString(outBaseAmount), toString(inBaseAmount), toString(outShareAmount)], SEP) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func dataTotalLockedInt (inShareAmount,outBaseAmount,inBaseAmount,outShareAmount) = [-1, inShareAmount, outBaseAmount, inBaseAmount, outShareAmount] | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func readTotalLocked (key) = { | |
120 | 120 | let totalLockedArray = split(valueOrElse(getString(this, key), dataTotalLocked(0, 0, 0, 0)), SEP) | |
121 | 121 | dataTotalLockedInt(parseIntValue(totalLockedArray[IdxTotalLockedInShare]), parseIntValue(totalLockedArray[IdxTotalLockedOutBase]), parseIntValue(totalLockedArray[IdxTotalLockedInBase]), parseIntValue(totalLockedArray[IdxTotalLockedOutShare])) | |
122 | 122 | } | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func calcTotalLockedDiff (direction,operationType,internalBaseAssetStr,price,priceMult,inAmount,baseAssetId,shareAssetId) = { | |
126 | 126 | let t = (direction + operationType) | |
127 | 127 | if ((t == "submitP")) | |
128 | 128 | then { | |
129 | 129 | let totalDiff = dataTotalLockedInt(0, 0, inAmount, 0) | |
130 | 130 | let userDiff = totalDiff | |
131 | 131 | $Tuple4(totalDiff, userDiff, 0, fromBase58String("")) | |
132 | 132 | } | |
133 | 133 | else if ((t == "submitG")) | |
134 | 134 | then { | |
135 | 135 | let totalDiff = dataTotalLockedInt(inAmount, 0, 0, 0) | |
136 | 136 | let userDiff = totalDiff | |
137 | 137 | $Tuple4(totalDiff, userDiff, 0, fromBase58String("")) | |
138 | 138 | } | |
139 | 139 | else if ((t == "executeP")) | |
140 | 140 | then { | |
141 | 141 | let outAmount = convertBase2Share(inAmount, price, priceMult) | |
142 | 142 | let totalDiff = dataTotalLockedInt(0, 0, 0, outAmount) | |
143 | 143 | let userDiff = dataTotalLockedInt(0, 0, inAmount, 0) | |
144 | 144 | $Tuple4(totalDiff, userDiff, outAmount, shareAssetId) | |
145 | 145 | } | |
146 | 146 | else if ((t == "executeG")) | |
147 | 147 | then { | |
148 | 148 | let outAmount = convertShare2Base(inAmount, price, priceMult) | |
149 | 149 | let totalDiff = dataTotalLockedInt(0, outAmount, 0, 0) | |
150 | 150 | let userDiff = dataTotalLockedInt(inAmount, 0, 0, 0) | |
151 | 151 | $Tuple4(totalDiff, userDiff, outAmount, baseAssetId) | |
152 | 152 | } | |
153 | 153 | else if ((t == "topup")) | |
154 | 154 | then { | |
155 | 155 | let totalLockedArray = readTotalLocked(keyTotalLocked(internalBaseAssetStr)) | |
156 | 156 | let totalLockedInBaseAmount = totalLockedArray[IdxTotalLockedInBase] | |
157 | 157 | let totalLockedInShareAmount = totalLockedArray[IdxTotalLockedInShare] | |
158 | 158 | let totalDiff = dataTotalLockedInt(totalLockedInShareAmount, (-1 * convertShare2Base(totalLockedInShareAmount, price, priceMult)), totalLockedInBaseAmount, (-1 * convertBase2Share(totalLockedInBaseAmount, price, priceMult))) | |
159 | 159 | $Tuple4(totalDiff, nil, 0, fromBase58String("")) | |
160 | 160 | } | |
161 | 161 | else throw(("Unsupported Type " + t)) | |
162 | 162 | } | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func TotalLockedStringEntry (action,key,diff) = { | |
166 | 166 | func UPDATE (a,b) = if ((action == "INCREMENT")) | |
167 | 167 | then (a + b) | |
168 | 168 | else if ((action == "DECREMENT")) | |
169 | 169 | then (a - b) | |
170 | 170 | else throw(("Unsupported action " + action)) | |
171 | 171 | ||
172 | 172 | let dataArray = readTotalLocked(key) | |
173 | 173 | StringEntry(key, dataTotalLocked(UPDATE(dataArray[IdxTotalLockedInShare], diff[IdxTotalLockedInShare]), UPDATE(dataArray[IdxTotalLockedOutBase], diff[IdxTotalLockedOutBase]), UPDATE(dataArray[IdxTotalLockedInBase], diff[IdxTotalLockedInBase]), UPDATE(dataArray[IdxTotalLockedOutShare], diff[IdxTotalLockedOutShare]))) | |
174 | 174 | } | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func keyOperation (operationType,internalBaseAssetStr,userAddress,txId) = makeString(["%s%d%s%s", operationType, internalBaseAssetStr, userAddress, txId], SEP) | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | let IdxOperStatus = 1 | |
181 | 181 | ||
182 | 182 | let IdxOperInAmount = 2 | |
183 | 183 | ||
184 | 184 | let IdxOperPrice = 3 | |
185 | 185 | ||
186 | 186 | let IdxOperOutAmount = 4 | |
187 | 187 | ||
188 | 188 | let IdxOperStartHeight = 5 | |
189 | 189 | ||
190 | 190 | let IdxOperStartTimestamp = 6 | |
191 | 191 | ||
192 | 192 | let IdxOperEndHeight = 7 | |
193 | 193 | ||
194 | 194 | let IdxOperEndTimestamp = 8 | |
195 | 195 | ||
196 | 196 | let IdxOperLock = 9 | |
197 | 197 | ||
198 | 198 | func privateDataOperationAllStrings (status,inAssetAmount,price,outAssetAmount,startHeight,startTimestamp,endHeight,endTimestamp,lock) = makeString(["%s%d%d%d%d%d%d%d%d", status, inAssetAmount, price, outAssetAmount, startHeight, startTimestamp, endHeight, endTimestamp, lock], SEP) | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | func dataOperation (status,inAssetAmount,price,outAssetAmount,startHeight,startTimestamp,endHeight,endTimestamp,lock) = privateDataOperationAllStrings(status, toString(inAssetAmount), toString(price), toString(outAssetAmount), toString(startHeight), toString(startTimestamp), toString(endHeight), toString(endTimestamp), toString(lock)) | |
202 | 202 | ||
203 | 203 | ||
204 | 204 | func dataOperationExecutionUpdate (currOperArray,newStatus,newPrice,newOutAmount) = privateDataOperationAllStrings(newStatus, currOperArray[IdxOperInAmount], toString(newPrice), toString(newOutAmount), currOperArray[IdxOperStartHeight], currOperArray[IdxOperStartTimestamp], toString(height), toString(lastBlock.timestamp), currOperArray[IdxOperLock]) | |
205 | 205 | ||
206 | 206 | ||
207 | 207 | func readAssetCfgOrFail (baseAssetStr) = { | |
208 | 208 | let key = keyAssetCfg(baseAssetStr) | |
209 | 209 | split(getStringOrFail(key), SEP) | |
210 | 210 | } | |
211 | 211 | ||
212 | 212 | ||
213 | 213 | let IdxLimitsRemainingBase = 1 | |
214 | 214 | ||
215 | 215 | let IdxLimitsRemainingShare = 2 | |
216 | 216 | ||
217 | 217 | func RemainingLimitsStringEntry (key,baseRemainingLimit,shareRemainingLimit) = StringEntry(key, makeString(["%d%d", toString(baseRemainingLimit), toString(shareRemainingLimit)], SEP)) | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | func genericCalcPrice (internalBaseAssetStr,baseAssetId,topUpBaseAmount,shareAssetId,decimalsMultPrice) = { | |
221 | 221 | let totalLockedArray = readTotalLocked(keyTotalLocked(internalBaseAssetStr)) | |
222 | 222 | let totalLockedOutBaseAmount = totalLockedArray[IdxTotalLockedOutBase] | |
223 | 223 | let totalLockedInBaseAmount = totalLockedArray[IdxTotalLockedInBase] | |
224 | 224 | let baseAssetBalance = assetBalance(this, baseAssetId) | |
225 | 225 | let baseAssetBalanceCALC = (((baseAssetBalance + topUpBaseAmount) - totalLockedInBaseAmount) - totalLockedOutBaseAmount) | |
226 | 226 | let totalLockedOutShareAmount = totalLockedArray[IdxTotalLockedOutShare] | |
227 | 227 | let totalLockedInShareAmount = totalLockedArray[IdxTotalLockedInShare] | |
228 | 228 | let shareEmission = value(assetInfo(shareAssetId)).quantity | |
229 | 229 | let shareEmissionCALC = (shareEmission + totalLockedOutShareAmount) | |
230 | 230 | if ((0 > baseAssetBalanceCALC)) | |
231 | 231 | then throw(((("baseAssetBalanceCALC < 0: baseAssetBalance=" + toString(baseAssetBalance)) + " baseAssetBalanceCALC=") + toString(baseAssetBalanceCALC))) | |
232 | 232 | else { | |
233 | + | let lastPrice = getIntOrFail(keyPriceLast(internalBaseAssetStr)) | |
233 | 234 | let price = if ((shareEmission == 0)) | |
234 | - | then | |
235 | + | then lastPrice | |
235 | 236 | else fraction(baseAssetBalanceCALC, decimalsMultPrice, shareEmissionCALC) | |
236 | 237 | $Tuple5(price, baseAssetBalance, totalLockedOutBaseAmount, baseAssetBalanceCALC, shareEmission) | |
237 | 238 | } | |
238 | 239 | } | |
239 | 240 | ||
240 | 241 | ||
241 | 242 | func calcPrice (internalBaseAssetStr,baseAssetId,shareAssetId,decimalsMultPrice) = genericCalcPrice(internalBaseAssetStr, baseAssetId, 0, shareAssetId, decimalsMultPrice) | |
242 | 243 | ||
243 | 244 | ||
244 | 245 | func submit (operationType,i,inAmount,inAssetId,baseAssetStr) = { | |
245 | 246 | let inAssetStr = toBase58String(inAssetId) | |
246 | 247 | let userAddressStr = toString(i.caller) | |
247 | 248 | let baseAssetId = fromBase58String(baseAssetStr) | |
248 | 249 | let cfgArray = readAssetCfgOrFail(baseAssetStr) | |
249 | 250 | let shareAssetStr = cfgArray[IdxCfgShareAssetId] | |
250 | 251 | let shareAssetId = fromBase58String(shareAssetStr) | |
251 | 252 | let decimalsMultBothAssets = parseIntValue(cfgArray[IdxCfgDecimalsMultBothAssets]) | |
252 | 253 | let internalBaseAssetStr = cfgArray[IdxCfgInternalBaseAsset] | |
253 | 254 | let limitsKEY = keyLimitsRemaining(internalBaseAssetStr) | |
254 | 255 | let limitsCfgArray = split(getStringOrFail(limitsKEY), SEP) | |
255 | 256 | let limitsRemainingBase = parseIntValue(limitsCfgArray[IdxLimitsRemainingBase]) | |
256 | 257 | let limitsRemainingShare = parseIntValue(limitsCfgArray[IdxLimitsRemainingShare]) | |
257 | 258 | let isPutBlocked = getBooleanOrFail(keyShutdownPutOperation(internalBaseAssetStr)) | |
258 | 259 | if (isPutBlocked) | |
259 | 260 | then throw("put operation is blocked") | |
260 | 261 | else { | |
261 | 262 | let diffTuple = calcTotalLockedDiff("submit", operationType, internalBaseAssetStr, 0, 0, inAmount, baseAssetId, shareAssetId) | |
262 | 263 | let limitsRemainingBaseNew = (limitsRemainingBase - diffTuple._2[IdxTotalLockedInBase]) | |
263 | 264 | let limitsRemainingShareNew = (limitsRemainingShare - diffTuple._2[IdxTotalLockedInShare]) | |
264 | 265 | if (if ((0 > limitsRemainingBaseNew)) | |
265 | 266 | then true | |
266 | 267 | else (0 > limitsRemainingShareNew)) | |
267 | 268 | then failSubmitLimitsExceeds(limitsRemainingBase, limitsRemainingShare, limitsRemainingBaseNew, limitsRemainingShareNew) | |
268 | 269 | else { | |
269 | 270 | let topUpCurrentIdx = getIntOrFail(keyTopUpCurrentIdx(internalBaseAssetStr)) | |
270 | 271 | ((([StringEntry(keyOperation(operationType, internalBaseAssetStr, userAddressStr, toBase58String(i.transactionId)), dataOperation("PENDING", inAmount, 0, 0, height, lastBlock.timestamp, 0, 0, (topUpCurrentIdx + 1)))] :+ TotalLockedStringEntry("INCREMENT", keyTotalLocked(internalBaseAssetStr), diffTuple._1)) :+ TotalLockedStringEntry("INCREMENT", keyTotalLockedByUser(internalBaseAssetStr, userAddressStr), diffTuple._2)) :+ RemainingLimitsStringEntry(limitsKEY, limitsRemainingBaseNew, limitsRemainingShareNew)) | |
271 | 272 | } | |
272 | 273 | } | |
273 | 274 | } | |
274 | 275 | ||
275 | 276 | ||
276 | 277 | func execute (operationType,baseAssetStr,userAddressStr,submitTxIdStr) = { | |
277 | 278 | let userAddress = addressFromStringValue(userAddressStr) | |
278 | 279 | let assetCfgArray = readAssetCfgOrFail(baseAssetStr) | |
279 | 280 | let shareAssetId = fromBase58String(assetCfgArray[IdxCfgShareAssetId]) | |
280 | 281 | let internalBaseAssetStr = assetCfgArray[IdxCfgInternalBaseAsset] | |
281 | 282 | let decimalsMultPrice = parseIntValue(assetCfgArray[IdxCfgDecimalsMultPrice]) | |
282 | 283 | let baseAssetId = fromBase58String(baseAssetStr) | |
283 | 284 | let operationKey = keyOperation(operationType, internalBaseAssetStr, userAddressStr, submitTxIdStr) | |
284 | 285 | let operationArray = split(getStringOrFail(operationKey), SEP) | |
285 | 286 | let status = operationArray[IdxOperStatus] | |
286 | 287 | let inAmount = parseIntValue(operationArray[IdxOperInAmount]) | |
287 | 288 | let operLock = parseIntValue(operationArray[IdxOperLock]) | |
288 | 289 | let currTopUpIdx = getIntOrFail(keyTopUpCurrentIdx(internalBaseAssetStr)) | |
289 | 290 | let priceByTopUpId = getIntOrFail(keyPriceByTopUpIdx(internalBaseAssetStr, currTopUpIdx)) | |
290 | 291 | if ((status != "PENDING")) | |
291 | 292 | then failExecuteGet("Status is not PENDING", baseAssetStr, userAddressStr, submitTxIdStr, operationType) | |
292 | 293 | else if ((operLock > currTopUpIdx)) | |
293 | 294 | then failExecuteGet(((("OperLock[" + toString(operLock)) + "] > ") + toString(currTopUpIdx)), baseAssetStr, userAddressStr, submitTxIdStr, operationType) | |
294 | 295 | else { | |
295 | 296 | let diffTuple = calcTotalLockedDiff("execute", operationType, internalBaseAssetStr, priceByTopUpId, decimalsMultPrice, inAmount, baseAssetId, shareAssetId) | |
296 | 297 | let outAmount = diffTuple._3 | |
297 | 298 | let outTransferData = if ((diffTuple._4 == baseAssetId)) | |
298 | 299 | then [ScriptTransfer(userAddress, outAmount, baseAssetId)] | |
299 | 300 | else [Reissue(shareAssetId, outAmount, true), ScriptTransfer(userAddress, outAmount, shareAssetId)] | |
300 | 301 | (((outTransferData :+ StringEntry(operationKey, dataOperationExecutionUpdate(operationArray, "FINISHED", priceByTopUpId, outAmount))) :+ TotalLockedStringEntry("DECREMENT", keyTotalLocked(internalBaseAssetStr), diffTuple._1)) :+ TotalLockedStringEntry("DECREMENT", keyTotalLockedByUser(internalBaseAssetStr, userAddressStr), diffTuple._2)) | |
301 | 302 | } | |
302 | 303 | } | |
303 | 304 | ||
304 | 305 | ||
305 | 306 | func privateCurrentSysParamsREST (baseAssetStr) = { | |
306 | 307 | let baseAssetId = fromBase58String(baseAssetStr) | |
307 | 308 | let cfgArray = readAssetCfgOrFail(baseAssetStr) | |
308 | 309 | let shareAssetStr = cfgArray[IdxCfgShareAssetId] | |
309 | 310 | let shareAssetId = fromBase58String(shareAssetStr) | |
310 | 311 | let decimalsMultBothAssets = parseIntValue(cfgArray[IdxCfgDecimalsMultBothAssets]) | |
311 | 312 | let decimalsMultPrice = parseIntValue(cfgArray[IdxCfgDecimalsMultPrice]) | |
312 | 313 | let internalBaseAssetStr = cfgArray[IdxCfgInternalBaseAsset] | |
313 | 314 | let sysState = calcPrice(internalBaseAssetStr, baseAssetId, shareAssetId, decimalsMultPrice) | |
314 | 315 | $Tuple6(IntegerEntry("price", sysState._1), IntegerEntry("decimalsMultPrice", decimalsMultPrice), IntegerEntry("baseAssetBalance", sysState._2), IntegerEntry("totalLockedBaseAmount", sysState._3), IntegerEntry("baseAssetBalanceConsideringLock", sysState._4), IntegerEntry("shareEmission", sysState._5)) | |
315 | 316 | } | |
316 | 317 | ||
317 | 318 | ||
318 | 319 | @Callable(i) | |
319 | 320 | func adminRegisterAsset (baseAssetStr,shareAssetName,shareAssetDescr,getDelayinBlocks,shutdownManagerAddress,startPrice,topupIntervalInBlocks,topupMaxNegativePart,topupManagerAddress,submitLimitsBaseMax,submitLimitsBaseReset,submitLimitsShareMax,submitLimitsShareReset) = { | |
320 | 321 | let baseAssetId = fromBase58String(baseAssetStr) | |
321 | 322 | let decimals = value(assetInfo(baseAssetId)).decimals | |
322 | 323 | let decimalsMultBothAssets = pow(10, 0, decimals, 0, 0, DOWN) | |
323 | 324 | let decimalsMultPrice = ((100 * 1000) * 1000) | |
324 | 325 | let topupMaxNegativePercents = fraction(topupMaxNegativePart, 100, decimalsMultBothAssets) | |
325 | 326 | let baseAssetBalance = assetBalance(this, baseAssetId) | |
326 | 327 | if ((i.caller != this)) | |
327 | 328 | then throw("permissions denied") | |
328 | 329 | else if ((baseAssetBalance == 0)) | |
329 | 330 | then throw(((toString(this) + " must have any initial balance of ") + baseAssetStr)) | |
330 | 331 | else if (isDefined(getString(this, keyAssetCfg(baseAssetStr)))) | |
331 | 332 | then throw((baseAssetStr + " has been already registered")) | |
332 | 333 | else if ((toString(addressFromStringValue(shutdownManagerAddress)) != shutdownManagerAddress)) | |
333 | 334 | then throw("invalid shutdownManagerAddress") | |
334 | 335 | else if ((toString(addressFromStringValue(topupManagerAddress)) != topupManagerAddress)) | |
335 | 336 | then throw("invalid topupManagerAddress") | |
336 | 337 | else if ((0 > getDelayinBlocks)) | |
337 | 338 | then throw(("invalid getDelayinBlocks=" + toString(getDelayinBlocks))) | |
338 | 339 | else if (if ((0 >= topupMaxNegativePercents)) | |
339 | 340 | then true | |
340 | 341 | else (topupMaxNegativePercents >= 99)) | |
341 | 342 | then throw("invalid topupMaxNegativePart parameter") | |
342 | 343 | else { | |
343 | 344 | let shareInitAmount = convertBase2Share(baseAssetBalance, startPrice, decimalsMultPrice) | |
344 | 345 | let shareAssetIssueAction = Issue(shareAssetName, shareAssetDescr, shareInitAmount, decimals, true) | |
345 | 346 | let shareAssetId = calculateAssetId(shareAssetIssueAction) | |
346 | 347 | let shareAssetStr = toBase58String(shareAssetId) | |
347 | 348 | let internalBaseAssetId = valueOrElse(getInteger(this, keyNextInternalAssetId()), 0) | |
348 | 349 | let internalBaseAssetStr = toString(internalBaseAssetId) | |
349 | 350 | [StringEntry(keyAssetCfg(baseAssetStr), dataAssetCfg(shareAssetStr, internalBaseAssetStr, decimalsMultBothAssets, decimalsMultPrice, getDelayinBlocks, topupIntervalInBlocks, topupMaxNegativePart, topupManagerAddress, submitLimitsBaseMax, submitLimitsBaseReset, submitLimitsShareMax, submitLimitsShareReset)), StringEntry(keyMappingsInternal2baseAssetId(internalBaseAssetId), baseAssetStr), StringEntry(keyMappingsBaseAsset2internalId(baseAssetStr), internalBaseAssetStr), StringEntry(keyMappingsShare2baseAssetId(shareAssetStr), baseAssetStr), StringEntry(keyMappingsBaseAsset2shareId(baseAssetStr), shareAssetStr), BooleanEntry(keyShutdownPutOperation(internalBaseAssetStr), false), StringEntry(keyShutdownManager(internalBaseAssetStr), shutdownManagerAddress), IntegerEntry(keyNextInternalAssetId(), (internalBaseAssetId + 1)), IntegerEntry(keyPriceLast(internalBaseAssetStr), startPrice), IntegerEntry(keyPriceHistory(internalBaseAssetStr, height, lastBlock.timestamp), startPrice), IntegerEntry(keyTopUpCurrentIdx(internalBaseAssetStr), 0), RemainingLimitsStringEntry(keyLimitsRemaining(internalBaseAssetStr), submitLimitsBaseMax, submitLimitsShareMax), shareAssetIssueAction] | |
350 | 351 | } | |
351 | 352 | } | |
352 | 353 | ||
353 | 354 | ||
354 | 355 | ||
355 | 356 | @Callable(i) | |
356 | 357 | func shutdownPut (internalBaseAssetId) = { | |
357 | 358 | let internalBaseAssetIdStr = toString(internalBaseAssetId) | |
358 | 359 | let baseAssetIdStr = getStringOrFail(keyMappingsInternal2baseAssetId(internalBaseAssetId)) | |
359 | 360 | let shutdownManagerAddress = getStringOrFail(keyShutdownManager(internalBaseAssetIdStr)) | |
360 | 361 | if ((1 > size(baseAssetIdStr))) | |
361 | 362 | then throw("invalid internalBaseAssetId") | |
362 | 363 | else if ((toString(i.caller) != shutdownManagerAddress)) | |
363 | 364 | then throw("access denied") | |
364 | 365 | else [BooleanEntry(keyShutdownPutOperation(toString(internalBaseAssetId)), true)] | |
365 | 366 | } | |
366 | 367 | ||
367 | 368 | ||
368 | 369 | ||
369 | 370 | @Callable(i) | |
370 | 371 | func submitPut () = { | |
371 | 372 | let pmt = value(i.payments[0]) | |
372 | 373 | let inAmount = pmt.amount | |
373 | 374 | let inAssetId = value(pmt.assetId) | |
374 | 375 | let baseAssetStr = toBase58String(inAssetId) | |
375 | 376 | submit("P", i, inAmount, inAssetId, baseAssetStr) | |
376 | 377 | } | |
377 | 378 | ||
378 | 379 | ||
379 | 380 | ||
380 | 381 | @Callable(i) | |
381 | 382 | func submitGet () = { | |
382 | 383 | let pmt = value(i.payments[0]) | |
383 | 384 | let inAmount = pmt.amount | |
384 | 385 | let inAssetId = value(pmt.assetId) | |
385 | 386 | let shareAssetStr = toBase58String(inAssetId) | |
386 | 387 | let baseAssetStr = getStringOrFail(keyMappingsShare2baseAssetId(shareAssetStr)) | |
387 | 388 | submit("G", i, inAmount, inAssetId, baseAssetStr) | |
388 | 389 | } | |
389 | 390 | ||
390 | 391 | ||
391 | 392 | ||
392 | 393 | @Callable(i) | |
393 | 394 | func executePut (baseAssetStr,userAddressStr,submitTxIdStr) = execute("P", baseAssetStr, userAddressStr, submitTxIdStr) | |
394 | 395 | ||
395 | 396 | ||
396 | 397 | ||
397 | 398 | @Callable(i) | |
398 | 399 | func executeGet (baseAssetStr,userAddressStr,submitTxIdStr) = execute("G", baseAssetStr, userAddressStr, submitTxIdStr) | |
399 | 400 | ||
400 | 401 | ||
401 | 402 | ||
402 | 403 | @Callable(i) | |
403 | 404 | func topUpBalance (baseAssetStr,amount) = { | |
404 | 405 | let baseAssetId = fromBase58String(baseAssetStr) | |
405 | 406 | let assetCfgArray = readAssetCfgOrFail(baseAssetStr) | |
406 | 407 | let shareAssetId = fromBase58String(assetCfgArray[IdxCfgShareAssetId]) | |
407 | 408 | let priceMult = parseIntValue(assetCfgArray[IdxCfgDecimalsMultPrice]) | |
408 | 409 | let bothAssetMult = parseIntValue(assetCfgArray[IdxCfgDecimalsMultBothAssets]) | |
409 | 410 | let topupIntervalInBlocks = parseIntValue(assetCfgArray[IdxCfgTopupIntervalInBlocks]) | |
410 | 411 | let topupMaxNegativePart = parseIntValue(assetCfgArray[IdxCfgTopupMaxNegativePart]) | |
411 | 412 | let internalBaseAssetStr = assetCfgArray[IdxCfgInternalBaseAsset] | |
413 | + | let topUpManagerAddressStr = assetCfgArray[IdxCfgTopupManagerAddress] | |
412 | 414 | let topUpCurrentIdxKEY = keyTopUpCurrentIdx(internalBaseAssetStr) | |
413 | 415 | let prevTopUpIdx = getIntOrFail(topUpCurrentIdxKEY) | |
414 | 416 | let currentTopUpIdx = (prevTopUpIdx + 1) | |
415 | 417 | let valid = if ((amount > 0)) | |
416 | 418 | then { | |
417 | 419 | let pmt = value(i.payments[0]) | |
418 | 420 | let pmtAssetId = value(pmt.assetId) | |
419 | 421 | if ((baseAssetId != pmtAssetId)) | |
420 | 422 | then throw("attached payment's asset id is NOT matched passed baseAssetStr") | |
421 | 423 | else if ((size(i.payments) > 1)) | |
422 | 424 | then throw("only one payment can be attached") | |
423 | 425 | else if ((pmt.amount != amount)) | |
424 | 426 | then throw("attached payment.amount is NOT matched passed amount argument") | |
425 | 427 | else true | |
426 | 428 | } | |
427 | 429 | else if ((0 > amount)) | |
428 | 430 | then { | |
429 | 431 | let baseBalance = assetBalance(this, baseAssetId) | |
430 | 432 | let allowedAmount = fraction(topupMaxNegativePart, baseBalance, bothAssetMult) | |
431 | 433 | if ((-(amount) > allowedAmount)) | |
432 | 434 | then throw(("Topup negative amount couldn't be greater than " + toString(allowedAmount))) | |
433 | 435 | else true | |
434 | 436 | } | |
435 | 437 | else throw("zero amount is not allowed") | |
436 | 438 | let topUpLastHeightKEY = keyTopUpLastHeight(internalBaseAssetStr, toString(i.caller)) | |
437 | 439 | let topUpLastHeight = valueOrElse(getInteger(this, topUpLastHeightKEY), 0) | |
438 | - | if (!(valid)) | |
439 | - | then throw("validation failed") | |
440 | - | else if ((topupIntervalInBlocks > (height - topUpLastHeight))) | |
441 | - | then throw((("1 topup per " + toString(topupIntervalInBlocks)) + " blocks from the same address is allowed")) | |
442 | - | else { | |
443 | - | let price = genericCalcPrice(internalBaseAssetStr, baseAssetId, amount, shareAssetId, priceMult)._1 | |
444 | - | let diffTuple = calcTotalLockedDiff("topup", "", internalBaseAssetStr, price, priceMult, 0, baseAssetId, shareAssetId) | |
445 | - | let topupTotalDiff = diffTuple._1 | |
446 | - | let priceAthKEY = keyPriceATH(internalBaseAssetStr) | |
447 | - | let prevPriceATH = valueOrElse(getInteger(this, priceAthKEY), 0) | |
448 | - | (([IntegerEntry(keyPriceLast(internalBaseAssetStr), price), IntegerEntry(keyPriceHistory(internalBaseAssetStr, height, lastBlock.timestamp), price), IntegerEntry(keyPriceByTopUpIdx(internalBaseAssetStr, currentTopUpIdx), price), IntegerEntry(topUpCurrentIdxKEY, currentTopUpIdx), IntegerEntry(priceAthKEY, if ((price > prevPriceATH)) | |
449 | - | then price | |
450 | - | else prevPriceATH), IntegerEntry(topUpLastHeightKEY, height)] :+ TotalLockedStringEntry("DECREMENT", keyTotalLocked(internalBaseAssetStr), topupTotalDiff)) :+ Burn(shareAssetId, topupTotalDiff[IdxTotalLockedInShare])) | |
451 | - | } | |
440 | + | if ((toString(i.caller) != topUpManagerAddressStr)) | |
441 | + | then throw((("only topUpManager=" + topUpManagerAddressStr) + " can send topUp transactions")) | |
442 | + | else if (!(valid)) | |
443 | + | then throw("validation failed") | |
444 | + | else if ((topupIntervalInBlocks > (height - topUpLastHeight))) | |
445 | + | then throw((("1 topup per " + toString(topupIntervalInBlocks)) + " blocks from the same address is allowed")) | |
446 | + | else { | |
447 | + | let price = genericCalcPrice(internalBaseAssetStr, baseAssetId, amount, shareAssetId, priceMult)._1 | |
448 | + | let diffTuple = calcTotalLockedDiff("topup", "", internalBaseAssetStr, price, priceMult, 0, baseAssetId, shareAssetId) | |
449 | + | let topupTotalDiff = diffTuple._1 | |
450 | + | let priceAthKEY = keyPriceATH(internalBaseAssetStr) | |
451 | + | let prevPriceATH = valueOrElse(getInteger(this, priceAthKEY), 0) | |
452 | + | ((([IntegerEntry(keyPriceLast(internalBaseAssetStr), price), IntegerEntry(keyPriceHistory(internalBaseAssetStr, height, lastBlock.timestamp), price), IntegerEntry(keyPriceByTopUpIdx(internalBaseAssetStr, currentTopUpIdx), price), IntegerEntry(topUpCurrentIdxKEY, currentTopUpIdx), IntegerEntry(priceAthKEY, if ((price > prevPriceATH)) | |
453 | + | then price | |
454 | + | else prevPriceATH), IntegerEntry(topUpLastHeightKEY, height)] :+ TotalLockedStringEntry("DECREMENT", keyTotalLocked(internalBaseAssetStr), topupTotalDiff)) :+ Burn(shareAssetId, topupTotalDiff[IdxTotalLockedInShare])) ++ (if ((0 > amount)) | |
455 | + | then [ScriptTransfer(i.caller, -(amount), baseAssetId)] | |
456 | + | else nil)) | |
457 | + | } | |
452 | 458 | } | |
453 | 459 | ||
454 | 460 | ||
455 | 461 | ||
456 | 462 | @Callable(i) | |
457 | 463 | func currentSysParamsREST (baseAssetStr) = { | |
458 | 464 | let sysStateTuple = privateCurrentSysParamsREST(baseAssetStr) | |
459 | 465 | let price = sysStateTuple._1.value | |
460 | 466 | let decimalsMultPrice = sysStateTuple._2.value | |
461 | 467 | let baseAssetBalance = sysStateTuple._3.value | |
462 | 468 | let totalLockedBaseAmount = sysStateTuple._4.value | |
463 | 469 | let baseAssetBalanceConsideringLock = sysStateTuple._5.value | |
464 | 470 | let shareEmission = sysStateTuple._6.value | |
465 | 471 | let restData = makeString(["startCurrentSysParamsREST", toString(price), toString(decimalsMultPrice), toString(baseAssetBalance), toString(totalLockedBaseAmount), toString(baseAssetBalanceConsideringLock), toString(shareEmission), "endCurrentSysParamsREST"], SEP) | |
466 | 472 | throw(restData) | |
467 | 473 | } | |
468 | 474 | ||
469 | 475 |
github/deemru/w8io/169f3d6 61.77 ms ◑