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:
OldNewDifferences
4343 }
4444
4545
46+@Verifier(tx)
47+func verify () = false
48+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func deposit () = {
88 let pmt = if ((size(i.payments) == 1))
99 then i.payments[0]
1010 else throw("Attached payment is required")
1111 if (isDefined(pmt.assetId))
1212 then throw("works with waves only")
1313 else {
1414 let currentKey = toBase58String(i.caller.bytes)
1515 let currentAmount = match getInteger(this, currentKey) {
1616 case a: Int =>
1717 a
1818 case _ =>
1919 0
2020 }
2121 let newAmount = (currentAmount + pmt.amount)
2222 $Tuple2([IntegerEntry(currentKey, newAmount)], unit)
2323 }
2424 }
2525
2626
2727
2828 @Callable(i)
2929 func withdraw (amount) = {
3030 let currentKey = toBase58String(i.caller.bytes)
3131 let currentAmount = match getInteger(this, currentKey) {
3232 case a: Int =>
3333 a
3434 case _ =>
3535 0
3636 }
3737 let newAmount = (currentAmount - amount)
3838 if ((0 > amount))
3939 then throw("Can't withdraw negative amount")
4040 else if ((0 > newAmount))
4141 then throw("Not enough balance")
4242 else $Tuple2([IntegerEntry(currentKey, newAmount), ScriptTransfer(i.caller, amount, unit)], unit)
4343 }
4444
4545
46+@Verifier(tx)
47+func verify () = false
48+

github/deemru/w8io/169f3d6 
56.68 ms