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