tx · 6FHMW7wLr1Zw1GSqFQia5MH8YzdEqZhWWJabp7X4wVwi

3N8WKW33bRoL6j8jhERSykdsxLepdwF4roL:  -0.05000000 Waves

2021.01.12 19:39 [1350475] smart account 3N8WKW33bRoL6j8jhERSykdsxLepdwF4roL > SELF 0.00000000 Waves

{ "type": 13, "id": "6FHMW7wLr1Zw1GSqFQia5MH8YzdEqZhWWJabp7X4wVwi", "fee": 5000000, "feeAssetId": null, "timestamp": 1610469528719, "version": 2, "chainId": 84, "sender": "3N8WKW33bRoL6j8jhERSykdsxLepdwF4roL", "senderPublicKey": "DfBpAEVbFfW1EMhjQ2DgbCDVQCY5L1nwL9NdWEmu4j3P", "proofs": [ "3Bq2T6ExFdtTdo52rTRgacUs1h6s7u3mx3E2iTMwv86R4CGj2oYMWDxsfN6Fi11yAcZnSWi9VnK4GHpcqvLdmG8L" ], "script": "base64:AAIEAAAAAAAAAE0IAhIECgIICBIECgIICBIECgIICBIECgIICBIICgYIAQgICAgSBQoDCAgIEgQKAggIEgQKAggIEgYKBAgICAgSBwoFCAgICAESAwoBCAAAAB0AAAAABE5PTkUCAAAABE5PTkUAAAAADnJlYmlydGhBc3NldElkAQAAACBOUoj0Ox1qSWj8AvvJykY60HyXYDn4C1M2mbaBcjAMMQEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQUAAAAETk9ORQEAAAAPZ2V0Qm9vbGVhbkJ5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQbAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAdCb29sZWFuBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBQAAAAROT05FAQAAAA9nZXRJbnRlZ2VyQnlLZXkAAAAB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JvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5BwfTt5/3", "height": 1350475, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5L2scGfjHQjzSaFMnrM52XMtZcgQgopWFMVuXSmhL8c1 Next: 8Xj1EhpqrzTbH9ffs1PSij4tmzxLMphfx1DZAZga86DW Diff:
OldNewDifferences
101101 func getValueDataOfRetailer (retailer) = getStringByKey(getKeyRetailerData(retailer))
102102
103103
104+func getValueDataOfCourier (courier) = getStringByKey(getKeyCourierData(courier))
105+
106+
104107 @Callable(i)
105108 func registerRetailer (retailerIdentification,retailerData) = if ((this != i.caller))
106109 then throw("Caller is not the Contract owner")
112115
113116
114117 @Callable(i)
118+func updateRetailer (retailerIdentification,retailerData) = if ((this != i.caller))
119+ then throw("Caller is not the Contract owner")
120+ else {
121+ let retailer = getKeyRetailer(retailerIdentification)
122+ let oldRetailerData = getValueDataOfRetailer(retailerIdentification)
123+ if ((oldRetailerData == NONE))
124+ then throw("Courier does not exist on the Blockchain")
125+ else [StringEntry(getKeyCourierData(retailer), retailerData)]
126+ }
127+
128+
129+
130+@Callable(i)
115131 func registerCourier (courierIdentification,courierData) = if ((this != i.caller))
116132 then throw("Caller is not the Contract owner")
117133 else {
118134 let courier = getKeyCourier(courierIdentification)
119135 [StringEntry(getKeyCourierData(courier), courierData)]
136+ }
137+
138+
139+
140+@Callable(i)
141+func updateCourier (courierIdentification,courierData) = if ((this != i.caller))
142+ then throw("Caller is not the Contract owner")
143+ else {
144+ let courier = getKeyCourier(courierIdentification)
145+ let oldCourierData = getValueDataOfCourier(courierIdentification)
146+ if ((oldCourierData == NONE))
147+ then throw("Courier does not exist on the Blockchain")
148+ else [StringEntry(getKeyCourierData(courier), courierData)]
120149 }
121150
122151
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")
6363
6464
6565 func getKeyOrderDataOpen (order,retailerIdentification) = (((retailerIdentification + "_") + order) + "_data_open")
6666
6767
6868 func getKeyOrderIsDelivered (order,retailerIdentification,courierAddress) = ((((retailerIdentification + "_") + order) + "_isDelivered_") + courierAddress)
6969
7070
7171 func getKeyRetailerData (retailer) = (retailer + "_data")
7272
7373
7474 func getKeyCourierData (courier) = (courier + "_data")
7575
7676
7777 func getValueOrderCity (order) = getStringByKey(getKeyOrderCity(order))
7878
7979
8080 func getValueRetailerIdentificationOfOrder (order) = getStringByKey(getKeyOrderRetailerIdentification(order))
8181
8282
8383 func getValueIsAcceptedOfOrder (order,retailerIdentification,courierAddress) = getStringByKey(getKeyOrderIsAccepted(order, retailerIdentification, courierAddress))
8484
8585
8686 func getValueCourierIdOfOrder (order,retailerIdentification) = getStringByKey(getKeyOrderCourier(order, retailerIdentification))
8787
8888
8989 func getValueIsInDeliveryOfOrder (order,retailerIdentification,courierAddress) = getBooleanByKey(getKeyOrderIsInDelivery(order, retailerIdentification, courierAddress))
9090
9191
9292 func getValueIsDeliveredOfOrder (order,retailerIdentification,courierAddress) = getStringByKey(getKeyOrderIsDelivered(order, retailerIdentification, courierAddress))
9393
9494
9595 func getValueShippingCostsOfOrder (order,retailerIdentification) = getIntegerByKey(getKeyOrderShippingCosts(order, retailerIdentification))
9696
9797
9898 func getValueDataOfOrderOpen (order,retailerIdentification) = getStringByKey(getKeyOrderDataOpen(order, retailerIdentification))
9999
100100
101101 func getValueDataOfRetailer (retailer) = getStringByKey(getKeyRetailerData(retailer))
102102
103103
104+func getValueDataOfCourier (courier) = getStringByKey(getKeyCourierData(courier))
105+
106+
104107 @Callable(i)
105108 func registerRetailer (retailerIdentification,retailerData) = if ((this != i.caller))
106109 then throw("Caller is not the Contract owner")
107110 else {
108111 let retailer = getKeyRetailer(retailerIdentification)
109112 [StringEntry(getKeyRetailerData(retailer), retailerData)]
110113 }
111114
112115
113116
114117 @Callable(i)
118+func updateRetailer (retailerIdentification,retailerData) = if ((this != i.caller))
119+ then throw("Caller is not the Contract owner")
120+ else {
121+ let retailer = getKeyRetailer(retailerIdentification)
122+ let oldRetailerData = getValueDataOfRetailer(retailerIdentification)
123+ if ((oldRetailerData == NONE))
124+ then throw("Courier does not exist on the Blockchain")
125+ else [StringEntry(getKeyCourierData(retailer), retailerData)]
126+ }
127+
128+
129+
130+@Callable(i)
115131 func registerCourier (courierIdentification,courierData) = if ((this != i.caller))
116132 then throw("Caller is not the Contract owner")
117133 else {
118134 let courier = getKeyCourier(courierIdentification)
119135 [StringEntry(getKeyCourierData(courier), courierData)]
136+ }
137+
138+
139+
140+@Callable(i)
141+func updateCourier (courierIdentification,courierData) = if ((this != i.caller))
142+ then throw("Caller is not the Contract owner")
143+ else {
144+ let courier = getKeyCourier(courierIdentification)
145+ let oldCourierData = getValueDataOfCourier(courierIdentification)
146+ if ((oldCourierData == NONE))
147+ then throw("Courier does not exist on the Blockchain")
148+ else [StringEntry(getKeyCourierData(courier), courierData)]
120149 }
121150
122151
123152
124153 @Callable(i)
125154 func addOrder (orderId,shippingCosts,orderData,retailerIdentification,retailerData,city) = if ((this != i.caller))
126155 then throw("Caller is not the Contract owner")
127156 else {
128157 let order = getKeyOrder(retailerIdentification, orderId)
129158 let orderCityString = getOrderString(city, order)
130159 let retailer = getKeyRetailer(retailerIdentification)
131160 let shipping = (shippingCosts * 100000000)
132161 if ((0 >= shippingCosts))
133162 then throw("You cannot create an order with shipping costs lower than 0")
134163 else if ((getValueRetailerIdentificationOfOrder(order) != NONE))
135164 then throw("An order with the same id already exists")
136165 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")]
137166 }
138167
139168
140169
141170 @Callable(i)
142171 func setOrderIsAccepted (retailerIdentification,orderId,courierAddress) = if ((this != i.caller))
143172 then throw("Caller is not the Contract owner")
144173 else {
145174 let order = getKeyOrder(retailerIdentification, orderId)
146175 let city = getValueOrderCity(order)
147176 let orderCityString = getOrderString(city, order)
148177 let orderData = getValueDataOfOrderOpen(orderCityString, retailerIdentification)
149178 if ((getValueRetailerIdentificationOfOrder(order) != retailerIdentification))
150179 then throw("The requested order does not exist")
151180 else if ((getValueIsAcceptedOfOrder(order, retailerIdentification, "") != "open"))
152181 then throw("The requested order is no longer available")
153182 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)]
154183 }
155184
156185
157186
158187 @Callable(i)
159188 func setOrderIsInDelivery (retailerIdentification,orderId) = if ((this != i.caller))
160189 then throw("Caller is not the Contract owner")
161190 else {
162191 let order = getKeyOrder(retailerIdentification, orderId)
163192 let courierAddress = getValueCourierIdOfOrder(order, retailerIdentification)
164193 if ((getValueRetailerIdentificationOfOrder(order) != retailerIdentification))
165194 then throw("The requested order does not exist")
166195 else if ((courierAddress == NONE))
167196 then throw("The requested order is not accepted yet")
168197 else if ((getValueIsInDeliveryOfOrder(order, retailerIdentification, courierAddress) != false))
169198 then throw("The requested order is no longer available")
170199 else [BooleanEntry(getKeyOrderIsInDelivery(order, retailerIdentification, courierAddress), true), StringEntry(getKeyOrderIsDelivered(order, retailerIdentification, courierAddress), "inDelivery")]
171200 }
172201
173202
174203
175204 @Callable(i)
176205 func setOrderIsDelivered (retailerIdentification,orderId) = if ((this != i.caller))
177206 then throw("Caller is not the Contract owner")
178207 else {
179208 let order = getKeyOrder(retailerIdentification, orderId)
180209 let courierAddress = getValueCourierIdOfOrder(order, retailerIdentification)
181210 let orderData = getValueIsAcceptedOfOrder(order, retailerIdentification, courierAddress)
182211 let shipping = getValueShippingCostsOfOrder(order, retailerIdentification)
183212 if ((getValueRetailerIdentificationOfOrder(order) != retailerIdentification))
184213 then throw("The requested order does not exist")
185214 else if ((courierAddress == NONE))
186215 then throw("There was no courier set! Something went wrong with the order.")
187216 else if ((getValueIsDeliveredOfOrder(order, retailerIdentification, courierAddress) != "inDelivery"))
188217 then throw("The requested order was already delivered")
189218 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)]
190219 }
191220
192221
193222
194223 @Callable(i)
195224 func cancelAcceptedOrderByCourier (retailerIdentification,orderId,courierAddress,city) = if ((this != i.caller))
196225 then throw("Caller is not the Contract owner")
197226 else {
198227 let order = getKeyOrder(retailerIdentification, orderId)
199228 let orderCityString = getOrderString(city, order)
200229 let orderData = getValueIsAcceptedOfOrder(order, retailerIdentification, courierAddress)
201230 if ((getValueRetailerIdentificationOfOrder(order) != retailerIdentification))
202231 then throw("The requested order does not exist")
203232 else if ((orderData == NONE))
204233 then throw("The requested order does not exist or is not accepted yet")
205234 else if ((getValueIsInDeliveryOfOrder(order, retailerIdentification, courierAddress) == NONE))
206235 then throw("The requested order is not accepted yet")
207236 else [DeleteEntry(getKeyOrderIsAccepted(order, retailerIdentification, courierAddress)), DeleteEntry(getKeyOrderCity(order)), DeleteEntry(getKeyOrderRetailerIdentification(order)), DeleteEntry(getKeyOrderIsInDelivery(order, retailerIdentification, courierAddress)), StringEntry(getKeyOrderDataOpen(orderCityString, retailerIdentification), orderData), StringEntry(getKeyOrderIsAccepted(order, retailerIdentification, ""), "open")]
208237 }
209238
210239
211240
212241 @Callable(i)
213242 func cancelOpenOrderByRetailer (retailerIdentification,orderId,city,retailerWalletAddress,shippingCosts) = if ((this != i.caller))
214243 then throw("Caller is not the Contract owner")
215244 else {
216245 let order = getKeyOrder(retailerIdentification, orderId)
217246 let orderCityString = getOrderString(city, order)
218247 let retailer = getKeyRetailer(retailerIdentification)
219248 let shipping = (shippingCosts * 100000000)
220249 if ((getValueRetailerIdentificationOfOrder(order) != retailerIdentification))
221250 then throw("The requested order does not exist")
222251 else if ((getValueIsInDeliveryOfOrder(order, retailerIdentification, "") == "open"))
223252 then throw("The requested order is already accepted and can no longer be canceled in this way")
224253 else [DeleteEntry(getKeyOrderCity(order)), DeleteEntry(getKeyOrderRetailerIdentification(order)), DeleteEntry(getKeyOrderShippingCosts(order, retailerIdentification)), DeleteEntry(getKeyOrderDataOpen(orderCityString, retailerIdentification)), DeleteEntry(getKeyOrderIsAccepted(order, retailerIdentification, "")), ScriptTransfer(addressFromStringValue(retailerWalletAddress), shipping, unit)]
225254 }
226255
227256
228257
229258 @Callable(i)
230259 func deleteEntry (key) = if ((this != i.caller))
231260 then throw("Caller is not the Contract owner")
232261 else [DeleteEntry(key)]
233262
234263
235264 @Verifier(tx)
236265 func verify () = match tx {
237266 case _: SetScriptTransaction =>
238267 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
239268 case _: InvokeScriptTransaction =>
240269 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
241270 case ttx: TransferTransaction =>
242271 if (if (if ((ttx.amount == 300000000))
243272 then true
244273 else (ttx.amount == 400000000))
245274 then true
246275 else (ttx.amount == 500000000))
247276 then true
248277 else if ((ttx.amount == 600000000))
249278 then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
250279 else false
251280 case _ =>
252281 false
253282 }
254283

github/deemru/w8io/026f985 
41.08 ms