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