tx · 9EiPpCbJrmfoBsvSPeNE9LiBUTc12cSvpP197n2DDXWh
3N4QWZXfZqNf284CJVbtxzCerqARoALxJEy: -0.03700000 Waves
2023.03.04 14:23 [2475242] smart account 3N4QWZXfZqNf284CJVbtxzCerqARoALxJEy > SELF 0.00000000 Waves
{
"type": 13,
"id": "9EiPpCbJrmfoBsvSPeNE9LiBUTc12cSvpP197n2DDXWh",
"fee": 3700000,
"feeAssetId": null,
"timestamp": 1677929002834,
"version": 2,
"chainId": 84,
"sender": "3N4QWZXfZqNf284CJVbtxzCerqARoALxJEy",
"senderPublicKey": "GzEvTfwa3251fRwyTL99QzUmkDGBdn4cNr2mR6XQ1UmR",
"proofs": [
"dZ7ZH8zRdNUyWj8m6wggRHhmRSZEgv1Gob2CsPCphzPQ1p6hn71CijEB8dLb1fFrPz1fX5PfWgNBGQX8mAM5nrU"
],
"script": "base64:BgIeCAISAwoBCBIAEgMKAQESABIAEgASAwoBCBIDCgEINQANa190b3RhbFN1cHBseQINa190b3RhbFN1cHBseQAPa19yZXdhcmRCYWxhbmNlAg9rX3Jld2FyZEJhbGFuY2UAEGtfbGFzdFVwZGF0ZVRpbWUCEGtfbGFzdFVwZGF0ZVRpbWUAFmtfcmV3YXJkUGVyVG9rZW5TdG9yZWQCFmtfcmV3YXJkUGVyVG9rZW5TdG9yZWQADGtfcmV3YXJkUmF0ZQIMa19yZXdhcmRSYXRlAA5rX3BlcmlvZEZpbmlzaAIOa19wZXJpb2RGaW5pc2gACWtfYmFsYW5jZQIJa19iYWxhbmNlABRrX3VzZXJSZXdhcmRQZXJUb2tlbgIUa191c2VyUmV3YXJkUGVyVG9rZW4ADGtfdXNlclJld2FyZAIMa191c2VyUmV3YXJkAA1rX2luaXRpYWxpemVkAg1rX2luaXRpYWxpemVkABRrX2Nvb3JkaW5hdG9yQWRkcmVzcwIUa19jb29yZGluYXRvckFkZHJlc3MAEmtfZ292ZXJuYW5jZV9hc3NldAILa19nb3ZfYXNzZXQADmtfcmV3YX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GVyUHVibGljS2V5ImUi1Q==",
"height": 2475242,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: J6qmvhu69AkJBPVTCPWy2MkQKD8MZA5ETQhGdBtFJtSy
Next: none
Diff:
Old | New | | Differences |
---|
25 | 25 | | |
---|
26 | 26 | | let l = "k_gov_asset" |
---|
27 | 27 | | |
---|
28 | | - | let m = "k_quote_asset" |
---|
| 28 | + | let m = "k_reward_asset" |
---|
29 | 29 | | |
---|
30 | | - | let n = "k_admin_public_key" |
---|
| 30 | + | let n = "k_admin_address" |
---|
31 | 31 | | |
---|
32 | 32 | | let o = "k_manager_address" |
---|
33 | 33 | | |
---|
34 | 34 | | func p () = valueOrErrorMessage(addressFromString(getStringValue(this, k)), "Coordinator not set") |
---|
35 | 35 | | |
---|
36 | 36 | | |
---|
37 | | - | func q () = fromBase58String(getStringValue(p(), n)) |
---|
| 37 | + | func q () = fromBase58String(getStringValue(p(), l)) |
---|
38 | 38 | | |
---|
39 | 39 | | |
---|
40 | | - | func r () = fromBase58String(getStringValue(p(), l)) |
---|
| 40 | + | func r () = fromBase58String(getStringValue(p(), m)) |
---|
41 | 41 | | |
---|
42 | 42 | | |
---|
43 | | - | func s () = fromBase58String(getStringValue(p(), m)) |
---|
| 43 | + | func s () = valueOrErrorMessage(addressFromString(getStringValue(p(), o)), "Manager not set") |
---|
44 | 44 | | |
---|
45 | 45 | | |
---|
46 | | - | func t () = valueOrErrorMessage(addressFromString(getStringValue(p(), o)), "Manager not set") |
---|
| 46 | + | let t = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10)) |
---|
| 47 | + | |
---|
| 48 | + | let u = ((60 * 60) * 24) |
---|
| 49 | + | |
---|
| 50 | + | let v = "" |
---|
| 51 | + | |
---|
| 52 | + | let w = 0 |
---|
| 53 | + | |
---|
| 54 | + | func x (y) = (y / 100) |
---|
47 | 55 | | |
---|
48 | 56 | | |
---|
49 | | - | let u = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10)) |
---|
50 | | - | |
---|
51 | | - | let v = ((60 * 60) * 24) |
---|
52 | | - | |
---|
53 | | - | let w = "" |
---|
54 | | - | |
---|
55 | | - | let x = 0 |
---|
56 | | - | |
---|
57 | | - | func y (z) = (z / 100) |
---|
| 57 | + | func z (y) = (y * 100) |
---|
58 | 58 | | |
---|
59 | 59 | | |
---|
60 | | - | func A (z) = (z * 100) |
---|
| 60 | + | func A (B,C) = fraction(B, t, C, HALFEVEN) |
---|
61 | 61 | | |
---|
62 | 62 | | |
---|
63 | | - | func B (C,D) = fraction(C, u, D, HALFEVEN) |
---|
| 63 | + | func D (B,C) = fraction(B, C, t, HALFEVEN) |
---|
64 | 64 | | |
---|
65 | 65 | | |
---|
66 | | - | func E (C,D) = fraction(C, D, u, HALFEVEN) |
---|
| 66 | + | func E (B) = if ((B > 0)) |
---|
| 67 | + | then B |
---|
| 68 | + | else -(B) |
---|
67 | 69 | | |
---|
68 | 70 | | |
---|
69 | | - | func F (C) = if ((C > 0)) |
---|
| 71 | + | func F (B,C) = if ((B > C)) |
---|
70 | 72 | | then C |
---|
71 | | - | else -(C) |
---|
| 73 | + | else B |
---|
72 | 74 | | |
---|
73 | 75 | | |
---|
74 | | - | func G (C,D) = if ((C > D)) |
---|
75 | | - | then D |
---|
76 | | - | else C |
---|
| 76 | + | func G (H,I) = ((H + "_") + I) |
---|
77 | 77 | | |
---|
78 | 78 | | |
---|
79 | | - | func H (I,J) = ((I + "_") + J) |
---|
| 79 | + | func J (K) = valueOrErrorMessage(getInteger(this, K), ("no value for " + K)) |
---|
80 | 80 | | |
---|
81 | 81 | | |
---|
82 | | - | func K (L) = valueOrErrorMessage(getInteger(this, L), ("no value for " + L)) |
---|
| 82 | + | func L (K) = valueOrElse(getInteger(this, K), 0) |
---|
83 | 83 | | |
---|
84 | 84 | | |
---|
85 | | - | func M (L) = valueOrElse(getInteger(this, L), 0) |
---|
| 85 | + | func M () = L(a) |
---|
86 | 86 | | |
---|
87 | 87 | | |
---|
88 | | - | func N () = M(a) |
---|
| 88 | + | func N () = L(d) |
---|
89 | 89 | | |
---|
90 | 90 | | |
---|
91 | | - | func O () = M(d) |
---|
| 91 | + | func O () = L(c) |
---|
92 | 92 | | |
---|
93 | 93 | | |
---|
94 | | - | func P () = M(c) |
---|
| 94 | + | func P () = L(e) |
---|
95 | 95 | | |
---|
96 | 96 | | |
---|
97 | | - | func Q () = M(e) |
---|
| 97 | + | func Q () = L(f) |
---|
98 | 98 | | |
---|
99 | 99 | | |
---|
100 | | - | func R () = M(f) |
---|
| 100 | + | func R () = L(b) |
---|
101 | 101 | | |
---|
102 | 102 | | |
---|
103 | | - | func S () = M(b) |
---|
| 103 | + | func S (T) = L(G(i, T)) |
---|
104 | 104 | | |
---|
105 | 105 | | |
---|
106 | | - | func T (U) = M(H(i, U)) |
---|
| 106 | + | func U (T) = L(G(h, T)) |
---|
107 | 107 | | |
---|
108 | 108 | | |
---|
109 | | - | func V (U) = M(H(h, U)) |
---|
| 109 | + | func V (T) = L(G(g, T)) |
---|
110 | 110 | | |
---|
111 | 111 | | |
---|
112 | | - | func W (U) = M(H(g, U)) |
---|
| 112 | + | func W () = valueOrElse(getBoolean(this, j), false) |
---|
113 | 113 | | |
---|
114 | 114 | | |
---|
115 | | - | func X () = valueOrElse(getBoolean(this, j), false) |
---|
| 115 | + | func X (Y) = [IntegerEntry(b, (R() + Y))] |
---|
116 | 116 | | |
---|
117 | 117 | | |
---|
118 | | - | func Y (Z) = [IntegerEntry(b, (S() + Z))] |
---|
| 118 | + | func Z (aa) = [IntegerEntry(e, aa)] |
---|
119 | 119 | | |
---|
120 | 120 | | |
---|
121 | | - | func aa (ab) = [IntegerEntry(e, ab)] |
---|
| 121 | + | func ab (ac,ad) = [IntegerEntry(c, ac), IntegerEntry(f, ad)] |
---|
122 | 122 | | |
---|
123 | 123 | | |
---|
124 | | - | func ac (ad,ae) = [IntegerEntry(c, ad), IntegerEntry(f, ae)] |
---|
| 124 | + | func ae (af) = [IntegerEntry(d, af)] |
---|
125 | 125 | | |
---|
126 | 126 | | |
---|
127 | | - | func af (ag) = [IntegerEntry(d, ag)] |
---|
| 127 | + | func ag (T,ah,ai) = [IntegerEntry(G(i, T), ah), IntegerEntry(G(h, T), ai)] |
---|
128 | 128 | | |
---|
129 | 129 | | |
---|
130 | | - | func ah (U,ai,aj) = [IntegerEntry(H(i, U), ai), IntegerEntry(H(h, U), aj)] |
---|
| 130 | + | func aj (T,Y) = [IntegerEntry(G(g, T), (V(T) + Y)), IntegerEntry(a, (M() + Y))] |
---|
131 | 131 | | |
---|
132 | 132 | | |
---|
133 | | - | func ak (U,Z) = [IntegerEntry(H(g, U), (W(U) + Z)), IntegerEntry(a, (N() + Z))] |
---|
| 133 | + | func ak () = (lastBlock.timestamp / 1000) |
---|
134 | 134 | | |
---|
135 | 135 | | |
---|
136 | | - | func al () = (lastBlock.timestamp / 1000) |
---|
| 136 | + | func al () = F(ak(), Q()) |
---|
137 | 137 | | |
---|
138 | 138 | | |
---|
139 | | - | func am () = G(al(), R()) |
---|
140 | | - | |
---|
141 | | - | |
---|
142 | | - | func an (ao) = if (((N() + ao) == 0)) |
---|
143 | | - | then O() |
---|
| 139 | + | func am (an) = if (((M() + an) == 0)) |
---|
| 140 | + | then N() |
---|
144 | 141 | | else { |
---|
145 | | - | let ap = (am() - P()) |
---|
146 | | - | let aq = if ((0 > ap)) |
---|
| 142 | + | let ao = (al() - O()) |
---|
| 143 | + | let ap = if ((0 > ao)) |
---|
147 | 144 | | then 0 |
---|
148 | | - | else ap |
---|
149 | | - | let ar = B((Q() * aq), (N() + ao)) |
---|
150 | | - | (O() + ar) |
---|
| 145 | + | else ao |
---|
| 146 | + | let aq = A((P() * ap), (M() + an)) |
---|
| 147 | + | (N() + aq) |
---|
151 | 148 | | } |
---|
152 | 149 | | |
---|
153 | 150 | | |
---|
154 | | - | func as (U,ao) = { |
---|
155 | | - | let at = (an(ao) - V(U)) |
---|
156 | | - | (E((W(U) + ao), at) + T(U)) |
---|
| 151 | + | func ar (T,an) = { |
---|
| 152 | + | let as = (am(an) - U(T)) |
---|
| 153 | + | (D((V(T) + an), as) + S(T)) |
---|
157 | 154 | | } |
---|
158 | 155 | | |
---|
159 | 156 | | |
---|
160 | | - | func au (U,ao) = { |
---|
161 | | - | let av = an(ao) |
---|
162 | | - | let aw = al() |
---|
163 | | - | let ax = if ((U != "")) |
---|
164 | | - | then $Tuple2(as(U, ao), av) |
---|
| 157 | + | func at (T,an) = { |
---|
| 158 | + | let au = am(an) |
---|
| 159 | + | let av = ak() |
---|
| 160 | + | let aw = if ((T != "")) |
---|
| 161 | + | then $Tuple2(ar(T, an), au) |
---|
165 | 162 | | else $Tuple2(0, 0) |
---|
166 | | - | let ay = ax._1 |
---|
167 | | - | let az = ax._2 |
---|
168 | | - | $Tuple4(av, aw, ay, az) |
---|
| 163 | + | let ax = aw._1 |
---|
| 164 | + | let ay = aw._2 |
---|
| 165 | + | $Tuple4(au, av, ax, ay) |
---|
169 | 166 | | } |
---|
170 | 167 | | |
---|
171 | 168 | | |
---|
172 | | - | @Callable(aA) |
---|
173 | | - | func initialize (aB) = if (X()) |
---|
174 | | - | then throw("Already initialized") |
---|
175 | | - | else [StringEntry(k, aB), BooleanEntry(j, true)] |
---|
| 169 | + | @Callable(az) |
---|
| 170 | + | func initialize (aA) = if (if (W()) |
---|
| 171 | + | then true |
---|
| 172 | + | else (az.caller != this)) |
---|
| 173 | + | then throw("Unable to initialize") |
---|
| 174 | + | else [StringEntry(k, toString(addressFromStringValue(aA))), BooleanEntry(j, true)] |
---|
176 | 175 | | |
---|
177 | 176 | | |
---|
178 | 177 | | |
---|
179 | | - | @Callable(aA) |
---|
| 178 | + | @Callable(az) |
---|
180 | 179 | | func stake () = { |
---|
181 | | - | let U = toString(aA.caller) |
---|
182 | | - | let z = aA.payments[0].amount |
---|
183 | | - | if (if ((aA.payments[0].assetId != r())) |
---|
| 180 | + | let T = toString(az.caller) |
---|
| 181 | + | let y = az.payments[0].amount |
---|
| 182 | + | if (if ((az.payments[0].assetId != q())) |
---|
184 | 183 | | then true |
---|
185 | | - | else !(X())) |
---|
| 184 | + | else !(W())) |
---|
186 | 185 | | then throw("Invalid call to stake") |
---|
187 | 186 | | else { |
---|
188 | | - | let aC = au(U, 0) |
---|
189 | | - | let av = aC._1 |
---|
190 | | - | let aw = aC._2 |
---|
191 | | - | let ay = aC._3 |
---|
192 | | - | let az = aC._4 |
---|
193 | | - | (((ah(U, ay, az) ++ af(av)) ++ ac(aw, R())) ++ ak(U, z)) |
---|
| 187 | + | let aB = at(T, 0) |
---|
| 188 | + | let au = aB._1 |
---|
| 189 | + | let av = aB._2 |
---|
| 190 | + | let ax = aB._3 |
---|
| 191 | + | let ay = aB._4 |
---|
| 192 | + | (((ag(T, ax, ay) ++ ae(au)) ++ ab(av, Q())) ++ aj(T, y)) |
---|
194 | 193 | | } |
---|
195 | 194 | | } |
---|
196 | 195 | | |
---|
197 | 196 | | |
---|
198 | 197 | | |
---|
199 | | - | @Callable(aA) |
---|
200 | | - | func unStake (z) = { |
---|
201 | | - | let U = toString(aA.caller) |
---|
202 | | - | if (if (if ((z > W(U))) |
---|
| 198 | + | @Callable(az) |
---|
| 199 | + | func unStake (y) = { |
---|
| 200 | + | let T = toString(az.caller) |
---|
| 201 | + | if (if (if ((y > V(T))) |
---|
203 | 202 | | then true |
---|
204 | | - | else (aA.payments != nil)) |
---|
| 203 | + | else (az.payments != nil)) |
---|
205 | 204 | | then true |
---|
206 | | - | else !(X())) |
---|
| 205 | + | else !(W())) |
---|
207 | 206 | | then throw("Invalid unStake parameters") |
---|
208 | 207 | | else { |
---|
209 | | - | let aD = au(U, 0) |
---|
210 | | - | let av = aD._1 |
---|
211 | | - | let aw = aD._2 |
---|
212 | | - | let ay = aD._3 |
---|
213 | | - | let az = aD._4 |
---|
214 | | - | ((((ah(U, ay, az) ++ af(av)) ++ ac(aw, R())) ++ ak(U, -(z))) ++ [ScriptTransfer(aA.caller, z, r())]) |
---|
| 208 | + | let aC = at(T, 0) |
---|
| 209 | + | let au = aC._1 |
---|
| 210 | + | let av = aC._2 |
---|
| 211 | + | let ax = aC._3 |
---|
| 212 | + | let ay = aC._4 |
---|
| 213 | + | ((((ag(T, ax, ay) ++ ae(au)) ++ ab(av, Q())) ++ aj(T, -(y))) ++ [ScriptTransfer(az.caller, y, q())]) |
---|
215 | 214 | | } |
---|
216 | 215 | | } |
---|
217 | 216 | | |
---|
218 | 217 | | |
---|
219 | 218 | | |
---|
220 | | - | @Callable(aA) |
---|
| 219 | + | @Callable(az) |
---|
221 | 220 | | func withdrawRewards () = { |
---|
222 | | - | let U = toString(aA.caller) |
---|
223 | | - | let aE = au(U, 0) |
---|
224 | | - | let av = aE._1 |
---|
225 | | - | let aw = aE._2 |
---|
226 | | - | let ay = aE._3 |
---|
227 | | - | let az = aE._4 |
---|
228 | | - | if (if ((0 >= ay)) |
---|
| 221 | + | let T = toString(az.caller) |
---|
| 222 | + | let aD = at(T, 0) |
---|
| 223 | + | let au = aD._1 |
---|
| 224 | + | let av = aD._2 |
---|
| 225 | + | let ax = aD._3 |
---|
| 226 | + | let ay = aD._4 |
---|
| 227 | + | if (if ((0 >= ax)) |
---|
229 | 228 | | then true |
---|
230 | | - | else !(X())) |
---|
| 229 | + | else !(W())) |
---|
231 | 230 | | then throw("No reward") |
---|
232 | 231 | | else { |
---|
233 | | - | let aF = invoke(t(), "withdraw", [toBase58String(s()), y(ay)], nil) |
---|
234 | | - | if ((aF == aF)) |
---|
235 | | - | then ((((ah(U, 0, az) ++ af(av)) ++ ac(aw, R())) ++ Y(-(ay))) ++ [ScriptTransfer(aA.caller, y(ay), s())]) |
---|
| 232 | + | let aE = invoke(s(), "withdraw", [toBase58String(r()), x(ax)], nil) |
---|
| 233 | + | if ((aE == aE)) |
---|
| 234 | + | then ((((ag(T, 0, ay) ++ ae(au)) ++ ab(av, Q())) ++ X(-(ax))) ++ [ScriptTransfer(az.caller, x(ax), r())]) |
---|
236 | 235 | | else throw("Strict value is not equal to itself.") |
---|
237 | 236 | | } |
---|
238 | 237 | | } |
---|
239 | 238 | | |
---|
240 | 239 | | |
---|
241 | 240 | | |
---|
242 | | - | @Callable(aA) |
---|
243 | | - | func addRewards () = if (if ((aA.payments[0].assetId != s())) |
---|
| 241 | + | @Callable(az) |
---|
| 242 | + | func addRewards () = if (if ((az.payments[0].assetId != r())) |
---|
244 | 243 | | then true |
---|
245 | | - | else !(X())) |
---|
| 244 | + | else !(W())) |
---|
246 | 245 | | then throw("Invalid addRewards params") |
---|
247 | 246 | | else { |
---|
248 | | - | let ai = A(aA.payments[0].amount) |
---|
249 | | - | let aG = invoke(t(), "deposit", nil, [AttachedPayment(s(), y(ai))]) |
---|
250 | | - | if ((aG == aG)) |
---|
| 247 | + | let ah = z(az.payments[0].amount) |
---|
| 248 | + | let aF = invoke(s(), "deposit", nil, [AttachedPayment(r(), x(ah))]) |
---|
| 249 | + | if ((aF == aF)) |
---|
251 | 250 | | then { |
---|
252 | | - | let av = au(w, x)._1 |
---|
253 | | - | let aH = al() |
---|
254 | | - | let aI = if ((aH > R())) |
---|
255 | | - | then (ai / v) |
---|
| 251 | + | let au = at(v, w)._1 |
---|
| 252 | + | let aG = ak() |
---|
| 253 | + | let aH = if ((aG > Q())) |
---|
| 254 | + | then (ah / u) |
---|
256 | 255 | | else { |
---|
257 | | - | let aJ = (R() - aH) |
---|
258 | | - | let aK = (Q() * aJ) |
---|
259 | | - | ((ai + aK) / v) |
---|
| 256 | + | let aI = (Q() - aG) |
---|
| 257 | + | let aJ = (P() * aI) |
---|
| 258 | + | ((ah + aJ) / u) |
---|
260 | 259 | | } |
---|
261 | | - | (((aa(aI) ++ af(av)) ++ Y(ai)) ++ ac(aH, (aH + v))) |
---|
| 260 | + | (((Z(aH) ++ ae(au)) ++ X(ah)) ++ ab(aG, (aG + u))) |
---|
262 | 261 | | } |
---|
263 | 262 | | else throw("Strict value is not equal to itself.") |
---|
264 | 263 | | } |
---|
265 | 264 | | |
---|
266 | 265 | | |
---|
267 | 266 | | |
---|
268 | | - | @Callable(aA) |
---|
| 267 | + | @Callable(az) |
---|
269 | 268 | | func ackRewards () = { |
---|
270 | | - | let at = A(assetBalance(this, s())) |
---|
271 | | - | if (((1 * u) > at)) |
---|
| 269 | + | let as = z(assetBalance(this, r())) |
---|
| 270 | + | if (((1 * t) > as)) |
---|
272 | 271 | | then nil |
---|
273 | 272 | | else { |
---|
274 | | - | let aG = invoke(t(), "deposit", nil, [AttachedPayment(s(), y(at))]) |
---|
275 | | - | if ((aG == aG)) |
---|
| 273 | + | let aF = invoke(s(), "deposit", nil, [AttachedPayment(r(), x(as))]) |
---|
| 274 | + | if ((aF == aF)) |
---|
276 | 275 | | then { |
---|
277 | | - | let ai = at |
---|
278 | | - | let av = au(w, x)._1 |
---|
279 | | - | let aH = al() |
---|
280 | | - | let aI = if ((aH > R())) |
---|
281 | | - | then (ai / v) |
---|
| 276 | + | let ah = as |
---|
| 277 | + | let au = at(v, w)._1 |
---|
| 278 | + | let aG = ak() |
---|
| 279 | + | let aH = if ((aG > Q())) |
---|
| 280 | + | then (ah / u) |
---|
282 | 281 | | else { |
---|
283 | | - | let aJ = (R() - aH) |
---|
284 | | - | let aK = (Q() * aJ) |
---|
285 | | - | ((ai + aK) / v) |
---|
| 282 | + | let aI = (Q() - aG) |
---|
| 283 | + | let aJ = (P() * aI) |
---|
| 284 | + | ((ah + aJ) / u) |
---|
286 | 285 | | } |
---|
287 | | - | (((aa(aI) ++ af(av)) ++ Y(ai)) ++ ac(aH, (aH + v))) |
---|
| 286 | + | (((Z(aH) ++ ae(au)) ++ X(ah)) ++ ab(aG, (aG + u))) |
---|
288 | 287 | | } |
---|
289 | 288 | | else throw("Strict value is not equal to itself.") |
---|
290 | 289 | | } |
---|
|
292 | 291 | | |
---|
293 | 292 | | |
---|
294 | 293 | | |
---|
295 | | - | @Callable(aA) |
---|
296 | | - | func view_reward (U) = { |
---|
297 | | - | let ay = au(U, 0)._3 |
---|
298 | | - | throw(toString(y(ay))) |
---|
| 294 | + | @Callable(az) |
---|
| 295 | + | func view_reward (T) = { |
---|
| 296 | + | let ax = at(T, 0)._3 |
---|
| 297 | + | throw(toString(x(ax))) |
---|
299 | 298 | | } |
---|
300 | 299 | | |
---|
301 | 300 | | |
---|
302 | 301 | | |
---|
303 | | - | @Callable(aA) |
---|
304 | | - | func computeReward (U) = { |
---|
305 | | - | let ay = au(U, 0)._3 |
---|
306 | | - | $Tuple2(nil, ay) |
---|
| 302 | + | @Callable(az) |
---|
| 303 | + | func computeReward (T) = { |
---|
| 304 | + | let ax = at(T, 0)._3 |
---|
| 305 | + | $Tuple2(nil, ax) |
---|
307 | 306 | | } |
---|
308 | 307 | | |
---|
309 | 308 | | |
---|
310 | | - | |
---|
311 | | - | @Callable(aA) |
---|
312 | | - | func migrateLiquidity () = { |
---|
313 | | - | let aL = y(S()) |
---|
314 | | - | let aG = invoke(t(), "deposit", nil, [AttachedPayment(s(), aL)]) |
---|
315 | | - | if ((aG == aG)) |
---|
316 | | - | then nil |
---|
317 | | - | else throw("Strict value is not equal to itself.") |
---|
| 309 | + | @Verifier(aK) |
---|
| 310 | + | func aL () = { |
---|
| 311 | + | let aM = getString(this, k) |
---|
| 312 | + | if (isDefined(aM)) |
---|
| 313 | + | then { |
---|
| 314 | + | let aN = getString(addressFromStringValue(value(aM)), n) |
---|
| 315 | + | if (isDefined(aN)) |
---|
| 316 | + | then valueOrElse(getBoolean(addressFromStringValue(value(aN)), ((("status_" + toString(this)) + "_") + toBase58String(aK.id))), false) |
---|
| 317 | + | else throw("unable to verify: admin not set in coordinator") |
---|
| 318 | + | } |
---|
| 319 | + | else sigVerify(aK.bodyBytes, aK.proofs[0], aK.senderPublicKey) |
---|
318 | 320 | | } |
---|
319 | | - | |
---|
320 | | - | |
---|
321 | | - | @Verifier(aM) |
---|
322 | | - | func aN () = sigVerify(aM.bodyBytes, aM.proofs[0], q()) |
---|
323 | 321 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = "k_totalSupply" |
---|
5 | 5 | | |
---|
6 | 6 | | let b = "k_rewardBalance" |
---|
7 | 7 | | |
---|
8 | 8 | | let c = "k_lastUpdateTime" |
---|
9 | 9 | | |
---|
10 | 10 | | let d = "k_rewardPerTokenStored" |
---|
11 | 11 | | |
---|
12 | 12 | | let e = "k_rewardRate" |
---|
13 | 13 | | |
---|
14 | 14 | | let f = "k_periodFinish" |
---|
15 | 15 | | |
---|
16 | 16 | | let g = "k_balance" |
---|
17 | 17 | | |
---|
18 | 18 | | let h = "k_userRewardPerToken" |
---|
19 | 19 | | |
---|
20 | 20 | | let i = "k_userReward" |
---|
21 | 21 | | |
---|
22 | 22 | | let j = "k_initialized" |
---|
23 | 23 | | |
---|
24 | 24 | | let k = "k_coordinatorAddress" |
---|
25 | 25 | | |
---|
26 | 26 | | let l = "k_gov_asset" |
---|
27 | 27 | | |
---|
28 | | - | let m = "k_quote_asset" |
---|
| 28 | + | let m = "k_reward_asset" |
---|
29 | 29 | | |
---|
30 | | - | let n = "k_admin_public_key" |
---|
| 30 | + | let n = "k_admin_address" |
---|
31 | 31 | | |
---|
32 | 32 | | let o = "k_manager_address" |
---|
33 | 33 | | |
---|
34 | 34 | | func p () = valueOrErrorMessage(addressFromString(getStringValue(this, k)), "Coordinator not set") |
---|
35 | 35 | | |
---|
36 | 36 | | |
---|
37 | | - | func q () = fromBase58String(getStringValue(p(), n)) |
---|
| 37 | + | func q () = fromBase58String(getStringValue(p(), l)) |
---|
38 | 38 | | |
---|
39 | 39 | | |
---|
40 | | - | func r () = fromBase58String(getStringValue(p(), l)) |
---|
| 40 | + | func r () = fromBase58String(getStringValue(p(), m)) |
---|
41 | 41 | | |
---|
42 | 42 | | |
---|
43 | | - | func s () = fromBase58String(getStringValue(p(), m)) |
---|
| 43 | + | func s () = valueOrErrorMessage(addressFromString(getStringValue(p(), o)), "Manager not set") |
---|
44 | 44 | | |
---|
45 | 45 | | |
---|
46 | | - | func t () = valueOrErrorMessage(addressFromString(getStringValue(p(), o)), "Manager not set") |
---|
| 46 | + | let t = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10)) |
---|
| 47 | + | |
---|
| 48 | + | let u = ((60 * 60) * 24) |
---|
| 49 | + | |
---|
| 50 | + | let v = "" |
---|
| 51 | + | |
---|
| 52 | + | let w = 0 |
---|
| 53 | + | |
---|
| 54 | + | func x (y) = (y / 100) |
---|
47 | 55 | | |
---|
48 | 56 | | |
---|
49 | | - | let u = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10)) |
---|
50 | | - | |
---|
51 | | - | let v = ((60 * 60) * 24) |
---|
52 | | - | |
---|
53 | | - | let w = "" |
---|
54 | | - | |
---|
55 | | - | let x = 0 |
---|
56 | | - | |
---|
57 | | - | func y (z) = (z / 100) |
---|
| 57 | + | func z (y) = (y * 100) |
---|
58 | 58 | | |
---|
59 | 59 | | |
---|
60 | | - | func A (z) = (z * 100) |
---|
| 60 | + | func A (B,C) = fraction(B, t, C, HALFEVEN) |
---|
61 | 61 | | |
---|
62 | 62 | | |
---|
63 | | - | func B (C,D) = fraction(C, u, D, HALFEVEN) |
---|
| 63 | + | func D (B,C) = fraction(B, C, t, HALFEVEN) |
---|
64 | 64 | | |
---|
65 | 65 | | |
---|
66 | | - | func E (C,D) = fraction(C, D, u, HALFEVEN) |
---|
| 66 | + | func E (B) = if ((B > 0)) |
---|
| 67 | + | then B |
---|
| 68 | + | else -(B) |
---|
67 | 69 | | |
---|
68 | 70 | | |
---|
69 | | - | func F (C) = if ((C > 0)) |
---|
| 71 | + | func F (B,C) = if ((B > C)) |
---|
70 | 72 | | then C |
---|
71 | | - | else -(C) |
---|
| 73 | + | else B |
---|
72 | 74 | | |
---|
73 | 75 | | |
---|
74 | | - | func G (C,D) = if ((C > D)) |
---|
75 | | - | then D |
---|
76 | | - | else C |
---|
| 76 | + | func G (H,I) = ((H + "_") + I) |
---|
77 | 77 | | |
---|
78 | 78 | | |
---|
79 | | - | func H (I,J) = ((I + "_") + J) |
---|
| 79 | + | func J (K) = valueOrErrorMessage(getInteger(this, K), ("no value for " + K)) |
---|
80 | 80 | | |
---|
81 | 81 | | |
---|
82 | | - | func K (L) = valueOrErrorMessage(getInteger(this, L), ("no value for " + L)) |
---|
| 82 | + | func L (K) = valueOrElse(getInteger(this, K), 0) |
---|
83 | 83 | | |
---|
84 | 84 | | |
---|
85 | | - | func M (L) = valueOrElse(getInteger(this, L), 0) |
---|
| 85 | + | func M () = L(a) |
---|
86 | 86 | | |
---|
87 | 87 | | |
---|
88 | | - | func N () = M(a) |
---|
| 88 | + | func N () = L(d) |
---|
89 | 89 | | |
---|
90 | 90 | | |
---|
91 | | - | func O () = M(d) |
---|
| 91 | + | func O () = L(c) |
---|
92 | 92 | | |
---|
93 | 93 | | |
---|
94 | | - | func P () = M(c) |
---|
| 94 | + | func P () = L(e) |
---|
95 | 95 | | |
---|
96 | 96 | | |
---|
97 | | - | func Q () = M(e) |
---|
| 97 | + | func Q () = L(f) |
---|
98 | 98 | | |
---|
99 | 99 | | |
---|
100 | | - | func R () = M(f) |
---|
| 100 | + | func R () = L(b) |
---|
101 | 101 | | |
---|
102 | 102 | | |
---|
103 | | - | func S () = M(b) |
---|
| 103 | + | func S (T) = L(G(i, T)) |
---|
104 | 104 | | |
---|
105 | 105 | | |
---|
106 | | - | func T (U) = M(H(i, U)) |
---|
| 106 | + | func U (T) = L(G(h, T)) |
---|
107 | 107 | | |
---|
108 | 108 | | |
---|
109 | | - | func V (U) = M(H(h, U)) |
---|
| 109 | + | func V (T) = L(G(g, T)) |
---|
110 | 110 | | |
---|
111 | 111 | | |
---|
112 | | - | func W (U) = M(H(g, U)) |
---|
| 112 | + | func W () = valueOrElse(getBoolean(this, j), false) |
---|
113 | 113 | | |
---|
114 | 114 | | |
---|
115 | | - | func X () = valueOrElse(getBoolean(this, j), false) |
---|
| 115 | + | func X (Y) = [IntegerEntry(b, (R() + Y))] |
---|
116 | 116 | | |
---|
117 | 117 | | |
---|
118 | | - | func Y (Z) = [IntegerEntry(b, (S() + Z))] |
---|
| 118 | + | func Z (aa) = [IntegerEntry(e, aa)] |
---|
119 | 119 | | |
---|
120 | 120 | | |
---|
121 | | - | func aa (ab) = [IntegerEntry(e, ab)] |
---|
| 121 | + | func ab (ac,ad) = [IntegerEntry(c, ac), IntegerEntry(f, ad)] |
---|
122 | 122 | | |
---|
123 | 123 | | |
---|
124 | | - | func ac (ad,ae) = [IntegerEntry(c, ad), IntegerEntry(f, ae)] |
---|
| 124 | + | func ae (af) = [IntegerEntry(d, af)] |
---|
125 | 125 | | |
---|
126 | 126 | | |
---|
127 | | - | func af (ag) = [IntegerEntry(d, ag)] |
---|
| 127 | + | func ag (T,ah,ai) = [IntegerEntry(G(i, T), ah), IntegerEntry(G(h, T), ai)] |
---|
128 | 128 | | |
---|
129 | 129 | | |
---|
130 | | - | func ah (U,ai,aj) = [IntegerEntry(H(i, U), ai), IntegerEntry(H(h, U), aj)] |
---|
| 130 | + | func aj (T,Y) = [IntegerEntry(G(g, T), (V(T) + Y)), IntegerEntry(a, (M() + Y))] |
---|
131 | 131 | | |
---|
132 | 132 | | |
---|
133 | | - | func ak (U,Z) = [IntegerEntry(H(g, U), (W(U) + Z)), IntegerEntry(a, (N() + Z))] |
---|
| 133 | + | func ak () = (lastBlock.timestamp / 1000) |
---|
134 | 134 | | |
---|
135 | 135 | | |
---|
136 | | - | func al () = (lastBlock.timestamp / 1000) |
---|
| 136 | + | func al () = F(ak(), Q()) |
---|
137 | 137 | | |
---|
138 | 138 | | |
---|
139 | | - | func am () = G(al(), R()) |
---|
140 | | - | |
---|
141 | | - | |
---|
142 | | - | func an (ao) = if (((N() + ao) == 0)) |
---|
143 | | - | then O() |
---|
| 139 | + | func am (an) = if (((M() + an) == 0)) |
---|
| 140 | + | then N() |
---|
144 | 141 | | else { |
---|
145 | | - | let ap = (am() - P()) |
---|
146 | | - | let aq = if ((0 > ap)) |
---|
| 142 | + | let ao = (al() - O()) |
---|
| 143 | + | let ap = if ((0 > ao)) |
---|
147 | 144 | | then 0 |
---|
148 | | - | else ap |
---|
149 | | - | let ar = B((Q() * aq), (N() + ao)) |
---|
150 | | - | (O() + ar) |
---|
| 145 | + | else ao |
---|
| 146 | + | let aq = A((P() * ap), (M() + an)) |
---|
| 147 | + | (N() + aq) |
---|
151 | 148 | | } |
---|
152 | 149 | | |
---|
153 | 150 | | |
---|
154 | | - | func as (U,ao) = { |
---|
155 | | - | let at = (an(ao) - V(U)) |
---|
156 | | - | (E((W(U) + ao), at) + T(U)) |
---|
| 151 | + | func ar (T,an) = { |
---|
| 152 | + | let as = (am(an) - U(T)) |
---|
| 153 | + | (D((V(T) + an), as) + S(T)) |
---|
157 | 154 | | } |
---|
158 | 155 | | |
---|
159 | 156 | | |
---|
160 | | - | func au (U,ao) = { |
---|
161 | | - | let av = an(ao) |
---|
162 | | - | let aw = al() |
---|
163 | | - | let ax = if ((U != "")) |
---|
164 | | - | then $Tuple2(as(U, ao), av) |
---|
| 157 | + | func at (T,an) = { |
---|
| 158 | + | let au = am(an) |
---|
| 159 | + | let av = ak() |
---|
| 160 | + | let aw = if ((T != "")) |
---|
| 161 | + | then $Tuple2(ar(T, an), au) |
---|
165 | 162 | | else $Tuple2(0, 0) |
---|
166 | | - | let ay = ax._1 |
---|
167 | | - | let az = ax._2 |
---|
168 | | - | $Tuple4(av, aw, ay, az) |
---|
| 163 | + | let ax = aw._1 |
---|
| 164 | + | let ay = aw._2 |
---|
| 165 | + | $Tuple4(au, av, ax, ay) |
---|
169 | 166 | | } |
---|
170 | 167 | | |
---|
171 | 168 | | |
---|
172 | | - | @Callable(aA) |
---|
173 | | - | func initialize (aB) = if (X()) |
---|
174 | | - | then throw("Already initialized") |
---|
175 | | - | else [StringEntry(k, aB), BooleanEntry(j, true)] |
---|
| 169 | + | @Callable(az) |
---|
| 170 | + | func initialize (aA) = if (if (W()) |
---|
| 171 | + | then true |
---|
| 172 | + | else (az.caller != this)) |
---|
| 173 | + | then throw("Unable to initialize") |
---|
| 174 | + | else [StringEntry(k, toString(addressFromStringValue(aA))), BooleanEntry(j, true)] |
---|
176 | 175 | | |
---|
177 | 176 | | |
---|
178 | 177 | | |
---|
179 | | - | @Callable(aA) |
---|
| 178 | + | @Callable(az) |
---|
180 | 179 | | func stake () = { |
---|
181 | | - | let U = toString(aA.caller) |
---|
182 | | - | let z = aA.payments[0].amount |
---|
183 | | - | if (if ((aA.payments[0].assetId != r())) |
---|
| 180 | + | let T = toString(az.caller) |
---|
| 181 | + | let y = az.payments[0].amount |
---|
| 182 | + | if (if ((az.payments[0].assetId != q())) |
---|
184 | 183 | | then true |
---|
185 | | - | else !(X())) |
---|
| 184 | + | else !(W())) |
---|
186 | 185 | | then throw("Invalid call to stake") |
---|
187 | 186 | | else { |
---|
188 | | - | let aC = au(U, 0) |
---|
189 | | - | let av = aC._1 |
---|
190 | | - | let aw = aC._2 |
---|
191 | | - | let ay = aC._3 |
---|
192 | | - | let az = aC._4 |
---|
193 | | - | (((ah(U, ay, az) ++ af(av)) ++ ac(aw, R())) ++ ak(U, z)) |
---|
| 187 | + | let aB = at(T, 0) |
---|
| 188 | + | let au = aB._1 |
---|
| 189 | + | let av = aB._2 |
---|
| 190 | + | let ax = aB._3 |
---|
| 191 | + | let ay = aB._4 |
---|
| 192 | + | (((ag(T, ax, ay) ++ ae(au)) ++ ab(av, Q())) ++ aj(T, y)) |
---|
194 | 193 | | } |
---|
195 | 194 | | } |
---|
196 | 195 | | |
---|
197 | 196 | | |
---|
198 | 197 | | |
---|
199 | | - | @Callable(aA) |
---|
200 | | - | func unStake (z) = { |
---|
201 | | - | let U = toString(aA.caller) |
---|
202 | | - | if (if (if ((z > W(U))) |
---|
| 198 | + | @Callable(az) |
---|
| 199 | + | func unStake (y) = { |
---|
| 200 | + | let T = toString(az.caller) |
---|
| 201 | + | if (if (if ((y > V(T))) |
---|
203 | 202 | | then true |
---|
204 | | - | else (aA.payments != nil)) |
---|
| 203 | + | else (az.payments != nil)) |
---|
205 | 204 | | then true |
---|
206 | | - | else !(X())) |
---|
| 205 | + | else !(W())) |
---|
207 | 206 | | then throw("Invalid unStake parameters") |
---|
208 | 207 | | else { |
---|
209 | | - | let aD = au(U, 0) |
---|
210 | | - | let av = aD._1 |
---|
211 | | - | let aw = aD._2 |
---|
212 | | - | let ay = aD._3 |
---|
213 | | - | let az = aD._4 |
---|
214 | | - | ((((ah(U, ay, az) ++ af(av)) ++ ac(aw, R())) ++ ak(U, -(z))) ++ [ScriptTransfer(aA.caller, z, r())]) |
---|
| 208 | + | let aC = at(T, 0) |
---|
| 209 | + | let au = aC._1 |
---|
| 210 | + | let av = aC._2 |
---|
| 211 | + | let ax = aC._3 |
---|
| 212 | + | let ay = aC._4 |
---|
| 213 | + | ((((ag(T, ax, ay) ++ ae(au)) ++ ab(av, Q())) ++ aj(T, -(y))) ++ [ScriptTransfer(az.caller, y, q())]) |
---|
215 | 214 | | } |
---|
216 | 215 | | } |
---|
217 | 216 | | |
---|
218 | 217 | | |
---|
219 | 218 | | |
---|
220 | | - | @Callable(aA) |
---|
| 219 | + | @Callable(az) |
---|
221 | 220 | | func withdrawRewards () = { |
---|
222 | | - | let U = toString(aA.caller) |
---|
223 | | - | let aE = au(U, 0) |
---|
224 | | - | let av = aE._1 |
---|
225 | | - | let aw = aE._2 |
---|
226 | | - | let ay = aE._3 |
---|
227 | | - | let az = aE._4 |
---|
228 | | - | if (if ((0 >= ay)) |
---|
| 221 | + | let T = toString(az.caller) |
---|
| 222 | + | let aD = at(T, 0) |
---|
| 223 | + | let au = aD._1 |
---|
| 224 | + | let av = aD._2 |
---|
| 225 | + | let ax = aD._3 |
---|
| 226 | + | let ay = aD._4 |
---|
| 227 | + | if (if ((0 >= ax)) |
---|
229 | 228 | | then true |
---|
230 | | - | else !(X())) |
---|
| 229 | + | else !(W())) |
---|
231 | 230 | | then throw("No reward") |
---|
232 | 231 | | else { |
---|
233 | | - | let aF = invoke(t(), "withdraw", [toBase58String(s()), y(ay)], nil) |
---|
234 | | - | if ((aF == aF)) |
---|
235 | | - | then ((((ah(U, 0, az) ++ af(av)) ++ ac(aw, R())) ++ Y(-(ay))) ++ [ScriptTransfer(aA.caller, y(ay), s())]) |
---|
| 232 | + | let aE = invoke(s(), "withdraw", [toBase58String(r()), x(ax)], nil) |
---|
| 233 | + | if ((aE == aE)) |
---|
| 234 | + | then ((((ag(T, 0, ay) ++ ae(au)) ++ ab(av, Q())) ++ X(-(ax))) ++ [ScriptTransfer(az.caller, x(ax), r())]) |
---|
236 | 235 | | else throw("Strict value is not equal to itself.") |
---|
237 | 236 | | } |
---|
238 | 237 | | } |
---|
239 | 238 | | |
---|
240 | 239 | | |
---|
241 | 240 | | |
---|
242 | | - | @Callable(aA) |
---|
243 | | - | func addRewards () = if (if ((aA.payments[0].assetId != s())) |
---|
| 241 | + | @Callable(az) |
---|
| 242 | + | func addRewards () = if (if ((az.payments[0].assetId != r())) |
---|
244 | 243 | | then true |
---|
245 | | - | else !(X())) |
---|
| 244 | + | else !(W())) |
---|
246 | 245 | | then throw("Invalid addRewards params") |
---|
247 | 246 | | else { |
---|
248 | | - | let ai = A(aA.payments[0].amount) |
---|
249 | | - | let aG = invoke(t(), "deposit", nil, [AttachedPayment(s(), y(ai))]) |
---|
250 | | - | if ((aG == aG)) |
---|
| 247 | + | let ah = z(az.payments[0].amount) |
---|
| 248 | + | let aF = invoke(s(), "deposit", nil, [AttachedPayment(r(), x(ah))]) |
---|
| 249 | + | if ((aF == aF)) |
---|
251 | 250 | | then { |
---|
252 | | - | let av = au(w, x)._1 |
---|
253 | | - | let aH = al() |
---|
254 | | - | let aI = if ((aH > R())) |
---|
255 | | - | then (ai / v) |
---|
| 251 | + | let au = at(v, w)._1 |
---|
| 252 | + | let aG = ak() |
---|
| 253 | + | let aH = if ((aG > Q())) |
---|
| 254 | + | then (ah / u) |
---|
256 | 255 | | else { |
---|
257 | | - | let aJ = (R() - aH) |
---|
258 | | - | let aK = (Q() * aJ) |
---|
259 | | - | ((ai + aK) / v) |
---|
| 256 | + | let aI = (Q() - aG) |
---|
| 257 | + | let aJ = (P() * aI) |
---|
| 258 | + | ((ah + aJ) / u) |
---|
260 | 259 | | } |
---|
261 | | - | (((aa(aI) ++ af(av)) ++ Y(ai)) ++ ac(aH, (aH + v))) |
---|
| 260 | + | (((Z(aH) ++ ae(au)) ++ X(ah)) ++ ab(aG, (aG + u))) |
---|
262 | 261 | | } |
---|
263 | 262 | | else throw("Strict value is not equal to itself.") |
---|
264 | 263 | | } |
---|
265 | 264 | | |
---|
266 | 265 | | |
---|
267 | 266 | | |
---|
268 | | - | @Callable(aA) |
---|
| 267 | + | @Callable(az) |
---|
269 | 268 | | func ackRewards () = { |
---|
270 | | - | let at = A(assetBalance(this, s())) |
---|
271 | | - | if (((1 * u) > at)) |
---|
| 269 | + | let as = z(assetBalance(this, r())) |
---|
| 270 | + | if (((1 * t) > as)) |
---|
272 | 271 | | then nil |
---|
273 | 272 | | else { |
---|
274 | | - | let aG = invoke(t(), "deposit", nil, [AttachedPayment(s(), y(at))]) |
---|
275 | | - | if ((aG == aG)) |
---|
| 273 | + | let aF = invoke(s(), "deposit", nil, [AttachedPayment(r(), x(as))]) |
---|
| 274 | + | if ((aF == aF)) |
---|
276 | 275 | | then { |
---|
277 | | - | let ai = at |
---|
278 | | - | let av = au(w, x)._1 |
---|
279 | | - | let aH = al() |
---|
280 | | - | let aI = if ((aH > R())) |
---|
281 | | - | then (ai / v) |
---|
| 276 | + | let ah = as |
---|
| 277 | + | let au = at(v, w)._1 |
---|
| 278 | + | let aG = ak() |
---|
| 279 | + | let aH = if ((aG > Q())) |
---|
| 280 | + | then (ah / u) |
---|
282 | 281 | | else { |
---|
283 | | - | let aJ = (R() - aH) |
---|
284 | | - | let aK = (Q() * aJ) |
---|
285 | | - | ((ai + aK) / v) |
---|
| 282 | + | let aI = (Q() - aG) |
---|
| 283 | + | let aJ = (P() * aI) |
---|
| 284 | + | ((ah + aJ) / u) |
---|
286 | 285 | | } |
---|
287 | | - | (((aa(aI) ++ af(av)) ++ Y(ai)) ++ ac(aH, (aH + v))) |
---|
| 286 | + | (((Z(aH) ++ ae(au)) ++ X(ah)) ++ ab(aG, (aG + u))) |
---|
288 | 287 | | } |
---|
289 | 288 | | else throw("Strict value is not equal to itself.") |
---|
290 | 289 | | } |
---|
291 | 290 | | } |
---|
292 | 291 | | |
---|
293 | 292 | | |
---|
294 | 293 | | |
---|
295 | | - | @Callable(aA) |
---|
296 | | - | func view_reward (U) = { |
---|
297 | | - | let ay = au(U, 0)._3 |
---|
298 | | - | throw(toString(y(ay))) |
---|
| 294 | + | @Callable(az) |
---|
| 295 | + | func view_reward (T) = { |
---|
| 296 | + | let ax = at(T, 0)._3 |
---|
| 297 | + | throw(toString(x(ax))) |
---|
299 | 298 | | } |
---|
300 | 299 | | |
---|
301 | 300 | | |
---|
302 | 301 | | |
---|
303 | | - | @Callable(aA) |
---|
304 | | - | func computeReward (U) = { |
---|
305 | | - | let ay = au(U, 0)._3 |
---|
306 | | - | $Tuple2(nil, ay) |
---|
| 302 | + | @Callable(az) |
---|
| 303 | + | func computeReward (T) = { |
---|
| 304 | + | let ax = at(T, 0)._3 |
---|
| 305 | + | $Tuple2(nil, ax) |
---|
307 | 306 | | } |
---|
308 | 307 | | |
---|
309 | 308 | | |
---|
310 | | - | |
---|
311 | | - | @Callable(aA) |
---|
312 | | - | func migrateLiquidity () = { |
---|
313 | | - | let aL = y(S()) |
---|
314 | | - | let aG = invoke(t(), "deposit", nil, [AttachedPayment(s(), aL)]) |
---|
315 | | - | if ((aG == aG)) |
---|
316 | | - | then nil |
---|
317 | | - | else throw("Strict value is not equal to itself.") |
---|
| 309 | + | @Verifier(aK) |
---|
| 310 | + | func aL () = { |
---|
| 311 | + | let aM = getString(this, k) |
---|
| 312 | + | if (isDefined(aM)) |
---|
| 313 | + | then { |
---|
| 314 | + | let aN = getString(addressFromStringValue(value(aM)), n) |
---|
| 315 | + | if (isDefined(aN)) |
---|
| 316 | + | then valueOrElse(getBoolean(addressFromStringValue(value(aN)), ((("status_" + toString(this)) + "_") + toBase58String(aK.id))), false) |
---|
| 317 | + | else throw("unable to verify: admin not set in coordinator") |
---|
| 318 | + | } |
---|
| 319 | + | else sigVerify(aK.bodyBytes, aK.proofs[0], aK.senderPublicKey) |
---|
318 | 320 | | } |
---|
319 | | - | |
---|
320 | | - | |
---|
321 | | - | @Verifier(aM) |
---|
322 | | - | func aN () = sigVerify(aM.bodyBytes, aM.proofs[0], q()) |
---|
323 | 321 | | |
---|