tx · D2nUgpeTqW88MREYt1GmVCaE2CcsvUf3JTYnoXNh8UuG 3MsRQhp2cbXJQxHETzdZQdj2QfP4b3Mp6UL: -0.01000000 Waves 2022.04.21 10:29 [2017989] smart account 3MsRQhp2cbXJQxHETzdZQdj2QfP4b3Mp6UL > SELF 0.00000000 Waves
{ "type": 13, "id": "D2nUgpeTqW88MREYt1GmVCaE2CcsvUf3JTYnoXNh8UuG", "fee": 1000000, "feeAssetId": null, "timestamp": 1650526179255, "version": 2, "chainId": 84, "sender": "3MsRQhp2cbXJQxHETzdZQdj2QfP4b3Mp6UL", "senderPublicKey": "FuM9F3sAdx6ZQfJfJMCdjC9w4wzTDx6F1KgWCbAM1KRy", "proofs": [ "4NVkKjUNwq8M6WEBNAt9RhUgNngFDUuQSJVSbKbHnSWuREYwJTHVo5PBVwAsGpJcb3WfohRbaJwzHGvHPXdsB9jx" ], "script": "base64:AAIFAAAAAAAAAAsIAhIAEgASAwoBAQAAAAYBAAAABWFzSW50AAAAAQAAAAV2YWx1ZQQAAAAHJG1hdGNoMAUAAAAFdmFsdWUDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAADaW50BQAAAAckbWF0Y2gwBQAAAANpbnQJAAACAAAAAQIAAAANZXhwZWN0ZWQ6IEludAEAAAARYXNVc2VyQmFsYW5jZURhdGEAAAABAAAABXZhbHVlBAAAAAckbWF0Y2gwBQAAAAV2YWx1ZQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAiKEludCwgSW50LCBJbnQsIEludCwgSW50LCBCb29sZWFuKQQAAAABeAUAAAAHJG1hdGNoMAgFAAAAAXgAAAACXzMEAAAAAXQFAAAAByRtYXRjaDAJAAACAAAAAQIAAAAid3JvbmcgdHlwZSwgZXhwZWN0ZWQ6IEludDUmQm9vbGVhbgAAAAAEbWFpbgkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQIAAAAjM1BBWnY5dGdLMVBYN2RLUjdiNGtjaHE1cWRwVVMzRzVzWVQAAAAAD2Fzc2V0U3RyaW5nVXNkYwIAAAAsNlh0SGpwWGJzOVJSSlAyU3I5R1V5VnF6QUNjYnk5VGtUaEhYbmpWQzVDREoAAAAAC3Jlc2VydmVVc2RjCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABAgAAACMzTXNSUWhwMmNiWEpReEhFVHpkWlFkajJRZlA0YjNNcDZVTAAAAAAHYXNzZXRJZAkAAlkAAAABBQAAAA9hc3NldFN0cmluZ1VzZGMAAAADAAAAAWkBAAAAC3VzZXJCYWxhbmNlAAAAAAkABRQAAAACBQAAAANuaWwAAAAAADWk6QAAAAABaQEAAAAEZ2V0QgAAAAAEAAAAAWEJAAPwAAAAAgUAAAALcmVzZXJ2ZVVzZGMFAAAAB2Fzc2V0SWQJAAUUAAAAAgUAAAADbmlsCQABpAAAAAEFAAAAAWEAAAABaQEAAAAGYnllYnllAAAAAQAAAARtaW5tBAAAAAlhdmFpbGFibGUJAAPwAAAAAgUAAAALcmVzZXJ2ZVVzZGMFAAAAB2Fzc2V0SWQDCQAAZgAAAAIFAAAABG1pbm0FAAAACWF2YWlsYWJsZQkABRQAAAACBQAAAANuaWwJAAGkAAAAAQUAAAAEbWlubQQAAAAKZGVwb3NpdFVzZAkBAAAABWFzSW50AAAAAQkAA/wAAAAEBQAAAAtyZXNlcnZlVXNkYwIAAAALdXNlckJhbGFuY2UFAAAAA25pbAUAAAADbmlsBAAAAAF2AwkAAGYAAAACBQAAAApkZXBvc2l0VXNkBQAAAAlhdmFpbGFibGUFAAAACmRlcG9zaXRVc2QFAAAACWF2YWlsYWJsZQkABRQAAAACBQAAAANuaWwJAAGkAAAAAQUAAAABdgAAAAD1mQaL", "height": 2017989, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GiqnqJJKqraFiusjxdjnXLXpsppzVNEDP4JsAfpdDfbW Next: BJBZCH4r2qXtFc5cYv9f3tN17qFhnavg94G67o8Vx2Hb Diff:
Old | New | Differences | |
---|---|---|---|
40 | 40 | ||
41 | 41 | ||
42 | 42 | @Callable(l) | |
43 | - | func byebye (m) = { | |
44 | - | let n = assetBalance(h, k) | |
45 | - | if ((m > n)) | |
46 | - | then $Tuple2(nil, toString(m)) | |
43 | + | func getB () = { | |
44 | + | let m = assetBalance(j, k) | |
45 | + | $Tuple2(nil, toString(m)) | |
46 | + | } | |
47 | + | ||
48 | + | ||
49 | + | ||
50 | + | @Callable(l) | |
51 | + | func byebye (n) = { | |
52 | + | let o = assetBalance(j, k) | |
53 | + | if ((n > o)) | |
54 | + | then $Tuple2(nil, toString(n)) | |
47 | 55 | else { | |
48 | - | let | |
49 | - | let | |
50 | - | then | |
51 | - | else | |
52 | - | $Tuple2(nil, toString( | |
56 | + | let p = a(invoke(j, "userBalance", nil, nil)) | |
57 | + | let q = if ((p > o)) | |
58 | + | then p | |
59 | + | else o | |
60 | + | $Tuple2(nil, toString(q)) | |
53 | 61 | } | |
54 | 62 | } | |
55 | 63 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = { | |
5 | 5 | let c = b | |
6 | 6 | if ($isInstanceOf(c, "Int")) | |
7 | 7 | then { | |
8 | 8 | let d = c | |
9 | 9 | d | |
10 | 10 | } | |
11 | 11 | else throw("expected: Int") | |
12 | 12 | } | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func e (b) = { | |
16 | 16 | let c = b | |
17 | 17 | if ($isInstanceOf(c, "(Int, Int, Int, Int, Int, Boolean)")) | |
18 | 18 | then { | |
19 | 19 | let f = c | |
20 | 20 | f._3 | |
21 | 21 | } | |
22 | 22 | else { | |
23 | 23 | let g = c | |
24 | 24 | throw("wrong type, expected: Int5&Boolean") | |
25 | 25 | } | |
26 | 26 | } | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | let h = addressFromStringValue("3PAZv9tgK1PX7dKR7b4kchq5qdpUS3G5sYT") | |
30 | 30 | ||
31 | 31 | let i = "6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ" | |
32 | 32 | ||
33 | 33 | let j = addressFromStringValue("3MsRQhp2cbXJQxHETzdZQdj2QfP4b3Mp6UL") | |
34 | 34 | ||
35 | 35 | let k = fromBase58String(i) | |
36 | 36 | ||
37 | 37 | @Callable(l) | |
38 | 38 | func userBalance () = $Tuple2(nil, 900000000) | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | ||
42 | 42 | @Callable(l) | |
43 | - | func byebye (m) = { | |
44 | - | let n = assetBalance(h, k) | |
45 | - | if ((m > n)) | |
46 | - | then $Tuple2(nil, toString(m)) | |
43 | + | func getB () = { | |
44 | + | let m = assetBalance(j, k) | |
45 | + | $Tuple2(nil, toString(m)) | |
46 | + | } | |
47 | + | ||
48 | + | ||
49 | + | ||
50 | + | @Callable(l) | |
51 | + | func byebye (n) = { | |
52 | + | let o = assetBalance(j, k) | |
53 | + | if ((n > o)) | |
54 | + | then $Tuple2(nil, toString(n)) | |
47 | 55 | else { | |
48 | - | let | |
49 | - | let | |
50 | - | then | |
51 | - | else | |
52 | - | $Tuple2(nil, toString( | |
56 | + | let p = a(invoke(j, "userBalance", nil, nil)) | |
57 | + | let q = if ((p > o)) | |
58 | + | then p | |
59 | + | else o | |
60 | + | $Tuple2(nil, toString(q)) | |
53 | 61 | } | |
54 | 62 | } | |
55 | 63 | ||
56 | 64 |
github/deemru/w8io/169f3d6 31.00 ms ◑