tx · Esh5k4ph7cDZmcGZkHDXZ26VkWy94uBydRiwvTzr8ZDg

3MtH2YqowuAUiduq7ayz5e2q4uTPEa3ZpCp:  -0.01000000 Waves

2020.03.24 13:24 [923344] smart account 3MtH2YqowuAUiduq7ayz5e2q4uTPEa3ZpCp > SELF 0.00000000 Waves

{ "type": 13, "id": "Esh5k4ph7cDZmcGZkHDXZ26VkWy94uBydRiwvTzr8ZDg", "fee": 1000000, "feeAssetId": null, "timestamp": 1585045490027, "version": 1, "sender": "3MtH2YqowuAUiduq7ayz5e2q4uTPEa3ZpCp", "senderPublicKey": "CpGJV7NXbo95zSija7agSmW5YQZHaSEt4VCnYjrbF3EB", "proofs": [ "2K367SzFLVbduZjFstu9xaE1sQGpiJr44aumR2EgzfHbmphccCanuqdZEnqwdXkWqctyBrGBNeThgPeq6ciuJT5u" ], "script": "base64:AAIDAAAAAAAAABQIARIECgICARIDCgEIEgMKAQISAAAAADYAAAAABVdBVkVTAAAAAAAF9eEAAAAAAANVU0QAAAAAAAAAAGQAAAAAFHJvb3RBY2NvdW50UHVibGljS2V5AQAAACCrcYNar2nAbanHx55vZ87tY+HzNn/CgJS1Smp6PXDDFQAAAAAKY29tbWlzc2lvbgAAAAAAAAAAAAAAAAAMb3V0Y29tZUxpbWl0AAAAAAA7msoAAAAAABNwcmVzYWxlT3V0Y29tZUxpbWl0AAAAAAAF9eEAAAAAAApjdXJyZW5jeUlkAQAAACAiZD8evmBG6RFqExPcpjP+Fn4H+Xfps/IV/JlJKjAKNwAAAAAMcHJlc2FsZVByaWNlAAAAAAAAAMNQAAAAAAVwcmljZQAAAAAAAAehIAAAAAAJcHJpY2VTdGVwAAAAAAAAAYagAAAAAA9wcmljZVN0ZXBQZXJpb2QAAAAAAAX14QAAAAAAF291dGNvbWVEZWNpbWFsc011bHRpcGx5AAAAAAAAD0JAAAAAAAlzdGF0dXNLZXkCAAAABnN0YXR1cwAAAAAJd2lubmVyS2V5AgAAAAZ3aW5uZXIAAAAAC3BhdX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AAAQUAAAAPaXNQYWlkb3V0U3RhdHVzCQEAAAAgdGhyb3dVbnN1cHBvcnRlZEV2ZW50U3RhdHVzRXJyb3IAAAAACQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAEnJvb3RBY2NvdW50QWRkcmVzcwkAA+sAAAACBQAAAAR0aGlzBQAAAApjdXJyZW5jeUlkBQAAAApjdXJyZW5jeUlkBQAAAANuaWwAAAAA0Mg0pQ==", "chainId": 84, "height": 923344, "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 WAVES = 100000000
5+
6+let USD = 100
7+
8+let rootAccountPublicKey = base58'CYF7FumpbZzyHMFuFQRQfo9XC9veJemd3XuBkusRCcAg'
9+
10+let commission = 0
11+
12+let outcomeLimit = 1000000000
13+
14+let presaleOutcomeLimit = 100000000
15+
16+let currencyId = base58'3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC'
17+
18+let presalePrice = 50000
19+
20+let price = 500000
21+
22+let priceStep = 100000
23+
24+let priceStepPeriod = 100000000
25+
26+let outcomeDecimalsMultiply = 1000000
27+
28+let statusKey = "status"
29+
30+let winnerKey = "winner"
31+
32+let pauseStatus = "pause"
33+
34+let presaleStatus = "presale"
35+
36+let liveStatus = "live"
37+
38+let completeStatus = "complete"
39+
40+let paidoutStatus = "paidout"
41+
42+func throwSalesIsNotAvailableInStatusError (status) = throw((("salesIsNotAvailableInStatusError" + ",") + status))
43+
44+
45+func throwNonexistentOutcomeAssetError (outcomeAssetId) = throw(("nonexistentOutcomeAssetError," + toBase58String(outcomeAssetId)))
46+
47+
48+func throwNotEnoughOutcomeAssetsInPresaleStockError (amountToBuy,balance) = throw((((("notEnoughOutcomeAssetsInPresaleStockError" + ",") + toString(balance)) + ",") + toString(amountToBuy)))
49+
50+
51+func throwNotEnoughOutcomeAssetsInSaleStockError (amountToBuy,balance) = throw((((("notEnoughOutcomeAssetsInSaleStockError" + ",") + toString(balance)) + ",") + toString(amountToBuy)))
52+
53+
54+func throwUnsupportedEventPaymentAssetError (paymentCurrency) = throw((((("unsupportedEventPaymentAssetError" + ",") + toBase58String(currencyId)) + ",") + toBase58String(paymentCurrency)))
55+
56+
57+func throwInsufficientPaymentError (receivedPaymentAmount,expectedPaymentAmount) = throw((((("insufficientPaymentError" + ",") + toString(expectedPaymentAmount)) + ",") + toString(receivedPaymentAmount)))
58+
59+
60+func throwUnsupportedEventStatusError () = throw("unsupportedEventStatusError")
61+
62+
63+func throwIsNotRootCallerError () = throw("isNotRootCallerError")
64+
65+
66+let noPaymentError = "noPaymentError"
67+
68+func throwUndefinedError () = throw("undefinedError")
69+
70+
71+func getIntOr (key,default) = if (isDefined(getInteger(this, key)))
72+ then getIntegerValue(this, key)
73+ else default
74+
75+
76+func getStringOr (key,default) = if (isDefined(getInteger(this, key)))
77+ then getStringValue(this, key)
78+ else default
79+
80+
81+func getInt (key) = getIntegerValue(this, key)
82+
83+
84+func setInt (key,value) = DataEntry(key, value)
85+
86+
87+func getStr (key) = getStringValue(this, key)
88+
89+
90+func setStr (key,value) = DataEntry(key, value)
91+
92+
93+func setBytes (key,value) = DataEntry(key, value)
94+
95+
96+func getBytes (key) = getBinaryValue(this, key)
97+
98+
99+func isSupportedStatus (status) = if (if (if (if ((status == pauseStatus))
100+ then true
101+ else (status == presaleStatus))
102+ then true
103+ else (status == liveStatus))
104+ then true
105+ else (status == completeStatus))
106+ then true
107+ else (status == paidoutStatus)
108+
109+
110+func getStatus () = getStr(statusKey)
111+
112+
113+func setStatus (status) = setStr(statusKey, status)
114+
115+
116+func getWinner () = getBytes(winnerKey)
117+
118+
119+func setWinner (winner) = setBytes(winnerKey, winner)
120+
121+
122+func getPayment (i) = valueOrErrorMessage(i.payment, noPaymentError)
123+
124+
125+func getPaymentAssetId (payment) = match payment.assetId {
126+ case assetId: ByteVector =>
127+ assetId
128+ case assetId: Unit =>
129+ fromBase58String("WAVES")
130+ case _ =>
131+ throw()
132+}
133+
134+
135+func getIntegerFromAccount (accountAddress,key) = match getInteger(accountAddress, key) {
136+ case i: Int =>
137+ i
138+ case _ =>
139+ 0
140+}
141+
142+
143+func arithmeticSeries (a,d,n) = ((n * ((2 * a) + ((n - 1) * d))) / 2)
144+
145+
146+func getPresaleOutcomeAmountSalesKey (outcomeAssetId) = ("presaleOutcomeAmountSales_" + toBase58String(outcomeAssetId))
147+
148+
149+func getPresaleOutcomeAmountSales (outcomeAssetId) = {
150+ let presaleOutcomeAmountSalesKey = getPresaleOutcomeAmountSalesKey(outcomeAssetId)
151+ getIntegerFromAccount(this, presaleOutcomeAmountSalesKey)
152+ }
153+
154+
155+func ceil (x,y) = if (((x % y) > 0))
156+ then ((x / y) + 1)
157+ else (x / y)
158+
159+
160+func sum (n) = {
161+ let x = (n / priceStepPeriod)
162+ let fullSum = arithmeticSeries(price, priceStep, x)
163+ ((fullSum * priceStepPeriod) + ((arithmeticSeries(price, priceStep, (x + 1)) - fullSum) * (n % priceStepPeriod)))
164+ }
165+
166+
167+func isRootCaller (i) = {
168+ let callerAccountPubKey = toBase58String(i.callerPublicKey)
169+ let rootAccountPubKey = toBase58String(rootAccountPublicKey)
170+ if ((callerAccountPubKey == rootAccountPubKey))
171+ then true
172+ else false
173+ }
174+
175+
176+func amountToPay (alreadySold,amountToBuy) = (sum((alreadySold + amountToBuy)) - sum(alreadySold))
177+
178+
179+func presaleStrategy (customerAddress,outcomeAssetId,paymentAmount,outcomeAmountToBuy,outcomeAmountEventBalance) = {
180+ let outcomeAmountAlreadySold = (outcomeLimit - outcomeAmountEventBalance)
181+ let outcomeAmountAvailableInPresalePeriod = (presaleOutcomeLimit - outcomeAmountAlreadySold)
182+ let outcomeRequiredPaymentAmount = ceil((presalePrice * outcomeAmountToBuy), outcomeDecimalsMultiply)
183+ if ((outcomeAmountToBuy > outcomeAmountAvailableInPresalePeriod))
184+ then throwNotEnoughOutcomeAssetsInPresaleStockError(outcomeAmountToBuy, outcomeAmountAvailableInPresalePeriod)
185+ else if ((paymentAmount != outcomeRequiredPaymentAmount))
186+ then throwInsufficientPaymentError(paymentAmount, outcomeRequiredPaymentAmount)
187+ else {
188+ let presaleOutcomeAmountSalesKey = getPresaleOutcomeAmountSalesKey(outcomeAssetId)
189+ let currentPresaleOutcomeAmountSales = getPresaleOutcomeAmountSales(outcomeAssetId)
190+ let newPresaleOutcomeAmountSales = (currentPresaleOutcomeAmountSales + outcomeAmountToBuy)
191+ let writeSet = WriteSet([DataEntry(presaleOutcomeAmountSalesKey, newPresaleOutcomeAmountSales)])
192+ let transferSet = TransferSet([ScriptTransfer(customerAddress, outcomeAmountToBuy, outcomeAssetId)])
193+ ScriptResult(writeSet, transferSet)
194+ }
195+ }
196+
197+
198+func liveStrategy (customerAddress,outcomeAssetId,paymentAmount,outcomeAmountToBuy,outcomeAmountEventBalance) = {
199+ let presaleOutcomeAmountSales = getPresaleOutcomeAmountSales(outcomeAssetId)
200+ let outcomeAmountAlreadySold = ((outcomeLimit - presaleOutcomeAmountSales) - outcomeAmountEventBalance)
201+ let outcomeRequiredPaymentAmount = ceil(amountToPay(outcomeAmountAlreadySold, outcomeAmountToBuy), outcomeDecimalsMultiply)
202+ if ((outcomeAmountToBuy > outcomeAmountEventBalance))
203+ then throwNotEnoughOutcomeAssetsInSaleStockError(outcomeAmountToBuy, outcomeAmountEventBalance)
204+ else if ((paymentAmount != outcomeRequiredPaymentAmount))
205+ then throwInsufficientPaymentError(paymentAmount, outcomeRequiredPaymentAmount)
206+ else TransferSet([ScriptTransfer(customerAddress, outcomeAmountToBuy, outcomeAssetId)])
207+ }
208+
209+
210+@Callable(i)
211+func buyOutcomeToken (outcomeAssetId,outcomeAmountToBuy) = {
212+ let customerAddress = i.caller
213+ let outcomeAmountEventBalance = assetBalance(this, outcomeAssetId)
214+ let status = getStatus()
215+ let payment = getPayment(i)
216+ let paymentAmount = payment.amount
217+ let paymentAssetId = getPaymentAssetId(payment)
218+ let isNotSupportedPaymentAsset = (paymentAssetId != currencyId)
219+ let isPresaleStatus = (status == presaleStatus)
220+ let isLiveStatus = (status == liveStatus)
221+ let isSalesAvailable = if (isPresaleStatus)
222+ then true
223+ else isLiveStatus
224+ if ((outcomeAmountEventBalance == 0))
225+ then throwNonexistentOutcomeAssetError(outcomeAssetId)
226+ else if (isNotSupportedPaymentAsset)
227+ then throwUnsupportedEventPaymentAssetError(paymentAssetId)
228+ else if (!(isSalesAvailable))
229+ then throwSalesIsNotAvailableInStatusError(status)
230+ else if (isPresaleStatus)
231+ then presaleStrategy(customerAddress, outcomeAssetId, paymentAmount, outcomeAmountToBuy, outcomeAmountEventBalance)
232+ else if (isLiveStatus)
233+ then liveStrategy(customerAddress, outcomeAssetId, paymentAmount, outcomeAmountToBuy, outcomeAmountEventBalance)
234+ else throwUndefinedError()
235+ }
236+
237+
238+
239+@Callable(i)
240+func changeStatus (newStatus) = if (!(isSupportedStatus(newStatus)))
241+ then throwUnsupportedEventStatusError()
242+ else if (!(isRootCaller(i)))
243+ then throwIsNotRootCallerError()
244+ else WriteSet([setStatus(newStatus)])
245+
246+
247+
248+@Callable(i)
249+func changeWinner (newWinner) = if (!(isRootCaller(i)))
250+ then throwIsNotRootCallerError()
251+ else {
252+ let status = getStatus()
253+ let isCompleteStatus = (status == completeStatus)
254+ if (isCompleteStatus)
255+ then WriteSet([setWinner(newWinner)])
256+ else WriteSet([setWinner(newWinner), setStatus(completeStatus)])
257+ }
258+
259+
260+
261+@Callable(i)
262+func collectCommission () = if (!(isRootCaller(i)))
263+ then throwIsNotRootCallerError()
264+ else {
265+ let status = getStatus()
266+ let isPaidoutStatus = (status == paidoutStatus)
267+ let rootAccountAddress = addressFromPublicKey(rootAccountPublicKey)
268+ if (!(isPaidoutStatus))
269+ then throwUnsupportedEventStatusError()
270+ else TransferSet([ScriptTransfer(rootAccountAddress, assetBalance(this, currencyId), currencyId)])
271+ }
272+
273+

github/deemru/w8io/026f985 
23.39 ms