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