tx · FMUq6yHPxiTBdgvM3CsPq7YdRGmqfCjQFGnmwRTYjYAx 3N8WKW33bRoL6j8jhERSykdsxLepdwF4roL: -0.05000000 Waves 2021.01.15 17:53 [1354683] smart account 3N8WKW33bRoL6j8jhERSykdsxLepdwF4roL > SELF 0.00000000 Waves
{ "type": 13, "id": "FMUq6yHPxiTBdgvM3CsPq7YdRGmqfCjQFGnmwRTYjYAx", "fee": 5000000, "feeAssetId": null, "timestamp": 1610722429778, "version": 2, "chainId": 84, "sender": "3N8WKW33bRoL6j8jhERSykdsxLepdwF4roL", "senderPublicKey": "DfBpAEVbFfW1EMhjQ2DgbCDVQCY5L1nwL9NdWEmu4j3P", "proofs": [ "2wsxWYe4HRGwrxD5w3rstX9ZLL7LTXcf55yR5YANhQtFPgczkaqjU61nCsVTeeXEGethSTc3Ddp7rqWsgPzrBkyD" ], "script": "base64:AAIEAAAAAAAAAE4IAhIECgIICBIECgIICBIECgIICBIECgIICBIICgYIAQgICAgSBgoECAgIARIECgIICBIECgIICBIGCgQICAgIEgcKBQgICAgBEgMKAQgAAAAeAAAAAAROT05FAgAAAAROT05FAAAAAA5yZWJpcnRoQXNzZXRJZAEAAAAgTlKI9Dsdaklo/AL7ycpGOtB8l2A5+AtTNpm2gXIwDDEBAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEFAAAABE5PTkUBAAAAD2dldEJvb2xlYW5CeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGwAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAHQm9vbGVhbgQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQUAAAAETk9ORQEAAAAPZ2V0SW50ZWdlckJ5S2V5AAAAAQA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Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAADdHR4BQAAAAckbWF0Y2gwAwMDCQAAAAAAAAIIBQAAAAN0dHgAAAAGYW1vdW50AAAAAAAR4aMABgkAAAAAAAACCAUAAAADdHR4AAAABmFtb3VudAAAAAAAF9eEAAYJAAAAAAAAAggFAAAAA3R0eAAAAAZhbW91bnQAAAAAAB3NZQAGAwkAAAAAAAACCAUAAAADdHR4AAAABmFtb3VudAAAAAAAI8NGAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkHB5v8UP8=", "height": 1354683, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: smnsNuALuinS5x3D9cwXpRdKm7ZdUGUSjXcV9nCQ6nr Next: 3td3F8iaLJFqKkGXQmwmFVv729QR1eSggvGKoZRUdbKU Diff:
Old | New | Differences | |
---|---|---|---|
236 | 236 | then throw("The requested order does not exist or is not accepted yet") | |
237 | 237 | else if ((getValueIsInDeliveryOfOrder(order, retailerIdentification, courierAddress) == NONE)) | |
238 | 238 | then throw("The requested order is not accepted yet") | |
239 | - | else [DeleteEntry(getKeyOrderIsAccepted(order, retailerIdentification, courierAddress | |
239 | + | else [DeleteEntry(getKeyOrderIsAccepted(order, retailerIdentification, courierAddress)), DeleteEntry(getKeyOrderIsInDelivery(order, retailerIdentification, courierAddress)), DeleteEntry(getKeyOrderTimeAccepted(order, retailerIdentification, courierAddress)), StringEntry(getKeyOrderDataOpen(orderCityString, retailerIdentification), orderData), StringEntry(getKeyOrderIsAccepted(order, retailerIdentification, ""), "open")] | |
240 | 240 | } | |
241 | 241 | ||
242 | 242 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let NONE = "NONE" | |
5 | 5 | ||
6 | 6 | let rebirthAssetId = base58'6Gjo6dZNLzun8w7uzWuH1t6hoGph9KrMcf1qjbEzBsVJ' | |
7 | 7 | ||
8 | 8 | func getStringByKey (key) = match getString(this, key) { | |
9 | 9 | case a: String => | |
10 | 10 | a | |
11 | 11 | case _ => | |
12 | 12 | NONE | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func getBooleanByKey (key) = match getBoolean(this, key) { | |
17 | 17 | case a: Boolean => | |
18 | 18 | a | |
19 | 19 | case _ => | |
20 | 20 | NONE | |
21 | 21 | } | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func getIntegerByKey (key) = match getInteger(this, key) { | |
25 | 25 | case a: Int => | |
26 | 26 | a | |
27 | 27 | case _ => | |
28 | 28 | -1 | |
29 | 29 | } | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func getOrderString (city,keyOrderString) = ((city + "_") + keyOrderString) | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func getKeyOrder (retailerIdentification,orderId) = { | |
36 | 36 | let retailerIdentificationAndOrderId = (retailerIdentification + orderId) | |
37 | 37 | ("order_" + toBase58String(sha256(toBytes(retailerIdentificationAndOrderId)))) | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func getKeyRetailer (retailerIdentification) = ("retailer_" + toBase58String(sha256(toBytes(retailerIdentification)))) | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func getKeyCourier (courierIdentification) = ("courier_" + toBase58String(sha256(toBytes(courierIdentification)))) | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func getKeyOrderCity (order) = (order + "_city") | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func getKeyOrderRetailerIdentification (order) = (order + "_retailer") | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func getKeyOrderShippingCosts (order,retailerIdentification) = (((retailerIdentification + "_") + order) + "_shipping") | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func getKeyOrderCourier (order,retailerIdentification) = (((retailerIdentification + "_") + order) + "_courierId") | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func getKeyOrderIsAccepted (order,retailerIdentification,courierAddress) = ((((retailerIdentification + "_") + order) + "_data_courier_") + courierAddress) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func getKeyOrderIsInDelivery (order,retailerIdentification,courierAddress) = (((((retailerIdentification + "_") + order) + "_data_courier_") + courierAddress) + "_isInDelivery") | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func getKeyOrderTimeAccepted (order,retailerIdentification,courierAddress) = (((((retailerIdentification + "_") + order) + "_data_courier_") + courierAddress) + "_acceptedAt") | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func getKeyOrderDataOpen (order,retailerIdentification) = (((retailerIdentification + "_") + order) + "_data_open") | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func getKeyOrderIsDelivered (order,retailerIdentification,courierAddress) = ((((retailerIdentification + "_") + order) + "_isDelivered_") + courierAddress) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func getKeyRetailerData (retailer) = (retailer + "_data") | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func getKeyCourierData (courier) = (courier + "_data") | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func getValueOrderCity (order) = getStringByKey(getKeyOrderCity(order)) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func getValueRetailerIdentificationOfOrder (order) = getStringByKey(getKeyOrderRetailerIdentification(order)) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func getValueIsAcceptedOfOrder (order,retailerIdentification,courierAddress) = getStringByKey(getKeyOrderIsAccepted(order, retailerIdentification, courierAddress)) | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func getValueCourierIdOfOrder (order,retailerIdentification) = getStringByKey(getKeyOrderCourier(order, retailerIdentification)) | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func getValueIsInDeliveryOfOrder (order,retailerIdentification,courierAddress) = getBooleanByKey(getKeyOrderIsInDelivery(order, retailerIdentification, courierAddress)) | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func getValueIsDeliveredOfOrder (order,retailerIdentification,courierAddress) = getStringByKey(getKeyOrderIsDelivered(order, retailerIdentification, courierAddress)) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func getValueShippingCostsOfOrder (order,retailerIdentification) = getIntegerByKey(getKeyOrderShippingCosts(order, retailerIdentification)) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func getValueDataOfOrderOpen (order,retailerIdentification) = getStringByKey(getKeyOrderDataOpen(order, retailerIdentification)) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func getValueDataOfRetailer (retailer) = getStringByKey(getKeyRetailerData(retailer)) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func getValueDataOfCourier (courier) = getStringByKey(getKeyCourierData(courier)) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | @Callable(i) | |
111 | 111 | func registerRetailer (retailerIdentification,retailerData) = if ((this != i.caller)) | |
112 | 112 | then throw("Caller is not the Contract owner") | |
113 | 113 | else { | |
114 | 114 | let retailer = getKeyRetailer(retailerIdentification) | |
115 | 115 | [StringEntry(getKeyRetailerData(retailer), retailerData)] | |
116 | 116 | } | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | ||
120 | 120 | @Callable(i) | |
121 | 121 | func updateRetailer (retailerIdentification,retailerData) = if ((this != i.caller)) | |
122 | 122 | then throw("Caller is not the Contract owner") | |
123 | 123 | else { | |
124 | 124 | let retailer = getKeyRetailer(retailerIdentification) | |
125 | 125 | let oldRetailerData = getValueDataOfRetailer(retailerIdentification) | |
126 | 126 | if ((oldRetailerData == NONE)) | |
127 | 127 | then throw("Courier does not exist on the Blockchain") | |
128 | 128 | else [StringEntry(getKeyCourierData(retailer), retailerData)] | |
129 | 129 | } | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | ||
133 | 133 | @Callable(i) | |
134 | 134 | func registerCourier (courierIdentification,courierData) = if ((this != i.caller)) | |
135 | 135 | then throw("Caller is not the Contract owner") | |
136 | 136 | else { | |
137 | 137 | let courier = getKeyCourier(courierIdentification) | |
138 | 138 | [StringEntry(getKeyCourierData(courier), courierData)] | |
139 | 139 | } | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | ||
143 | 143 | @Callable(i) | |
144 | 144 | func updateCourier (courierIdentification,courierData) = if ((this != i.caller)) | |
145 | 145 | then throw("Caller is not the Contract owner") | |
146 | 146 | else { | |
147 | 147 | let courier = getKeyCourier(courierIdentification) | |
148 | 148 | let oldCourierData = getValueDataOfCourier(courierIdentification) | |
149 | 149 | if ((oldCourierData == NONE)) | |
150 | 150 | then throw("Courier does not exist on the Blockchain") | |
151 | 151 | else [StringEntry(getKeyCourierData(courier), courierData)] | |
152 | 152 | } | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | ||
156 | 156 | @Callable(i) | |
157 | 157 | func addOrder (orderId,shippingCosts,orderData,retailerIdentification,retailerData,city) = if ((this != i.caller)) | |
158 | 158 | then throw("Caller is not the Contract owner") | |
159 | 159 | else { | |
160 | 160 | let order = getKeyOrder(retailerIdentification, orderId) | |
161 | 161 | let orderCityString = getOrderString(city, order) | |
162 | 162 | let retailer = getKeyRetailer(retailerIdentification) | |
163 | 163 | let shipping = (shippingCosts * 100000000) | |
164 | 164 | if ((0 >= shippingCosts)) | |
165 | 165 | then throw("You cannot create an order with shipping costs lower than 0") | |
166 | 166 | else if ((getValueRetailerIdentificationOfOrder(order) != NONE)) | |
167 | 167 | then throw("An order with the same id already exists") | |
168 | 168 | else [StringEntry(getKeyRetailerData(retailer), retailerData), StringEntry(getKeyOrderCity(order), city), StringEntry(getKeyOrderRetailerIdentification(order), retailerIdentification), IntegerEntry(getKeyOrderShippingCosts(order, retailerIdentification), shipping), StringEntry(getKeyOrderDataOpen(orderCityString, retailerIdentification), orderData), StringEntry(getKeyOrderIsAccepted(order, retailerIdentification, ""), "open")] | |
169 | 169 | } | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | ||
173 | 173 | @Callable(i) | |
174 | 174 | func setOrderIsAccepted (retailerIdentification,orderId,courierAddress,timeAccepted) = if ((this != i.caller)) | |
175 | 175 | then throw("Caller is not the Contract owner") | |
176 | 176 | else { | |
177 | 177 | let order = getKeyOrder(retailerIdentification, orderId) | |
178 | 178 | let city = getValueOrderCity(order) | |
179 | 179 | let orderCityString = getOrderString(city, order) | |
180 | 180 | let orderData = getValueDataOfOrderOpen(orderCityString, retailerIdentification) | |
181 | 181 | if ((getValueRetailerIdentificationOfOrder(order) != retailerIdentification)) | |
182 | 182 | then throw("The requested order does not exist") | |
183 | 183 | else if ((getValueIsAcceptedOfOrder(order, retailerIdentification, "") != "open")) | |
184 | 184 | then throw("The requested order is no longer available") | |
185 | 185 | else [DeleteEntry(getKeyOrderDataOpen(orderCityString, retailerIdentification)), DeleteEntry(getKeyOrderIsAccepted(order, retailerIdentification, "")), StringEntry(getKeyOrderIsAccepted(order, retailerIdentification, courierAddress), orderData), BooleanEntry(getKeyOrderIsInDelivery(order, retailerIdentification, courierAddress), false), IntegerEntry(getKeyOrderTimeAccepted(order, retailerIdentification, courierAddress), timeAccepted), StringEntry(getKeyOrderCourier(order, retailerIdentification), courierAddress)] | |
186 | 186 | } | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | ||
190 | 190 | @Callable(i) | |
191 | 191 | func setOrderIsInDelivery (retailerIdentification,orderId) = if ((this != i.caller)) | |
192 | 192 | then throw("Caller is not the Contract owner") | |
193 | 193 | else { | |
194 | 194 | let order = getKeyOrder(retailerIdentification, orderId) | |
195 | 195 | let courierAddress = getValueCourierIdOfOrder(order, retailerIdentification) | |
196 | 196 | if ((getValueRetailerIdentificationOfOrder(order) != retailerIdentification)) | |
197 | 197 | then throw("The requested order does not exist") | |
198 | 198 | else if ((courierAddress == NONE)) | |
199 | 199 | then throw("The requested order is not accepted yet") | |
200 | 200 | else if ((getValueIsInDeliveryOfOrder(order, retailerIdentification, courierAddress) != false)) | |
201 | 201 | then throw("The requested order is no longer available") | |
202 | 202 | else [BooleanEntry(getKeyOrderIsInDelivery(order, retailerIdentification, courierAddress), true), StringEntry(getKeyOrderIsDelivered(order, retailerIdentification, courierAddress), "inDelivery")] | |
203 | 203 | } | |
204 | 204 | ||
205 | 205 | ||
206 | 206 | ||
207 | 207 | @Callable(i) | |
208 | 208 | func setOrderIsDelivered (retailerIdentification,orderId) = if ((this != i.caller)) | |
209 | 209 | then throw("Caller is not the Contract owner") | |
210 | 210 | else { | |
211 | 211 | let order = getKeyOrder(retailerIdentification, orderId) | |
212 | 212 | let courierAddress = getValueCourierIdOfOrder(order, retailerIdentification) | |
213 | 213 | let orderData = getValueIsAcceptedOfOrder(order, retailerIdentification, courierAddress) | |
214 | 214 | let shipping = getValueShippingCostsOfOrder(order, retailerIdentification) | |
215 | 215 | if ((getValueRetailerIdentificationOfOrder(order) != retailerIdentification)) | |
216 | 216 | then throw("The requested order does not exist") | |
217 | 217 | else if ((courierAddress == NONE)) | |
218 | 218 | then throw("There was no courier set! Something went wrong with the order.") | |
219 | 219 | else if ((getValueIsDeliveredOfOrder(order, retailerIdentification, courierAddress) != "inDelivery")) | |
220 | 220 | then throw("The requested order was already delivered") | |
221 | 221 | else [DeleteEntry(getKeyOrderIsAccepted(order, retailerIdentification, courierAddress)), DeleteEntry(getKeyOrderIsInDelivery(order, retailerIdentification, courierAddress)), DeleteEntry(getKeyOrderIsDelivered(order, retailerIdentification, "")), StringEntry(getKeyOrderIsDelivered(order, retailerIdentification, courierAddress), orderData), ScriptTransfer(addressFromStringValue(courierAddress), shipping, unit)] | |
222 | 222 | } | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | ||
226 | 226 | @Callable(i) | |
227 | 227 | func cancelAcceptedOrderByCourier (retailerIdentification,orderId,courierAddress,city) = if ((this != i.caller)) | |
228 | 228 | then throw("Caller is not the Contract owner") | |
229 | 229 | else { | |
230 | 230 | let order = getKeyOrder(retailerIdentification, orderId) | |
231 | 231 | let orderCityString = getOrderString(city, order) | |
232 | 232 | let orderData = getValueIsAcceptedOfOrder(order, retailerIdentification, courierAddress) | |
233 | 233 | if ((getValueRetailerIdentificationOfOrder(order) != retailerIdentification)) | |
234 | 234 | then throw("The requested order does not exist") | |
235 | 235 | else if ((orderData == NONE)) | |
236 | 236 | then throw("The requested order does not exist or is not accepted yet") | |
237 | 237 | else if ((getValueIsInDeliveryOfOrder(order, retailerIdentification, courierAddress) == NONE)) | |
238 | 238 | then throw("The requested order is not accepted yet") | |
239 | - | else [DeleteEntry(getKeyOrderIsAccepted(order, retailerIdentification, courierAddress | |
239 | + | else [DeleteEntry(getKeyOrderIsAccepted(order, retailerIdentification, courierAddress)), DeleteEntry(getKeyOrderIsInDelivery(order, retailerIdentification, courierAddress)), DeleteEntry(getKeyOrderTimeAccepted(order, retailerIdentification, courierAddress)), StringEntry(getKeyOrderDataOpen(orderCityString, retailerIdentification), orderData), StringEntry(getKeyOrderIsAccepted(order, retailerIdentification, ""), "open")] | |
240 | 240 | } | |
241 | 241 | ||
242 | 242 | ||
243 | 243 | ||
244 | 244 | @Callable(i) | |
245 | 245 | func cancelOpenOrderByRetailer (retailerIdentification,orderId,city,retailerWalletAddress,shippingCosts) = if ((this != i.caller)) | |
246 | 246 | then throw("Caller is not the Contract owner") | |
247 | 247 | else { | |
248 | 248 | let order = getKeyOrder(retailerIdentification, orderId) | |
249 | 249 | let orderCityString = getOrderString(city, order) | |
250 | 250 | let retailer = getKeyRetailer(retailerIdentification) | |
251 | 251 | let shipping = (shippingCosts * 100000000) | |
252 | 252 | if ((getValueRetailerIdentificationOfOrder(order) != retailerIdentification)) | |
253 | 253 | then throw("The requested order does not exist") | |
254 | 254 | else if ((getValueIsInDeliveryOfOrder(order, retailerIdentification, "") == "open")) | |
255 | 255 | then throw("The requested order is already accepted and can no longer be canceled in this way") | |
256 | 256 | else [DeleteEntry(getKeyOrderCity(order)), DeleteEntry(getKeyOrderRetailerIdentification(order)), DeleteEntry(getKeyOrderShippingCosts(order, retailerIdentification)), DeleteEntry(getKeyOrderDataOpen(orderCityString, retailerIdentification)), DeleteEntry(getKeyOrderIsAccepted(order, retailerIdentification, "")), ScriptTransfer(addressFromStringValue(retailerWalletAddress), shipping, unit)] | |
257 | 257 | } | |
258 | 258 | ||
259 | 259 | ||
260 | 260 | ||
261 | 261 | @Callable(i) | |
262 | 262 | func deleteEntry (key) = if ((this != i.caller)) | |
263 | 263 | then throw("Caller is not the Contract owner") | |
264 | 264 | else [DeleteEntry(key)] | |
265 | 265 | ||
266 | 266 | ||
267 | 267 | @Verifier(tx) | |
268 | 268 | func verify () = match tx { | |
269 | 269 | case _: SetScriptTransaction => | |
270 | 270 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
271 | 271 | case _: InvokeScriptTransaction => | |
272 | 272 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
273 | 273 | case ttx: TransferTransaction => | |
274 | 274 | if (if (if ((ttx.amount == 300000000)) | |
275 | 275 | then true | |
276 | 276 | else (ttx.amount == 400000000)) | |
277 | 277 | then true | |
278 | 278 | else (ttx.amount == 500000000)) | |
279 | 279 | then true | |
280 | 280 | else if ((ttx.amount == 600000000)) | |
281 | 281 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
282 | 282 | else false | |
283 | 283 | case _ => | |
284 | 284 | false | |
285 | 285 | } | |
286 | 286 |
github/deemru/w8io/026f985 54.36 ms ◑