tx · D1Zxi7LVxf9iCyNDmz6ur6unYyY37eyBjF8cjNGaPrYE 3N3irEKCdj77h97aEbfj3fa3uMXCNCXVhKt: -0.05000000 Waves 2023.03.22 11:46 [2501008] smart account 3N3irEKCdj77h97aEbfj3fa3uMXCNCXVhKt > SELF 0.00000000 Waves
{ "type": 13, "id": "D1Zxi7LVxf9iCyNDmz6ur6unYyY37eyBjF8cjNGaPrYE", "fee": 5000000, "feeAssetId": null, "timestamp": 1679474815680, "version": 2, "chainId": 84, "sender": "3N3irEKCdj77h97aEbfj3fa3uMXCNCXVhKt", "senderPublicKey": "FACNGaFYnR8yFbQFg9sRBpzGVCyzMyLeVw3JMhGQT1wn", "proofs": [ "3saAq9eBNGAPPMDjhLaQBonH9tHhuTKNjZCZQM8LH1VXiHkkzc2yamyTQfrrBSs2CnuRWpJuFsUWDbGgzsRa9Ydz" ], "script": "base64:BgIICAISABIAEgAEABNwZXBlQ29udHJhY3RBZGRyZXNzAiMzTjRrWFpIR2tlNnlScTNaNTdxN0JUZ0NyVDJTQ3ZRQ1lFUgAOc1dhdmVzSWRTdHJpbmcCLEZYaUZ4ZWRQNzZDbWcxdjRYR05EWUpwTkU5Z1RHUFJHMXpqZmttVXNHaEZtAAxwZXBlQ29udHJhY3QJARFAZXh0ck5hdGl2ZSgxMDYyKQEFE3BlcGVDb250cmFjdEFkZHJlc3MABnNXYXZlcwkA2QQBBQ5zV2F2ZXNJZFN0cmluZwMBaQEHZ2V0UmF0ZQAEB3Jlc3VsdHMJAPwHBAUMcGVwZUNvbnRyYWN0AgdnZXRSYXRlBQNuaWwFA25pbAQHJG1hdGNoMAUHcmVzdWx0cwMJAAECBQckbWF0Y2gwAgZTdHJpbmcEAXQFByRtYXRjaDAJAJQKAgUDbmlsBQF0CQACAQIFRXJyb3IBaQEHZGVwb3NpdAAEDHN0YXJ0QmFsYW5jZQkA8AcCBQR0aGlzBQZzV2F2ZXMDCQAAAgUMc3RhcnRCYWxhbmNlBQxzdGFydEJhbGFuY2UEB3Jlc3VsdHMJAPwHBAUMcGVwZUNvbnRyYWN0AgdkZXBvc2l0BQNuaWwIBQFpCHBheW1lbnRzBAckbWF0Y2gwBQdyZXN1bHRzAwkAAQIFByRtYXRjaDACBFVuaXQEAWEFByRtYXRjaDAECm5ld0JhbGFuY2UJAPAHAgUEdGhpcwUGc1dhdmVzBApzZW5kQW1vdW50CQBlAgUKbmV3QmFsYW5jZQUMc3RhcnRCYWxhbmNlCQCUCgIJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwgFAWkGY2FsbGVyBQpzZW5kQW1vdW50BQZzV2F2ZXMFA25pbAUKc2VuZEFtb3VudAkAAgECDUVycm9yIGRlcG9zaXQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BaQEId2l0aGRyYXcABAxzdGFydEJhbGFuY2UICQDvBwEFBHRoaXMJYXZhaWxhYmxlAwkAAAIFDHN0YXJ0QmFsYW5jZQUMc3RhcnRCYWxhbmNlBAdyZXN1bHRzCQD8BwQFDHBlcGVDb250cmFjdAIId2l0aGRyYXcFA25pbAgFAWkIcGF5bWVudHMEByRtYXRjaDAFB3Jlc3VsdHMDCQABAgUHJG1hdGNoMAIEVW5pdAQBYQUHJG1hdGNoMAQKbmV3QmFsYW5jZQgJAO8HAQUEdGhpcwlhdmFpbGFibGUECnNlbmRBbW91bnQJAGUCBQpuZXdCYWxhbmNlBQxzdGFydEJhbGFuY2UJAJQKAgkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIFCnNlbmRBbW91bnQFBHVuaXQFA25pbAUKc2VuZEFtb3VudAkAAgECDUVycm9yIGRlcG9zaXQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4Ar+pbEg==", "height": 2501008, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DmEvoNtfouYRyRk238qN5fQS7bFnas6Bprh9gb4DoamK Next: A72JFBJbCxLVJH6RJ3a43y4f3RPF4R2N2BKGBzr1fYF1 Diff:
Old | New | Differences | |
---|---|---|---|
34 | 34 | then { | |
35 | 35 | let j = g | |
36 | 36 | let k = assetBalance(this, d) | |
37 | - | [ScriptTransfer(e.caller, (k - i), d)] | |
37 | + | let l = (k - i) | |
38 | + | $Tuple2([ScriptTransfer(e.caller, l, d)], l) | |
39 | + | } | |
40 | + | else throw("Error deposit") | |
41 | + | } | |
42 | + | else throw("Strict value is not equal to itself.") | |
43 | + | } | |
44 | + | ||
45 | + | ||
46 | + | ||
47 | + | @Callable(e) | |
48 | + | func withdraw () = { | |
49 | + | let i = wavesBalance(this).available | |
50 | + | if ((i == i)) | |
51 | + | then { | |
52 | + | let f = invoke(c, "withdraw", nil, e.payments) | |
53 | + | let g = f | |
54 | + | if ($isInstanceOf(g, "Unit")) | |
55 | + | then { | |
56 | + | let j = g | |
57 | + | let k = wavesBalance(this).available | |
58 | + | let l = (k - i) | |
59 | + | $Tuple2([ScriptTransfer(e.caller, l, unit)], l) | |
38 | 60 | } | |
39 | 61 | else throw("Error deposit") | |
40 | 62 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "3N4kXZHGke6yRq3Z57q7BTgCrT2SCvQCYER" | |
5 | 5 | ||
6 | 6 | let b = "FXiFxedP76Cmg1v4XGNDYJpNE9gTGPRG1zjfkmUsGhFm" | |
7 | 7 | ||
8 | 8 | let c = addressFromStringValue(a) | |
9 | 9 | ||
10 | 10 | let d = fromBase58String(b) | |
11 | 11 | ||
12 | 12 | @Callable(e) | |
13 | 13 | func getRate () = { | |
14 | 14 | let f = invoke(c, "getRate", nil, nil) | |
15 | 15 | let g = f | |
16 | 16 | if ($isInstanceOf(g, "String")) | |
17 | 17 | then { | |
18 | 18 | let h = g | |
19 | 19 | $Tuple2(nil, h) | |
20 | 20 | } | |
21 | 21 | else throw("Error") | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | ||
26 | 26 | @Callable(e) | |
27 | 27 | func deposit () = { | |
28 | 28 | let i = assetBalance(this, d) | |
29 | 29 | if ((i == i)) | |
30 | 30 | then { | |
31 | 31 | let f = invoke(c, "deposit", nil, e.payments) | |
32 | 32 | let g = f | |
33 | 33 | if ($isInstanceOf(g, "Unit")) | |
34 | 34 | then { | |
35 | 35 | let j = g | |
36 | 36 | let k = assetBalance(this, d) | |
37 | - | [ScriptTransfer(e.caller, (k - i), d)] | |
37 | + | let l = (k - i) | |
38 | + | $Tuple2([ScriptTransfer(e.caller, l, d)], l) | |
39 | + | } | |
40 | + | else throw("Error deposit") | |
41 | + | } | |
42 | + | else throw("Strict value is not equal to itself.") | |
43 | + | } | |
44 | + | ||
45 | + | ||
46 | + | ||
47 | + | @Callable(e) | |
48 | + | func withdraw () = { | |
49 | + | let i = wavesBalance(this).available | |
50 | + | if ((i == i)) | |
51 | + | then { | |
52 | + | let f = invoke(c, "withdraw", nil, e.payments) | |
53 | + | let g = f | |
54 | + | if ($isInstanceOf(g, "Unit")) | |
55 | + | then { | |
56 | + | let j = g | |
57 | + | let k = wavesBalance(this).available | |
58 | + | let l = (k - i) | |
59 | + | $Tuple2([ScriptTransfer(e.caller, l, unit)], l) | |
38 | 60 | } | |
39 | 61 | else throw("Error deposit") | |
40 | 62 | } | |
41 | 63 | else throw("Strict value is not equal to itself.") | |
42 | 64 | } | |
43 | 65 | ||
44 | 66 |
github/deemru/w8io/169f3d6 38.09 ms ◑