1 | | - | {-# STDLIB_VERSION 6 #-} |
---|
2 | | - | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | | - | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | let USDN_ASSET = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' |
---|
5 | | - | |
---|
6 | | - | let vestingDapp = Address(base58'3PCbvPVQfSvVu88ip8Fm5YjwJhjEYk1Txhk') |
---|
7 | | - | |
---|
8 | | - | let myCallerAddress = Address(base58'3P7CdVcnUPwvxX5HEsX8Y1DR1cCMLSYKvUb') |
---|
9 | | - | |
---|
10 | | - | @Callable(i) |
---|
11 | | - | func withdraw (whale,regular) = if ((i.caller != myCallerAddress)) |
---|
12 | | - | then throw("only the specified user is allowed to call this DAPP") |
---|
13 | | - | else { |
---|
14 | | - | let withdrawalAmount = invoke(vestingDapp, "withdrawVestedAllUSDN", [whale, regular], nil) |
---|
15 | | - | if ((withdrawalAmount == withdrawalAmount)) |
---|
16 | | - | then match withdrawalAmount { |
---|
17 | | - | case amount: Int => |
---|
18 | | - | nil |
---|
19 | | - | case _ => |
---|
20 | | - | throw("Strict value is not equal to itself.") |
---|
21 | | - | } |
---|
22 | | - | else throw("Strict value is not equal to itself.") |
---|
23 | | - | } |
---|
24 | | - | |
---|
25 | | - | |
---|
| 1 | + | # no script |
---|