tx · BYKed9Vgho3gvtZ8cx9CiNCyso6xWTLrGYeiQrkg6QLx 3N8k7BVfEQkCenWo8CnwECTyHqFtDBksxAj: -0.01000000 Waves 2020.01.28 13:37 [874050] smart account 3N8k7BVfEQkCenWo8CnwECTyHqFtDBksxAj > SELF 0.00000000 Waves
{ "type": 13, "id": "BYKed9Vgho3gvtZ8cx9CiNCyso6xWTLrGYeiQrkg6QLx", "fee": 1000000, "feeAssetId": null, "timestamp": 1580207854854, "version": 1, "sender": "3N8k7BVfEQkCenWo8CnwECTyHqFtDBksxAj", "senderPublicKey": "4uBnZm67EFwRkXJFnHfVqTWJPsw2SWXfcRAiLDaWc9aN", "proofs": [ "2etianjbwg374xwY5PGYJK7H2UNqgqUi1imKuf2zsi5fpKPxsc1RAATTjNY6CDim5tCku8H9BsXMjGobz2kFq1GW" ], "script": "base64:AAIDAAAAAAAAAA0IARIECgICARIDCgEIAAAAMgAAAAAFV0FWRVMAAAAAAAX14QAAAAAAA1VTRAAAAAAAAAAAZAAAAAAUcm9vdEFjY291bnRQdWJsaWNLZXkBAAAAIKtxg1qvacBtqcfHnm9nzu1j4fM2f8KAlLVKano9cMMVAAAAAA5saWdhQ29tbWlzc2lvbgAAAAAAAAAAAAAAAAAVdG90YWxBc3NldHNQZXJPdXRjb21lAAAAAAAAACcQAAAAABpwcmVzYWxlTWF4QXNzZXRzUGVyT3V0Y29tZQAAAAAAAAALuAAAAAAPZXZlbnRDdXJyZW5jeUlkAQAAACCzq+2OuNxhJLJhVt602yIUBLswcJEXYkm4f70ULNMzNwAAAAAMcHJlc2FsZVByaWNlAAAAAAAAAAAyAAAAAAlsaXZlUHJpY2UAAAAAAAAAAGQAAAAADWxpdmVQcmljZVN0ZXAAAAAAAAAAABQAAAAAE2xpdmVQcmljZVN0ZXBQZXJpb2QAAAAAAAAAA+gAAAAACXN0YXR1c0tleQIAAAAGc3RhdHVzAAAAAAtwYXVzZVN0YXR1cwIAAAAFcGF1c2UAAAAADXByZXNhbGVTdG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entComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
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 ligaCommission = 0 | |
11 | + | ||
12 | + | let totalAssetsPerOutcome = 10000 | |
13 | + | ||
14 | + | let presaleMaxAssetsPerOutcome = 3000 | |
15 | + | ||
16 | + | let eventCurrencyId = base58'D6N2rAqWN6ZCWnCeNFWLGqqjS6nJLeK4m19XiuhdDenr' | |
17 | + | ||
18 | + | let presalePrice = 50 | |
19 | + | ||
20 | + | let livePrice = 100 | |
21 | + | ||
22 | + | let livePriceStep = 20 | |
23 | + | ||
24 | + | let livePriceStepPeriod = 1000 | |
25 | + | ||
26 | + | let statusKey = "status" | |
27 | + | ||
28 | + | let pauseStatus = "pause" | |
29 | + | ||
30 | + | let presaleStatus = "presale" | |
31 | + | ||
32 | + | let liveStatus = "live" | |
33 | + | ||
34 | + | let completeStatus = "complete" | |
35 | + | ||
36 | + | let payoutStatus = "payout" | |
37 | + | ||
38 | + | func throwSalesIsNotAvailableInStatusError (status) = throw((("salesIsNotAvailableInStatusError" + ",") + status)) | |
39 | + | ||
40 | + | ||
41 | + | func throwNonexistentOutcomeAssetError (outcomeAssetId) = throw(("nonexistentOutcomeAssetError," + toBase58String(outcomeAssetId))) | |
42 | + | ||
43 | + | ||
44 | + | func throwNotEnoughOutcomeAssetsInPresaleStockError (amountToBuy,balance) = throw((((("notEnoughOutcomeAssetsInPresaleStockError" + ",") + toString(balance)) + ",") + toString(amountToBuy))) | |
45 | + | ||
46 | + | ||
47 | + | func throwNotEnoughOutcomeAssetsInSaleStockError (amountToBuy,balance) = throw((((("notEnoughOutcomeAssetsInSaleStockError" + ",") + toString(balance)) + ",") + toString(amountToBuy))) | |
48 | + | ||
49 | + | ||
50 | + | func throwUnsupportedEventPaymentAssetError (paymentCurrency) = throw((((("unsupportedEventPaymentAssetError" + ",") + toBase58String(eventCurrencyId)) + ",") + toBase58String(paymentCurrency))) | |
51 | + | ||
52 | + | ||
53 | + | func throwInsufficientPaymentError (receivedPaymentAmount,expectedPaymentAmount) = throw((((("insufficientPaymentError" + ",") + toString(expectedPaymentAmount)) + ",") + toString(receivedPaymentAmount))) | |
54 | + | ||
55 | + | ||
56 | + | func throwUnsupportedEventStatusError () = throw("unsupportedEventStatusError") | |
57 | + | ||
58 | + | ||
59 | + | func throwIsNotRootCallerError () = throw("isNotRootCallerError") | |
60 | + | ||
61 | + | ||
62 | + | let noPaymentError = "noPaymentError" | |
63 | + | ||
64 | + | func throwUndefinedError () = throw("undefinedError") | |
65 | + | ||
66 | + | ||
67 | + | func getIntOr (key,default) = if (isDefined(getInteger(this, key))) | |
68 | + | then getIntegerValue(this, key) | |
69 | + | else default | |
70 | + | ||
71 | + | ||
72 | + | func getStringOr (key,default) = if (isDefined(getInteger(this, key))) | |
73 | + | then getStringValue(this, key) | |
74 | + | else default | |
75 | + | ||
76 | + | ||
77 | + | func getInt (key) = getIntegerValue(this, key) | |
78 | + | ||
79 | + | ||
80 | + | func setInt (key,value) = DataEntry(key, value) | |
81 | + | ||
82 | + | ||
83 | + | func getStr (key) = getStringValue(this, key) | |
84 | + | ||
85 | + | ||
86 | + | func setStr (key,value) = DataEntry(key, value) | |
87 | + | ||
88 | + | ||
89 | + | func setBytes (key,value) = DataEntry(key, value) | |
90 | + | ||
91 | + | ||
92 | + | func getBytes (key) = getBinaryValue(this, key) | |
93 | + | ||
94 | + | ||
95 | + | func isSupportedStatus (status) = if (if (if (if ((status == pauseStatus)) | |
96 | + | then true | |
97 | + | else (status == presaleStatus)) | |
98 | + | then true | |
99 | + | else (status == liveStatus)) | |
100 | + | then true | |
101 | + | else (status == completeStatus)) | |
102 | + | then true | |
103 | + | else (status == payoutStatus) | |
104 | + | ||
105 | + | ||
106 | + | func getStatus () = getStr(statusKey) | |
107 | + | ||
108 | + | ||
109 | + | func setStatus (status) = setStr(statusKey, status) | |
110 | + | ||
111 | + | ||
112 | + | func getPayment (i) = valueOrErrorMessage(i.payment, noPaymentError) | |
113 | + | ||
114 | + | ||
115 | + | func getPaymentAssetId (payment) = match payment.assetId { | |
116 | + | case assetId: ByteVector => | |
117 | + | assetId | |
118 | + | case assetId: Unit => | |
119 | + | fromBase58String("WAVES") | |
120 | + | case _ => | |
121 | + | throw() | |
122 | + | } | |
123 | + | ||
124 | + | ||
125 | + | func getIntegerFromAccount (accountAddress,key) = match getInteger(accountAddress, key) { | |
126 | + | case i: Int => | |
127 | + | i | |
128 | + | case _ => | |
129 | + | 0 | |
130 | + | } | |
131 | + | ||
132 | + | ||
133 | + | func arithmeticSeries (a,d,n) = ((n * ((2 * a) + ((n - 1) * d))) / 2) | |
134 | + | ||
135 | + | ||
136 | + | func getPresaleOutcomeAmountSalesKey (outcomeAssetId) = ("presaleOutcomeAmountSales_" + toBase58String(outcomeAssetId)) | |
137 | + | ||
138 | + | ||
139 | + | func getPresaleOutcomeAmountSales (outcomeAssetId) = { | |
140 | + | let presaleOutcomeAmountSalesKey = getPresaleOutcomeAmountSalesKey(outcomeAssetId) | |
141 | + | getIntegerFromAccount(this, presaleOutcomeAmountSalesKey) | |
142 | + | } | |
143 | + | ||
144 | + | ||
145 | + | func sum (n) = { | |
146 | + | let x = (n / livePriceStepPeriod) | |
147 | + | let fullSum = arithmeticSeries(livePrice, livePriceStep, x) | |
148 | + | ((fullSum * livePriceStepPeriod) + ((arithmeticSeries(livePrice, livePriceStep, (x + 1)) - fullSum) * (n % livePriceStepPeriod))) | |
149 | + | } | |
150 | + | ||
151 | + | ||
152 | + | func isRootCaller (i) = { | |
153 | + | let callerAccountPubKey = toBase58String(i.callerPublicKey) | |
154 | + | let rootAccountPubKey = toBase58String(rootAccountPublicKey) | |
155 | + | if ((callerAccountPubKey == rootAccountPubKey)) | |
156 | + | then true | |
157 | + | else false | |
158 | + | } | |
159 | + | ||
160 | + | ||
161 | + | func isAdminCaller (i) = { | |
162 | + | let callerAccountPubKey = toBase58String(i.callerPublicKey) | |
163 | + | let rootAccountPubKey = toBase58String(rootAccountPublicKey) | |
164 | + | if ((callerAccountPubKey == rootAccountPubKey)) | |
165 | + | then true | |
166 | + | else false | |
167 | + | } | |
168 | + | ||
169 | + | ||
170 | + | func amountToPay (alreadySold,amountToBuy) = (sum((alreadySold + amountToBuy)) - sum(alreadySold)) | |
171 | + | ||
172 | + | ||
173 | + | func presaleStrategy (customerAddress,outcomeAssetId,paymentAmount,outcomeAmountToBuy,outcomeAmountEventBalance) = { | |
174 | + | let outcomeAmountAlreadySold = (totalAssetsPerOutcome - outcomeAmountEventBalance) | |
175 | + | let outcomeAmountAvailableInPresalePeriod = (presaleMaxAssetsPerOutcome - outcomeAmountAlreadySold) | |
176 | + | let outcomeRequiredPaymentAmount = (presalePrice * outcomeAmountToBuy) | |
177 | + | if ((outcomeAmountToBuy > outcomeAmountAvailableInPresalePeriod)) | |
178 | + | then throwNotEnoughOutcomeAssetsInPresaleStockError(outcomeAmountToBuy, outcomeAmountAvailableInPresalePeriod) | |
179 | + | else if ((paymentAmount != outcomeRequiredPaymentAmount)) | |
180 | + | then throwInsufficientPaymentError(paymentAmount, outcomeRequiredPaymentAmount) | |
181 | + | else { | |
182 | + | let presaleOutcomeAmountSalesKey = getPresaleOutcomeAmountSalesKey(outcomeAssetId) | |
183 | + | let currentPresaleOutcomeAmountSales = getPresaleOutcomeAmountSales(outcomeAssetId) | |
184 | + | let newPresaleOutcomeAmountSales = (currentPresaleOutcomeAmountSales + outcomeAmountToBuy) | |
185 | + | let writeSet = WriteSet([DataEntry(presaleOutcomeAmountSalesKey, newPresaleOutcomeAmountSales)]) | |
186 | + | let transferSet = TransferSet([ScriptTransfer(customerAddress, outcomeAmountToBuy, outcomeAssetId)]) | |
187 | + | ScriptResult(writeSet, transferSet) | |
188 | + | } | |
189 | + | } | |
190 | + | ||
191 | + | ||
192 | + | func liveStrategy (customerAddress,outcomeAssetId,paymentAmount,outcomeAmountToBuy,outcomeAmountEventBalance) = { | |
193 | + | let presaleOutcomeAmountSales = getPresaleOutcomeAmountSales(outcomeAssetId) | |
194 | + | let outcomeAmountAlreadySold = ((totalAssetsPerOutcome - presaleOutcomeAmountSales) - outcomeAmountEventBalance) | |
195 | + | let outcomeRequiredPaymentAmount = amountToPay(outcomeAmountAlreadySold, outcomeAmountToBuy) | |
196 | + | if ((outcomeAmountToBuy > outcomeAmountEventBalance)) | |
197 | + | then throwNotEnoughOutcomeAssetsInSaleStockError(outcomeAmountToBuy, outcomeAmountEventBalance) | |
198 | + | else if ((paymentAmount != outcomeRequiredPaymentAmount)) | |
199 | + | then throwInsufficientPaymentError(paymentAmount, outcomeRequiredPaymentAmount) | |
200 | + | else TransferSet([ScriptTransfer(customerAddress, outcomeAmountToBuy, outcomeAssetId)]) | |
201 | + | } | |
202 | + | ||
203 | + | ||
204 | + | @Callable(i) | |
205 | + | func buyOutcomeToken (outcomeAssetId,outcomeAmountToBuy) = { | |
206 | + | let customerAddress = i.caller | |
207 | + | let outcomeAmountEventBalance = assetBalance(this, outcomeAssetId) | |
208 | + | let status = getStatus() | |
209 | + | let payment = getPayment(i) | |
210 | + | let paymentAmount = payment.amount | |
211 | + | let paymentAssetId = getPaymentAssetId(payment) | |
212 | + | let isNotSupportedPaymentAsset = (paymentAssetId != eventCurrencyId) | |
213 | + | let isPresaleStatus = (status == presaleStatus) | |
214 | + | let isLiveStatus = (status == liveStatus) | |
215 | + | let isSalesAvailable = if (isPresaleStatus) | |
216 | + | then true | |
217 | + | else isLiveStatus | |
218 | + | if ((outcomeAmountEventBalance == 0)) | |
219 | + | then throwNonexistentOutcomeAssetError(outcomeAssetId) | |
220 | + | else if (isNotSupportedPaymentAsset) | |
221 | + | then throwUnsupportedEventPaymentAssetError(paymentAssetId) | |
222 | + | else if (!(isSalesAvailable)) | |
223 | + | then throwSalesIsNotAvailableInStatusError(status) | |
224 | + | else if (isPresaleStatus) | |
225 | + | then presaleStrategy(customerAddress, outcomeAssetId, paymentAmount, outcomeAmountToBuy, outcomeAmountEventBalance) | |
226 | + | else if (isLiveStatus) | |
227 | + | then liveStrategy(customerAddress, outcomeAssetId, paymentAmount, outcomeAmountToBuy, outcomeAmountEventBalance) | |
228 | + | else throwUndefinedError() | |
229 | + | } | |
230 | + | ||
231 | + | ||
232 | + | ||
233 | + | @Callable(i) | |
234 | + | func changeStatus (newStatus) = if (!(isSupportedStatus(newStatus))) | |
235 | + | then throwUnsupportedEventStatusError() | |
236 | + | else if (!(isRootCaller(i))) | |
237 | + | then throwIsNotRootCallerError() | |
238 | + | else WriteSet([setStatus(newStatus)]) | |
239 | + | ||
240 | + |
github/deemru/w8io/026f985 17.31 ms ◑