tx · FzD3W8uBM2nLipFQBPidL3W2wQCbSZAivY1N145gX3To

3N7E5gWZuaeJjgCou4UHGBJm5bh9Hh7KdnB:  -0.01500000 Waves

2019.12.05 15:21 [795427] smart account 3N7E5gWZuaeJjgCou4UHGBJm5bh9Hh7KdnB > SELF 0.00000000 Waves

{ "type": 13, "id": "FzD3W8uBM2nLipFQBPidL3W2wQCbSZAivY1N145gX3To", "fee": 1500000, "feeAssetId": null, "timestamp": 1575548387411, "version": 1, "sender": "3N7E5gWZuaeJjgCou4UHGBJm5bh9Hh7KdnB", "senderPublicKey": "CmpQ6Q9vWocJdukZ82Bgk8SogoxvZovs6pSJPpcu5EDq", "proofs": [ "28W8B2Qccen21EEn7apn3PnaPt2pyZGX2DGnVoaEStpTfq6e5fbdVHzguccwne74MSxoziyhTTrzhGyQegmD6dp6" ], "script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAAAAAAEAAAABaQEAAAAIcHVyY2hhc2UAAAAABAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAgY2FuIHVzZSBXQVZFUyBvbmx5IGF0IHRoZSBtb21lbnQEAAAAD2N1c3RvbWVyQWRkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwcmljZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAABNpdGVtX0FfY291cG9uX3ByaWNlAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAADCQAAZgAAAAIFAAAABXByaWNlCAUAAAADcG10AAAABmFtb3VudAkAAAIAAAABAgAAAC8gcHVyY2hhc2UgYW1vdW50IGNhbm5vdCBiZSBsZXNzIHRoYW4gaXRlbSBwcmljZQMJAABmAAAAAggFAAAAA3BtdAAAAAZhbW91bnQFAAAABXByaWNlCQAAAgAAAAECAAAAMHB1cmNoYXNlIGFtb3VudCBjYW5ub3QgYmUgaGlnaGVyIHRoYW4gaXRlbSBwcmljZQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACAgAAACBzdGF0dXM6cHVyY2hhc2VfaXRlbV9BX2N1c3RvbWVyXwUAAAAPY3VzdG9tZXJBZGRyZXNzAgAAAAljb25maXJtZWQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgIAAAAfcHJpY2U6cHVyY2hhc2VfaXRlbV9BX2N1c3RvbWVyXwUAAAAPY3VzdG9tZXJBZGRyZXNzBQAAAAVwcmljZQUAAAADbmlsAAAAAD5jwoA=", "chainId": 84, "height": 795427, "spentComplexity": 0 } View: original | compacted Prev: 556Km7buwpjQhspdE55GMSbvp5J2g8k21iyZWbrXNZjp Next: none 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)
1313 let price = match getInteger(this, "item_A_coupon_price") {
1414 case a: Int =>
1515 a
1616 case _ =>
1717 0
1818 }
1919 if ((price > pmt.amount))
2020 then throw(" purchase amount cannot be less than item price")
2121 else if ((pmt.amount > price))
2222 then throw("purchase amount cannot be higher than item price")
2323 else WriteSet([DataEntry(("status:purchase_item_A_customer_" + customerAddress), "confirmed"), DataEntry(("price:purchase_item_A_customer_" + customerAddress), price)])
2424 }
2525 }
2626
2727

github/deemru/w8io/169f3d6 
44.63 ms