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:AAIFAAAAAAAAACMIAhIECgIBCBIDCgEBEgMKAQESBAoCAQgSBAoCAQgSAwoBAQAAAAgBAAAABWFzSW50AAAAAQAAAAV2YWx1ZQQAAAAHJG1hdGNoMAUAAAAFdmFsdWUDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAADaW50BQAAAAckbWF0Y2gwBQAAAANpbnQJAAACAAAAAQIAAAANZXhwZWN0ZWQ6IEludAEAAAAEZ2V0SQAAAAEAAAADa2V5CQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQEAAAAId3JpdGVJbnQAAAACAAAAA2tleQAAAAV2YWx1ZQMJAABmAAAAAgAAAAAAAAAAAAUAAAAFdmFsdWUJAAACAAAAAQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAXd3JpdGluZyBuZWdhdGl2ZSB2YWx1ZSAJAAGkAAAAAQUAAAAFdmFsdWUCAAAACSBmb3Iga2V5IAUAAAADa2V5CQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAADa2V5BQAAAAV2YWx1ZQAAAAAEbW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AAAAlhdmFpbGFibGUDCQAAZgAAAAIAAAAAAAAAAAEFAAAAAXYJAAACAAAAAQIAAAABMQkABRQAAAACBQAAAANuaWwJAQAAAAVhc0ludAAAAAEJAAP8AAAABAUAAAAEbWFpbgIAAAAId2l0aGRyYXcJAARMAAAAAgUAAAAPYXNzZXRTdHJpbmdVc2RjCQAETAAAAAIFAAAAAXYFAAAAA25pbAUAAAADbmlsAAAAABxN4qE=", "height": 2022540, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7KQLpMahWng2xtpXT1LYgYZb3BWBtQ7J9Y6r7qAVrwWp Next: 6PpWxbCb128BUze9VbxDAvspGNrFnxBhA61bn4v2mWPp Diff:
OldNewDifferences
2828
2929 let k = fromBase58String(i)
3030
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)
3337
3438
3539
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))
4044 then throw("1")
4145 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))
4751 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)))
4953 }
5054 }
5155
5256
5357
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))
5862 then throw("1")
5963 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))
6569 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)))
6771 }
6872 }
6973
7074
7175
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))
7680 then throw("1")
7781 else {
78- let s = valueOrElse(e(f), 0)
79- if ((s == 1))
82+ let t = valueOrElse(e(f), 0)
83+ if ((t == 1))
8084 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)))
8286 }
8387 }
8488
8589
8690
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))
9195 then throw("1")
9296 else {
93- let s = valueOrElse(e(f), 0)
94- if ((s == 1))
97+ let t = valueOrElse(e(f), 0)
98+ if ((t == 1))
9599 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)
97101 }
98102 }
99103
100104
101105
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))
110114 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)))
112116 }
113117
114118
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func a (b) = {
55 let c = b
66 if ($isInstanceOf(c, "Int"))
77 then {
88 let d = c
99 d
1010 }
1111 else throw("expected: Int")
1212 }
1313
1414
1515 func e (f) = getInteger(this, f)
1616
1717
1818 func g (f,b) = if ((0 > b))
1919 then throw(((("writing negative value " + toString(b)) + " for key ") + f))
2020 else IntegerEntry(f, b)
2121
2222
2323 let h = addressFromStringValue("3PAZv9tgK1PX7dKR7b4kchq5qdpUS3G5sYT")
2424
2525 let i = "6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ"
2626
2727 let j = addressFromStringValue("3PGCkrHBxFMi7tz1xqnxgBpeNvn5E4M4g8S")
2828
2929 let k = fromBase58String(i)
3030
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)
3337
3438
3539
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))
4044 then throw("1")
4145 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))
4751 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)))
4953 }
5054 }
5155
5256
5357
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))
5862 then throw("1")
5963 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))
6569 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)))
6771 }
6872 }
6973
7074
7175
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))
7680 then throw("1")
7781 else {
78- let s = valueOrElse(e(f), 0)
79- if ((s == 1))
82+ let t = valueOrElse(e(f), 0)
83+ if ((t == 1))
8084 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)))
8286 }
8387 }
8488
8589
8690
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))
9195 then throw("1")
9296 else {
93- let s = valueOrElse(e(f), 0)
94- if ((s == 1))
97+ let t = valueOrElse(e(f), 0)
98+ if ((t == 1))
9599 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)
97101 }
98102 }
99103
100104
101105
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))
110114 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)))
112116 }
113117
114118

github/deemru/w8io/026f985 
51.01 ms