tx · Cx664tGxnZRWGQWCiy8SzzQukNFeyUUHNQSXwVVB1DiD 3MuNdeQyTQVrdStwprvCEgPgC2vjqRvbX6o: -0.00200000 Waves 2022.08.11 18:12 [2179994] smart account 3MuNdeQyTQVrdStwprvCEgPgC2vjqRvbX6o > SELF 0.00000000 Waves
{ "type": 13, "id": "Cx664tGxnZRWGQWCiy8SzzQukNFeyUUHNQSXwVVB1DiD", "fee": 200000, "feeAssetId": null, "timestamp": 1660230779756, "version": 2, "chainId": 84, "sender": "3MuNdeQyTQVrdStwprvCEgPgC2vjqRvbX6o", "senderPublicKey": "CJJANoX2M5vQtitZCKU1TGULEY3aZyDBdAp6XESFVH8F", "proofs": [ "3ic7jJaPjZUwFvoN2HEjBnYWiktv8k5j9VbQgkZoG814mk6qmijb3PWbkAqkvYJ9hTyV3RsCn1krRm8dnBfk6Yug" ], "script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQEAAAAAAAAAAgAAAAFpAQAAAAdkZXBvc2l0AAAAAAQAAAADcG10AwkAAAAAAAACCQABkAAAAAEIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAAHEF0dGFjaGVkIHBheW1lbnQgaXMgcmVxdWlyZWQDCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQAAAgAAAAECAAAAFXdvcmtzIHdpdGggd2F2ZXMgb25seQQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAA1jdXJyZW50QW1vdW50BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAACmN1cnJlbnRLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAAJbmV3QW1vdW50CQAAZAAAAAIFAAAADWN1cnJlbnRBbW91bnQIBQAAAANwbXQAAAAGYW1vdW50CQAFFAAAAAIJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAACmN1cnJlbnRLZXkFAAAACW5ld0Ftb3VudAUAAAADbmlsBQAAAAR1bml0AAAAAWkBAAAACHdpdGhkcmF3AAAAAQAAAAZhbW91bnQEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAApjdXJyZW50S2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAACW5ld0Ftb3VudAkAAGUAAAACBQAAAA1jdXJyZW50QW1vdW50BQAAAAZhbW91bnQDCQAAZgAAAAIAAAAAAAAAAAAFAAAABmFtb3VudAkAAAIAAAABAgAAAB5DYW4ndCB3aXRoZHJhdyBuZWdhdGl2ZSBhbW91bnQDCQAAZgAAAAIAAAAAAAAAAAAFAAAACW5ld0Ftb3VudAkAAAIAAAABAgAAABJOb3QgZW5vdWdoIGJhbGFuY2UJAAUUAAAAAgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAAKY3VycmVudEtleQUAAAAJbmV3QW1vdW50CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGYW1vdW50BQAAAAR1bml0BQAAAANuaWwFAAAABHVuaXQAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABwprKl4=", "height": 2179994, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2r8vySBdn2SvwpGppuXn7VyaDBsZr1UsKMTDMMoxoMvA Next: none Diff:
Old | New | Differences | |
---|---|---|---|
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | + | @Verifier(tx) | |
47 | + | func verify () = false | |
48 | + |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func deposit () = { | |
8 | 8 | let pmt = if ((size(i.payments) == 1)) | |
9 | 9 | then i.payments[0] | |
10 | 10 | else throw("Attached payment is required") | |
11 | 11 | if (isDefined(pmt.assetId)) | |
12 | 12 | then throw("works with waves only") | |
13 | 13 | else { | |
14 | 14 | let currentKey = toBase58String(i.caller.bytes) | |
15 | 15 | let currentAmount = match getInteger(this, currentKey) { | |
16 | 16 | case a: Int => | |
17 | 17 | a | |
18 | 18 | case _ => | |
19 | 19 | 0 | |
20 | 20 | } | |
21 | 21 | let newAmount = (currentAmount + pmt.amount) | |
22 | 22 | $Tuple2([IntegerEntry(currentKey, newAmount)], unit) | |
23 | 23 | } | |
24 | 24 | } | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | ||
28 | 28 | @Callable(i) | |
29 | 29 | func withdraw (amount) = { | |
30 | 30 | let currentKey = toBase58String(i.caller.bytes) | |
31 | 31 | let currentAmount = match getInteger(this, currentKey) { | |
32 | 32 | case a: Int => | |
33 | 33 | a | |
34 | 34 | case _ => | |
35 | 35 | 0 | |
36 | 36 | } | |
37 | 37 | let newAmount = (currentAmount - amount) | |
38 | 38 | if ((0 > amount)) | |
39 | 39 | then throw("Can't withdraw negative amount") | |
40 | 40 | else if ((0 > newAmount)) | |
41 | 41 | then throw("Not enough balance") | |
42 | 42 | else $Tuple2([IntegerEntry(currentKey, newAmount), ScriptTransfer(i.caller, amount, unit)], unit) | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | + | @Verifier(tx) | |
47 | + | func verify () = false | |
48 | + |
github/deemru/w8io/169f3d6 56.68 ms ◑