tx · F2EkqKomkAFtusf9QWQ8fXZn3dJBzZhN5Cz1nyznoQJv
3MreQWCMA3vhziCq8yMCf9BdBmHcZGrbW4S: -0.01400000 Waves
2020.12.31 19:43 [1333142] smart account 3MreQWCMA3vhziCq8yMCf9BdBmHcZGrbW4S > SELF 0.00000000 Waves
{
"type": 13,
"id": "F2EkqKomkAFtusf9QWQ8fXZn3dJBzZhN5Cz1nyznoQJv",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1609433089614,
"version": 2,
"chainId": 84,
"sender": "3MreQWCMA3vhziCq8yMCf9BdBmHcZGrbW4S",
"senderPublicKey": "H8moDp5wDnu7iRR16S1brcH7dn2p3tUhKNW3A8LKosMa",
"proofs": [
"BkrqtLJNCThFc7yL43TMP6o8WQ6g1sizKCFP8tFey1wJJ3WMYoSe3u2pcJgh6RfRdbHAvxmdohw7a2WL9TtBBPa"
],
"script": "base64:AAIEAAAAAAAAAAkIAhIAEgMKAQEAAAAAAAAAAgAAAAFpAQAAAAdkZXBvenl0AAAAAAQAAAADcG10CQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACBtb3plc3ogcHJ6ZWNob3d5d2HEhyB0eWxrbyBXQVZFUwQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAA1jdXJyZW50QW1vdW50BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAACmN1cnJlbnRLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAAJbmV3QW1vdW50CQAAZAAAAAIFAAAADWN1cnJlbnRBbW91bnQIBQAAAANwbXQAAAAGYW1vdW50CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAAApjdXJyZW50S2V5BQAAAAluZXdBbW91bnQFAAAAA25pbAAAAAFpAQAAAAZ3eXBsYWMAAAABAAAABWt3b3RhBAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAADWN1cnJlbnRBbW91bnQEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAAKY3VycmVudEtleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABAAAAAluZXdBbW91bnQJAABlAAAAAgUAAAANY3VycmVudEFtb3VudAUAAAAFa3dvdGEDCQAAZgAAAAIAAAAAAAAAAAAFAAAABWt3b3RhCQAAAgAAAAECAAAALU5pZW1vxbxuYSB3eXDFgmFjacSHIHVqZW1uZWogbGljemJ5IMWbcm9ka8OzdwMJAABmAAAAAgAAAAAAAAAAAAUAAAAJbmV3QW1vdW50CQAAAgAAAAECAAAAIk5pd3lzdGFyY3phasSFY2EgaWxvxZvEhyDFm3JvZGvDs3cJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAACmN1cnJlbnRLZXkFAAAACW5ld0Ftb3VudAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAABWt3b3RhBQAAAAR1bml0BQAAAANuaWwAAAAAAB8Ivw==",
"height": 1333142,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 6bQZddNP7hoSbUsX24Bbu3JCjmjwTHcoZqymbW8RUxhu
Next: BkknYron5cmMcptYFxMG8uLaQEmNuE4mCqLE6goVRDpZ
Diff:
Old | New | | Differences |
---|
7 | 7 | | func depozyt () = { |
---|
8 | 8 | | let pmt = i.payments[0] |
---|
9 | 9 | | if (isDefined(pmt.assetId)) |
---|
10 | | - | then throw("can hodl waves only at the moment") |
---|
| 10 | + | then throw("mozesz przechowywać tylko WAVES") |
---|
11 | 11 | | else { |
---|
12 | 12 | | let currentKey = toBase58String(i.caller.bytes) |
---|
13 | 13 | | let currentAmount = match getInteger(this, currentKey) { |
---|
|
34 | 34 | | } |
---|
35 | 35 | | let newAmount = (currentAmount - kwota) |
---|
36 | 36 | | if ((0 > kwota)) |
---|
37 | | - | then throw("Can't withdraw negative amount") |
---|
| 37 | + | then throw("Niemożna wypłacić ujemnej liczby środków") |
---|
38 | 38 | | else if ((0 > newAmount)) |
---|
39 | | - | then throw("Not enough balance") |
---|
| 39 | + | then throw("Niwystarczająca ilość środków") |
---|
40 | 40 | | else [IntegerEntry(currentKey, newAmount), ScriptTransfer(i.caller, kwota, unit)] |
---|
41 | 41 | | } |
---|
42 | 42 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func depozyt () = { |
---|
8 | 8 | | let pmt = i.payments[0] |
---|
9 | 9 | | if (isDefined(pmt.assetId)) |
---|
10 | | - | then throw("can hodl waves only at the moment") |
---|
| 10 | + | then throw("mozesz przechowywać tylko WAVES") |
---|
11 | 11 | | else { |
---|
12 | 12 | | let currentKey = toBase58String(i.caller.bytes) |
---|
13 | 13 | | let currentAmount = match getInteger(this, currentKey) { |
---|
14 | 14 | | case a: Int => |
---|
15 | 15 | | a |
---|
16 | 16 | | case _ => |
---|
17 | 17 | | 0 |
---|
18 | 18 | | } |
---|
19 | 19 | | let newAmount = (currentAmount + pmt.amount) |
---|
20 | 20 | | [IntegerEntry(currentKey, newAmount)] |
---|
21 | 21 | | } |
---|
22 | 22 | | } |
---|
23 | 23 | | |
---|
24 | 24 | | |
---|
25 | 25 | | |
---|
26 | 26 | | @Callable(i) |
---|
27 | 27 | | func wyplac (kwota) = { |
---|
28 | 28 | | let currentKey = toBase58String(i.caller.bytes) |
---|
29 | 29 | | let currentAmount = match getInteger(this, currentKey) { |
---|
30 | 30 | | case a: Int => |
---|
31 | 31 | | a |
---|
32 | 32 | | case _ => |
---|
33 | 33 | | 0 |
---|
34 | 34 | | } |
---|
35 | 35 | | let newAmount = (currentAmount - kwota) |
---|
36 | 36 | | if ((0 > kwota)) |
---|
37 | | - | then throw("Can't withdraw negative amount") |
---|
| 37 | + | then throw("Niemożna wypłacić ujemnej liczby środków") |
---|
38 | 38 | | else if ((0 > newAmount)) |
---|
39 | | - | then throw("Not enough balance") |
---|
| 39 | + | then throw("Niwystarczająca ilość środków") |
---|
40 | 40 | | else [IntegerEntry(currentKey, newAmount), ScriptTransfer(i.caller, kwota, unit)] |
---|
41 | 41 | | } |
---|
42 | 42 | | |
---|
43 | 43 | | |
---|