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