tx · HWUZ82EZ5QNPmoUuKBemNmPKtCdhw6D33fFb8ZRmzgqc

3N7pSjP7r8aY9kYSi61ucLbWnm2waE6PcaA:  -0.01400000 Waves

2019.11.12 20:42 [762150] smart account 3N7pSjP7r8aY9kYSi61ucLbWnm2waE6PcaA > SELF 0.00000000 Waves

{ "type": 13, "id": "HWUZ82EZ5QNPmoUuKBemNmPKtCdhw6D33fFb8ZRmzgqc", "fee": 1400000, "feeAssetId": null, "timestamp": 1573580592814, "version": 1, "sender": "3N7pSjP7r8aY9kYSi61ucLbWnm2waE6PcaA", "senderPublicKey": "8wiXMdZVbTSwMFxqoW7jfgropja3bTT7MX8VuQwPwPje", "proofs": [ "5iiYJiZYBupy9c5zBBnYXX5MQpU7jkX21wq51CJ7ord1eFy8YyFqSLmfRqeRCkGk7RdKo3h5B3SfdbTAqTEvwwcW" ], "script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAQAAAAAJYm9iUHViS2V5AQAAACB2Bh9wCLRIMXfN6pGVp7kXGPgb/W3ZCDeZxa5F5MOaEQAAAAEAAAABaQEAAAAIcHVyY2hhc2UAAAAABAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAgY2FuIHVzZSBXQVZFUyBvbmx5IGF0IHRoZSBtb21lbnQEAAAAD2N1c3RvbWVyQWRkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwcmljZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAABNpdGVtX0FfY291cG9uX3ByaWNlAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAADCQAAZgAAAAIFAAAABXByaWNlCAUAAAADcG10AAAABmFtb3VudAkAAAIAAAABAgAAAC5wdXJjaGFzZSBhbW91bnQgY2Fubm90IGJlIGxlc3MgdGhhbiBpdGVtIHByaWNlAwkAAGYAAAACCAUAAAADcG10AAAABmFtb3VudAUAAAAFcHJpY2UJAAACAAAAAQIAAAAwcHVyY2hhc2UgYW1vdW50IGNhbm5vdCBiZSBoaWdoZXIgdGhhbiBpdGVtIHByaWNlCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAICAAAAH3N0YXR1czpwdXJjaGFzZV9pdGVtX0FfY3VzdG9tZXIFAAAAD2N1c3RvbWVyQWRkcmVzcwIAAAAJY29uZmlybWVkCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAICAAAAHnByaWNlOnB1cmNoYXNlX2l0ZW1fQV9jdXN0b21lcgUAAAAPY3VzdG9tZXJBZGRyZXNzBQAAAAVwcmljZQUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAJYm9iUHViS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDAJAAH0AAAAAwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAJYm9keUJ5dGVzBQAAAAlib2JQdWJLZXkH131Unw==", "chainId": 84, "height": 762150, "spentComplexity": 0 } View: original | compacted Prev: none Next: 3bXhxQwiqsgKfDftL146dzPBmrPhBHCtSpuTdQEcoSnZ Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let bobPubKey = base58'8wiXMdZVbTSwMFxqoW7jfgropja3bTT7MX8VuQwPwPje'
5+
6+@Callable(i)
7+func purchase () = {
8+ let pmt = extract(i.payment)
9+ if (isDefined(pmt.assetId))
10+ then throw("can use WAVES only at the moment")
11+ else {
12+ let customerAddress = toBase58String(i.caller.bytes)
13+ let price = match getInteger(this, "item_A_coupon_price") {
14+ case a: Int =>
15+ a
16+ case _ =>
17+ 0
18+ }
19+ if ((price > pmt.amount))
20+ then throw("purchase amount cannot be less than item price")
21+ else if ((pmt.amount > price))
22+ then throw("purchase amount cannot be higher than item price")
23+ else WriteSet([DataEntry(("status:purchase_item_A_customer" + customerAddress), "confirmed"), DataEntry(("price:purchase_item_A_customer" + customerAddress), price)])
24+ }
25+ }
26+
27+
28+@Verifier(tx)
29+func verify () = match tx {
30+ case d: SetScriptTransaction =>
31+ sigVerify(tx.bodyBytes, tx.proofs[0], bobPubKey)
32+ case d: DataTransaction =>
33+ sigVerify(tx.proofs[0], tx.bodyBytes, bobPubKey)
34+ case _ =>
35+ false
36+}
37+

github/deemru/w8io/169f3d6 
33.59 ms