tx · GaKGnfCY9v2xN684AoLBqMn5mE8zGVxwihPf5eciB6T3

3ND6EFqVoR6r9jWRL87nSf2Zs5AMiNnGWD3:  -0.01000000 Waves

2021.07.05 13:17 [1600154] smart account 3ND6EFqVoR6r9jWRL87nSf2Zs5AMiNnGWD3 > SELF 0.00000000 Waves

{ "type": 13, "id": "GaKGnfCY9v2xN684AoLBqMn5mE8zGVxwihPf5eciB6T3", "fee": 1000000, "feeAssetId": null, "timestamp": 1625480245392, "version": 2, "chainId": 84, "sender": "3ND6EFqVoR6r9jWRL87nSf2Zs5AMiNnGWD3", "senderPublicKey": "KUUrvP3E8GJqJe8m89JhbWoFxA5Y6ZArXcUs6XDthT6", "proofs": [ "4BUrAdZ5AoJxJZw1Z3cQ5UqQisp83maiaGQM6WyQaPVGMhW3jTTUHoJz9t7aqT9jqpdg5RAJTguHFmjni4aLKxQt" ], "script": "base64:AAIDAAAAAAAAAHQIARIFCgMICAESAwoBCBoHCgJhMRIBaRoJCgJhMhIDa2V5GgoKAmEzEgRuYW1lGgsKAmE0EgVwcmljZRoJCgJhNRIDcG10GhQKAmE2Eg5jdXRvbWVyQWRkcmVzcxoNCgJhNxIHJG1hdGNoMBoHCgJhOBIBYQAAAAAAAAACAAAAAmExAQAAAAlhZGRjb3Vwb24AAAADAAAAAmEyAAAAAmEzAAAAAmE0CQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAFaXRlbV8FAAAAAmEyAgAAAAxfY291cG9uX25hbWUFAAAAAmEzCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAFaXRlbV8FAAAAAmEyAgAAAA1fY291cG9uX3ByaWNlBQAAAAJhNAUAAAADbmlsAAAAAmExAQAAAAhwdXJjaGFzZQAAAAEAAAACYTIEAAAAAmE1CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAJhMQAAAAdwYXltZW50AwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAAJhNQAAAAdhc3NldElkCQAAAgAAAAECAAAAIENhbiB1c2Ugd2F2ZXMgb25seSBhdCB0aGUgbW9tZW50BAAAAAJhNgkAAlgAAAABCAgFAAAAAmExAAAABmNhbGxlcgAAAAVieXRlcwQAAAACYTQEAAAAAmE3CQAEGgAAAAIFAAAABHRoaXMJAAEsAAAAAgkAASwAAAACAgAAAAVpdGVtXwUAAAACYTICAAAADV9jb3Vwb25fcHJpY2UDCQAAAQAAAAIFAAAAAmE3AgAAAANJbnQEAAAAAmE4BQAAAAJhNwUAAAACYTgAAAAAAAAAAAADCQAAZgAAAAIFAAAAAmE0CAUAAAACYTUAAAAGYW1vdW50CQAAAgAAAAECAAAALlB1cmNoYXNlIGFtb3VudCBjYW5ub3QgYmUgbGVzcyB0aGVuIGl0ZW0gcHJpY2UDCQAAZgAAAAIIBQAAAAJhNQAAAAZhbW91bnQFAAAAAmE0CQAAAgAAAAECAAAALlB1cmNoYXNlIGFtb3VudCBjYW5ub3QgYmUgbGVzcyB0aGVuIGl0ZW0gcHJpY2UJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAFXN0YXR1czpwdXJjaGFzZV9pdGVtXwUAAAACYTICAAAACl9jdXN0b21lcl8FAAAAAmE2AgAAAAljb25maXJtZWQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAFHByaWNlOnB1cmNoYXNlX2l0ZW1fBQAAAAJhMgIAAAAKX2N1c3RvbWVyXwUAAAACYTYFAAAAAmE0BQAAAANuaWwAAAAAUSOkHA==", "height": 1600154, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Dvp6AtajZnqKHFheJ8tQ1wpsf4ZQb9og2YLyKn79zFTp Next: 8bQBiW1Ls5PgrUgZGde395t6gyaUzUYsCT9WTAwS2hpE Diff:
OldNewDifferences
44
55
66 @Callable(a)
7-func addcoupon (b,c) = WriteSet([DataEntry((("item_" + b) + "_coupon_name"), c), DataEntry((("item_" + b) + "_coupon_price"), 3)])
7+func addcoupon (b,c,d) = WriteSet([DataEntry((("item_" + b) + "_coupon_name"), c), DataEntry((("item_" + b) + "_coupon_price"), d)])
88
99
1010
1111 @Callable(a)
1212 func purchase (b) = {
13- let d = extract(a.payment)
14- if (isDefined(d.assetId))
13+ let e = extract(a.payment)
14+ if (isDefined(e.assetId))
1515 then throw("Can use waves only at the moment")
1616 else {
17- let e = toBase58String(a.caller.bytes)
18- let f = {
17+ let f = toBase58String(a.caller.bytes)
18+ let d = {
1919 let g = getInteger(this, (("item_" + b) + "_coupon_price"))
2020 if ($isInstanceOf(g, "Int"))
2121 then {
2424 }
2525 else 0
2626 }
27- if ((f > d.amount))
27+ if ((d > e.amount))
2828 then throw("Purchase amount cannot be less then item price")
29- else if ((d.amount > f))
29+ else if ((e.amount > d))
3030 then throw("Purchase amount cannot be less then item price")
31- else WriteSet([DataEntry(((("status:purchase_item_" + b) + "_customer_") + e), "confirmed"), DataEntry(((("price:purchase_item_" + b) + "_customer_") + e), f)])
31+ else WriteSet([DataEntry(((("status:purchase_item_" + b) + "_customer_") + f), "confirmed"), DataEntry(((("price:purchase_item_" + b) + "_customer_") + f), d)])
3232 }
3333 }
3434
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(a)
7-func addcoupon (b,c) = WriteSet([DataEntry((("item_" + b) + "_coupon_name"), c), DataEntry((("item_" + b) + "_coupon_price"), 3)])
7+func addcoupon (b,c,d) = WriteSet([DataEntry((("item_" + b) + "_coupon_name"), c), DataEntry((("item_" + b) + "_coupon_price"), d)])
88
99
1010
1111 @Callable(a)
1212 func purchase (b) = {
13- let d = extract(a.payment)
14- if (isDefined(d.assetId))
13+ let e = extract(a.payment)
14+ if (isDefined(e.assetId))
1515 then throw("Can use waves only at the moment")
1616 else {
17- let e = toBase58String(a.caller.bytes)
18- let f = {
17+ let f = toBase58String(a.caller.bytes)
18+ let d = {
1919 let g = getInteger(this, (("item_" + b) + "_coupon_price"))
2020 if ($isInstanceOf(g, "Int"))
2121 then {
2222 let h = g
2323 h
2424 }
2525 else 0
2626 }
27- if ((f > d.amount))
27+ if ((d > e.amount))
2828 then throw("Purchase amount cannot be less then item price")
29- else if ((d.amount > f))
29+ else if ((e.amount > d))
3030 then throw("Purchase amount cannot be less then item price")
31- else WriteSet([DataEntry(((("status:purchase_item_" + b) + "_customer_") + e), "confirmed"), DataEntry(((("price:purchase_item_" + b) + "_customer_") + e), f)])
31+ else WriteSet([DataEntry(((("status:purchase_item_" + b) + "_customer_") + f), "confirmed"), DataEntry(((("price:purchase_item_" + b) + "_customer_") + f), d)])
3232 }
3333 }
3434
3535

github/deemru/w8io/026f985 
41.45 ms