tx · 6bQZddNP7hoSbUsX24Bbu3JCjmjwTHcoZqymbW8RUxhu

3MreQWCMA3vhziCq8yMCf9BdBmHcZGrbW4S:  -0.01000000 Waves

2020.12.31 19:27 [1333127] smart account 3MreQWCMA3vhziCq8yMCf9BdBmHcZGrbW4S > SELF 0.00000000 Waves

{ "type": 13, "id": "6bQZddNP7hoSbUsX24Bbu3JCjmjwTHcoZqymbW8RUxhu", "fee": 1000000, "feeAssetId": null, "timestamp": 1609432064839, "version": 2, "chainId": 84, "sender": "3MreQWCMA3vhziCq8yMCf9BdBmHcZGrbW4S", "senderPublicKey": "H8moDp5wDnu7iRR16S1brcH7dn2p3tUhKNW3A8LKosMa", "proofs": [ "5jq7GBzW3bTx3u5h2vFj7RNjuxHkuw8iR5hd3c5Qw3Tr9wEUqxxRm8awpCgksZBAcZv8hQ6mjVXiwGJqUaZoCFMr" ], "script": "base64:AAIEAAAAAAAAAAkIAhIAEgMKAQEAAAAAAAAAAgAAAAFpAQAAAAdkZXBvenl0AAAAAAQAAAADcG10CQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACFjYW4gaG9kbCB3YXZlcyBvbmx5IGF0IHRoZSBtb21lbnQEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAApjdXJyZW50S2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAACW5ld0Ftb3VudAkAAGQAAAACBQAAAA1jdXJyZW50QW1vdW50CAUAAAADcG10AAAABmFtb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAAKY3VycmVudEtleQUAAAAJbmV3QW1vdW50BQAAAANuaWwAAAABaQEAAAAGd3lwbGFjAAAAAQAAAAVrd290YQQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAA1jdXJyZW50QW1vdW50BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAACmN1cnJlbnRLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAAJbmV3QW1vdW50CQAAZQAAAAIFAAAADWN1cnJlbnRBbW91bnQFAAAABWt3b3RhAwkAAGYAAAACAAAAAAAAAAAABQAAAAVrd290YQkAAAIAAAABAgAAAB5DYW4ndCB3aXRoZHJhdyBuZWdhdGl2ZSBhbW91bnQDCQAAZgAAAAIAAAAAAAAAAAAFAAAACW5ld0Ftb3VudAkAAAIAAAABAgAAABJOb3QgZW5vdWdoIGJhbGFuY2UJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAACmN1cnJlbnRLZXkFAAAACW5ld0Ftb3VudAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAABWt3b3RhBQAAAAR1bml0BQAAAANuaWwAAAAAkIywdg==", "height": 1333127, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: F2EkqKomkAFtusf9QWQ8fXZn3dJBzZhN5Cz1nyznoQJv Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 4 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+
5+
6+@Callable(i)
7+func depozyt () = {
8+ let pmt = i.payments[0]
9+ if (isDefined(pmt.assetId))
10+ then throw("can hodl waves only at the moment")
11+ else {
12+ let currentKey = toBase58String(i.caller.bytes)
13+ let currentAmount = match getInteger(this, currentKey) {
14+ case a: Int =>
15+ a
16+ case _ =>
17+ 0
18+ }
19+ let newAmount = (currentAmount + pmt.amount)
20+[IntegerEntry(currentKey, newAmount)]
21+ }
22+ }
23+
24+
25+
26+@Callable(i)
27+func wyplac (kwota) = {
28+ let currentKey = toBase58String(i.caller.bytes)
29+ let currentAmount = match getInteger(this, currentKey) {
30+ case a: Int =>
31+ a
32+ case _ =>
33+ 0
34+ }
35+ let newAmount = (currentAmount - kwota)
36+ if ((0 > kwota))
37+ then throw("Can't withdraw negative amount")
38+ else if ((0 > newAmount))
39+ then throw("Not enough balance")
40+ else [IntegerEntry(currentKey, newAmount), ScriptTransfer(i.caller, kwota, unit)]
41+ }
42+
43+

github/deemru/w8io/169f3d6 
20.78 ms