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