tx · 7cXJYqcGk4MxbUsG12MB1HjZNhTf2mNH1yJieC5qAWMp

3N3RcihSXvvFJKeg7ToxxUGRBmGzUV5goqx:  -0.01000000 Waves

2020.01.22 15:12 [865449] smart account 3N3RcihSXvvFJKeg7ToxxUGRBmGzUV5goqx > SELF 0.00000000 Waves

{ "type": 13, "id": "7cXJYqcGk4MxbUsG12MB1HjZNhTf2mNH1yJieC5qAWMp", "fee": 1000000, "feeAssetId": null, "timestamp": 1579695147079, "version": 1, "sender": "3N3RcihSXvvFJKeg7ToxxUGRBmGzUV5goqx", "senderPublicKey": "2eehfxjfjhsxaBfh6v6aixMTeFcNBGxC7PZxWoJtkSrc", "proofs": [ "DCBUToRSFSj5LyzWAVAqmEHwojF6MqPH5h56HDz8m2ZyUkFFfJZZQe13m8Zzj7CgKTsTJZ6iYyF4Xo39VWmh4Bx" ], "script": "base64:AAIDAAAAAAAAAAgIARIAEgASAAAAADQAAAAADWlzc3VlckFzc2V0SWQBAAAAIDOzSY2gE5QrVYaL7BFPLBVAmp+9fdE0qmxcJwxV4puNAAAAABFpbnZlc3RtZW50QXNzZXRJZAEAAAAEE6vZMwAAAAAYaW52ZXN0bWVudEFzc2V0SWRJc1dhdmVzBgAAAAAOb3duZXJQdWJsaWNLZXkBAAAAIFW5iBVeieGtpgt/ff0ReLKl3TNxb+qvDV5+yS7vyUQDAAAAAAxvd25lckFkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEFAAAADm93bmVyUHVibGljS2V5AAAAABJvd25lckFkZHJlc3NTdHJpbmcCAAAAIzNNeWdYd2dTRWd4elljREpvYnlNckFodmlkUFNuelFDVGFEAAAAABNhc3NldERlY2ltYWxzT2Zmc2V0AAAAAAAAAAABAAAAAA90b2tlbnNhbGVBbW91bnQAAAAAAAAAAGQAAAAACXN0YXJ0VGltZQAAAAAAXig4UAAAAAAHZW5kVGltZQAAAAAAXi17CAAAAAAFcHJpY2UAAAAAAAX14QAAAAAADXNvZnRDY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wS2V5M1NpZ25lZAUAAAALcEtleTRTaWduZWQFAAAAC3BLZXk1U2lnbmVkAAAAAAAAAAADB5noMXE=", "chainId": 84, "height": 865449, "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 issuerAssetId = base58'4UpMbtQuJFK5eD94oMF8dAHNfkTXi3Engp8rWH1Cfgkt'
5+
6+let investmentAssetId = base58'WAVES'
7+
8+let investmentAssetIdIsWaves = true
9+
10+let ownerPublicKey = base58'6mdjtG9pDarp6zRWvPDVgFasxSKrVLqVAxb6LpnoqZbG'
11+
12+let ownerAddress = addressFromPublicKey(ownerPublicKey)
13+
14+let ownerAddressString = "3MygXwgSEgxzYcDJobyMrAhvidPSnzQCTaD"
15+
16+let assetDecimalsOffset = 1
17+
18+let tokensaleAmount = 100
19+
20+let startTime = 1579694160
21+
22+let endTime = 1580038920
23+
24+let price = 100000000
25+
26+let softCapAmount = 1000000000
27+
28+let minPayment = 100000000
29+
30+let swapAssetId = base58'G7sJQse5JnS7BB2TTppRnEtjpoTnQKX6jpTPrnY2f8nn'
31+
32+let swapAmount = 10
33+
34+let swapPrice = 100000000
35+
36+let companyType = 2
37+
38+let isTokensale = 0
39+
40+let isSwap = 1
41+
42+let isTokensaleAndSwap = 2
43+
44+let swapKeySumAmountPrefix = "swapSumAmount "
45+
46+let swapKeySumAssetsPrefix = "swapSumAssets "
47+
48+let swapKeyDistAssets = "swapAssets"
49+
50+let swapKeyCollectedAmount = "swapAmount"
51+
52+let keySumAmountPrefix = "sumAmount "
53+
54+let keySumPaidAmountPrefix = "paidAmount "
55+
56+let keySumAssetsPrefix = "sumAssets "
57+
58+let keyAllowAccountPrefix = "allow "
59+
60+let keyDistAssets = "assets"
61+
62+let keyCollectedAmount = "amount"
63+
64+let keyIssuer = "issuer"
65+
66+let whitelistAddress = Address(base58'3N6DwWxT82nGJUwBwd7L514r2u71gr7WhwJ')
67+
68+let dAppWhitelistAddress = Address(base58'3N1SPvLZgv6FMfe5WNUtnPzt3okYxcJhYnR')
69+
70+let pAddress1 = addressFromString("3NCVDaT1ASbRd42hBSw4EG6ojGVRGtvMiz1")
71+
72+let pAddress2 = addressFromString("3Ms2kTAxdrcXDxwedfbNjSi6ewGCUqt3heZ")
73+
74+let pAddress3 = addressFromString("3N6ognm7xnQSFiownS1Df1LacJUQXvfDFLe")
75+
76+let pAddress4 = addressFromString("3MtVCmN9MZbWf9qxiMFoEPBrdc2fLp3SvuC")
77+
78+let pAddress5 = addressFromString("3MuWG8gsTK4RQBsm97sMCuUXW99JvRxwYSg")
79+
80+let ver = "4.0.0-testnet"
81+
82+let validState = 1000
83+
84+func isTokensaleAllow () = if ((companyType == isTokensale))
85+ then true
86+ else (companyType == isTokensaleAndSwap)
87+
88+
89+func isSwapAllow () = if ((companyType == isSwap))
90+ then true
91+ else (companyType == isTokensaleAndSwap)
92+
93+
94+func getCurrentTime () = {
95+ let blockInfo = value(blockInfoByHeight(height))
96+ (blockInfo.timestamp / 1000)
97+ }
98+
99+
100+func getInvestmentAssetIdForTransfer (isWaves,assetId) = if ((isWaves == false))
101+ then assetId
102+ else unit
103+
104+
105+func getCurrentPrice () = price
106+
107+
108+func getAmount (key) = match getInteger(this, key) {
109+ case a: Int =>
110+ a
111+ case _ =>
112+ 0
113+}
114+
115+
116+func hasStarted () = (getCurrentTime() >= startTime)
117+
118+
119+func tokensaleHasEnded () = {
120+ let assets = match getInteger(this, keyDistAssets) {
121+ case a: Int =>
122+ a
123+ case _ =>
124+ tokensaleAmount
125+ }
126+ if ((getCurrentTime() > endTime))
127+ then true
128+ else (assets == 0)
129+ }
130+
131+
132+func swapHasEnded () = {
133+ let assets = match getInteger(this, swapKeyDistAssets) {
134+ case a: Int =>
135+ a
136+ case _ =>
137+ swapAmount
138+ }
139+ if ((getCurrentTime() > endTime))
140+ then true
141+ else (assets == 0)
142+ }
143+
144+
145+func companyHasEnded () = if (if (isSwapAllow())
146+ then isTokensaleAllow()
147+ else false)
148+ then if (tokensaleHasEnded())
149+ then swapHasEnded()
150+ else false
151+ else if (isTokensaleAllow())
152+ then tokensaleHasEnded()
153+ else if (isSwapAllow())
154+ then swapHasEnded()
155+ else false
156+
157+
158+func getPayment (i) = match i.payment {
159+ case p: AttachedPayment =>
160+ let isPaymentOk = match p.assetId {
161+ case assetId: ByteVector =>
162+ if (!(investmentAssetIdIsWaves))
163+ then (assetId == investmentAssetId)
164+ else false
165+ case _ =>
166+ (investmentAssetIdIsWaves == true)
167+ }
168+ if (isPaymentOk)
169+ then if ((assetDecimalsOffset == 1))
170+ then if (((p.amount % price) == 0))
171+ then p.amount
172+ else throw("payment amount must be a multiple of token price")
173+ else p.amount
174+ else throw("Invalid asset ID of investment")
175+ case _ =>
176+ throw("Payment must be attached")
177+}
178+
179+
180+func getSwapPayment (i) = match i.payment {
181+ case p: AttachedPayment =>
182+ let isPaymentOk = match p.assetId {
183+ case assetId: ByteVector =>
184+ (assetId == swapAssetId)
185+ case _ =>
186+ false
187+ }
188+ if (isPaymentOk)
189+ then if ((assetDecimalsOffset == 1))
190+ then if (((p.amount % swapPrice) == 0))
191+ then p.amount
192+ else throw("payment amount must be a multiple of token price")
193+ else p.amount
194+ else throw("Invalid asset ID of investment")
195+ case _ =>
196+ throw("Payment must be attached")
197+}
198+
199+
200+@Callable(i)
201+func deposit () = {
202+ let currentPrice = getCurrentPrice()
203+ let accountAmount = getAmount(keyCollectedAmount)
204+ if (!(isTokensaleAllow()))
205+ then throw("This deposit method is unsopperted for this company")
206+ else if (!(hasStarted()))
207+ then throw(((("The Tokensale works between " + toString(startTime)) + " and ") + toString(endTime)))
208+ else if (tokensaleHasEnded())
209+ then throw("The required amount has already been accumulated. If you are an investor, you can withdraw your funds.")
210+ else {
211+ let payment = getPayment(i)
212+ let currentKey = toBase58String(i.caller.bytes)
213+ let isAccountAllow = match getInteger(whitelistAddress, currentKey) {
214+ case a: Int =>
215+ a
216+ case _ =>
217+ -255
218+ }
219+ if ((validState > isAccountAllow))
220+ then throw("Your account has no right to send funds.")
221+ else {
222+ let accountAssets = match getInteger(this, keyDistAssets) {
223+ case a: Int =>
224+ a
225+ case _ =>
226+ tokensaleAmount
227+ }
228+ let tokensCalc = ((payment * assetDecimalsOffset) / currentPrice)
229+ let minPaymentInAssets = ((minPayment * assetDecimalsOffset) / currentPrice)
230+ if (if (if ((0 > (accountAssets - tokensCalc)))
231+ then true
232+ else (minPaymentInAssets > tokensCalc))
233+ then true
234+ else if ((tokensCalc != accountAssets))
235+ then (tokensCalc > (accountAssets - minPaymentInAssets))
236+ else false)
237+ then throw("Incorrect payment amount.")
238+ else {
239+ let newInvestorAmount = (getAmount((keySumAmountPrefix + currentKey)) + payment)
240+ let newInvestorAssets = (getAmount((keySumAssetsPrefix + currentKey)) + tokensCalc)
241+ let newAccountAssets = (accountAssets - tokensCalc)
242+ let newAccountAmount = (accountAmount + payment)
243+ WriteSet([DataEntry((keySumAmountPrefix + currentKey), newInvestorAmount), DataEntry((keySumAssetsPrefix + currentKey), newInvestorAssets), DataEntry(keyDistAssets, newAccountAssets), DataEntry(keyCollectedAmount, newAccountAmount)])
244+ }
245+ }
246+ }
247+ }
248+
249+
250+
251+@Callable(i)
252+func swapDeposit () = {
253+ let currentPrice = swapPrice
254+ let accountAmount = getAmount(swapKeyCollectedAmount)
255+ if (!(isSwapAllow()))
256+ then throw("This swap-deposit method is unsopperted for this company")
257+ else if (!(hasStarted()))
258+ then throw(((("The Tokensale works between " + toString(startTime)) + " and ") + toString(endTime)))
259+ else if (swapHasEnded())
260+ then throw("The required amount has already been accumulated. If you are an investor, you can withdraw your funds.")
261+ else {
262+ let payment = getSwapPayment(i)
263+ let currentKey = toBase58String(i.caller.bytes)
264+ let isAccountAllow = match getInteger(whitelistAddress, currentKey) {
265+ case a: Int =>
266+ a
267+ case _ =>
268+ -255
269+ }
270+ if ((validState > isAccountAllow))
271+ then throw("Your account has no right to send funds.")
272+ else {
273+ let accountAssets = match getInteger(this, swapKeyDistAssets) {
274+ case a: Int =>
275+ a
276+ case _ =>
277+ swapAmount
278+ }
279+ let tokensCalc = ((payment * assetDecimalsOffset) / currentPrice)
280+ if ((0 > (accountAssets - tokensCalc)))
281+ then throw("Incorrect payment amount.")
282+ else {
283+ let newInvestorAmount = (getAmount((swapKeySumAmountPrefix + currentKey)) + payment)
284+ let newInvestorAssets = (getAmount((swapKeySumAssetsPrefix + currentKey)) + tokensCalc)
285+ let newAccountAssets = (accountAssets - tokensCalc)
286+ let newAccountAmount = (accountAmount + payment)
287+ WriteSet([DataEntry((swapKeySumAmountPrefix + currentKey), newInvestorAmount), DataEntry((swapKeySumAssetsPrefix + currentKey), newInvestorAssets), DataEntry(swapKeyDistAssets, newAccountAssets), DataEntry(swapKeyCollectedAmount, newAccountAmount)])
288+ }
289+ }
290+ }
291+ }
292+
293+
294+
295+@Callable(i)
296+func withdrawal () = {
297+ let dAppStatus = match getInteger(dAppWhitelistAddress, toString(this)) {
298+ case a: Int =>
299+ a
300+ case _ =>
301+ 0
302+ }
303+ if ((dAppStatus == 0))
304+ then throw("Withdrawals are not available until the issuer passes verification")
305+ else {
306+ let currentKey = toBase58String(i.caller.bytes)
307+ let currentInvestorAssets = getAmount((keySumAssetsPrefix + currentKey))
308+ let currentInvestorAmount = getAmount((keySumAmountPrefix + currentKey))
309+ let currentInvestorSwapAssets = getAmount((swapKeySumAssetsPrefix + currentKey))
310+ let currentInvestorSwapAmount = getAmount((swapKeySumAmountPrefix + currentKey))
311+ let accountSwapAmount = getAmount(swapKeyCollectedAmount)
312+ let accountSwapAssets = getAmount(swapKeyDistAssets)
313+ let accountAmount = getAmount(keyCollectedAmount)
314+ let accountAssets = getAmount(keyDistAssets)
315+ let investmentAssetIdForTransfer = getInvestmentAssetIdForTransfer(investmentAssetIdIsWaves, investmentAssetId)
316+ if (!(companyHasEnded()))
317+ then throw("The Company is still active")
318+ else if (if (if ((currentKey == ownerAddressString))
319+ then if ((accountAmount >= softCapAmount))
320+ then true
321+ else (accountSwapAmount != 0)
322+ else false)
323+ then (dAppStatus == 1)
324+ else false)
325+ then {
326+ let issuerAlreadyGotFunds = getAmount(keyIssuer)
327+ if ((issuerAlreadyGotFunds == 0))
328+ then if (if (isTokensaleAllow())
329+ then isSwapAllow()
330+ else false)
331+ then ScriptResult(WriteSet([DataEntry(keyIssuer, 1)]), TransferSet([ScriptTransfer(ownerAddress, accountAmount, investmentAssetIdForTransfer), ScriptTransfer(ownerAddress, accountSwapAmount, swapAssetId)]))
332+ else if (isTokensaleAllow())
333+ then ScriptResult(WriteSet([DataEntry(keyIssuer, 1)]), TransferSet([ScriptTransfer(ownerAddress, accountAmount, investmentAssetIdForTransfer)]))
334+ else ScriptResult(WriteSet([DataEntry(keyIssuer, 1)]), TransferSet([ScriptTransfer(ownerAddress, accountSwapAmount, swapAssetId)]))
335+ else throw("The issuer has already taken its share!")
336+ }
337+ else if (if ((currentInvestorAmount == 0))
338+ then (currentInvestorSwapAmount == 0)
339+ else false)
340+ then throw("Don't have money")
341+ else if (if (isTokensaleAllow())
342+ then isSwapAllow()
343+ else false)
344+ then if ((dAppStatus == 1))
345+ 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)]))
346+ 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)]))
347+ else if (isTokensaleAllow())
348+ then if (if ((accountAmount >= softCapAmount))
349+ then (dAppStatus == 1)
350+ else false)
351+ then ScriptResult(WriteSet([DataEntry((keySumAmountPrefix + currentKey), 0), DataEntry((keySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(i.caller, currentInvestorAssets, issuerAssetId)]))
352+ else ScriptResult(WriteSet([DataEntry((keySumAmountPrefix + currentKey), 0), DataEntry((keySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(i.caller, currentInvestorAmount, investmentAssetIdForTransfer)]))
353+ else if ((dAppStatus == 1))
354+ then ScriptResult(WriteSet([DataEntry((swapKeySumAmountPrefix + currentKey), 0), DataEntry((swapKeySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(i.caller, currentInvestorSwapAssets, issuerAssetId)]))
355+ else ScriptResult(WriteSet([DataEntry((swapKeySumAmountPrefix + currentKey), 0), DataEntry((swapKeySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(i.caller, currentInvestorSwapAmount, swapAssetId)]))
356+ }
357+ }
358+
359+
360+@Verifier(tx)
361+func verify () = match tx {
362+ case tx: SetAssetScriptTransaction|SetScriptTransaction =>
363+ let pKey1Signed = if (isDefined(getInteger(extract(pAddress1), toBase58String(tx.id))))
364+ then 1
365+ else 0
366+ let pKey2Signed = if (isDefined(getInteger(extract(pAddress2), toBase58String(tx.id))))
367+ then 1
368+ else 0
369+ let pKey3Signed = if (isDefined(getInteger(extract(pAddress3), toBase58String(tx.id))))
370+ then 1
371+ else 0
372+ let pKey4Signed = if (isDefined(getInteger(extract(pAddress4), toBase58String(tx.id))))
373+ then 1
374+ else 0
375+ let pKey5Signed = if (isDefined(getInteger(extract(pAddress5), toBase58String(tx.id))))
376+ then 1
377+ else 0
378+ (((((pKey1Signed + pKey2Signed) + pKey3Signed) + pKey4Signed) + pKey5Signed) >= 3)
379+ case _ =>
380+ false
381+}
382+

github/deemru/w8io/169f3d6 
49.71 ms