1 | | - | {-# STDLIB_VERSION 5 #-} |
---|
2 | | - | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | | - | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | func p22 (v) = match v { |
---|
5 | | - | case x: (Int, Int, Int, Int, Int, Boolean) => |
---|
6 | | - | x._2 |
---|
7 | | - | case t => |
---|
8 | | - | throw("p22") |
---|
9 | | - | } |
---|
10 | | - | |
---|
11 | | - | |
---|
12 | | - | let a = base58'6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ' |
---|
13 | | - | |
---|
14 | | - | let d = addressFromStringValue("3PGCkrHBxFMi7tz1xqnxgBpeNvn5E4M4g8S") |
---|
15 | | - | |
---|
16 | | - | let m = addressFromStringValue("3PAZv9tgK1PX7dKR7b4kchq5qdpUS3G5sYT") |
---|
17 | | - | |
---|
18 | | - | func n () = { |
---|
19 | | - | let b = assetBalance(d, a) |
---|
20 | | - | if ((10 > b)) |
---|
21 | | - | then 0 |
---|
22 | | - | else { |
---|
23 | | - | let z = p22(invoke(d, "userBalance", [toString(this)], nil)) |
---|
24 | | - | let i = invoke(m, "withdraw", [toBase58String(a), if ((b > z)) |
---|
25 | | - | then -1 |
---|
26 | | - | else b], nil) |
---|
27 | | - | if ((i == i)) |
---|
28 | | - | then 1 |
---|
29 | | - | else throw("Strict value is not equal to itself.") |
---|
30 | | - | } |
---|
31 | | - | } |
---|
32 | | - | |
---|
33 | | - | |
---|
34 | | - | @Callable(i) |
---|
35 | | - | func g () = { |
---|
36 | | - | let admin = addressFromStringValue("3P5MGmcsL5xUvMVM3sSihRza89CYtfJrMcP") |
---|
37 | | - | if ((i.caller != admin)) |
---|
38 | | - | then throw("admin") |
---|
39 | | - | else { |
---|
40 | | - | let b = assetBalance(d, a) |
---|
41 | | - | if ((b == b)) |
---|
42 | | - | then if ((100000000 > b)) |
---|
43 | | - | then throw("too low reserve") |
---|
44 | | - | else { |
---|
45 | | - | let z = p22(invoke(d, "userBalance", [toString(this)], nil)) |
---|
46 | | - | if ((z == z)) |
---|
47 | | - | then { |
---|
48 | | - | let x = invoke(addressFromStringValue("3PAZv9tgK1PX7dKR7b4kchq5qdpUS3G5sYT"), "withdraw", [toBase58String(a), if ((b > z)) |
---|
49 | | - | then -1 |
---|
50 | | - | else b], nil) |
---|
51 | | - | if ((x == x)) |
---|
52 | | - | then nil |
---|
53 | | - | else throw("Strict value is not equal to itself.") |
---|
54 | | - | } |
---|
55 | | - | else throw("Strict value is not equal to itself.") |
---|
56 | | - | } |
---|
57 | | - | else throw("Strict value is not equal to itself.") |
---|
58 | | - | } |
---|
59 | | - | } |
---|
60 | | - | |
---|
61 | | - | |
---|
| 1 | + | # no script |
---|