tx · 8RSunht1hDBARnU5YhJRHQ22krRU6YhuCdKyRjVpzet2 3Mzt645zA6u2QG6jRPoo6H6CK89kVggFgNi: -0.01400000 Waves 2021.02.19 16:45 [1405099] smart account 3Mzt645zA6u2QG6jRPoo6H6CK89kVggFgNi > SELF 0.00000000 Waves
{ "type": 13, "id": "8RSunht1hDBARnU5YhJRHQ22krRU6YhuCdKyRjVpzet2", "fee": 1400000, "feeAssetId": null, "timestamp": 1613742354710, "version": 1, "sender": "3Mzt645zA6u2QG6jRPoo6H6CK89kVggFgNi", "senderPublicKey": "7uejFa4bRSfBcedNiZpvC7nH9dnudVtejqqd8Rq4o8Ay", "proofs": [ "64eTvDBzDQBzGbvBpVNYMZ9fkapZbK5Vd4QngZyKTf1Hm3R9dCesVYX75jHmXua8LzTSziZjdrrkJWjsKbd4FGGb", "2u3tXVCzuaukUy4goUm5H5dG7A2G8KpcVt7sUYvwQodeDPFX6zmZYJh47bKBBWMPSczksbTnfU2kCBedZDtJoS2p", "cKrdMnTmhvwFVxfNmYthNtGmXMuY6PBxH9FvQJUSSh6hRgYMFCFMjGhfX7gNQqUuKFLb7Pgk5NHWCoykXVBb5ze" ], "script": "base64:AAIEAAAAAAAAACUIAhIHCgUICAgBCBIDCgEBEgASABIFCgMICAgSAwoBCBIDCgEIAAAALAAAAAADU0VQAgAAAAJfXwEAAAAPZ2V0U3RyaW5nT3JGYWlsAAAAAQAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkJAAEsAAAAAgIAAAAVTm8gZGF0YSBmb3IgdGhpcy5rZXk9BQAAAANrZXkBAAAAEGdldEJvb2xlYW5PckZhaWwAAAABAAAAA2tleQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEGwAAAAIFAAAABHRoaXMFAAAAA2tleQkAASwAAAACAgAAABVObyBkYXRhIGZvciB0aGlzLmtleT0FAAAAA2tleQEAAAAOZmF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Y291bnQJAABkAAAAAgkAAGQAAAACBQAAAAJzMAUAAAACczEFAAAAAnMyAwkAAGYAAAACAAAAAAAAAAACBQAAAAVjb3VudAkAAAIAAAABCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAVaW52YWxpZCBtdWx0aXNpZzogczA9CQABpAAAAAEFAAAAAnMwAgAAAAQgczE9CQABpAAAAAEFAAAAAnMxAgAAAAQgczI9CQABpAAAAAEFAAAAAnMyBufI1C4=", "chainId": 84, "height": 1405099, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7yY58n2uWrRaZj9nTdYuyMpky3YNHK5G1LvMZkYcuobK Next: 65remLvToC36SH7VaK6p9MCsrzbBAgEb247SjKueYXQg Full:
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 failExecuteGet (msg,baseAssetStr,userAddressStr,getTxIdStr) = throw(((((((msg + ": baseAssetStr=") + baseAssetStr) + " userAddressStr=") + userAddressStr) + " getTxIdStr=") + getTxIdStr)) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func keyAssetCfg (baseAssetStr) = ("%s%s%s__config__asset__" + baseAssetStr) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func keyNextInternalAssetId () = "%s__nextInternalAssetId" | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func keyPriceLast (internalBasetAssetStr) = ("%s%s%d__price__last__" + internalBasetAssetStr) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func keyPriceHistory (internalBasetAssetStr,h,timestamp) = makeString(["%s%s%d%d%d__price__history", internalBasetAssetStr, toString(h), toString(timestamp)], SEP) | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func keyTotalLocked (internalBasetAssetStr) = ("%s%s%d__total__locked__" + internalBasetAssetStr) | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func keyTotalLockedByUser (internalBaseAssetStr,userAddressStr) = makeString(["%s%s%d%s__total__locked", internalBaseAssetStr, userAddressStr], SEP) | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func keyMappingsInternal2baseAssetId (internalBaseAsset) = ("%s%s%d__mappings__internal2baseAssetId__" + toString(internalBaseAsset)) | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr) | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func keyMappingsShare2baseAssetId (shareAssetStr) = ("%s%s%s__mappings__share2baseAssetId__" + shareAssetStr) | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func keyMappingsBaseAsset2shareId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2shareId__" + baseAssetStr) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func keyShutdownPutOperation (internalBaseAssetStr) = ("%s%s%d__shutdown__put__" + internalBaseAssetStr) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func keyShutdownManager (internalBaseAssetStr) = ("%s%s%d__shutdown__manager__" + internalBaseAssetStr) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | let IdxCfgShareAssetId = 1 | |
52 | 52 | ||
53 | 53 | let IdxCfgInternalBaseAsset = 2 | |
54 | 54 | ||
55 | 55 | let IdxCfgDecimalsMultBothAssets = 3 | |
56 | 56 | ||
57 | 57 | let IdxCfgDecimalsMultPrice = 4 | |
58 | 58 | ||
59 | 59 | let IdxCfgGetDelayBlocks = 5 | |
60 | 60 | ||
61 | 61 | func dataAssetCfg (shareAssetStr,internalBaseAssetStr,decimalsMultBothAssets,decimalsMultPrice,getDelayInBlocks) = makeString(["%s%d%d%d%d", shareAssetStr, internalBaseAssetStr, toString(decimalsMultBothAssets), toString(decimalsMultPrice), toString(getDelayInBlocks)], SEP) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | let IdxTotalLockedShare = 1 | |
65 | 65 | ||
66 | 66 | let IdxTotalLockedBase = 2 | |
67 | 67 | ||
68 | 68 | func dataTotalLocked (shareAssetAmount,baseAssetAmount) = makeString(["%d%d", toString(shareAssetAmount), toString(baseAssetAmount)], SEP) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func readTotalLocked (key) = { | |
72 | 72 | let totalLockedArray = split(valueOrElse(getString(this, key), dataTotalLocked(0, 0)), SEP) | |
73 | 73 | [-1, parseIntValue(totalLockedArray[IdxTotalLockedShare]), parseIntValue(totalLockedArray[IdxTotalLockedBase])] | |
74 | 74 | } | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func keyOperation (operationType,internalBaseAssetStr,userAddress,txId) = makeString(["%s%d%s%s", operationType, internalBaseAssetStr, userAddress, txId], SEP) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | let IdxOperStatus = 1 | |
81 | 81 | ||
82 | 82 | let IdxOperInAmount = 2 | |
83 | 83 | ||
84 | 84 | let IdxOperPrice = 3 | |
85 | 85 | ||
86 | 86 | let IdxOperOutAmount = 4 | |
87 | 87 | ||
88 | 88 | let IdxOperStartHeight = 5 | |
89 | 89 | ||
90 | 90 | let IdxOperStartTimestamp = 6 | |
91 | 91 | ||
92 | 92 | let IdxOperEndHeight = 7 | |
93 | 93 | ||
94 | 94 | let IdxOperEndTimestamp = 8 | |
95 | 95 | ||
96 | 96 | func privateDataOperationAllStrings (status,inAssetAmount,price,outAssetAmount,startHeight,startTimestamp,endHeight,endTimestamp) = makeString(["%s%d%d%d%d%d%d%d", status, inAssetAmount, price, outAssetAmount, startHeight, startTimestamp, endHeight, endTimestamp], SEP) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func dataOperation (status,inAssetAmount,price,outAssetAmount,startHeight,startTimestamp,endHeight,endTimestamp) = privateDataOperationAllStrings(status, toString(inAssetAmount), toString(price), toString(outAssetAmount), toString(startHeight), toString(startTimestamp), toString(endHeight), toString(endTimestamp)) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func dataOperationExecutionUpdate (currOperArray,newStatus,newEndTimestamp) = privateDataOperationAllStrings(newStatus, currOperArray[IdxOperInAmount], currOperArray[IdxOperPrice], currOperArray[IdxOperOutAmount], currOperArray[IdxOperStartHeight], currOperArray[IdxOperStartTimestamp], currOperArray[IdxOperEndHeight], toString(newEndTimestamp)) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func readAssetCfgOrFail (baseAssetStr) = { | |
106 | 106 | let key = keyAssetCfg(baseAssetStr) | |
107 | 107 | split(getStringOrFail(key), SEP) | |
108 | 108 | } | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func incrementTotalLocked (key,shareAssetAmount,baseAssetAmount) = { | |
112 | 112 | let dataArray = readTotalLocked(key) | |
113 | 113 | StringEntry(key, dataTotalLocked((dataArray[IdxTotalLockedShare] + shareAssetAmount), (dataArray[IdxTotalLockedBase] + baseAssetAmount))) | |
114 | 114 | } | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func decrementTotalLocked (key,shareAssetAmount,baseAssetAmount) = { | |
118 | 118 | let dataArray = readTotalLocked(key) | |
119 | 119 | StringEntry(key, dataTotalLocked((dataArray[IdxTotalLockedShare] - shareAssetAmount), (dataArray[IdxTotalLockedBase] - baseAssetAmount))) | |
120 | 120 | } | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func genericCalcPrice (internalBaseAssetStr,baseAssetId,topUpBaseAmount,shareAssetId,decimalsMultBothAssets,decimalsMultPrice) = { | |
124 | 124 | let totalLockedArray = readTotalLocked(keyTotalLocked(internalBaseAssetStr)) | |
125 | 125 | let totalLockedBaseAmount = totalLockedArray[IdxTotalLockedBase] | |
126 | 126 | let baseAssetBalance = assetBalance(this, baseAssetId) | |
127 | 127 | let baseAssetBalanceConsideringLock = ((baseAssetBalance - totalLockedBaseAmount) + topUpBaseAmount) | |
128 | 128 | if ((0 > baseAssetBalanceConsideringLock)) | |
129 | 129 | then throw(((("baseAssetBalanceConsideringLock < 0: baseAssetBalance=" + toString(baseAssetBalance)) + " baseAssetBalanceConsideringLock=") + toString(baseAssetBalanceConsideringLock))) | |
130 | 130 | else { | |
131 | 131 | let shareEmission = value(assetInfo(shareAssetId)).quantity | |
132 | 132 | let price = if ((shareEmission == 0)) | |
133 | 133 | then (1 * decimalsMultPrice) | |
134 | 134 | else fraction(baseAssetBalanceConsideringLock, decimalsMultPrice, shareEmission) | |
135 | 135 | $Tuple5(price, baseAssetBalance, totalLockedBaseAmount, baseAssetBalanceConsideringLock, shareEmission) | |
136 | 136 | } | |
137 | 137 | } | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func calcPrice (internalBaseAssetStr,baseAssetId,shareAssetId,decimalsMultBothAssets,decimalsMultPrice) = genericCalcPrice(internalBaseAssetStr, baseAssetId, 0, shareAssetId, decimalsMultBothAssets, decimalsMultPrice) | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func privateCurrentSysParamsREST (baseAssetStr) = { | |
144 | 144 | let baseAssetId = fromBase58String(baseAssetStr) | |
145 | 145 | let cfgArray = readAssetCfgOrFail(baseAssetStr) | |
146 | 146 | let shareAssetStr = cfgArray[IdxCfgShareAssetId] | |
147 | 147 | let shareAssetId = fromBase58String(shareAssetStr) | |
148 | 148 | let decimalsMultBothAssets = parseIntValue(cfgArray[IdxCfgDecimalsMultBothAssets]) | |
149 | 149 | let decimalsMultPrice = parseIntValue(cfgArray[IdxCfgDecimalsMultPrice]) | |
150 | 150 | let internalBaseAssetStr = cfgArray[IdxCfgInternalBaseAsset] | |
151 | 151 | let sysState = calcPrice(internalBaseAssetStr, baseAssetId, shareAssetId, decimalsMultBothAssets, decimalsMultPrice) | |
152 | 152 | $Tuple6(IntegerEntry("price", sysState._1), IntegerEntry("decimalsMultPrice", decimalsMultPrice), IntegerEntry("baseAssetBalance", sysState._2), IntegerEntry("totalLockedBaseAmount", sysState._3), IntegerEntry("baseAssetBalanceConsideringLock", sysState._4), IntegerEntry("shareEmission", sysState._5)) | |
153 | 153 | } | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | @Callable(i) | |
157 | 157 | func adminRegisterAsset (baseAssetStr,shareAssetName,shareAssetDescr,getDelayinBlocks,shutdownManagerAddress) = { | |
158 | 158 | let baseAssetId = fromBase58String(baseAssetStr) | |
159 | 159 | let decimals = value(assetInfo(baseAssetId)).decimals | |
160 | 160 | if ((i.caller != this)) | |
161 | 161 | then throw("permissions denied") | |
162 | 162 | else if ((toString(addressFromStringValue(shutdownManagerAddress)) != shutdownManagerAddress)) | |
163 | 163 | then throw("invalid shutdownManagerAddress") | |
164 | 164 | else if ((0 > getDelayinBlocks)) | |
165 | 165 | then throw(("invalid getDelayinBlocks=" + toString(getDelayinBlocks))) | |
166 | 166 | else { | |
167 | 167 | let shareAssetIssueAction = Issue(shareAssetName, shareAssetDescr, 1, decimals, true) | |
168 | 168 | let shareAssetId = calculateAssetId(shareAssetIssueAction) | |
169 | 169 | let shareAssetStr = toBase58String(shareAssetId) | |
170 | 170 | let decimalsMultPrice = ((100 * 1000) * 1000) | |
171 | 171 | let decimalsMultBothAssets = pow(10, 0, decimals, 0, 0, DOWN) | |
172 | 172 | let startPrice = (1 * decimalsMultPrice) | |
173 | 173 | let internalBaseAssettId = valueOrElse(getInteger(this, keyNextInternalAssetId()), 0) | |
174 | 174 | let internalBaseAssetStr = toString(internalBaseAssettId) | |
175 | 175 | [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), shareAssetIssueAction, Burn(shareAssetId, 1)] | |
176 | 176 | } | |
177 | 177 | } | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | ||
181 | 181 | @Callable(i) | |
182 | 182 | func shutdownPut (internalBaseAssetId) = { | |
183 | 183 | let internalBaseAssetIdStr = toString(internalBaseAssetId) | |
184 | 184 | let baseAssetIdStr = getStringOrFail(keyMappingsInternal2baseAssetId(internalBaseAssetId)) | |
185 | 185 | let shutdownManagerAddress = getStringOrFail(keyShutdownManager(internalBaseAssetIdStr)) | |
186 | 186 | if ((1 > size(baseAssetIdStr))) | |
187 | 187 | then throw("invalid internalBaseAssetId") | |
188 | 188 | else if ((toString(i.caller) != shutdownManagerAddress)) | |
189 | 189 | then throw("access denied") | |
190 | 190 | else [BooleanEntry(keyShutdownPutOperation(toString(internalBaseAssetId)), true)] | |
191 | 191 | } | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | ||
195 | 195 | @Callable(i) | |
196 | 196 | func put () = { | |
197 | 197 | let pmt = value(i.payments[0]) | |
198 | 198 | let baseAssetId = value(pmt.assetId) | |
199 | 199 | let baseAssetStr = toBase58String(baseAssetId) | |
200 | 200 | let userAddressStr = toString(i.caller) | |
201 | 201 | let cfgArray = readAssetCfgOrFail(baseAssetStr) | |
202 | 202 | let shareAssetStr = cfgArray[IdxCfgShareAssetId] | |
203 | 203 | let shareAssetId = fromBase58String(shareAssetStr) | |
204 | 204 | let decimalsMultBothAssets = parseIntValue(cfgArray[IdxCfgDecimalsMultBothAssets]) | |
205 | 205 | let decimalsMultPrice = parseIntValue(cfgArray[IdxCfgDecimalsMultPrice]) | |
206 | 206 | let internalBaseAssetStr = cfgArray[IdxCfgInternalBaseAsset] | |
207 | 207 | let isPutBlocked = getBooleanOrFail(keyShutdownPutOperation(internalBaseAssetStr)) | |
208 | 208 | if (isPutBlocked) | |
209 | 209 | then throw("put operation is blocked") | |
210 | 210 | else { | |
211 | 211 | let price = calcPrice(internalBaseAssetStr, baseAssetId, shareAssetId, decimalsMultBothAssets, decimalsMultPrice)._1 | |
212 | 212 | let shareAssetAmount = fraction(pmt.amount, decimalsMultPrice, price) | |
213 | 213 | [Reissue(shareAssetId, shareAssetAmount, true), ScriptTransfer(i.caller, shareAssetAmount, shareAssetId), StringEntry(keyOperation("P", internalBaseAssetStr, userAddressStr, toBase58String(i.transactionId)), dataOperation("FINISHED", pmt.amount, price, shareAssetAmount, height, lastBlock.timestamp, height, lastBlock.timestamp))] | |
214 | 214 | } | |
215 | 215 | } | |
216 | 216 | ||
217 | 217 | ||
218 | 218 | ||
219 | 219 | @Callable(i) | |
220 | 220 | func submitGetRequest () = { | |
221 | 221 | let pmt = value(i.payments[0]) | |
222 | 222 | let shareAssetId = value(pmt.assetId) | |
223 | 223 | let shareAssetStr = toBase58String(shareAssetId) | |
224 | 224 | let callerPubStr = toBase58String(i.callerPublicKey) | |
225 | 225 | let userAddress = i.caller | |
226 | 226 | let userAddressStr = toString(userAddress) | |
227 | 227 | let shareAssetAmount = pmt.amount | |
228 | 228 | let baseAssetStr = getStringOrFail(keyMappingsShare2baseAssetId(shareAssetStr)) | |
229 | 229 | let baseAssetId = fromBase58String(baseAssetStr) | |
230 | 230 | let cfgArray = readAssetCfgOrFail(baseAssetStr) | |
231 | 231 | let decimalsMultBothAssets = parseIntValue(cfgArray[IdxCfgDecimalsMultBothAssets]) | |
232 | 232 | let decimalsMultPrice = parseIntValue(cfgArray[IdxCfgDecimalsMultPrice]) | |
233 | 233 | let getDelayBlocks = parseIntValue(cfgArray[IdxCfgGetDelayBlocks]) | |
234 | 234 | let internalBaseAssetStr = cfgArray[IdxCfgInternalBaseAsset] | |
235 | 235 | let price = calcPrice(internalBaseAssetStr, baseAssetId, shareAssetId, decimalsMultBothAssets, decimalsMultPrice)._1 | |
236 | 236 | let baseAssetAmount = fraction(shareAssetAmount, price, decimalsMultPrice) | |
237 | 237 | let operationKey = keyOperation("G", internalBaseAssetStr, userAddressStr, toBase58String(i.transactionId)) | |
238 | 238 | let operationData = dataOperation("PENDING", shareAssetAmount, price, baseAssetAmount, height, lastBlock.timestamp, (height + getDelayBlocks), 0) | |
239 | 239 | [Burn(shareAssetId, shareAssetAmount), StringEntry(operationKey, operationData), incrementTotalLocked(keyTotalLocked(internalBaseAssetStr), shareAssetAmount, baseAssetAmount), incrementTotalLocked(keyTotalLockedByUser(internalBaseAssetStr, userAddressStr), shareAssetAmount, baseAssetAmount)] | |
240 | 240 | } | |
241 | 241 | ||
242 | 242 | ||
243 | 243 | ||
244 | 244 | @Callable(i) | |
245 | 245 | func executeGetRequest (baseAssetStr,userAddressStr,getTxIdStr) = { | |
246 | 246 | let userAddress = addressFromStringValue(userAddressStr) | |
247 | 247 | let assetCfgArray = readAssetCfgOrFail(baseAssetStr) | |
248 | 248 | let shareAssetId = fromBase58String(assetCfgArray[IdxCfgShareAssetId]) | |
249 | 249 | let baseAssetId = fromBase58String(baseAssetStr) | |
250 | 250 | let internalBaseAssetStr = assetCfgArray[IdxCfgInternalBaseAsset] | |
251 | 251 | let operationKey = keyOperation("G", internalBaseAssetStr, userAddressStr, getTxIdStr) | |
252 | 252 | let operationArray = split(getStringOrFail(operationKey), SEP) | |
253 | 253 | let status = operationArray[IdxOperStatus] | |
254 | 254 | let endHeight = parseIntValue(operationArray[IdxOperEndHeight]) | |
255 | 255 | let inShareAmount = parseIntValue(operationArray[IdxOperInAmount]) | |
256 | 256 | let outBaseAmount = parseIntValue(operationArray[IdxOperOutAmount]) | |
257 | 257 | if ((status != "PENDING")) | |
258 | 258 | then failExecuteGet("Status is not PENDING", baseAssetStr, userAddressStr, getTxIdStr) | |
259 | 259 | else if ((endHeight > height)) | |
260 | 260 | then failExecuteGet(((("EndHeight[" + toString(endHeight)) + "] > ") + toString(height)), baseAssetStr, userAddressStr, getTxIdStr) | |
261 | 261 | else [ScriptTransfer(userAddress, outBaseAmount, baseAssetId), StringEntry(operationKey, dataOperationExecutionUpdate(operationArray, "FINISHED", lastBlock.timestamp)), decrementTotalLocked(keyTotalLocked(internalBaseAssetStr), inShareAmount, outBaseAmount), decrementTotalLocked(keyTotalLockedByUser(internalBaseAssetStr, userAddressStr), inShareAmount, outBaseAmount)] | |
262 | 262 | } | |
263 | 263 | ||
264 | 264 | ||
265 | 265 | ||
266 | 266 | @Callable(i) | |
267 | 267 | func topUpBalance (baseAssetStr) = { | |
268 | 268 | let assetCfgArray = readAssetCfgOrFail(baseAssetStr) | |
269 | 269 | let pmt = value(i.payments[0]) | |
270 | 270 | let pmtAssetId = value(pmt.assetId) | |
271 | 271 | let pmtAssetStr = toBase58String(pmtAssetId) | |
272 | 272 | let shareAssetId = fromBase58String(assetCfgArray[IdxCfgShareAssetId]) | |
273 | 273 | let decimalsMultBothAssets = parseIntValue(assetCfgArray[IdxCfgDecimalsMultBothAssets]) | |
274 | 274 | let decimalsMultPrice = parseIntValue(assetCfgArray[IdxCfgDecimalsMultPrice]) | |
275 | 275 | let internalBaseAssetStr = assetCfgArray[IdxCfgInternalBaseAsset] | |
276 | 276 | if ((baseAssetStr != pmtAssetStr)) | |
277 | 277 | then throw("attached payment's asset id is NOT matched passed baseAssetStr") | |
278 | 278 | else if ((size(i.payments) > 1)) | |
279 | 279 | then throw("only one payment can be attached") | |
280 | 280 | else { | |
281 | 281 | let price = genericCalcPrice(internalBaseAssetStr, pmtAssetId, pmt.amount, shareAssetId, decimalsMultBothAssets, decimalsMultPrice)._1 | |
282 | 282 | [IntegerEntry(keyPriceLast(internalBaseAssetStr), price), IntegerEntry(keyPriceHistory(internalBaseAssetStr, height, lastBlock.timestamp), price)] | |
283 | 283 | } | |
284 | 284 | } | |
285 | 285 | ||
286 | 286 | ||
287 | 287 | ||
288 | 288 | @Callable(i) | |
289 | 289 | func currentSysParamsREST (baseAssetStr) = { | |
290 | 290 | let sysStateTuple = privateCurrentSysParamsREST(baseAssetStr) | |
291 | 291 | let price = sysStateTuple._1.value | |
292 | 292 | let decimalsMultPrice = sysStateTuple._2.value | |
293 | 293 | let baseAssetBalance = sysStateTuple._3.value | |
294 | 294 | let totalLockedBaseAmount = sysStateTuple._4.value | |
295 | 295 | let baseAssetBalanceConsideringLock = sysStateTuple._5.value | |
296 | 296 | let shareEmission = sysStateTuple._6.value | |
297 | 297 | let restData = makeString(["startCurrentSysParamsREST", toString(price), toString(decimalsMultPrice), toString(baseAssetBalance), toString(totalLockedBaseAmount), toString(baseAssetBalanceConsideringLock), toString(shareEmission), "endCurrentSysParamsREST"], SEP) | |
298 | 298 | throw(restData) | |
299 | 299 | } | |
300 | 300 | ||
301 | 301 | ||
302 | 302 | @Verifier(tx) | |
303 | 303 | func verify () = { | |
304 | 304 | let pubKeyAdminsList = ["kMVLGCwXnETBo7cjirdUTSrrWXCDYFUNY56FyHEvpj1", "GidQ61btQCXZBYeuYqpJphw5hP1o9zyduRTwrEvUzPZ", "DTz4eaCd7UfVtfodw4GrVJ2bE4HQFYW6T94mpGsHMhXz"] | |
305 | 305 | let s0 = if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0]))) | |
306 | 306 | then 1 | |
307 | 307 | else 0 | |
308 | 308 | let s1 = if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1]))) | |
309 | 309 | then 1 | |
310 | 310 | else 0 | |
311 | 311 | let s2 = if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2]))) | |
312 | 312 | then 1 | |
313 | 313 | else 0 | |
314 | 314 | let count = ((s0 + s1) + s2) | |
315 | 315 | if ((2 > count)) | |
316 | 316 | then throw(((((("invalid multisig: s0=" + toString(s0)) + " s1=") + toString(s1)) + " s2=") + toString(s2))) | |
317 | 317 | else true | |
318 | 318 | } | |
319 | 319 |
github/deemru/w8io/026f985 53.94 ms ◑