tx · 2zAQ8KC6EfssexDAVmAaDwE1Ujixmtzy9LVm8Fq8msyL
3NCv9hyL5NUbMMkTXYnN9hL9AMQd6f2eVww: -0.01400000 Waves
2020.10.04 22:52 [1206274] smart account 3NCv9hyL5NUbMMkTXYnN9hL9AMQd6f2eVww > SELF 0.00000000 Waves
{
"type": 13,
"id": "2zAQ8KC6EfssexDAVmAaDwE1Ujixmtzy9LVm8Fq8msyL",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1601841149475,
"version": 2,
"chainId": 84,
"sender": "3NCv9hyL5NUbMMkTXYnN9hL9AMQd6f2eVww",
"senderPublicKey": "CNQtsB6HAGUVvb5L3NshmGW2pD94ysV6dzV6Zcf6BFCq",
"proofs": [
"NvNTqirbCkU3CuGzF4R1aBHdyG2N4GJg767vqaVvpP8GfoSGSth1FLdsL4dk4v4FAFJ7bhRoVaeAW4xGWLEvCWy"
],
"script": "base64:AAIDAAAAAAAAAAkIARIAEgMKAQEAAAAAAAAAAgAAAAFpAQAAAAdkZXBvc2l0AAAAAAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQEAAAABHR0eHgIBQAAAAlsYXN0QmxvY2sAAAAGaGVpZ2h0AwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACFjYW4gaG9kbCB3YXZlcyBvbmx5IGF0IHRoZSBtb21lbnQEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAApjdXJyZW50S2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAACW5ld0Ftb3VudAkAAGQAAAACBQAAAA1jdXJyZW50QW1vdW50CAUAAAADcG10AA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AAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAABmFtb3VudAUAAAAEdW5pdAUAAAADbmlsAAAAAFHdj6w=",
"height": 1206274,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: H8bp1c5cPx5EBbswp63kfDuhuqm34wnNjeYTThuBAyL8
Next: GYSsdn3X8Tv85cvGck9nh3xti2qbaYvpDbXFwpYLpvBd
Diff:
Old | New | | Differences |
---|
21 | 21 | | else 0 |
---|
22 | 22 | | } |
---|
23 | 23 | | let h = (e + b.amount) |
---|
24 | | - | WriteSet([DataEntry(d, (((((toString(h) + ",") + toString(((h / 100) * 120))) + ",") + toString((((h / 100) * 120) / 18))) + ",0"))]) |
---|
| 24 | + | WriteSet([DataEntry(d, (((((((toString(h) + ",") + toString(((h / 100) * 120))) + ",") + toString((((h / 100) * 120) / 18))) + ",0,") + toString(c)) + ",10"))]) |
---|
25 | 25 | | } |
---|
26 | 26 | | } |
---|
27 | 27 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(a) |
---|
7 | 7 | | func deposit () = { |
---|
8 | 8 | | let b = extract(a.payment) |
---|
9 | 9 | | let c = lastBlock.height |
---|
10 | 10 | | if (isDefined(b.assetId)) |
---|
11 | 11 | | then throw("can hodl waves only at the moment") |
---|
12 | 12 | | else { |
---|
13 | 13 | | let d = toBase58String(a.caller.bytes) |
---|
14 | 14 | | let e = { |
---|
15 | 15 | | let f = getInteger(this, d) |
---|
16 | 16 | | if ($isInstanceOf(f, "Int")) |
---|
17 | 17 | | then { |
---|
18 | 18 | | let g = f |
---|
19 | 19 | | g |
---|
20 | 20 | | } |
---|
21 | 21 | | else 0 |
---|
22 | 22 | | } |
---|
23 | 23 | | let h = (e + b.amount) |
---|
24 | | - | WriteSet([DataEntry(d, (((((toString(h) + ",") + toString(((h / 100) * 120))) + ",") + toString((((h / 100) * 120) / 18))) + ",0"))]) |
---|
| 24 | + | WriteSet([DataEntry(d, (((((((toString(h) + ",") + toString(((h / 100) * 120))) + ",") + toString((((h / 100) * 120) / 18))) + ",0,") + toString(c)) + ",10"))]) |
---|
25 | 25 | | } |
---|
26 | 26 | | } |
---|
27 | 27 | | |
---|
28 | 28 | | |
---|
29 | 29 | | |
---|
30 | 30 | | @Callable(a) |
---|
31 | 31 | | func withdraw (i) = { |
---|
32 | 32 | | let d = toBase58String(a.caller.bytes) |
---|
33 | 33 | | let e = { |
---|
34 | 34 | | let f = getInteger(this, d) |
---|
35 | 35 | | if ($isInstanceOf(f, "Int")) |
---|
36 | 36 | | then { |
---|
37 | 37 | | let g = f |
---|
38 | 38 | | g |
---|
39 | 39 | | } |
---|
40 | 40 | | else 0 |
---|
41 | 41 | | } |
---|
42 | 42 | | let h = (e - i) |
---|
43 | 43 | | if ((0 > i)) |
---|
44 | 44 | | then throw("Can't withdraw negative amount") |
---|
45 | 45 | | else if ((0 > h)) |
---|
46 | 46 | | then throw("Not enough balance") |
---|
47 | 47 | | else ScriptResult(WriteSet([DataEntry(d, h)]), TransferSet([ScriptTransfer(a.caller, i, unit)])) |
---|
48 | 48 | | } |
---|
49 | 49 | | |
---|
50 | 50 | | |
---|