tx · YLNuyTbzcVX4Rfy1ifmgqJuooALTeRVGAaFfRRSkQyJ

3N1BabWCmcTCQWWMuWbLFPoY4VfpuUsAyq1:  -0.01400000 Waves

2020.01.21 18:11 [864173] smart account 3N1BabWCmcTCQWWMuWbLFPoY4VfpuUsAyq1 > SELF 0.00000000 Waves

{ "type": 13, "id": "YLNuyTbzcVX4Rfy1ifmgqJuooALTeRVGAaFfRRSkQyJ", "fee": 1400000, "feeAssetId": null, "timestamp": 1579619413479, "version": 1, "sender": "3N1BabWCmcTCQWWMuWbLFPoY4VfpuUsAyq1", "senderPublicKey": "7ovV8A4Am8Lw7FJ3mP7C2YWX6CSR52H4DyepL62fEhjX", "proofs": [], "script": "base64:AAIDAAAAAAAAAAgIARIAEgASAAAAADcAAAAADWlzc3VlckFzc2V0SWQBAAAAILexI7u70o1qePQ/1A8a6MxDlsiV4x3u/6ZL/3TtTfWUAAAAABFpbnZlc3RtZW50QXNzZXRJZAEAAAAAAAAAABhpbnZlc3RtZW50QXNzZXRJZElzV2F2ZXMGAAAAAA5vd25lclB1YmxpY0tleQEAAAAglzekY6T8LiZa5ZUEuiXVPCIAPFt1/58SItbMDT/dhTQAAAAADG93bmVyQWRkcmVzcwkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQUAAAAOb3duZXJQdWJsaWNLZXkAAAAAEm93bmVyQWRkcmVzc1N0cmluZwIAAAAjM043cmRBcVQ2M2o4aUJVcW9WdDRpTW5ScmhGQ2syWUdvazYAAAAAE2Fzc2V0RGVjaW1hbHNPZmZzZXQAAAAAAAAAAAEAAAAAD3Rva2Vuc2FsZUFtb3VudAAAAAAAAAAD6AAAAAAJc3RhcnRUaW1lAAAAAABeGGToAAAAABFpbmNyZWFzZVByaWNlVGltZQAAAAAAXiwpxAAAAAAHZW5kVGltZQAAAAAAXiwpxAAAAAAFcHJpY2UAAAAAAAABhqAAAAAAC3ByaWNlU2Vjb25kAAAAAAAAAYagAAAAAA1zb2Z0Q2FwQW1vdW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AACCQAAZAAAAAIFAAAAC3BLZXkxU2lnbmVkBQAAAAtwS2V5MlNpZ25lZAUAAAALcEtleTNTaWduZWQFAAAAC3BLZXk0U2lnbmVkBQAAAAtwS2V5NVNpZ25lZAAAAAAAAAAAAwcPMlfs", "chainId": 84, "height": 864173, "spentComplexity": 0 } View: original | compacted Prev: J6yQNipdn9YavSDALY6mcJ5ZG8YSUuwN6ocijENuQfZ7 Next: none Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let issuerAssetId = base58'5aWWj4tzU736h7RhwreuffTGNxyRLWJysK1spWqTDetj'
4+let issuerAssetId = base58'DN4GmTRkkNYLSX4RjgzZbaSy2cTg1ahRLAhe23QwB2cs'
55
6-let investmentAssetId = base58'WAVES'
6+let investmentAssetId = base58''
77
88 let investmentAssetIdIsWaves = true
99
10-let ownerPublicKey = base58'8g5M2bS89AJWXCZJme4sGZ16Cy4sUfpoxDASmWbv6GVR'
10+let ownerPublicKey = base58'BBHmotEPzeYbapjncSTyaVf1eM4yiCPabPzMFqH5Mk8s'
1111
1212 let ownerAddress = addressFromPublicKey(ownerPublicKey)
1313
14-let ownerAddressString = "3N54ZH9NaSC3PsDJAcUr82gYaWUM95DbXd3"
14+let ownerAddressString = "3N7rdAqT63j8iBUqoVt4iMnRrhFCk2YGok6"
1515
1616 let assetDecimalsOffset = 1
1717
18-let tokensaleAmount = 100
18+let tokensaleAmount = 1000
1919
20-let startTime = 1579510500
20+let startTime = 1578657000
2121
22-let endTime = 1579769700
22+let increasePriceTime = 1579952580
2323
24-let price = 100000000
24+let endTime = 1579952580
2525
26-let softCapAmount = 1000000000
26+let price = 100000
2727
28-let minPayment = 100000000
28+let priceSecond = 100000
2929
30-let swapAssetId = base58'G7sJQse5JnS7BB2TTppRnEtjpoTnQKX6jpTPrnY2f8nn'
30+let softCapAmount = 10000
3131
32-let swapAmount = 10
32+let hardCapAmount = 1000
3333
34-let swapPrice = 100000000
34+let minPayment = 100000
3535
36-let companyType = 2
36+let swapAssetId = base58'AB1EjGamzeQdfjThY1MTabtCDDKYnK8YRgr9osK9GXoy'
37+
38+let swapAmount = 1000
39+
40+let swapPrice = 10000000
41+
42+let companyType = 1
3743
3844 let isTokensale = 0
3945
138144 }
139145 if ((getCurrentTime() > endTime))
140146 then true
141- else (swapAmount == 0)
147+ else (assets == 0)
142148 }
143149
144150
145-func companyHasEnded () = if (tokensaleHasEnded())
146- then swapHasEnded()
147- else false
151+func companyHasEnded () = if (if (isSwapAllow())
152+ then isTokensaleAllow()
153+ else false)
154+ then if (tokensaleHasEnded())
155+ then swapHasEnded()
156+ else false
157+ else if (isTokensaleAllow())
158+ then tokensaleHasEnded()
159+ else if (isSwapAllow())
160+ then swapHasEnded()
161+ else false
148162
149163
150164 func getPayment (i) = match i.payment {
317331 then {
318332 let issuerAlreadyGotFunds = getAmount(keyIssuer)
319333 if ((issuerAlreadyGotFunds == 0))
320- then {
321- let scriptTransferResult = nil
322- let updatedScriptTransferResult = if ((accountAmount >= softCapAmount))
323- then ScriptTransfer(ownerAddress, accountAmount, investmentAssetIdForTransfer) :: scriptTransferResult
324- else scriptTransferResult
325- let updatedScriptTransferResult1 = if ((accountAmount >= softCapAmount))
326- then ScriptTransfer(ownerAddress, accountSwapAmount, swapAssetId) :: updatedScriptTransferResult
327- else updatedScriptTransferResult
328- ScriptResult(WriteSet([DataEntry(keyIssuer, 1)]), TransferSet(updatedScriptTransferResult1))
329- }
334+ then if (if (isTokensaleAllow())
335+ then isSwapAllow()
336+ else false)
337+ then ScriptResult(WriteSet([DataEntry(keyIssuer, 1)]), TransferSet([ScriptTransfer(ownerAddress, accountAmount, investmentAssetIdForTransfer), ScriptTransfer(ownerAddress, accountSwapAmount, swapAssetId)]))
338+ else if (isTokensaleAllow())
339+ then ScriptResult(WriteSet([DataEntry(keyIssuer, 1)]), TransferSet([ScriptTransfer(ownerAddress, accountAmount, investmentAssetIdForTransfer)]))
340+ else ScriptResult(WriteSet([DataEntry(keyIssuer, 1)]), TransferSet([ScriptTransfer(ownerAddress, accountSwapAmount, swapAssetId)]))
330341 else throw("The issuer has already taken its share!")
331342 }
332343 else if (if ((currentInvestorAmount == 0))
333344 then (currentInvestorSwapAmount == 0)
334345 else false)
335346 then throw("Don't have money")
336- else {
337- let writeSetResult = nil
338- let scriptTransferResult = nil
339- let updatedWriteSetResult1 = if ((currentInvestorAmount != 0))
340- then [writeSetResult, DataEntry((keySumAmountPrefix + currentKey), 0), DataEntry((keySumAssetsPrefix + currentKey), 0)]
341- else writeSetResult
342- let updatedWriteSetResult2 = if ((currentInvestorSwapAmount != 0))
343- then [updatedWriteSetResult1, DataEntry((swapKeySumAmountPrefix + currentKey), 0), DataEntry((swapKeySumAssetsPrefix + currentKey), 0)]
344- else updatedWriteSetResult1
345- let updatedScriptTransferResult = if ((currentInvestorAmount != 0))
347+ else if (if (isTokensaleAllow())
348+ then isSwapAllow()
349+ else false)
350+ then if ((dAppStatus == 1))
351+ then ScriptResult(WriteSet([DataEntry((keySumAmountPrefix + currentKey), 0), DataEntry((keySumAssetsPrefix + currentKey), 0), DataEntry((swapKeySumAmountPrefix + currentKey), 0), DataEntry((swapKeySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(i.caller, currentInvestorAssets, issuerAssetId), ScriptTransfer(i.caller, currentInvestorSwapAssets, issuerAssetId)]))
352+ else ScriptResult(WriteSet([DataEntry((keySumAmountPrefix + currentKey), 0), DataEntry((keySumAssetsPrefix + currentKey), 0), DataEntry((swapKeySumAmountPrefix + currentKey), 0), DataEntry((swapKeySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(i.caller, currentInvestorAmount, investmentAssetIdForTransfer), ScriptTransfer(i.caller, currentInvestorSwapAmount, swapAssetId)]))
353+ else if (isTokensaleAllow())
346354 then if (if ((accountAmount >= softCapAmount))
347355 then (dAppStatus == 1)
348356 else false)
349- then ScriptTransfer(i.caller, currentInvestorAssets, issuerAssetId) :: scriptTransferResult
350- else ScriptTransfer(i.caller, currentInvestorAmount, investmentAssetIdForTransfer) :: scriptTransferResult
351- else scriptTransferResult
352- let updatedScriptTransferResult1 = if ((currentInvestorSwapAmount != 0))
353- then ScriptTransfer(i.caller, currentInvestorSwapAssets, issuerAssetId) :: updatedScriptTransferResult
354- else updatedScriptTransferResult
355- ScriptResult(WriteSet(writeSetResult), TransferSet(scriptTransferResult))
356- }
357+ then ScriptResult(WriteSet([DataEntry((keySumAmountPrefix + currentKey), 0), DataEntry((keySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(i.caller, currentInvestorAssets, issuerAssetId)]))
358+ else ScriptResult(WriteSet([DataEntry((keySumAmountPrefix + currentKey), 0), DataEntry((keySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(i.caller, currentInvestorAmount, investmentAssetIdForTransfer)]))
359+ else if ((dAppStatus == 1))
360+ then ScriptResult(WriteSet([DataEntry((swapKeySumAmountPrefix + currentKey), 0), DataEntry((swapKeySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(i.caller, currentInvestorSwapAssets, issuerAssetId)]))
361+ else ScriptResult(WriteSet([DataEntry((swapKeySumAmountPrefix + currentKey), 0), DataEntry((swapKeySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(i.caller, currentInvestorSwapAmount, swapAssetId)]))
357362 }
358363 }
359364
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let issuerAssetId = base58'5aWWj4tzU736h7RhwreuffTGNxyRLWJysK1spWqTDetj'
4+let issuerAssetId = base58'DN4GmTRkkNYLSX4RjgzZbaSy2cTg1ahRLAhe23QwB2cs'
55
6-let investmentAssetId = base58'WAVES'
6+let investmentAssetId = base58''
77
88 let investmentAssetIdIsWaves = true
99
10-let ownerPublicKey = base58'8g5M2bS89AJWXCZJme4sGZ16Cy4sUfpoxDASmWbv6GVR'
10+let ownerPublicKey = base58'BBHmotEPzeYbapjncSTyaVf1eM4yiCPabPzMFqH5Mk8s'
1111
1212 let ownerAddress = addressFromPublicKey(ownerPublicKey)
1313
14-let ownerAddressString = "3N54ZH9NaSC3PsDJAcUr82gYaWUM95DbXd3"
14+let ownerAddressString = "3N7rdAqT63j8iBUqoVt4iMnRrhFCk2YGok6"
1515
1616 let assetDecimalsOffset = 1
1717
18-let tokensaleAmount = 100
18+let tokensaleAmount = 1000
1919
20-let startTime = 1579510500
20+let startTime = 1578657000
2121
22-let endTime = 1579769700
22+let increasePriceTime = 1579952580
2323
24-let price = 100000000
24+let endTime = 1579952580
2525
26-let softCapAmount = 1000000000
26+let price = 100000
2727
28-let minPayment = 100000000
28+let priceSecond = 100000
2929
30-let swapAssetId = base58'G7sJQse5JnS7BB2TTppRnEtjpoTnQKX6jpTPrnY2f8nn'
30+let softCapAmount = 10000
3131
32-let swapAmount = 10
32+let hardCapAmount = 1000
3333
34-let swapPrice = 100000000
34+let minPayment = 100000
3535
36-let companyType = 2
36+let swapAssetId = base58'AB1EjGamzeQdfjThY1MTabtCDDKYnK8YRgr9osK9GXoy'
37+
38+let swapAmount = 1000
39+
40+let swapPrice = 10000000
41+
42+let companyType = 1
3743
3844 let isTokensale = 0
3945
4046 let isSwap = 1
4147
4248 let isTokensaleAndSwap = 2
4349
4450 let swapKeySumAmountPrefix = "swapSumAmount "
4551
4652 let swapKeySumAssetsPrefix = "swapSumAssets "
4753
4854 let swapKeyDistAssets = "swapAssets"
4955
5056 let swapKeyCollectedAmount = "swapAmount"
5157
5258 let keySumAmountPrefix = "sumAmount "
5359
5460 let keySumPaidAmountPrefix = "paidAmount "
5561
5662 let keySumAssetsPrefix = "sumAssets "
5763
5864 let keyAllowAccountPrefix = "allow "
5965
6066 let keyDistAssets = "assets"
6167
6268 let keyCollectedAmount = "amount"
6369
6470 let keyIssuer = "issuer"
6571
6672 let whitelistAddress = Address(base58'3N6DwWxT82nGJUwBwd7L514r2u71gr7WhwJ')
6773
6874 let dAppWhitelistAddress = Address(base58'3N1SPvLZgv6FMfe5WNUtnPzt3okYxcJhYnR')
6975
7076 let pAddress1 = addressFromString("3NCVDaT1ASbRd42hBSw4EG6ojGVRGtvMiz1")
7177
7278 let pAddress2 = addressFromString("3Ms2kTAxdrcXDxwedfbNjSi6ewGCUqt3heZ")
7379
7480 let pAddress3 = addressFromString("3N6ognm7xnQSFiownS1Df1LacJUQXvfDFLe")
7581
7682 let pAddress4 = addressFromString("3MtVCmN9MZbWf9qxiMFoEPBrdc2fLp3SvuC")
7783
7884 let pAddress5 = addressFromString("3MuWG8gsTK4RQBsm97sMCuUXW99JvRxwYSg")
7985
8086 let ver = "4.0.0-testnet"
8187
8288 let validState = 1000
8389
8490 func isTokensaleAllow () = if ((companyType == isTokensale))
8591 then true
8692 else (companyType == isTokensaleAndSwap)
8793
8894
8995 func isSwapAllow () = if ((companyType == isSwap))
9096 then true
9197 else (companyType == isTokensaleAndSwap)
9298
9399
94100 func getCurrentTime () = {
95101 let blockInfo = value(blockInfoByHeight(height))
96102 (blockInfo.timestamp / 1000)
97103 }
98104
99105
100106 func getInvestmentAssetIdForTransfer (isWaves,assetId) = if ((isWaves == false))
101107 then assetId
102108 else unit
103109
104110
105111 func getCurrentPrice () = price
106112
107113
108114 func getAmount (key) = match getInteger(this, key) {
109115 case a: Int =>
110116 a
111117 case _ =>
112118 0
113119 }
114120
115121
116122 func hasStarted () = (getCurrentTime() >= startTime)
117123
118124
119125 func tokensaleHasEnded () = {
120126 let assets = match getInteger(this, keyDistAssets) {
121127 case a: Int =>
122128 a
123129 case _ =>
124130 tokensaleAmount
125131 }
126132 if ((getCurrentTime() > endTime))
127133 then true
128134 else (assets == 0)
129135 }
130136
131137
132138 func swapHasEnded () = {
133139 let assets = match getInteger(this, swapKeyDistAssets) {
134140 case a: Int =>
135141 a
136142 case _ =>
137143 swapAmount
138144 }
139145 if ((getCurrentTime() > endTime))
140146 then true
141- else (swapAmount == 0)
147+ else (assets == 0)
142148 }
143149
144150
145-func companyHasEnded () = if (tokensaleHasEnded())
146- then swapHasEnded()
147- else false
151+func companyHasEnded () = if (if (isSwapAllow())
152+ then isTokensaleAllow()
153+ else false)
154+ then if (tokensaleHasEnded())
155+ then swapHasEnded()
156+ else false
157+ else if (isTokensaleAllow())
158+ then tokensaleHasEnded()
159+ else if (isSwapAllow())
160+ then swapHasEnded()
161+ else false
148162
149163
150164 func getPayment (i) = match i.payment {
151165 case p: AttachedPayment =>
152166 let isPaymentOk = match p.assetId {
153167 case assetId: ByteVector =>
154168 if (!(investmentAssetIdIsWaves))
155169 then (assetId == investmentAssetId)
156170 else false
157171 case _ =>
158172 (investmentAssetIdIsWaves == true)
159173 }
160174 if (isPaymentOk)
161175 then if ((assetDecimalsOffset == 1))
162176 then if (((p.amount % price) == 0))
163177 then p.amount
164178 else throw("payment amount must be a multiple of token price")
165179 else p.amount
166180 else throw("Invalid asset ID of investment")
167181 case _ =>
168182 throw("Payment must be attached")
169183 }
170184
171185
172186 func getSwapPayment (i) = match i.payment {
173187 case p: AttachedPayment =>
174188 let isPaymentOk = match p.assetId {
175189 case assetId: ByteVector =>
176190 (assetId == swapAssetId)
177191 case _ =>
178192 false
179193 }
180194 if (isPaymentOk)
181195 then if ((assetDecimalsOffset == 1))
182196 then if (((p.amount % swapPrice) == 0))
183197 then p.amount
184198 else throw("payment amount must be a multiple of token price")
185199 else p.amount
186200 else throw("Invalid asset ID of investment")
187201 case _ =>
188202 throw("Payment must be attached")
189203 }
190204
191205
192206 @Callable(i)
193207 func deposit () = {
194208 let currentPrice = getCurrentPrice()
195209 let accountAmount = getAmount(keyCollectedAmount)
196210 if (!(isTokensaleAllow()))
197211 then throw("This deposit method is unsopperted for this company")
198212 else if (!(hasStarted()))
199213 then throw(((("The Tokensale works between " + toString(startTime)) + " and ") + toString(endTime)))
200214 else if (tokensaleHasEnded())
201215 then throw("The required amount has already been accumulated. If you are an investor, you can withdraw your funds.")
202216 else {
203217 let payment = getPayment(i)
204218 let currentKey = toBase58String(i.caller.bytes)
205219 let isAccountAllow = match getInteger(whitelistAddress, currentKey) {
206220 case a: Int =>
207221 a
208222 case _ =>
209223 -255
210224 }
211225 if ((validState > isAccountAllow))
212226 then throw("Your account has no right to send funds.")
213227 else {
214228 let accountAssets = match getInteger(this, keyDistAssets) {
215229 case a: Int =>
216230 a
217231 case _ =>
218232 tokensaleAmount
219233 }
220234 let tokensCalc = ((payment * assetDecimalsOffset) / currentPrice)
221235 let minPaymentInAssets = ((minPayment * assetDecimalsOffset) / currentPrice)
222236 if (if (if ((0 > (accountAssets - tokensCalc)))
223237 then true
224238 else (minPaymentInAssets > tokensCalc))
225239 then true
226240 else if ((tokensCalc != accountAssets))
227241 then (tokensCalc > (accountAssets - minPaymentInAssets))
228242 else false)
229243 then throw("Incorrect payment amount.")
230244 else {
231245 let newInvestorAmount = (getAmount((keySumAmountPrefix + currentKey)) + payment)
232246 let newInvestorAssets = (getAmount((keySumAssetsPrefix + currentKey)) + tokensCalc)
233247 let newAccountAssets = (accountAssets - tokensCalc)
234248 let newAccountAmount = (accountAmount + payment)
235249 WriteSet([DataEntry((keySumAmountPrefix + currentKey), newInvestorAmount), DataEntry((keySumAssetsPrefix + currentKey), newInvestorAssets), DataEntry(keyDistAssets, newAccountAssets), DataEntry(keyCollectedAmount, newAccountAmount)])
236250 }
237251 }
238252 }
239253 }
240254
241255
242256
243257 @Callable(i)
244258 func swapDeposit () = {
245259 let currentPrice = swapPrice
246260 let accountAmount = getAmount(swapKeyCollectedAmount)
247261 if (!(isSwapAllow()))
248262 then throw("This swap-deposit method is unsopperted for this company")
249263 else if (!(hasStarted()))
250264 then throw(((("The Tokensale works between " + toString(startTime)) + " and ") + toString(endTime)))
251265 else if (swapHasEnded())
252266 then throw("The required amount has already been accumulated. If you are an investor, you can withdraw your funds.")
253267 else {
254268 let payment = getSwapPayment(i)
255269 let currentKey = toBase58String(i.caller.bytes)
256270 let isAccountAllow = match getInteger(whitelistAddress, currentKey) {
257271 case a: Int =>
258272 a
259273 case _ =>
260274 -255
261275 }
262276 if ((validState > isAccountAllow))
263277 then throw("Your account has no right to send funds.")
264278 else {
265279 let accountAssets = match getInteger(this, swapKeyDistAssets) {
266280 case a: Int =>
267281 a
268282 case _ =>
269283 swapAmount
270284 }
271285 let tokensCalc = ((payment * assetDecimalsOffset) / currentPrice)
272286 if ((0 > (accountAssets - tokensCalc)))
273287 then throw("Incorrect payment amount.")
274288 else {
275289 let newInvestorAmount = (getAmount((swapKeySumAmountPrefix + currentKey)) + payment)
276290 let newInvestorAssets = (getAmount((swapKeySumAssetsPrefix + currentKey)) + tokensCalc)
277291 let newAccountAssets = (accountAssets - tokensCalc)
278292 let newAccountAmount = (accountAmount + payment)
279293 WriteSet([DataEntry((swapKeySumAmountPrefix + currentKey), newInvestorAmount), DataEntry((swapKeySumAssetsPrefix + currentKey), newInvestorAssets), DataEntry(swapKeyDistAssets, newAccountAssets), DataEntry(swapKeyCollectedAmount, newAccountAmount)])
280294 }
281295 }
282296 }
283297 }
284298
285299
286300
287301 @Callable(i)
288302 func withdrawal () = {
289303 let dAppStatus = match getInteger(dAppWhitelistAddress, toString(this)) {
290304 case a: Int =>
291305 a
292306 case _ =>
293307 0
294308 }
295309 if ((dAppStatus == 0))
296310 then throw("Withdrawals are not available until the issuer passes verification")
297311 else {
298312 let currentKey = toBase58String(i.caller.bytes)
299313 let currentInvestorAssets = getAmount((keySumAssetsPrefix + currentKey))
300314 let currentInvestorAmount = getAmount((keySumAmountPrefix + currentKey))
301315 let currentInvestorSwapAssets = getAmount((swapKeySumAssetsPrefix + currentKey))
302316 let currentInvestorSwapAmount = getAmount((swapKeySumAmountPrefix + currentKey))
303317 let accountSwapAmount = getAmount(swapKeyCollectedAmount)
304318 let accountSwapAssets = getAmount(swapKeyDistAssets)
305319 let accountAmount = getAmount(keyCollectedAmount)
306320 let accountAssets = getAmount(keyDistAssets)
307321 let investmentAssetIdForTransfer = getInvestmentAssetIdForTransfer(investmentAssetIdIsWaves, investmentAssetId)
308322 if (!(companyHasEnded()))
309323 then throw("The Company is still active")
310324 else if (if (if ((currentKey == ownerAddressString))
311325 then if ((accountAmount >= softCapAmount))
312326 then true
313327 else (accountSwapAmount != 0)
314328 else false)
315329 then (dAppStatus == 1)
316330 else false)
317331 then {
318332 let issuerAlreadyGotFunds = getAmount(keyIssuer)
319333 if ((issuerAlreadyGotFunds == 0))
320- then {
321- let scriptTransferResult = nil
322- let updatedScriptTransferResult = if ((accountAmount >= softCapAmount))
323- then ScriptTransfer(ownerAddress, accountAmount, investmentAssetIdForTransfer) :: scriptTransferResult
324- else scriptTransferResult
325- let updatedScriptTransferResult1 = if ((accountAmount >= softCapAmount))
326- then ScriptTransfer(ownerAddress, accountSwapAmount, swapAssetId) :: updatedScriptTransferResult
327- else updatedScriptTransferResult
328- ScriptResult(WriteSet([DataEntry(keyIssuer, 1)]), TransferSet(updatedScriptTransferResult1))
329- }
334+ then if (if (isTokensaleAllow())
335+ then isSwapAllow()
336+ else false)
337+ then ScriptResult(WriteSet([DataEntry(keyIssuer, 1)]), TransferSet([ScriptTransfer(ownerAddress, accountAmount, investmentAssetIdForTransfer), ScriptTransfer(ownerAddress, accountSwapAmount, swapAssetId)]))
338+ else if (isTokensaleAllow())
339+ then ScriptResult(WriteSet([DataEntry(keyIssuer, 1)]), TransferSet([ScriptTransfer(ownerAddress, accountAmount, investmentAssetIdForTransfer)]))
340+ else ScriptResult(WriteSet([DataEntry(keyIssuer, 1)]), TransferSet([ScriptTransfer(ownerAddress, accountSwapAmount, swapAssetId)]))
330341 else throw("The issuer has already taken its share!")
331342 }
332343 else if (if ((currentInvestorAmount == 0))
333344 then (currentInvestorSwapAmount == 0)
334345 else false)
335346 then throw("Don't have money")
336- else {
337- let writeSetResult = nil
338- let scriptTransferResult = nil
339- let updatedWriteSetResult1 = if ((currentInvestorAmount != 0))
340- then [writeSetResult, DataEntry((keySumAmountPrefix + currentKey), 0), DataEntry((keySumAssetsPrefix + currentKey), 0)]
341- else writeSetResult
342- let updatedWriteSetResult2 = if ((currentInvestorSwapAmount != 0))
343- then [updatedWriteSetResult1, DataEntry((swapKeySumAmountPrefix + currentKey), 0), DataEntry((swapKeySumAssetsPrefix + currentKey), 0)]
344- else updatedWriteSetResult1
345- let updatedScriptTransferResult = if ((currentInvestorAmount != 0))
347+ else if (if (isTokensaleAllow())
348+ then isSwapAllow()
349+ else false)
350+ then if ((dAppStatus == 1))
351+ then ScriptResult(WriteSet([DataEntry((keySumAmountPrefix + currentKey), 0), DataEntry((keySumAssetsPrefix + currentKey), 0), DataEntry((swapKeySumAmountPrefix + currentKey), 0), DataEntry((swapKeySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(i.caller, currentInvestorAssets, issuerAssetId), ScriptTransfer(i.caller, currentInvestorSwapAssets, issuerAssetId)]))
352+ else ScriptResult(WriteSet([DataEntry((keySumAmountPrefix + currentKey), 0), DataEntry((keySumAssetsPrefix + currentKey), 0), DataEntry((swapKeySumAmountPrefix + currentKey), 0), DataEntry((swapKeySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(i.caller, currentInvestorAmount, investmentAssetIdForTransfer), ScriptTransfer(i.caller, currentInvestorSwapAmount, swapAssetId)]))
353+ else if (isTokensaleAllow())
346354 then if (if ((accountAmount >= softCapAmount))
347355 then (dAppStatus == 1)
348356 else false)
349- then ScriptTransfer(i.caller, currentInvestorAssets, issuerAssetId) :: scriptTransferResult
350- else ScriptTransfer(i.caller, currentInvestorAmount, investmentAssetIdForTransfer) :: scriptTransferResult
351- else scriptTransferResult
352- let updatedScriptTransferResult1 = if ((currentInvestorSwapAmount != 0))
353- then ScriptTransfer(i.caller, currentInvestorSwapAssets, issuerAssetId) :: updatedScriptTransferResult
354- else updatedScriptTransferResult
355- ScriptResult(WriteSet(writeSetResult), TransferSet(scriptTransferResult))
356- }
357+ then ScriptResult(WriteSet([DataEntry((keySumAmountPrefix + currentKey), 0), DataEntry((keySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(i.caller, currentInvestorAssets, issuerAssetId)]))
358+ else ScriptResult(WriteSet([DataEntry((keySumAmountPrefix + currentKey), 0), DataEntry((keySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(i.caller, currentInvestorAmount, investmentAssetIdForTransfer)]))
359+ else if ((dAppStatus == 1))
360+ then ScriptResult(WriteSet([DataEntry((swapKeySumAmountPrefix + currentKey), 0), DataEntry((swapKeySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(i.caller, currentInvestorSwapAssets, issuerAssetId)]))
361+ else ScriptResult(WriteSet([DataEntry((swapKeySumAmountPrefix + currentKey), 0), DataEntry((swapKeySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(i.caller, currentInvestorSwapAmount, swapAssetId)]))
357362 }
358363 }
359364
360365
361366 @Verifier(tx)
362367 func verify () = match tx {
363368 case tx: SetAssetScriptTransaction|SetScriptTransaction =>
364369 let pKey1Signed = if (isDefined(getInteger(extract(pAddress1), toBase58String(tx.id))))
365370 then 1
366371 else 0
367372 let pKey2Signed = if (isDefined(getInteger(extract(pAddress2), toBase58String(tx.id))))
368373 then 1
369374 else 0
370375 let pKey3Signed = if (isDefined(getInteger(extract(pAddress3), toBase58String(tx.id))))
371376 then 1
372377 else 0
373378 let pKey4Signed = if (isDefined(getInteger(extract(pAddress4), toBase58String(tx.id))))
374379 then 1
375380 else 0
376381 let pKey5Signed = if (isDefined(getInteger(extract(pAddress5), toBase58String(tx.id))))
377382 then 1
378383 else 0
379384 (((((pKey1Signed + pKey2Signed) + pKey3Signed) + pKey4Signed) + pKey5Signed) >= 3)
380385 case _ =>
381386 false
382387 }
383388

github/deemru/w8io/169f3d6 
83.00 ms