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:
Old | New | | Differences |
---|
10 | 10 | | then throw("Can use WAVES only at the moment") |
---|
11 | 11 | | else { |
---|
12 | 12 | | 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")) { |
---|
14 | 14 | | case a: Int => |
---|
15 | 15 | | a |
---|
16 | 16 | | case _ => |
---|
|
20 | 20 | | then throw("aankoopbedrag kan niet lager zijn dan de prijs") |
---|
21 | 21 | | else if ((pmt.amount > price)) |
---|
22 | 22 | | 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)]) |
---|
24 | 24 | | } |
---|
25 | 25 | | } |
---|
26 | 26 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func purchase () = { |
---|
8 | 8 | | let pmt = extract(i.payment) |
---|
9 | 9 | | if (isDefined(pmt.assetId)) |
---|
10 | 10 | | then throw("Can use WAVES only at the moment") |
---|
11 | 11 | | else { |
---|
12 | 12 | | 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")) { |
---|
14 | 14 | | case a: Int => |
---|
15 | 15 | | a |
---|
16 | 16 | | case _ => |
---|
17 | 17 | | 0 |
---|
18 | 18 | | } |
---|
19 | 19 | | if ((price > pmt.amount)) |
---|
20 | 20 | | then throw("aankoopbedrag kan niet lager zijn dan de prijs") |
---|
21 | 21 | | else if ((pmt.amount > price)) |
---|
22 | 22 | | 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)]) |
---|
24 | 24 | | } |
---|
25 | 25 | | } |
---|
26 | 26 | | |
---|
27 | 27 | | |
---|