tx · 4nXj1QNCDqkbazwVwiK3g7BYJAx814Jmx574L4dBXxa9 3N3kKNoJohjVQYNLTrYTGTesr3nq3PZNh37: -0.02700000 Waves 2024.07.09 15:51 [3186503] smart account 3N3kKNoJohjVQYNLTrYTGTesr3nq3PZNh37 > SELF 0.00000000 Waves
{ "type": 13, "id": "4nXj1QNCDqkbazwVwiK3g7BYJAx814Jmx574L4dBXxa9", "fee": 2700000, "feeAssetId": null, "timestamp": 1720529526507, "version": 1, "sender": "3N3kKNoJohjVQYNLTrYTGTesr3nq3PZNh37", "senderPublicKey": "vmMXxwQAMUAoisvL193ptPiTtaWQqL5YNu2zs1ouTbY", "proofs": [ "27RVpTiAQHs8PuHxU4nKJRp4GR9ATCYBKzUFwMTiHAeeQY6236PpCUNPAMdNBpik6WiqKMZBocQ6GR1sua3BjJJR" ], "script": "base64:BwJJCAISAwoBCBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGFoACXNlcGFyYXRvcgICX18AB2NoYWluSWQJAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEACGNoYWluSWRXAQFXABBjb250cmFjdEZpbGVuYW1lAhdmdXR1cmVzX2NhbGN1bGF0b3IucmlkZQAFbXVsdDgAgMLXLwAMbXVsdDE4QmlnSW50CQC2AgEAgICQu7rWrfANAA13YXZlc0RlY2ltYWxzAAgADHVzZHREZWNpbWFscwAGAAt3YXZlc1N0cmluZwIFV0FWRVMADXF1ZXVlSXRlbVNpemUAIAAEYmlnMAkAtgIBAAAACWtNdWx0aXNpZwIMJXNfX211bHRpc2lnAQdrU3RhdHVzAgRkYXBwBHR4SWQJALkJAgkAzAgCAgolc19fc3RhdHVzCQDMCAIFBGRhcHAJAMwIAgUEdHhJZAUDbmlsBQlzZXBhcmF0b3IACWtTaHV0ZG93bgIMJXNfX3NodXRkb3duAAtrUHVibGljS2V5cwIOJXNfX3B1YmxpY0tleXMAEWtNYXRjaGVyUHVibGljS2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AAECBQckbWF0Y2gwAgZTdHJpbmcECG11bHRpc2lnBQckbWF0Y2gwBAlzdGF0dXNLZXkJAQdrU3RhdHVzAgkApQgBBQR0aGlzCQDYBAEIBQJ0eAJpZAQGc3RhdHVzCQELdmFsdWVPckVsc2UCCQCbCAIJARFAZXh0ck5hdGl2ZSgxMDYyKQEFCG11bHRpc2lnBQlzdGF0dXNLZXkHBQZzdGF0dXMHCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5+sM2KA==", "chainId": 84, "height": 3186503, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HTfawEvDjXoyAAMqobWkMwKdrf1whxkMw35grEAo9vjY Next: BoQFhvXxcDFC6HT6meRxoiq2Mn8VqVAP1UhTGCvLx69w Diff:
Old | New | Differences | |
---|---|---|---|
321 | 321 | let leverage = valueOrErrorMessage(getInteger(factoryAddress, kLeverage(accountAddress)), wrapErr("leverage should be defined")) | |
322 | 322 | let requestId = getRequestId(accountAddress) | |
323 | 323 | let accountPublicKey = valueOrErrorMessage(getBinary(factoryAddress, kRequestIdToAccountPublicKey(requestId)), "kRequestIdToAccountPublicKey not found") | |
324 | - | let deposited = | |
324 | + | let deposited = valueOrElse(depositedOption(accountAddress), 0) | |
325 | 325 | let currentPrice = toX18(getCurrentPrice(amountAssetId), pow10Decimals(priceAssetId)) | |
326 | - | let creditA = | |
327 | - | let creditB = | |
326 | + | let creditA = valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, amountAssetId)), 0) | |
327 | + | let creditB = valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, priceAssetId)), 0) | |
328 | 328 | let status = valueOrErrorMessage(getInteger(factoryAddress, kRequestStatus(requestId)), ("status not found. RequestId = " + toBase58String(requestId))) | |
329 | 329 | $Tuple12(assetIdToString(amountAssetId), assetIdToString(priceAssetId), toString(accountAddress), toBase58String(accountPublicKey), leverage, toBase58String(requestId), deposited, creditA, creditB, getAssetBalance(amountAssetId, accountAddress), getAssetBalance(priceAssetId, accountAddress), status) | |
330 | 330 | } | |
370 | 370 | else throwErr(("accounts limit is " + toString(accountsLimit())))] | |
371 | 371 | if ((checks == checks)) | |
372 | 372 | then { | |
373 | - | let $ | |
373 | + | let $t01328714820 = if ((size(accountsQueue()) == 0)) | |
374 | 374 | then $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)]) | |
375 | 375 | else { | |
376 | 376 | let accountPublicKey = take(accountsQueue(), queueItemSize) | |
378 | 378 | let creatorAddress = addressFromPublicKey(valueOrErrorMessage(getBinary(factoryAddress, kAccountCreatorPublicKey(accountAddress)), wrapErr("invalid creator public key"))) | |
379 | 379 | $Tuple2([ScriptTransfer(creatorAddress, rewardAmount(), unit)], [invoke(factoryAddress, "binaryEntry", [kAccountsQueue(), drop(accountsQueue(), queueItemSize)], nil), invoke(factoryAddress, "integerEntry", [kRequestStatus(requestId), REQUEST_STATUS_READY], nil), invoke(factoryAddress, "binaryEntry", [kRequestIdToAccountPublicKey(requestId), accountPublicKey], nil), invoke(factoryAddress, "stringEntry", [kAccountAddressToRequestId(accountAddress), toBase58String(requestId)], nil), invoke(factoryAddress, "integerEntry", [kLeverage(accountAddress), leverage], nil)]) | |
380 | 380 | } | |
381 | - | let actions = $ | |
382 | - | let factoryActions = $ | |
381 | + | let actions = $t01328714820._1 | |
382 | + | let factoryActions = $t01328714820._2 | |
383 | 383 | $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)])) | |
384 | 384 | } | |
385 | 385 | else throw("Strict value is not equal to itself.") | |
412 | 412 | else throwErr("invalid script")] | |
413 | 413 | if ((checks == checks)) | |
414 | 414 | then { | |
415 | - | let $ | |
415 | + | let $t01607517316 = if ((size(requestsQueue()) == 0)) | |
416 | 416 | then $Tuple2(nil, [invoke(factoryAddress, "binaryEntry", [kAccountsQueue(), (accountsQueue() + accountPublicKey)], nil)]) | |
417 | 417 | else { | |
418 | 418 | let requestId = take(requestsQueue(), queueItemSize) | |
419 | 419 | let leverage = valueOrErrorMessage(getInteger(factoryAddress, kRequestLeverage(requestId)), wrapErr("request's leverage is undefined")) | |
420 | 420 | $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)]) | |
421 | 421 | } | |
422 | - | let actions = $ | |
423 | - | let factoryActions = $ | |
422 | + | let actions = $t01607517316._1 | |
423 | + | let factoryActions = $t01607517316._2 | |
424 | 424 | $Tuple2(actions, (factoryActions ++ [invoke(factoryAddress, "binaryEntry", [kAccountCreatorPublicKey(accountAddress), creatorPublicKey], nil)])) | |
425 | 425 | } | |
426 | 426 | else throw("Strict value is not equal to itself.") | |
599 | 599 | if ((checks == checks)) | |
600 | 600 | then { | |
601 | 601 | let userAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid user address")) | |
602 | - | let userRequests = | |
602 | + | let userRequests = valueOrElse(getBinary(factoryAddress, kRequestsByOwner(userAddress)), base58'') | |
603 | 603 | let userRequestsNumber = (size(userRequests) / queueItemSize) | |
604 | 604 | let nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] | |
605 | 605 | func getAccountsData (acc,count) = { | |
606 | - | let $ | |
607 | - | let accDataList = $ | |
608 | - | let rawBytes = $ | |
609 | - | let maxSize = $ | |
606 | + | let $t02483724879 = acc | |
607 | + | let accDataList = $t02483724879._1 | |
608 | + | let rawBytes = $t02483724879._2 | |
609 | + | let maxSize = $t02483724879._3 | |
610 | 610 | if ((maxSize > count)) | |
611 | 611 | then { | |
612 | 612 | let requestId = take(rawBytes, queueItemSize) | |
619 | 619 | else acc | |
620 | 620 | } | |
621 | 621 | ||
622 | - | let $ | |
622 | + | let $t02538325482 = { | |
623 | 623 | let $l = nums | |
624 | 624 | let $s = size($l) | |
625 | 625 | let $acc0 = $Tuple3(nil, userRequests, userRequestsNumber) | |
633 | 633 | ||
634 | 634 | $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) | |
635 | 635 | } | |
636 | - | let accDataList = $ | |
637 | - | let _a = $ | |
638 | - | let _b = $ | |
636 | + | let accDataList = $t02538325482._1 | |
637 | + | let _a = $t02538325482._2 | |
638 | + | let _b = $t02538325482._3 | |
639 | 639 | $Tuple2(nil, accDataList) | |
640 | 640 | } | |
641 | 641 | 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 kMultisig = "%s__multisig" | |
27 | 27 | ||
28 | 28 | func kStatus (dapp,txId) = makeString(["%s__status", dapp, txId], separator) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | let kShutdown = "%s__shutdown" | |
32 | 32 | ||
33 | 33 | let kPublicKeys = "%s__publicKeys" | |
34 | 34 | ||
35 | 35 | let kMatcherPublicKey = "%s__matcherPublicKey" | |
36 | 36 | ||
37 | 37 | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), mult18BigInt, toBigInt(origScaleMult)) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), mult18BigInt)) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func validateAddress (address) = isDefined(addressFromString(address)) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func wrapErr (s) = ((contractFilename + ": ") + s) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func throwErr (s) = throw(wrapErr(s)) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func ensurePositive (v,s) = if ((v >= 0)) | |
53 | 53 | then v | |
54 | 54 | else throwErr((s + " value should be positive")) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func parseAssetId (input) = if ((input == wavesString)) | |
58 | 58 | then unit | |
59 | 59 | else fromBase58String(input) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func assetIdToString (input) = if ((input == unit)) | |
63 | 63 | then wavesString | |
64 | 64 | else toBase58String(value(input)) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func getAssetInfoOrFail (assetId) = valueOrErrorMessage(assetInfo(assetId), wrapErr("invalid asset info")) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func getAssetDecimalsOrFail (assetId) = match assetId { | |
71 | 71 | case _: Unit => | |
72 | 72 | wavesDecimals | |
73 | 73 | case assetId: ByteVector => | |
74 | 74 | getAssetInfoOrFail(assetId).decimals | |
75 | 75 | case _ => | |
76 | 76 | throw("Match error") | |
77 | 77 | } | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func getAssetBalance (assetId,address) = match assetId { | |
81 | 81 | case _: Unit => | |
82 | 82 | wavesBalance(address).available | |
83 | 83 | case assetId: ByteVector => | |
84 | 84 | assetBalance(address, assetId) | |
85 | 85 | case _ => | |
86 | 86 | throw("Match error") | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func pow10 (n) = pow(10, 0, n, 0, 0, DOWN) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func pow10Decimals (assetId) = pow10(getAssetDecimalsOrFail(assetId)) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | let kFactoryAddress = "%s__factoryAddress" | |
97 | 97 | ||
98 | 98 | let factoryAddressOption = match getString(this, kFactoryAddress) { | |
99 | 99 | case s: String => | |
100 | 100 | addressFromString(s) | |
101 | 101 | case _: Unit => | |
102 | 102 | unit | |
103 | 103 | case _ => | |
104 | 104 | throw("Match error") | |
105 | 105 | } | |
106 | 106 | ||
107 | 107 | let factoryAddress = valueOrErrorMessage(factoryAddressOption, wrapErr("invalid factory address")) | |
108 | 108 | ||
109 | 109 | let kUsdtAssetId = "%s__usdtAssetId" | |
110 | 110 | ||
111 | 111 | let usdtAssetIdOption = match getString(factoryAddress, kUsdtAssetId) { | |
112 | 112 | case s: String => | |
113 | 113 | parseAssetId(s) | |
114 | 114 | case _: Unit => | |
115 | 115 | unit | |
116 | 116 | case _ => | |
117 | 117 | throw("Match error") | |
118 | 118 | } | |
119 | 119 | ||
120 | 120 | let usdtAssetId = valueOrErrorMessage(usdtAssetIdOption, wrapErr("invalid usdt asset id")) | |
121 | 121 | ||
122 | 122 | let kPricesAddress = "%s__calculatorAddress" | |
123 | 123 | ||
124 | 124 | let shutdown = valueOrElse(getBoolean(factoryAddress, kShutdown), false) | |
125 | 125 | ||
126 | 126 | func mustAddress (caller,address) = if ((caller == address)) | |
127 | 127 | then true | |
128 | 128 | else throwErr("permission denied") | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func mustThis (caller) = mustAddress(caller, this) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func mustFactory (caller) = mustAddress(caller, factoryAddress) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func mustAdmin (callerPublicKey) = { | |
138 | 138 | let multisig = addressFromStringValue(getStringValue(factoryAddress, kMultisig)) | |
139 | 139 | let publicKeysList = split(getStringValue(multisig, kPublicKeys), separator) | |
140 | 140 | if (containsElement(publicKeysList, toBase58String(callerPublicKey))) | |
141 | 141 | then true | |
142 | 142 | else throwErr("not allowed") | |
143 | 143 | } | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | let kAccountScript = "%s__accountScript" | |
147 | 147 | ||
148 | 148 | func accountScript () = valueOrErrorMessage(getBinary(factoryAddress, kAccountScript), wrapErr("account script is not set")) | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | let kRewardAmount = "%s__rewardAmount" | |
152 | 152 | ||
153 | 153 | func rewardAmount () = valueOrErrorMessage(getInteger(factoryAddress, kRewardAmount), wrapErr("reward amount is not set")) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | let kAccountsLimit = "%s__accountsLimit" | |
157 | 157 | ||
158 | 158 | let accountsLimitDefault = 20 | |
159 | 159 | ||
160 | 160 | func accountsLimit () = valueOrElse(getInteger(factoryAddress, kAccountsLimit), accountsLimitDefault) | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func kDeposited (accountAddress) = makeString(["%s%s", "deposited", toString(accountAddress)], separator) | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func depositedOption (accountAddress) = getInteger(factoryAddress, kDeposited(accountAddress)) | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func kCredit (accountAddress,assetId) = makeString(["%s%s%s", "credit", toString(accountAddress), assetIdToString(assetId)], separator) | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func creditOption (accountAddress,assetId) = getInteger(factoryAddress, kCredit(accountAddress, assetId)) | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func kLeverage (accountAddress) = makeString(["%s%s", "leverage", toString(accountAddress)], separator) | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func kRequestLeverage (requestId) = makeString(["%s%s", "requestLeverage", toBase58String(requestId)], separator) | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func kSyntheticAssetId (baseAssetId) = makeString(["%s%s", "syntheticAssetId", assetIdToString(baseAssetId)], separator) | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func kBaseAssetId (syntheticAssetId) = makeString(["%s%s", "baseAssetId", assetIdToString(syntheticAssetId)], separator) | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | let REQUEST_STATUS_EMPTY = 0 | |
188 | 188 | ||
189 | 189 | let REQUEST_STATUS_READY = 1 | |
190 | 190 | ||
191 | 191 | func kRequestStatus (requestId) = makeString(["%s%s", toBase58String(requestId), "status"], separator) | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | func kAccountCreatorPublicKey (accountAddress) = makeString(["%s%s", toString(accountAddress), "creatorPublicKey"], separator) | |
195 | 195 | ||
196 | 196 | ||
197 | 197 | func kRequestOwnerPublicKey (requestId) = makeString(["%s%s", toBase58String(requestId), "ownerPublicKey"], separator) | |
198 | 198 | ||
199 | 199 | ||
200 | 200 | func kRequestAmountAssetId (requestId) = makeString(["%s%s", toBase58String(requestId), "amountAssetId"], separator) | |
201 | 201 | ||
202 | 202 | ||
203 | 203 | func kRequestPriceAssetId (requestId) = makeString(["%s%s", toBase58String(requestId), "priceAssetId"], separator) | |
204 | 204 | ||
205 | 205 | ||
206 | 206 | func kRequestIdToAccountPublicKey (requestId) = makeString(["%s%s", toBase58String(requestId), "requestIdToAccountPublicKey"], separator) | |
207 | 207 | ||
208 | 208 | ||
209 | 209 | func kAccountAddressToRequestId (accountAddress) = makeString(["%s%s", toString(accountAddress), "accountAddressToRequestId"], separator) | |
210 | 210 | ||
211 | 211 | ||
212 | 212 | func kRequestsQueue () = makeString(["%s", "requestsQueue"], separator) | |
213 | 213 | ||
214 | 214 | ||
215 | 215 | func requestsQueue () = valueOrElse(getBinary(factoryAddress, kRequestsQueue()), base58'') | |
216 | 216 | ||
217 | 217 | ||
218 | 218 | func kAccountsQueue () = makeString(["%s", "accountsQueue"], separator) | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | func accountsQueue () = valueOrElse(getBinary(factoryAddress, kAccountsQueue()), base58'') | |
222 | 222 | ||
223 | 223 | ||
224 | 224 | func kRequestsByOwner (ownerAddress) = makeString(["%s%s", "requests", toString(ownerAddress)], separator) | |
225 | 225 | ||
226 | 226 | ||
227 | 227 | func requestsByOwner (ownerAddress) = valueOrElse(getBinary(factoryAddress, kRequestsByOwner(ownerAddress)), base58'') | |
228 | 228 | ||
229 | 229 | ||
230 | 230 | func kPairAllowed (amountAssetId,priceAssetId) = makeString(["%s%s%s", assetIdToString(amountAssetId), assetIdToString(priceAssetId), "pairAllowed"], separator) | |
231 | 231 | ||
232 | 232 | ||
233 | 233 | func pairAllowed (amountAssetId,priceAssetId) = valueOrElse(getBoolean(factoryAddress, kPairAllowed(amountAssetId, priceAssetId)), false) | |
234 | 234 | ||
235 | 235 | ||
236 | 236 | func kPrice (assetId) = makeString(["%s", assetIdToString(assetId)], separator) | |
237 | 237 | ||
238 | 238 | ||
239 | 239 | func getCurrentPrice (assetId) = { | |
240 | 240 | let matcherPublicKey = fromBase58String(valueOrErrorMessage(getString(factoryAddress, kMatcherPublicKey), wrapErr("invalid matcher public key"))) | |
241 | 241 | let matcherAddress = addressFromPublicKey(matcherPublicKey) | |
242 | 242 | let price = valueOrErrorMessage(getInteger(matcherAddress, kPrice(assetId)), wrapErr(("invalid price, assetId = " + assetIdToString(assetId)))) | |
243 | 243 | price | |
244 | 244 | } | |
245 | 245 | ||
246 | 246 | ||
247 | 247 | func calcTotalCredit (creditA,creditB,currentPrice) = (fraction(creditA, currentPrice, mult18BigInt) + creditB) | |
248 | 248 | ||
249 | 249 | ||
250 | 250 | func calcTotalBalance (balanceA,balanceB,currentPrice) = (fraction(balanceA, currentPrice, mult18BigInt) + balanceB) | |
251 | 251 | ||
252 | 252 | ||
253 | 253 | func calcPnl (totalBalance,totalCredit) = (totalBalance - totalCredit) | |
254 | 254 | ||
255 | 255 | ||
256 | 256 | func calcCreditAvailable (deposit,leverage,totalCredit) = (fraction(deposit, leverage, mult18BigInt) - totalCredit) | |
257 | 257 | ||
258 | 258 | ||
259 | 259 | func calcRealInCredit (credit,balance) = if ((credit > big0)) | |
260 | 260 | then (credit - balance) | |
261 | 261 | else big0 | |
262 | 262 | ||
263 | 263 | ||
264 | 264 | func calcFree (credit,balance) = if ((credit > big0)) | |
265 | 265 | then (balance - credit) | |
266 | 266 | else big0 | |
267 | 267 | ||
268 | 268 | ||
269 | 269 | func calcShortPrice (free,realInCredit) = if ((realInCredit > big0)) | |
270 | 270 | then max([big0, fraction(free, mult18BigInt, realInCredit)]) | |
271 | 271 | else big0 | |
272 | 272 | ||
273 | 273 | ||
274 | 274 | func calcLongPrice (free,realInCredit) = if ((realInCredit > big0)) | |
275 | 275 | then max([big0, fraction(realInCredit, mult18BigInt, free)]) | |
276 | 276 | else big0 | |
277 | 277 | ||
278 | 278 | ||
279 | 279 | func calcStartMargin (realInCreditA,realInCreditB,currentPrice,settingsMargin) = fraction((fraction(realInCreditA, currentPrice, mult18BigInt) + realInCreditB), settingsMargin, mult18BigInt) | |
280 | 280 | ||
281 | 281 | ||
282 | 282 | func calcMarginSupply (settingsMarginSupply,settingsMargin,startMargin) = fraction(settingsMarginSupply, startMargin, settingsMargin) | |
283 | 283 | ||
284 | 284 | ||
285 | 285 | func calcLiquidationPrice (deposit,marginSupply,realInCreditA,realInCreditB,shortPrice,longPrice) = { | |
286 | 286 | let liquidationPriceA = if ((realInCreditA > big0)) | |
287 | 287 | then (((deposit - marginSupply) / realInCreditA) + shortPrice) | |
288 | 288 | else big0 | |
289 | 289 | let liquidationPriceB = if ((realInCreditB > big0)) | |
290 | 290 | then (longPrice - ((deposit - marginSupply) / (realInCreditA / longPrice))) | |
291 | 291 | else big0 | |
292 | 292 | (liquidationPriceA + liquidationPriceB) | |
293 | 293 | } | |
294 | 294 | ||
295 | 295 | ||
296 | 296 | func getRequestId (accountAddress) = { | |
297 | 297 | let requestId = fromBase58String(valueOrErrorMessage(getString(factoryAddress, kAccountAddressToRequestId(accountAddress)), wrapErr("invalid account address: request id is undefined"))) | |
298 | 298 | requestId | |
299 | 299 | } | |
300 | 300 | ||
301 | 301 | ||
302 | 302 | func getAccountAssets (accountAddress) = { | |
303 | 303 | let requestId = getRequestId(accountAddress) | |
304 | 304 | let amountAssetId = parseAssetId(valueOrErrorMessage(getString(factoryAddress, kRequestAmountAssetId(requestId)), wrapErr("invalid amount asset id"))) | |
305 | 305 | let priceAssetId = parseAssetId(valueOrErrorMessage(getString(factoryAddress, kRequestPriceAssetId(requestId)), wrapErr("invalid amount price id"))) | |
306 | 306 | $Tuple2(amountAssetId, priceAssetId) | |
307 | 307 | } | |
308 | 308 | ||
309 | 309 | ||
310 | 310 | func getAccountOwnerPublicKey (accountAddress) = { | |
311 | 311 | let requestId = getRequestId(accountAddress) | |
312 | 312 | let requestOwnerPublicKey = valueOrErrorMessage(getBinary(factoryAddress, kRequestOwnerPublicKey(requestId)), wrapErr("invalid amount asset id")) | |
313 | 313 | requestOwnerPublicKey | |
314 | 314 | } | |
315 | 315 | ||
316 | 316 | ||
317 | 317 | func getAccountInfoInternal (accountAddress) = { | |
318 | 318 | let $t01038510453 = getAccountAssets(accountAddress) | |
319 | 319 | let amountAssetId = $t01038510453._1 | |
320 | 320 | let priceAssetId = $t01038510453._2 | |
321 | 321 | let leverage = valueOrErrorMessage(getInteger(factoryAddress, kLeverage(accountAddress)), wrapErr("leverage should be defined")) | |
322 | 322 | let requestId = getRequestId(accountAddress) | |
323 | 323 | let accountPublicKey = valueOrErrorMessage(getBinary(factoryAddress, kRequestIdToAccountPublicKey(requestId)), "kRequestIdToAccountPublicKey not found") | |
324 | - | let deposited = | |
324 | + | let deposited = valueOrElse(depositedOption(accountAddress), 0) | |
325 | 325 | let currentPrice = toX18(getCurrentPrice(amountAssetId), pow10Decimals(priceAssetId)) | |
326 | - | let creditA = | |
327 | - | let creditB = | |
326 | + | let creditA = valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, amountAssetId)), 0) | |
327 | + | let creditB = valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, priceAssetId)), 0) | |
328 | 328 | let status = valueOrErrorMessage(getInteger(factoryAddress, kRequestStatus(requestId)), ("status not found. RequestId = " + toBase58String(requestId))) | |
329 | 329 | $Tuple12(assetIdToString(amountAssetId), assetIdToString(priceAssetId), toString(accountAddress), toBase58String(accountPublicKey), leverage, toBase58String(requestId), deposited, creditA, creditB, getAssetBalance(amountAssetId, accountAddress), getAssetBalance(priceAssetId, accountAddress), status) | |
330 | 330 | } | |
331 | 331 | ||
332 | 332 | ||
333 | 333 | @Callable(i) | |
334 | 334 | func init (factoryAddressStr) = { | |
335 | 335 | let checkCaller = mustThis(i.caller) | |
336 | 336 | if ((checkCaller == checkCaller)) | |
337 | 337 | then $Tuple2([StringEntry(kFactoryAddress, factoryAddressStr)], unit) | |
338 | 338 | else throw("Strict value is not equal to itself.") | |
339 | 339 | } | |
340 | 340 | ||
341 | 341 | ||
342 | 342 | ||
343 | 343 | @Callable(i) | |
344 | 344 | func requestAccount (callerPublicKey,args) = { | |
345 | 345 | let ckecks = [if (!(shutdown)) | |
346 | 346 | then true | |
347 | 347 | else throwErr("not allowed"), mustFactory(i.caller)] | |
348 | 348 | if ((ckecks == ckecks)) | |
349 | 349 | then { | |
350 | 350 | let amountAssetIdStr = args[0] | |
351 | 351 | let priceAssetIdStr = args[1] | |
352 | 352 | let leverage = valueOrErrorMessage(parseInt(args[2]), wrapErr("invalid leverage")) | |
353 | 353 | let userAddress = addressFromPublicKey(callerPublicKey) | |
354 | 354 | let requestId = sha256(((userAddress.bytes + fromBase58String(amountAssetIdStr)) + fromBase58String(priceAssetIdStr))) | |
355 | 355 | let amountAssetId = parseAssetId(amountAssetIdStr) | |
356 | 356 | let priceAssetId = parseAssetId(priceAssetIdStr) | |
357 | 357 | let userRequestsNumber = (size(kRequestsByOwner(userAddress)) / queueItemSize) | |
358 | 358 | let checks = [if ((size(i.payments) == 1)) | |
359 | 359 | then true | |
360 | 360 | else throwErr("1 payment is required"), if ((i.payments[0].assetId == unit)) | |
361 | 361 | then true | |
362 | 362 | else throwErr("invalid asset"), if ((i.payments[0].amount == rewardAmount())) | |
363 | 363 | then true | |
364 | 364 | else throwErr("invalid amount"), if (pairAllowed(amountAssetId, priceAssetId)) | |
365 | 365 | then true | |
366 | 366 | else throwErr("pair is not allowed"), if ((getInteger(factoryAddress, kRequestStatus(requestId)) == unit)) | |
367 | 367 | then true | |
368 | 368 | else throwErr("account is already exists"), if ((accountsLimit() > userRequestsNumber)) | |
369 | 369 | then true | |
370 | 370 | else throwErr(("accounts limit is " + toString(accountsLimit())))] | |
371 | 371 | if ((checks == checks)) | |
372 | 372 | then { | |
373 | - | let $ | |
373 | + | let $t01328714820 = if ((size(accountsQueue()) == 0)) | |
374 | 374 | then $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)]) | |
375 | 375 | else { | |
376 | 376 | let accountPublicKey = take(accountsQueue(), queueItemSize) | |
377 | 377 | let accountAddress = addressFromPublicKey(accountPublicKey) | |
378 | 378 | let creatorAddress = addressFromPublicKey(valueOrErrorMessage(getBinary(factoryAddress, kAccountCreatorPublicKey(accountAddress)), wrapErr("invalid creator public key"))) | |
379 | 379 | $Tuple2([ScriptTransfer(creatorAddress, rewardAmount(), unit)], [invoke(factoryAddress, "binaryEntry", [kAccountsQueue(), drop(accountsQueue(), queueItemSize)], nil), invoke(factoryAddress, "integerEntry", [kRequestStatus(requestId), REQUEST_STATUS_READY], nil), invoke(factoryAddress, "binaryEntry", [kRequestIdToAccountPublicKey(requestId), accountPublicKey], nil), invoke(factoryAddress, "stringEntry", [kAccountAddressToRequestId(accountAddress), toBase58String(requestId)], nil), invoke(factoryAddress, "integerEntry", [kLeverage(accountAddress), leverage], nil)]) | |
380 | 380 | } | |
381 | - | let actions = $ | |
382 | - | let factoryActions = $ | |
381 | + | let actions = $t01328714820._1 | |
382 | + | let factoryActions = $t01328714820._2 | |
383 | 383 | $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)])) | |
384 | 384 | } | |
385 | 385 | else throw("Strict value is not equal to itself.") | |
386 | 386 | } | |
387 | 387 | else throw("Strict value is not equal to itself.") | |
388 | 388 | } | |
389 | 389 | ||
390 | 390 | ||
391 | 391 | ||
392 | 392 | @Callable(i) | |
393 | 393 | func addAccount (callerPublicKey,args) = { | |
394 | 394 | let ckecks = [if (!(shutdown)) | |
395 | 395 | then true | |
396 | 396 | else throwErr("not allowed"), mustFactory(i.caller)] | |
397 | 397 | if ((ckecks == ckecks)) | |
398 | 398 | then { | |
399 | 399 | let creatorPublicKey = fromBase58String(args[0]) | |
400 | 400 | let accountPublicKey = callerPublicKey | |
401 | 401 | let accountAddress = addressFromPublicKey(callerPublicKey) | |
402 | 402 | let creatorAddress = addressFromPublicKey(creatorPublicKey) | |
403 | 403 | let checks = [if ((getBinary(factoryAddress, kAccountCreatorPublicKey(accountAddress)) == unit)) | |
404 | 404 | then true | |
405 | 405 | else throwErr("account is already exists"), if ( match scriptHash(accountAddress) { | |
406 | 406 | case b: ByteVector => | |
407 | 407 | (b == blake2b256_32Kb(accountScript())) | |
408 | 408 | case _ => | |
409 | 409 | false | |
410 | 410 | }) | |
411 | 411 | then true | |
412 | 412 | else throwErr("invalid script")] | |
413 | 413 | if ((checks == checks)) | |
414 | 414 | then { | |
415 | - | let $ | |
415 | + | let $t01607517316 = if ((size(requestsQueue()) == 0)) | |
416 | 416 | then $Tuple2(nil, [invoke(factoryAddress, "binaryEntry", [kAccountsQueue(), (accountsQueue() + accountPublicKey)], nil)]) | |
417 | 417 | else { | |
418 | 418 | let requestId = take(requestsQueue(), queueItemSize) | |
419 | 419 | let leverage = valueOrErrorMessage(getInteger(factoryAddress, kRequestLeverage(requestId)), wrapErr("request's leverage is undefined")) | |
420 | 420 | $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)]) | |
421 | 421 | } | |
422 | - | let actions = $ | |
423 | - | let factoryActions = $ | |
422 | + | let actions = $t01607517316._1 | |
423 | + | let factoryActions = $t01607517316._2 | |
424 | 424 | $Tuple2(actions, (factoryActions ++ [invoke(factoryAddress, "binaryEntry", [kAccountCreatorPublicKey(accountAddress), creatorPublicKey], nil)])) | |
425 | 425 | } | |
426 | 426 | else throw("Strict value is not equal to itself.") | |
427 | 427 | } | |
428 | 428 | else throw("Strict value is not equal to itself.") | |
429 | 429 | } | |
430 | 430 | ||
431 | 431 | ||
432 | 432 | ||
433 | 433 | @Callable(i) | |
434 | 434 | func deposit (callerPublicKey,args) = { | |
435 | 435 | let payment = i.payments[0] | |
436 | 436 | let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address")) | |
437 | 437 | let ckecks = [if (!(shutdown)) | |
438 | 438 | then true | |
439 | 439 | else throwErr("not allowed"), mustFactory(i.caller), if ((size(i.payments) == 1)) | |
440 | 440 | then true | |
441 | 441 | else throwErr("1 payment is required"), if ((payment.assetId == usdtAssetId)) | |
442 | 442 | then true | |
443 | 443 | else throwErr("invalid asset"), if ((getInteger(factoryAddress, kRequestStatus(getRequestId(accountAddress))) == REQUEST_STATUS_READY)) | |
444 | 444 | then true | |
445 | 445 | else throwErr("account is not ready")] | |
446 | 446 | if ((ckecks == ckecks)) | |
447 | 447 | then { | |
448 | 448 | let actions = [ScriptTransfer(accountAddress, payment.amount, payment.assetId)] | |
449 | 449 | let factoryActions = [invoke(factoryAddress, "integerEntry", [kDeposited(accountAddress), (valueOrElse(depositedOption(accountAddress), 0) + payment.amount)], nil)] | |
450 | 450 | $Tuple2(actions, factoryActions) | |
451 | 451 | } | |
452 | 452 | else throw("Strict value is not equal to itself.") | |
453 | 453 | } | |
454 | 454 | ||
455 | 455 | ||
456 | 456 | ||
457 | 457 | @Callable(i) | |
458 | 458 | func withdraw (callerPublicKey,args) = { | |
459 | 459 | let ckecks = [if (!(shutdown)) | |
460 | 460 | then true | |
461 | 461 | else throwErr("not allowed"), mustFactory(i.caller)] | |
462 | 462 | if ((ckecks == ckecks)) | |
463 | 463 | then { | |
464 | 464 | let userAddress = addressFromPublicKey(callerPublicKey) | |
465 | 465 | let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address")) | |
466 | 466 | let amount = valueOrErrorMessage(parseInt(args[1]), wrapErr("invalid amount")) | |
467 | 467 | let assetId = parseAssetId(args[2]) | |
468 | 468 | let invocations = [invoke(accountAddress, "transferAsset", [userAddress.bytes, amount, assetId], nil)] | |
469 | 469 | $Tuple2(nil, invocations) | |
470 | 470 | } | |
471 | 471 | else throw("Strict value is not equal to itself.") | |
472 | 472 | } | |
473 | 473 | ||
474 | 474 | ||
475 | 475 | ||
476 | 476 | @Callable(i) | |
477 | 477 | func borrow (callerPublicKey,args) = { | |
478 | 478 | let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address")) | |
479 | 479 | let assetIdRequested = parseAssetId(args[1]) | |
480 | 480 | let amountRequested = ensurePositive(valueOrErrorMessage(parseInt(args[2]), wrapErr("invalid requested amount")), "requested amount") | |
481 | 481 | let accountOwnerPublicKey = getAccountOwnerPublicKey(accountAddress) | |
482 | 482 | let userAddress = addressFromPublicKey(callerPublicKey) | |
483 | 483 | let ckecks = [if (!(shutdown)) | |
484 | 484 | then true | |
485 | 485 | else throwErr("not allowed"), mustFactory(i.caller), if ((callerPublicKey == accountOwnerPublicKey)) | |
486 | 486 | then true | |
487 | 487 | else throwErr("can be called by account owner only")] | |
488 | 488 | if ((ckecks == ckecks)) | |
489 | 489 | then { | |
490 | 490 | let amountAssetId = getAccountAssets(accountAddress)._1 | |
491 | 491 | let deposited = toX18(valueOrElse(depositedOption(accountAddress), 0), pow10Decimals(usdtAssetId)) | |
492 | 492 | let currentPrice = toX18(getCurrentPrice(amountAssetId), pow10Decimals(usdtAssetId)) | |
493 | 493 | let creditA = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, amountAssetId)), 0), pow10Decimals(amountAssetId)) | |
494 | 494 | let creditB = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, usdtAssetId)), 0), pow10Decimals(usdtAssetId)) | |
495 | 495 | let totalCredit = calcTotalCredit(creditA, creditB, currentPrice) | |
496 | 496 | let leverage = toX18(valueOrErrorMessage(getInteger(factoryAddress, kLeverage(accountAddress)), wrapErr("leverage should be defined")), 1) | |
497 | 497 | let creditAvailableUsdt = calcCreditAvailable(deposited, leverage, totalCredit) | |
498 | 498 | let creditAvailable = if ((assetIdRequested == amountAssetId)) | |
499 | 499 | then fromX18(fraction(creditAvailableUsdt, mult18BigInt, currentPrice), pow10Decimals(amountAssetId)) | |
500 | 500 | else if ((assetIdRequested == usdtAssetId)) | |
501 | 501 | then fromX18(creditAvailableUsdt, pow10Decimals(usdtAssetId)) | |
502 | 502 | else throwErr("invalid requested asset id") | |
503 | 503 | let syntheticAssetId = parseAssetId(valueOrErrorMessage(getString(factoryAddress, kSyntheticAssetId(assetIdRequested)), wrapErr("synthetic asset for requested asset is undefined"))) | |
504 | 504 | let amountToSend = if ((creditAvailable >= amountRequested)) | |
505 | 505 | then amountRequested | |
506 | 506 | else throwErr(("credit available = " + toString(creditAvailable))) | |
507 | 507 | let factoryActions = [invoke(factoryAddress, "integerEntry", [kCredit(accountAddress, assetIdRequested), (valueOrElse(creditOption(accountAddress, assetIdRequested), 0) + amountToSend)], nil), invoke(factoryAddress, "transferAsset", [userAddress.bytes, amountToSend, syntheticAssetId], nil)] | |
508 | 508 | $Tuple2(nil, [factoryActions, creditAvailable]) | |
509 | 509 | } | |
510 | 510 | else throw("Strict value is not equal to itself.") | |
511 | 511 | } | |
512 | 512 | ||
513 | 513 | ||
514 | 514 | ||
515 | 515 | @Callable(i) | |
516 | 516 | func repay (callerPublicKey,args) = { | |
517 | 517 | let ckecks = [if (!(shutdown)) | |
518 | 518 | then true | |
519 | 519 | else throwErr("not allowed"), mustFactory(i.caller)] | |
520 | 520 | if ((ckecks == ckecks)) | |
521 | 521 | then $Tuple2(nil, unit) | |
522 | 522 | else throw("Strict value is not equal to itself.") | |
523 | 523 | } | |
524 | 524 | ||
525 | 525 | ||
526 | 526 | ||
527 | 527 | @Callable(i) | |
528 | 528 | func setPairAllowance (callerPublicKey,args) = { | |
529 | 529 | let ckecks = [if (!(shutdown)) | |
530 | 530 | then true | |
531 | 531 | else throwErr("not allowed"), mustFactory(i.caller), mustAdmin(callerPublicKey)] | |
532 | 532 | if ((ckecks == ckecks)) | |
533 | 533 | then { | |
534 | 534 | let amountAssetIdStr = args[0] | |
535 | 535 | let priceAssetIdStr = args[1] | |
536 | 536 | let allowStr = args[2] | |
537 | 537 | let amountAssetId = parseAssetId(amountAssetIdStr) | |
538 | 538 | let priceAssetId = parseAssetId(priceAssetIdStr) | |
539 | 539 | let allow = (allowStr == "true") | |
540 | 540 | let invocations = [invoke(factoryAddress, "booleanEntry", [kPairAllowed(amountAssetId, priceAssetId), allow], nil)] | |
541 | 541 | $Tuple2(nil, invocations) | |
542 | 542 | } | |
543 | 543 | else throw("Strict value is not equal to itself.") | |
544 | 544 | } | |
545 | 545 | ||
546 | 546 | ||
547 | 547 | ||
548 | 548 | @Callable(i) | |
549 | 549 | func addSyntheticAsset (callerPublicKey,args) = { | |
550 | 550 | let baseAssetId = parseAssetId(args[0]) | |
551 | 551 | let syntheticAssetId = parseAssetId(args[1]) | |
552 | 552 | let ckecks = [if (!(shutdown)) | |
553 | 553 | then true | |
554 | 554 | else throwErr("not allowed"), mustFactory(i.caller), mustAdmin(callerPublicKey), if ((getString(factoryAddress, kSyntheticAssetId(baseAssetId)) == unit)) | |
555 | 555 | then true | |
556 | 556 | else throwErr("invalid base asset"), if ((getString(factoryAddress, kBaseAssetId(syntheticAssetId)) == unit)) | |
557 | 557 | then true | |
558 | 558 | else throwErr("invalid synthetic asset")] | |
559 | 559 | if ((ckecks == ckecks)) | |
560 | 560 | then { | |
561 | 561 | let invocations = [invoke(factoryAddress, "stringEntry", [kSyntheticAssetId(baseAssetId), assetIdToString(syntheticAssetId)], nil), invoke(factoryAddress, "stringEntry", [kBaseAssetId(syntheticAssetId), assetIdToString(baseAssetId)], nil)] | |
562 | 562 | $Tuple2(nil, invocations) | |
563 | 563 | } | |
564 | 564 | else throw("Strict value is not equal to itself.") | |
565 | 565 | } | |
566 | 566 | ||
567 | 567 | ||
568 | 568 | ||
569 | 569 | @Callable(i) | |
570 | 570 | func doShutdown (callerPublicKey,args) = { | |
571 | 571 | let checks = [mustFactory(i.caller), mustAdmin(callerPublicKey)] | |
572 | 572 | if ((checks == checks)) | |
573 | 573 | then { | |
574 | 574 | let invocations = [invoke(factoryAddress, "booleanEntry", [kShutdown, true], nil)] | |
575 | 575 | $Tuple2(nil, invocations) | |
576 | 576 | } | |
577 | 577 | else throw("Strict value is not equal to itself.") | |
578 | 578 | } | |
579 | 579 | ||
580 | 580 | ||
581 | 581 | ||
582 | 582 | @Callable(i) | |
583 | 583 | func getAccountInfoREADONLY (callerPublicKey,args) = { | |
584 | 584 | let checks = [mustFactory(i.caller)] | |
585 | 585 | if ((checks == checks)) | |
586 | 586 | then { | |
587 | 587 | let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address")) | |
588 | 588 | let data = getAccountInfoInternal(accountAddress) | |
589 | 589 | $Tuple2(nil, data) | |
590 | 590 | } | |
591 | 591 | else throw("Strict value is not equal to itself.") | |
592 | 592 | } | |
593 | 593 | ||
594 | 594 | ||
595 | 595 | ||
596 | 596 | @Callable(i) | |
597 | 597 | func getUserInfoREADONLY (callerPublicKey,args) = { | |
598 | 598 | let checks = [mustFactory(i.caller)] | |
599 | 599 | if ((checks == checks)) | |
600 | 600 | then { | |
601 | 601 | let userAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid user address")) | |
602 | - | let userRequests = | |
602 | + | let userRequests = valueOrElse(getBinary(factoryAddress, kRequestsByOwner(userAddress)), base58'') | |
603 | 603 | let userRequestsNumber = (size(userRequests) / queueItemSize) | |
604 | 604 | let nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] | |
605 | 605 | func getAccountsData (acc,count) = { | |
606 | - | let $ | |
607 | - | let accDataList = $ | |
608 | - | let rawBytes = $ | |
609 | - | let maxSize = $ | |
606 | + | let $t02483724879 = acc | |
607 | + | let accDataList = $t02483724879._1 | |
608 | + | let rawBytes = $t02483724879._2 | |
609 | + | let maxSize = $t02483724879._3 | |
610 | 610 | if ((maxSize > count)) | |
611 | 611 | then { | |
612 | 612 | let requestId = take(rawBytes, queueItemSize) | |
613 | 613 | let newRawBytes = drop(rawBytes, queueItemSize) | |
614 | 614 | let accountPublicKey = valueOrErrorMessage(getBinary(factoryAddress, kRequestIdToAccountPublicKey(requestId)), "kRequestIdToAccountPublicKey not found") | |
615 | 615 | let accountAddress = addressFromPublicKey(accountPublicKey) | |
616 | 616 | let data = getAccountInfoInternal(accountAddress) | |
617 | 617 | $Tuple3((accDataList :+ data), newRawBytes, maxSize) | |
618 | 618 | } | |
619 | 619 | else acc | |
620 | 620 | } | |
621 | 621 | ||
622 | - | let $ | |
622 | + | let $t02538325482 = { | |
623 | 623 | let $l = nums | |
624 | 624 | let $s = size($l) | |
625 | 625 | let $acc0 = $Tuple3(nil, userRequests, userRequestsNumber) | |
626 | 626 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
627 | 627 | then $a | |
628 | 628 | else getAccountsData($a, $l[$i]) | |
629 | 629 | ||
630 | 630 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
631 | 631 | then $a | |
632 | 632 | else throw("List size exceeds 20") | |
633 | 633 | ||
634 | 634 | $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) | |
635 | 635 | } | |
636 | - | let accDataList = $ | |
637 | - | let _a = $ | |
638 | - | let _b = $ | |
636 | + | let accDataList = $t02538325482._1 | |
637 | + | let _a = $t02538325482._2 | |
638 | + | let _b = $t02538325482._3 | |
639 | 639 | $Tuple2(nil, accDataList) | |
640 | 640 | } | |
641 | 641 | else throw("Strict value is not equal to itself.") | |
642 | 642 | } | |
643 | 643 | ||
644 | 644 | ||
645 | 645 | @Verifier(tx) | |
646 | 646 | func verify () = if (if (isDefined(factoryAddressOption)) | |
647 | 647 | then isDefined(getString(factoryAddress, kMultisig)) | |
648 | 648 | else false) | |
649 | 649 | then match getString(factoryAddress, kMultisig) { | |
650 | 650 | case multisig: String => | |
651 | 651 | let statusKey = kStatus(toString(this), toBase58String(tx.id)) | |
652 | 652 | let status = valueOrElse(getBoolean(addressFromStringValue(multisig), statusKey), false) | |
653 | 653 | status | |
654 | 654 | case _ => | |
655 | 655 | false | |
656 | 656 | } | |
657 | 657 | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
658 | 658 |
github/deemru/w8io/026f985 87.56 ms ◑