tx · HCLXWpWQTYxxJ5WyH91b1UFQtjzWy742P6BR7a5Sm9ch 3MrgCUfwjBbLrbjonPCaZenAe8PV1A4wyJ2: -0.01000000 Waves 2019.08.29 18:20 [652679] smart account 3MrgCUfwjBbLrbjonPCaZenAe8PV1A4wyJ2 > SELF 0.00000000 Waves
{ "type": 13, "id": "HCLXWpWQTYxxJ5WyH91b1UFQtjzWy742P6BR7a5Sm9ch", "fee": 1000000, "feeAssetId": null, "timestamp": 1567092164311, "version": 1, "sender": "3MrgCUfwjBbLrbjonPCaZenAe8PV1A4wyJ2", "senderPublicKey": "CkLtSfGuU9GVZKiWMyJCaybCzfektjSzcDdj5egGVzYS", "proofs": [ "5hE4S1Su6z4Nhzd56K7HHoads9eE6xR1EtvAXjXyXiVLixTCDZeeMzagcyfsaX1YdS59d4kUbyFHN23aWkxrZDap" ], "script": "base64:AAIDAAAAAAAAAAAAAAABAQAAAAtkZXBvc2l0SW1wbAAAAAIAAAADcG10AAAABmNhbGxlcgMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAhY2FuIGhvZGwgd2F2ZXMgb25seSBhdCB0aGUgbW9tZW50BAAAAApjdXJyZW50S2V5CQACWAAAAAEIBQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAADWN1cnJlbnRBbW91bnQEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAAKY3VycmVudEtleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABAAAAAluZXdBbW91bnQJAABkAAAAAgUAAAANY3VycmVudEFtb3VudAgFAAAAA3BtdAAAAAZhbW91bnQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAACmN1cnJlbnRLZXkFAAAACW5ld0Ftb3VudAUAAAADbmlsAAAAAwAAAAFpAQAAAAd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AABJOb3QgZW5vdWdoIGJhbGFuY2UDCQEAAAACIT0AAAACBQAAAAtleHBlY3RlZFZlYwUAAAADdmVjCQAAAgAAAAECAAAAKnZlYyBwYXJhbWV0ZXIgZG9lc24ndCBtYXRjaCBleHBlY3RlZCB2YWx1ZQkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAACmN1cnJlbnRLZXkFAAAACW5ld0Ftb3VudAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAARuYW1lAgAAAAYgVG90YWwFAAAADXdpdGhkcmF3VG90YWwJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAEbmFtZQIAAAAJIERvbmF0aW9uBQAAAAZhbW91bnQFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAABmFtb3VudAUAAAAEdW5pdAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAA9kb25hdGlvbkFkZHJlc3MFAAAABmFtb3VudAUAAAAEdW5pdAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAb1WSmO", "chainId": 84, "height": 652679, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | func a (b,c) = if (isDefined(b.assetId)) | |
5 | + | then throw("can hodl waves only at the moment") | |
6 | + | else { | |
7 | + | let d = toBase58String(c.bytes) | |
8 | + | let e = { | |
9 | + | let f = getInteger(this, d) | |
10 | + | if ($isInstanceOf(f, "Int")) | |
11 | + | then { | |
12 | + | let g = f | |
13 | + | g | |
14 | + | } | |
15 | + | else 0 | |
16 | + | } | |
17 | + | let h = (e + b.amount) | |
18 | + | WriteSet([DataEntry(d, h)]) | |
19 | + | } | |
20 | + | ||
21 | + | ||
22 | + | @Callable(i) | |
23 | + | func default () = a(extract(i.payment), i.caller) | |
24 | + | ||
25 | + | ||
26 | + | ||
27 | + | @Callable(i) | |
28 | + | func deposit () = a(extract(i.payment), i.caller) | |
29 | + | ||
30 | + | ||
31 | + | ||
32 | + | @Callable(i) | |
33 | + | func withdraw (j,k,l,m) = { | |
34 | + | let n = toBytes("Hello, Ride4DApp!") | |
35 | + | let o = extract(addressFromString("3MwAwd82f2moDeJdaSvFPxGTovWHXGkuP2j")) | |
36 | + | let p = if (k) | |
37 | + | then (2 * j) | |
38 | + | else j | |
39 | + | let d = toBase58String(i.caller.bytes) | |
40 | + | let e = { | |
41 | + | let f = getInteger(this, d) | |
42 | + | if ($isInstanceOf(f, "Int")) | |
43 | + | then { | |
44 | + | let g = f | |
45 | + | g | |
46 | + | } | |
47 | + | else 0 | |
48 | + | } | |
49 | + | let h = (e - p) | |
50 | + | if ((0 > p)) | |
51 | + | then throw("Can't withdraw negative amount") | |
52 | + | else if ((0 > h)) | |
53 | + | then throw("Not enough balance") | |
54 | + | else if ((n != m)) | |
55 | + | then throw("vec parameter doesn't match expected value") | |
56 | + | else ScriptResult(WriteSet([DataEntry(d, h), DataEntry((l + " Total"), p), DataEntry((l + " Donation"), j)]), TransferSet([ScriptTransfer(i.caller, j, unit), ScriptTransfer(o, j, unit)])) | |
57 | + | } | |
58 | + | ||
59 | + | ||
60 | + | @Verifier(q) | |
61 | + | func r () = true | |
62 | + |
github/deemru/w8io/026f985 22.86 ms ◑