tx · 556Km7buwpjQhspdE55GMSbvp5J2g8k21iyZWbrXNZjp

3N7E5gWZuaeJjgCou4UHGBJm5bh9Hh7KdnB:  -0.01000000 Waves

2019.12.05 14:53 [795399] smart account 3N7E5gWZuaeJjgCou4UHGBJm5bh9Hh7KdnB > SELF 0.00000000 Waves

{ "type": 13, "id": "556Km7buwpjQhspdE55GMSbvp5J2g8k21iyZWbrXNZjp", "fee": 1000000, "feeAssetId": null, "timestamp": 1575546363656, "version": 1, "sender": "3N7E5gWZuaeJjgCou4UHGBJm5bh9Hh7KdnB", "senderPublicKey": "CmpQ6Q9vWocJdukZ82Bgk8SogoxvZovs6pSJPpcu5EDq", "proofs": [ "D6j69QA2tMEdiZjK9ZZ8Me358bMdrk2FnHSqvqpGrnSXbHRf1D3efQjx4FPhNYHsip3aJiT2pBAf9Ha7at3c683" ], "script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAAAAAAEAAAABaQEAAAAIcHVyY2hhc2UAAAAABAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAgY2FuIHVzZSBXQVZFUyBvbmx5IGF0IHRoZSBtb21lbnQEAAAAD2N1c3RvbWVyQWRkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwcmljZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAABNpdGVtX0FfY291cG9uX3ByaWNlAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAADCQAAZgAAAAIFAAAABXByaWNlCAUAAAADcG10AAAABmFtb3VudAkAAAIAAAABAgAAAC8gcHVyY2hhc2UgYW1vdW50IGNhbm5vdCBiZSBsZXNzIHRoYW4gaXRlbSBwcmljZQMJAABmAAAAAggFAAAAA3BtdAAAAAZhbW91bnQFAAAABXByaWNlCQAAAgAAAAECAAAAMHB1cmNoYXNlIGFtb3VudCBjYW5ub3QgYmUgaGlnaGVyIHRoYW4gaXRlbSBwcmljZQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACAgAAACBzdGF0dXM6cHVyY2hhc2VfaXRlbV9BX2N1c3RvbWVyXwUAAAAPY3VzdG9tZXJBZGRyZXNzAgAAAAljb25maXJtZWQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgIAAAAfcHJpY2U6cHVyY2hhc2VfaXRlbV9BX2N1c3RvbWVyXwUAAAAPY3VzdG9tZXJBZGRyZXNzBQAAAAVwcmljZQUAAAADbmlsAAAAAD5jwoA=", "chainId": 84, "height": 795399, "spentComplexity": 0 } View: original | compacted Prev: none Next: FzD3W8uBM2nLipFQBPidL3W2wQCbSZAivY1N145gX3To Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+
5+
6+@Callable(a)
7+func purchase () = {
8+ let b = extract(a.payment)
9+ if (isDefined(b.assetId))
10+ then throw("can use WAVES only at the moment")
11+ else {
12+ let c = toBase58String(a.caller.bytes)
13+ let d = {
14+ let e = getInteger(this, "item_A_coupon_price")
15+ if ($isInstanceOf(e, "Int"))
16+ then {
17+ let f = e
18+ f
19+ }
20+ else 0
21+ }
22+ if ((d > b.amount))
23+ then throw(" purchase amount cannot be less than item price")
24+ else if ((b.amount > d))
25+ then throw("purchase amount cannot be higher than item price")
26+ else WriteSet([DataEntry(("status:purchase_item_A_customer_" + c), "confirmed"), DataEntry(("price:purchase_item_A_customer_" + c), d)])
27+ }
28+ }
29+
30+

github/deemru/w8io/169f3d6 
21.02 ms