tx · F8PMCQCXbycWrCXmVcwZ8SFFfBanUQC8JvwXg5XCN4aG

3MsRQhp2cbXJQxHETzdZQdj2QfP4b3Mp6UL:  -0.01000000 Waves

2022.04.24 13:50 [2022490] smart account 3MsRQhp2cbXJQxHETzdZQdj2QfP4b3Mp6UL > SELF 0.00000000 Waves

{ "type": 13, "id": "F8PMCQCXbycWrCXmVcwZ8SFFfBanUQC8JvwXg5XCN4aG", "fee": 1000000, "feeAssetId": null, "timestamp": 1650797438246, "version": 2, "chainId": 84, "sender": "3MsRQhp2cbXJQxHETzdZQdj2QfP4b3Mp6UL", "senderPublicKey": "FuM9F3sAdx6ZQfJfJMCdjC9w4wzTDx6F1KgWCbAM1KRy", "proofs": [ "UipA2hQjXxnbaHYb9hoouGEFFKHYcH3gozZSdjasxQN5FDWv5Z3R2PVxC3JaNWboryrXfe4jvz5RtYmACzuhXku" ], "script": "base64:AAIFAAAAAAAAAB0IAhIECgIBCBIDCgEBEgMKAQESBAoCAQgSAwoBAQAAAAcBAAAABWFzSW50AAAAAQAAAAV2YWx1ZQQAAAAHJG1hdGNoMAUAAAAFdmFsdWUDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAADaW50BQAAAAckbWF0Y2gwBQAAAANpbnQJAAACAAAAAQIAAAANZXhwZWN0ZWQ6IEludAEAAAAEZ2V0SQAAAAEAAAADa2V5CQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQEAAAAId3JpdGVJbnQAAAACAAAAA2tleQAAAAV2YWx1ZQMJAABmAAAAAgAAAAAAAAAAAAUAAAAFdmFsdWUJAAACAAAAAQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAXd3JpdGluZyBuZWdhdGl2ZSB2YWx1ZSAJAAGkAAAAAQUAAAAFdmFsdWUCAAAACSBmb3Iga2V5IAUAAAADa2V5CQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAADa2V5BQAAAAV2YWx1ZQAAAAAEbWFpbgkBAAAAEUBleHRyT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AAAAQkAA/wAAAAEBQAAAARtYWluAgAAAAh3aXRoZHJhdwkABEwAAAACBQAAAA9hc3NldFN0cmluZ1VzZGMJAARMAAAAAgUAAAAGbGltaXRkBQAAAANuaWwFAAAAA25pbAAAAAFpAQAAAANiYjEAAAABAAAABGxvd20EAAAACWF2YWlsYWJsZQkAA/AAAAACBQAAAAtyZXNlcnZlVXNkYwUAAAAHYXNzZXRJZAQAAAACdWMJAQAAAAVhc0ludAAAAAEJAAP8AAAABAUAAAALcmVzZXJ2ZVVzZGMCAAAADnVzZXJEZXBvc2l0VVNECQAETAAAAAIJAAQlAAAAAQUAAAAEdGhpcwUAAAADbmlsBQAAAANuaWwEAAAAAXYDCQAAZgAAAAIFAAAACWF2YWlsYWJsZQUAAAACdWMFAAAAAnVjBQAAAAlhdmFpbGFibGUDCQAAZgAAAAIAAAAAAAAAAAEFAAAAAXYJAAACAAAAAQIAAAABMQkABRQAAAACBQAAAANuaWwJAQAAAAVhc0ludAAAAAEJAAP8AAAABAUAAAAEbWFpbgIAAAAId2l0aGRyYXcJAARMAAAAAgUAAAAPYXNzZXRTdHJpbmdVc2RjCQAETAAAAAIFAAAAAXYFAAAAA25pbAUAAAADbmlsAAAAANREd54=", "height": 2022490, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5PbM7v1xj6HCY2UmPNGd2RUVYyVN9Azhwp5qYkduappV Next: 2iWvKK2fE6JTabQkUfCnnSz3mQEXwZZvKiV6fbsmGBHE Diff:
OldNewDifferences
2020 else IntegerEntry(f, b)
2121
2222
23-func h (f,b) = g(f, (valueOrElse(e(f), 0) + b))
23+let h = addressFromStringValue("3PAZv9tgK1PX7dKR7b4kchq5qdpUS3G5sYT")
24+
25+let i = "6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ"
26+
27+let j = addressFromStringValue("3PGCkrHBxFMi7tz1xqnxgBpeNvn5E4M4g8S")
28+
29+let k = fromBase58String(i)
30+
31+@Callable(l)
32+func initbal (m,f) = $Tuple2([g("MyBal", m), g(f, 0)], unit)
2433
2534
26-let i = addressFromStringValue("3PAZv9tgK1PX7dKR7b4kchq5qdpUS3G5sYT")
2735
28-let j = "6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ"
29-
30-let k = addressFromStringValue("3PGCkrHBxFMi7tz1xqnxgBpeNvn5E4M4g8S")
31-
32-let l = fromBase58String(j)
33-
34-let m = "MyBal"
35-
36-@Callable(n)
37-func byebye (o) = {
38- let p = assetBalance(k, l)
39- if ((o > p))
36+@Callable(l)
37+func byebye (n) = {
38+ let o = assetBalance(j, k)
39+ if ((n > o))
4040 then throw("1")
4141 else {
42- let q = a(invoke(k, "userDepositUSD", [toString(this)], nil))
43- let r = if ((p > q))
44- then q
45- else p
46- if ((o > r))
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))
4747 then throw("2")
48- else $Tuple2(nil, a(invoke(i, "withdraw", [j, r], nil)))
48+ else $Tuple2(nil, a(invoke(h, "withdraw", [i, q], nil)))
4949 }
5050 }
5151
5252
5353
54-@Callable(n)
55-func initbal (s) = $Tuple2([g("MyBal", s)], unit)
54+@Callable(l)
55+func goodbye (n) = {
56+ let o = assetBalance(j, k)
57+ if ((n > o))
58+ then throw("1")
59+ else {
60+ let p = valueOrElse(e("MyBal"), 0)
61+ let q = if ((o > p))
62+ then p
63+ else o
64+ if ((q == 0))
65+ then throw("2")
66+ else $Tuple2([g("MyBal", (p - q))], a(invoke(h, "withdraw", [i, q], nil)))
67+ }
68+ }
69+
70+
71+
72+@Callable(l)
73+func kissmegoodbye (r,f) = {
74+ let o = assetBalance(j, k)
75+ if ((r > o))
76+ then throw("1")
77+ else {
78+ let s = valueOrElse(e(f), 0)
79+ if ((s == 1))
80+ then throw("2")
81+ else $Tuple2([g(f, 1)], a(invoke(h, "withdraw", [i, r], nil)))
82+ }
83+ }
84+
85+
86+
87+@Callable(l)
88+func bb1 (n) = {
89+ let o = assetBalance(j, k)
90+ let p = a(invoke(j, "userDepositUSD", [toString(this)], nil))
91+ let q = if ((o > p))
92+ then p
93+ else o
94+ if ((1 > q))
95+ then throw("1")
96+ else $Tuple2(nil, a(invoke(h, "withdraw", [i, q], nil)))
97+ }
5698
5799
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
23-func h (f,b) = g(f, (valueOrElse(e(f), 0) + b))
23+let h = addressFromStringValue("3PAZv9tgK1PX7dKR7b4kchq5qdpUS3G5sYT")
24+
25+let i = "6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ"
26+
27+let j = addressFromStringValue("3PGCkrHBxFMi7tz1xqnxgBpeNvn5E4M4g8S")
28+
29+let k = fromBase58String(i)
30+
31+@Callable(l)
32+func initbal (m,f) = $Tuple2([g("MyBal", m), g(f, 0)], unit)
2433
2534
26-let i = addressFromStringValue("3PAZv9tgK1PX7dKR7b4kchq5qdpUS3G5sYT")
2735
28-let j = "6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ"
29-
30-let k = addressFromStringValue("3PGCkrHBxFMi7tz1xqnxgBpeNvn5E4M4g8S")
31-
32-let l = fromBase58String(j)
33-
34-let m = "MyBal"
35-
36-@Callable(n)
37-func byebye (o) = {
38- let p = assetBalance(k, l)
39- if ((o > p))
36+@Callable(l)
37+func byebye (n) = {
38+ let o = assetBalance(j, k)
39+ if ((n > o))
4040 then throw("1")
4141 else {
42- let q = a(invoke(k, "userDepositUSD", [toString(this)], nil))
43- let r = if ((p > q))
44- then q
45- else p
46- if ((o > r))
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))
4747 then throw("2")
48- else $Tuple2(nil, a(invoke(i, "withdraw", [j, r], nil)))
48+ else $Tuple2(nil, a(invoke(h, "withdraw", [i, q], nil)))
4949 }
5050 }
5151
5252
5353
54-@Callable(n)
55-func initbal (s) = $Tuple2([g("MyBal", s)], unit)
54+@Callable(l)
55+func goodbye (n) = {
56+ let o = assetBalance(j, k)
57+ if ((n > o))
58+ then throw("1")
59+ else {
60+ let p = valueOrElse(e("MyBal"), 0)
61+ let q = if ((o > p))
62+ then p
63+ else o
64+ if ((q == 0))
65+ then throw("2")
66+ else $Tuple2([g("MyBal", (p - q))], a(invoke(h, "withdraw", [i, q], nil)))
67+ }
68+ }
69+
70+
71+
72+@Callable(l)
73+func kissmegoodbye (r,f) = {
74+ let o = assetBalance(j, k)
75+ if ((r > o))
76+ then throw("1")
77+ else {
78+ let s = valueOrElse(e(f), 0)
79+ if ((s == 1))
80+ then throw("2")
81+ else $Tuple2([g(f, 1)], a(invoke(h, "withdraw", [i, r], nil)))
82+ }
83+ }
84+
85+
86+
87+@Callable(l)
88+func bb1 (n) = {
89+ let o = assetBalance(j, k)
90+ let p = a(invoke(j, "userDepositUSD", [toString(this)], nil))
91+ let q = if ((o > p))
92+ then p
93+ else o
94+ if ((1 > q))
95+ then throw("1")
96+ else $Tuple2(nil, a(invoke(h, "withdraw", [i, q], nil)))
97+ }
5698
5799

github/deemru/w8io/026f985 
22.98 ms