tx · 5GvPY2rELbRBFBGJQcfiB2LeXbjpw8uKm1yb42f5pj2o

3N9uzrTiArce1h9VCqK3QUUZmFqBgg5rZSW:  -0.00100000 Waves

2022.06.17 00:01 [2099435] smart account 3N9uzrTiArce1h9VCqK3QUUZmFqBgg5rZSW > SELF 0.00000000 Waves

{ "type": 13, "id": "5GvPY2rELbRBFBGJQcfiB2LeXbjpw8uKm1yb42f5pj2o", "fee": 100000, "feeAssetId": null, "timestamp": 1655413281999, "version": 2, "chainId": 84, "sender": "3N9uzrTiArce1h9VCqK3QUUZmFqBgg5rZSW", "senderPublicKey": "2f5ca9ECz8S814GxgTjP6iWmM4xP5Q7HTDT6WVFqTzAW", "proofs": [ "3ZZF4wBomi5SNDxUAEwCgY9Q7HP6BQDPZQhXgjKX2s2jXH6DDjcLYC9v6L2PDZfpWqtegGy2nvuUh4qjLPG1QF3V" ], "script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQEAAAABAAAAAAprZXlCYWxhbmNlAgAAAAhfYmFsYW5jZQAAAAIAAAABaQEAAAAHZGVwb3NpdAAAAAAEAAAABmNhbGxlcgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAdiYWxhbmNlCQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIFAAAABHRoaXMJAAEsAAAAAgUAAAAGY2FsbGVyBQAAAAprZXlCYWxhbmNlAAAAAAAAAAAAAwkAAAAAAAACCQABkAAAAAEIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAAE1BheW1lbnQgaXMgcmVxdWlyZWQEAAAAB3BheW1lbnQJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAADCQEAAAACIT0AAAACCAUAAAAHcGF5bWVudAAAAAdhc3NldElkBQAAAAR1bml0CQAAAgAAAAECAAAAG09ubHkgV0FWRVMgY2FuIGJlIGRlcG9zaXRlZAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACBQAAAAZjYWxsZXIFAAAACmtleUJhbGFuY2UJAABkAAAAAgUAAAAHYmFsYW5jZQgFAAAAB3BheW1lbnQAAAAGYW1vdW50BQAAAANuaWwAAAABaQEAAAAId2l0aGRyYXcAAAABAAAABmFtb3VudAQAAAAGY2FsbGVyCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAB2JhbGFuY2UJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAAZjYWxsZXIFAAAACmtleUJhbGFuY2UAAAAAAAAAAAADCQAAZgAAAAIFAAAABmFtb3VudAUAAAAHYmFsYW5jZQkAAAIAAAABAgAAAB5JbnN1ZmZpZW50IGJhbGFuY2UgdG8gd2l0aGRyYXcJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAZhbW91bnQFAAAABHVuaXQFAAAAA25pbAAAAADE+jfS", "height": 2099435, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3SNEexacWWoBcx6PYD6BRqNsWsBBxERD175FasBWWjTW Next: FWMELEL3jmoSxG2bHcMjwADQrfbam3x3kQFqqDnqkaNZ Diff:
OldNewDifferences
77 func deposit () = {
88 let caller = toBase58String(i.caller.bytes)
99 let balance = valueOrElse(getInteger(this, (caller + keyBalance)), 0)
10- let $t0259328 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
11- let amount = $t0259328._1
12- let assetId = $t0259328._2
13- if ((assetId != unit))
14- then throw("Only WAVES can be deposited")
15- else [IntegerEntry((caller + keyBalance), (balance + amount))]
10+ if ((size(i.payments) == 0))
11+ then throw("Payment is required")
12+ else {
13+ let payment = i.payments[0]
14+ if ((payment.assetId != unit))
15+ then throw("Only WAVES can be deposited")
16+ else [IntegerEntry((caller + keyBalance), (balance + payment.amount))]
17+ }
1618 }
1719
1820
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let keyBalance = "_balance"
55
66 @Callable(i)
77 func deposit () = {
88 let caller = toBase58String(i.caller.bytes)
99 let balance = valueOrElse(getInteger(this, (caller + keyBalance)), 0)
10- let $t0259328 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
11- let amount = $t0259328._1
12- let assetId = $t0259328._2
13- if ((assetId != unit))
14- then throw("Only WAVES can be deposited")
15- else [IntegerEntry((caller + keyBalance), (balance + amount))]
10+ if ((size(i.payments) == 0))
11+ then throw("Payment is required")
12+ else {
13+ let payment = i.payments[0]
14+ if ((payment.assetId != unit))
15+ then throw("Only WAVES can be deposited")
16+ else [IntegerEntry((caller + keyBalance), (balance + payment.amount))]
17+ }
1618 }
1719
1820
1921
2022 @Callable(i)
2123 func withdraw (amount) = {
2224 let caller = toBase58String(i.caller.bytes)
2325 let balance = valueOrElse(getInteger(this, (caller + keyBalance)), 0)
2426 if ((amount > balance))
2527 then throw("Insuffient balance to withdraw")
2628 else [ScriptTransfer(i.caller, amount, unit)]
2729 }
2830
2931

github/deemru/w8io/026f985 
18.73 ms