tx · GXMmNF21ZmFpnSzpXHWC1FUgGLZc9bJfwhzjoUN1gywg

3N5dNGqf97iKYDFN14a3jijT6XbBPMQ5Tbb:  -0.05000000 Waves

2020.02.01 22:31 [880481] smart account 3N5dNGqf97iKYDFN14a3jijT6XbBPMQ5Tbb > SELF 0.00000000 Waves

{ "type": 13, "id": "GXMmNF21ZmFpnSzpXHWC1FUgGLZc9bJfwhzjoUN1gywg", "fee": 5000000, "feeAssetId": null, "timestamp": 1580585529327, "version": 1, "sender": "3N5dNGqf97iKYDFN14a3jijT6XbBPMQ5Tbb", "senderPublicKey": "7vJLhpxiWqK5mqJFQSkbqdBCLNpM1ecA9VExrGEK5Jpr", "proofs": [ "5zDM6bwZwuBoJa1G1LFPiKtjXx9MJAiZZ8fmWrWhEDmVsg2StpgpqXVVnANSyQNouF25rErZEVSc2vMSMyWVgWTM" ], "script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAQAAAAAQaXRlbUFDb3Vwb25QcmljZQAAAAAAAJiWgAAAAAEAAAABaQEAAAAIcHVyY2hhc2UAAAAABAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAhY2FuIHVzZSBXQVZFUyAgb25seSBhdCB0aGUgbW9tZW50BAAAAA9jdXN0b21lckFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAFcHJpY2UFAAAAEGl0ZW1BQ291cG9uUHJpY2UDCQAAZgAAAAIFAAAABXByaWNlCAUAAAADcG10AAAABmFtb3VudAkAAAIAAAABAgAAAC5wdXJjaGFzZSBhbW91bnQgY2Fubm90IGJlIGxlc3MgdGhhbiBpdGVtIHByaWNlAwkAAGYAAAACCAUAAAADcG10AAAABmFtb3VudAUAAAAFcHJpY2UJAAACAAAAAQIAAAAwcHVyY2hhc2UgYW1vdW50IGNhbm5vdCBiZSBoaWdoZXIgdGhhbiBpdGVtIHByaWNlCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAICAAAAIHN0YXR1czpwdXJjaGFzZV9pdGVtX0FfY3VzdG9tZXJfBQAAAA9jdXN0b21lckFkZHJlc3MCAAAACWNvbmZpcm1lZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACAgAAAB9wcmljZTpwdXJjaGFzZV9pdGVtX0FfY3VzdG9tZXJfBQAAAA9jdXN0b21lckFkZHJlc3MFAAAABXByaWNlBQAAAANuaWwAAAAAWuX5ww==", "chainId": 84, "height": 880481, "spentComplexity": 0 } View: original | compacted Prev: CXyD4C9A7oA4R3x52UcqjqQrfzN1kDdHudBK1sTET2n7 Next: Ef6h2erbDnkx3qZPUMVYEu8VxWYUYVAco6PVD98A8D19 Diff:
OldNewDifferences
1313 let price = itemACouponPrice
1414 if ((price > pmt.amount))
1515 then throw("purchase amount cannot be less than item price")
16- else WriteSet([DataEntry(("status:purchase_item_A_customer_" + customerAddress), "confirmed"), DataEntry(("price:purchase_item_A_customer_" + customerAddress), price)])
16+ else if ((pmt.amount > price))
17+ then throw("purchase amount cannot be higher than item price")
18+ else WriteSet([DataEntry(("status:purchase_item_A_customer_" + customerAddress), "confirmed"), DataEntry(("price:purchase_item_A_customer_" + customerAddress), price)])
1719 }
1820 }
1921
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let itemACouponPrice = 10000000
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)
1313 let price = itemACouponPrice
1414 if ((price > pmt.amount))
1515 then throw("purchase amount cannot be less than item price")
16- else WriteSet([DataEntry(("status:purchase_item_A_customer_" + customerAddress), "confirmed"), DataEntry(("price:purchase_item_A_customer_" + customerAddress), price)])
16+ else if ((pmt.amount > price))
17+ then throw("purchase amount cannot be higher than item price")
18+ else WriteSet([DataEntry(("status:purchase_item_A_customer_" + customerAddress), "confirmed"), DataEntry(("price:purchase_item_A_customer_" + customerAddress), price)])
1719 }
1820 }
1921
2022

github/deemru/w8io/026f985 
28.96 ms