tx · 6nuDGZqtcjUsYx61CTGnf4mvXA3xTMXWRyG365nhDfgV 3MxBHqeHEb91PwKLHfXid2Ntqbc5atXKB9r: -0.00200000 Waves 2022.09.28 16:28 [2249026] smart account 3MxBHqeHEb91PwKLHfXid2Ntqbc5atXKB9r > SELF 0.00000000 Waves
{ "type": 13, "id": "6nuDGZqtcjUsYx61CTGnf4mvXA3xTMXWRyG365nhDfgV", "fee": 200000, "feeAssetId": null, "timestamp": 1664371802183, "version": 2, "chainId": 84, "sender": "3MxBHqeHEb91PwKLHfXid2Ntqbc5atXKB9r", "senderPublicKey": "5Xbra5zpKpCfmcNLEYZx5KKLq8orYLwPYqGajjJoGaZS", "proofs": [ "5nccZKQxfokTcjS9QDAByFsFpgoPXYTqV3cKr8dcHzPtqgSR5yNfyZBVbJQQWZkUykM7SgminoaXtsUGy4WJ3oi1" ], "script": "base64:AAIDAAAAAAAAAAkIARIAEgMKAQEAAAACAAAAAAROT05FAgAAAARub25lAAAAAAZ3YXZlaW4BAAAAIEuGIdN/6teTCIGeTULQvHlVv3U9YmDo2GYLBY5JgFu4AAAAAgAAAAFpAQAAAAdkZXBvc2l0AAAAAAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQDCQEAAAACIT0AAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAABndhdmVpbgkAAAIAAAABAgAAACJTb3JyeSwgb25seSBXQVZXRUlOIGZvciB0aGUgbW9tZW50BAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAADWN1cnJlbnRBbW91bnQEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAAKY3VycmVudEtleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABAAAAAluZXdBbW91bnQJAABkAAAAAgUAAAANY3VycmVudEFtb3VudAgFAAAAA3BtdAAAAAZhbW91bnQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAACmN1cnJlbnRLZXkFAAAACW5ld0Ftb3VudAUAAAADbmlsAAAAAWkBAAAACHdpdGhkcmF3AAAAAQAAAAZhbW91bnQEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAApjdXJyZW50S2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAACW5ld0Ftb3VudAkAAGUAAAACBQAAAA1jdXJyZW50QW1vdW50BQAAAAZhbW91bnQDCQAAZgAAAAIAAAAAAAAAAAAFAAAABmFtb3VudAkAAAIAAAABAgAAACJDYW5ub3Qgd2l0aGRyYXcgYSBuZWdhdGl2ZSBiYWxhbmNlAwkAAGYAAAACAAAAAAAAAAAABQAAAAluZXdBbW91bnQJAAACAAAAAQIAAAAVQmFsYW5jZSBpcyBub3QgZW5vdWdoCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAKY3VycmVudEtleQUAAAAJbmV3QW1vdW50BQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAZhbW91bnQFAAAABndhdmVpbgUAAAADbmlsAAAAAEJEL/Y=", "height": 2249026, "applicationStatus": "succeeded", "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 = "none" | |
5 | + | ||
6 | + | let b = base58'65pCrqjE5ZYunnfcodoG1mG1Kk26DNp7raSSSN1mwDAF' | |
7 | + | ||
8 | + | @Callable(c) | |
9 | + | func deposit () = { | |
10 | + | let d = extract(c.payment) | |
11 | + | if ((d.assetId != b)) | |
12 | + | then throw("Sorry, only WAVWEIN for the moment") | |
13 | + | else { | |
14 | + | let e = toBase58String(c.caller.bytes) | |
15 | + | let f = { | |
16 | + | let g = getInteger(this, e) | |
17 | + | if ($isInstanceOf(g, "Int")) | |
18 | + | then { | |
19 | + | let h = g | |
20 | + | h | |
21 | + | } | |
22 | + | else 0 | |
23 | + | } | |
24 | + | let i = (f + d.amount) | |
25 | + | WriteSet([DataEntry(e, i)]) | |
26 | + | } | |
27 | + | } | |
28 | + | ||
29 | + | ||
30 | + | ||
31 | + | @Callable(c) | |
32 | + | func withdraw (j) = { | |
33 | + | let e = toBase58String(c.caller.bytes) | |
34 | + | let f = { | |
35 | + | let g = getInteger(this, e) | |
36 | + | if ($isInstanceOf(g, "Int")) | |
37 | + | then { | |
38 | + | let h = g | |
39 | + | h | |
40 | + | } | |
41 | + | else 0 | |
42 | + | } | |
43 | + | let i = (f - j) | |
44 | + | if ((0 > j)) | |
45 | + | then throw("Cannot withdraw a negative balance") | |
46 | + | else if ((0 > i)) | |
47 | + | then throw("Balance is not enough") | |
48 | + | else ScriptResult(WriteSet([DataEntry(e, i)]), TransferSet([ScriptTransfer(c.caller, j, b)])) | |
49 | + | } | |
50 | + | ||
51 | + |
github/deemru/w8io/026f985 15.72 ms ◑