7 | | - | func w1 () = { |
---|
8 | | - | let inv1 = invoke(Address(base58'3PDaawsaiHq8AtfpjURewEW4brmw6WVZD21'), "withdraw", [1], nil) |
---|
9 | | - | if ((inv1 == inv1)) |
---|
10 | | - | then { |
---|
11 | | - | let inv2 = invoke(Address(base58'3PQnQDzoFSpto4YA8KfkmX7d7uxf5uzCA87'), "withdraw", [2], nil) |
---|
12 | | - | if ((inv2 == inv2)) |
---|
13 | | - | then { |
---|
14 | | - | let inv3 = invoke(Address(base58'3PMHRk8492po1wyyrtqQm8s4hDb29SLmEx1'), "withdraw", [3], nil) |
---|
15 | | - | if ((inv3 == inv3)) |
---|
16 | | - | then { |
---|
17 | | - | let inv4 = invoke(Address(base58'3PBx74uqnRwRkLEJxoGGYx9zQ1aaQnMQx2A'), "withdraw", [4], nil) |
---|
18 | | - | if ((inv4 == inv4)) |
---|
19 | | - | then nil |
---|
20 | | - | else throw("Strict value is not equal to itself.") |
---|
21 | | - | } |
---|
22 | | - | else throw("Strict value is not equal to itself.") |
---|
23 | | - | } |
---|
24 | | - | else throw("Strict value is not equal to itself.") |
---|
25 | | - | } |
---|
26 | | - | else throw("Strict value is not equal to itself.") |
---|
27 | | - | } |
---|
28 | | - | |
---|
29 | | - | |
---|
30 | | - | |
---|
31 | | - | @Callable(i) |
---|
32 | | - | func w2 () = { |
---|
33 | | - | let inv1 = invoke(Address(base58'3PDaawsaiHq8AtfpjURewEW4brmw6WVZD21'), "withdraw", [1], nil) |
---|
34 | | - | if ((inv1 == inv1)) |
---|
35 | | - | then { |
---|
36 | | - | let inv2 = invoke(Address(base58'3PQnQDzoFSpto4YA8KfkmX7d7uxf5uzCA87'), "withdraw", [2], nil) |
---|
37 | | - | if ((inv2 == inv2)) |
---|
38 | | - | then { |
---|
39 | | - | let inv3 = invoke(Address(base58'3PFjYjgf2s8W781vwtdVrDULDNpsHThy6PL'), "withdraw", [3], nil) |
---|
40 | | - | if ((inv3 == inv3)) |
---|
41 | | - | then { |
---|
42 | | - | let inv4 = invoke(Address(base58'3PBx74uqnRwRkLEJxoGGYx9zQ1aaQnMQx2A'), "withdraw", [4], nil) |
---|
43 | | - | if ((inv4 == inv4)) |
---|
44 | | - | then nil |
---|
45 | | - | else throw("Strict value is not equal to itself.") |
---|
46 | | - | } |
---|
47 | | - | else throw("Strict value is not equal to itself.") |
---|
48 | | - | } |
---|
49 | | - | else throw("Strict value is not equal to itself.") |
---|
50 | | - | } |
---|
51 | | - | else throw("Strict value is not equal to itself.") |
---|
52 | | - | } |
---|
| 7 | + | func withdraw (amount) = if ((i.caller != adminAddress)) |
---|
| 8 | + | then throw("only admin can do") |
---|
| 9 | + | else { |
---|
| 10 | + | let inv = invoke(addressFromStringValue("3PCbvPVQfSvVu88ip8Fm5YjwJhjEYk1Txhk"), "withdrawVestedAllUSDN", [false, true], nil) |
---|
| 11 | + | if ((inv == inv)) |
---|
| 12 | + | then nil |
---|
| 13 | + | else throw("Strict value is not equal to itself.") |
---|
| 14 | + | } |
---|