tx · DPyFSxLGcmjtN43g7fyN67dSMycfD7CxyEjXrAYU6VUf

3NCQBxKvaNDvBSot8rZUraw1iRA75JvyABz:  -0.01000000 Waves

2020.09.09 13:14 [1169650] smart account 3NCQBxKvaNDvBSot8rZUraw1iRA75JvyABz > SELF 0.00000000 Waves

{ "type": 13, "id": "DPyFSxLGcmjtN43g7fyN67dSMycfD7CxyEjXrAYU6VUf", "fee": 1000000, "feeAssetId": null, "timestamp": 1599646505888, "version": 1, "sender": "3NCQBxKvaNDvBSot8rZUraw1iRA75JvyABz", "senderPublicKey": "FNDmmCwtFS5QUTgytYEi711uZEsHBtNafpXicaup3TL3", "proofs": [ "3QnzZ4edcCd7efUfYiuSAaDaJGmjeHtkKLF1613JDMfYzZV4dGhu8gkv4nkZBN21Sp7th5i1pYnt2UqZT2wPtWaf" ], "script": "base64:AAIDAAAAAAAAAAsIARIAEgASAwoBCAAAAD0AAAAAC3BhcmFtUHJlZml4AgAAAAZwYXJhbV8AAAAAC2FkZHJlc3NCb29rCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUVoHUeTQTO77iaMaO0CyN+LlydsBXbwHeAAAAABN3aGl0ZWxpc3RBZGRyZXNzS2V5AgAAABB3aGl0ZWxpc3RBZGRyZXNzAAAAABdkQXBwV2hpdGVsaXN0QWRkcmVzc0tleQIAAAAUZEFwcFdoaXRlbGlzdEFkZHJlc3MAAAAAEGJ1cm5lckFkZHJlc3NLZXkCAAAADWJ1cm5lckFkZHJlc3MAAAAAFGV4dHJhY3RlZEFkZHJlc3NCb29rCQEAAAAHZXh0cmFjdAAAAAEFAAAAC2FkZHJlc3NCb29rAQAAAA5nZXRTdHJpbmdQYXJhbQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMJAAEsAAAAAgUAAAALcGFyYW1QcmVmaXgFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwB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AABAAAAAAAAAAAABAAAAAtwS2V5N1NpZ25lZAMJAQAAAAlpc0RlZmluZWQAAAABCQAEGgAAAAIFAAAACXBBZGRyZXNzNwUAAAAEdHhJZAAAAAAAAAAAAQAAAAAAAAAAAAQAAAALcEtleThTaWduZWQDCQEAAAAJaXNEZWZpbmVkAAAAAQkABBoAAAACBQAAAAlwQWRkcmVzczgFAAAABHR4SWQAAAAAAAAAAAEAAAAAAAAAAAAJAABnAAAAAgkAAGQAAAACCQAAZAAAAAIJAABkAAAAAgkAAGQAAAACCQAAZAAAAAIJAABkAAAAAgkAAGQAAAACBQAAAAtwS2V5MVNpZ25lZAUAAAALcEtleTJTaWduZWQFAAAAC3BLZXkzU2lnbmVkBQAAAAtwS2V5NFNpZ25lZAUAAAALcEtleTVTaWduZWQFAAAAC3BLZXk2U2lnbmVkBQAAAAtwS2V5N1NpZ25lZAUAAAALcEtleThTaWduZWQAAAAAAAAAAAMHutFHcA==", "chainId": 84, "height": 1169650, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let paramPrefix = "param_"
5+
6+let addressBook = Address(base58'3MwoVRAPfC2NKuuYJKHVAVtUFhq8MyTEfQh')
7+
8+let whitelistAddressKey = "whitelistAddress"
9+
10+let dAppWhitelistAddressKey = "dAppWhitelistAddress"
11+
12+let burnerAddressKey = "burnerAddress"
13+
14+let extractedAddressBook = extract(addressBook)
15+
16+func getStringParam (key) = match getString(this, (paramPrefix + key)) {
17+ case a: String =>
18+ a
19+ case _ =>
20+ throw("no string key")
21+}
22+
23+
24+func getIntParam (key) = match getInteger(this, (paramPrefix + key)) {
25+ case a: Int =>
26+ a
27+ case _ =>
28+ throw("no int key")
29+}
30+
31+
32+func getBooleanParam (key) = match getBoolean(this, (paramPrefix + key)) {
33+ case a: Boolean =>
34+ a
35+ case _ =>
36+ throw("no boolean key")
37+}
38+
39+
40+let issuerAssetId = base58'39vUMJs79cPpXPmGgdCzaDxLMkj1WaWd3UtnXiY9v192'
41+
42+let investmentAssetId = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'
43+
44+let investmentAssetIdIsWaves = false
45+
46+let ownerAddressString = getStringParam("issuerAccountAddress")
47+
48+let ownerAddress = extract(addressFromString(ownerAddressString))
49+
50+let assetDecimalsOffset = 1
51+
52+let tokensaleAmount = getIntParam("tokensaleAmount")
53+
54+let startTime = getIntParam("startTime")
55+
56+let endTime = getIntParam("endTime")
57+
58+let price = getIntParam("price")
59+
60+let softCapAmount = getIntParam("softCapAmount")
61+
62+let minPayment = getIntParam("minPayment")
63+
64+let swapAssetId = base58''
65+
66+let swapAmount = getIntParam("swapAmount")
67+
68+let swapPrice = getIntParam("swapPrice")
69+
70+let serviceFee = getIntParam("serviceFee")
71+
72+let serviceFeeAddressString = getStringParam("serviceFeeAddress")
73+
74+let companyType = 0
75+
76+let isTokensale = 0
77+
78+let isSwap = 1
79+
80+let isTokensaleAndSwap = 2
81+
82+let swapKeySumAmountPrefix = "swapSumAmount "
83+
84+let swapKeySumAssetsPrefix = "swapSumAssets "
85+
86+let swapKeyDistAssets = "swapAssets"
87+
88+let swapKeyCollectedAmount = "swapAmount"
89+
90+let keySumAmountPrefix = "sumAmount "
91+
92+let keySumPaidAmountPrefix = "paidAmount "
93+
94+let keySumAssetsPrefix = "sumAssets "
95+
96+let keyAllowAccountPrefix = "allow "
97+
98+let keyDistAssets = "assets"
99+
100+let keyCollectedAmount = "amount"
101+
102+let keyIssuer = "issuer"
103+
104+let ver = "6.0.0"
105+
106+let validState = 1000
107+
108+func getAddressFromBook (key) = match getString(addressBook, key) {
109+ case a: String =>
110+ Address(fromBase58String(a))
111+ case _ =>
112+ throw("no key")
113+}
114+
115+
116+let whitelistAddress = getAddressFromBook(whitelistAddressKey)
117+
118+let dAppWhitelistAddress = getAddressFromBook(dAppWhitelistAddressKey)
119+
120+let burnerAddress = getAddressFromBook(burnerAddressKey)
121+
122+func isTokensaleAllow () = if ((companyType == isTokensale))
123+ then true
124+ else (companyType == isTokensaleAndSwap)
125+
126+
127+func isSwapAllow () = if ((companyType == isSwap))
128+ then true
129+ else (companyType == isTokensaleAndSwap)
130+
131+
132+func isServiceFeeActive () = (serviceFee != 0)
133+
134+
135+func getCurrentTime () = {
136+ let blockInfo = value(blockInfoByHeight(height))
137+ (blockInfo.timestamp / 1000)
138+ }
139+
140+
141+func getInvestmentAssetIdForTransfer (isWaves,assetId) = if ((isWaves == false))
142+ then assetId
143+ else unit
144+
145+
146+func getCurrentPrice () = price
147+
148+
149+func getAmount (key) = match getInteger(this, key) {
150+ case a: Int =>
151+ a
152+ case _ =>
153+ 0
154+}
155+
156+
157+func hasStarted () = (getCurrentTime() >= startTime)
158+
159+
160+func tokensaleHasEnded () = {
161+ let assets = match getInteger(this, keyDistAssets) {
162+ case a: Int =>
163+ a
164+ case _ =>
165+ tokensaleAmount
166+ }
167+ if ((getCurrentTime() > endTime))
168+ then true
169+ else (assets == 0)
170+ }
171+
172+
173+func swapHasEnded () = {
174+ let assets = match getInteger(this, swapKeyDistAssets) {
175+ case a: Int =>
176+ a
177+ case _ =>
178+ swapAmount
179+ }
180+ if ((getCurrentTime() > endTime))
181+ then true
182+ else (assets == 0)
183+ }
184+
185+
186+func companyHasEnded () = if (if (isSwapAllow())
187+ then isTokensaleAllow()
188+ else false)
189+ then if (tokensaleHasEnded())
190+ then swapHasEnded()
191+ else false
192+ else if (isTokensaleAllow())
193+ then tokensaleHasEnded()
194+ else if (isSwapAllow())
195+ then swapHasEnded()
196+ else false
197+
198+
199+func getPayment (i) = match i.payment {
200+ case p: AttachedPayment =>
201+ let isPaymentOk = match p.assetId {
202+ case assetId: ByteVector =>
203+ if (!(investmentAssetIdIsWaves))
204+ then (assetId == investmentAssetId)
205+ else false
206+ case _ =>
207+ (investmentAssetIdIsWaves == true)
208+ }
209+ if (isPaymentOk)
210+ then if ((assetDecimalsOffset == 1))
211+ then if (((p.amount % price) == 0))
212+ then p.amount
213+ else throw("#0300 payment amount must be a multiple of token price")
214+ else p.amount
215+ else throw("#0200 Invalid asset ID of investment")
216+ case _ =>
217+ throw("#0100 Payment must be attached")
218+}
219+
220+
221+func getSwapPayment (i) = match i.payment {
222+ case p: AttachedPayment =>
223+ let isPaymentOk = match p.assetId {
224+ case assetId: ByteVector =>
225+ (assetId == swapAssetId)
226+ case _ =>
227+ false
228+ }
229+ if (isPaymentOk)
230+ then if ((assetDecimalsOffset == 1))
231+ then if (((p.amount % swapPrice) == 0))
232+ then p.amount
233+ else throw("payment amount must be a multiple of token price")
234+ else p.amount
235+ else throw("Invalid asset ID of investment")
236+ case _ =>
237+ throw("Payment must be attached")
238+}
239+
240+
241+func getInvestorAddressForWithdrawal (argAddress,callerAddress) = if ((size(argAddress) > 10))
242+ then argAddress
243+ else callerAddress
244+
245+
246+@Callable(i)
247+func deposit () = {
248+ let currentPrice = getCurrentPrice()
249+ let accountAmount = getAmount(keyCollectedAmount)
250+ let dAppStatus = match getInteger(dAppWhitelistAddress, toString(this)) {
251+ case a: Int =>
252+ a
253+ case _ =>
254+ -1000
255+ }
256+ if (!(isTokensaleAllow()))
257+ then throw("#1000 This deposit method is unsopperted for this company")
258+ else if (!(hasStarted()))
259+ then throw(((("#0001 The Tokensale works between " + toString(startTime)) + " and ") + toString(endTime)))
260+ else if (tokensaleHasEnded())
261+ then throw("#0002 The required amount has already been accumulated. If you are an investor, you can withdraw your funds.")
262+ else if ((dAppStatus == -1000))
263+ then throw("#0010 This company is unsopperted")
264+ else {
265+ let payment = getPayment(i)
266+ let currentKey = toBase58String(i.caller.bytes)
267+ let isAccountAllow = match getInteger(whitelistAddress, currentKey) {
268+ case a: Int =>
269+ a
270+ case _ =>
271+ -255
272+ }
273+ if ((currentKey == ownerAddressString))
274+ then throw("#0030 The issuer can`t invest in its own company")
275+ else if ((validState > isAccountAllow))
276+ then throw(((("#0020 Your account has no right to send funds. _ " + currentKey) + " ") + ownerAddressString))
277+ else {
278+ let accountAssets = match getInteger(this, keyDistAssets) {
279+ case a: Int =>
280+ a
281+ case _ =>
282+ tokensaleAmount
283+ }
284+ let tokensCalc = fraction(payment, assetDecimalsOffset, currentPrice)
285+ let minPaymentInAssets = fraction(minPayment, assetDecimalsOffset, currentPrice)
286+ if (if (if ((0 > (accountAssets - tokensCalc)))
287+ then true
288+ else (minPaymentInAssets > tokensCalc))
289+ then true
290+ else if ((tokensCalc != accountAssets))
291+ then (tokensCalc > (accountAssets - minPaymentInAssets))
292+ else false)
293+ then throw("#0400 Incorrect payment amount.")
294+ else {
295+ let newInvestorAmount = (getAmount((keySumAmountPrefix + currentKey)) + payment)
296+ let newInvestorAssets = (getAmount((keySumAssetsPrefix + currentKey)) + tokensCalc)
297+ let newAccountAssets = (accountAssets - tokensCalc)
298+ let newAccountAmount = (accountAmount + payment)
299+ WriteSet([DataEntry((keySumAmountPrefix + currentKey), newInvestorAmount), DataEntry((keySumAssetsPrefix + currentKey), newInvestorAssets), DataEntry(keyDistAssets, newAccountAssets), DataEntry(keyCollectedAmount, newAccountAmount)])
300+ }
301+ }
302+ }
303+ }
304+
305+
306+
307+@Callable(i)
308+func swapDeposit () = {
309+ let currentPrice = swapPrice
310+ let accountAmount = getAmount(swapKeyCollectedAmount)
311+ let dAppStatus = match getInteger(dAppWhitelistAddress, toString(this)) {
312+ case a: Int =>
313+ a
314+ case _ =>
315+ -1000
316+ }
317+ if (!(isSwapAllow()))
318+ then throw("#2000 This swap-deposit method is unsopperted for this company")
319+ else if (!(hasStarted()))
320+ then throw(((("The Tokensale works between " + toString(startTime)) + " and ") + toString(endTime)))
321+ else if (swapHasEnded())
322+ then throw("The required amount has already been accumulated. If you are an investor, you can withdraw your funds.")
323+ else if ((dAppStatus == -1000))
324+ then throw("#0010 This company is unsupported")
325+ else {
326+ let payment = getSwapPayment(i)
327+ let currentKey = toBase58String(i.caller.bytes)
328+ let isAccountAllow = match getInteger(whitelistAddress, currentKey) {
329+ case a: Int =>
330+ a
331+ case _ =>
332+ -255
333+ }
334+ if ((validState > isAccountAllow))
335+ then throw("#0020 Your account has no right to send funds.")
336+ else {
337+ let accountAssets = match getInteger(this, swapKeyDistAssets) {
338+ case a: Int =>
339+ a
340+ case _ =>
341+ swapAmount
342+ }
343+ let tokensCalc = fraction(payment, assetDecimalsOffset, currentPrice)
344+ if ((0 > (accountAssets - tokensCalc)))
345+ then throw("Incorrect payment amount.")
346+ else {
347+ let newInvestorAmount = (getAmount((swapKeySumAmountPrefix + currentKey)) + payment)
348+ let newInvestorAssets = (getAmount((swapKeySumAssetsPrefix + currentKey)) + tokensCalc)
349+ let newAccountAssets = (accountAssets - tokensCalc)
350+ let newAccountAmount = (accountAmount + payment)
351+ WriteSet([DataEntry((swapKeySumAmountPrefix + currentKey), newInvestorAmount), DataEntry((swapKeySumAssetsPrefix + currentKey), newInvestorAssets), DataEntry(swapKeyDistAssets, newAccountAssets), DataEntry(swapKeyCollectedAmount, newAccountAmount)])
352+ }
353+ }
354+ }
355+ }
356+
357+
358+
359+@Callable(i)
360+func withdrawal (address) = {
361+ let dAppStatus = match getInteger(dAppWhitelistAddress, toString(this)) {
362+ case a: Int =>
363+ a
364+ case _ =>
365+ 0
366+ }
367+ if ((dAppStatus == 0))
368+ then throw("#0030 Withdrawals are not available until the issuer passes verification")
369+ else {
370+ let currentKey = getInvestorAddressForWithdrawal(address, toBase58String(i.caller.bytes))
371+ let currentKeyAddress = extract(addressFromString(currentKey))
372+ let currentInvestorAssets = getAmount((keySumAssetsPrefix + currentKey))
373+ let currentInvestorAmount = getAmount((keySumAmountPrefix + currentKey))
374+ let currentInvestorSwapAssets = getAmount((swapKeySumAssetsPrefix + currentKey))
375+ let currentInvestorSwapAmount = getAmount((swapKeySumAmountPrefix + currentKey))
376+ let accountSwapAmount = getAmount(swapKeyCollectedAmount)
377+ let accountSwapAssets = getAmount(swapKeyDistAssets)
378+ let accountAmount = getAmount(keyCollectedAmount)
379+ let accountAssets = getAmount(keyDistAssets)
380+ let investmentAssetIdForTransfer = getInvestmentAssetIdForTransfer(investmentAssetIdIsWaves, investmentAssetId)
381+ if (!(companyHasEnded()))
382+ then throw("#0003 The Company is still active")
383+ else if (if ((currentKey == ownerAddressString))
384+ then (dAppStatus == 1)
385+ else false)
386+ then {
387+ let issuerAlreadyGotFunds = getAmount(keyIssuer)
388+ if ((issuerAlreadyGotFunds == 0))
389+ then if (if (isTokensaleAllow())
390+ then isSwapAllow()
391+ else false)
392+ then if ((accountAmount >= softCapAmount))
393+ then if (isServiceFeeActive())
394+ then {
395+ let serviceAmount = fraction(accountAmount, serviceFee, 100)
396+ let issuerAmount = (accountAmount - serviceAmount)
397+ let serviceFeeAddress = extract(addressFromString(serviceFeeAddressString))
398+ ScriptResult(WriteSet([DataEntry(keyIssuer, 1)]), TransferSet([ScriptTransfer(serviceFeeAddress, serviceAmount, investmentAssetIdForTransfer), ScriptTransfer(ownerAddress, issuerAmount, investmentAssetIdForTransfer), ScriptTransfer(ownerAddress, accountSwapAmount, swapAssetId)]))
399+ }
400+ else ScriptResult(WriteSet([DataEntry(keyIssuer, 1)]), TransferSet([ScriptTransfer(ownerAddress, accountAmount, investmentAssetIdForTransfer), ScriptTransfer(ownerAddress, accountSwapAmount, swapAssetId)]))
401+ else ScriptResult(WriteSet([DataEntry(keyIssuer, 1)]), TransferSet([ScriptTransfer(ownerAddress, accountSwapAmount, swapAssetId)]))
402+ else if (isTokensaleAllow())
403+ then if ((accountAmount >= softCapAmount))
404+ then if (isServiceFeeActive())
405+ then {
406+ let serviceAmount = fraction(accountAmount, serviceFee, 100)
407+ let issuerAmount = (accountAmount - serviceAmount)
408+ let serviceFeeAddress = extract(addressFromString(serviceFeeAddressString))
409+ ScriptResult(WriteSet([DataEntry(keyIssuer, 1)]), TransferSet([ScriptTransfer(serviceFeeAddress, serviceAmount, investmentAssetIdForTransfer), ScriptTransfer(ownerAddress, issuerAmount, investmentAssetIdForTransfer)]))
410+ }
411+ else ScriptResult(WriteSet([DataEntry(keyIssuer, 1)]), TransferSet([ScriptTransfer(ownerAddress, accountAmount, investmentAssetIdForTransfer)]))
412+ else throw("#0500 No funds for issuer")
413+ else ScriptResult(WriteSet([DataEntry(keyIssuer, 1)]), TransferSet([ScriptTransfer(ownerAddress, accountSwapAmount, swapAssetId)]))
414+ else throw("#0700 The issuer has already taken its share!")
415+ }
416+ else if (if ((currentInvestorAmount == 0))
417+ then (currentInvestorSwapAmount == 0)
418+ else false)
419+ then throw("#0600 Don't have money")
420+ else if (if (isTokensaleAllow())
421+ then isSwapAllow()
422+ else false)
423+ then if (if ((softCapAmount > accountAmount))
424+ then (dAppStatus == 1)
425+ else false)
426+ then ScriptResult(WriteSet([DataEntry((keySumAmountPrefix + currentKey), 0), DataEntry((keySumAssetsPrefix + currentKey), 0), DataEntry((swapKeySumAmountPrefix + currentKey), 0), DataEntry((swapKeySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(currentKeyAddress, currentInvestorAmount, investmentAssetIdForTransfer), ScriptTransfer(currentKeyAddress, currentInvestorSwapAssets, issuerAssetId)]))
427+ else if ((dAppStatus == 1))
428+ then ScriptResult(WriteSet([DataEntry((keySumAmountPrefix + currentKey), 0), DataEntry((keySumAssetsPrefix + currentKey), 0), DataEntry((swapKeySumAmountPrefix + currentKey), 0), DataEntry((swapKeySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(currentKeyAddress, currentInvestorAssets, issuerAssetId), ScriptTransfer(currentKeyAddress, currentInvestorSwapAssets, issuerAssetId)]))
429+ else ScriptResult(WriteSet([DataEntry((keySumAmountPrefix + currentKey), 0), DataEntry((keySumAssetsPrefix + currentKey), 0), DataEntry((swapKeySumAmountPrefix + currentKey), 0), DataEntry((swapKeySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(currentKeyAddress, currentInvestorAmount, investmentAssetIdForTransfer), ScriptTransfer(currentKeyAddress, currentInvestorSwapAmount, swapAssetId)]))
430+ else if (isTokensaleAllow())
431+ then if (if ((accountAmount >= softCapAmount))
432+ then (dAppStatus == 1)
433+ else false)
434+ then ScriptResult(WriteSet([DataEntry((keySumAmountPrefix + currentKey), 0), DataEntry((keySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(currentKeyAddress, currentInvestorAssets, issuerAssetId)]))
435+ else ScriptResult(WriteSet([DataEntry((keySumAmountPrefix + currentKey), 0), DataEntry((keySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(currentKeyAddress, currentInvestorAmount, investmentAssetIdForTransfer)]))
436+ else if ((dAppStatus == 1))
437+ then ScriptResult(WriteSet([DataEntry((swapKeySumAmountPrefix + currentKey), 0), DataEntry((swapKeySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(currentKeyAddress, currentInvestorSwapAssets, issuerAssetId)]))
438+ else ScriptResult(WriteSet([DataEntry((swapKeySumAmountPrefix + currentKey), 0), DataEntry((swapKeySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(currentKeyAddress, currentInvestorSwapAmount, swapAssetId)]))
439+ }
440+ }
441+
442+
443+@Verifier(tx)
444+func verify () = match tx {
445+ case tx: BurnTransaction =>
446+ true
447+ case tx: ReissueTransaction =>
448+ false
449+ case tx: TransferTransaction =>
450+ (tx.recipient == burnerAddress)
451+ case tx: DataTransaction|SetAssetScriptTransaction|SetScriptTransaction =>
452+ let txId = toBase58String(tx.id)
453+ let pAddress1 = getAddressFromBook("pAddress1")
454+ let pAddress2 = getAddressFromBook("pAddress2")
455+ let pAddress3 = getAddressFromBook("pAddress3")
456+ let pAddress4 = getAddressFromBook("pAddress4")
457+ let pAddress5 = getAddressFromBook("pAddress5")
458+ let pAddress6 = getAddressFromBook("pAddress6")
459+ let pAddress7 = getAddressFromBook("pAddress7")
460+ let pAddress8 = getAddressFromBook("pAddress8")
461+ let pKey1Signed = if (isDefined(getInteger(pAddress1, txId)))
462+ then 1
463+ else 0
464+ let pKey2Signed = if (isDefined(getInteger(pAddress2, txId)))
465+ then 1
466+ else 0
467+ let pKey3Signed = if (isDefined(getInteger(pAddress3, txId)))
468+ then 1
469+ else 0
470+ let pKey4Signed = if (isDefined(getInteger(pAddress4, txId)))
471+ then 1
472+ else 0
473+ let pKey5Signed = if (isDefined(getInteger(pAddress5, txId)))
474+ then 1
475+ else 0
476+ let pKey6Signed = if (isDefined(getInteger(pAddress6, txId)))
477+ then 1
478+ else 0
479+ let pKey7Signed = if (isDefined(getInteger(pAddress7, txId)))
480+ then 1
481+ else 0
482+ let pKey8Signed = if (isDefined(getInteger(pAddress8, txId)))
483+ then 1
484+ else 0
485+ ((((((((pKey1Signed + pKey2Signed) + pKey3Signed) + pKey4Signed) + pKey5Signed) + pKey6Signed) + pKey7Signed) + pKey8Signed) >= 3)
486+ case _ =>
487+ false
488+}
489+

github/deemru/w8io/026f985 
54.55 ms