4 | | - | let a = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "55", "56"] |
---|
| 4 | + | let a = "1,2,3" |
---|
6 | | - | let b = 1 |
---|
7 | | - | |
---|
8 | | - | let c = 10 |
---|
9 | | - | |
---|
10 | | - | func d (e) = { |
---|
11 | | - | let f = getInteger(this, e) |
---|
12 | | - | if ($isInstanceOf(f, "Int")) |
---|
13 | | - | then { |
---|
14 | | - | let g = f |
---|
15 | | - | g |
---|
16 | | - | } |
---|
17 | | - | else 0 |
---|
18 | | - | } |
---|
19 | | - | |
---|
20 | | - | |
---|
21 | | - | func h (e) = { |
---|
22 | | - | let f = getString(this, e) |
---|
23 | | - | if ($isInstanceOf(f, "String")) |
---|
24 | | - | then { |
---|
25 | | - | let g = f |
---|
26 | | - | g |
---|
27 | | - | } |
---|
28 | | - | else "" |
---|
29 | | - | } |
---|
30 | | - | |
---|
31 | | - | |
---|
32 | | - | func i (j) = { |
---|
33 | | - | let f = j |
---|
34 | | - | if ($isInstanceOf(f, "ByteVector")) |
---|
35 | | - | then { |
---|
36 | | - | let g = f |
---|
37 | | - | toBase58String(g) |
---|
38 | | - | } |
---|
39 | | - | else "WAVES" |
---|
40 | | - | } |
---|
41 | | - | |
---|
42 | | - | |
---|
43 | | - | func k (l) = if ((l == "WAVES")) |
---|
44 | | - | then unit |
---|
45 | | - | else fromBase58String(l) |
---|
46 | | - | |
---|
47 | | - | |
---|
48 | | - | func m (n) = { |
---|
49 | | - | let o = d((("boosting_" + n) + "_lastHeight")) |
---|
50 | | - | let p = d((("boosting_" + n) + "_finishHeight")) |
---|
51 | | - | if (if ((o != 0)) |
---|
52 | | - | then (p > o) |
---|
53 | | - | else false) |
---|
54 | | - | then { |
---|
55 | | - | let q = d((("boosting_" + n) + "_blockAmount")) |
---|
56 | | - | let r = ((min([p, height]) - o) * q) |
---|
57 | | - | [IntegerEntry((("boosting_" + n) + "_lastHeight"), height), ScriptTransfer(addressFromStringValue(h((("boosting_" + n) + "_poolId"))), r, k(h((("boosting_" + n) + "_assetId"))))] |
---|
58 | | - | } |
---|
59 | | - | else nil |
---|
60 | | - | } |
---|
61 | | - | |
---|
62 | | - | |
---|
63 | | - | func s (n) = { |
---|
64 | | - | let o = d((("boosting_" + n) + "_lastHeight")) |
---|
65 | | - | let p = d((("boosting_" + n) + "_finishHeight")) |
---|
66 | | - | let t = parseIntValue(n) |
---|
67 | | - | if ((o >= p)) |
---|
68 | | - | then [IntegerEntry((("list ended " + toString(height)) + n), t)] |
---|
69 | | - | else nil |
---|
70 | | - | } |
---|
71 | | - | |
---|
72 | | - | |
---|
73 | | - | @Callable(u) |
---|
74 | | - | func addBoosting (v,w) = { |
---|
75 | | - | let x = u.payments[0].amount |
---|
76 | | - | let j = i(u.payments[0].assetId) |
---|
77 | | - | let y = invoke(this, "getList", nil, nil) |
---|
78 | | - | if ((y == y)) |
---|
79 | | - | then { |
---|
80 | | - | let n = "1" |
---|
81 | | - | if ((addressFromString(v) == unit)) |
---|
82 | | - | then throw("incorrect pool address") |
---|
83 | | - | else [IntegerEntry((("boosting_" + n) + "_days"), w), IntegerEntry((("boosting_" + n) + "_totalAmount"), x), IntegerEntry((("boosting_" + n) + "_dailyAmount"), (x / w)), IntegerEntry((("boosting_" + n) + "_blockAmount"), (x / ((w * b) * c))), IntegerEntry((("boosting_" + n) + "_startHeight"), height), IntegerEntry((("boosting_" + n) + "_finishHeight"), (height + ((w * b) * c))), IntegerEntry((("boosting_" + n) + "_finishTimestamp"), (lastBlock.timestamp + ((((w * b) * c) * 60) * 1000))), IntegerEntry((("boosting_" + n) + "_lastHeight"), height), StringEntry((("boosting_" + n) + "_assetId"), j), StringEntry((("boosting_" + n) + "_owner"), toString(u.caller)), StringEntry((("boosting_" + n) + "_poolId"), v), StringEntry((("pool_" + v) + "_boostings"), ((h((("pool_" + v) + "_boostings")) + n) + ","))] |
---|
84 | | - | } |
---|
85 | | - | else throw("Strict value is not equal to itself.") |
---|
| 6 | + | @Callable(b) |
---|
| 7 | + | func make () = { |
---|
| 8 | + | let c = [getStringValue("list ended boostingIds2822531")] |
---|
| 9 | + | let d = c[0] |
---|
| 10 | + | [StringEntry("first of list", d)] |
---|
103 | | - | |
---|
104 | | - | let D = { |
---|
105 | | - | let E = a |
---|
106 | | - | let F = size(E) |
---|
107 | | - | let G = 0 |
---|
108 | | - | func H (I,J) = if ((J >= F)) |
---|
109 | | - | then I |
---|
110 | | - | else z(I, E[J]) |
---|
111 | | - | |
---|
112 | | - | func K (I,J) = if ((J >= F)) |
---|
113 | | - | then I |
---|
114 | | - | else throw("List size exceeds 100") |
---|
115 | | - | |
---|
116 | | - | K(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(G, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) |
---|
117 | | - | } |
---|
118 | | - | if ((D == D)) |
---|
119 | | - | then nil |
---|
120 | | - | else throw("Strict value is not equal to itself.") |
---|
121 | | - | } |
---|
122 | | - | |
---|
123 | | - | |
---|
124 | | - | |
---|
125 | | - | @Callable(u) |
---|
126 | | - | func getEndedList (n) = s(n) |
---|
127 | | - | |
---|
128 | | - | |
---|
129 | | - | |
---|
130 | | - | @Callable(u) |
---|
131 | | - | func getList () = { |
---|
132 | | - | func z (A,B) = { |
---|
133 | | - | let C = invoke(this, "getEndedList", [B], nil) |
---|
134 | | - | if ((C == C)) |
---|
135 | | - | then C |
---|
136 | | - | else throw("Strict value is not equal to itself.") |
---|
137 | | - | } |
---|
138 | | - | |
---|
139 | | - | let L = { |
---|
140 | | - | let E = a |
---|
141 | | - | let F = size(E) |
---|
142 | | - | let G = 0 |
---|
143 | | - | func H (I,J) = if ((J >= F)) |
---|
144 | | - | then I |
---|
145 | | - | else z(I, E[J]) |
---|
146 | | - | |
---|
147 | | - | func K (I,J) = if ((J >= F)) |
---|
148 | | - | then I |
---|
149 | | - | else throw("List size exceeds 100") |
---|
150 | | - | |
---|
151 | | - | K(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(G, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) |
---|
152 | | - | } |
---|
153 | | - | if ((L == L)) |
---|
154 | | - | then nil |
---|
155 | | - | else throw("Strict value is not equal to itself.") |
---|
| 33 | + | let d = h[0] |
---|
| 34 | + | nil |
---|