tx · 6PpWxbCb128BUze9VbxDAvspGNrFnxBhA61bn4v2mWPp 3MsRQhp2cbXJQxHETzdZQdj2QfP4b3Mp6UL: -0.01000000 Waves 2022.04.24 14:53 [2022553] smart account 3MsRQhp2cbXJQxHETzdZQdj2QfP4b3Mp6UL > SELF 0.00000000 Waves
{ "type": 13, "id": "6PpWxbCb128BUze9VbxDAvspGNrFnxBhA61bn4v2mWPp", "fee": 1000000, "feeAssetId": null, "timestamp": 1650801183088, "version": 2, "chainId": 84, "sender": "3MsRQhp2cbXJQxHETzdZQdj2QfP4b3Mp6UL", "senderPublicKey": "FuM9F3sAdx6ZQfJfJMCdjC9w4wzTDx6F1KgWCbAM1KRy", "proofs": [ "7obg9ahFdVNtArRa7QaaQ7QGYSUpaLQjuSgiXkPzZxXhnAeWVNcTynY8YmXUF75PGdgfjdqS4Q4Ui3XREG1f2bU" ], "script": "base64:AAIFAAAAAAAAACMIAhIECgIBCBIDCgEBEgMKAQESBAoCAQgSBAoCAQgSAwoBAQAAAAgBAAAABWFzSW50AAAAAQAAAAV2YWx1ZQQAAAAHJG1hdGNoMAUAAAAFdmFsdWUDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAADaW50BQAAAAckbWF0Y2gwBQAAAANpbnQJAAACAAAAAQIAAAANZXhwZWN0ZWQ6IEludAEAAAAEZ2V0SQAAAAEAAAADa2V5CQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQEAAAAId3JpdGVJbnQAAAACAAAAA2tleQAAAAV2YWx1ZQMJAABmAAAAAgAAAAAAAAAAAAUAAAAFdmFsdWUJAAACAAAAAQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAXd3JpdGluZyBuZWdhdGl2ZSB2YWx1ZSAJAAGkAAAAAQUAAAAFdmFsdWUCAAAACSBmb3Iga2V5IAUAAAADa2V5CQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAADa2V5BQAAAAV2YWx1ZQAAAAAEbWFpbgkBAAAAEUBle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GUDCQAAZgAAAAIAAAAAAAAAAAEFAAAAAXYJAAACAAAAAQIAAAABMQkABRQAAAACBQAAAANuaWwJAQAAAAVhc0ludAAAAAEJAAP8AAAABAUAAAAEbWFpbgIAAAAId2l0aGRyYXcJAARMAAAAAgUAAAAPYXNzZXRTdHJpbmdVc2RjCQAETAAAAAIFAAAAAXYFAAAAA25pbAUAAAADbmlsAAAAABxN4qE=", "height": 2022553, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: E4TaJiqbzFLuQLU8Wq98L8Ks4AS5Wjb7SDAPKdxajYtu Next: Crb2Sx4M1dQ6zLiZNsVjeEvBJaCZcCkCSWrLNxpKzwZL Full:
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 (f) = getInteger(this, f) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func g (f,b) = if ((0 > b)) | |
19 | 19 | then throw(((("writing negative value " + toString(b)) + " for key ") + f)) | |
20 | 20 | else IntegerEntry(f, b) | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | let h = addressFromStringValue("3PAZv9tgK1PX7dKR7b4kchq5qdpUS3G5sYT") | |
24 | 24 | ||
25 | 25 | let i = "6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ" | |
26 | 26 | ||
27 | 27 | let j = addressFromStringValue("3PGCkrHBxFMi7tz1xqnxgBpeNvn5E4M4g8S") | |
28 | 28 | ||
29 | 29 | let k = fromBase58String(i) | |
30 | 30 | ||
31 | 31 | let l = addressFromStringValue("3MsRQhp2cbXJQxHETzdZQdj2QfP4b3Mp6UL") | |
32 | 32 | ||
33 | 33 | @Callable(m) | |
34 | 34 | func initbal (n,f) = if ((m.caller != l)) | |
35 | 35 | then throw("1") | |
36 | 36 | else $Tuple2([g("MyBal", n), g(f, 0)], unit) | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | ||
40 | 40 | @Callable(m) | |
41 | 41 | func byebye (o) = { | |
42 | 42 | let p = assetBalance(j, k) | |
43 | 43 | if ((o > p)) | |
44 | 44 | then throw("1") | |
45 | 45 | else { | |
46 | 46 | let q = a(invoke(j, "userDepositUSD", [toString(this)], nil)) | |
47 | 47 | let r = if ((p > q)) | |
48 | 48 | then q | |
49 | 49 | else p | |
50 | 50 | if ((r == 0)) | |
51 | 51 | then throw("2") | |
52 | 52 | else $Tuple2(nil, a(invoke(h, "withdraw", [i, r], nil))) | |
53 | 53 | } | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | ||
58 | 58 | @Callable(m) | |
59 | 59 | func goodbye (o) = { | |
60 | 60 | let p = assetBalance(j, k) | |
61 | 61 | if ((o > p)) | |
62 | 62 | then throw("1") | |
63 | 63 | else { | |
64 | 64 | let q = valueOrElse(e("MyBal"), 0) | |
65 | 65 | let r = if ((p > q)) | |
66 | 66 | then q | |
67 | 67 | else p | |
68 | 68 | if ((r == 0)) | |
69 | 69 | then throw("2") | |
70 | 70 | else $Tuple2([g("MyBal", (q - r))], a(invoke(h, "withdraw", [i, r], nil))) | |
71 | 71 | } | |
72 | 72 | } | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | ||
76 | 76 | @Callable(m) | |
77 | 77 | func kissmegoodbye (s,f) = { | |
78 | 78 | let p = assetBalance(j, k) | |
79 | 79 | if ((s > p)) | |
80 | 80 | then throw("1") | |
81 | 81 | else { | |
82 | 82 | let t = valueOrElse(e(f), 0) | |
83 | 83 | if ((t == 1)) | |
84 | 84 | then throw("2") | |
85 | 85 | else $Tuple2([g(f, 1)], a(invoke(h, "withdraw", [i, s], nil))) | |
86 | 86 | } | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | ||
91 | 91 | @Callable(m) | |
92 | 92 | func testkiss (s,f) = { | |
93 | 93 | let p = 1000000000 | |
94 | 94 | if ((s > p)) | |
95 | 95 | then throw("1") | |
96 | 96 | else { | |
97 | 97 | let t = valueOrElse(e(f), 0) | |
98 | 98 | if ((t == 1)) | |
99 | 99 | then throw("2") | |
100 | 100 | else $Tuple2([g(f, 1), g("MyBal", (t + 1))], s) | |
101 | 101 | } | |
102 | 102 | } | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | ||
106 | 106 | @Callable(m) | |
107 | 107 | func bb1 (o) = { | |
108 | 108 | let p = assetBalance(j, k) | |
109 | 109 | let q = a(invoke(j, "userDepositUSD", [toString(this)], nil)) | |
110 | 110 | let r = if ((p > q)) | |
111 | 111 | then q | |
112 | 112 | else p | |
113 | 113 | if ((1 > r)) | |
114 | 114 | then throw("1") | |
115 | 115 | else $Tuple2(nil, a(invoke(h, "withdraw", [i, r], nil))) | |
116 | 116 | } | |
117 | 117 | ||
118 | 118 |
github/deemru/w8io/026f985 21.17 ms ◑