tx · 8hiu678959PRzZoxcdJjpfhRQ7HZqCb57NMuWzEEH3zS 3N7ZEVBSSLPUTAVu7w4AXco7JP1ukJjj9uo: -0.01000000 Waves 2019.09.03 16:09 [659846] smart account 3N7ZEVBSSLPUTAVu7w4AXco7JP1ukJjj9uo > SELF 0.00000000 Waves
{ "type": 13, "id": "8hiu678959PRzZoxcdJjpfhRQ7HZqCb57NMuWzEEH3zS", "fee": 1000000, "feeAssetId": null, "timestamp": 1567516219260, "version": 1, "sender": "3N7ZEVBSSLPUTAVu7w4AXco7JP1ukJjj9uo", "senderPublicKey": "FMbuzgC4tckSpiVaD89VaMx6vuUtydbpUZ6FkqjYi631", "proofs": [ "2QmMQLpH3DEiu8gU1gEj5c44zCBwuRwhwmvbUSaECpmJav7nExVNXu8PqfytGQ2MrKcx9aoCcRRabjRbif54yLLa" ], "script": "base64:AAIDAAAAAAAAAAAAAAABAAAAAAtvd25lclB1YktleQEAAAAg1Uq1zzfd+OqME9qMM6BHXSC1cY3oZ3i2YJmHzSHL+0AAAAABAAAAAWkBAAAACHB1cmNoYXNlAAAAAAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQDCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQAAAgAAAAECAAAAIGNhbiB1c2UgV0FWRVMgb25seSBhdCB0aGUgbW9tZW50BAAAAA9jdXN0b21lckFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAFcHJpY2UEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwIAAAATaXRlbV9BX2NvdXBvbl9wcmljZQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAwkAAGYAAAACBQAAAAVwcmljZQgFAAAAA3BtdAAAAAZhbW91bnQJAAACAAAAAQIAAAAucHVyY2h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: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = base58'FMbuzgC4tckSpiVaD89VaMx6vuUtydbpUZ6FkqjYi631' | |
5 | + | ||
6 | + | @Callable(b) | |
7 | + | func purchase () = { | |
8 | + | let c = extract(b.payment) | |
9 | + | if (isDefined(c.assetId)) | |
10 | + | then throw("can use WAVES only at the moment") | |
11 | + | else { | |
12 | + | let d = toBase58String(b.caller.bytes) | |
13 | + | let e = { | |
14 | + | let f = getInteger(this, "item_A_coupon_price") | |
15 | + | if ($isInstanceOf(f, "Int")) | |
16 | + | then { | |
17 | + | let g = f | |
18 | + | g | |
19 | + | } | |
20 | + | else 0 | |
21 | + | } | |
22 | + | if ((e > c.amount)) | |
23 | + | then throw("purchase amount cannot be less than item price") | |
24 | + | else if ((c.amount > e)) | |
25 | + | then throw("purchase amount cannot be higher than item price") | |
26 | + | else WriteSet([DataEntry(("status:purchase_item_A_customer_" + d), "confirmed"), DataEntry(("price:purchase_item_A_customer_" + d), e)]) | |
27 | + | } | |
28 | + | } | |
29 | + | ||
30 | + | ||
31 | + | @Verifier(h) | |
32 | + | func i () = { | |
33 | + | let f = h | |
34 | + | if ($isInstanceOf(f, "SetScriptTransaction")) | |
35 | + | then { | |
36 | + | let j = f | |
37 | + | sigVerify(h.bodyBytes, h.proofs[0], a) | |
38 | + | } | |
39 | + | else if ($isInstanceOf(f, "DataTransaction")) | |
40 | + | then { | |
41 | + | let j = f | |
42 | + | true | |
43 | + | } | |
44 | + | else if ($isInstanceOf(f, "TransferTransaction")) | |
45 | + | then { | |
46 | + | let k = f | |
47 | + | sigVerify(h.bodyBytes, h.proofs[0], a) | |
48 | + | } | |
49 | + | else false | |
50 | + | } | |
51 | + |
github/deemru/w8io/169f3d6 16.43 ms ◑