tx · DQ7abNF41FTjj4Zw5BvHrpdfoPCK3MqAxpbDF8tEStf8

3MreQWCMA3vhziCq8yMCf9BdBmHcZGrbW4S:  -0.01400000 Waves

2021.01.01 15:16 [1334313] smart account 3MreQWCMA3vhziCq8yMCf9BdBmHcZGrbW4S > SELF 0.00000000 Waves

{ "type": 13, "id": "DQ7abNF41FTjj4Zw5BvHrpdfoPCK3MqAxpbDF8tEStf8", "fee": 1400000, "feeAssetId": null, "timestamp": 1609503450384, "version": 2, "chainId": 84, "sender": "3MreQWCMA3vhziCq8yMCf9BdBmHcZGrbW4S", "senderPublicKey": "H8moDp5wDnu7iRR16S1brcH7dn2p3tUhKNW3A8LKosMa", "proofs": [ "65fiE62jbZjYVcZY2aiX8aST6LKzdEdsiMnW97MoSrut2UGqxj4sRyxBLYRmNKq1WEp9P7tRN3yZtWZw97ywaUPs" ], "script": "base64:AAIEAAAAAAAAAAkIAhIAEgMKAQEAAAABAAAAABhzdW1hemRlcG9ub3dhbnljaHNyb2Rrb3cCAAAAGnN1bWFfemRlcG9ub3dhbnljaF9zcm9ka293AAAAAgAAAAFpAQAAAAdkZXBvenl0AAAAAAQAAAADcG10CQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACBtb3plc3ogcHJ6ZWNob3d5d2HEhyB0eWxrbyBXQVZFUwQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAA1jdXJyZW50QW1vdW50BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAACmN1cnJlbnRLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAAJbmV3QW1vdW50CQAAZAAAAAIFAAAADWN1cnJlbnRBbW91bnQI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DAJAAQaAAAAAgUAAAAEdGhpcwUAAAAYc3VtYXpkZXBvbm93YW55Y2hzcm9ka293AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAADGFrdHVhbG5hc3VtYQkAAGUAAAACBQAAABB3Y3plc25pZWpzemFzdW1hBQAAAAVrd290YQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAAKY3VycmVudEtleQUAAAAJbmV3QW1vdW50CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAFa3dvdGEFAAAABHVuaXQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAAGHN1bWF6ZGVwb25vd2FueWNoc3JvZGtvdwUAAAAMYWt0dWFsbmFzdW1hBQAAAANuaWwAAAAAubj+vQ==", "height": 1334313, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BkknYron5cmMcptYFxMG8uLaQEmNuE4mCqLE6goVRDpZ Next: 55mCczGEpicTwKsQPGb5pKUGrSaFgLAFMxr9h6NbVNcw Diff:
OldNewDifferences
5252 0
5353 }
5454 let aktualnasuma = (wczesniejszasuma - kwota)
55-[IntegerEntry(currentKey, newAmount), ScriptTransfer(i.caller, kwota, unit), IntegerEntry(sumazdeponowanychsrodkow, wczesniejszasuma)]
55+[IntegerEntry(currentKey, newAmount), ScriptTransfer(i.caller, kwota, unit), IntegerEntry(sumazdeponowanychsrodkow, aktualnasuma)]
5656 }
5757 }
5858
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let sumazdeponowanychsrodkow = "suma_zdeponowanych_srodkow"
55
66 @Callable(i)
77 func depozyt () = {
88 let pmt = i.payments[0]
99 if (isDefined(pmt.assetId))
1010 then throw("mozesz przechowywać tylko WAVES")
1111 else {
1212 let currentKey = toBase58String(i.caller.bytes)
1313 let currentAmount = match getInteger(this, currentKey) {
1414 case a: Int =>
1515 a
1616 case _ =>
1717 0
1818 }
1919 let newAmount = (currentAmount + pmt.amount)
2020 let wczesniejszasuma = match getInteger(this, sumazdeponowanychsrodkow) {
2121 case a: Int =>
2222 a
2323 case _ =>
2424 0
2525 }
2626 let aktualnasuma = (wczesniejszasuma + pmt.amount)
2727 [IntegerEntry(currentKey, newAmount), IntegerEntry(sumazdeponowanychsrodkow, aktualnasuma)]
2828 }
2929 }
3030
3131
3232
3333 @Callable(i)
3434 func wyplac (kwota) = {
3535 let currentKey = toBase58String(i.caller.bytes)
3636 let currentAmount = match getInteger(this, currentKey) {
3737 case a: Int =>
3838 a
3939 case _ =>
4040 0
4141 }
4242 let newAmount = (currentAmount - kwota)
4343 if ((0 > kwota))
4444 then throw("Niemożna wypłacić ujemnej liczby środków")
4545 else if ((0 > newAmount))
4646 then throw("Niwystarczająca ilość środków")
4747 else {
4848 let wczesniejszasuma = match getInteger(this, sumazdeponowanychsrodkow) {
4949 case a: Int =>
5050 a
5151 case _ =>
5252 0
5353 }
5454 let aktualnasuma = (wczesniejszasuma - kwota)
55-[IntegerEntry(currentKey, newAmount), ScriptTransfer(i.caller, kwota, unit), IntegerEntry(sumazdeponowanychsrodkow, wczesniejszasuma)]
55+[IntegerEntry(currentKey, newAmount), ScriptTransfer(i.caller, kwota, unit), IntegerEntry(sumazdeponowanychsrodkow, aktualnasuma)]
5656 }
5757 }
5858
5959

github/deemru/w8io/169f3d6 
28.27 ms