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