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