tx · QDipQwukBdKDYsuEeDmstNiS9Cd2u3MJg87PZr6Yqtr 3N8WKW33bRoL6j8jhERSykdsxLepdwF4roL: -0.05000000 Waves 2021.01.22 16:43 [1364725] smart account 3N8WKW33bRoL6j8jhERSykdsxLepdwF4roL > SELF 0.00000000 Waves
{ "type": 13, "id": "QDipQwukBdKDYsuEeDmstNiS9Cd2u3MJg87PZr6Yqtr", "fee": 5000000, "feeAssetId": null, "timestamp": 1611323019607, "version": 2, "chainId": 84, "sender": "3N8WKW33bRoL6j8jhERSykdsxLepdwF4roL", "senderPublicKey": "DfBpAEVbFfW1EMhjQ2DgbCDVQCY5L1nwL9NdWEmu4j3P", "proofs": [ "5qqczMUCcwtWUvdpdjkQvTEErQt3BTqFDvHEhi4vwT2SvaiSk2BGLYMLpFHDg6uo3Jsbuhvj7SG3za7FhMtULJ5n" ], "script": "base64:AAIEAAAAAAAAAE8IAhIFCgMICAgSBAoCCAgSBAoCCAgSBAoCCAgSCAoGCAEICAgIEgYKBAgICAESBAoCCAgSBAoCCAgSBgoECAgICBIHCgUICAgIARIDCgEIAAAAIAAAAAAETk9ORQIAAAAETk9ORQAAAAAOcmViaXJ0aEFzc2V0SWQBAAAAIE5SiPQ7HWpJaPwC+8nKRjrQfJdgOfgLUzaZtoFyMAwxAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBQAAAAROT05FAQAAAA9nZXRCb29sZWFuQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBsAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAB0Jvb2xlYW4EAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEFAAAABE5PTkUBAAAAD2dldEludGVnZXJCeUtle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AAAgAAAAECAAAAIENhbGxlciBpcyBub3QgdGhlIENvbnRyYWN0IG93bmVyCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEFAAAAA2tleQUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAXSW52b2tlU2NyaXB0VHJhbnNhY3Rpb24JAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAN0dHgFAAAAByRtYXRjaDADAwMJAAAAAAAAAggFAAAAA3R0eAAAAAZhbW91bnQAAAAAABHhowAGCQAAAAAAAAIIBQAAAAN0dHgAAAAGYW1vdW50AAAAAAAX14QABgkAAAAAAAACCAUAAAADdHR4AAAABmFtb3VudAAAAAAAHc1lAAYDCQAAAAAAAAIIBQAAAAN0dHgAAAAGYW1vdW50AAAAAAAjw0YACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQcHJQAIjA==", "height": 1364725, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Hm6Y3du1HNRjr838WGhxFkPFUY5UWv3cczMmN9eco3Lx Next: FwrtiRG5GrwcEs9koPKDQS4DkgqpKcWY4bvirqZJUkNz Diff:
Old | New | Differences | |
---|---|---|---|
69 | 69 | ||
70 | 70 | ||
71 | 71 | func getKeyOrderIsDelivered (order,retailerIdentification,courierAddress) = ((((retailerIdentification + "_") + order) + "_isDelivered_") + courierAddress) | |
72 | - | ||
73 | - | ||
74 | - | func getKeyOrderSignature (order,retailerIdentification) = (((retailerIdentification + "_") + order) + "_signature") | |
75 | 72 | ||
76 | 73 | ||
77 | 74 | func getKeyRetailerData (retailer) = (retailer + "_data") | |
214 | 211 | ||
215 | 212 | ||
216 | 213 | @Callable(i) | |
217 | - | func setOrderIsDelivered (retailerIdentification,orderId | |
214 | + | func setOrderIsDelivered (retailerIdentification,orderId) = if ((this != i.caller)) | |
218 | 215 | then throw("Caller is not the Contract owner") | |
219 | 216 | else { | |
220 | 217 | let order = getKeyOrder(retailerIdentification, orderId) | |
227 | 224 | then throw("There was no courier set! Something went wrong with the order.") | |
228 | 225 | else if ((getValueIsDeliveredOfOrder(order, retailerIdentification, courierAddress) != "inDelivery")) | |
229 | 226 | then throw("The requested order was already delivered") | |
230 | - | else [DeleteEntry(getKeyOrderIsAccepted(order, retailerIdentification, courierAddress)), DeleteEntry(getKeyOrderIsInDelivery(order, retailerIdentification, courierAddress)), DeleteEntry(getKeyOrderIsDelivered(order, retailerIdentification, "")), StringEntry(getKeyOrderIsDelivered(order, retailerIdentification, courierAddress), orderData), | |
227 | + | 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)] | |
231 | 228 | } | |
232 | 229 | ||
233 | 230 |
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 | - | ||
73 | - | ||
74 | - | func getKeyOrderSignature (order,retailerIdentification) = (((retailerIdentification + "_") + order) + "_signature") | |
75 | 72 | ||
76 | 73 | ||
77 | 74 | func getKeyRetailerData (retailer) = (retailer + "_data") | |
78 | 75 | ||
79 | 76 | ||
80 | 77 | func getKeyCourierData (courier) = (courier + "_data") | |
81 | 78 | ||
82 | 79 | ||
83 | 80 | func getKeyRetailerFreeTokens (walletAddress) = (walletAddress + "_tokens") | |
84 | 81 | ||
85 | 82 | ||
86 | 83 | func getValueOrderCity (order) = getStringByKey(getKeyOrderCity(order)) | |
87 | 84 | ||
88 | 85 | ||
89 | 86 | func getValueRetailerFreeTokens (retailer) = getBooleanByKey(getKeyRetailerFreeTokens(retailer)) | |
90 | 87 | ||
91 | 88 | ||
92 | 89 | func getValueRetailerIdentificationOfOrder (order) = getStringByKey(getKeyOrderRetailerIdentification(order)) | |
93 | 90 | ||
94 | 91 | ||
95 | 92 | func getValueIsAcceptedOfOrder (order,retailerIdentification,courierAddress) = getStringByKey(getKeyOrderIsAccepted(order, retailerIdentification, courierAddress)) | |
96 | 93 | ||
97 | 94 | ||
98 | 95 | func getValueCourierIdOfOrder (order,retailerIdentification) = getStringByKey(getKeyOrderCourier(order, retailerIdentification)) | |
99 | 96 | ||
100 | 97 | ||
101 | 98 | func getValueIsInDeliveryOfOrder (order,retailerIdentification,courierAddress) = getBooleanByKey(getKeyOrderIsInDelivery(order, retailerIdentification, courierAddress)) | |
102 | 99 | ||
103 | 100 | ||
104 | 101 | func getValueIsDeliveredOfOrder (order,retailerIdentification,courierAddress) = getStringByKey(getKeyOrderIsDelivered(order, retailerIdentification, courierAddress)) | |
105 | 102 | ||
106 | 103 | ||
107 | 104 | func getValueShippingCostsOfOrder (order,retailerIdentification) = getIntegerByKey(getKeyOrderShippingCosts(order, retailerIdentification)) | |
108 | 105 | ||
109 | 106 | ||
110 | 107 | func getValueDataOfOrderOpen (order,retailerIdentification) = getStringByKey(getKeyOrderDataOpen(order, retailerIdentification)) | |
111 | 108 | ||
112 | 109 | ||
113 | 110 | func getValueDataOfRetailer (retailer) = getStringByKey(getKeyRetailerData(retailer)) | |
114 | 111 | ||
115 | 112 | ||
116 | 113 | func getValueDataOfCourier (courier) = getStringByKey(getKeyCourierData(courier)) | |
117 | 114 | ||
118 | 115 | ||
119 | 116 | @Callable(i) | |
120 | 117 | func registerRetailer (retailerIdentification,retailerData,walletAddress) = if ((this != i.caller)) | |
121 | 118 | then throw("Caller is not the Contract owner") | |
122 | 119 | else { | |
123 | 120 | let retailer = getKeyRetailer(retailerIdentification) | |
124 | 121 | [BooleanEntry(getKeyRetailerFreeTokens(walletAddress), true), StringEntry(getKeyRetailerData(retailer), retailerData)] | |
125 | 122 | } | |
126 | 123 | ||
127 | 124 | ||
128 | 125 | ||
129 | 126 | @Callable(i) | |
130 | 127 | func updateRetailer (retailerIdentification,retailerData) = if ((this != i.caller)) | |
131 | 128 | then throw("Caller is not the Contract owner") | |
132 | 129 | else { | |
133 | 130 | let retailer = getKeyRetailer(retailerIdentification) | |
134 | 131 | let oldRetailerData = getValueDataOfRetailer(retailerIdentification) | |
135 | 132 | if ((oldRetailerData == NONE)) | |
136 | 133 | then throw("Courier does not exist on the Blockchain") | |
137 | 134 | else [StringEntry(getKeyCourierData(retailer), retailerData)] | |
138 | 135 | } | |
139 | 136 | ||
140 | 137 | ||
141 | 138 | ||
142 | 139 | @Callable(i) | |
143 | 140 | func registerCourier (courierIdentification,courierData) = if ((this != i.caller)) | |
144 | 141 | then throw("Caller is not the Contract owner") | |
145 | 142 | else { | |
146 | 143 | let courier = getKeyCourier(courierIdentification) | |
147 | 144 | [StringEntry(getKeyCourierData(courier), courierData)] | |
148 | 145 | } | |
149 | 146 | ||
150 | 147 | ||
151 | 148 | ||
152 | 149 | @Callable(i) | |
153 | 150 | func updateCourier (courierIdentification,courierData) = if ((this != i.caller)) | |
154 | 151 | then throw("Caller is not the Contract owner") | |
155 | 152 | else { | |
156 | 153 | let courier = getKeyCourier(courierIdentification) | |
157 | 154 | let oldCourierData = getValueDataOfCourier(courierIdentification) | |
158 | 155 | if ((oldCourierData == NONE)) | |
159 | 156 | then throw("Courier does not exist on the Blockchain") | |
160 | 157 | else [StringEntry(getKeyCourierData(courier), courierData)] | |
161 | 158 | } | |
162 | 159 | ||
163 | 160 | ||
164 | 161 | ||
165 | 162 | @Callable(i) | |
166 | 163 | func addOrder (orderId,shippingCosts,orderData,retailerIdentification,retailerData,city) = if ((this != i.caller)) | |
167 | 164 | then throw("Caller is not the Contract owner") | |
168 | 165 | else { | |
169 | 166 | let order = getKeyOrder(retailerIdentification, orderId) | |
170 | 167 | let orderCityString = getOrderString(city, order) | |
171 | 168 | let retailer = getKeyRetailer(retailerIdentification) | |
172 | 169 | let shipping = (shippingCosts * 100000000) | |
173 | 170 | if ((0 >= shippingCosts)) | |
174 | 171 | then throw("You cannot create an order with shipping costs lower than 0") | |
175 | 172 | else if ((getValueRetailerIdentificationOfOrder(order) != NONE)) | |
176 | 173 | then throw("An order with the same id already exists") | |
177 | 174 | 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")] | |
178 | 175 | } | |
179 | 176 | ||
180 | 177 | ||
181 | 178 | ||
182 | 179 | @Callable(i) | |
183 | 180 | func setOrderIsAccepted (retailerIdentification,orderId,courierAddress,timeAccepted) = if ((this != i.caller)) | |
184 | 181 | then throw("Caller is not the Contract owner") | |
185 | 182 | else { | |
186 | 183 | let order = getKeyOrder(retailerIdentification, orderId) | |
187 | 184 | let city = getValueOrderCity(order) | |
188 | 185 | let orderCityString = getOrderString(city, order) | |
189 | 186 | let orderData = getValueDataOfOrderOpen(orderCityString, retailerIdentification) | |
190 | 187 | if ((getValueRetailerIdentificationOfOrder(order) != retailerIdentification)) | |
191 | 188 | then throw("The requested order does not exist") | |
192 | 189 | else if ((getValueIsAcceptedOfOrder(order, retailerIdentification, "") != "open")) | |
193 | 190 | then throw("The requested order is no longer available") | |
194 | 191 | 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)] | |
195 | 192 | } | |
196 | 193 | ||
197 | 194 | ||
198 | 195 | ||
199 | 196 | @Callable(i) | |
200 | 197 | func setOrderIsInDelivery (retailerIdentification,orderId) = if ((this != i.caller)) | |
201 | 198 | then throw("Caller is not the Contract owner") | |
202 | 199 | else { | |
203 | 200 | let order = getKeyOrder(retailerIdentification, orderId) | |
204 | 201 | let courierAddress = getValueCourierIdOfOrder(order, retailerIdentification) | |
205 | 202 | if ((getValueRetailerIdentificationOfOrder(order) != retailerIdentification)) | |
206 | 203 | then throw("The requested order does not exist") | |
207 | 204 | else if ((courierAddress == NONE)) | |
208 | 205 | then throw("The requested order is not accepted yet") | |
209 | 206 | else if ((getValueIsInDeliveryOfOrder(order, retailerIdentification, courierAddress) != false)) | |
210 | 207 | then throw("The requested order is no longer available") | |
211 | 208 | else [BooleanEntry(getKeyOrderIsInDelivery(order, retailerIdentification, courierAddress), true), StringEntry(getKeyOrderIsDelivered(order, retailerIdentification, courierAddress), "inDelivery")] | |
212 | 209 | } | |
213 | 210 | ||
214 | 211 | ||
215 | 212 | ||
216 | 213 | @Callable(i) | |
217 | - | func setOrderIsDelivered (retailerIdentification,orderId | |
214 | + | func setOrderIsDelivered (retailerIdentification,orderId) = if ((this != i.caller)) | |
218 | 215 | then throw("Caller is not the Contract owner") | |
219 | 216 | else { | |
220 | 217 | let order = getKeyOrder(retailerIdentification, orderId) | |
221 | 218 | let courierAddress = getValueCourierIdOfOrder(order, retailerIdentification) | |
222 | 219 | let orderData = getValueIsAcceptedOfOrder(order, retailerIdentification, courierAddress) | |
223 | 220 | let shipping = getValueShippingCostsOfOrder(order, retailerIdentification) | |
224 | 221 | if ((getValueRetailerIdentificationOfOrder(order) != retailerIdentification)) | |
225 | 222 | then throw("The requested order does not exist") | |
226 | 223 | else if ((courierAddress == NONE)) | |
227 | 224 | then throw("There was no courier set! Something went wrong with the order.") | |
228 | 225 | else if ((getValueIsDeliveredOfOrder(order, retailerIdentification, courierAddress) != "inDelivery")) | |
229 | 226 | then throw("The requested order was already delivered") | |
230 | - | else [DeleteEntry(getKeyOrderIsAccepted(order, retailerIdentification, courierAddress)), DeleteEntry(getKeyOrderIsInDelivery(order, retailerIdentification, courierAddress)), DeleteEntry(getKeyOrderIsDelivered(order, retailerIdentification, "")), StringEntry(getKeyOrderIsDelivered(order, retailerIdentification, courierAddress), orderData), | |
227 | + | 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)] | |
231 | 228 | } | |
232 | 229 | ||
233 | 230 | ||
234 | 231 | ||
235 | 232 | @Callable(i) | |
236 | 233 | func cancelAcceptedOrderByCourier (retailerIdentification,orderId,courierAddress,city) = if ((this != i.caller)) | |
237 | 234 | then throw("Caller is not the Contract owner") | |
238 | 235 | else { | |
239 | 236 | let order = getKeyOrder(retailerIdentification, orderId) | |
240 | 237 | let orderCityString = getOrderString(city, order) | |
241 | 238 | let orderData = getValueIsAcceptedOfOrder(order, retailerIdentification, courierAddress) | |
242 | 239 | if ((getValueRetailerIdentificationOfOrder(order) != retailerIdentification)) | |
243 | 240 | then throw("The requested order does not exist") | |
244 | 241 | else if ((orderData == NONE)) | |
245 | 242 | then throw("The requested order does not exist or is not accepted yet") | |
246 | 243 | else if ((getValueIsInDeliveryOfOrder(order, retailerIdentification, courierAddress) == NONE)) | |
247 | 244 | then throw("The requested order is not accepted yet") | |
248 | 245 | 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")] | |
249 | 246 | } | |
250 | 247 | ||
251 | 248 | ||
252 | 249 | ||
253 | 250 | @Callable(i) | |
254 | 251 | func cancelOpenOrderByRetailer (retailerIdentification,orderId,city,retailerWalletAddress,shippingCosts) = if ((this != i.caller)) | |
255 | 252 | then throw("Caller is not the Contract owner") | |
256 | 253 | else { | |
257 | 254 | let order = getKeyOrder(retailerIdentification, orderId) | |
258 | 255 | let orderCityString = getOrderString(city, order) | |
259 | 256 | let retailer = getKeyRetailer(retailerIdentification) | |
260 | 257 | let shipping = (shippingCosts * 100000000) | |
261 | 258 | if ((getValueRetailerIdentificationOfOrder(order) != retailerIdentification)) | |
262 | 259 | then throw("The requested order does not exist") | |
263 | 260 | else if ((getValueIsInDeliveryOfOrder(order, retailerIdentification, "") == "open")) | |
264 | 261 | then throw("The requested order is already accepted and can no longer be canceled in this way") | |
265 | 262 | else [DeleteEntry(getKeyOrderCity(order)), DeleteEntry(getKeyOrderRetailerIdentification(order)), DeleteEntry(getKeyOrderShippingCosts(order, retailerIdentification)), DeleteEntry(getKeyOrderDataOpen(orderCityString, retailerIdentification)), DeleteEntry(getKeyOrderIsAccepted(order, retailerIdentification, "")), ScriptTransfer(addressFromStringValue(retailerWalletAddress), shipping, unit)] | |
266 | 263 | } | |
267 | 264 | ||
268 | 265 | ||
269 | 266 | ||
270 | 267 | @Callable(i) | |
271 | 268 | func deleteEntry (key) = if ((this != i.caller)) | |
272 | 269 | then throw("Caller is not the Contract owner") | |
273 | 270 | else [DeleteEntry(key)] | |
274 | 271 | ||
275 | 272 | ||
276 | 273 | @Verifier(tx) | |
277 | 274 | func verify () = match tx { | |
278 | 275 | case _: SetScriptTransaction => | |
279 | 276 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
280 | 277 | case _: InvokeScriptTransaction => | |
281 | 278 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
282 | 279 | case ttx: TransferTransaction => | |
283 | 280 | if (if (if ((ttx.amount == 300000000)) | |
284 | 281 | then true | |
285 | 282 | else (ttx.amount == 400000000)) | |
286 | 283 | then true | |
287 | 284 | else (ttx.amount == 500000000)) | |
288 | 285 | then true | |
289 | 286 | else if ((ttx.amount == 600000000)) | |
290 | 287 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
291 | 288 | else false | |
292 | 289 | case _ => | |
293 | 290 | false | |
294 | 291 | } | |
295 | 292 |
github/deemru/w8io/026f985 44.97 ms ◑