tx · 8uGKB6sqUgYi3TrgW4ehJfgo8zfvNkA5L7np5WjiVd6N 3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id: -0.01400000 Waves 2021.04.21 19:06 [1492441] smart account 3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id > SELF 0.00000000 Waves
{ "type": 13, "id": "8uGKB6sqUgYi3TrgW4ehJfgo8zfvNkA5L7np5WjiVd6N", "fee": 1400000, "feeAssetId": null, "timestamp": 1619021167634, "version": 2, "chainId": 84, "sender": "3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id", "senderPublicKey": "8agr5kfwDL7NLuMetvciXCcd9TcDKZhRwYZPPTAShaCC", "proofs": [ "pQHekGVAf8JGNvQqd4RXMDB3tjBZYYAhLHqydEcFSfwGQXaw4uMcBkwTSEHLTWLQjD1HgV6FRfVGY2WCr3Njeky" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAQAAAAAEVVNETgEAAAAgtiYpwwT1zlORpA5LdSQvZIxRsfrfr1QpvUjSHSqyqtEAAAABAAAAAWkBAAAABGNhbGwAAAAABAAAAAVhc3NldAkABEMAAAAHAgAAAAdMZW9Db2luAgAAAAAAAAAAAAAAAAEAAAAAAAAAAAAGBQAAAAR1bml0AAAAAAAAAAAABAAAAAdhc3NldElkCQAEOAAAAAEFAAAABWFzc2V0CQAETAAAAAIFAAAABWFzc2V0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgAAAAAAAAAAAQUAAAAHYXNzZXRJZAUAAAADbmlsAAAAAL2eI1U=", "height": 1492441, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Dy4Us2vw6TyWDNWpi77KWH7SctUn5hpmmxfGhHp5F4Kr Next: PPnnDjwPLUVSmrVPcSwaU8KM7PFVynukK5Qe8enxWAt Full:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
4 | 5 | ||
5 | - | ||
6 | - | @Callable(a) | |
7 | - | func deposit () = { | |
8 | - | let b = extract(a.payment) | |
9 | - | if (isDefined(b.assetId)) | |
10 | - | then throw("can hodl waves only at the moment") | |
11 | - | else { | |
12 | - | let c = toBase58String(a.caller.bytes) | |
13 | - | let d = { | |
14 | - | let e = getInteger(this, c) | |
15 | - | if ($isInstanceOf(e, "Int")) | |
16 | - | then { | |
17 | - | let f = e | |
18 | - | f | |
19 | - | } | |
20 | - | else 0 | |
21 | - | } | |
22 | - | let g = (d + b.amount) | |
23 | - | WriteSet([DataEntry(c, g)]) | |
24 | - | } | |
25 | - | } | |
26 | - | ||
27 | - | ||
28 | - | ||
29 | - | @Callable(a) | |
30 | - | func withdraw (h) = { | |
31 | - | let c = toBase58String(a.caller.bytes) | |
32 | - | let d = { | |
33 | - | let e = getInteger(this, c) | |
34 | - | if ($isInstanceOf(e, "Int")) | |
35 | - | then { | |
36 | - | let f = e | |
37 | - | f | |
38 | - | } | |
39 | - | else 0 | |
40 | - | } | |
41 | - | let g = (d - h) | |
42 | - | if ((0 > h)) | |
43 | - | then throw("Can't withdraw negative amount") | |
44 | - | else if ((0 > g)) | |
45 | - | then throw("Not enough balance") | |
46 | - | else ScriptResult(WriteSet([DataEntry(c, g)]), TransferSet([ScriptTransfer(a.caller, h, unit)])) | |
6 | + | @Callable(b) | |
7 | + | func call () = { | |
8 | + | let c = Issue("LeoCoin", "", 1, 0, true, unit, 0) | |
9 | + | let d = calculateAssetId(c) | |
10 | + | [c, ScriptTransfer(b.caller, 1, d)] | |
47 | 11 | } | |
48 | 12 | ||
49 | 13 |
github/deemru/w8io/026f985 23.05 ms ◑