tx · HrxS4uF6PX5ynha9bfrsFfk7xKk7iqVuYMjpKggM84hB

3Mza1UcSrYad2hGwnxRpxbquAoP4ee7kS7X:  -0.01400000 Waves

2019.07.16 11:42 [588142] smart account 3Mza1UcSrYad2hGwnxRpxbquAoP4ee7kS7X > SELF 0.00000000 Waves

{ "type": 13, "id": "HrxS4uF6PX5ynha9bfrsFfk7xKk7iqVuYMjpKggM84hB", "fee": 1400000, "feeAssetId": null, "timestamp": 1563266522222, "version": 1, "sender": "3Mza1UcSrYad2hGwnxRpxbquAoP4ee7kS7X", "senderPublicKey": "BDzd4V6bFqvL3bMmceVKyprt22wBJBe683pvQ2t5NMU5", "proofs": [ "3SFgd6GY3AiJpBjW8A4g2A3HVnemxrUpSzFZ8NyLDz7gRMBLdhm5EFZ7Aod8WwJXAkCUVRxhiHNJNQJmT9E3xg8d" ], "script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAQAAAAFpAQAAAAhwdXJjaGFzZQAAAAAEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACBDYW4gdXNlIFdBVkVTIG9ubHkgYXQgdGhlIG1vbWVudAQAAAAPY3VzdG9tZXJBZGRyZXNzCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAABXByaWNlBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMJAAEsAAAAAgIAAAAFaXRlbV8CAAAAEWl0ZW1fY291cG9uX3ByaWNlAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAADCQAAZgAAAAIFAAAABXByaWNlCAUAAAADcG10AAAABmFtb3VudAkAAAIAAAABAgAAAC5hYW5rb29wYmVkcmFnIGthbiBuaWV0IGxhZ2VyIHppam4gZGFuIGRlIHByaWpzAwkAAGYAAAACCAUAAAADcG10AAAABmFtb3VudAUAAAAFcHJpY2UJAAACAAAAAQIAAAAuYWFua29vcGJlZHJhZyBrYW4gbmlldCBob2dlciB6aWpuIGRhbiBkZSBwcmlqcwkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAICAAAAFXN0YXR1czpwdXJjaGFzZV9pdGVtXwIAAAAKX2N1c3RvbWVyXwUAAAAPY3VzdG9tZXJBZGRyZXNzAgAAAAljb25maXJtZWQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACAgAAABRwcmljZTpwdXJjaGFzZV9pdGVtXwIAAAAKX2N1c3RvbWVyXwUAAAAPY3VzdG9tZXJBZGRyZXNzBQAAAAVwcmljZQUAAAADbmlsAAAAAF52dTo=", "chainId": 84, "height": 588142, "spentComplexity": 0 } View: original | compacted Prev: BdowG8XupwLM7oWTHD7gBaEaLcknWiPngd6mZcgmQtxT Next: 2KhCesde98g7Wz2gfa7YAd7wFC9vD2c2poc1Kwedn2C1 Diff:
OldNewDifferences
1010 then throw("Can use WAVES only at the moment")
1111 else {
1212 let customerAddress = toBase58String(i.caller.bytes)
13- let price = match getInteger(this, "item_A_coupon_price") {
13+ let price = match getInteger(this, ("item_" + "item_coupon_price")) {
1414 case a: Int =>
1515 a
1616 case _ =>
2020 then throw("aankoopbedrag kan niet lager zijn dan de prijs")
2121 else if ((pmt.amount > price))
2222 then throw("aankoopbedrag kan niet hoger zijn dan de prijs")
23- else WriteSet([DataEntry(("status:purchase_item_A_customer_" + customerAddress), "confirmed"), DataEntry(("price:purhchase_item_A_customer_" + customerAddress), price)])
23+ else WriteSet([DataEntry((("status:purchase_item_" + "_customer_") + customerAddress), "confirmed"), DataEntry((("price:purchase_item_" + "_customer_") + customerAddress), price)])
2424 }
2525 }
2626
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func purchase () = {
88 let pmt = extract(i.payment)
99 if (isDefined(pmt.assetId))
1010 then throw("Can use WAVES only at the moment")
1111 else {
1212 let customerAddress = toBase58String(i.caller.bytes)
13- let price = match getInteger(this, "item_A_coupon_price") {
13+ let price = match getInteger(this, ("item_" + "item_coupon_price")) {
1414 case a: Int =>
1515 a
1616 case _ =>
1717 0
1818 }
1919 if ((price > pmt.amount))
2020 then throw("aankoopbedrag kan niet lager zijn dan de prijs")
2121 else if ((pmt.amount > price))
2222 then throw("aankoopbedrag kan niet hoger zijn dan de prijs")
23- else WriteSet([DataEntry(("status:purchase_item_A_customer_" + customerAddress), "confirmed"), DataEntry(("price:purhchase_item_A_customer_" + customerAddress), price)])
23+ else WriteSet([DataEntry((("status:purchase_item_" + "_customer_") + customerAddress), "confirmed"), DataEntry((("price:purchase_item_" + "_customer_") + customerAddress), price)])
2424 }
2525 }
2626
2727

github/deemru/w8io/169f3d6 
35.51 ms