tx · 33HpubNPWdZ91nfVPRYRZMmVXZ87a7X1ocR9KbqYnVJW

3MvgxS9JmLvNSyx4dJr6Zfke3Siz5p92gao:  -0.01000000 Waves

2019.09.05 13:49 [662631] smart account 3MvgxS9JmLvNSyx4dJr6Zfke3Siz5p92gao > SELF 0.00000000 Waves

{ "type": 13, "id": "33HpubNPWdZ91nfVPRYRZMmVXZ87a7X1ocR9KbqYnVJW", "fee": 1000000, "feeAssetId": null, "timestamp": 1567680538202, "version": 1, "sender": "3MvgxS9JmLvNSyx4dJr6Zfke3Siz5p92gao", "senderPublicKey": "DtnvSHiYQnjG4si66eUE3pTReZAnukP13TFUr4QtsJBc", "proofs": [ "5cwPk7rvZkVf9bwQ8HwrLsD6MqoWSo6LbkbHFbf3R51uB3BPiJMGfYyJEFGg1CEy8yAMa5hLmehYgowbEAgND1fM" ], "script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAQAAAAFpAQAAAAhwdXJjaGFzZQAAAAAEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACFjYW4gdXNlIFdBVkVTIG9ubHkgYXQgdGhhdCBtb21lbnQEAAAAD2N1c3RvbWVyQWRkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwcmljZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAABNpdGVtX0FfY291cG9uX3ByaWNlAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAADCQAAZgAAAAIFAAAABXByaWNlCAUAAAADcG10AAAABmFtb3VudAkAAAIAAAABAgAAAC5wdXJjaGFjZSBhbW91bnQgY2Fubm90IGJlIGxlc3MgdGhhbiBpdGVtIHByaWNlAwkAAGYAAAACCAUAAAADcG10AAAABmFtb3VudAUAAAAFcHJpY2UJAAACAAAAAQIAAAAwcHVyY2hhY2UgYW1vdW50IGNhbm5vdCBiZSBoaWdoZXIgdGhhbiBpdGVtIHByaWNlCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAICAAAAIHN0YXR1czpwdXJjaGFzZV9pdGVtX0FfY3VzdG9tZXJfBQAAAA9jdXN0b21lckFkZHJlc3MCAAAACWNvbmZpcm1lZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACAgAAAB9wcmljZTpwdXJjaGFzZV9pdGVtX0FfY3VzdG9tZXJfBQAAAA9jdXN0b21lckFkZHJlc3MFAAAABXByaWNlBQAAAANuaWwAAAAAiJfGuw==", "chainId": 84, "height": 662631, "spentComplexity": 0 } View: original | compacted Prev: none Next: 7uoW5uBgDjTHDG1DJ6CGBKuEGxMZH4wyxvV3Peo7kEcM 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 that 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("purchace amount cannot be less than item price")
24+ else if ((b.amount > d))
25+ then throw("purchace 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 
17.98 ms