tx · 7pvMHoQzHgSyGkLLr47ezpYn5Ros1wvkbzhuPYnyzkCA
3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw: -0.01000000 Waves
2022.06.08 22:05 [2087784] smart account 3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw > SELF 0.00000000 Waves
{
"type": 13,
"id": "7pvMHoQzHgSyGkLLr47ezpYn5Ros1wvkbzhuPYnyzkCA",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1654715144028,
"version": 2,
"chainId": 84,
"sender": "3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw",
"senderPublicKey": "GTKqLSK6nuFkRdebB5SmTwTU2DnTeLMvhymCFfT2CxX2",
"proofs": [
"rWek4xioU3ZsLjXVWSaehWRQdyJZ8Kjpt8wDQKgCyRyjSA8FF6GhxTD9abZXPKQg4F28VVoU3UgFnbKz6zdLURz"
],
"script": "base64:AAIFAAAAAAAAAAsIAhIAEgMKAQgSAAAAAA0AAAAABEhBU0gBAAAAIJklwE3i+u/bc48vf4d/BnVXhMLmuX4eB+81QVXPc36rAAAAAAhLcm9zc0NhcgEAAAAgNewIuJ8fl0L3aDIXfe5KYUI4pQbPPcpdLtTikAZosrsAAAAABlRvd2luZwEAAAAgLzVn9FxXOELHRV9NM7WHnRz83AP0i2FsXYU/kxb44koAAAAACGRBcHBGZWVzAQAAABoBV5prAZfpnthmNq2ZMbws44Htl6ZEmG28iwAAAAAJQWRtaW5kQXBwAQAAABoBV9BDQuIchL6bmoa833jKal/OBiGoZGoQDgAAAAAJTWluQW1vdW50AAAAAAAAAAK8AAAAAA5Lcm9zc0NhclJld2FyZAAAAAAAAAAAAQAAAAAMVG93aW5nUmV3YXJkAAAAAAAAAAABAAAAAApSZWZlcnJlVGlwAAAAAAAAAAABAAAAAAxtaW5Kb2luV2Vla3MAAAAAAAAAAAgAAAAAClRpbWVUb3dpbmcAAAAAAAAAAB4AAAAABFdlZWsAAAAAAAAAAAoAAAAAA0RheQAAAAAAAA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bWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAD0xhc3RUb3dpbmdCbG9jawMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAwMDCQAAZgAAAAIJAABoAAAAAgUAAAAJTWluQW1vdW50AAAAAAAF9eEACQAAaQAAAAIJAABoAAAAAgUAAAAGYW1vdW50CQAAZQAAAAIFAAAABmhlaWdodAUAAAARVXNlck1hdHVyaXR5VmFsdWUFAAAABFdlZWsGCQAAZgAAAAIJAABoAAAAAgUAAAAMbWluSm9pbldlZWtzBQAAAARXZWVrCQAAZQAAAAIFAAAABmhlaWdodAUAAAARVXNlck1hdHVyaXR5VmFsdWUGCQAAZgAAAAIJAABoAAAAAgUAAAAKVGltZVRvd2luZwUAAAADRGF5BQAAABRMYXN0VG93aW5nQmxvY2tWYWx1ZQkAAAIAAAABAgAAAAAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAABBfTGFzdFRvd2luZ0Jsb2NrBQAAAAZoZWlnaHQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyCQAAaAAAAAIFAAAADFRvd2luZ1Jld2FyZAAAAAAABfXhAAUAAAAGVG93aW5nBQAAAANuaWwAAAAA0MBGXA==",
"height": 2087784,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 8JAb4SAbpHjUFHZYdy8xwKcqiceVgpwcoATMtTT1HX1i
Next: 8wn6b7KHg9Xxt7x4Frs34WsdRdZg2nSba621tRE6U7TJ
Diff:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | let a = base58'7RgM3A5AVCUZFbL3EwBicv1eHFCVsaY8z71yda77zrAv' |
---|
| 4 | + | let a = base58'BJpmNoB9MABJ1ytHhbLNxuUaeoYcYVeTM1r7kh39P24i' |
---|
5 | 5 | | |
---|
6 | | - | let b = base58'7RgM3A5AVCUZFbL3EwBicv1eHFCVsaY8z71yda77zrAv' |
---|
| 6 | + | let b = base58'4dVMkKtzaWuHC21kmxBBUwKQ5LGayLZLV9snpkJxsGeW' |
---|
7 | 7 | | |
---|
8 | | - | let c = base58'7RgM3A5AVCUZFbL3EwBicv1eHFCVsaY8z71yda77zrAv' |
---|
| 8 | + | let c = base58'4BHPskP7pBoXLD7U8nk54CstqbsqRvuWr3SDP8uMrz5w' |
---|
9 | 9 | | |
---|
10 | 10 | | let d = base58'3PG1NyiC2rdgX46jb8c5zPGuEAzWXhr4L2W' |
---|
11 | 11 | | |
---|
|
23 | 23 | | |
---|
24 | 24 | | let k = 30 |
---|
25 | 25 | | |
---|
26 | | - | @Callable(l) |
---|
| 26 | + | let l = 10 |
---|
| 27 | + | |
---|
| 28 | + | let m = 5 |
---|
| 29 | + | |
---|
| 30 | + | @Callable(n) |
---|
27 | 31 | | func DepositHASH () = { |
---|
28 | | - | let m = (toBase58String(l.caller.bytes) + "_Deposit") |
---|
29 | | - | let n = { |
---|
30 | | - | let o = getInteger(this, m) |
---|
31 | | - | if ($isInstanceOf(o, "Int")) |
---|
| 32 | + | let o = (toBase58String(n.caller.bytes) + "_Deposit") |
---|
| 33 | + | let p = { |
---|
| 34 | + | let q = getInteger(this, o) |
---|
| 35 | + | if ($isInstanceOf(q, "Int")) |
---|
32 | 36 | | then { |
---|
33 | | - | let p = o |
---|
34 | | - | p |
---|
| 37 | + | let r = q |
---|
| 38 | + | r |
---|
35 | 39 | | } |
---|
36 | 40 | | else 0 |
---|
37 | 41 | | } |
---|
38 | | - | if ((n != 0)) |
---|
| 42 | + | if ((p != 0)) |
---|
39 | 43 | | then throw("You have already deposited funds, deposits can only be done once") |
---|
40 | 44 | | else { |
---|
41 | | - | let q = if ((size(l.payments) == 1)) |
---|
42 | | - | then l.payments[0] |
---|
| 45 | + | let s = if ((size(n.payments) == 1)) |
---|
| 46 | + | then n.payments[0] |
---|
43 | 47 | | else throw("Attached payment is required") |
---|
44 | | - | if (if (((f * 100000000) >= q.amount)) |
---|
| 48 | + | if (if (((f * 100000000) >= s.amount)) |
---|
45 | 49 | | then true |
---|
46 | | - | else (q.assetId != a)) |
---|
| 50 | + | else (s.assetId != a)) |
---|
47 | 51 | | then throw("Can only deposit HASH tokens, and minimum amount is 700 HASH") |
---|
48 | 52 | | else { |
---|
49 | | - | let r = (n + q.amount) |
---|
50 | | - | [IntegerEntry((toBase58String(l.caller.bytes) + "_Deposit"), r), IntegerEntry((toBase58String(l.caller.bytes) + "_DepositBlock"), height), ScriptTransfer(l.caller, (g * 100000000), b)] |
---|
| 53 | + | let t = (p + s.amount) |
---|
| 54 | + | [IntegerEntry((toBase58String(n.caller.bytes) + "_Deposit"), t), IntegerEntry((toBase58String(n.caller.bytes) + "_DepositBlock"), height), ScriptTransfer(n.caller, (g * 100000000), b)] |
---|
51 | 55 | | } |
---|
52 | 56 | | } |
---|
53 | 57 | | } |
---|
54 | 58 | | |
---|
55 | 59 | | |
---|
56 | 60 | | |
---|
57 | | - | @Callable(l) |
---|
58 | | - | func RewardReferrer (s) = { |
---|
59 | | - | let m = (toBase58String(l.caller.bytes) + "_Deposit") |
---|
60 | | - | let t = (toBase58String(l.caller.bytes) + "_TippedStatus") |
---|
61 | | - | let n = { |
---|
62 | | - | let o = getInteger(this, m) |
---|
63 | | - | if ($isInstanceOf(o, "Int")) |
---|
| 61 | + | @Callable(n) |
---|
| 62 | + | func RewardReferrer (u) = { |
---|
| 63 | + | let o = (toBase58String(n.caller.bytes) + "_Deposit") |
---|
| 64 | + | let v = (toBase58String(n.caller.bytes) + "_TippedStatus") |
---|
| 65 | + | let p = { |
---|
| 66 | + | let q = getInteger(this, o) |
---|
| 67 | + | if ($isInstanceOf(q, "Int")) |
---|
64 | 68 | | then { |
---|
65 | | - | let p = o |
---|
66 | | - | p |
---|
| 69 | + | let r = q |
---|
| 70 | + | r |
---|
67 | 71 | | } |
---|
68 | 72 | | else 0 |
---|
69 | 73 | | } |
---|
70 | | - | let u = getStringValue(this, t) |
---|
71 | | - | if ((u == "YES")) |
---|
| 74 | + | let w = getStringValue(this, v) |
---|
| 75 | + | if ((w == "YES")) |
---|
72 | 76 | | then throw("You already tipped a User, you only can tip once a user") |
---|
73 | | - | else if (((f * 100000000) > n)) |
---|
| 77 | + | else if (((f * 100000000) > p)) |
---|
74 | 78 | | then throw((("To tip your referrer you must have at least deposited: " + toString(f)) + " HASH")) |
---|
75 | | - | else [StringEntry((toBase58String(l.caller.bytes) + "_TippedStatus"), "YES"), ScriptTransfer(l.caller, (i * 100000000), b)] |
---|
| 79 | + | else [StringEntry((toBase58String(n.caller.bytes) + "_TippedStatus"), "YES"), ScriptTransfer(n.caller, (i * 100000000), b)] |
---|
76 | 80 | | } |
---|
77 | 81 | | |
---|
78 | 82 | | |
---|
79 | 83 | | |
---|
80 | | - | @Callable(l) |
---|
| 84 | + | @Callable(n) |
---|
81 | 85 | | func RequestTowing () = { |
---|
82 | | - | let m = (toBase58String(l.caller.bytes) + "_Deposit") |
---|
83 | | - | let v = (toBase58String(l.caller.bytes) + "_DepositBlock") |
---|
84 | | - | let w = (toBase58String(l.caller.bytes) + "_LastTowingBlock") |
---|
85 | | - | let n = { |
---|
86 | | - | let o = getInteger(this, m) |
---|
87 | | - | if ($isInstanceOf(o, "Int")) |
---|
| 86 | + | let o = (toBase58String(n.caller.bytes) + "_Deposit") |
---|
| 87 | + | let x = (toBase58String(n.caller.bytes) + "_DepositBlock") |
---|
| 88 | + | let y = (toBase58String(n.caller.bytes) + "_LastTowingBlock") |
---|
| 89 | + | let p = { |
---|
| 90 | + | let q = getInteger(this, o) |
---|
| 91 | + | if ($isInstanceOf(q, "Int")) |
---|
88 | 92 | | then { |
---|
89 | | - | let p = o |
---|
90 | | - | p |
---|
| 93 | + | let r = q |
---|
| 94 | + | r |
---|
91 | 95 | | } |
---|
92 | 96 | | else 0 |
---|
93 | 97 | | } |
---|
94 | | - | let x = { |
---|
95 | | - | let o = getInteger(this, v) |
---|
96 | | - | if ($isInstanceOf(o, "Int")) |
---|
| 98 | + | let z = { |
---|
| 99 | + | let q = getInteger(this, x) |
---|
| 100 | + | if ($isInstanceOf(q, "Int")) |
---|
97 | 101 | | then { |
---|
98 | | - | let p = o |
---|
99 | | - | p |
---|
| 102 | + | let r = q |
---|
| 103 | + | r |
---|
100 | 104 | | } |
---|
101 | 105 | | else 0 |
---|
102 | 106 | | } |
---|
103 | | - | let y = { |
---|
104 | | - | let o = getInteger(this, w) |
---|
105 | | - | if ($isInstanceOf(o, "Int")) |
---|
| 107 | + | let A = { |
---|
| 108 | + | let q = getInteger(this, y) |
---|
| 109 | + | if ($isInstanceOf(q, "Int")) |
---|
106 | 110 | | then { |
---|
107 | | - | let p = o |
---|
108 | | - | p |
---|
| 111 | + | let r = q |
---|
| 112 | + | r |
---|
109 | 113 | | } |
---|
110 | 114 | | else 0 |
---|
111 | 115 | | } |
---|
112 | | - | if (if (if (((f * 100000000) > ((n * (height - x)) / (1440 * 7)))) |
---|
| 116 | + | if (if (if (((f * 100000000) > ((p * (height - z)) / l))) |
---|
113 | 117 | | then true |
---|
114 | | - | else (((j * 1440) * 7) > (height - x))) |
---|
| 118 | + | else ((j * l) > (height - z))) |
---|
115 | 119 | | then true |
---|
116 | | - | else ((30 * 1440) > y)) |
---|
| 120 | + | else ((k * m) > A)) |
---|
117 | 121 | | then throw("") |
---|
118 | | - | else [IntegerEntry((toBase58String(l.caller.bytes) + "_LastTowingBlock"), height), ScriptTransfer(l.caller, (h * 100000000), c)] |
---|
| 122 | + | else [IntegerEntry((toBase58String(n.caller.bytes) + "_LastTowingBlock"), height), ScriptTransfer(n.caller, (h * 100000000), c)] |
---|
119 | 123 | | } |
---|
120 | 124 | | |
---|
121 | 125 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | let a = base58'7RgM3A5AVCUZFbL3EwBicv1eHFCVsaY8z71yda77zrAv' |
---|
| 4 | + | let a = base58'BJpmNoB9MABJ1ytHhbLNxuUaeoYcYVeTM1r7kh39P24i' |
---|
5 | 5 | | |
---|
6 | | - | let b = base58'7RgM3A5AVCUZFbL3EwBicv1eHFCVsaY8z71yda77zrAv' |
---|
| 6 | + | let b = base58'4dVMkKtzaWuHC21kmxBBUwKQ5LGayLZLV9snpkJxsGeW' |
---|
7 | 7 | | |
---|
8 | | - | let c = base58'7RgM3A5AVCUZFbL3EwBicv1eHFCVsaY8z71yda77zrAv' |
---|
| 8 | + | let c = base58'4BHPskP7pBoXLD7U8nk54CstqbsqRvuWr3SDP8uMrz5w' |
---|
9 | 9 | | |
---|
10 | 10 | | let d = base58'3PG1NyiC2rdgX46jb8c5zPGuEAzWXhr4L2W' |
---|
11 | 11 | | |
---|
12 | 12 | | let e = base58'3PLv5rYMqR4gSiP5ZSjrX2FStLhHTRgFPbb' |
---|
13 | 13 | | |
---|
14 | 14 | | let f = 700 |
---|
15 | 15 | | |
---|
16 | 16 | | let g = 1 |
---|
17 | 17 | | |
---|
18 | 18 | | let h = 1 |
---|
19 | 19 | | |
---|
20 | 20 | | let i = 1 |
---|
21 | 21 | | |
---|
22 | 22 | | let j = 8 |
---|
23 | 23 | | |
---|
24 | 24 | | let k = 30 |
---|
25 | 25 | | |
---|
26 | | - | @Callable(l) |
---|
| 26 | + | let l = 10 |
---|
| 27 | + | |
---|
| 28 | + | let m = 5 |
---|
| 29 | + | |
---|
| 30 | + | @Callable(n) |
---|
27 | 31 | | func DepositHASH () = { |
---|
28 | | - | let m = (toBase58String(l.caller.bytes) + "_Deposit") |
---|
29 | | - | let n = { |
---|
30 | | - | let o = getInteger(this, m) |
---|
31 | | - | if ($isInstanceOf(o, "Int")) |
---|
| 32 | + | let o = (toBase58String(n.caller.bytes) + "_Deposit") |
---|
| 33 | + | let p = { |
---|
| 34 | + | let q = getInteger(this, o) |
---|
| 35 | + | if ($isInstanceOf(q, "Int")) |
---|
32 | 36 | | then { |
---|
33 | | - | let p = o |
---|
34 | | - | p |
---|
| 37 | + | let r = q |
---|
| 38 | + | r |
---|
35 | 39 | | } |
---|
36 | 40 | | else 0 |
---|
37 | 41 | | } |
---|
38 | | - | if ((n != 0)) |
---|
| 42 | + | if ((p != 0)) |
---|
39 | 43 | | then throw("You have already deposited funds, deposits can only be done once") |
---|
40 | 44 | | else { |
---|
41 | | - | let q = if ((size(l.payments) == 1)) |
---|
42 | | - | then l.payments[0] |
---|
| 45 | + | let s = if ((size(n.payments) == 1)) |
---|
| 46 | + | then n.payments[0] |
---|
43 | 47 | | else throw("Attached payment is required") |
---|
44 | | - | if (if (((f * 100000000) >= q.amount)) |
---|
| 48 | + | if (if (((f * 100000000) >= s.amount)) |
---|
45 | 49 | | then true |
---|
46 | | - | else (q.assetId != a)) |
---|
| 50 | + | else (s.assetId != a)) |
---|
47 | 51 | | then throw("Can only deposit HASH tokens, and minimum amount is 700 HASH") |
---|
48 | 52 | | else { |
---|
49 | | - | let r = (n + q.amount) |
---|
50 | | - | [IntegerEntry((toBase58String(l.caller.bytes) + "_Deposit"), r), IntegerEntry((toBase58String(l.caller.bytes) + "_DepositBlock"), height), ScriptTransfer(l.caller, (g * 100000000), b)] |
---|
| 53 | + | let t = (p + s.amount) |
---|
| 54 | + | [IntegerEntry((toBase58String(n.caller.bytes) + "_Deposit"), t), IntegerEntry((toBase58String(n.caller.bytes) + "_DepositBlock"), height), ScriptTransfer(n.caller, (g * 100000000), b)] |
---|
51 | 55 | | } |
---|
52 | 56 | | } |
---|
53 | 57 | | } |
---|
54 | 58 | | |
---|
55 | 59 | | |
---|
56 | 60 | | |
---|
57 | | - | @Callable(l) |
---|
58 | | - | func RewardReferrer (s) = { |
---|
59 | | - | let m = (toBase58String(l.caller.bytes) + "_Deposit") |
---|
60 | | - | let t = (toBase58String(l.caller.bytes) + "_TippedStatus") |
---|
61 | | - | let n = { |
---|
62 | | - | let o = getInteger(this, m) |
---|
63 | | - | if ($isInstanceOf(o, "Int")) |
---|
| 61 | + | @Callable(n) |
---|
| 62 | + | func RewardReferrer (u) = { |
---|
| 63 | + | let o = (toBase58String(n.caller.bytes) + "_Deposit") |
---|
| 64 | + | let v = (toBase58String(n.caller.bytes) + "_TippedStatus") |
---|
| 65 | + | let p = { |
---|
| 66 | + | let q = getInteger(this, o) |
---|
| 67 | + | if ($isInstanceOf(q, "Int")) |
---|
64 | 68 | | then { |
---|
65 | | - | let p = o |
---|
66 | | - | p |
---|
| 69 | + | let r = q |
---|
| 70 | + | r |
---|
67 | 71 | | } |
---|
68 | 72 | | else 0 |
---|
69 | 73 | | } |
---|
70 | | - | let u = getStringValue(this, t) |
---|
71 | | - | if ((u == "YES")) |
---|
| 74 | + | let w = getStringValue(this, v) |
---|
| 75 | + | if ((w == "YES")) |
---|
72 | 76 | | then throw("You already tipped a User, you only can tip once a user") |
---|
73 | | - | else if (((f * 100000000) > n)) |
---|
| 77 | + | else if (((f * 100000000) > p)) |
---|
74 | 78 | | then throw((("To tip your referrer you must have at least deposited: " + toString(f)) + " HASH")) |
---|
75 | | - | else [StringEntry((toBase58String(l.caller.bytes) + "_TippedStatus"), "YES"), ScriptTransfer(l.caller, (i * 100000000), b)] |
---|
| 79 | + | else [StringEntry((toBase58String(n.caller.bytes) + "_TippedStatus"), "YES"), ScriptTransfer(n.caller, (i * 100000000), b)] |
---|
76 | 80 | | } |
---|
77 | 81 | | |
---|
78 | 82 | | |
---|
79 | 83 | | |
---|
80 | | - | @Callable(l) |
---|
| 84 | + | @Callable(n) |
---|
81 | 85 | | func RequestTowing () = { |
---|
82 | | - | let m = (toBase58String(l.caller.bytes) + "_Deposit") |
---|
83 | | - | let v = (toBase58String(l.caller.bytes) + "_DepositBlock") |
---|
84 | | - | let w = (toBase58String(l.caller.bytes) + "_LastTowingBlock") |
---|
85 | | - | let n = { |
---|
86 | | - | let o = getInteger(this, m) |
---|
87 | | - | if ($isInstanceOf(o, "Int")) |
---|
| 86 | + | let o = (toBase58String(n.caller.bytes) + "_Deposit") |
---|
| 87 | + | let x = (toBase58String(n.caller.bytes) + "_DepositBlock") |
---|
| 88 | + | let y = (toBase58String(n.caller.bytes) + "_LastTowingBlock") |
---|
| 89 | + | let p = { |
---|
| 90 | + | let q = getInteger(this, o) |
---|
| 91 | + | if ($isInstanceOf(q, "Int")) |
---|
88 | 92 | | then { |
---|
89 | | - | let p = o |
---|
90 | | - | p |
---|
| 93 | + | let r = q |
---|
| 94 | + | r |
---|
91 | 95 | | } |
---|
92 | 96 | | else 0 |
---|
93 | 97 | | } |
---|
94 | | - | let x = { |
---|
95 | | - | let o = getInteger(this, v) |
---|
96 | | - | if ($isInstanceOf(o, "Int")) |
---|
| 98 | + | let z = { |
---|
| 99 | + | let q = getInteger(this, x) |
---|
| 100 | + | if ($isInstanceOf(q, "Int")) |
---|
97 | 101 | | then { |
---|
98 | | - | let p = o |
---|
99 | | - | p |
---|
| 102 | + | let r = q |
---|
| 103 | + | r |
---|
100 | 104 | | } |
---|
101 | 105 | | else 0 |
---|
102 | 106 | | } |
---|
103 | | - | let y = { |
---|
104 | | - | let o = getInteger(this, w) |
---|
105 | | - | if ($isInstanceOf(o, "Int")) |
---|
| 107 | + | let A = { |
---|
| 108 | + | let q = getInteger(this, y) |
---|
| 109 | + | if ($isInstanceOf(q, "Int")) |
---|
106 | 110 | | then { |
---|
107 | | - | let p = o |
---|
108 | | - | p |
---|
| 111 | + | let r = q |
---|
| 112 | + | r |
---|
109 | 113 | | } |
---|
110 | 114 | | else 0 |
---|
111 | 115 | | } |
---|
112 | | - | if (if (if (((f * 100000000) > ((n * (height - x)) / (1440 * 7)))) |
---|
| 116 | + | if (if (if (((f * 100000000) > ((p * (height - z)) / l))) |
---|
113 | 117 | | then true |
---|
114 | | - | else (((j * 1440) * 7) > (height - x))) |
---|
| 118 | + | else ((j * l) > (height - z))) |
---|
115 | 119 | | then true |
---|
116 | | - | else ((30 * 1440) > y)) |
---|
| 120 | + | else ((k * m) > A)) |
---|
117 | 121 | | then throw("") |
---|
118 | | - | else [IntegerEntry((toBase58String(l.caller.bytes) + "_LastTowingBlock"), height), ScriptTransfer(l.caller, (h * 100000000), c)] |
---|
| 122 | + | else [IntegerEntry((toBase58String(n.caller.bytes) + "_LastTowingBlock"), height), ScriptTransfer(n.caller, (h * 100000000), c)] |
---|
119 | 123 | | } |
---|
120 | 124 | | |
---|
121 | 125 | | |
---|