tx · 55mCczGEpicTwKsQPGb5pKUGrSaFgLAFMxr9h6NbVNcw

3MreQWCMA3vhziCq8yMCf9BdBmHcZGrbW4S:  -0.01400000 Waves

2021.01.06 01:14 [1340692] smart account 3MreQWCMA3vhziCq8yMCf9BdBmHcZGrbW4S > SELF 0.00000000 Waves

{ "type": 13, "id": "55mCczGEpicTwKsQPGb5pKUGrSaFgLAFMxr9h6NbVNcw", "fee": 1400000, "feeAssetId": null, "timestamp": 1609884819645, "version": 2, "chainId": 84, "sender": "3MreQWCMA3vhziCq8yMCf9BdBmHcZGrbW4S", "senderPublicKey": "H8moDp5wDnu7iRR16S1brcH7dn2p3tUhKNW3A8LKosMa", "proofs": [ "3TuzqqNTCp8KTJKEZYf9uYeERa9T8oUjqVzmDpVeUk7ViBFUisiqS72zKsSh82kjW5eA8cAUEyQCFo6yED684BEj" ], "script": null, "height": 1340692, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DQ7abNF41FTjj4Zw5BvHrpdfoPCK3MqAxpbDF8tEStf8 Next: CB9gNStW9FyrASRFa3syQUef6a2VSk6mEmJLxbUPqdAe Full:
OldNewDifferences
1-{-# STDLIB_VERSION 4 #-}
2-{-# SCRIPT_TYPE ACCOUNT #-}
3-{-# CONTENT_TYPE DAPP #-}
4-let sumazdeponowanychsrodkow = "suma_zdeponowanych_srodkow"
5-
6-@Callable(i)
7-func depozyt () = {
8- let pmt = i.payments[0]
9- if (isDefined(pmt.assetId))
10- then throw("mozesz przechowywać tylko WAVES")
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- let wczesniejszasuma = match getInteger(this, sumazdeponowanychsrodkow) {
21- case a: Int =>
22- a
23- case _ =>
24- 0
25- }
26- let aktualnasuma = (wczesniejszasuma + pmt.amount)
27-[IntegerEntry(currentKey, newAmount), IntegerEntry(sumazdeponowanychsrodkow, aktualnasuma)]
28- }
29- }
30-
31-
32-
33-@Callable(i)
34-func wyplac (kwota) = {
35- let currentKey = toBase58String(i.caller.bytes)
36- let currentAmount = match getInteger(this, currentKey) {
37- case a: Int =>
38- a
39- case _ =>
40- 0
41- }
42- let newAmount = (currentAmount - kwota)
43- if ((0 > kwota))
44- then throw("Niemożna wypłacić ujemnej liczby środków")
45- else if ((0 > newAmount))
46- then throw("Niwystarczająca ilość środków")
47- else {
48- let wczesniejszasuma = match getInteger(this, sumazdeponowanychsrodkow) {
49- case a: Int =>
50- a
51- case _ =>
52- 0
53- }
54- let aktualnasuma = (wczesniejszasuma - kwota)
55-[IntegerEntry(currentKey, newAmount), ScriptTransfer(i.caller, kwota, unit), IntegerEntry(sumazdeponowanychsrodkow, aktualnasuma)]
56- }
57- }
58-
59-
1+# no script

github/deemru/w8io/169f3d6 
27.84 ms