tx · 72LyHkEkru9fL4eMdD8UeZqsBNriAnp12EXLj3eTNNqN

3N8WKW33bRoL6j8jhERSykdsxLepdwF4roL:  -0.05000000 Waves

2021.01.15 17:04 [1354639] smart account 3N8WKW33bRoL6j8jhERSykdsxLepdwF4roL > SELF 0.00000000 Waves

{ "type": 13, "id": "72LyHkEkru9fL4eMdD8UeZqsBNriAnp12EXLj3eTNNqN", "fee": 5000000, "feeAssetId": null, "timestamp": 1610719493624, "version": 2, "chainId": 84, "sender": "3N8WKW33bRoL6j8jhERSykdsxLepdwF4roL", "senderPublicKey": "DfBpAEVbFfW1EMhjQ2DgbCDVQCY5L1nwL9NdWEmu4j3P", "proofs": [ "2x9sQbpQSwFjdhYcZA5YLBShScxjhhyZfCrHJ7cQtD379ckXug6W1GnhL8vex98tpBzCjn8Co8mKy7bvZjsk6WMs" ], "script": "base64:AAIEAAAAAAAAAE4IAhIECgIICBIECgIICBIECgIICBIECgIICBIICgYIAQgICAgSBgoECAgIARIECgIICBIECgIICBIGCgQICAgIEgcKBQgICAgBEgMKAQgAAAAeAAAAAAROT05FAgAAAAROT05FAAAAAA5yZWJpcnRoQXNzZXRJZAEAAAAgTlKI9Dsdaklo/AL7ycpGOtB8l2A5+AtTNpm2gXIwDDEBAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEFAAAABE5PTkUBAAAAD2dldEJvb2xlYW5CeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGwAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAHQm9vbGVhbgQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQUAAAAETk9ORQEAAAAPZ2V0SW50ZWdlckJ5S2V5AAAAAQAAAANrZXk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F0Y2gwAgAAABdJbnZva2VTY3JpcHRUcmFuc2FjdGlvbgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAA3R0eAUAAAAHJG1hdGNoMAMDAwkAAAAAAAACCAUAAAADdHR4AAAABmFtb3VudAAAAAAAEeGjAAYJAAAAAAAAAggFAAAAA3R0eAAAAAZhbW91bnQAAAAAABfXhAAGCQAAAAAAAAIIBQAAAAN0dHgAAAAGYW1vdW50AAAAAAAdzWUABgMJAAAAAAAAAggFAAAAA3R0eAAAAAZhbW91bnQAAAAAACPDRgAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5Bwd8l5rd", "height": 1354639, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8Xj1EhpqrzTbH9ffs1PSij4tmzxLMphfx1DZAZga86DW Next: smnsNuALuinS5x3D9cwXpRdKm7ZdUGUSjXcV9nCQ6nr Diff:
OldNewDifferences
6060
6161
6262 func getKeyOrderIsInDelivery (order,retailerIdentification,courierAddress) = (((((retailerIdentification + "_") + order) + "_data_courier_") + courierAddress) + "_isInDelivery")
63+
64+
65+func getKeyOrderTimeAccepted (order,retailerIdentification,courierAddress) = (((((retailerIdentification + "_") + order) + "_data_courier_") + courierAddress) + "_acceptedAt")
6366
6467
6568 func getKeyOrderDataOpen (order,retailerIdentification) = (((retailerIdentification + "_") + order) + "_data_open")
168171
169172
170173 @Callable(i)
171-func setOrderIsAccepted (retailerIdentification,orderId,courierAddress) = if ((this != i.caller))
174+func setOrderIsAccepted (retailerIdentification,orderId,courierAddress,timeAccepted) = if ((this != i.caller))
172175 then throw("Caller is not the Contract owner")
173176 else {
174177 let order = getKeyOrder(retailerIdentification, orderId)
179182 then throw("The requested order does not exist")
180183 else if ((getValueIsAcceptedOfOrder(order, retailerIdentification, "") != "open"))
181184 then throw("The requested order is no longer available")
182- else [DeleteEntry(getKeyOrderDataOpen(orderCityString, retailerIdentification)), DeleteEntry(getKeyOrderIsAccepted(order, retailerIdentification, "")), StringEntry(getKeyOrderIsAccepted(order, retailerIdentification, courierAddress), orderData), BooleanEntry(getKeyOrderIsInDelivery(order, retailerIdentification, courierAddress), false), StringEntry(getKeyOrderCourier(order, retailerIdentification), courierAddress)]
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)]
183186 }
184187
185188
233236 then throw("The requested order does not exist or is not accepted yet")
234237 else if ((getValueIsInDeliveryOfOrder(order, retailerIdentification, courierAddress) == NONE))
235238 then throw("The requested order is not accepted yet")
236- else [DeleteEntry(getKeyOrderIsAccepted(order, retailerIdentification, courierAddress)), DeleteEntry(getKeyOrderCity(order)), DeleteEntry(getKeyOrderIsInDelivery(order, retailerIdentification, courierAddress)), StringEntry(getKeyOrderDataOpen(orderCityString, retailerIdentification), orderData), StringEntry(getKeyOrderIsAccepted(order, retailerIdentification, ""), "open")]
239+ else [DeleteEntry(getKeyOrderIsAccepted(order, retailerIdentification, courierAddress)), DeleteEntry(getKeyOrderCity(order)), DeleteEntry(getKeyOrderIsInDelivery(order, retailerIdentification, courierAddress)), DeleteEntry(getKeyOrderTimeAccepted(order, retailerIdentification, courierAddress)), StringEntry(getKeyOrderDataOpen(orderCityString, retailerIdentification), orderData), StringEntry(getKeyOrderIsAccepted(order, retailerIdentification, ""), "open")]
237240 }
238241
239242
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let NONE = "NONE"
55
66 let rebirthAssetId = base58'6Gjo6dZNLzun8w7uzWuH1t6hoGph9KrMcf1qjbEzBsVJ'
77
88 func getStringByKey (key) = match getString(this, key) {
99 case a: String =>
1010 a
1111 case _ =>
1212 NONE
1313 }
1414
1515
1616 func getBooleanByKey (key) = match getBoolean(this, key) {
1717 case a: Boolean =>
1818 a
1919 case _ =>
2020 NONE
2121 }
2222
2323
2424 func getIntegerByKey (key) = match getInteger(this, key) {
2525 case a: Int =>
2626 a
2727 case _ =>
2828 -1
2929 }
3030
3131
3232 func getOrderString (city,keyOrderString) = ((city + "_") + keyOrderString)
3333
3434
3535 func getKeyOrder (retailerIdentification,orderId) = {
3636 let retailerIdentificationAndOrderId = (retailerIdentification + orderId)
3737 ("order_" + toBase58String(sha256(toBytes(retailerIdentificationAndOrderId))))
3838 }
3939
4040
4141 func getKeyRetailer (retailerIdentification) = ("retailer_" + toBase58String(sha256(toBytes(retailerIdentification))))
4242
4343
4444 func getKeyCourier (courierIdentification) = ("courier_" + toBase58String(sha256(toBytes(courierIdentification))))
4545
4646
4747 func getKeyOrderCity (order) = (order + "_city")
4848
4949
5050 func getKeyOrderRetailerIdentification (order) = (order + "_retailer")
5151
5252
5353 func getKeyOrderShippingCosts (order,retailerIdentification) = (((retailerIdentification + "_") + order) + "_shipping")
5454
5555
5656 func getKeyOrderCourier (order,retailerIdentification) = (((retailerIdentification + "_") + order) + "_courierId")
5757
5858
5959 func getKeyOrderIsAccepted (order,retailerIdentification,courierAddress) = ((((retailerIdentification + "_") + order) + "_data_courier_") + courierAddress)
6060
6161
6262 func getKeyOrderIsInDelivery (order,retailerIdentification,courierAddress) = (((((retailerIdentification + "_") + order) + "_data_courier_") + courierAddress) + "_isInDelivery")
63+
64+
65+func getKeyOrderTimeAccepted (order,retailerIdentification,courierAddress) = (((((retailerIdentification + "_") + order) + "_data_courier_") + courierAddress) + "_acceptedAt")
6366
6467
6568 func getKeyOrderDataOpen (order,retailerIdentification) = (((retailerIdentification + "_") + order) + "_data_open")
6669
6770
6871 func getKeyOrderIsDelivered (order,retailerIdentification,courierAddress) = ((((retailerIdentification + "_") + order) + "_isDelivered_") + courierAddress)
6972
7073
7174 func getKeyRetailerData (retailer) = (retailer + "_data")
7275
7376
7477 func getKeyCourierData (courier) = (courier + "_data")
7578
7679
7780 func getValueOrderCity (order) = getStringByKey(getKeyOrderCity(order))
7881
7982
8083 func getValueRetailerIdentificationOfOrder (order) = getStringByKey(getKeyOrderRetailerIdentification(order))
8184
8285
8386 func getValueIsAcceptedOfOrder (order,retailerIdentification,courierAddress) = getStringByKey(getKeyOrderIsAccepted(order, retailerIdentification, courierAddress))
8487
8588
8689 func getValueCourierIdOfOrder (order,retailerIdentification) = getStringByKey(getKeyOrderCourier(order, retailerIdentification))
8790
8891
8992 func getValueIsInDeliveryOfOrder (order,retailerIdentification,courierAddress) = getBooleanByKey(getKeyOrderIsInDelivery(order, retailerIdentification, courierAddress))
9093
9194
9295 func getValueIsDeliveredOfOrder (order,retailerIdentification,courierAddress) = getStringByKey(getKeyOrderIsDelivered(order, retailerIdentification, courierAddress))
9396
9497
9598 func getValueShippingCostsOfOrder (order,retailerIdentification) = getIntegerByKey(getKeyOrderShippingCosts(order, retailerIdentification))
9699
97100
98101 func getValueDataOfOrderOpen (order,retailerIdentification) = getStringByKey(getKeyOrderDataOpen(order, retailerIdentification))
99102
100103
101104 func getValueDataOfRetailer (retailer) = getStringByKey(getKeyRetailerData(retailer))
102105
103106
104107 func getValueDataOfCourier (courier) = getStringByKey(getKeyCourierData(courier))
105108
106109
107110 @Callable(i)
108111 func registerRetailer (retailerIdentification,retailerData) = if ((this != i.caller))
109112 then throw("Caller is not the Contract owner")
110113 else {
111114 let retailer = getKeyRetailer(retailerIdentification)
112115 [StringEntry(getKeyRetailerData(retailer), retailerData)]
113116 }
114117
115118
116119
117120 @Callable(i)
118121 func updateRetailer (retailerIdentification,retailerData) = if ((this != i.caller))
119122 then throw("Caller is not the Contract owner")
120123 else {
121124 let retailer = getKeyRetailer(retailerIdentification)
122125 let oldRetailerData = getValueDataOfRetailer(retailerIdentification)
123126 if ((oldRetailerData == NONE))
124127 then throw("Courier does not exist on the Blockchain")
125128 else [StringEntry(getKeyCourierData(retailer), retailerData)]
126129 }
127130
128131
129132
130133 @Callable(i)
131134 func registerCourier (courierIdentification,courierData) = if ((this != i.caller))
132135 then throw("Caller is not the Contract owner")
133136 else {
134137 let courier = getKeyCourier(courierIdentification)
135138 [StringEntry(getKeyCourierData(courier), courierData)]
136139 }
137140
138141
139142
140143 @Callable(i)
141144 func updateCourier (courierIdentification,courierData) = if ((this != i.caller))
142145 then throw("Caller is not the Contract owner")
143146 else {
144147 let courier = getKeyCourier(courierIdentification)
145148 let oldCourierData = getValueDataOfCourier(courierIdentification)
146149 if ((oldCourierData == NONE))
147150 then throw("Courier does not exist on the Blockchain")
148151 else [StringEntry(getKeyCourierData(courier), courierData)]
149152 }
150153
151154
152155
153156 @Callable(i)
154157 func addOrder (orderId,shippingCosts,orderData,retailerIdentification,retailerData,city) = if ((this != i.caller))
155158 then throw("Caller is not the Contract owner")
156159 else {
157160 let order = getKeyOrder(retailerIdentification, orderId)
158161 let orderCityString = getOrderString(city, order)
159162 let retailer = getKeyRetailer(retailerIdentification)
160163 let shipping = (shippingCosts * 100000000)
161164 if ((0 >= shippingCosts))
162165 then throw("You cannot create an order with shipping costs lower than 0")
163166 else if ((getValueRetailerIdentificationOfOrder(order) != NONE))
164167 then throw("An order with the same id already exists")
165168 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")]
166169 }
167170
168171
169172
170173 @Callable(i)
171-func setOrderIsAccepted (retailerIdentification,orderId,courierAddress) = if ((this != i.caller))
174+func setOrderIsAccepted (retailerIdentification,orderId,courierAddress,timeAccepted) = if ((this != i.caller))
172175 then throw("Caller is not the Contract owner")
173176 else {
174177 let order = getKeyOrder(retailerIdentification, orderId)
175178 let city = getValueOrderCity(order)
176179 let orderCityString = getOrderString(city, order)
177180 let orderData = getValueDataOfOrderOpen(orderCityString, retailerIdentification)
178181 if ((getValueRetailerIdentificationOfOrder(order) != retailerIdentification))
179182 then throw("The requested order does not exist")
180183 else if ((getValueIsAcceptedOfOrder(order, retailerIdentification, "") != "open"))
181184 then throw("The requested order is no longer available")
182- else [DeleteEntry(getKeyOrderDataOpen(orderCityString, retailerIdentification)), DeleteEntry(getKeyOrderIsAccepted(order, retailerIdentification, "")), StringEntry(getKeyOrderIsAccepted(order, retailerIdentification, courierAddress), orderData), BooleanEntry(getKeyOrderIsInDelivery(order, retailerIdentification, courierAddress), false), StringEntry(getKeyOrderCourier(order, retailerIdentification), courierAddress)]
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)]
183186 }
184187
185188
186189
187190 @Callable(i)
188191 func setOrderIsInDelivery (retailerIdentification,orderId) = if ((this != i.caller))
189192 then throw("Caller is not the Contract owner")
190193 else {
191194 let order = getKeyOrder(retailerIdentification, orderId)
192195 let courierAddress = getValueCourierIdOfOrder(order, retailerIdentification)
193196 if ((getValueRetailerIdentificationOfOrder(order) != retailerIdentification))
194197 then throw("The requested order does not exist")
195198 else if ((courierAddress == NONE))
196199 then throw("The requested order is not accepted yet")
197200 else if ((getValueIsInDeliveryOfOrder(order, retailerIdentification, courierAddress) != false))
198201 then throw("The requested order is no longer available")
199202 else [BooleanEntry(getKeyOrderIsInDelivery(order, retailerIdentification, courierAddress), true), StringEntry(getKeyOrderIsDelivered(order, retailerIdentification, courierAddress), "inDelivery")]
200203 }
201204
202205
203206
204207 @Callable(i)
205208 func setOrderIsDelivered (retailerIdentification,orderId) = if ((this != i.caller))
206209 then throw("Caller is not the Contract owner")
207210 else {
208211 let order = getKeyOrder(retailerIdentification, orderId)
209212 let courierAddress = getValueCourierIdOfOrder(order, retailerIdentification)
210213 let orderData = getValueIsAcceptedOfOrder(order, retailerIdentification, courierAddress)
211214 let shipping = getValueShippingCostsOfOrder(order, retailerIdentification)
212215 if ((getValueRetailerIdentificationOfOrder(order) != retailerIdentification))
213216 then throw("The requested order does not exist")
214217 else if ((courierAddress == NONE))
215218 then throw("There was no courier set! Something went wrong with the order.")
216219 else if ((getValueIsDeliveredOfOrder(order, retailerIdentification, courierAddress) != "inDelivery"))
217220 then throw("The requested order was already delivered")
218221 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)]
219222 }
220223
221224
222225
223226 @Callable(i)
224227 func cancelAcceptedOrderByCourier (retailerIdentification,orderId,courierAddress,city) = if ((this != i.caller))
225228 then throw("Caller is not the Contract owner")
226229 else {
227230 let order = getKeyOrder(retailerIdentification, orderId)
228231 let orderCityString = getOrderString(city, order)
229232 let orderData = getValueIsAcceptedOfOrder(order, retailerIdentification, courierAddress)
230233 if ((getValueRetailerIdentificationOfOrder(order) != retailerIdentification))
231234 then throw("The requested order does not exist")
232235 else if ((orderData == NONE))
233236 then throw("The requested order does not exist or is not accepted yet")
234237 else if ((getValueIsInDeliveryOfOrder(order, retailerIdentification, courierAddress) == NONE))
235238 then throw("The requested order is not accepted yet")
236- else [DeleteEntry(getKeyOrderIsAccepted(order, retailerIdentification, courierAddress)), DeleteEntry(getKeyOrderCity(order)), DeleteEntry(getKeyOrderIsInDelivery(order, retailerIdentification, courierAddress)), StringEntry(getKeyOrderDataOpen(orderCityString, retailerIdentification), orderData), StringEntry(getKeyOrderIsAccepted(order, retailerIdentification, ""), "open")]
239+ else [DeleteEntry(getKeyOrderIsAccepted(order, retailerIdentification, courierAddress)), DeleteEntry(getKeyOrderCity(order)), DeleteEntry(getKeyOrderIsInDelivery(order, retailerIdentification, courierAddress)), DeleteEntry(getKeyOrderTimeAccepted(order, retailerIdentification, courierAddress)), StringEntry(getKeyOrderDataOpen(orderCityString, retailerIdentification), orderData), StringEntry(getKeyOrderIsAccepted(order, retailerIdentification, ""), "open")]
237240 }
238241
239242
240243
241244 @Callable(i)
242245 func cancelOpenOrderByRetailer (retailerIdentification,orderId,city,retailerWalletAddress,shippingCosts) = if ((this != i.caller))
243246 then throw("Caller is not the Contract owner")
244247 else {
245248 let order = getKeyOrder(retailerIdentification, orderId)
246249 let orderCityString = getOrderString(city, order)
247250 let retailer = getKeyRetailer(retailerIdentification)
248251 let shipping = (shippingCosts * 100000000)
249252 if ((getValueRetailerIdentificationOfOrder(order) != retailerIdentification))
250253 then throw("The requested order does not exist")
251254 else if ((getValueIsInDeliveryOfOrder(order, retailerIdentification, "") == "open"))
252255 then throw("The requested order is already accepted and can no longer be canceled in this way")
253256 else [DeleteEntry(getKeyOrderCity(order)), DeleteEntry(getKeyOrderRetailerIdentification(order)), DeleteEntry(getKeyOrderShippingCosts(order, retailerIdentification)), DeleteEntry(getKeyOrderDataOpen(orderCityString, retailerIdentification)), DeleteEntry(getKeyOrderIsAccepted(order, retailerIdentification, "")), ScriptTransfer(addressFromStringValue(retailerWalletAddress), shipping, unit)]
254257 }
255258
256259
257260
258261 @Callable(i)
259262 func deleteEntry (key) = if ((this != i.caller))
260263 then throw("Caller is not the Contract owner")
261264 else [DeleteEntry(key)]
262265
263266
264267 @Verifier(tx)
265268 func verify () = match tx {
266269 case _: SetScriptTransaction =>
267270 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
268271 case _: InvokeScriptTransaction =>
269272 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
270273 case ttx: TransferTransaction =>
271274 if (if (if ((ttx.amount == 300000000))
272275 then true
273276 else (ttx.amount == 400000000))
274277 then true
275278 else (ttx.amount == 500000000))
276279 then true
277280 else if ((ttx.amount == 600000000))
278281 then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
279282 else false
280283 case _ =>
281284 false
282285 }
283286

github/deemru/w8io/873ac7e 
83.77 ms