tx · QrJiCAKr8FXzUMchjXA5z1WJaCqX6c2bvQ6hG1wANL9 3N7pSjP7r8aY9kYSi61ucLbWnm2waE6PcaA: -0.01400000 Waves 2019.11.12 22:06 [762244] smart account 3N7pSjP7r8aY9kYSi61ucLbWnm2waE6PcaA > SELF 0.00000000 Waves
{ "type": 13, "id": "QrJiCAKr8FXzUMchjXA5z1WJaCqX6c2bvQ6hG1wANL9", "fee": 1400000, "feeAssetId": null, "timestamp": 1573585675233, "version": 1, "sender": "3N7pSjP7r8aY9kYSi61ucLbWnm2waE6PcaA", "senderPublicKey": "8wiXMdZVbTSwMFxqoW7jfgropja3bTT7MX8VuQwPwPje", "proofs": [ "5szHfUi7VsYd8QVFEFSV8gzJwbAoWCQAKQuYQjZTBqjQNEsmG6DEgqpHTzqYB7JAUaYJsYyZnCy7CKRCib9sEU5g" ], "script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAQAAAAAJYm9iUHViS2V5AQAAACB2Bh9wCLRIMXfN6pGVp7kXGPgb/W3ZCDeZxa5F5MOaEQAAAAEAAAABaQEAAAAIcHVyY2hhc2UAAAAABAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAgY2FuIHVzZSBXQVZFUyBvbmx5IGF0IHRoZSBtb21lbnQEAAAAD2N1c3RvbWVyQWRkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwcmljZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAABNpdGVtX0FfY291cG9uX3ByaWNlAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAADCQAAZgAAAAIFAAAABXByaWNlCAUAAAADcG10AAAABmFtb3VudAkAAAIAAAABAgAAAC5w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WDh45Ao Diff:
Old | New | Differences | |
---|---|---|---|
39 | 39 | else if ($isInstanceOf(f, "DataTransaction")) | |
40 | 40 | then { | |
41 | 41 | let j = f | |
42 | - | sigVerify(h.proofs[0], | |
42 | + | sigVerify(h.bodyBytes, h.proofs[0], a) | |
43 | 43 | } | |
44 | 44 | else false | |
45 | 45 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'8wiXMdZVbTSwMFxqoW7jfgropja3bTT7MX8VuQwPwPje' | |
5 | 5 | ||
6 | 6 | @Callable(b) | |
7 | 7 | func purchase () = { | |
8 | 8 | let c = extract(b.payment) | |
9 | 9 | if (isDefined(c.assetId)) | |
10 | 10 | then throw("can use WAVES only at the moment") | |
11 | 11 | else { | |
12 | 12 | let d = toBase58String(b.caller.bytes) | |
13 | 13 | let e = { | |
14 | 14 | let f = getInteger(this, "item_A_coupon_price") | |
15 | 15 | if ($isInstanceOf(f, "Int")) | |
16 | 16 | then { | |
17 | 17 | let g = f | |
18 | 18 | g | |
19 | 19 | } | |
20 | 20 | else 0 | |
21 | 21 | } | |
22 | 22 | if ((e > c.amount)) | |
23 | 23 | then throw("purchase amount cannot be less than item price") | |
24 | 24 | else if ((c.amount > e)) | |
25 | 25 | then throw("purchase amount cannot be higher than item price") | |
26 | 26 | else WriteSet([DataEntry(("status:purchase_item_A_customer" + d), "confirmed"), DataEntry(("price:purchase_item_A_customer" + d), e)]) | |
27 | 27 | } | |
28 | 28 | } | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | @Verifier(h) | |
32 | 32 | func i () = { | |
33 | 33 | let f = h | |
34 | 34 | if ($isInstanceOf(f, "SetScriptTransaction")) | |
35 | 35 | then { | |
36 | 36 | let j = f | |
37 | 37 | sigVerify(h.bodyBytes, h.proofs[0], a) | |
38 | 38 | } | |
39 | 39 | else if ($isInstanceOf(f, "DataTransaction")) | |
40 | 40 | then { | |
41 | 41 | let j = f | |
42 | - | sigVerify(h.proofs[0], | |
42 | + | sigVerify(h.bodyBytes, h.proofs[0], a) | |
43 | 43 | } | |
44 | 44 | else false | |
45 | 45 | } | |
46 | 46 |
github/deemru/w8io/169f3d6 32.77 ms ◑