tx · 3SNEexacWWoBcx6PYD6BRqNsWsBBxERD175FasBWWjTW
3N9uzrTiArce1h9VCqK3QUUZmFqBgg5rZSW: -0.00100000 Waves
2022.06.16 23:33 [2099411] smart account 3N9uzrTiArce1h9VCqK3QUUZmFqBgg5rZSW > SELF 0.00000000 Waves
{
"type": 13,
"id": "3SNEexacWWoBcx6PYD6BRqNsWsBBxERD175FasBWWjTW",
"fee": 100000,
"feeAssetId": null,
"timestamp": 1655411629189,
"version": 2,
"chainId": 84,
"sender": "3N9uzrTiArce1h9VCqK3QUUZmFqBgg5rZSW",
"senderPublicKey": "2f5ca9ECz8S814GxgTjP6iWmM4xP5Q7HTDT6WVFqTzAW",
"proofs": [
"2WNZ2j6N6nVr3NYuyXrSjB6wStyQjDTCBmfWUSTeRP5xNMXST2Cr6JSkmJrEphNbj3kiriZ2VZNdoYYRFCFsRQz1"
],
"script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQEAAAABAAAAAAprZXlCYWxhbmNlAgAAAAhfYmFsYW5jZQAAAAIAAAABaQEAAAAHZGVwb3NpdAAAAAAEAAAABmNhbGxlcgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAdiYWxhbmNlCQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIFAAAABHRoaXMJAAEsAAAAAgUAAAAGY2FsbGVyBQAAAAprZXlCYWxhbmNlAAAAAAAAAAAABAAAAAkkdDAyNTkzMjgJAAUUAAAAAggJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAAAAAGYW1vdW50CAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAAAAAdhc3NldElkBAAAAAZhbW91bnQIBQAAAAkkdDAyNTkzMjgAAAACXzEEAAAAB2Fzc2V0SWQIBQAAAAkkdDAyNTkzMjgAAAACXzIDCQEAAAACIT0AAAACBQAAAAdhc3NldElkBQAAAAR1bml0CQAAAgAAAAECAAAAG09ubHkgV0FWRVMgY2FuIGJlIGRlcG9zaXRlZAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACBQAAAAZjYWxsZXIFAAAACmtleUJhbGFuY2UJAABkAAAAAgUAAAAHYmFsYW5jZQUAAAAGYW1vdW50BQAAAANuaWwAAAABaQEAAAAId2l0aGRyYXcAAAABAAAABmFtb3VudAQAAAAGY2FsbGVyCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAB2JhbGFuY2UJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAAZjYWxsZXIFAAAACmtleUJhbGFuY2UAAAAAAAAAAAADCQAAZgAAAAIFAAAABmFtb3VudAUAAAAHYmFsYW5jZQkAAAIAAAABAgAAAB5JbnN1ZmZpZW50IGJhbGFuY2UgdG8gd2l0aGRyYXcJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAZhbW91bnQFAAAABHVuaXQFAAAAA25pbAAAAACuwoIj",
"height": 2099411,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: ej5KNvwfS7VV6KU8BgiGwsuQYEN4fbMWd7iSE9qfFfe
Next: 5GvPY2rELbRBFBGJQcfiB2LeXbjpw8uKm1yb42f5pj2o
Diff:
Old | New | | Differences |
---|
6 | 6 | | @Callable(b) |
---|
7 | 7 | | func deposit () = { |
---|
8 | 8 | | let c = toBase58String(b.caller.bytes) |
---|
9 | | - | let d = getIntegerValue(this, (c + a)) |
---|
| 9 | + | let d = valueOrElse(getInteger(this, (c + a)), 0) |
---|
10 | 10 | | let e = $Tuple2(b.payments[0].amount, b.payments[0].assetId) |
---|
11 | 11 | | let f = e._1 |
---|
12 | 12 | | let g = e._2 |
---|
|
20 | 20 | | @Callable(b) |
---|
21 | 21 | | func withdraw (f) = { |
---|
22 | 22 | | let c = toBase58String(b.caller.bytes) |
---|
23 | | - | let d = getIntegerValue(this, (c + a)) |
---|
| 23 | + | let d = valueOrElse(getInteger(this, (c + a)), 0) |
---|
24 | 24 | | if ((f > d)) |
---|
25 | 25 | | then throw("Insuffient balance to withdraw") |
---|
26 | 26 | | else [ScriptTransfer(b.caller, f, unit)] |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = "_balance" |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(b) |
---|
7 | 7 | | func deposit () = { |
---|
8 | 8 | | let c = toBase58String(b.caller.bytes) |
---|
9 | | - | let d = getIntegerValue(this, (c + a)) |
---|
| 9 | + | let d = valueOrElse(getInteger(this, (c + a)), 0) |
---|
10 | 10 | | let e = $Tuple2(b.payments[0].amount, b.payments[0].assetId) |
---|
11 | 11 | | let f = e._1 |
---|
12 | 12 | | let g = e._2 |
---|
13 | 13 | | if ((g != unit)) |
---|
14 | 14 | | then throw("Only WAVES can be deposited") |
---|
15 | 15 | | else [IntegerEntry((c + a), (d + f))] |
---|
16 | 16 | | } |
---|
17 | 17 | | |
---|
18 | 18 | | |
---|
19 | 19 | | |
---|
20 | 20 | | @Callable(b) |
---|
21 | 21 | | func withdraw (f) = { |
---|
22 | 22 | | let c = toBase58String(b.caller.bytes) |
---|
23 | | - | let d = getIntegerValue(this, (c + a)) |
---|
| 23 | + | let d = valueOrElse(getInteger(this, (c + a)), 0) |
---|
24 | 24 | | if ((f > d)) |
---|
25 | 25 | | then throw("Insuffient balance to withdraw") |
---|
26 | 26 | | else [ScriptTransfer(b.caller, f, unit)] |
---|
27 | 27 | | } |
---|
28 | 28 | | |
---|
29 | 29 | | |
---|