tx · 4JnZHetswEK2vsWqraSxe7r7vnkPPqWEAfEXWdgZV7kj 3N3c8hF3E1qiSZ27uH3XZvtWSso9QFckZUb: -0.03100000 Waves 2024.08.26 13:28 [3255739] smart account 3N3c8hF3E1qiSZ27uH3XZvtWSso9QFckZUb > SELF 0.00000000 Waves
{ "type": 13, "id": "4JnZHetswEK2vsWqraSxe7r7vnkPPqWEAfEXWdgZV7kj", "fee": 3100000, "feeAssetId": null, "timestamp": 1724668121964, "version": 1, "sender": "3N3c8hF3E1qiSZ27uH3XZvtWSso9QFckZUb", "senderPublicKey": "9Dkh2UiuYRqFTQrAXgJJbJuG3Q6VDPhiYHrsdfQx42Zx", "proofs": [ "HTuh3KiVqcah62dj2PSvur9d2GEjyg8vNogZfF8ABsh2uu35Qw1T3jVK99pWYtEtjfJZ34WTNWPfXBKc49BEdTg" ], "script": "base64:BwJhCAISAwoBCBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGGAACXNlcGFyYXRvcgICX18AB2NoYWluSWQJAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEACGNoYWluSWRXAQFXABBjb250cmFjdEZpbGVuYW1lAhdmdXR1cmVzX2NhbGN1bGF0b3IucmlkZQAFbXVsdDgAgMLXLwAMbXVsdDE4QmlnSW50CQC2AgEAgICQu7rWrfANAA13YXZlc0RlY2ltYWxzAAgADHVzZHREZWNpbWFscwAGAAt3YXZlc1N0cmluZwIFV0FWRVMADXF1ZXVlSXRlbVNpemUAIAAEYmlnMAkAtgIBAAAACklOREVYX0xJU1QJAMwIAgAACQDMCAIAAQkAzAgCAAIJAMwIAgADCQDMCAIABAkAzAgCAAUJAMwIAgAGCQDMCAIABwkAzAgCAAgJAMwIAgAJCQDMCAIACgkAzAgCAAsJAMwIAgAMCQDMCAIADQkAzAgCAA4JAMwIAgAPCQDMCAIAEAkAzAgCABEJAMwIAgASCQDMCAI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height": 3255739, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HXTKVZ667TfaWfnxf93X96BJni83XQPZ4Qtke3mU5m2F Next: A7YETDhSCzJGMoQUktAxZAMXJLmVrnG4dmGnquGdajnc Diff:
Old | New | Differences | |
---|---|---|---|
501 | 501 | else throwErr("invalid script")] | |
502 | 502 | if ((checks == checks)) | |
503 | 503 | then { | |
504 | - | let $ | |
505 | - | then $Tuple2( | |
504 | + | let $t02133822649 = if ((size(requestsQueue()) == 0)) | |
505 | + | then $Tuple2(nil, nil) | |
506 | 506 | else { | |
507 | 507 | let requestId = take(requestsQueue(), queueItemSize) | |
508 | 508 | let leverage = valueOrErrorMessage(getInteger(factoryAddress, kRequestLeverage(requestId)), wrapErr("request's leverage is undefined")) | |
509 | 509 | $Tuple2(nil, [invoke(factoryAddress, "integerEntry", [kRequestStatus(requestId), REQUEST_STATUS_READY], nil), invoke(factoryAddress, "binaryEntry", [kRequestIdToAccountPublicKey(requestId), accountPublicKey], nil), invoke(factoryAddress, "binaryEntry", [kRequestsQueue(), drop(requestsQueue(), queueItemSize)], nil), invoke(factoryAddress, "stringEntry", [kAccountAddressToRequestId(accountAddress), toBase58String(requestId)], nil), invoke(factoryAddress, "transferWaves", [creatorAddress.bytes, rewardAmount()], nil), invoke(factoryAddress, "integerEntry", [kLeverage(accountAddress), leverage], nil)]) | |
510 | 510 | } | |
511 | - | let actions = $ | |
512 | - | let factoryActions = $ | |
511 | + | let actions = $t02133822649._1 | |
512 | + | let factoryActions = $t02133822649._2 | |
513 | 513 | $Tuple2(actions, (factoryActions ++ [invoke(factoryAddress, "binaryEntry", [kAccountCreatorPublicKey(accountAddress), creatorPublicKey], nil)])) | |
514 | 514 | } | |
515 | 515 | else throw("Strict value is not equal to itself.") | |
540 | 540 | ||
541 | 541 | @Callable(i) | |
542 | 542 | func deposit (callerPublicKey,args) = { | |
543 | - | let $ | |
544 | - | let actions = $ | |
545 | - | let factoryActions = $ | |
543 | + | let $t02367023743 = depositINTERNAL(callerPublicKey, args, i) | |
544 | + | let actions = $t02367023743._1 | |
545 | + | let factoryActions = $t02367023743._2 | |
546 | 546 | $Tuple2(actions, factoryActions) | |
547 | 547 | } | |
548 | 548 | ||
550 | 550 | ||
551 | 551 | @Callable(i) | |
552 | 552 | func borrow (callerPublicKey,args) = { | |
553 | - | let $ | |
554 | - | let actions = $ | |
555 | - | let factoryActions = $ | |
553 | + | let $t02389823970 = borrowINTERNAL(callerPublicKey, args, i) | |
554 | + | let actions = $t02389823970._1 | |
555 | + | let factoryActions = $t02389823970._2 | |
556 | 556 | $Tuple2(actions, factoryActions) | |
557 | 557 | } | |
558 | 558 | ||
561 | 561 | @Callable(i) | |
562 | 562 | func depositAndBorrow (callerPublicKey,args) = { | |
563 | 563 | let accountAddress = args[0] | |
564 | - | let $ | |
565 | - | let depositActions = $ | |
566 | - | let depositFactoryActions = $ | |
567 | - | let $ | |
568 | - | let borrowActions = $ | |
569 | - | let borrowFactoryActions = $ | |
564 | + | let $t02416624265 = depositINTERNAL(callerPublicKey, [accountAddress], i) | |
565 | + | let depositActions = $t02416624265._1 | |
566 | + | let depositFactoryActions = $t02416624265._2 | |
567 | + | let $t02426824352 = borrowINTERNAL(callerPublicKey, args, i) | |
568 | + | let borrowActions = $t02426824352._1 | |
569 | + | let borrowFactoryActions = $t02426824352._2 | |
570 | 570 | $Tuple2((depositActions ++ borrowActions), (depositFactoryActions ++ borrowFactoryActions)) | |
571 | 571 | } | |
572 | 572 | ||
662 | 662 | let userRequests = valueOrElse(getBinary(factoryAddress, kRequestsByOwner(userAddress)), base58'') | |
663 | 663 | let userRequestsNumber = (size(userRequests) / queueItemSize) | |
664 | 664 | func getAccountsData (acc,count) = { | |
665 | - | let $ | |
666 | - | let accDataList = $ | |
667 | - | let rawBytes = $ | |
668 | - | let maxSize = $ | |
665 | + | let $t02728527327 = acc | |
666 | + | let accDataList = $t02728527327._1 | |
667 | + | let rawBytes = $t02728527327._2 | |
668 | + | let maxSize = $t02728527327._3 | |
669 | 669 | if ((maxSize > count)) | |
670 | 670 | then { | |
671 | 671 | let requestId = take(rawBytes, queueItemSize) | |
678 | 678 | else acc | |
679 | 679 | } | |
680 | 680 | ||
681 | - | let $ | |
681 | + | let $t02783127936 = { | |
682 | 682 | let $l = INDEX_LIST | |
683 | 683 | let $s = size($l) | |
684 | 684 | let $acc0 = $Tuple3(nil, userRequests, userRequestsNumber) | |
692 | 692 | ||
693 | 693 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
694 | 694 | } | |
695 | - | let accDataList = $ | |
696 | - | let _a = $ | |
697 | - | let _b = $ | |
695 | + | let accDataList = $t02783127936._1 | |
696 | + | let _a = $t02783127936._2 | |
697 | + | let _b = $t02783127936._3 | |
698 | 698 | $Tuple2(nil, accDataList) | |
699 | 699 | } | |
700 | 700 | else throw("Strict value is not equal to itself.") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 7 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "__" | |
5 | 5 | ||
6 | 6 | let chainId = take(drop(this.bytes, 1), 1) | |
7 | 7 | ||
8 | 8 | let chainIdW = base58'2W' | |
9 | 9 | ||
10 | 10 | let contractFilename = "futures_calculator.ride" | |
11 | 11 | ||
12 | 12 | let mult8 = 100000000 | |
13 | 13 | ||
14 | 14 | let mult18BigInt = toBigInt(1000000000000000000) | |
15 | 15 | ||
16 | 16 | let wavesDecimals = 8 | |
17 | 17 | ||
18 | 18 | let usdtDecimals = 6 | |
19 | 19 | ||
20 | 20 | let wavesString = "WAVES" | |
21 | 21 | ||
22 | 22 | let queueItemSize = 32 | |
23 | 23 | ||
24 | 24 | let big0 = toBigInt(0) | |
25 | 25 | ||
26 | 26 | let INDEX_LIST = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] | |
27 | 27 | ||
28 | 28 | let kMultisig = "%s__multisig" | |
29 | 29 | ||
30 | 30 | func kStatus (dapp,txId) = makeString(["%s__status", dapp, txId], separator) | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | let kShutdown = "%s__shutdown" | |
34 | 34 | ||
35 | 35 | let kPublicKeys = "%s__publicKeys" | |
36 | 36 | ||
37 | 37 | let kMatcherPublicKey = "%s__matcherPublicKey" | |
38 | 38 | ||
39 | 39 | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), mult18BigInt, toBigInt(origScaleMult)) | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), mult18BigInt)) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func validateAddress (address) = isDefined(addressFromString(address)) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func wrapErr (s) = ((contractFilename + ": ") + s) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func throwErr (s) = throw(wrapErr(s)) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func ensurePositive (v,s) = if ((v >= 0)) | |
55 | 55 | then v | |
56 | 56 | else throwErr((s + " value should be positive")) | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func parseAssetId (input) = if ((input == wavesString)) | |
60 | 60 | then unit | |
61 | 61 | else fromBase58String(input) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func assetIdToString (input) = if ((input == unit)) | |
65 | 65 | then wavesString | |
66 | 66 | else toBase58String(value(input)) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func getAssetInfoOrFail (assetId) = valueOrErrorMessage(assetInfo(assetId), wrapErr("invalid asset info")) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func getAssetDecimalsOrFail (assetId) = match assetId { | |
73 | 73 | case _: Unit => | |
74 | 74 | wavesDecimals | |
75 | 75 | case assetId: ByteVector => | |
76 | 76 | getAssetInfoOrFail(assetId).decimals | |
77 | 77 | case _ => | |
78 | 78 | throw("Match error") | |
79 | 79 | } | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func getAssetBalance (assetId,address) = match assetId { | |
83 | 83 | case _: Unit => | |
84 | 84 | wavesBalance(address).available | |
85 | 85 | case assetId: ByteVector => | |
86 | 86 | assetBalance(address, assetId) | |
87 | 87 | case _ => | |
88 | 88 | throw("Match error") | |
89 | 89 | } | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func pow10 (n) = pow(10, 0, n, 0, 0, DOWN) | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func pow10Decimals (assetId) = pow10(getAssetDecimalsOrFail(assetId)) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | let kFactoryAddress = "%s__factoryAddress" | |
99 | 99 | ||
100 | 100 | let factoryAddressOption = match getString(this, kFactoryAddress) { | |
101 | 101 | case s: String => | |
102 | 102 | addressFromString(s) | |
103 | 103 | case _: Unit => | |
104 | 104 | unit | |
105 | 105 | case _ => | |
106 | 106 | throw("Match error") | |
107 | 107 | } | |
108 | 108 | ||
109 | 109 | let factoryAddress = valueOrErrorMessage(factoryAddressOption, wrapErr("invalid factory address")) | |
110 | 110 | ||
111 | 111 | let kUsdtAssetId = "%s__usdtAssetId" | |
112 | 112 | ||
113 | 113 | let usdtAssetIdOption = match getString(factoryAddress, kUsdtAssetId) { | |
114 | 114 | case s: String => | |
115 | 115 | parseAssetId(s) | |
116 | 116 | case _: Unit => | |
117 | 117 | unit | |
118 | 118 | case _ => | |
119 | 119 | throw("Match error") | |
120 | 120 | } | |
121 | 121 | ||
122 | 122 | let usdtAssetId = valueOrErrorMessage(usdtAssetIdOption, wrapErr("invalid usdt asset id")) | |
123 | 123 | ||
124 | 124 | let kPricesAddress = "%s__calculatorAddress" | |
125 | 125 | ||
126 | 126 | let shutdown = valueOrElse(getBoolean(factoryAddress, kShutdown), false) | |
127 | 127 | ||
128 | 128 | func mustAddress (caller,address) = if ((caller == address)) | |
129 | 129 | then true | |
130 | 130 | else throwErr("permission denied") | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func mustThis (caller) = mustAddress(caller, this) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func mustFactory (caller) = mustAddress(caller, factoryAddress) | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func mustAdmin (callerPublicKey) = { | |
140 | 140 | let multisigAddressString = getString(factoryAddress, kMultisig) | |
141 | 141 | let isAdmin = match multisigAddressString { | |
142 | 142 | case addressString: String => | |
143 | 143 | let multisig = addressFromStringValue(addressString) | |
144 | 144 | let publicKeysList = split(getStringValue(multisig, kPublicKeys), separator) | |
145 | 145 | containsElement(publicKeysList, toBase58String(callerPublicKey)) | |
146 | 146 | case _ => | |
147 | 147 | (addressFromPublicKey(callerPublicKey) == factoryAddress) | |
148 | 148 | } | |
149 | 149 | if (isAdmin) | |
150 | 150 | then true | |
151 | 151 | else throwErr("not allowed") | |
152 | 152 | } | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | let kAccountScript = "%s__accountScript" | |
156 | 156 | ||
157 | 157 | func accountScript () = valueOrErrorMessage(getBinary(factoryAddress, kAccountScript), wrapErr("account script is not set")) | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | let kRewardAmount = "%s__rewardAmount" | |
161 | 161 | ||
162 | 162 | func rewardAmount () = valueOrErrorMessage(getInteger(factoryAddress, kRewardAmount), wrapErr("reward amount is not set")) | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | let kAccountsLimit = "%s__accountsLimit" | |
166 | 166 | ||
167 | 167 | let accountsLimitDefault = 20 | |
168 | 168 | ||
169 | 169 | func accountsLimit () = valueOrElse(getInteger(factoryAddress, kAccountsLimit), accountsLimitDefault) | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func kDeposited (accountAddress) = makeString(["%s%s", "deposited", toString(accountAddress)], separator) | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func depositedOption (accountAddress) = getInteger(factoryAddress, kDeposited(accountAddress)) | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func kCredit (accountAddress,assetId) = makeString(["%s%s%s", "credit", toString(accountAddress), assetIdToString(assetId)], separator) | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func creditOption (accountAddress,assetId) = getInteger(factoryAddress, kCredit(accountAddress, assetId)) | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func kLeverage (accountAddress) = makeString(["%s%s", "leverage", toString(accountAddress)], separator) | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | func kRequestLeverage (requestId) = makeString(["%s%s", "requestLeverage", toBase58String(requestId)], separator) | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | func kSyntheticAssetId (baseAssetId) = makeString(["%s%s", "syntheticAssetId", assetIdToString(baseAssetId)], separator) | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | func kBaseAssetId (syntheticAssetId) = makeString(["%s%s", "baseAssetId", assetIdToString(syntheticAssetId)], separator) | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | let REQUEST_STATUS_EMPTY = 0 | |
197 | 197 | ||
198 | 198 | let REQUEST_STATUS_READY = 1 | |
199 | 199 | ||
200 | 200 | func kRequestStatus (requestId) = makeString(["%s%s", toBase58String(requestId), "status"], separator) | |
201 | 201 | ||
202 | 202 | ||
203 | 203 | func kAccountCreatorPublicKey (accountAddress) = makeString(["%s%s", toString(accountAddress), "creatorPublicKey"], separator) | |
204 | 204 | ||
205 | 205 | ||
206 | 206 | func kRequestOwnerPublicKey (requestId) = makeString(["%s%s", toBase58String(requestId), "ownerPublicKey"], separator) | |
207 | 207 | ||
208 | 208 | ||
209 | 209 | func kRequestAmountAssetId (requestId) = makeString(["%s%s", toBase58String(requestId), "amountAssetId"], separator) | |
210 | 210 | ||
211 | 211 | ||
212 | 212 | func kRequestPriceAssetId (requestId) = makeString(["%s%s", toBase58String(requestId), "priceAssetId"], separator) | |
213 | 213 | ||
214 | 214 | ||
215 | 215 | func kRequestIdToAccountPublicKey (requestId) = makeString(["%s%s", toBase58String(requestId), "requestIdToAccountPublicKey"], separator) | |
216 | 216 | ||
217 | 217 | ||
218 | 218 | func kAccountAddressToRequestId (accountAddress) = makeString(["%s%s", toString(accountAddress), "accountAddressToRequestId"], separator) | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | func kRequestsQueue () = makeString(["%s", "requestsQueue"], separator) | |
222 | 222 | ||
223 | 223 | ||
224 | 224 | func requestsQueue () = valueOrElse(getBinary(factoryAddress, kRequestsQueue()), base58'') | |
225 | 225 | ||
226 | 226 | ||
227 | 227 | func kAccountsQueue () = makeString(["%s", "accountsQueue"], separator) | |
228 | 228 | ||
229 | 229 | ||
230 | 230 | func accountsQueue () = valueOrElse(getBinary(factoryAddress, kAccountsQueue()), base58'') | |
231 | 231 | ||
232 | 232 | ||
233 | 233 | func kRequestsByOwner (ownerAddress) = makeString(["%s%s", "requests", toString(ownerAddress)], separator) | |
234 | 234 | ||
235 | 235 | ||
236 | 236 | func requestsByOwner (ownerAddress) = valueOrElse(getBinary(factoryAddress, kRequestsByOwner(ownerAddress)), base58'') | |
237 | 237 | ||
238 | 238 | ||
239 | 239 | func kPairAllowed (amountAssetId,priceAssetId) = makeString(["%s%s%s", assetIdToString(amountAssetId), assetIdToString(priceAssetId), "pairAllowed"], separator) | |
240 | 240 | ||
241 | 241 | ||
242 | 242 | func pairAllowed (amountAssetId,priceAssetId) = valueOrElse(getBoolean(factoryAddress, kPairAllowed(amountAssetId, priceAssetId)), false) | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | func kPrice (assetId) = makeString(["%s", assetIdToString(assetId)], separator) | |
246 | 246 | ||
247 | 247 | ||
248 | 248 | func kPairPricesListKey (amountAssetId,priceAssetId) = makeString(["%s%s%s", assetIdToString(amountAssetId), assetIdToString(priceAssetId), "pairSettingPrices"], separator) | |
249 | 249 | ||
250 | 250 | ||
251 | 251 | func getPairPricesList (amountAssetId,priceAssetId) = match getString(factoryAddress, kPairPricesListKey(amountAssetId, priceAssetId)) { | |
252 | 252 | case s: String => | |
253 | 253 | split(s, separator) | |
254 | 254 | case _ => | |
255 | 255 | nil | |
256 | 256 | } | |
257 | 257 | ||
258 | 258 | ||
259 | 259 | func kPairSettingsKey (amountAssetId,priceAssetId,priceString) = makeString(["%s%s%d%s", assetIdToString(amountAssetId), assetIdToString(priceAssetId), priceString, "settings"], separator) | |
260 | 260 | ||
261 | 261 | ||
262 | 262 | func getCurrentPrice (assetId) = { | |
263 | 263 | let matcherPublicKey = fromBase58String(valueOrErrorMessage(getString(factoryAddress, kMatcherPublicKey), wrapErr("invalid matcher public key"))) | |
264 | 264 | let matcherAddress = addressFromPublicKey(matcherPublicKey) | |
265 | 265 | let price = valueOrErrorMessage(getInteger(matcherAddress, kPrice(assetId)), wrapErr(("invalid price, assetId = " + assetIdToString(assetId)))) | |
266 | 266 | price | |
267 | 267 | } | |
268 | 268 | ||
269 | 269 | ||
270 | 270 | func calcTotalCredit (creditA,creditB,currentPrice) = (fraction(creditA, currentPrice, mult18BigInt) + creditB) | |
271 | 271 | ||
272 | 272 | ||
273 | 273 | func calcTotalBalance (balanceA,balanceB,currentPrice) = (fraction(balanceA, currentPrice, mult18BigInt) + balanceB) | |
274 | 274 | ||
275 | 275 | ||
276 | 276 | func calcPnl (totalBalance,totalCredit) = (totalBalance - totalCredit) | |
277 | 277 | ||
278 | 278 | ||
279 | 279 | func calcCreditAvailable (deposit,leverage,totalCredit) = (fraction(deposit, leverage, mult18BigInt) - totalCredit) | |
280 | 280 | ||
281 | 281 | ||
282 | 282 | func calcRealInCredit (credit,balance) = if ((credit > big0)) | |
283 | 283 | then (credit - balance) | |
284 | 284 | else big0 | |
285 | 285 | ||
286 | 286 | ||
287 | 287 | func calcFree (credit,balance) = if ((credit > big0)) | |
288 | 288 | then (balance - credit) | |
289 | 289 | else big0 | |
290 | 290 | ||
291 | 291 | ||
292 | 292 | func calcShortPrice (free,realInCredit) = if ((realInCredit > big0)) | |
293 | 293 | then max([big0, fraction(free, mult18BigInt, realInCredit)]) | |
294 | 294 | else big0 | |
295 | 295 | ||
296 | 296 | ||
297 | 297 | func calcLongPrice (free,realInCredit) = if ((realInCredit > big0)) | |
298 | 298 | then max([big0, fraction(realInCredit, mult18BigInt, free)]) | |
299 | 299 | else big0 | |
300 | 300 | ||
301 | 301 | ||
302 | 302 | func calcStartMargin (realInCreditA,realInCreditB,currentPrice,settingsMargin) = fraction((fraction(realInCreditA, currentPrice, mult18BigInt) + realInCreditB), settingsMargin, mult18BigInt) | |
303 | 303 | ||
304 | 304 | ||
305 | 305 | func calcMarginSupply (settingsMarginSupply,settingsMargin,startMargin) = fraction(settingsMarginSupply, startMargin, settingsMargin) | |
306 | 306 | ||
307 | 307 | ||
308 | 308 | func calcLiquidationPrice (deposit,marginSupply,realInCreditA,realInCreditB,shortPrice,longPrice) = { | |
309 | 309 | let liquidationPriceA = if ((realInCreditA > big0)) | |
310 | 310 | then (((deposit - marginSupply) / realInCreditA) + shortPrice) | |
311 | 311 | else big0 | |
312 | 312 | let liquidationPriceB = if ((realInCreditB > big0)) | |
313 | 313 | then (longPrice - ((deposit - marginSupply) / (realInCreditA / longPrice))) | |
314 | 314 | else big0 | |
315 | 315 | (liquidationPriceA + liquidationPriceB) | |
316 | 316 | } | |
317 | 317 | ||
318 | 318 | ||
319 | 319 | func getRequestId (accountAddress) = { | |
320 | 320 | let requestId = fromBase58String(valueOrErrorMessage(getString(factoryAddress, kAccountAddressToRequestId(accountAddress)), wrapErr("invalid account address: request id is undefined"))) | |
321 | 321 | requestId | |
322 | 322 | } | |
323 | 323 | ||
324 | 324 | ||
325 | 325 | func getAccountAssets (accountAddress) = { | |
326 | 326 | let requestId = getRequestId(accountAddress) | |
327 | 327 | let amountAssetId = parseAssetId(valueOrErrorMessage(getString(factoryAddress, kRequestAmountAssetId(requestId)), wrapErr("invalid amount asset id"))) | |
328 | 328 | let priceAssetId = parseAssetId(valueOrErrorMessage(getString(factoryAddress, kRequestPriceAssetId(requestId)), wrapErr("invalid amount price id"))) | |
329 | 329 | $Tuple2(amountAssetId, priceAssetId) | |
330 | 330 | } | |
331 | 331 | ||
332 | 332 | ||
333 | 333 | func getAccountOwnerPublicKey (accountAddress) = { | |
334 | 334 | let requestId = getRequestId(accountAddress) | |
335 | 335 | let requestOwnerPublicKey = valueOrErrorMessage(getBinary(factoryAddress, kRequestOwnerPublicKey(requestId)), wrapErr("invalid amount asset id")) | |
336 | 336 | requestOwnerPublicKey | |
337 | 337 | } | |
338 | 338 | ||
339 | 339 | ||
340 | 340 | func getAccountInfoInternal (accountAddress) = { | |
341 | 341 | let $t01142011488 = getAccountAssets(accountAddress) | |
342 | 342 | let amountAssetId = $t01142011488._1 | |
343 | 343 | let priceAssetId = $t01142011488._2 | |
344 | 344 | let leverage = valueOrErrorMessage(getInteger(factoryAddress, kLeverage(accountAddress)), wrapErr("leverage should be defined")) | |
345 | 345 | let requestId = getRequestId(accountAddress) | |
346 | 346 | let accountPublicKey = valueOrErrorMessage(getBinary(factoryAddress, kRequestIdToAccountPublicKey(requestId)), "kRequestIdToAccountPublicKey not found") | |
347 | 347 | let deposited = valueOrElse(depositedOption(accountAddress), 0) | |
348 | 348 | let currentPrice = toX18(getCurrentPrice(amountAssetId), pow10Decimals(priceAssetId)) | |
349 | 349 | let creditA = valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, amountAssetId)), 0) | |
350 | 350 | let creditB = valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, priceAssetId)), 0) | |
351 | 351 | let status = valueOrErrorMessage(getInteger(factoryAddress, kRequestStatus(requestId)), ("status not found. RequestId = " + toBase58String(requestId))) | |
352 | 352 | let synthAmountAssetId = getString(factoryAddress, kSyntheticAssetId(amountAssetId)) | |
353 | 353 | let synthAmountAssetBalance = match synthAmountAssetId { | |
354 | 354 | case s: String => | |
355 | 355 | getAssetBalance(parseAssetId(s), accountAddress) | |
356 | 356 | case _ => | |
357 | 357 | 0 | |
358 | 358 | } | |
359 | 359 | let synthPriceAssetId = getString(factoryAddress, kSyntheticAssetId(priceAssetId)) | |
360 | 360 | let synthPriceAssetBalance = match synthPriceAssetId { | |
361 | 361 | case s: String => | |
362 | 362 | getAssetBalance(parseAssetId(s), accountAddress) | |
363 | 363 | case _ => | |
364 | 364 | 0 | |
365 | 365 | } | |
366 | 366 | $Tuple12(assetIdToString(amountAssetId), assetIdToString(priceAssetId), toString(accountAddress), toBase58String(accountPublicKey), leverage, toBase58String(requestId), deposited, creditA, creditB, synthAmountAssetBalance, synthPriceAssetBalance, status) | |
367 | 367 | } | |
368 | 368 | ||
369 | 369 | ||
370 | 370 | func depositINTERNAL (callerPublicKey,args,i) = { | |
371 | 371 | let payment = i.payments[0] | |
372 | 372 | let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address")) | |
373 | 373 | let ckecks = [if (!(shutdown)) | |
374 | 374 | then true | |
375 | 375 | else throwErr("not allowed"), mustFactory(i.caller), if ((size(i.payments) == 1)) | |
376 | 376 | then true | |
377 | 377 | else throwErr("1 payment is required"), if ((payment.assetId == usdtAssetId)) | |
378 | 378 | then true | |
379 | 379 | else throwErr("invalid asset"), if ((getInteger(factoryAddress, kRequestStatus(getRequestId(accountAddress))) == REQUEST_STATUS_READY)) | |
380 | 380 | then true | |
381 | 381 | else throwErr("account is not ready")] | |
382 | 382 | if ((ckecks == ckecks)) | |
383 | 383 | then { | |
384 | 384 | let actions = [ScriptTransfer(accountAddress, payment.amount, payment.assetId)] | |
385 | 385 | let factoryActions = [invoke(factoryAddress, "integerEntry", [kDeposited(accountAddress), (valueOrElse(depositedOption(accountAddress), 0) + payment.amount)], nil)] | |
386 | 386 | $Tuple2(actions, factoryActions) | |
387 | 387 | } | |
388 | 388 | else throw("Strict value is not equal to itself.") | |
389 | 389 | } | |
390 | 390 | ||
391 | 391 | ||
392 | 392 | func borrowINTERNAL (callerPublicKey,args,i) = { | |
393 | 393 | let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address")) | |
394 | 394 | let assetIdRequested = parseAssetId(args[1]) | |
395 | 395 | let amountRequested = ensurePositive(valueOrErrorMessage(parseInt(args[2]), wrapErr("invalid requested amount")), "requested amount") | |
396 | 396 | let accountOwnerPublicKey = getAccountOwnerPublicKey(accountAddress) | |
397 | 397 | let userAddress = addressFromPublicKey(callerPublicKey) | |
398 | 398 | let ckecks = [if (!(shutdown)) | |
399 | 399 | then true | |
400 | 400 | else throwErr("not allowed"), mustFactory(i.caller), if ((callerPublicKey == accountOwnerPublicKey)) | |
401 | 401 | then true | |
402 | 402 | else throwErr("can be called by account owner only")] | |
403 | 403 | if ((ckecks == ckecks)) | |
404 | 404 | then { | |
405 | 405 | let amountAssetId = getAccountAssets(accountAddress)._1 | |
406 | 406 | let deposited = toX18(valueOrElse(depositedOption(accountAddress), 0), pow10Decimals(usdtAssetId)) | |
407 | 407 | let currentPrice = toX18(getCurrentPrice(amountAssetId), pow10Decimals(usdtAssetId)) | |
408 | 408 | let creditA = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, amountAssetId)), 0), pow10Decimals(amountAssetId)) | |
409 | 409 | let creditB = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, usdtAssetId)), 0), pow10Decimals(usdtAssetId)) | |
410 | 410 | let totalCredit = calcTotalCredit(creditA, creditB, currentPrice) | |
411 | 411 | let leverage = toX18(valueOrErrorMessage(getInteger(factoryAddress, kLeverage(accountAddress)), wrapErr("leverage should be defined")), 1) | |
412 | 412 | let creditAvailableUsdt = calcCreditAvailable(deposited, leverage, totalCredit) | |
413 | 413 | let creditAvailable = if ((assetIdRequested == amountAssetId)) | |
414 | 414 | then fromX18(fraction(creditAvailableUsdt, mult18BigInt, currentPrice), pow10Decimals(amountAssetId)) | |
415 | 415 | else if ((assetIdRequested == usdtAssetId)) | |
416 | 416 | then fromX18(creditAvailableUsdt, pow10Decimals(usdtAssetId)) | |
417 | 417 | else throwErr("invalid requested asset id") | |
418 | 418 | let syntheticAssetId = parseAssetId(valueOrErrorMessage(getString(factoryAddress, kSyntheticAssetId(assetIdRequested)), wrapErr("synthetic asset for requested asset is undefined"))) | |
419 | 419 | let amountToSend = if ((creditAvailable >= amountRequested)) | |
420 | 420 | then amountRequested | |
421 | 421 | else throwErr(("credit available = " + toString(creditAvailable))) | |
422 | 422 | let factoryActions = [invoke(factoryAddress, "integerEntry", [kCredit(accountAddress, assetIdRequested), (valueOrElse(creditOption(accountAddress, assetIdRequested), 0) + amountToSend)], nil), invoke(factoryAddress, "transferAsset", [accountAddress.bytes, amountToSend, syntheticAssetId], nil)] | |
423 | 423 | $Tuple2(nil, [factoryActions, creditAvailable]) | |
424 | 424 | } | |
425 | 425 | else throw("Strict value is not equal to itself.") | |
426 | 426 | } | |
427 | 427 | ||
428 | 428 | ||
429 | 429 | @Callable(i) | |
430 | 430 | func init (factoryAddressStr) = { | |
431 | 431 | let checkCaller = mustThis(i.caller) | |
432 | 432 | if ((checkCaller == checkCaller)) | |
433 | 433 | then $Tuple2([StringEntry(kFactoryAddress, factoryAddressStr)], unit) | |
434 | 434 | else throw("Strict value is not equal to itself.") | |
435 | 435 | } | |
436 | 436 | ||
437 | 437 | ||
438 | 438 | ||
439 | 439 | @Callable(i) | |
440 | 440 | func requestAccount (callerPublicKey,args) = { | |
441 | 441 | let ckecks = [if (!(shutdown)) | |
442 | 442 | then true | |
443 | 443 | else throwErr("not allowed"), mustFactory(i.caller)] | |
444 | 444 | if ((ckecks == ckecks)) | |
445 | 445 | then { | |
446 | 446 | let amountAssetIdStr = args[0] | |
447 | 447 | let priceAssetIdStr = args[1] | |
448 | 448 | let leverage = valueOrErrorMessage(parseInt(args[2]), wrapErr("invalid leverage")) | |
449 | 449 | let userAddress = addressFromPublicKey(callerPublicKey) | |
450 | 450 | let requestId = sha256(((userAddress.bytes + fromBase58String(amountAssetIdStr)) + fromBase58String(priceAssetIdStr))) | |
451 | 451 | let amountAssetId = parseAssetId(amountAssetIdStr) | |
452 | 452 | let priceAssetId = parseAssetId(priceAssetIdStr) | |
453 | 453 | let userRequestsNumber = (size(kRequestsByOwner(userAddress)) / queueItemSize) | |
454 | 454 | let checks = [if ((size(i.payments) == 1)) | |
455 | 455 | then true | |
456 | 456 | else throwErr("1 payment is required"), if ((i.payments[0].assetId == unit)) | |
457 | 457 | then true | |
458 | 458 | else throwErr("invalid asset"), if ((i.payments[0].amount == rewardAmount())) | |
459 | 459 | then true | |
460 | 460 | else throwErr("invalid amount"), if (pairAllowed(amountAssetId, priceAssetId)) | |
461 | 461 | then true | |
462 | 462 | else throwErr("pair is not allowed"), if ((getInteger(factoryAddress, kRequestStatus(requestId)) == unit)) | |
463 | 463 | then true | |
464 | 464 | else throwErr("account is already exists"), if ((accountsLimit() > userRequestsNumber)) | |
465 | 465 | then true | |
466 | 466 | else throwErr(("accounts limit is " + toString(accountsLimit())))] | |
467 | 467 | if ((checks == checks)) | |
468 | 468 | then { | |
469 | 469 | let $t01862820083 = $Tuple2([ScriptTransfer(factoryAddress, rewardAmount(), unit)], [invoke(factoryAddress, "integerEntry", [kRequestStatus(requestId), REQUEST_STATUS_EMPTY], nil), invoke(factoryAddress, "binaryEntry", [kRequestsQueue(), (requestsQueue() + requestId)], nil), invoke(factoryAddress, "integerEntry", [kRequestLeverage(requestId), leverage], nil)]) | |
470 | 470 | let actions = $t01862820083._1 | |
471 | 471 | let factoryActions = $t01862820083._2 | |
472 | 472 | $Tuple2(actions, (factoryActions ++ [invoke(factoryAddress, "binaryEntry", [kRequestOwnerPublicKey(requestId), callerPublicKey], nil), invoke(factoryAddress, "binaryEntry", [kRequestsByOwner(userAddress), (requestsByOwner(userAddress) + requestId)], nil), invoke(factoryAddress, "stringEntry", [kRequestAmountAssetId(requestId), amountAssetIdStr], nil), invoke(factoryAddress, "stringEntry", [kRequestPriceAssetId(requestId), priceAssetIdStr], nil)])) | |
473 | 473 | } | |
474 | 474 | else throw("Strict value is not equal to itself.") | |
475 | 475 | } | |
476 | 476 | else throw("Strict value is not equal to itself.") | |
477 | 477 | } | |
478 | 478 | ||
479 | 479 | ||
480 | 480 | ||
481 | 481 | @Callable(i) | |
482 | 482 | func addAccount (callerPublicKey,args) = { | |
483 | 483 | let ckecks = [if (!(shutdown)) | |
484 | 484 | then true | |
485 | 485 | else throwErr("not allowed"), mustFactory(i.caller)] | |
486 | 486 | if ((ckecks == ckecks)) | |
487 | 487 | then { | |
488 | 488 | let creatorPublicKey = fromBase58String(args[0]) | |
489 | 489 | let accountPublicKey = callerPublicKey | |
490 | 490 | let accountAddress = addressFromPublicKey(callerPublicKey) | |
491 | 491 | let creatorAddress = addressFromPublicKey(creatorPublicKey) | |
492 | 492 | let checks = [if ((getBinary(factoryAddress, kAccountCreatorPublicKey(accountAddress)) == unit)) | |
493 | 493 | then true | |
494 | 494 | else throwErr("account is already exists"), if ( match scriptHash(accountAddress) { | |
495 | 495 | case b: ByteVector => | |
496 | 496 | (b == blake2b256_32Kb(accountScript())) | |
497 | 497 | case _ => | |
498 | 498 | false | |
499 | 499 | }) | |
500 | 500 | then true | |
501 | 501 | else throwErr("invalid script")] | |
502 | 502 | if ((checks == checks)) | |
503 | 503 | then { | |
504 | - | let $ | |
505 | - | then $Tuple2( | |
504 | + | let $t02133822649 = if ((size(requestsQueue()) == 0)) | |
505 | + | then $Tuple2(nil, nil) | |
506 | 506 | else { | |
507 | 507 | let requestId = take(requestsQueue(), queueItemSize) | |
508 | 508 | let leverage = valueOrErrorMessage(getInteger(factoryAddress, kRequestLeverage(requestId)), wrapErr("request's leverage is undefined")) | |
509 | 509 | $Tuple2(nil, [invoke(factoryAddress, "integerEntry", [kRequestStatus(requestId), REQUEST_STATUS_READY], nil), invoke(factoryAddress, "binaryEntry", [kRequestIdToAccountPublicKey(requestId), accountPublicKey], nil), invoke(factoryAddress, "binaryEntry", [kRequestsQueue(), drop(requestsQueue(), queueItemSize)], nil), invoke(factoryAddress, "stringEntry", [kAccountAddressToRequestId(accountAddress), toBase58String(requestId)], nil), invoke(factoryAddress, "transferWaves", [creatorAddress.bytes, rewardAmount()], nil), invoke(factoryAddress, "integerEntry", [kLeverage(accountAddress), leverage], nil)]) | |
510 | 510 | } | |
511 | - | let actions = $ | |
512 | - | let factoryActions = $ | |
511 | + | let actions = $t02133822649._1 | |
512 | + | let factoryActions = $t02133822649._2 | |
513 | 513 | $Tuple2(actions, (factoryActions ++ [invoke(factoryAddress, "binaryEntry", [kAccountCreatorPublicKey(accountAddress), creatorPublicKey], nil)])) | |
514 | 514 | } | |
515 | 515 | else throw("Strict value is not equal to itself.") | |
516 | 516 | } | |
517 | 517 | else throw("Strict value is not equal to itself.") | |
518 | 518 | } | |
519 | 519 | ||
520 | 520 | ||
521 | 521 | ||
522 | 522 | @Callable(i) | |
523 | 523 | func withdraw (callerPublicKey,args) = { | |
524 | 524 | let checks = [if (!(shutdown)) | |
525 | 525 | then true | |
526 | 526 | else throwErr("not allowed"), mustFactory(i.caller)] | |
527 | 527 | if ((checks == checks)) | |
528 | 528 | then { | |
529 | 529 | let userAddress = addressFromPublicKey(callerPublicKey) | |
530 | 530 | let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address")) | |
531 | 531 | let amount = valueOrErrorMessage(parseInt(args[1]), wrapErr("invalid amount")) | |
532 | 532 | let assetId = parseAssetId(args[2]) | |
533 | 533 | let invocations = [invoke(accountAddress, "transferAsset", [userAddress.bytes, amount, assetId], nil)] | |
534 | 534 | $Tuple2(nil, invocations) | |
535 | 535 | } | |
536 | 536 | else throw("Strict value is not equal to itself.") | |
537 | 537 | } | |
538 | 538 | ||
539 | 539 | ||
540 | 540 | ||
541 | 541 | @Callable(i) | |
542 | 542 | func deposit (callerPublicKey,args) = { | |
543 | - | let $ | |
544 | - | let actions = $ | |
545 | - | let factoryActions = $ | |
543 | + | let $t02367023743 = depositINTERNAL(callerPublicKey, args, i) | |
544 | + | let actions = $t02367023743._1 | |
545 | + | let factoryActions = $t02367023743._2 | |
546 | 546 | $Tuple2(actions, factoryActions) | |
547 | 547 | } | |
548 | 548 | ||
549 | 549 | ||
550 | 550 | ||
551 | 551 | @Callable(i) | |
552 | 552 | func borrow (callerPublicKey,args) = { | |
553 | - | let $ | |
554 | - | let actions = $ | |
555 | - | let factoryActions = $ | |
553 | + | let $t02389823970 = borrowINTERNAL(callerPublicKey, args, i) | |
554 | + | let actions = $t02389823970._1 | |
555 | + | let factoryActions = $t02389823970._2 | |
556 | 556 | $Tuple2(actions, factoryActions) | |
557 | 557 | } | |
558 | 558 | ||
559 | 559 | ||
560 | 560 | ||
561 | 561 | @Callable(i) | |
562 | 562 | func depositAndBorrow (callerPublicKey,args) = { | |
563 | 563 | let accountAddress = args[0] | |
564 | - | let $ | |
565 | - | let depositActions = $ | |
566 | - | let depositFactoryActions = $ | |
567 | - | let $ | |
568 | - | let borrowActions = $ | |
569 | - | let borrowFactoryActions = $ | |
564 | + | let $t02416624265 = depositINTERNAL(callerPublicKey, [accountAddress], i) | |
565 | + | let depositActions = $t02416624265._1 | |
566 | + | let depositFactoryActions = $t02416624265._2 | |
567 | + | let $t02426824352 = borrowINTERNAL(callerPublicKey, args, i) | |
568 | + | let borrowActions = $t02426824352._1 | |
569 | + | let borrowFactoryActions = $t02426824352._2 | |
570 | 570 | $Tuple2((depositActions ++ borrowActions), (depositFactoryActions ++ borrowFactoryActions)) | |
571 | 571 | } | |
572 | 572 | ||
573 | 573 | ||
574 | 574 | ||
575 | 575 | @Callable(i) | |
576 | 576 | func repay (callerPublicKey,args) = { | |
577 | 577 | let ckecks = [if (!(shutdown)) | |
578 | 578 | then true | |
579 | 579 | else throwErr("not allowed"), mustFactory(i.caller)] | |
580 | 580 | if ((ckecks == ckecks)) | |
581 | 581 | then $Tuple2(nil, unit) | |
582 | 582 | else throw("Strict value is not equal to itself.") | |
583 | 583 | } | |
584 | 584 | ||
585 | 585 | ||
586 | 586 | ||
587 | 587 | @Callable(i) | |
588 | 588 | func setPairAllowance (callerPublicKey,args) = { | |
589 | 589 | let ckecks = [if (!(shutdown)) | |
590 | 590 | then true | |
591 | 591 | else throwErr("not allowed"), mustFactory(i.caller), mustAdmin(callerPublicKey)] | |
592 | 592 | if ((ckecks == ckecks)) | |
593 | 593 | then { | |
594 | 594 | let amountAssetIdStr = args[0] | |
595 | 595 | let priceAssetIdStr = args[1] | |
596 | 596 | let allowStr = args[2] | |
597 | 597 | let amountAssetId = parseAssetId(amountAssetIdStr) | |
598 | 598 | let priceAssetId = parseAssetId(priceAssetIdStr) | |
599 | 599 | let allow = (allowStr == "true") | |
600 | 600 | let invocations = [invoke(factoryAddress, "booleanEntry", [kPairAllowed(amountAssetId, priceAssetId), allow], nil)] | |
601 | 601 | $Tuple2(nil, invocations) | |
602 | 602 | } | |
603 | 603 | else throw("Strict value is not equal to itself.") | |
604 | 604 | } | |
605 | 605 | ||
606 | 606 | ||
607 | 607 | ||
608 | 608 | @Callable(i) | |
609 | 609 | func addSyntheticAsset (callerPublicKey,args) = { | |
610 | 610 | let baseAssetId = parseAssetId(args[0]) | |
611 | 611 | let syntheticAssetId = parseAssetId(args[1]) | |
612 | 612 | let ckecks = [if (!(shutdown)) | |
613 | 613 | then true | |
614 | 614 | else throwErr("not allowed"), mustFactory(i.caller), mustAdmin(callerPublicKey), if ((getString(factoryAddress, kSyntheticAssetId(baseAssetId)) == unit)) | |
615 | 615 | then true | |
616 | 616 | else throwErr("invalid base asset"), if ((getString(factoryAddress, kBaseAssetId(syntheticAssetId)) == unit)) | |
617 | 617 | then true | |
618 | 618 | else throwErr("invalid synthetic asset")] | |
619 | 619 | if ((ckecks == ckecks)) | |
620 | 620 | then { | |
621 | 621 | let invocations = [invoke(factoryAddress, "stringEntry", [kSyntheticAssetId(baseAssetId), assetIdToString(syntheticAssetId)], nil), invoke(factoryAddress, "stringEntry", [kBaseAssetId(syntheticAssetId), assetIdToString(baseAssetId)], nil)] | |
622 | 622 | $Tuple2(nil, invocations) | |
623 | 623 | } | |
624 | 624 | else throw("Strict value is not equal to itself.") | |
625 | 625 | } | |
626 | 626 | ||
627 | 627 | ||
628 | 628 | ||
629 | 629 | @Callable(i) | |
630 | 630 | func doShutdown (callerPublicKey,args) = { | |
631 | 631 | let checks = [mustFactory(i.caller), mustAdmin(callerPublicKey)] | |
632 | 632 | if ((checks == checks)) | |
633 | 633 | then { | |
634 | 634 | let invocations = [invoke(factoryAddress, "booleanEntry", [kShutdown, true], nil)] | |
635 | 635 | $Tuple2(nil, invocations) | |
636 | 636 | } | |
637 | 637 | else throw("Strict value is not equal to itself.") | |
638 | 638 | } | |
639 | 639 | ||
640 | 640 | ||
641 | 641 | ||
642 | 642 | @Callable(i) | |
643 | 643 | func getAccountInfoREADONLY (callerPublicKey,args) = { | |
644 | 644 | let checks = [mustFactory(i.caller)] | |
645 | 645 | if ((checks == checks)) | |
646 | 646 | then { | |
647 | 647 | let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address")) | |
648 | 648 | let data = getAccountInfoInternal(accountAddress) | |
649 | 649 | $Tuple2(nil, data) | |
650 | 650 | } | |
651 | 651 | else throw("Strict value is not equal to itself.") | |
652 | 652 | } | |
653 | 653 | ||
654 | 654 | ||
655 | 655 | ||
656 | 656 | @Callable(i) | |
657 | 657 | func getUserInfoREADONLY (callerPublicKey,args) = { | |
658 | 658 | let checks = [mustFactory(i.caller)] | |
659 | 659 | if ((checks == checks)) | |
660 | 660 | then { | |
661 | 661 | let userAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid user address")) | |
662 | 662 | let userRequests = valueOrElse(getBinary(factoryAddress, kRequestsByOwner(userAddress)), base58'') | |
663 | 663 | let userRequestsNumber = (size(userRequests) / queueItemSize) | |
664 | 664 | func getAccountsData (acc,count) = { | |
665 | - | let $ | |
666 | - | let accDataList = $ | |
667 | - | let rawBytes = $ | |
668 | - | let maxSize = $ | |
665 | + | let $t02728527327 = acc | |
666 | + | let accDataList = $t02728527327._1 | |
667 | + | let rawBytes = $t02728527327._2 | |
668 | + | let maxSize = $t02728527327._3 | |
669 | 669 | if ((maxSize > count)) | |
670 | 670 | then { | |
671 | 671 | let requestId = take(rawBytes, queueItemSize) | |
672 | 672 | let newRawBytes = drop(rawBytes, queueItemSize) | |
673 | 673 | let accountPublicKey = valueOrErrorMessage(getBinary(factoryAddress, kRequestIdToAccountPublicKey(requestId)), "kRequestIdToAccountPublicKey not found") | |
674 | 674 | let accountAddress = addressFromPublicKey(accountPublicKey) | |
675 | 675 | let data = getAccountInfoInternal(accountAddress) | |
676 | 676 | $Tuple3((accDataList :+ data), newRawBytes, maxSize) | |
677 | 677 | } | |
678 | 678 | else acc | |
679 | 679 | } | |
680 | 680 | ||
681 | - | let $ | |
681 | + | let $t02783127936 = { | |
682 | 682 | let $l = INDEX_LIST | |
683 | 683 | let $s = size($l) | |
684 | 684 | let $acc0 = $Tuple3(nil, userRequests, userRequestsNumber) | |
685 | 685 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
686 | 686 | then $a | |
687 | 687 | else getAccountsData($a, $l[$i]) | |
688 | 688 | ||
689 | 689 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
690 | 690 | then $a | |
691 | 691 | else throw("List size exceeds 20") | |
692 | 692 | ||
693 | 693 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
694 | 694 | } | |
695 | - | let accDataList = $ | |
696 | - | let _a = $ | |
697 | - | let _b = $ | |
695 | + | let accDataList = $t02783127936._1 | |
696 | + | let _a = $t02783127936._2 | |
697 | + | let _b = $t02783127936._3 | |
698 | 698 | $Tuple2(nil, accDataList) | |
699 | 699 | } | |
700 | 700 | else throw("Strict value is not equal to itself.") | |
701 | 701 | } | |
702 | 702 | ||
703 | 703 | ||
704 | 704 | ||
705 | 705 | @Callable(i) | |
706 | 706 | func getPairSettingsInfoREADONLY (callerPublicKey,args) = { | |
707 | 707 | let amountAsset = parseAssetId(args[0]) | |
708 | 708 | let priceAsset = parseAssetId(args[1]) | |
709 | 709 | let pricesList = getPairPricesList(amountAsset, priceAsset) | |
710 | 710 | func getPairSettings (acc,pricesString) = { | |
711 | 711 | let settingsKey = kPairSettingsKey(amountAsset, priceAsset, pricesString) | |
712 | 712 | let settingsStringValue = getStringValue(factoryAddress, settingsKey) | |
713 | 713 | let sList = split(settingsStringValue, separator) | |
714 | 714 | let price = parseInt(pricesString) | |
715 | 715 | let maxLeverage = parseInt(sList[1]) | |
716 | 716 | let initialMargin = parseInt(sList[2]) | |
717 | 717 | let maintenanceMargin = parseInt(sList[3]) | |
718 | 718 | (acc :+ $Tuple4(price, maxLeverage, initialMargin, maintenanceMargin)) | |
719 | 719 | } | |
720 | 720 | ||
721 | 721 | let data = { | |
722 | 722 | let $l = pricesList | |
723 | 723 | let $s = size($l) | |
724 | 724 | let $acc0 = nil | |
725 | 725 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
726 | 726 | then $a | |
727 | 727 | else getPairSettings($a, $l[$i]) | |
728 | 728 | ||
729 | 729 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
730 | 730 | then $a | |
731 | 731 | else throw("List size exceeds 20") | |
732 | 732 | ||
733 | 733 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
734 | 734 | } | |
735 | 735 | $Tuple2(nil, data) | |
736 | 736 | } | |
737 | 737 | ||
738 | 738 | ||
739 | 739 | ||
740 | 740 | @Callable(i) | |
741 | 741 | func editPairSettings (callerPublicKey,args) = { | |
742 | 742 | let checks = [mustFactory(i.caller), mustAdmin(callerPublicKey)] | |
743 | 743 | if ((checks == checks)) | |
744 | 744 | then { | |
745 | 745 | let amountAsset = parseAssetId(args[0]) | |
746 | 746 | let priceAsset = parseAssetId(args[1]) | |
747 | 747 | let price = args[2] | |
748 | 748 | let maxLeverage = args[3] | |
749 | 749 | let initialMargin = args[4] | |
750 | 750 | let maintenanceMargin = args[5] | |
751 | 751 | let pairPricesListKey = kPairPricesListKey(amountAsset, priceAsset) | |
752 | 752 | let settingsKey = kPairSettingsKey(amountAsset, priceAsset, price) | |
753 | 753 | let pricesList = getPairPricesList(amountAsset, priceAsset) | |
754 | 754 | let newList = match indexOf(pricesList, price) { | |
755 | 755 | case ind: Int => | |
756 | 756 | pricesList | |
757 | 757 | case _ => | |
758 | 758 | (pricesList :+ price) | |
759 | 759 | } | |
760 | 760 | let check2 = [valueOrErrorMessage(parseInt(price), wrapErr("price value is not an Int")), valueOrErrorMessage(maxLeverage, wrapErr("maxLeverage value is not an Int")), valueOrErrorMessage(initialMargin, wrapErr("initialMargin value is not an Int")), valueOrErrorMessage(maintenanceMargin, wrapErr("maintenanceMargin value is not an Int")), if ((20 >= size(newList))) | |
761 | 761 | then true | |
762 | 762 | else throwErr("exceeded max prices list size (20)")] | |
763 | 763 | if ((check2 == check2)) | |
764 | 764 | then { | |
765 | 765 | let pairSettingValue = makeString(["%s%s%s", maxLeverage, initialMargin, maintenanceMargin], separator) | |
766 | 766 | let invocations = [invoke(factoryAddress, "stringEntry", [kPairPricesListKey(amountAsset, priceAsset), makeString(newList, separator)], nil), invoke(factoryAddress, "stringEntry", [kPairSettingsKey(amountAsset, priceAsset, price), pairSettingValue], nil)] | |
767 | 767 | $Tuple2(nil, invocations) | |
768 | 768 | } | |
769 | 769 | else throw("Strict value is not equal to itself.") | |
770 | 770 | } | |
771 | 771 | else throw("Strict value is not equal to itself.") | |
772 | 772 | } | |
773 | 773 | ||
774 | 774 | ||
775 | 775 | ||
776 | 776 | @Callable(i) | |
777 | 777 | func deletePairSettings (callerPublicKey,args) = { | |
778 | 778 | let checks = [mustFactory(i.caller), mustAdmin(callerPublicKey)] | |
779 | 779 | if ((checks == checks)) | |
780 | 780 | then { | |
781 | 781 | let amountAsset = parseAssetId(args[0]) | |
782 | 782 | let priceAsset = parseAssetId(args[1]) | |
783 | 783 | let price = args[2] | |
784 | 784 | let settingsKey = kPairSettingsKey(amountAsset, priceAsset, price) | |
785 | 785 | let pairPricesListKey = kPairPricesListKey(amountAsset, priceAsset) | |
786 | 786 | let pricesList = getPairPricesList(amountAsset, priceAsset) | |
787 | 787 | let newList = match indexOf(pricesList, price) { | |
788 | 788 | case ind: Int => | |
789 | 789 | removeByIndex(pricesList, ind) | |
790 | 790 | case _ => | |
791 | 791 | pricesList | |
792 | 792 | } | |
793 | 793 | let invocations = [invoke(factoryAddress, "deleteEntry", [settingsKey], nil), if ((size(newList) == 0)) | |
794 | 794 | then invoke(factoryAddress, "deleteEntry", [kPairPricesListKey(amountAsset, priceAsset)], nil) | |
795 | 795 | else invoke(factoryAddress, "stringEntry", [kPairPricesListKey(amountAsset, priceAsset), makeString(newList, separator)], nil)] | |
796 | 796 | $Tuple2(nil, invocations) | |
797 | 797 | } | |
798 | 798 | else throw("Strict value is not equal to itself.") | |
799 | 799 | } | |
800 | 800 | ||
801 | 801 | ||
802 | 802 | @Verifier(tx) | |
803 | 803 | func verify () = if (if (isDefined(factoryAddressOption)) | |
804 | 804 | then isDefined(getString(factoryAddress, kMultisig)) | |
805 | 805 | else false) | |
806 | 806 | then match getString(factoryAddress, kMultisig) { | |
807 | 807 | case multisig: String => | |
808 | 808 | let statusKey = kStatus(toString(this), toBase58String(tx.id)) | |
809 | 809 | let status = valueOrElse(getBoolean(addressFromStringValue(multisig), statusKey), false) | |
810 | 810 | status | |
811 | 811 | case _ => | |
812 | 812 | false | |
813 | 813 | } | |
814 | 814 | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
815 | 815 |
github/deemru/w8io/026f985 84.46 ms ◑