tx · ArAMNuUgarhbcUm4pfMY19y9r5iw1h6BhmbiFSqmEJRa 3MrZ15ZMZRcsgCuZjJ3W3oGz9vDGWirXKa2: -0.01000000 Waves 2019.11.02 01:26 [746393] smart account 3MrZ15ZMZRcsgCuZjJ3W3oGz9vDGWirXKa2 > SELF 0.00000000 Waves
{ "type": 13, "id": "ArAMNuUgarhbcUm4pfMY19y9r5iw1h6BhmbiFSqmEJRa", "fee": 1000000, "feeAssetId": null, "timestamp": 1572647116225, "version": 1, "sender": "3MrZ15ZMZRcsgCuZjJ3W3oGz9vDGWirXKa2", "senderPublicKey": "rihVasjx7xm4ViY4SLCmYfRDu8sKWhJuhC2HUPheMeB", "proofs": [ "gTndkCNKFtp4XWP9xeEYvqypFDAyZBeNwdk8nuBLgNCAphUHMJCxd9uvfA46t3bT7nhxy9NtTKFdRFDeHpDgWrc" ], "script": "base64:AAIDAAAAAAAAAAkIARIAEgMKAQEAAAABAAAAABZzdGFibGVBc3NldENvaW5Bc3NldElkAQAAACCsC+HuICq87tiTC006zv4vmKp9z1PaPDLL9fbGTdO8CgAAAAIAAAABaQEAAAAHZGVwb3NpdAAAAAAEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACFjYW4gaG9kbCB3YXZlcyBvbmx5IGF0IHRoZSBtb21lbnQEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAMY3VycmVudFByaWNlCQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAECAAAAIzNNeUR0TlRrQ055UkN3M28ycXY1QlBQUzd2dlVvc2lRZTZGCQABLAAAAAICAAAABnByaWNlXwkAAaQAAAABBQAAAAZoZWlnaHQEAAAADXR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3aXRoZHJhdyBuZWdhdGl2ZSBhbW91bnQDCQAAZgAAAAIAAAAAAAAAAAAFAAAACW5ld0Ftb3VudAkAAAIAAAABAgAAABJOb3QgZW5vdWdoIGJhbGFuY2UJAQAAAAxTY3JpcHRSZXN1bHQAAAACCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAApjdXJyZW50S2V5BQAAAAluZXdBbW91bnQFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAABmFtb3VudAUAAAAEdW5pdAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAdI5Ot1", "chainId": 84, "height": 746393, "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 | + | let a = base58'CabdiPbYMxKHrPwVX5qUyJJWpZptEwmejYspeEYhVDLD' | |
5 | + | ||
6 | + | @Callable(b) | |
7 | + | func deposit () = { | |
8 | + | let c = extract(b.payment) | |
9 | + | if (isDefined(c.assetId)) | |
10 | + | then throw("can hodl waves only at the moment") | |
11 | + | else { | |
12 | + | let d = toBase58String(b.caller.bytes) | |
13 | + | let e = getIntegerValue(addressFromStringValue("3MyDtNTkCNyRCw3o2qv5BPPS7vvUosiQe6F"), ("price_" + toString(height))) | |
14 | + | let f = (c.amount + (e / 150)) | |
15 | + | ScriptResult(WriteSet([DataEntry((((d + "_") + toBase58String(b.transactionId)) + "_deposit"), c.amount), DataEntry((((d + "_") + toBase58String(b.transactionId)) + "_amount"), f)]), TransferSet([ScriptTransfer(b.caller, f, a)])) | |
16 | + | } | |
17 | + | } | |
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | @Callable(b) | |
22 | + | func withdraw (g) = { | |
23 | + | let d = toBase58String(b.caller.bytes) | |
24 | + | let h = { | |
25 | + | let i = getInteger(this, d) | |
26 | + | if ($isInstanceOf(i, "Int")) | |
27 | + | then { | |
28 | + | let j = i | |
29 | + | j | |
30 | + | } | |
31 | + | else 0 | |
32 | + | } | |
33 | + | let k = (h - g) | |
34 | + | if ((0 > g)) | |
35 | + | then throw("Can't withdraw negative amount") | |
36 | + | else if ((0 > k)) | |
37 | + | then throw("Not enough balance") | |
38 | + | else ScriptResult(WriteSet([DataEntry(d, k)]), TransferSet([ScriptTransfer(b.caller, g, unit)])) | |
39 | + | } | |
40 | + | ||
41 | + | ||
42 | + | @Verifier(l) | |
43 | + | func m () = false | |
44 | + |
github/deemru/w8io/026f985 18.20 ms ◑