tx · 4GvnSkhd1JcKoAc6v2i26zPRdyNRrVS33bZR66o4hEMJ

3N1RM5X2PdS1vH3vmzRrdzQDjAUjMqk2RbJ:  -0.01400000 Waves

2020.04.17 15:14 [958467] smart account 3N1RM5X2PdS1vH3vmzRrdzQDjAUjMqk2RbJ > SELF 0.00000000 Waves

{ "type": 13, "id": "4GvnSkhd1JcKoAc6v2i26zPRdyNRrVS33bZR66o4hEMJ", "fee": 1400000, "feeAssetId": null, "timestamp": 1587125751982, "version": 1, "sender": "3N1RM5X2PdS1vH3vmzRrdzQDjAUjMqk2RbJ", "senderPublicKey": "5xkQSCjfQmc7gqQcXZtkcWTzv4TmPAWcc81im9ngfwK9", "proofs": [ "5WNBawf1tzZ6LaFMBYGgz98F7ddy9bL4GQKbbCPbCAV64TppyE2HwPN3P9GaHFuQejYyzgtNP2xecKkgZFHjRs3n" ], "script": "base64:AAIDAAAAAAAAAFIIARIGCgQICAEEEgcKBQgBCAEBEgYKBAgBAQgSAwoBCBIICgYICAEIAQESBQoDCAEBEgQKAggIEgUKAwgIARIFCgMIAQESBgoECAEIARIDCgEIAAAALQAAAAAHYWRkcmVzcwIAAAAjM04xUk01WDJQZFMxdkgzdm16UnJkelFEakFVak1xazJSYkoAAAAADmtleUV2ZW50UHJlZml4AgAAAAJlXwAAAAASa2V5RXZlbnREYXRhUHJlZml4AgAAAAVkYXRhXwAAAAAZa2V5RXZlbnRUaWNrZXRQcmljZVByZWZpeAIAAAAMdGlja2V0UHJpY2VfAAAAABJrZXlFdmVudERhdGVQcmVmaXgCAAAABWRhdGVfAAAAABZrZXlFdmVudEF0dGVuZGVlUHJlZml4AgAAAAJhXwAAAAAYa2V5UHJvZHVjZXJCYWxhbmNlUHJlZml4AgAAAAhiYWxhbmNlXwAAAAAaa2V5RXZlbnRBbW91bnRUaWNrZXRQcmVmaXgCAAAADXRpY2tldEFtb3VudF8AAAAAFmtleUV2ZW50Q2FuY2VsZWRQcmVmaXgCAAAACWNhbmNlbGVkXwAAA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oYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAAHYWRkcmVzcwkAAGkAAAACCQAAaAAAAAIFAAAAB2JhbGFuY2UFAAAACmNvbW1pc3Npb24AAAAAAAAAAGQFAAAABHVuaXQFAAAAA25pbAAAAAA31vX+", "chainId": 84, "height": 958467, "spentComplexity": 0 } View: original | compacted Prev: E9YJ1dw9CAidsCpsrLaABE3zMMMsJmnDetUsvSpQjD3k Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let address = "3N1RM5X2PdS1vH3vmzRrdzQDjAUjMqk2RbJ"
55
66 let keyEventPrefix = "e_"
77
88 let keyEventDataPrefix = "data_"
99
1010 let keyEventTicketPricePrefix = "ticketPrice_"
1111
1212 let keyEventDatePrefix = "date_"
1313
1414 let keyEventAttendeePrefix = "a_"
1515
1616 let keyProducerBalancePrefix = "balance_"
1717
1818 let keyEventAmountTicketPrefix = "ticketAmount_"
1919
2020 let keyEventCanceledPrefix = "canceled_"
2121
2222 let keyEventTicketMaxPrefix = "ticketMax_"
2323
2424 let keyEventRequiresIdPrefix = "requiresId_"
2525
2626 let keyEventTicketDescriptionPrefix = "ticketDescription_"
2727
2828 let keyEventTicketsPrefix = "tickets_"
2929
3030 let keyEventTrusteePrefix = "trustee_"
3131
3232 let NONE = "none"
3333
3434 let commission = 5
3535
3636 func getNumberByKey (key) = {
3737 let num = match getInteger(this, key) {
3838 case a: Int =>
3939 a
4040 case _ =>
4141 0
4242 }
4343 num
4444 }
4545
4646
4747 func getStrByKey (key) = {
4848 let str = match getString(this, key) {
4949 case a: String =>
5050 a
5151 case _ =>
5252 NONE
5353 }
5454 str
5555 }
5656
5757
5858 func getBoolByKey (key) = {
5959 let bool = match getBoolean(this, key) {
6060 case a: Boolean =>
6161 a
6262 case _ =>
6363 false
6464 }
6565 bool
6666 }
6767
6868
6969 func getEventKey (producer,title) = (keyEventPrefix + toBase58String(sha256(toBytes((producer + title)))))
7070
7171
7272 func getEventDataKey (event) = (keyEventDataPrefix + event)
7373
7474
7575 func getEventTicketPriceKey (event,ticketId) = (((keyEventTicketPricePrefix + toString(ticketId)) + "_") + event)
7676
7777
7878 func getEventDateKey (event) = (keyEventDatePrefix + event)
7979
8080
8181 func getEventAttendeeKey (user,id,ticketId,event) = (((((keyEventAttendeePrefix + toBase58String(sha256(toBytes((user + id))))) + "_") + toString(ticketId)) + "_") + event)
8282
8383
8484 func getEventBalanceKey (account,event) = (((keyProducerBalancePrefix + account) + "_") + event)
8585
8686
8787 func getEventTicketAmountKey (event,ticketId) = (((keyEventAmountTicketPrefix + toString(ticketId)) + "_") + event)
8888
8989
9090 func getEventCanceledKey (event) = (keyEventCanceledPrefix + event)
9191
9292
9393 func getEventRequiresIdKey (event) = (keyEventRequiresIdPrefix + event)
9494
9595
9696 func getEventTicketMaxKey (event,ticketId) = (((keyEventTicketMaxPrefix + toString(ticketId)) + "_") + event)
9797
9898
9999 func getEventTicketDescriptionKey (event,ticketId) = (((keyEventTicketDescriptionPrefix + toString(ticketId)) + "_") + event)
100100
101101
102102 func getEventTicketsKey (event) = (keyEventTicketsPrefix + event)
103103
104104
105105 func getEventTrusteeKey (event,trusteeKey) = (((keyEventTrusteePrefix + toString(trusteeKey)) + "_") + event)
106106
107107
108108 func getEventValueById (item) = getStrByKey(item)
109109
110110
111111 func getEventValue (producer,title) = getStrByKey(getEventKey(producer, title))
112112
113113
114114 func getEventTicketPriceValue (event,ticketId) = getNumberByKey(getEventTicketPriceKey(event, ticketId))
115115
116116
117117 func getEventDateValue (event) = getNumberByKey(getEventDateKey(event))
118118
119119
120120 func getEventAttendeeValue (user,id,ticketId,event) = getNumberByKey(getEventAttendeeKey(user, id, ticketId, event))
121121
122122
123123 func getEventBalanceValue (account,event) = getNumberByKey(getEventBalanceKey(account, event))
124124
125125
126126 func getEventTicketAmountValue (event,ticketId) = getNumberByKey(getEventTicketAmountKey(event, ticketId))
127127
128128
129129 func getEventCanceledValue (event) = getBoolByKey(getEventCanceledKey(event))
130130
131131
132132 func getEventRequiresIdValue (event) = getBoolByKey(getEventRequiresIdKey(event))
133133
134134
135135 func getEventTicketMaxValue (event,ticketId) = getNumberByKey(getEventTicketMaxKey(event, ticketId))
136136
137137
138138 func getEventTicketDescriptionValue (event,ticketId) = getStrByKey(getEventTicketDescriptionKey(event, ticketId))
139139
140140
141141 func getEventTicketsValue (event) = getNumberByKey(getEventTicketsKey(event))
142142
143143
144144 func getEventTrusteeValue (event,trusteeKey) = getStrByKey(getEventTrusteeKey(event, trusteeKey))
145145
146146
147147 @Callable(i)
148148 func createEvent (title,data,date,requiresId) = {
149149 let producerAddress = toBase58String(i.caller.bytes)
150150 let event = getEventKey(producerAddress, title)
151151 if ((getEventValue(producerAddress, title) != NONE))
152152 then throw("The event already exist")
153153 else if ((lastBlock.timestamp > date))
154154 then throw("Date cannot be in the past")
155155 else WriteSet([DataEntry(getEventKey(producerAddress, title), producerAddress), DataEntry(getEventDataKey(event), data), DataEntry(getEventDateKey(event), date), DataEntry(getEventRequiresIdKey(event), requiresId), DataEntry(getEventTicketsKey(event), 0), DataEntry(getEventCanceledKey(event), false), DataEntry(getEventTrusteeKey(event, 0), producerAddress)])
156156 }
157157
158158
159159
160160 @Callable(i)
161161 func createEventTicket (event,price,description,amountTickets,maxAmount) = {
162162 let callerAddress = toBase58String(i.caller.bytes)
163163 let producerAddress = getEventValueById(event)
164164 let ticketId = getEventTicketsValue(event)
165165 if ((producerAddress != callerAddress))
166166 then throw("Event does not exist, or you don't have the credentials to perform this action")
167167 else if (((lastBlock.timestamp + 15000000) > getEventDateValue(event)))
168168 then throw("This event has already happened")
169169 else if (getEventCanceledValue(event))
170170 then throw("This event was canceled")
171171 else WriteSet([DataEntry(getEventTicketPriceKey(event, ticketId), price), DataEntry(getEventTicketAmountKey(event, ticketId), amountTickets), DataEntry(getEventTicketMaxKey(event, ticketId), maxAmount), DataEntry(getEventTicketDescriptionKey(event, ticketId), description), DataEntry(getEventTicketsKey(event), (getEventTicketsValue(event) + 1))])
172172 }
173173
174174
175175
176176 @Callable(i)
177177 func purchase (event,ticketId,amount,id) = {
178178 let pmt = extract(i.payment)
179179 let userAddress = toBase58String(i.caller.bytes)
180180 let price = getEventTicketPriceValue(event, ticketId)
181181 let producerAddress = getEventValueById(event)
182182 let ticketsLeft = getEventTicketAmountValue(event, ticketId)
183183 let totalPrice = (amount * price)
184184 if (isDefined(pmt.assetId))
185185 then throw("can use WAVES only at the moment")
186186 else if ((producerAddress == NONE))
187187 then throw("Event does not exist")
188188 else if ((totalPrice > pmt.amount))
189189 then throw(((("You did not send enough money. You sent: " + toString(pmt.amount)) + ". Expected: ") + toString(totalPrice)))
190190 else if ((pmt.amount > totalPrice))
191191 then throw(((("You send too much money. You sent: " + toString(pmt.amount)) + ". Total price: ") + toString(totalPrice)))
192192 else if ((0 > (ticketsLeft - amount)))
193193 then throw("Not enough tickets left")
194194 else if (((lastBlock.timestamp + 15000000) > getEventDateValue(event)))
195195 then throw("This event has already happened")
196196 else if (getEventCanceledValue(event))
197197 then throw("This event was canceled")
198198 else if (if (getEventRequiresIdValue(event))
199199 then (id == "")
200200 else false)
201201 then throw("This event requires that you register with a personal ID")
202202 else if (if ((getEventTicketMaxValue(event, ticketId) > 0))
203203 then ((getEventAttendeeValue(userAddress, id, ticketId, event) + amount) > getEventTicketMaxValue(event, ticketId))
204204 else false)
205205 then throw("Amount of Tickets exceeds maximum amount per attendee")
206206 else ScriptResult(WriteSet([DataEntry(getEventAttendeeKey(userAddress, id, ticketId, event), (getEventAttendeeValue(userAddress, id, ticketId, event) + amount)), DataEntry(getEventBalanceKey(producerAddress, event), (getEventBalanceValue(producerAddress, event) + pmt.amount)), DataEntry(getEventTicketAmountKey(event, ticketId), (ticketsLeft - amount))]), TransferSet([ScriptTransfer(addressFromStringValue(address), pmt.amount, unit)]))
207207 }
208208
209209
210210
211211 @Callable(i)
212212 func cancelEvent (event) = {
213213 let callerAddress = toBase58String(i.caller.bytes)
214214 if ((getEventValueById(event) != callerAddress))
215215 then throw("Event does not exist, or you don't have the credentials to perform this action")
216216 else if (((lastBlock.timestamp + 15000000) > getEventDateValue(event)))
217217 then throw("This event has already happened")
218218 else WriteSet([DataEntry(getEventCanceledKey(event), true)])
219219 }
220220
221221
222222
223223 @Callable(i)
224224 func checkin (event,attendeeAddress,amount,id,ticketId,trusteeKey) = {
225225 let callerAddress = toBase58String(i.caller.bytes)
226226 if (if ((getEventValueById(event) != callerAddress))
227227 then (getEventTrusteeValue(event, trusteeKey) != callerAddress)
228228 else false)
229229 then throw("Event does not exist, or you don't have the credentials to perform this action")
230230 else if ((amount > getEventAttendeeValue(attendeeAddress, id, ticketId, event)))
231231 then throw("You don't have enough tickets.")
232232 else if (getEventCanceledValue(event))
233233 then throw("This event was canceled. You can redeem your ticket using refundTicket function")
234234 else WriteSet([DataEntry(getEventAttendeeKey(attendeeAddress, id, ticketId, event), (getEventAttendeeValue(attendeeAddress, id, ticketId, event) - amount))])
235235 }
236236
237237
238238
239239 @Callable(i)
240240 func editEventTickets (event,ticketId,newAmount) = {
241241 let callerAddress = toBase58String(i.caller.bytes)
242242 if ((getEventValueById(event) != callerAddress))
243243 then throw("Event does not exist, or you don't have the credentials to perform this action")
244244 else if (((lastBlock.timestamp + 15000000) > getEventDateValue(event)))
245245 then throw("This event has already happened")
246246 else if (getEventCanceledValue(event))
247247 then throw("This event was already canceled")
248248 else WriteSet([DataEntry(getEventTicketAmountKey(event, ticketId), newAmount)])
249249 }
250250
251251
252252
253253 @Callable(i)
254254 func editEventProducer (event,newProducer) = {
255255 let producerAddress = toBase58String(i.caller.bytes)
256256 if ((getEventValueById(event) != producerAddress))
257257 then throw("Event does not exist, or you don't have the credentials to perform this action")
258258 else WriteSet([DataEntry(event, newProducer)])
259259 }
260260
261261
262262
263263 @Callable(i)
264264 func editEventTrustee (event,trusteeAddress,trusteeKey) = {
265265 let producerAddress = toBase58String(i.caller.bytes)
266266 if ((getEventValueById(event) != producerAddress))
267267 then throw("Event does not exist, or you don't have the credentials to perform this action")
268268 else WriteSet([DataEntry(getEventTrusteeKey(event, trusteeKey), trusteeAddress)])
269269 }
270270
271271
272272
273273 @Callable(i)
274274 func editEventData (event,data,date) = {
275275 let producerAddress = toBase58String(i.caller.bytes)
276276 if ((getEventValueById(event) != producerAddress))
277277 then throw("Event does not exist, or you don't have the credentials to perform this action")
278278 else if ((lastBlock.timestamp > date))
279279 then throw("Date cannot be in the past")
280280 else if ((getEventDateValue(event) > date))
281281 then throw("New date cannot be earlier that the original date")
282282 else WriteSet([DataEntry(getEventDataKey(event), data), DataEntry(getEventDateKey(event), date)])
283283 }
284284
285285
286286
287287 @Callable(i)
288288 func refundTicket (event,amount,id,ticketId) = {
289289 let attendeeAddress = toBase58String(i.caller.bytes)
290290 let attendeeValue = getEventAttendeeValue(attendeeAddress, id, ticketId, event)
291291 if ((getEventValueById(event) == NONE))
292292 then throw("The event does not exist")
293293 else if ((amount > attendeeValue))
294294 then throw("You don't have enough registered tickets with this address")
295295 else if (((lastBlock.timestamp + 10000000) > getEventDateValue(event)))
296296 then throw("This event has already happened")
297297 else ScriptResult(WriteSet([DataEntry(getEventAttendeeKey(attendeeAddress, id, ticketId, event), (attendeeValue - amount)), DataEntry(getEventTicketAmountKey(event, ticketId), (getEventTicketAmountValue(event, ticketId) + amount))]), TransferSet([ScriptTransfer(addressFromStringValue(attendeeAddress), (amount * attendeeValue), unit)]))
298298 }
299299
300300
301301
302302 @Callable(i)
303303 func withdraw (event) = {
304304 let callerAddress = toBase58String(i.caller.bytes)
305305 let balance = getEventBalanceValue(callerAddress, event)
306306 if ((getEventValueById(event) != callerAddress))
307307 then throw("Event does not exist, or you don't have the credentials to perform this action")
308308 else if ((0 >= balance))
309309 then throw("Insufficient balance")
310310 else if ((getEventDateValue(event) > (lastBlock.timestamp - 1000000)))
311311 then throw("Event has not yet taken place. Withdraw funds when event takes place.")
312312 else if (getEventCanceledValue(event))
313313 then throw("Event has been canceled")
314314 else ScriptResult(WriteSet([DataEntry(getEventBalanceKey(callerAddress, event), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(callerAddress), (balance - ((balance * commission) / 100)), unit), ScriptTransfer(addressFromStringValue(address), ((balance * commission) / 100), unit)]))
315315 }
316316
317317

github/deemru/w8io/169f3d6 
46.11 ms