tx · D5qL8uwXT65K9o4RXtxp9o95sGfhiX271E3mpZscCFu3 3MskRKYtZsMmEnqKt1ikeiR3u2tXy4NL8CM: -0.01000000 Waves 2021.03.22 12:17 [1448762] smart account 3MskRKYtZsMmEnqKt1ikeiR3u2tXy4NL8CM > SELF 0.00000000 Waves
{ "type": 13, "id": "D5qL8uwXT65K9o4RXtxp9o95sGfhiX271E3mpZscCFu3", "fee": 1000000, "feeAssetId": null, "timestamp": 1616404673084, "version": 1, "sender": "3MskRKYtZsMmEnqKt1ikeiR3u2tXy4NL8CM", "senderPublicKey": "AFXqY7iZrKsLJ2hiq5JKA3UGFsaN7QCXUuaK4Bpzswqg", "proofs": [ "5xifx1XPcK1iL4ceJE4gs73D6ZCmZZhLP4kJTEiTDNUWvUTMrQnqyAzZPwFWYwPvtmEzfFNSjquTVg8NAHEjaLug" ], "script": "base64:AAIEAAAAAAAAAC4IAhIICgYICAgBCAESAwoBARIAEgASBQoDCAgIEgUKAwgICBIECgIIARIDCgEIAAAANgAAAAADU0VQAgAAAAJfXwEAAAAPZ2V0U3RyaW5nT3JGYWlsAAAAAQAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkJAAEsAAAAAgIAAAAVTm8gZGF0YSBmb3IgdGhpcy5rZXk9BQAAAANrZXkBAAAAEGdldEJvb2xlYW5PckZhaWwAAAABAAAAA2tleQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEGwAAAAIFAAAABHRoaXMFAAAAA2tleQkAASwAAAACAgAAABVObyBkYXRhIGZvciB0aGlzLmtleT0FAAAAA2tleQEAAAAMZ2V0SW50T3JGYWlsAAAAAQAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkJAAEsAAAAAgIAAAAVTm8gZGF0YSBmb3IgdGhpcy5rZXk9BQAAAANrZXkBA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XNQYXJhbXNSRVNUBQAAAANuaWwFAAAAA1NFUAkAAAIAAAABBQAAAAhyZXN0RGF0YQAAAACR9GuE", "chainId": 84, "height": 1448762, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let SEP = "__" | |
5 | + | ||
6 | + | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), ("No data for this.key=" + key)) | |
7 | + | ||
8 | + | ||
9 | + | func getBooleanOrFail (key) = valueOrErrorMessage(getBoolean(this, key), ("No data for this.key=" + key)) | |
10 | + | ||
11 | + | ||
12 | + | func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), ("No data for this.key=" + key)) | |
13 | + | ||
14 | + | ||
15 | + | func failExecuteGet (msg,baseAssetStr,userAddressStr,submitTxIdStr,operationType) = throw(((((((((msg + ": baseAssetStr=") + baseAssetStr) + " userAddressStr=") + userAddressStr) + " submitTxIdStr=") + submitTxIdStr) + " operationType=") + operationType)) | |
16 | + | ||
17 | + | ||
18 | + | func keyAssetCfg (baseAssetStr) = ("%s%s%s__config__asset__" + baseAssetStr) | |
19 | + | ||
20 | + | ||
21 | + | func keyNextInternalAssetId () = "%s__nextInternalAssetId" | |
22 | + | ||
23 | + | ||
24 | + | func keyPriceLast (internalBasetAssetStr) = ("%s%s%d__price__last__" + internalBasetAssetStr) | |
25 | + | ||
26 | + | ||
27 | + | func keyPriceByTopUpIdx (internalBaseAssetStr,topUpIdx) = makeString(["%s%s%d%d__price__byTopUpIdx", internalBaseAssetStr, toString(topUpIdx)], SEP) | |
28 | + | ||
29 | + | ||
30 | + | func keyPriceHistory (internalBasetAssetStr,h,timestamp) = makeString(["%s%s%d%d%d__price__history", internalBasetAssetStr, toString(h), toString(timestamp)], SEP) | |
31 | + | ||
32 | + | ||
33 | + | func keyTotalLocked (internalBasetAssetStr) = ("%s%s%d__total__locked__" + internalBasetAssetStr) | |
34 | + | ||
35 | + | ||
36 | + | func keyTotalLockedByUser (internalBaseAssetStr,userAddressStr) = makeString(["%s%s%d%s__total__locked", internalBaseAssetStr, userAddressStr], SEP) | |
37 | + | ||
38 | + | ||
39 | + | func keyMappingsInternal2baseAssetId (internalBaseAsset) = ("%s%s%d__mappings__internal2baseAssetId__" + toString(internalBaseAsset)) | |
40 | + | ||
41 | + | ||
42 | + | func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr) | |
43 | + | ||
44 | + | ||
45 | + | func keyMappingsShare2baseAssetId (shareAssetStr) = ("%s%s%s__mappings__share2baseAssetId__" + shareAssetStr) | |
46 | + | ||
47 | + | ||
48 | + | func keyMappingsBaseAsset2shareId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2shareId__" + baseAssetStr) | |
49 | + | ||
50 | + | ||
51 | + | func keyShutdownPutOperation (internalBaseAssetStr) = ("%s%s%d__shutdown__put__" + internalBaseAssetStr) | |
52 | + | ||
53 | + | ||
54 | + | func keyShutdownManager (internalBaseAssetStr) = ("%s%s%d__shutdown__manager__" + internalBaseAssetStr) | |
55 | + | ||
56 | + | ||
57 | + | func keyTopUpCurrentIdx (internalBaseAssetStr) = ("%s%s%d__topup__currentIdx__" + internalBaseAssetStr) | |
58 | + | ||
59 | + | ||
60 | + | let IdxCfgShareAssetId = 1 | |
61 | + | ||
62 | + | let IdxCfgInternalBaseAsset = 2 | |
63 | + | ||
64 | + | let IdxCfgDecimalsMultBothAssets = 3 | |
65 | + | ||
66 | + | let IdxCfgDecimalsMultPrice = 4 | |
67 | + | ||
68 | + | let IdxCfgGetDelayBlocks = 5 | |
69 | + | ||
70 | + | func dataAssetCfg (shareAssetStr,internalBaseAssetStr,decimalsMultBothAssets,decimalsMultPrice,getDelayInBlocks) = makeString(["%s%d%d%d%d", shareAssetStr, internalBaseAssetStr, toString(decimalsMultBothAssets), toString(decimalsMultPrice), toString(getDelayInBlocks)], SEP) | |
71 | + | ||
72 | + | ||
73 | + | let IdxTotalLockedInShare = 1 | |
74 | + | ||
75 | + | let IdxTotalLockedOutBase = 2 | |
76 | + | ||
77 | + | let IdxTotalLockedInBase = 3 | |
78 | + | ||
79 | + | let IdxTotalLockedOutShare = 4 | |
80 | + | ||
81 | + | func dataTotalLocked (inShareAmount,outBaseAmount,inBaseAmount,outShareAmount) = makeString(["%d%d%d%d", toString(inShareAmount), toString(outBaseAmount), toString(inBaseAmount), toString(outShareAmount)], SEP) | |
82 | + | ||
83 | + | ||
84 | + | func dataTotalLockedInt (inShareAmount,outBaseAmount,inBaseAmount,outShareAmount) = [-1, inShareAmount, outBaseAmount, inBaseAmount, outShareAmount] | |
85 | + | ||
86 | + | ||
87 | + | func readTotalLocked (key) = { | |
88 | + | let totalLockedArray = split(valueOrElse(getString(this, key), dataTotalLocked(0, 0, 0, 0)), SEP) | |
89 | + | dataTotalLockedInt(parseIntValue(totalLockedArray[IdxTotalLockedInShare]), parseIntValue(totalLockedArray[IdxTotalLockedOutBase]), parseIntValue(totalLockedArray[IdxTotalLockedInBase]), parseIntValue(totalLockedArray[IdxTotalLockedOutShare])) | |
90 | + | } | |
91 | + | ||
92 | + | ||
93 | + | func calcLockedAmountsDiff (operationType,inOperationAmount,outOperationAmount) = if ((operationType == "P")) | |
94 | + | then dataTotalLockedInt(0, 0, inOperationAmount, outOperationAmount) | |
95 | + | else if ((operationType == "G")) | |
96 | + | then dataTotalLockedInt(inOperationAmount, outOperationAmount, 0, 0) | |
97 | + | else throw(("Unsupported operationType " + operationType)) | |
98 | + | ||
99 | + | ||
100 | + | func updateTotalLocked (action,internalBaseAssetStr,userAddress,lockedAmountsDiff) = { | |
101 | + | func UPDATE (a,b) = if ((action == "INCREMENT")) | |
102 | + | then (a + b) | |
103 | + | else if ((action == "DECREMENT")) | |
104 | + | then (a - b) | |
105 | + | else throw(("Unsupported action " + action)) | |
106 | + | ||
107 | + | func TotalLockedStringEntry (key) = { | |
108 | + | let dataArray = readTotalLocked(key) | |
109 | + | StringEntry(key, dataTotalLocked(UPDATE(dataArray[IdxTotalLockedInShare], lockedAmountsDiff[IdxTotalLockedInShare]), UPDATE(dataArray[IdxTotalLockedOutBase], lockedAmountsDiff[IdxTotalLockedOutBase]), UPDATE(dataArray[IdxTotalLockedInBase], lockedAmountsDiff[IdxTotalLockedInBase]), UPDATE(dataArray[IdxTotalLockedOutShare], lockedAmountsDiff[IdxTotalLockedOutShare]))) | |
110 | + | } | |
111 | + | ||
112 | + | ([TotalLockedStringEntry(keyTotalLocked(internalBaseAssetStr))] ++ (if ((userAddress != "")) | |
113 | + | then [TotalLockedStringEntry(keyTotalLockedByUser(internalBaseAssetStr, userAddress))] | |
114 | + | else nil)) | |
115 | + | } | |
116 | + | ||
117 | + | ||
118 | + | func keyOperation (operationType,internalBaseAssetStr,userAddress,txId) = makeString(["%s%d%s%s", operationType, internalBaseAssetStr, userAddress, txId], SEP) | |
119 | + | ||
120 | + | ||
121 | + | let IdxOperStatus = 1 | |
122 | + | ||
123 | + | let IdxOperInAmount = 2 | |
124 | + | ||
125 | + | let IdxOperPrice = 3 | |
126 | + | ||
127 | + | let IdxOperOutAmount = 4 | |
128 | + | ||
129 | + | let IdxOperStartHeight = 5 | |
130 | + | ||
131 | + | let IdxOperStartTimestamp = 6 | |
132 | + | ||
133 | + | let IdxOperEndHeight = 7 | |
134 | + | ||
135 | + | let IdxOperEndTimestamp = 8 | |
136 | + | ||
137 | + | let IdxOperLock = 9 | |
138 | + | ||
139 | + | 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) | |
140 | + | ||
141 | + | ||
142 | + | 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)) | |
143 | + | ||
144 | + | ||
145 | + | func dataOperationExecutionUpdate (currOperArray,newStatus,newEndTimestamp) = privateDataOperationAllStrings(newStatus, currOperArray[IdxOperInAmount], currOperArray[IdxOperPrice], currOperArray[IdxOperOutAmount], currOperArray[IdxOperStartHeight], currOperArray[IdxOperStartTimestamp], currOperArray[IdxOperEndHeight], toString(newEndTimestamp), currOperArray[IdxOperLock]) | |
146 | + | ||
147 | + | ||
148 | + | func readAssetCfgOrFail (baseAssetStr) = { | |
149 | + | let key = keyAssetCfg(baseAssetStr) | |
150 | + | split(getStringOrFail(key), SEP) | |
151 | + | } | |
152 | + | ||
153 | + | ||
154 | + | func genericCalcPrice (internalBaseAssetStr,baseAssetId,topUpBaseAmount,shareAssetId,decimalsMultPrice) = { | |
155 | + | let totalLockedArray = readTotalLocked(keyTotalLocked(internalBaseAssetStr)) | |
156 | + | let totalLockedOutBaseAmount = totalLockedArray[IdxTotalLockedOutBase] | |
157 | + | let totalLockedInBaseAmount = totalLockedArray[IdxTotalLockedInBase] | |
158 | + | let baseAssetBalance = assetBalance(this, baseAssetId) | |
159 | + | let baseAssetBalanceCALC = (((baseAssetBalance + topUpBaseAmount) - totalLockedInBaseAmount) - totalLockedOutBaseAmount) | |
160 | + | let totalLockedOutShareAmount = totalLockedArray[IdxTotalLockedOutShare] | |
161 | + | let totalLockedInShareAmount = totalLockedArray[IdxTotalLockedInShare] | |
162 | + | let shareEmission = value(assetInfo(shareAssetId)).quantity | |
163 | + | let shareEmissionCALC = (shareEmission + totalLockedOutShareAmount) | |
164 | + | if ((0 > baseAssetBalanceCALC)) | |
165 | + | then throw(((("baseAssetBalanceCALC < 0: baseAssetBalance=" + toString(baseAssetBalance)) + " baseAssetBalanceCALC=") + toString(baseAssetBalanceCALC))) | |
166 | + | else { | |
167 | + | let price = if ((shareEmission == 0)) | |
168 | + | then (2 * decimalsMultPrice) | |
169 | + | else fraction(baseAssetBalanceCALC, decimalsMultPrice, shareEmissionCALC) | |
170 | + | $Tuple5(price, baseAssetBalance, totalLockedOutBaseAmount, baseAssetBalanceCALC, shareEmission) | |
171 | + | } | |
172 | + | } | |
173 | + | ||
174 | + | ||
175 | + | func calcPrice (internalBaseAssetStr,baseAssetId,shareAssetId,decimalsMultPrice) = genericCalcPrice(internalBaseAssetStr, baseAssetId, 0, shareAssetId, decimalsMultPrice) | |
176 | + | ||
177 | + | ||
178 | + | func moveTotalLocked (internalBaseAssetStr,price,shareAssetId,decimalsMultPrice) = { | |
179 | + | let totalLockedArray = readTotalLocked(keyTotalLocked(internalBaseAssetStr)) | |
180 | + | let totalLockedInBaseAmount = totalLockedArray[IdxTotalLockedInBase] | |
181 | + | let totalLockedInShareAmount = totalLockedArray[IdxTotalLockedInShare] | |
182 | + | let lockedAmountsDiff = dataTotalLockedInt(-(totalLockedInShareAmount), fraction(totalLockedInShareAmount, price, decimalsMultPrice), -(totalLockedInBaseAmount), fraction(totalLockedInBaseAmount, decimalsMultPrice, price)) | |
183 | + | (updateTotalLocked("INCREMENT", internalBaseAssetStr, "", lockedAmountsDiff) :+ Burn(shareAssetId, totalLockedInShareAmount)) | |
184 | + | } | |
185 | + | ||
186 | + | ||
187 | + | func submit (operationType,i,inAmount,inAssetId,baseAssetStr) = { | |
188 | + | let inAssetStr = toBase58String(inAssetId) | |
189 | + | let userAddressStr = toString(i.caller) | |
190 | + | let baseAssetId = fromBase58String(baseAssetStr) | |
191 | + | let cfgArray = readAssetCfgOrFail(baseAssetStr) | |
192 | + | let shareAssetStr = cfgArray[IdxCfgShareAssetId] | |
193 | + | let shareAssetId = fromBase58String(shareAssetStr) | |
194 | + | let decimalsMultBothAssets = parseIntValue(cfgArray[IdxCfgDecimalsMultBothAssets]) | |
195 | + | let decimalsMultPrice = parseIntValue(cfgArray[IdxCfgDecimalsMultPrice]) | |
196 | + | let internalBaseAssetStr = cfgArray[IdxCfgInternalBaseAsset] | |
197 | + | let isPutBlocked = getBooleanOrFail(keyShutdownPutOperation(internalBaseAssetStr)) | |
198 | + | if (isPutBlocked) | |
199 | + | then throw("put operation is blocked") | |
200 | + | else { | |
201 | + | let topUpCurrentIdx = getIntOrFail(keyTopUpCurrentIdx(internalBaseAssetStr)) | |
202 | + | let lockedAmountsDiff = calcLockedAmountsDiff(operationType, inAmount, 0) | |
203 | + | ([StringEntry(keyOperation(operationType, internalBaseAssetStr, userAddressStr, toBase58String(i.transactionId)), dataOperation("PENDING", inAmount, 0, 0, height, lastBlock.timestamp, 0, 0, (topUpCurrentIdx + 1)))] ++ updateTotalLocked("INCREMENT", internalBaseAssetStr, userAddressStr, lockedAmountsDiff)) | |
204 | + | } | |
205 | + | } | |
206 | + | ||
207 | + | ||
208 | + | func execute (operationType,baseAssetStr,userAddressStr,submitTxIdStr) = { | |
209 | + | let userAddress = addressFromStringValue(userAddressStr) | |
210 | + | let assetCfgArray = readAssetCfgOrFail(baseAssetStr) | |
211 | + | let shareAssetId = fromBase58String(assetCfgArray[IdxCfgShareAssetId]) | |
212 | + | let internalBaseAssetStr = assetCfgArray[IdxCfgInternalBaseAsset] | |
213 | + | let decimalsMultPrice = parseIntValue(assetCfgArray[IdxCfgDecimalsMultPrice]) | |
214 | + | let baseAssetId = fromBase58String(baseAssetStr) | |
215 | + | let operationKey = keyOperation(operationType, internalBaseAssetStr, userAddressStr, submitTxIdStr) | |
216 | + | let operationArray = split(getStringOrFail(operationKey), SEP) | |
217 | + | let status = operationArray[IdxOperStatus] | |
218 | + | let inAmount = parseIntValue(operationArray[IdxOperInAmount]) | |
219 | + | let operLock = parseIntValue(operationArray[IdxOperLock]) | |
220 | + | let currTopUpIdx = getIntOrFail(keyTopUpCurrentIdx(internalBaseAssetStr)) | |
221 | + | let priceByTopUpId = getIntOrFail(keyPriceByTopUpIdx(internalBaseAssetStr, currTopUpIdx)) | |
222 | + | let outAmount = if ((operationType == "P")) | |
223 | + | then fraction(inAmount, decimalsMultPrice, priceByTopUpId) | |
224 | + | else if ((operationType == "G")) | |
225 | + | then fraction(inAmount, priceByTopUpId, decimalsMultPrice) | |
226 | + | else throw(("Unsupported operation type " + operationType)) | |
227 | + | let lockedAmountsDiff = calcLockedAmountsDiff(operationType, inAmount, outAmount) | |
228 | + | if ((status != "PENDING")) | |
229 | + | then failExecuteGet("Status is not PENDING", baseAssetStr, userAddressStr, submitTxIdStr, operationType) | |
230 | + | else if ((operLock > currTopUpIdx)) | |
231 | + | then failExecuteGet(((("OperLock[" + toString(operLock)) + "] > ") + toString(currTopUpIdx)), baseAssetStr, userAddressStr, submitTxIdStr, operationType) | |
232 | + | else { | |
233 | + | let outTransfer = if ((operationType == "P")) | |
234 | + | then [Reissue(shareAssetId, outAmount, true), ScriptTransfer(userAddress, outAmount, shareAssetId)] | |
235 | + | else if ((operationType == "G")) | |
236 | + | then [ScriptTransfer(userAddress, outAmount, baseAssetId)] | |
237 | + | else throw(("Unsupported operation type " + operationType)) | |
238 | + | (([StringEntry(operationKey, dataOperationExecutionUpdate(operationArray, "FINISHED", lastBlock.timestamp))] ++ outTransfer) ++ updateTotalLocked("DECREMENT", internalBaseAssetStr, userAddressStr, lockedAmountsDiff)) | |
239 | + | } | |
240 | + | } | |
241 | + | ||
242 | + | ||
243 | + | func privateCurrentSysParamsREST (baseAssetStr) = { | |
244 | + | let baseAssetId = fromBase58String(baseAssetStr) | |
245 | + | let cfgArray = readAssetCfgOrFail(baseAssetStr) | |
246 | + | let shareAssetStr = cfgArray[IdxCfgShareAssetId] | |
247 | + | let shareAssetId = fromBase58String(shareAssetStr) | |
248 | + | let decimalsMultBothAssets = parseIntValue(cfgArray[IdxCfgDecimalsMultBothAssets]) | |
249 | + | let decimalsMultPrice = parseIntValue(cfgArray[IdxCfgDecimalsMultPrice]) | |
250 | + | let internalBaseAssetStr = cfgArray[IdxCfgInternalBaseAsset] | |
251 | + | let sysState = calcPrice(internalBaseAssetStr, baseAssetId, shareAssetId, decimalsMultPrice) | |
252 | + | $Tuple6(IntegerEntry("price", sysState._1), IntegerEntry("decimalsMultPrice", decimalsMultPrice), IntegerEntry("baseAssetBalance", sysState._2), IntegerEntry("totalLockedBaseAmount", sysState._3), IntegerEntry("baseAssetBalanceConsideringLock", sysState._4), IntegerEntry("shareEmission", sysState._5)) | |
253 | + | } | |
254 | + | ||
255 | + | ||
256 | + | @Callable(i) | |
257 | + | func adminRegisterAsset (baseAssetStr,shareAssetName,shareAssetDescr,getDelayinBlocks,shutdownManagerAddress,startPrice) = { | |
258 | + | let baseAssetId = fromBase58String(baseAssetStr) | |
259 | + | let decimals = value(assetInfo(baseAssetId)).decimals | |
260 | + | if ((i.caller != this)) | |
261 | + | then throw("permissions denied") | |
262 | + | else if ((toString(addressFromStringValue(shutdownManagerAddress)) != shutdownManagerAddress)) | |
263 | + | then throw("invalid shutdownManagerAddress") | |
264 | + | else if ((0 > getDelayinBlocks)) | |
265 | + | then throw(("invalid getDelayinBlocks=" + toString(getDelayinBlocks))) | |
266 | + | else { | |
267 | + | let shareAssetIssueAction = Issue(shareAssetName, shareAssetDescr, 1, decimals, true) | |
268 | + | let shareAssetId = calculateAssetId(shareAssetIssueAction) | |
269 | + | let shareAssetStr = toBase58String(shareAssetId) | |
270 | + | let decimalsMultPrice = ((100 * 1000) * 1000) | |
271 | + | let decimalsMultBothAssets = pow(10, 0, decimals, 0, 0, DOWN) | |
272 | + | let internalBaseAssettId = valueOrElse(getInteger(this, keyNextInternalAssetId()), 0) | |
273 | + | let internalBaseAssetStr = toString(internalBaseAssettId) | |
274 | + | [StringEntry(keyAssetCfg(baseAssetStr), dataAssetCfg(shareAssetStr, internalBaseAssetStr, decimalsMultBothAssets, decimalsMultPrice, getDelayinBlocks)), StringEntry(keyMappingsInternal2baseAssetId(internalBaseAssettId), baseAssetStr), StringEntry(keyMappingsBaseAsset2internalId(baseAssetStr), internalBaseAssetStr), StringEntry(keyMappingsShare2baseAssetId(shareAssetStr), baseAssetStr), StringEntry(keyMappingsBaseAsset2shareId(baseAssetStr), shareAssetStr), BooleanEntry(keyShutdownPutOperation(internalBaseAssetStr), false), StringEntry(keyShutdownManager(internalBaseAssetStr), shutdownManagerAddress), IntegerEntry(keyNextInternalAssetId(), (internalBaseAssettId + 1)), IntegerEntry(keyPriceLast(internalBaseAssetStr), startPrice), IntegerEntry(keyPriceHistory(internalBaseAssetStr, height, lastBlock.timestamp), startPrice), IntegerEntry(keyTopUpCurrentIdx(internalBaseAssetStr), 0), shareAssetIssueAction, Burn(shareAssetId, 1)] | |
275 | + | } | |
276 | + | } | |
277 | + | ||
278 | + | ||
279 | + | ||
280 | + | @Callable(i) | |
281 | + | func shutdownPut (internalBaseAssetId) = { | |
282 | + | let internalBaseAssetIdStr = toString(internalBaseAssetId) | |
283 | + | let baseAssetIdStr = getStringOrFail(keyMappingsInternal2baseAssetId(internalBaseAssetId)) | |
284 | + | let shutdownManagerAddress = getStringOrFail(keyShutdownManager(internalBaseAssetIdStr)) | |
285 | + | if ((1 > size(baseAssetIdStr))) | |
286 | + | then throw("invalid internalBaseAssetId") | |
287 | + | else if ((toString(i.caller) != shutdownManagerAddress)) | |
288 | + | then throw("access denied") | |
289 | + | else [BooleanEntry(keyShutdownPutOperation(toString(internalBaseAssetId)), true)] | |
290 | + | } | |
291 | + | ||
292 | + | ||
293 | + | ||
294 | + | @Callable(i) | |
295 | + | func submitPut () = { | |
296 | + | let pmt = value(i.payments[0]) | |
297 | + | let inAmount = pmt.amount | |
298 | + | let inAssetId = value(pmt.assetId) | |
299 | + | let baseAssetStr = toBase58String(inAssetId) | |
300 | + | submit("P", i, inAmount, inAssetId, baseAssetStr) | |
301 | + | } | |
302 | + | ||
303 | + | ||
304 | + | ||
305 | + | @Callable(i) | |
306 | + | func submitGet () = { | |
307 | + | let pmt = value(i.payments[0]) | |
308 | + | let inAmount = pmt.amount | |
309 | + | let inAssetId = value(pmt.assetId) | |
310 | + | let shareAssetStr = toBase58String(inAssetId) | |
311 | + | let baseAssetStr = getStringOrFail(keyMappingsShare2baseAssetId(shareAssetStr)) | |
312 | + | submit("G", i, inAmount, inAssetId, baseAssetStr) | |
313 | + | } | |
314 | + | ||
315 | + | ||
316 | + | ||
317 | + | @Callable(i) | |
318 | + | func executePut (baseAssetStr,userAddressStr,submitTxIdStr) = execute("P", baseAssetStr, userAddressStr, submitTxIdStr) | |
319 | + | ||
320 | + | ||
321 | + | ||
322 | + | @Callable(i) | |
323 | + | func executeGet (baseAssetStr,userAddressStr,submitTxIdStr) = execute("G", baseAssetStr, userAddressStr, submitTxIdStr) | |
324 | + | ||
325 | + | ||
326 | + | ||
327 | + | @Callable(i) | |
328 | + | func topUpBalance (baseAssetStr,amount) = { | |
329 | + | let assetCfgArray = readAssetCfgOrFail(baseAssetStr) | |
330 | + | let pmt = value(i.payments[0]) | |
331 | + | let pmtAssetId = value(pmt.assetId) | |
332 | + | let pmtAssetStr = toBase58String(pmtAssetId) | |
333 | + | let shareAssetId = fromBase58String(assetCfgArray[IdxCfgShareAssetId]) | |
334 | + | let decimalsMultPrice = parseIntValue(assetCfgArray[IdxCfgDecimalsMultPrice]) | |
335 | + | let internalBaseAssetStr = assetCfgArray[IdxCfgInternalBaseAsset] | |
336 | + | let topUpCurrentIdxKEY = keyTopUpCurrentIdx(internalBaseAssetStr) | |
337 | + | let prevTopUpIdx = getIntOrFail(topUpCurrentIdxKEY) | |
338 | + | let currentTopUpIdx = (prevTopUpIdx + 1) | |
339 | + | if ((baseAssetStr != pmtAssetStr)) | |
340 | + | then throw("attached payment's asset id is NOT matched passed baseAssetStr") | |
341 | + | else if ((size(i.payments) > 1)) | |
342 | + | then throw("only one payment can be attached") | |
343 | + | else { | |
344 | + | let price = genericCalcPrice(internalBaseAssetStr, pmtAssetId, pmt.amount, shareAssetId, decimalsMultPrice)._1 | |
345 | + | ([IntegerEntry(keyPriceLast(internalBaseAssetStr), price), IntegerEntry(keyPriceHistory(internalBaseAssetStr, height, lastBlock.timestamp), price), IntegerEntry(keyPriceByTopUpIdx(internalBaseAssetStr, currentTopUpIdx), price), IntegerEntry(topUpCurrentIdxKEY, currentTopUpIdx)] ++ moveTotalLocked(internalBaseAssetStr, price, shareAssetId, decimalsMultPrice)) | |
346 | + | } | |
347 | + | } | |
348 | + | ||
349 | + | ||
350 | + | ||
351 | + | @Callable(i) | |
352 | + | func currentSysParamsREST (baseAssetStr) = { | |
353 | + | let sysStateTuple = privateCurrentSysParamsREST(baseAssetStr) | |
354 | + | let price = sysStateTuple._1.value | |
355 | + | let decimalsMultPrice = sysStateTuple._2.value | |
356 | + | let baseAssetBalance = sysStateTuple._3.value | |
357 | + | let totalLockedBaseAmount = sysStateTuple._4.value | |
358 | + | let baseAssetBalanceConsideringLock = sysStateTuple._5.value | |
359 | + | let shareEmission = sysStateTuple._6.value | |
360 | + | let restData = makeString(["startCurrentSysParamsREST", toString(price), toString(decimalsMultPrice), toString(baseAssetBalance), toString(totalLockedBaseAmount), toString(baseAssetBalanceConsideringLock), toString(shareEmission), "endCurrentSysParamsREST"], SEP) | |
361 | + | throw(restData) | |
362 | + | } | |
363 | + | ||
364 | + |
github/deemru/w8io/169f3d6 40.75 ms ◑