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