tx · Dj15fd9gAnkGga7XL8m6gMr7dmYBL9AamZqEoa1dHjPM

3N1RM5X2PdS1vH3vmzRrdzQDjAUjMqk2RbJ:  -0.01400000 Waves

2020.04.03 21:26 [938346] smart account 3N1RM5X2PdS1vH3vmzRrdzQDjAUjMqk2RbJ > SELF 0.00000000 Waves

{ "type": 13, "id": "Dj15fd9gAnkGga7XL8m6gMr7dmYBL9AamZqEoa1dHjPM", "fee": 1400000, "feeAssetId": null, "timestamp": 1585938401113, "version": 1, "sender": "3N1RM5X2PdS1vH3vmzRrdzQDjAUjMqk2RbJ", "senderPublicKey": "5xkQSCjfQmc7gqQcXZtkcWTzv4TmPAWcc81im9ngfwK9", "proofs": [ "75Bvw3cUFBoruZvwZdiuSqm5RREbRcf8JMqryXoi5EDUHYZW8GtDUqChJmiR5ahZQLrJkZ1pC8ds1xEq7iYvP5v" ], "script": "base64:AAIDAAAAAAAAAD0IARIGCgQICAEEEgcKBQgBCAEBEgYKBAgBAQgSAwoBCBIHCgUICAEIARIFCgMIAQESBgoECAEIARIDCgEIAAAAKgAAAAAHYWRkcmVzcwIAAAAjM04xUk01WDJQZFMxdkgzdm16UnJkelFEakFVak1xazJSYkoAAAAADmtleUV2ZW50UHJlZml4AgAAAAJlXwAAAAASa2V5RXZlbnREYXRhUHJlZml4AgAAAAVkYXRhXwAAAAAZa2V5RXZlbnRUaWNrZXRQcmljZVByZWZpeAIAAAAMdGlja2V0UHJpY2VfAAAAABJrZXlFdmVudERhdGVQcmVmaXgCAAAABWRhdGVfAAAAABZrZXlFdmVudEF0dGVuZGVlUHJlZml4AgAAAAJhXwAAAAAYa2V5UHJvZHVjZXJCYWxhbmNlUHJlZml4AgAAAAhiYWxhbmNlXwAAAAAaa2V5RXZlbnRBbW91bnRUaWNrZXRQcmVmaXgCAAAADXRpY2tldEFtb3VudF8AAAAAFmtleUV2ZW50Q2FuY2VsZWRQcmVmaXgCAAAACWNhbmNlbGVkXwAAAAAXa2V5RXZlbnRUaWNrZXRNY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AAABORXZlbnQgZG9lcyBub3QgZXhpc3QsIG9yIHlvdSBkb24ndCBoYXZlIHRoZSBjcmVkZW50aWFscyB0byBwZXJmb3JtIHRoaXMgYWN0aW9uAwkAAGcAAAACAAAAAAAAAAAABQAAAAdiYWxhbmNlCQAAAgAAAAECAAAAFEluc3VmZmljaWVudCBiYWxhbmNlAwkBAAAAFWdldEV2ZW50Q2FuY2VsZWRWYWx1ZQAAAAEFAAAABWV2ZW50CQAAAgAAAAECAAAAF0V2ZW50IGhhcyBiZWVuIGNhbmNlbGVkCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAEmdldEV2ZW50QmFsYW5jZUtleQAAAAIFAAAADWNhbGxlckFkZHJlc3MFAAAABWV2ZW50AAAAAAAAAAAABQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAA1jYWxsZXJBZGRyZXNzCQAAZQAAAAIFAAAAB2JhbGFuY2UJAABpAAAAAgkAAGgAAAACBQAAAAdiYWxhbmNlBQAAAApjb21taXNzaW9uAAAAAAAAAABkBQAAAAR1bml0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAAHYWRkcmVzcwkAAGkAAAACCQAAaAAAAAIFAAAAB2JhbGFuY2UFAAAACmNvbW1pc3Npb24AAAAAAAAAAGQFAAAABHVuaXQFAAAAA25pbAAAAAAm65gd", "chainId": 84, "height": 938346, "spentComplexity": 0 } View: original | compacted Prev: 7VAt1fpN3FLjhNFVPDtHgeDfYgSUqDYmDUkPG7ydZDxQ Next: dqzgd8gseAfbV712X4DB5DNfiQ6ygtfqTS4Lp6z8KjX Diff:
OldNewDifferences
172172 let price = getEventTicketPriceValue(event, ticketId)
173173 let producerAddress = getEventValueById(event)
174174 let ticketsLeft = getEventTicketAmountValue(event, ticketId)
175- let attendeeKey = ""
176175 let totalPrice = (amount * price)
177176 if (isDefined(pmt.assetId))
178177 then throw("can use WAVES only at the moment")
194193 then throw("This event requires that you register with a personal ID")
195194 else if ((getEventTicketMaxValue(event, ticketId) > (getEventAttendeeValue(userAddress, id, ticketId, event) + amount)))
196195 then throw("Amount of Tickets exceeds maximum amount per attendee")
197- else TransferSet([ScriptTransfer(addressFromStringValue(address), pmt.amount, unit)])
196+ 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)]))
198197 }
199198
200199
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 NONE = "none"
3131
3232 let commission = 5
3333
3434 func getNumberByKey (key) = {
3535 let num = match getInteger(this, key) {
3636 case a: Int =>
3737 a
3838 case _ =>
3939 0
4040 }
4141 num
4242 }
4343
4444
4545 func getStrByKey (key) = {
4646 let str = match getString(this, key) {
4747 case a: String =>
4848 a
4949 case _ =>
5050 NONE
5151 }
5252 str
5353 }
5454
5555
5656 func getBoolByKey (key) = {
5757 let bool = match getBoolean(this, key) {
5858 case a: Boolean =>
5959 a
6060 case _ =>
6161 false
6262 }
6363 bool
6464 }
6565
6666
6767 func getEventKey (producer,title) = (keyEventPrefix + toBase58String(sha256(toBytes((producer + title)))))
6868
6969
7070 func getEventDataKey (event) = (keyEventDataPrefix + event)
7171
7272
7373 func getEventTicketPriceKey (event,ticketId) = (((keyEventTicketPricePrefix + toString(ticketId)) + "_") + event)
7474
7575
7676 func getEventDateKey (event) = (keyEventDatePrefix + event)
7777
7878
7979 func getEventAttendeeKey (user,id,ticketId,event) = (((((keyEventAttendeePrefix + toBase58String(sha256(toBytes((user + id))))) + "_") + toString(ticketId)) + "_") + event)
8080
8181
8282 func getEventBalanceKey (account,event) = (((keyProducerBalancePrefix + account) + "_") + event)
8383
8484
8585 func getEventTicketAmountKey (event,ticketId) = (((keyEventAmountTicketPrefix + toString(ticketId)) + "_") + event)
8686
8787
8888 func getEventCanceledKey (event) = (keyEventCanceledPrefix + event)
8989
9090
9191 func getEventRequiresIdKey (event) = (keyEventRequiresIdPrefix + event)
9292
9393
9494 func getEventTicketMaxKey (event,ticketId) = (((keyEventTicketMaxPrefix + toString(ticketId)) + "_") + event)
9595
9696
9797 func getEventTicketDescriptionKey (event,ticketId) = (((keyEventTicketDescriptionPrefix + toString(ticketId)) + "_") + event)
9898
9999
100100 func getEventTicketsKey (event) = (keyEventTicketsPrefix + event)
101101
102102
103103 func getEventValueById (item) = getStrByKey(item)
104104
105105
106106 func getEventValue (producer,title) = getStrByKey(getEventKey(producer, title))
107107
108108
109109 func getEventTicketPriceValue (event,ticketId) = getNumberByKey(getEventTicketPriceKey(event, ticketId))
110110
111111
112112 func getEventDateValue (event) = getNumberByKey(getEventDateKey(event))
113113
114114
115115 func getEventAttendeeValue (user,id,ticketId,event) = getNumberByKey(getEventAttendeeKey(user, id, ticketId, event))
116116
117117
118118 func getEventBalanceValue (account,event) = getNumberByKey(getEventBalanceKey(account, event))
119119
120120
121121 func getEventTicketAmountValue (event,ticketId) = getNumberByKey(getEventTicketAmountKey(event, ticketId))
122122
123123
124124 func getEventCanceledValue (event) = getBoolByKey(getEventCanceledKey(event))
125125
126126
127127 func getEventRequiresIdValue (event) = getBoolByKey(getEventRequiresIdKey(event))
128128
129129
130130 func getEventTicketMaxValue (event,ticketId) = getNumberByKey(getEventTicketMaxKey(event, ticketId))
131131
132132
133133 func getEventTicketDescriptionValue (event,ticketId) = getStrByKey(getEventTicketDescriptionKey(event, ticketId))
134134
135135
136136 func getEventTicketsValue (event) = getNumberByKey(getEventTicketsKey(event))
137137
138138
139139 @Callable(i)
140140 func createEvent (title,data,date,requiresId) = {
141141 let producerAddress = toBase58String(i.caller.bytes)
142142 let event = getEventKey(producerAddress, title)
143143 if ((getEventValue(producerAddress, title) != NONE))
144144 then throw("The event already exist")
145145 else if ((lastBlock.timestamp > date))
146146 then throw("Date cannot be in the past")
147147 else WriteSet([DataEntry(getEventKey(producerAddress, title), producerAddress), DataEntry(getEventDataKey(event), data), DataEntry(getEventDateKey(event), date), DataEntry(getEventRequiresIdKey(event), requiresId), DataEntry(getEventTicketsKey(event), 0)])
148148 }
149149
150150
151151
152152 @Callable(i)
153153 func createEventTicket (event,price,description,amountTickets,maxAmount) = {
154154 let callerAddress = toBase58String(i.caller.bytes)
155155 let producerAddress = getEventValueById(event)
156156 let ticketId = getEventTicketsValue(event)
157157 if ((producerAddress != callerAddress))
158158 then throw("Event does not exist, or you don't have the credentials to perform this action")
159159 else if (((lastBlock.timestamp + 15000000) > getEventDateValue(event)))
160160 then throw("This event has already happened")
161161 else if (getEventCanceledValue(event))
162162 then throw("This event was canceled")
163163 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))])
164164 }
165165
166166
167167
168168 @Callable(i)
169169 func purchase (event,ticketId,amount,id) = {
170170 let pmt = extract(i.payment)
171171 let userAddress = toBase58String(i.caller.bytes)
172172 let price = getEventTicketPriceValue(event, ticketId)
173173 let producerAddress = getEventValueById(event)
174174 let ticketsLeft = getEventTicketAmountValue(event, ticketId)
175- let attendeeKey = ""
176175 let totalPrice = (amount * price)
177176 if (isDefined(pmt.assetId))
178177 then throw("can use WAVES only at the moment")
179178 else if ((producerAddress == NONE))
180179 then throw("Event does not exist")
181180 else if ((totalPrice > pmt.amount))
182181 then throw("You did not send enough money.")
183182 else if ((pmt.amount > totalPrice))
184183 then throw("You send too much money.")
185184 else if ((0 > (ticketsLeft - amount)))
186185 then throw("Not enough tickets left")
187186 else if (((lastBlock.timestamp + 15000000) > getEventDateValue(event)))
188187 then throw("This event has already happened")
189188 else if (getEventCanceledValue(event))
190189 then throw("This event was canceled")
191190 else if (if (getEventRequiresIdValue(event))
192191 then (id == "")
193192 else false)
194193 then throw("This event requires that you register with a personal ID")
195194 else if ((getEventTicketMaxValue(event, ticketId) > (getEventAttendeeValue(userAddress, id, ticketId, event) + amount)))
196195 then throw("Amount of Tickets exceeds maximum amount per attendee")
197- else TransferSet([ScriptTransfer(addressFromStringValue(address), pmt.amount, unit)])
196+ 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)]))
198197 }
199198
200199
201200
202201 @Callable(i)
203202 func cancelEvent (event) = {
204203 let callerAddress = toBase58String(i.caller.bytes)
205204 if ((getEventValueById(event) != callerAddress))
206205 then throw("Event does not exist, or you don't have the credentials to perform this action")
207206 else if (((lastBlock.timestamp + 15000000) > getEventDateValue(event)))
208207 then throw("This event has already happened")
209208 else WriteSet([DataEntry(getEventCanceledKey(event), true)])
210209 }
211210
212211
213212
214213 @Callable(i)
215214 func checkin (event,attendeeAddress,amount,id,ticketId) = {
216215 let callerAddress = toBase58String(i.caller.bytes)
217216 if ((getEventValueById(event) != callerAddress))
218217 then throw("Event does not exist, or you don't have the credentials to perform this action")
219218 else if ((amount > getEventAttendeeValue(attendeeAddress, id, ticketId, event)))
220219 then throw("You don't have enough tickets.")
221220 else if (getEventCanceledValue(event))
222221 then throw("This event was canceled. You can redeem your ticket using refundTicket function")
223222 else WriteSet([DataEntry(getEventAttendeeKey(attendeeAddress, id, ticketId, event), (getEventAttendeeValue(attendeeAddress, id, ticketId, event) - amount))])
224223 }
225224
226225
227226
228227 @Callable(i)
229228 func editEventTickets (event,ticketId,newAmount) = {
230229 let callerAddress = toBase58String(i.caller.bytes)
231230 if ((getEventValueById(event) != callerAddress))
232231 then throw("Event does not exist, or you don't have the credentials to perform this action")
233232 else if (((lastBlock.timestamp + 15000000) > getEventDateValue(event)))
234233 then throw("This event has already happened")
235234 else if (getEventCanceledValue(event))
236235 then throw("This event was already canceled")
237236 else WriteSet([DataEntry(getEventTicketAmountKey(event, ticketId), newAmount)])
238237 }
239238
240239
241240
242241 @Callable(i)
243242 func refundTicket (event,amount,id,ticketId) = {
244243 let attendeeAddress = toBase58String(i.caller.bytes)
245244 let attendeeValue = getEventAttendeeValue(attendeeAddress, id, ticketId, event)
246245 if ((getEventValueById(event) == NONE))
247246 then throw("The event does not exist")
248247 else if ((amount > attendeeValue))
249248 then throw("You don't have enough registered tickets with this address")
250249 else if (((lastBlock.timestamp + 15000000) > getEventDateValue(event)))
251250 then throw("This event has already happened")
252251 else ScriptResult(WriteSet([DataEntry(getEventAttendeeKey(attendeeAddress, id, ticketId, event), (attendeeValue - amount))]), TransferSet([ScriptTransfer(addressFromStringValue(attendeeAddress), (amount * attendeeValue), unit)]))
253252 }
254253
255254
256255
257256 @Callable(i)
258257 func withdraw (event) = {
259258 let callerAddress = toBase58String(i.caller.bytes)
260259 let balance = getEventBalanceValue(callerAddress, event)
261260 if ((getEventValueById(event) != callerAddress))
262261 then throw("Event does not exist, or you don't have the credentials to perform this action")
263262 else if ((0 >= balance))
264263 then throw("Insufficient balance")
265264 else if (getEventCanceledValue(event))
266265 then throw("Event has been canceled")
267266 else ScriptResult(WriteSet([DataEntry(getEventBalanceKey(callerAddress, event), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(callerAddress), (balance - ((balance * commission) / 100)), unit), ScriptTransfer(addressFromStringValue(address), ((balance * commission) / 100), unit)]))
268267 }
269268
270269

github/deemru/w8io/169f3d6 
62.75 ms