tx · HTfawEvDjXoyAAMqobWkMwKdrf1whxkMw35grEAo9vjY

3N3kKNoJohjVQYNLTrYTGTesr3nq3PZNh37:  -0.02700000 Waves

2024.07.09 09:27 [3186108] smart account 3N3kKNoJohjVQYNLTrYTGTesr3nq3PZNh37 > SELF 0.00000000 Waves

{ "type": 13, "id": "HTfawEvDjXoyAAMqobWkMwKdrf1whxkMw35grEAo9vjY", "fee": 2700000, "feeAssetId": null, "timestamp": 1720506438362, "version": 1, "sender": "3N3kKNoJohjVQYNLTrYTGTesr3nq3PZNh37", "senderPublicKey": "vmMXxwQAMUAoisvL193ptPiTtaWQqL5YNu2zs1ouTbY", "proofs": [ "4AzSYD5sJMVLFmjYtuGdAXaWPBBN6PSQb54d1pbDPouineyBa7LsGL4ZhBE6xwjsQkUaXqMkZ9jEzFVk1ow1pFeQ" ], "script": "base64:BwJJCAISAwoBCBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGFoACXNlcGFyYXRvcgICX18AB2NoYWluSWQJAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEACGNoYWluSWRXAQFXABBjb250cmFjdEZpbGVuYW1lAhdmdXR1cmVzX2NhbGN1bGF0b3IucmlkZQAFbXVsdDgAgMLXLwAMbXVsdDE4QmlnSW50CQC2AgEAgICQu7rWrfANAA13YXZlc0RlY2ltYWxzAAgADHVzZHREZWNpbWFscwAGAAt3YXZlc1N0cmluZwIFV0FWRVMADXF1ZXVlSXRlbVNpemUAIAAEYmlnMAkAtgIBAAAACWtNdWx0aXNpZwIMJXNfX211bHRpc2lnAQdrU3RhdHVzAgRkYXBwBHR4SWQJALkJAgkAzAgCAgolc19fc3RhdHVzCQDMCAIFBGRhcHAJAMwIAgUEdHhJZAUDbmlsBQlzZXBhcmF0b3IACWtTaHV0ZG93bgIMJXNfX3NodXRkb3duAAtrUHVibGljS2V5cwIOJXNfX3B1YmxpY0tleXMAEWtNYXRjaGVyUHVibGlj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lsBQthY2NEYXRhTGlzdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQADAwkBCWlzRGVmaW5lZAEFFGZhY3RvcnlBZGRyZXNzT3B0aW9uCQEJaXNEZWZpbmVkAQkAnQgCBQ5mYWN0b3J5QWRkcmVzcwUJa011bHRpc2lnBwQHJG1hdGNoMAkAnQgCBQ5mYWN0b3J5QWRkcmVzcwUJa011bHRpc2lnAwkAAQIFByRtYXRjaDACBlN0cmluZwQIbXVsdGlzaWcFByRtYXRjaDAECXN0YXR1c0tleQkBB2tTdGF0dXMCCQClCAEFBHRoaXMJANgEAQgFAnR4AmlkBAZzdGF0dXMJAQt2YWx1ZU9yRWxzZQIJAJsIAgkBEUBleHRyTmF0aXZlKDEwNjIpAQUIbXVsdGlzaWcFCXN0YXR1c0tleQcFBnN0YXR1cwcJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXndR8TT", "chainId": 84, "height": 3186108, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9hGMB5qPwWrXz1ZQSnRXpA3W8UZ6LRCeEdiqRwEHuEtd Next: 4nXj1QNCDqkbazwVwiK3g7BYJAx814Jmx574L4dBXxa9 Diff:
OldNewDifferences
7272 wavesDecimals
7373 case assetId: ByteVector =>
7474 getAssetInfoOrFail(assetId).decimals
75+ case _ =>
76+ throw("Match error")
77+}
78+
79+
80+func getAssetBalance (assetId,address) = match assetId {
81+ case _: Unit =>
82+ wavesBalance(address).available
83+ case assetId: ByteVector =>
84+ assetBalance(address, assetId)
7585 case _ =>
7686 throw("Match error")
7787 }
304314 }
305315
306316
317+func getAccountInfoInternal (accountAddress) = {
318+ let $t01038510453 = getAccountAssets(accountAddress)
319+ let amountAssetId = $t01038510453._1
320+ let priceAssetId = $t01038510453._2
321+ let leverage = valueOrErrorMessage(getInteger(factoryAddress, kLeverage(accountAddress)), wrapErr("leverage should be defined"))
322+ let requestId = getRequestId(accountAddress)
323+ let accountPublicKey = valueOrErrorMessage(getBinary(factoryAddress, kRequestIdToAccountPublicKey(requestId)), "kRequestIdToAccountPublicKey not found")
324+ let deposited = toX18(valueOrElse(depositedOption(accountAddress), 0), pow10Decimals(priceAssetId))
325+ let currentPrice = toX18(getCurrentPrice(amountAssetId), pow10Decimals(priceAssetId))
326+ let creditA = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, amountAssetId)), 0), pow10Decimals(amountAssetId))
327+ let creditB = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, priceAssetId)), 0), pow10Decimals(priceAssetId))
328+ let status = valueOrErrorMessage(getInteger(factoryAddress, kRequestStatus(requestId)), ("status not found. RequestId = " + toBase58String(requestId)))
329+ $Tuple12(assetIdToString(amountAssetId), assetIdToString(priceAssetId), toString(accountAddress), toBase58String(accountPublicKey), leverage, toBase58String(requestId), deposited, creditA, creditB, getAssetBalance(amountAssetId, accountAddress), getAssetBalance(priceAssetId, accountAddress), status)
330+ }
331+
332+
307333 @Callable(i)
308334 func init (factoryAddressStr) = {
309335 let checkCaller = mustThis(i.caller)
344370 else throwErr(("accounts limit is " + toString(accountsLimit())))]
345371 if ((checks == checks))
346372 then {
347- let $t01176013293 = if ((size(accountsQueue()) == 0))
373+ let $t01339314926 = if ((size(accountsQueue()) == 0))
348374 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)])
349375 else {
350376 let accountPublicKey = take(accountsQueue(), queueItemSize)
352378 let creatorAddress = addressFromPublicKey(valueOrErrorMessage(getBinary(factoryAddress, kAccountCreatorPublicKey(accountAddress)), wrapErr("invalid creator public key")))
353379 $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)])
354380 }
355- let actions = $t01176013293._1
356- let factoryActions = $t01176013293._2
381+ let actions = $t01339314926._1
382+ let factoryActions = $t01339314926._2
357383 $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)]))
358384 }
359385 else throw("Strict value is not equal to itself.")
386412 else throwErr("invalid script")]
387413 if ((checks == checks))
388414 then {
389- let $t01454815789 = if ((size(requestsQueue()) == 0))
415+ let $t01618117422 = if ((size(requestsQueue()) == 0))
390416 then $Tuple2(nil, [invoke(factoryAddress, "binaryEntry", [kAccountsQueue(), (accountsQueue() + accountPublicKey)], nil)])
391417 else {
392418 let requestId = take(requestsQueue(), queueItemSize)
393419 let leverage = valueOrErrorMessage(getInteger(factoryAddress, kRequestLeverage(requestId)), wrapErr("request's leverage is undefined"))
394420 $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)])
395421 }
396- let actions = $t01454815789._1
397- let factoryActions = $t01454815789._2
422+ let actions = $t01618117422._1
423+ let factoryActions = $t01618117422._2
398424 $Tuple2(actions, (factoryActions ++ [invoke(factoryAddress, "binaryEntry", [kAccountCreatorPublicKey(accountAddress), creatorPublicKey], nil)]))
399425 }
400426 else throw("Strict value is not equal to itself.")
559585 if ((checks == checks))
560586 then {
561587 let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address"))
562- let $t02263322701 = getAccountAssets(accountAddress)
563- let amountAssetId = $t02263322701._1
564- let priceAssetId = $t02263322701._2
565- let leverage = valueOrErrorMessage(getInteger(factoryAddress, kLeverage(accountAddress)), wrapErr("leverage should be defined"))
566- let userAddress = addressFromPublicKey(callerPublicKey)
567- let requestId = getRequestId(accountAddress)
568- let accountPublicKey = valueOrErrorMessage(getBinary(factoryAddress, kRequestIdToAccountPublicKey(requestId)), "kRequestIdToAccountPublicKey not found")
569- let deposited = toX18(valueOrElse(depositedOption(accountAddress), 0), pow10Decimals(usdtAssetId))
570- let currentPrice = toX18(getCurrentPrice(amountAssetId), pow10Decimals(usdtAssetId))
571- let creditA = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, amountAssetId)), 0), pow10Decimals(amountAssetId))
572- let creditB = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, usdtAssetId)), 0), pow10Decimals(usdtAssetId))
573- let data = $Tuple11(assetIdToString(amountAssetId), assetIdToString(priceAssetId), toString(accountAddress), toBase58String(accountPublicKey), leverage, toBase58String(requestId), deposited, creditA, creditB, toX18(0, pow10Decimals(amountAssetId)), toX18(0, pow10Decimals(usdtAssetId)))
588+ let data = getAccountInfoInternal(accountAddress)
574589 $Tuple2(nil, data)
590+ }
591+ else throw("Strict value is not equal to itself.")
592+ }
593+
594+
595+
596+@Callable(i)
597+func getUserInfoREADONLY (callerPublicKey,args) = {
598+ let checks = [mustFactory(i.caller)]
599+ if ((checks == checks))
600+ then {
601+ let userAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid user address"))
602+ let userRequests = valueOrErrorMessage(getBinary(factoryAddress, kRequestsByOwner(userAddress)), "kRequestsByOwner not found")
603+ let userRequestsNumber = (size(userRequests) / queueItemSize)
604+ let nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
605+ func getAccountsData (acc,count) = {
606+ let $t02497125013 = acc
607+ let accDataList = $t02497125013._1
608+ let rawBytes = $t02497125013._2
609+ let maxSize = $t02497125013._3
610+ if ((maxSize > count))
611+ then {
612+ let requestId = take(rawBytes, queueItemSize)
613+ let newRawBytes = drop(rawBytes, queueItemSize)
614+ let accountPublicKey = valueOrErrorMessage(getBinary(factoryAddress, kRequestIdToAccountPublicKey(requestId)), "kRequestIdToAccountPublicKey not found")
615+ let accountAddress = addressFromPublicKey(accountPublicKey)
616+ let data = getAccountInfoInternal(accountAddress)
617+ $Tuple3((accDataList :+ data), newRawBytes, maxSize)
618+ }
619+ else acc
620+ }
621+
622+ let $t02551725616 = {
623+ let $l = nums
624+ let $s = size($l)
625+ let $acc0 = $Tuple3(nil, userRequests, userRequestsNumber)
626+ func $f0_1 ($a,$i) = if (($i >= $s))
627+ then $a
628+ else getAccountsData($a, $l[$i])
629+
630+ func $f0_2 ($a,$i) = if (($i >= $s))
631+ then $a
632+ else throw("List size exceeds 20")
633+
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+ }
636+ let accDataList = $t02551725616._1
637+ let _a = $t02551725616._2
638+ let _b = $t02551725616._3
639+ $Tuple2(nil, accDataList)
575640 }
576641 else throw("Strict value is not equal to itself.")
577642 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 7 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = "__"
55
66 let chainId = take(drop(this.bytes, 1), 1)
77
88 let chainIdW = base58'2W'
99
1010 let contractFilename = "futures_calculator.ride"
1111
1212 let mult8 = 100000000
1313
1414 let mult18BigInt = toBigInt(1000000000000000000)
1515
1616 let wavesDecimals = 8
1717
1818 let usdtDecimals = 6
1919
2020 let wavesString = "WAVES"
2121
2222 let queueItemSize = 32
2323
2424 let big0 = toBigInt(0)
2525
2626 let kMultisig = "%s__multisig"
2727
2828 func kStatus (dapp,txId) = makeString(["%s__status", dapp, txId], separator)
2929
3030
3131 let kShutdown = "%s__shutdown"
3232
3333 let kPublicKeys = "%s__publicKeys"
3434
3535 let kMatcherPublicKey = "%s__matcherPublicKey"
3636
3737 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), mult18BigInt, toBigInt(origScaleMult))
3838
3939
4040 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), mult18BigInt))
4141
4242
4343 func validateAddress (address) = isDefined(addressFromString(address))
4444
4545
4646 func wrapErr (s) = ((contractFilename + ": ") + s)
4747
4848
4949 func throwErr (s) = throw(wrapErr(s))
5050
5151
5252 func ensurePositive (v,s) = if ((v >= 0))
5353 then v
5454 else throwErr((s + " value should be positive"))
5555
5656
5757 func parseAssetId (input) = if ((input == wavesString))
5858 then unit
5959 else fromBase58String(input)
6060
6161
6262 func assetIdToString (input) = if ((input == unit))
6363 then wavesString
6464 else toBase58String(value(input))
6565
6666
6767 func getAssetInfoOrFail (assetId) = valueOrErrorMessage(assetInfo(assetId), wrapErr("invalid asset info"))
6868
6969
7070 func getAssetDecimalsOrFail (assetId) = match assetId {
7171 case _: Unit =>
7272 wavesDecimals
7373 case assetId: ByteVector =>
7474 getAssetInfoOrFail(assetId).decimals
75+ case _ =>
76+ throw("Match error")
77+}
78+
79+
80+func getAssetBalance (assetId,address) = match assetId {
81+ case _: Unit =>
82+ wavesBalance(address).available
83+ case assetId: ByteVector =>
84+ assetBalance(address, assetId)
7585 case _ =>
7686 throw("Match error")
7787 }
7888
7989
8090 func pow10 (n) = pow(10, 0, n, 0, 0, DOWN)
8191
8292
8393 func pow10Decimals (assetId) = pow10(getAssetDecimalsOrFail(assetId))
8494
8595
8696 let kFactoryAddress = "%s__factoryAddress"
8797
8898 let factoryAddressOption = match getString(this, kFactoryAddress) {
8999 case s: String =>
90100 addressFromString(s)
91101 case _: Unit =>
92102 unit
93103 case _ =>
94104 throw("Match error")
95105 }
96106
97107 let factoryAddress = valueOrErrorMessage(factoryAddressOption, wrapErr("invalid factory address"))
98108
99109 let kUsdtAssetId = "%s__usdtAssetId"
100110
101111 let usdtAssetIdOption = match getString(factoryAddress, kUsdtAssetId) {
102112 case s: String =>
103113 parseAssetId(s)
104114 case _: Unit =>
105115 unit
106116 case _ =>
107117 throw("Match error")
108118 }
109119
110120 let usdtAssetId = valueOrErrorMessage(usdtAssetIdOption, wrapErr("invalid usdt asset id"))
111121
112122 let kPricesAddress = "%s__calculatorAddress"
113123
114124 let shutdown = valueOrElse(getBoolean(factoryAddress, kShutdown), false)
115125
116126 func mustAddress (caller,address) = if ((caller == address))
117127 then true
118128 else throwErr("permission denied")
119129
120130
121131 func mustThis (caller) = mustAddress(caller, this)
122132
123133
124134 func mustFactory (caller) = mustAddress(caller, factoryAddress)
125135
126136
127137 func mustAdmin (callerPublicKey) = {
128138 let multisig = addressFromStringValue(getStringValue(factoryAddress, kMultisig))
129139 let publicKeysList = split(getStringValue(multisig, kPublicKeys), separator)
130140 if (containsElement(publicKeysList, toBase58String(callerPublicKey)))
131141 then true
132142 else throwErr("not allowed")
133143 }
134144
135145
136146 let kAccountScript = "%s__accountScript"
137147
138148 func accountScript () = valueOrErrorMessage(getBinary(factoryAddress, kAccountScript), wrapErr("account script is not set"))
139149
140150
141151 let kRewardAmount = "%s__rewardAmount"
142152
143153 func rewardAmount () = valueOrErrorMessage(getInteger(factoryAddress, kRewardAmount), wrapErr("reward amount is not set"))
144154
145155
146156 let kAccountsLimit = "%s__accountsLimit"
147157
148158 let accountsLimitDefault = 20
149159
150160 func accountsLimit () = valueOrElse(getInteger(factoryAddress, kAccountsLimit), accountsLimitDefault)
151161
152162
153163 func kDeposited (accountAddress) = makeString(["%s%s", "deposited", toString(accountAddress)], separator)
154164
155165
156166 func depositedOption (accountAddress) = getInteger(factoryAddress, kDeposited(accountAddress))
157167
158168
159169 func kCredit (accountAddress,assetId) = makeString(["%s%s%s", "credit", toString(accountAddress), assetIdToString(assetId)], separator)
160170
161171
162172 func creditOption (accountAddress,assetId) = getInteger(factoryAddress, kCredit(accountAddress, assetId))
163173
164174
165175 func kLeverage (accountAddress) = makeString(["%s%s", "leverage", toString(accountAddress)], separator)
166176
167177
168178 func kRequestLeverage (requestId) = makeString(["%s%s", "requestLeverage", toBase58String(requestId)], separator)
169179
170180
171181 func kSyntheticAssetId (baseAssetId) = makeString(["%s%s", "syntheticAssetId", assetIdToString(baseAssetId)], separator)
172182
173183
174184 func kBaseAssetId (syntheticAssetId) = makeString(["%s%s", "baseAssetId", assetIdToString(syntheticAssetId)], separator)
175185
176186
177187 let REQUEST_STATUS_EMPTY = 0
178188
179189 let REQUEST_STATUS_READY = 1
180190
181191 func kRequestStatus (requestId) = makeString(["%s%s", toBase58String(requestId), "status"], separator)
182192
183193
184194 func kAccountCreatorPublicKey (accountAddress) = makeString(["%s%s", toString(accountAddress), "creatorPublicKey"], separator)
185195
186196
187197 func kRequestOwnerPublicKey (requestId) = makeString(["%s%s", toBase58String(requestId), "ownerPublicKey"], separator)
188198
189199
190200 func kRequestAmountAssetId (requestId) = makeString(["%s%s", toBase58String(requestId), "amountAssetId"], separator)
191201
192202
193203 func kRequestPriceAssetId (requestId) = makeString(["%s%s", toBase58String(requestId), "priceAssetId"], separator)
194204
195205
196206 func kRequestIdToAccountPublicKey (requestId) = makeString(["%s%s", toBase58String(requestId), "requestIdToAccountPublicKey"], separator)
197207
198208
199209 func kAccountAddressToRequestId (accountAddress) = makeString(["%s%s", toString(accountAddress), "accountAddressToRequestId"], separator)
200210
201211
202212 func kRequestsQueue () = makeString(["%s", "requestsQueue"], separator)
203213
204214
205215 func requestsQueue () = valueOrElse(getBinary(factoryAddress, kRequestsQueue()), base58'')
206216
207217
208218 func kAccountsQueue () = makeString(["%s", "accountsQueue"], separator)
209219
210220
211221 func accountsQueue () = valueOrElse(getBinary(factoryAddress, kAccountsQueue()), base58'')
212222
213223
214224 func kRequestsByOwner (ownerAddress) = makeString(["%s%s", "requests", toString(ownerAddress)], separator)
215225
216226
217227 func requestsByOwner (ownerAddress) = valueOrElse(getBinary(factoryAddress, kRequestsByOwner(ownerAddress)), base58'')
218228
219229
220230 func kPairAllowed (amountAssetId,priceAssetId) = makeString(["%s%s%s", assetIdToString(amountAssetId), assetIdToString(priceAssetId), "pairAllowed"], separator)
221231
222232
223233 func pairAllowed (amountAssetId,priceAssetId) = valueOrElse(getBoolean(factoryAddress, kPairAllowed(amountAssetId, priceAssetId)), false)
224234
225235
226236 func kPrice (assetId) = makeString(["%s", assetIdToString(assetId)], separator)
227237
228238
229239 func getCurrentPrice (assetId) = {
230240 let matcherPublicKey = fromBase58String(valueOrErrorMessage(getString(factoryAddress, kMatcherPublicKey), wrapErr("invalid matcher public key")))
231241 let matcherAddress = addressFromPublicKey(matcherPublicKey)
232242 let price = valueOrErrorMessage(getInteger(matcherAddress, kPrice(assetId)), wrapErr(("invalid price, assetId = " + assetIdToString(assetId))))
233243 price
234244 }
235245
236246
237247 func calcTotalCredit (creditA,creditB,currentPrice) = (fraction(creditA, currentPrice, mult18BigInt) + creditB)
238248
239249
240250 func calcTotalBalance (balanceA,balanceB,currentPrice) = (fraction(balanceA, currentPrice, mult18BigInt) + balanceB)
241251
242252
243253 func calcPnl (totalBalance,totalCredit) = (totalBalance - totalCredit)
244254
245255
246256 func calcCreditAvailable (deposit,leverage,totalCredit) = (fraction(deposit, leverage, mult18BigInt) - totalCredit)
247257
248258
249259 func calcRealInCredit (credit,balance) = if ((credit > big0))
250260 then (credit - balance)
251261 else big0
252262
253263
254264 func calcFree (credit,balance) = if ((credit > big0))
255265 then (balance - credit)
256266 else big0
257267
258268
259269 func calcShortPrice (free,realInCredit) = if ((realInCredit > big0))
260270 then max([big0, fraction(free, mult18BigInt, realInCredit)])
261271 else big0
262272
263273
264274 func calcLongPrice (free,realInCredit) = if ((realInCredit > big0))
265275 then max([big0, fraction(realInCredit, mult18BigInt, free)])
266276 else big0
267277
268278
269279 func calcStartMargin (realInCreditA,realInCreditB,currentPrice,settingsMargin) = fraction((fraction(realInCreditA, currentPrice, mult18BigInt) + realInCreditB), settingsMargin, mult18BigInt)
270280
271281
272282 func calcMarginSupply (settingsMarginSupply,settingsMargin,startMargin) = fraction(settingsMarginSupply, startMargin, settingsMargin)
273283
274284
275285 func calcLiquidationPrice (deposit,marginSupply,realInCreditA,realInCreditB,shortPrice,longPrice) = {
276286 let liquidationPriceA = if ((realInCreditA > big0))
277287 then (((deposit - marginSupply) / realInCreditA) + shortPrice)
278288 else big0
279289 let liquidationPriceB = if ((realInCreditB > big0))
280290 then (longPrice - ((deposit - marginSupply) / (realInCreditA / longPrice)))
281291 else big0
282292 (liquidationPriceA + liquidationPriceB)
283293 }
284294
285295
286296 func getRequestId (accountAddress) = {
287297 let requestId = fromBase58String(valueOrErrorMessage(getString(factoryAddress, kAccountAddressToRequestId(accountAddress)), wrapErr("invalid account address: request id is undefined")))
288298 requestId
289299 }
290300
291301
292302 func getAccountAssets (accountAddress) = {
293303 let requestId = getRequestId(accountAddress)
294304 let amountAssetId = parseAssetId(valueOrErrorMessage(getString(factoryAddress, kRequestAmountAssetId(requestId)), wrapErr("invalid amount asset id")))
295305 let priceAssetId = parseAssetId(valueOrErrorMessage(getString(factoryAddress, kRequestPriceAssetId(requestId)), wrapErr("invalid amount price id")))
296306 $Tuple2(amountAssetId, priceAssetId)
297307 }
298308
299309
300310 func getAccountOwnerPublicKey (accountAddress) = {
301311 let requestId = getRequestId(accountAddress)
302312 let requestOwnerPublicKey = valueOrErrorMessage(getBinary(factoryAddress, kRequestOwnerPublicKey(requestId)), wrapErr("invalid amount asset id"))
303313 requestOwnerPublicKey
304314 }
305315
306316
317+func getAccountInfoInternal (accountAddress) = {
318+ let $t01038510453 = getAccountAssets(accountAddress)
319+ let amountAssetId = $t01038510453._1
320+ let priceAssetId = $t01038510453._2
321+ let leverage = valueOrErrorMessage(getInteger(factoryAddress, kLeverage(accountAddress)), wrapErr("leverage should be defined"))
322+ let requestId = getRequestId(accountAddress)
323+ let accountPublicKey = valueOrErrorMessage(getBinary(factoryAddress, kRequestIdToAccountPublicKey(requestId)), "kRequestIdToAccountPublicKey not found")
324+ let deposited = toX18(valueOrElse(depositedOption(accountAddress), 0), pow10Decimals(priceAssetId))
325+ let currentPrice = toX18(getCurrentPrice(amountAssetId), pow10Decimals(priceAssetId))
326+ let creditA = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, amountAssetId)), 0), pow10Decimals(amountAssetId))
327+ let creditB = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, priceAssetId)), 0), pow10Decimals(priceAssetId))
328+ let status = valueOrErrorMessage(getInteger(factoryAddress, kRequestStatus(requestId)), ("status not found. RequestId = " + toBase58String(requestId)))
329+ $Tuple12(assetIdToString(amountAssetId), assetIdToString(priceAssetId), toString(accountAddress), toBase58String(accountPublicKey), leverage, toBase58String(requestId), deposited, creditA, creditB, getAssetBalance(amountAssetId, accountAddress), getAssetBalance(priceAssetId, accountAddress), status)
330+ }
331+
332+
307333 @Callable(i)
308334 func init (factoryAddressStr) = {
309335 let checkCaller = mustThis(i.caller)
310336 if ((checkCaller == checkCaller))
311337 then $Tuple2([StringEntry(kFactoryAddress, factoryAddressStr)], unit)
312338 else throw("Strict value is not equal to itself.")
313339 }
314340
315341
316342
317343 @Callable(i)
318344 func requestAccount (callerPublicKey,args) = {
319345 let ckecks = [if (!(shutdown))
320346 then true
321347 else throwErr("not allowed"), mustFactory(i.caller)]
322348 if ((ckecks == ckecks))
323349 then {
324350 let amountAssetIdStr = args[0]
325351 let priceAssetIdStr = args[1]
326352 let leverage = valueOrErrorMessage(parseInt(args[2]), wrapErr("invalid leverage"))
327353 let userAddress = addressFromPublicKey(callerPublicKey)
328354 let requestId = sha256(((userAddress.bytes + fromBase58String(amountAssetIdStr)) + fromBase58String(priceAssetIdStr)))
329355 let amountAssetId = parseAssetId(amountAssetIdStr)
330356 let priceAssetId = parseAssetId(priceAssetIdStr)
331357 let userRequestsNumber = (size(kRequestsByOwner(userAddress)) / queueItemSize)
332358 let checks = [if ((size(i.payments) == 1))
333359 then true
334360 else throwErr("1 payment is required"), if ((i.payments[0].assetId == unit))
335361 then true
336362 else throwErr("invalid asset"), if ((i.payments[0].amount == rewardAmount()))
337363 then true
338364 else throwErr("invalid amount"), if (pairAllowed(amountAssetId, priceAssetId))
339365 then true
340366 else throwErr("pair is not allowed"), if ((getInteger(factoryAddress, kRequestStatus(requestId)) == unit))
341367 then true
342368 else throwErr("account is already exists"), if ((accountsLimit() > userRequestsNumber))
343369 then true
344370 else throwErr(("accounts limit is " + toString(accountsLimit())))]
345371 if ((checks == checks))
346372 then {
347- let $t01176013293 = if ((size(accountsQueue()) == 0))
373+ let $t01339314926 = if ((size(accountsQueue()) == 0))
348374 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)])
349375 else {
350376 let accountPublicKey = take(accountsQueue(), queueItemSize)
351377 let accountAddress = addressFromPublicKey(accountPublicKey)
352378 let creatorAddress = addressFromPublicKey(valueOrErrorMessage(getBinary(factoryAddress, kAccountCreatorPublicKey(accountAddress)), wrapErr("invalid creator public key")))
353379 $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)])
354380 }
355- let actions = $t01176013293._1
356- let factoryActions = $t01176013293._2
381+ let actions = $t01339314926._1
382+ let factoryActions = $t01339314926._2
357383 $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)]))
358384 }
359385 else throw("Strict value is not equal to itself.")
360386 }
361387 else throw("Strict value is not equal to itself.")
362388 }
363389
364390
365391
366392 @Callable(i)
367393 func addAccount (callerPublicKey,args) = {
368394 let ckecks = [if (!(shutdown))
369395 then true
370396 else throwErr("not allowed"), mustFactory(i.caller)]
371397 if ((ckecks == ckecks))
372398 then {
373399 let creatorPublicKey = fromBase58String(args[0])
374400 let accountPublicKey = callerPublicKey
375401 let accountAddress = addressFromPublicKey(callerPublicKey)
376402 let creatorAddress = addressFromPublicKey(creatorPublicKey)
377403 let checks = [if ((getBinary(factoryAddress, kAccountCreatorPublicKey(accountAddress)) == unit))
378404 then true
379405 else throwErr("account is already exists"), if ( match scriptHash(accountAddress) {
380406 case b: ByteVector =>
381407 (b == blake2b256_32Kb(accountScript()))
382408 case _ =>
383409 false
384410 })
385411 then true
386412 else throwErr("invalid script")]
387413 if ((checks == checks))
388414 then {
389- let $t01454815789 = if ((size(requestsQueue()) == 0))
415+ let $t01618117422 = if ((size(requestsQueue()) == 0))
390416 then $Tuple2(nil, [invoke(factoryAddress, "binaryEntry", [kAccountsQueue(), (accountsQueue() + accountPublicKey)], nil)])
391417 else {
392418 let requestId = take(requestsQueue(), queueItemSize)
393419 let leverage = valueOrErrorMessage(getInteger(factoryAddress, kRequestLeverage(requestId)), wrapErr("request's leverage is undefined"))
394420 $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)])
395421 }
396- let actions = $t01454815789._1
397- let factoryActions = $t01454815789._2
422+ let actions = $t01618117422._1
423+ let factoryActions = $t01618117422._2
398424 $Tuple2(actions, (factoryActions ++ [invoke(factoryAddress, "binaryEntry", [kAccountCreatorPublicKey(accountAddress), creatorPublicKey], nil)]))
399425 }
400426 else throw("Strict value is not equal to itself.")
401427 }
402428 else throw("Strict value is not equal to itself.")
403429 }
404430
405431
406432
407433 @Callable(i)
408434 func deposit (callerPublicKey,args) = {
409435 let payment = i.payments[0]
410436 let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address"))
411437 let ckecks = [if (!(shutdown))
412438 then true
413439 else throwErr("not allowed"), mustFactory(i.caller), if ((size(i.payments) == 1))
414440 then true
415441 else throwErr("1 payment is required"), if ((payment.assetId == usdtAssetId))
416442 then true
417443 else throwErr("invalid asset"), if ((getInteger(factoryAddress, kRequestStatus(getRequestId(accountAddress))) == REQUEST_STATUS_READY))
418444 then true
419445 else throwErr("account is not ready")]
420446 if ((ckecks == ckecks))
421447 then {
422448 let actions = [ScriptTransfer(accountAddress, payment.amount, payment.assetId)]
423449 let factoryActions = [invoke(factoryAddress, "integerEntry", [kDeposited(accountAddress), (valueOrElse(depositedOption(accountAddress), 0) + payment.amount)], nil)]
424450 $Tuple2(actions, factoryActions)
425451 }
426452 else throw("Strict value is not equal to itself.")
427453 }
428454
429455
430456
431457 @Callable(i)
432458 func withdraw (callerPublicKey,args) = {
433459 let ckecks = [if (!(shutdown))
434460 then true
435461 else throwErr("not allowed"), mustFactory(i.caller)]
436462 if ((ckecks == ckecks))
437463 then {
438464 let userAddress = addressFromPublicKey(callerPublicKey)
439465 let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address"))
440466 let amount = valueOrErrorMessage(parseInt(args[1]), wrapErr("invalid amount"))
441467 let assetId = parseAssetId(args[2])
442468 let invocations = [invoke(accountAddress, "transferAsset", [userAddress.bytes, amount, assetId], nil)]
443469 $Tuple2(nil, invocations)
444470 }
445471 else throw("Strict value is not equal to itself.")
446472 }
447473
448474
449475
450476 @Callable(i)
451477 func borrow (callerPublicKey,args) = {
452478 let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address"))
453479 let assetIdRequested = parseAssetId(args[1])
454480 let amountRequested = ensurePositive(valueOrErrorMessage(parseInt(args[2]), wrapErr("invalid requested amount")), "requested amount")
455481 let accountOwnerPublicKey = getAccountOwnerPublicKey(accountAddress)
456482 let userAddress = addressFromPublicKey(callerPublicKey)
457483 let ckecks = [if (!(shutdown))
458484 then true
459485 else throwErr("not allowed"), mustFactory(i.caller), if ((callerPublicKey == accountOwnerPublicKey))
460486 then true
461487 else throwErr("can be called by account owner only")]
462488 if ((ckecks == ckecks))
463489 then {
464490 let amountAssetId = getAccountAssets(accountAddress)._1
465491 let deposited = toX18(valueOrElse(depositedOption(accountAddress), 0), pow10Decimals(usdtAssetId))
466492 let currentPrice = toX18(getCurrentPrice(amountAssetId), pow10Decimals(usdtAssetId))
467493 let creditA = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, amountAssetId)), 0), pow10Decimals(amountAssetId))
468494 let creditB = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, usdtAssetId)), 0), pow10Decimals(usdtAssetId))
469495 let totalCredit = calcTotalCredit(creditA, creditB, currentPrice)
470496 let leverage = toX18(valueOrErrorMessage(getInteger(factoryAddress, kLeverage(accountAddress)), wrapErr("leverage should be defined")), 1)
471497 let creditAvailableUsdt = calcCreditAvailable(deposited, leverage, totalCredit)
472498 let creditAvailable = if ((assetIdRequested == amountAssetId))
473499 then fromX18(fraction(creditAvailableUsdt, mult18BigInt, currentPrice), pow10Decimals(amountAssetId))
474500 else if ((assetIdRequested == usdtAssetId))
475501 then fromX18(creditAvailableUsdt, pow10Decimals(usdtAssetId))
476502 else throwErr("invalid requested asset id")
477503 let syntheticAssetId = parseAssetId(valueOrErrorMessage(getString(factoryAddress, kSyntheticAssetId(assetIdRequested)), wrapErr("synthetic asset for requested asset is undefined")))
478504 let amountToSend = if ((creditAvailable >= amountRequested))
479505 then amountRequested
480506 else throwErr(("credit available = " + toString(creditAvailable)))
481507 let factoryActions = [invoke(factoryAddress, "integerEntry", [kCredit(accountAddress, assetIdRequested), (valueOrElse(creditOption(accountAddress, assetIdRequested), 0) + amountToSend)], nil), invoke(factoryAddress, "transferAsset", [userAddress.bytes, amountToSend, syntheticAssetId], nil)]
482508 $Tuple2(nil, [factoryActions, creditAvailable])
483509 }
484510 else throw("Strict value is not equal to itself.")
485511 }
486512
487513
488514
489515 @Callable(i)
490516 func repay (callerPublicKey,args) = {
491517 let ckecks = [if (!(shutdown))
492518 then true
493519 else throwErr("not allowed"), mustFactory(i.caller)]
494520 if ((ckecks == ckecks))
495521 then $Tuple2(nil, unit)
496522 else throw("Strict value is not equal to itself.")
497523 }
498524
499525
500526
501527 @Callable(i)
502528 func setPairAllowance (callerPublicKey,args) = {
503529 let ckecks = [if (!(shutdown))
504530 then true
505531 else throwErr("not allowed"), mustFactory(i.caller), mustAdmin(callerPublicKey)]
506532 if ((ckecks == ckecks))
507533 then {
508534 let amountAssetIdStr = args[0]
509535 let priceAssetIdStr = args[1]
510536 let allowStr = args[2]
511537 let amountAssetId = parseAssetId(amountAssetIdStr)
512538 let priceAssetId = parseAssetId(priceAssetIdStr)
513539 let allow = (allowStr == "true")
514540 let invocations = [invoke(factoryAddress, "booleanEntry", [kPairAllowed(amountAssetId, priceAssetId), allow], nil)]
515541 $Tuple2(nil, invocations)
516542 }
517543 else throw("Strict value is not equal to itself.")
518544 }
519545
520546
521547
522548 @Callable(i)
523549 func addSyntheticAsset (callerPublicKey,args) = {
524550 let baseAssetId = parseAssetId(args[0])
525551 let syntheticAssetId = parseAssetId(args[1])
526552 let ckecks = [if (!(shutdown))
527553 then true
528554 else throwErr("not allowed"), mustFactory(i.caller), mustAdmin(callerPublicKey), if ((getString(factoryAddress, kSyntheticAssetId(baseAssetId)) == unit))
529555 then true
530556 else throwErr("invalid base asset"), if ((getString(factoryAddress, kBaseAssetId(syntheticAssetId)) == unit))
531557 then true
532558 else throwErr("invalid synthetic asset")]
533559 if ((ckecks == ckecks))
534560 then {
535561 let invocations = [invoke(factoryAddress, "stringEntry", [kSyntheticAssetId(baseAssetId), assetIdToString(syntheticAssetId)], nil), invoke(factoryAddress, "stringEntry", [kBaseAssetId(syntheticAssetId), assetIdToString(baseAssetId)], nil)]
536562 $Tuple2(nil, invocations)
537563 }
538564 else throw("Strict value is not equal to itself.")
539565 }
540566
541567
542568
543569 @Callable(i)
544570 func doShutdown (callerPublicKey,args) = {
545571 let checks = [mustFactory(i.caller), mustAdmin(callerPublicKey)]
546572 if ((checks == checks))
547573 then {
548574 let invocations = [invoke(factoryAddress, "booleanEntry", [kShutdown, true], nil)]
549575 $Tuple2(nil, invocations)
550576 }
551577 else throw("Strict value is not equal to itself.")
552578 }
553579
554580
555581
556582 @Callable(i)
557583 func getAccountInfoREADONLY (callerPublicKey,args) = {
558584 let checks = [mustFactory(i.caller)]
559585 if ((checks == checks))
560586 then {
561587 let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address"))
562- let $t02263322701 = getAccountAssets(accountAddress)
563- let amountAssetId = $t02263322701._1
564- let priceAssetId = $t02263322701._2
565- let leverage = valueOrErrorMessage(getInteger(factoryAddress, kLeverage(accountAddress)), wrapErr("leverage should be defined"))
566- let userAddress = addressFromPublicKey(callerPublicKey)
567- let requestId = getRequestId(accountAddress)
568- let accountPublicKey = valueOrErrorMessage(getBinary(factoryAddress, kRequestIdToAccountPublicKey(requestId)), "kRequestIdToAccountPublicKey not found")
569- let deposited = toX18(valueOrElse(depositedOption(accountAddress), 0), pow10Decimals(usdtAssetId))
570- let currentPrice = toX18(getCurrentPrice(amountAssetId), pow10Decimals(usdtAssetId))
571- let creditA = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, amountAssetId)), 0), pow10Decimals(amountAssetId))
572- let creditB = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, usdtAssetId)), 0), pow10Decimals(usdtAssetId))
573- let data = $Tuple11(assetIdToString(amountAssetId), assetIdToString(priceAssetId), toString(accountAddress), toBase58String(accountPublicKey), leverage, toBase58String(requestId), deposited, creditA, creditB, toX18(0, pow10Decimals(amountAssetId)), toX18(0, pow10Decimals(usdtAssetId)))
588+ let data = getAccountInfoInternal(accountAddress)
574589 $Tuple2(nil, data)
590+ }
591+ else throw("Strict value is not equal to itself.")
592+ }
593+
594+
595+
596+@Callable(i)
597+func getUserInfoREADONLY (callerPublicKey,args) = {
598+ let checks = [mustFactory(i.caller)]
599+ if ((checks == checks))
600+ then {
601+ let userAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid user address"))
602+ let userRequests = valueOrErrorMessage(getBinary(factoryAddress, kRequestsByOwner(userAddress)), "kRequestsByOwner not found")
603+ let userRequestsNumber = (size(userRequests) / queueItemSize)
604+ let nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
605+ func getAccountsData (acc,count) = {
606+ let $t02497125013 = acc
607+ let accDataList = $t02497125013._1
608+ let rawBytes = $t02497125013._2
609+ let maxSize = $t02497125013._3
610+ if ((maxSize > count))
611+ then {
612+ let requestId = take(rawBytes, queueItemSize)
613+ let newRawBytes = drop(rawBytes, queueItemSize)
614+ let accountPublicKey = valueOrErrorMessage(getBinary(factoryAddress, kRequestIdToAccountPublicKey(requestId)), "kRequestIdToAccountPublicKey not found")
615+ let accountAddress = addressFromPublicKey(accountPublicKey)
616+ let data = getAccountInfoInternal(accountAddress)
617+ $Tuple3((accDataList :+ data), newRawBytes, maxSize)
618+ }
619+ else acc
620+ }
621+
622+ let $t02551725616 = {
623+ let $l = nums
624+ let $s = size($l)
625+ let $acc0 = $Tuple3(nil, userRequests, userRequestsNumber)
626+ func $f0_1 ($a,$i) = if (($i >= $s))
627+ then $a
628+ else getAccountsData($a, $l[$i])
629+
630+ func $f0_2 ($a,$i) = if (($i >= $s))
631+ then $a
632+ else throw("List size exceeds 20")
633+
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+ }
636+ let accDataList = $t02551725616._1
637+ let _a = $t02551725616._2
638+ let _b = $t02551725616._3
639+ $Tuple2(nil, accDataList)
575640 }
576641 else throw("Strict value is not equal to itself.")
577642 }
578643
579644
580645 @Verifier(tx)
581646 func verify () = if (if (isDefined(factoryAddressOption))
582647 then isDefined(getString(factoryAddress, kMultisig))
583648 else false)
584649 then match getString(factoryAddress, kMultisig) {
585650 case multisig: String =>
586651 let statusKey = kStatus(toString(this), toBase58String(tx.id))
587652 let status = valueOrElse(getBoolean(addressFromStringValue(multisig), statusKey), false)
588653 status
589654 case _ =>
590655 false
591656 }
592657 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
593658

github/deemru/w8io/026f985 
77.05 ms