tx · 6EaiH4bKxMKgKi4CRLqJWMo9Jk5Xdgmi7cwMhsTXxrL4 3MvVH33KASni1qXr1BJhmuwPnYKmgwZBGaR: -0.02900000 Waves 2023.03.16 13:51 [2492483] smart account 3MvVH33KASni1qXr1BJhmuwPnYKmgwZBGaR > SELF 0.00000000 Waves
{ "type": 13, "id": "6EaiH4bKxMKgKi4CRLqJWMo9Jk5Xdgmi7cwMhsTXxrL4", "fee": 2900000, "feeAssetId": null, "timestamp": 1678963907785, "version": 2, "chainId": 84, "sender": "3MvVH33KASni1qXr1BJhmuwPnYKmgwZBGaR", "senderPublicKey": "2uEfkKMnD8wQeJcHwphftPPzFcaujs486fDaMuUyNT9w", "proofs": [ "2ivASaJdFfBrH2deoCXmJ6aYW1ybAGL8FR5knFaxDE3WJMASVjvTcxcibf69gBbZgxciiEnUabKbtgSWPRePx3rK" ], "script": "base64:BgIzCAISAwoBCBIAEgQKAgIBEgQKAgIBEgcKBQgICAgIEgASBAoCCAgSABIECgIICBIDCgEIQQAJc2VwYXJhdG9yAgJfXwASc2hhcmVBc3NldERlY2ltYWxzAAgAC3dhdmVzU3RyaW5nAgVXQVZFUwAHc2NhbGUxOACAgJC7utat8A0ADXNjYWxlMThCaWdJbnQJALYCAQUHc2NhbGUxOAEHd3JhcEVycgEDbXNnCQC5CQIJAMwIAgIWbHBfc3Rha2luZ19wb29scy5yaWRlOgkAzAgCBQNtc2cFA25pbAIBIAEIdGhyb3dFcnIBA21zZwkAAgEJAQd3cmFwRXJyAQUDbXNnARJlcnJLZXlJc05vdERlZmluZWQCB2FkZHJlc3MDa2V5CQEHd3JhcEVycgEJALkJAgkAzAgCAgptYW5kYXRvcnkgCQDMCAIJAKUIAQUHYWRkcmVzcwkAzAgCAgEuCQDMCAIFA2tleQkAzAgCAg8gaXMgbm90IGRlZmluZWQFA25pbAIAAQxnZXRTdHJPckZhaWwCB2FkZHJlc3MDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJ0IAgUHYWRkc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Y3RvcgQCcGsFByRtYXRjaDAFAnBrAwkAAQIFByRtYXRjaDACBFVuaXQIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUPdGFyZ2V0UHVibGljS2V5lEvKcg==", "height": 2492483, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FApEHLzn9VwyJTRr3fcZcuF4q2QGusQ37ekBcE2nPpNK Next: 3QdAbedjLjm8845Yn7uw5nKzf1orfQMgnw9ALzA14mg4 Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | - | let b = | |
6 | + | let b = 8 | |
7 | 7 | ||
8 | - | func c (d) = valueOrErrorMessage(getString(this, d), ("No data for this.key=" + d)) | |
8 | + | let c = "WAVES" | |
9 | + | ||
10 | + | let d = 1000000000000000000 | |
11 | + | ||
12 | + | let e = toBigInt(d) | |
13 | + | ||
14 | + | func f (g) = makeString(["lp_staking_pools.ride:", g], " ") | |
9 | 15 | ||
10 | 16 | ||
11 | - | let e = throw("Pool disabled") | |
12 | - | ||
13 | - | let f = throw("Pool is not exist") | |
14 | - | ||
15 | - | let g = throw("Slippage is too big") | |
16 | - | ||
17 | - | func h () = "%s__managerPublicKey" | |
17 | + | func h (g) = throw(f(g)) | |
18 | 18 | ||
19 | 19 | ||
20 | - | func i () = " | |
20 | + | func i (j,k) = f(makeString(["mandatory ", toString(j), ".", k, " is not defined"], "")) | |
21 | 21 | ||
22 | 22 | ||
23 | - | func | |
23 | + | func l (j,k) = valueOrErrorMessage(getString(j, k), i(j, k)) | |
24 | 24 | ||
25 | 25 | ||
26 | - | let k = addressFromStringValue(c(j())) | |
27 | - | ||
28 | - | func l () = makeString(["%s", "protocolFee"], a) | |
26 | + | func m (j,k) = valueOrErrorMessage(getInteger(j, k), i(j, k)) | |
29 | 27 | ||
30 | 28 | ||
31 | - | func m () = makeString(["%s", "poolFee"], a) | |
29 | + | func n (o) = if ((o == c)) | |
30 | + | then unit | |
31 | + | else fromBase58String(o) | |
32 | 32 | ||
33 | 33 | ||
34 | - | func n (o,d) = valueOrErrorMessage(getString(o, d), makeString(["mandatory ", toString(o), ".", d, " is not defined"], "")) | |
34 | + | func p (o) = if ((o == unit)) | |
35 | + | then c | |
36 | + | else toBase58String(value(o)) | |
35 | 37 | ||
36 | 38 | ||
37 | - | let p = "%s__feeCollectorAddress" | |
38 | - | ||
39 | - | let q = addressFromStringValue(n(k, p)) | |
40 | - | ||
41 | - | func r (s) = { | |
42 | - | let t = s | |
43 | - | if ($isInstanceOf(t, "Int")) | |
44 | - | then { | |
45 | - | let u = t | |
46 | - | u | |
47 | - | } | |
48 | - | else throw("fail to cast into Int") | |
49 | - | } | |
39 | + | func q (r) = if ((r >= 0)) | |
40 | + | then r | |
41 | + | else h("value should be positive") | |
50 | 42 | ||
51 | 43 | ||
52 | - | func | |
44 | + | func s () = makeString(["%s", "factoryContract"], a) | |
53 | 45 | ||
54 | 46 | ||
55 | - | func y () = { | |
56 | - | let t = getString(h()) | |
57 | - | if ($isInstanceOf(t, "String")) | |
47 | + | func t () = makeString(["%s", "lpStakingContract"], a) | |
48 | + | ||
49 | + | ||
50 | + | func u () = makeString(["%s", "stakingContract"], a) | |
51 | + | ||
52 | + | ||
53 | + | func v () = makeString(["%s", "boostingContract"], a) | |
54 | + | ||
55 | + | ||
56 | + | func w () = makeString(["%s", "swapContract"], a) | |
57 | + | ||
58 | + | ||
59 | + | func x () = makeString(["%s", "assetsStoreContract"], a) | |
60 | + | ||
61 | + | ||
62 | + | func y () = makeString(["%s", "usdtAssetId"], a) | |
63 | + | ||
64 | + | ||
65 | + | func z () = makeString(["%s", "wxAssetId"], a) | |
66 | + | ||
67 | + | ||
68 | + | func A () = makeString(["%s", "shutdown"], a) | |
69 | + | ||
70 | + | ||
71 | + | func B () = makeString(["%s", "minDelay"], a) | |
72 | + | ||
73 | + | ||
74 | + | func C () = makeString(["%s", "lockFraction"], a) | |
75 | + | ||
76 | + | ||
77 | + | func D (E) = makeString(["%s%s", p(E), "shareAssetId"], a) | |
78 | + | ||
79 | + | ||
80 | + | func F (G) = makeString(["%s%s", p(G), "baseAssetId"], a) | |
81 | + | ||
82 | + | ||
83 | + | func H (E) = makeString(["%s%s", p(E), "period"], a) | |
84 | + | ||
85 | + | ||
86 | + | func I (E,J) = makeString(["%s%s%d", p(E), "periodStartHeight", toString(J)], a) | |
87 | + | ||
88 | + | ||
89 | + | func K (E) = makeString(["%s%s", p(E), "baseAssetAmountToConvert"], a) | |
90 | + | ||
91 | + | ||
92 | + | func L (E) = makeString(["%s%s", p(E), "shareAssetAmountToConvert"], a) | |
93 | + | ||
94 | + | ||
95 | + | func M (E,N) = makeString(["%s%s%s", p(E), toString(N), "baseAssetAmountToConvert"], a) | |
96 | + | ||
97 | + | ||
98 | + | func O (E,N) = makeString(["%s%s%s%s", p(E), toString(N), "baseAssetAmountToConvert", "period"], a) | |
99 | + | ||
100 | + | ||
101 | + | func P (E,N) = makeString(["%s%s%s", p(E), toString(N), "shareAssetAmountToConvert"], a) | |
102 | + | ||
103 | + | ||
104 | + | func Q (E,N) = makeString(["%s%s%s%s", p(E), toString(N), "shareAssetAmountToConvert", "period"], a) | |
105 | + | ||
106 | + | ||
107 | + | func R (E,J) = makeString(["%s%s%d", p(E), "price", toString(J)], a) | |
108 | + | ||
109 | + | ||
110 | + | func S (E) = makeString(["%s%s%s%d%d", p(E), "price", "history", toString(lastBlock.height), toString(lastBlock.timestamp)], a) | |
111 | + | ||
112 | + | ||
113 | + | func T (E,J) = makeString(["%s%s%d%s", p(E), "price", toString(J), "put"], a) | |
114 | + | ||
115 | + | ||
116 | + | func U (E) = makeString(["%s%s%s%s%d%d", p(E), "price", "history", "put", toString(lastBlock.height), toString(lastBlock.timestamp)], a) | |
117 | + | ||
118 | + | ||
119 | + | func V (E,J) = makeString(["%s%s%d%s", p(E), "price", toString(J), "get"], a) | |
120 | + | ||
121 | + | ||
122 | + | func W (E) = makeString(["%s%s%s%s%d%d", p(E), "price", "history", "get", toString(lastBlock.height), toString(lastBlock.timestamp)], a) | |
123 | + | ||
124 | + | ||
125 | + | func X (E,Y,J,N,Z) = makeString(["%s%s%s%s", "history", Y, toString(N), toBase58String(Z), toString(height)], a) | |
126 | + | ||
127 | + | ||
128 | + | func aa () = "%s__managerPublicKey" | |
129 | + | ||
130 | + | ||
131 | + | func ab () = "%s__pendingManagerPublicKey" | |
132 | + | ||
133 | + | ||
134 | + | func ac () = { | |
135 | + | let ad = getString(aa()) | |
136 | + | if ($isInstanceOf(ad, "String")) | |
58 | 137 | then { | |
59 | - | let | |
60 | - | fromBase58String( | |
138 | + | let ae = ad | |
139 | + | fromBase58String(ae) | |
61 | 140 | } | |
62 | - | else if ($isInstanceOf( | |
141 | + | else if ($isInstanceOf(ad, "Unit")) | |
63 | 142 | then unit | |
64 | 143 | else throw("Match error") | |
65 | 144 | } | |
66 | 145 | ||
67 | 146 | ||
68 | - | func | |
69 | - | let | |
70 | - | if ($isInstanceOf( | |
147 | + | func af () = { | |
148 | + | let ad = getString(ab()) | |
149 | + | if ($isInstanceOf(ad, "String")) | |
71 | 150 | then { | |
72 | - | let | |
73 | - | fromBase58String( | |
151 | + | let ae = ad | |
152 | + | fromBase58String(ae) | |
74 | 153 | } | |
75 | - | else if ($isInstanceOf( | |
154 | + | else if ($isInstanceOf(ad, "Unit")) | |
76 | 155 | then unit | |
77 | 156 | else throw("Match error") | |
78 | 157 | } | |
79 | 158 | ||
80 | 159 | ||
81 | - | func B (C) = { | |
82 | - | let t = y() | |
83 | - | if ($isInstanceOf(t, "ByteVector")) | |
160 | + | let ag = throw("Permission denied") | |
161 | + | ||
162 | + | func ah (ai) = if ((ai.caller == this)) | |
163 | + | then true | |
164 | + | else ag | |
165 | + | ||
166 | + | ||
167 | + | func aj (ai) = { | |
168 | + | let ad = ac() | |
169 | + | if ($isInstanceOf(ad, "ByteVector")) | |
84 | 170 | then { | |
85 | - | let D = t | |
86 | - | (C.callerPublicKey == D) | |
171 | + | let ak = ad | |
172 | + | if ((ai.callerPublicKey == ak)) | |
173 | + | then true | |
174 | + | else ag | |
87 | 175 | } | |
88 | - | else if ($isInstanceOf( | |
89 | - | then ( | |
176 | + | else if ($isInstanceOf(ad, "Unit")) | |
177 | + | then ah(ai) | |
90 | 178 | else throw("Match error") | |
91 | 179 | } | |
92 | 180 | ||
93 | 181 | ||
94 | - | func E (C) = if (B(C)) | |
182 | + | let al = valueOrElse(getBoolean(A()), false) | |
183 | + | ||
184 | + | func am (ai) = if (if (!(al)) | |
95 | 185 | then true | |
96 | - | else throw("permission denied") | |
186 | + | else aj(ai)) | |
187 | + | then true | |
188 | + | else throw("operation is disabled") | |
97 | 189 | ||
98 | 190 | ||
99 | - | func F (G) = if ((G == "WAVES")) | |
100 | - | then wavesBalance(this).available | |
101 | - | else assetBalance(this, fromBase58String(G)) | |
191 | + | let an = addressFromStringValue(l(this, s())) | |
102 | 192 | ||
193 | + | let ao = addressFromStringValue(l(this, t())) | |
103 | 194 | ||
104 | - | func H (I,J) = { | |
105 | - | let K = { | |
106 | - | let L = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [I, J], nil) | |
107 | - | if ($isInstanceOf(L, "String")) | |
108 | - | then L | |
195 | + | let ap = addressFromStringValue(l(this, u())) | |
196 | + | ||
197 | + | let aq = addressFromStringValue(l(this, v())) | |
198 | + | ||
199 | + | let ar = addressFromStringValue(l(this, w())) | |
200 | + | ||
201 | + | let as = addressFromStringValue(l(this, x())) | |
202 | + | ||
203 | + | let at = n(l(this, y())) | |
204 | + | ||
205 | + | let au = n(l(this, z())) | |
206 | + | ||
207 | + | let av = 1440 | |
208 | + | ||
209 | + | let aw = valueOrElse(getInteger(this, B()), av) | |
210 | + | ||
211 | + | let ax = 100000000 | |
212 | + | ||
213 | + | let ay = fraction(1, ax, 2) | |
214 | + | ||
215 | + | let az = valueOrElse(getInteger(this, C()), ay) | |
216 | + | ||
217 | + | func aA (aB) = { | |
218 | + | let aC = p(aB) | |
219 | + | let aD = p(at) | |
220 | + | let aE = { | |
221 | + | let aF = invoke(an, "poolInfoREADONLY", [aC, aD], nil) | |
222 | + | if ($isInstanceOf(aF, "(Address, ByteVector)")) | |
223 | + | then aF | |
109 | 224 | else unit | |
110 | 225 | } | |
111 | - | let M = { | |
112 | - | let L = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [J, I], nil) | |
113 | - | if ($isInstanceOf(L, "String")) | |
114 | - | then L | |
115 | - | else unit | |
116 | - | } | |
117 | - | let N = if ((K != unit)) | |
118 | - | then { | |
119 | - | let O = { | |
120 | - | let L = invoke(k, "getPoolAddressFromLpAssetREADONLY", [value(K)], nil) | |
121 | - | if ($isInstanceOf(L, "String")) | |
122 | - | then L | |
123 | - | else throw(($getType(L) + " couldn't be cast to String")) | |
124 | - | } | |
125 | - | $Tuple2(false, O) | |
126 | - | } | |
127 | - | else if ((M != unit)) | |
128 | - | then { | |
129 | - | let O = { | |
130 | - | let L = invoke(k, "getPoolAddressFromLpAssetREADONLY", [value(M)], nil) | |
131 | - | if ($isInstanceOf(L, "String")) | |
132 | - | then L | |
133 | - | else throw(($getType(L) + " couldn't be cast to String")) | |
134 | - | } | |
135 | - | $Tuple2(true, O) | |
136 | - | } | |
137 | - | else f | |
138 | - | let P = N._1 | |
139 | - | let O = N._2 | |
140 | - | let Q = { | |
141 | - | let L = invoke(k, "getPoolStatusREADONLY", [O], nil) | |
142 | - | if ($isInstanceOf(L, "Int")) | |
143 | - | then L | |
144 | - | else throw(($getType(L) + " couldn't be cast to Int")) | |
145 | - | } | |
146 | - | let R = if ((Q == 1)) | |
147 | - | then true | |
148 | - | else e | |
149 | - | if ((R == R)) | |
150 | - | then { | |
151 | - | let S = addressFromStringValue(valueOrElse(O, "")) | |
152 | - | $Tuple2(S, P) | |
153 | - | } | |
154 | - | else throw("Strict value is not equal to itself.") | |
226 | + | aE | |
155 | 227 | } | |
156 | 228 | ||
157 | 229 | ||
158 | - | @Callable(C) | |
159 | - | func swapCalculateREADONLY (T,I,J) = { | |
160 | - | let U = value(getInteger(l())) | |
161 | - | let V = fraction(toBigInt(T), toBigInt(U), b) | |
162 | - | let W = value(getInteger(m())) | |
163 | - | let X = fraction(toBigInt(T), toBigInt(W), b) | |
164 | - | let Y = if ((toInt(V) == 0)) | |
165 | - | then toBigInt(1) | |
166 | - | else V | |
167 | - | let Z = if ((toInt(X) == 0)) | |
168 | - | then toBigInt(1) | |
169 | - | else X | |
170 | - | let aa = ((toBigInt(T) - Y) - Z) | |
171 | - | let ab = H(I, J) | |
172 | - | let S = ab._1 | |
173 | - | let P = ab._2 | |
174 | - | let ac = { | |
175 | - | let L = invoke(S, "calculateAmountOutForSwapREADONLY", [toInt(aa), P, toInt(Z)], nil) | |
176 | - | if ($isInstanceOf(L, "Int")) | |
177 | - | then L | |
178 | - | else throw(($getType(L) + " couldn't be cast to Int")) | |
179 | - | } | |
180 | - | $Tuple2(nil, ac) | |
230 | + | func aG (aH,G) = { | |
231 | + | let aI = valueOrErrorMessage(assetInfo(G), "failed to get share asset info") | |
232 | + | let aJ = aI.quantity | |
233 | + | let aK = q(valueOrErrorMessage({ | |
234 | + | let aF = invoke(ap, "stakedByUserREADONLY", [p(aH), toString(this)], nil) | |
235 | + | if ($isInstanceOf(aF, "Int")) | |
236 | + | then aF | |
237 | + | else unit | |
238 | + | }, f("invalid stakedByUserREADONLY result"))) | |
239 | + | let aL = if ((aJ == 0)) | |
240 | + | then e | |
241 | + | else fraction(toBigInt(aK), e, toBigInt(aJ), FLOOR) | |
242 | + | aL | |
181 | 243 | } | |
182 | 244 | ||
183 | 245 | ||
184 | - | ||
185 | - | @Callable(C) | |
186 | - | func swap (ad,ae,af) = { | |
187 | - | let J = if ((ae == "")) | |
188 | - | then "WAVES" | |
189 | - | else ae | |
190 | - | let ag = value(C.payments[0]) | |
191 | - | let I = if ((ag.assetId == unit)) | |
192 | - | then "WAVES" | |
193 | - | else toBase58String(value(ag.assetId)) | |
194 | - | let T = value(ag.amount) | |
195 | - | let U = value(getInteger(l())) | |
196 | - | let V = fraction(toBigInt(T), toBigInt(U), b) | |
197 | - | let W = value(getInteger(m())) | |
198 | - | let X = fraction(toBigInt(T), toBigInt(W), b) | |
199 | - | let Y = if ((toInt(V) == 0)) | |
200 | - | then toBigInt(1) | |
201 | - | else V | |
202 | - | let Z = if ((toInt(X) == 0)) | |
203 | - | then toBigInt(1) | |
204 | - | else X | |
205 | - | let aa = ((toBigInt(T) - Y) - Z) | |
206 | - | let ah = [if ((size(C.payments) == 1)) | |
207 | - | then true | |
208 | - | else throw("exactly 1 payment are expected")] | |
209 | - | if ((ah == ah)) | |
246 | + | @Callable(ai) | |
247 | + | func setManager (aM) = { | |
248 | + | let aN = aj(ai) | |
249 | + | if ((aN == aN)) | |
210 | 250 | then { | |
211 | - | let ai = H(I, J) | |
212 | - | let S = ai._1 | |
213 | - | let P = ai._2 | |
214 | - | let aj = if ((I == "WAVES")) | |
215 | - | then unit | |
216 | - | else fromBase58String(I) | |
217 | - | let ak = { | |
218 | - | let L = invoke(S, "calculateAmountOutForSwapAndSendTokens", [toInt(aa), P, ad, af, toInt(Z)], [AttachedPayment(aj, toInt(aa))]) | |
219 | - | if ($isInstanceOf(L, "Int")) | |
220 | - | then L | |
221 | - | else throw(($getType(L) + " couldn't be cast to Int")) | |
222 | - | } | |
223 | - | $Tuple2([ScriptTransfer(q, toInt(Y), aj), ScriptTransfer(S, toInt(Z), aj)], ak) | |
224 | - | } | |
225 | - | else throw("Strict value is not equal to itself.") | |
226 | - | } | |
227 | - | ||
228 | - | ||
229 | - | ||
230 | - | @Callable(C) | |
231 | - | func setManager (al) = { | |
232 | - | let am = E(C) | |
233 | - | if ((am == am)) | |
234 | - | then { | |
235 | - | let an = fromBase58String(al) | |
236 | - | if ((an == an)) | |
237 | - | then [StringEntry(i(), al)] | |
251 | + | let aO = fromBase58String(aM) | |
252 | + | if ((aO == aO)) | |
253 | + | then [StringEntry(ab(), aM)] | |
238 | 254 | else throw("Strict value is not equal to itself.") | |
239 | 255 | } | |
240 | 256 | else throw("Strict value is not equal to itself.") | |
242 | 258 | ||
243 | 259 | ||
244 | 260 | ||
245 | - | @Callable( | |
261 | + | @Callable(ai) | |
246 | 262 | func confirmManager () = { | |
247 | - | let | |
248 | - | let | |
263 | + | let aP = af() | |
264 | + | let aQ = if (isDefined(aP)) | |
249 | 265 | then true | |
250 | - | else | |
251 | - | if (( | |
266 | + | else h("no pending manager") | |
267 | + | if ((aQ == aQ)) | |
252 | 268 | then { | |
253 | - | let | |
269 | + | let aR = if ((ai.callerPublicKey == value(aP))) | |
254 | 270 | then true | |
255 | - | else | |
256 | - | if (( | |
257 | - | then [StringEntry( | |
271 | + | else h("you are not pending manager") | |
272 | + | if ((aR == aR)) | |
273 | + | then [StringEntry(aa(), toBase58String(value(aP))), DeleteEntry(ab())] | |
258 | 274 | else throw("Strict value is not equal to itself.") | |
259 | 275 | } | |
260 | 276 | else throw("Strict value is not equal to itself.") | |
261 | 277 | } | |
262 | 278 | ||
263 | 279 | ||
264 | - | @Verifier(ar) | |
265 | - | func as () = { | |
266 | - | let at = { | |
267 | - | let t = y() | |
268 | - | if ($isInstanceOf(t, "ByteVector")) | |
280 | + | ||
281 | + | @Callable(ai) | |
282 | + | func emit (aS,aT) = { | |
283 | + | let aN = ah(ai) | |
284 | + | if ((aN == aN)) | |
285 | + | then { | |
286 | + | let aU = true | |
287 | + | $Tuple2([Reissue(aS, aT, aU)], aT) | |
288 | + | } | |
289 | + | else throw("Strict value is not equal to itself.") | |
290 | + | } | |
291 | + | ||
292 | + | ||
293 | + | ||
294 | + | @Callable(ai) | |
295 | + | func burn (aS,aT) = { | |
296 | + | let aN = ah(ai) | |
297 | + | if ((aN == aN)) | |
298 | + | then $Tuple2([Burn(aS, aT)], aT) | |
299 | + | else throw("Strict value is not equal to itself.") | |
300 | + | } | |
301 | + | ||
302 | + | ||
303 | + | ||
304 | + | @Callable(ai) | |
305 | + | func create (aV,aW,aX,aY,aZ) = { | |
306 | + | let ba = "STAKING_LP" | |
307 | + | let E = n(aV) | |
308 | + | let bb = [aj(ai), if (isDefined(aA(E))) | |
309 | + | then true | |
310 | + | else h("invalid base asset")] | |
311 | + | if ((bb == bb)) | |
312 | + | then { | |
313 | + | let bc = [IntegerEntry(H(E), 0)] | |
314 | + | if ((aW == "")) | |
315 | + | then { | |
316 | + | let bd = 1 | |
317 | + | let be = Issue(aX, aY, bd, b, true) | |
318 | + | let bf = calculateAssetId(be) | |
319 | + | let bg = Burn(bf, bd) | |
320 | + | let bh = toBase58String(bf) | |
321 | + | let bi = invoke(as, "createOrUpdate", [bh, aZ, false], nil) | |
322 | + | if ((bi == bi)) | |
323 | + | then { | |
324 | + | let bj = invoke(as, "addLabel", [bh, ba], nil) | |
325 | + | if ((bj == bj)) | |
326 | + | then $Tuple2((bc ++ [be, bg, StringEntry(D(E), bh), StringEntry(F(bf), aV)]), bh) | |
327 | + | else throw("Strict value is not equal to itself.") | |
328 | + | } | |
329 | + | else throw("Strict value is not equal to itself.") | |
330 | + | } | |
331 | + | else { | |
332 | + | let G = fromBase58String(aW) | |
333 | + | let aI = valueOrErrorMessage(assetInfo(G), f("invalid share asset id")) | |
334 | + | let bk = if ((aI.issuer == ao)) | |
335 | + | then true | |
336 | + | else h("invalid share asset id issuer") | |
337 | + | if ((bk == bk)) | |
338 | + | then $Tuple2((bc ++ [StringEntry(D(E), aW), StringEntry(F(G), aV)]), aW) | |
339 | + | else throw("Strict value is not equal to itself.") | |
340 | + | } | |
341 | + | } | |
342 | + | else throw("Strict value is not equal to itself.") | |
343 | + | } | |
344 | + | ||
345 | + | ||
346 | + | ||
347 | + | @Callable(ai) | |
348 | + | func put () = { | |
349 | + | let bl = if ((size(ai.payments) == 1)) | |
350 | + | then ai.payments[0] | |
351 | + | else h("exactly 1 payment is expected") | |
352 | + | let E = bl.assetId | |
353 | + | let N = ai.caller | |
354 | + | let bb = [am(ai), if (isDefined(getString(D(E)))) | |
355 | + | then true | |
356 | + | else h("invalid asset")] | |
357 | + | if ((bb == bb)) | |
358 | + | then { | |
359 | + | let bm = valueOrErrorMessage(aA(E), f("invalid asset")) | |
360 | + | let bn = bm._1 | |
361 | + | let aH = bm._2 | |
362 | + | let J = value(getInteger(H(E))) | |
363 | + | let bo = getInteger(O(E, N)) | |
364 | + | let bp = if ((bo == unit)) | |
365 | + | then unit | |
366 | + | else { | |
367 | + | let bq = value(bo) | |
368 | + | if ((bq == J)) | |
369 | + | then unit | |
370 | + | else invoke(this, "claimShareAsset", [p(E), toString(N)], nil) | |
371 | + | } | |
372 | + | if ((bp == bp)) | |
373 | + | then { | |
374 | + | let br = valueOrElse(getInteger(K(E)), 0) | |
375 | + | let bs = valueOrElse(getInteger(M(E, N)), 0) | |
376 | + | $Tuple2([IntegerEntry(K(E), (br + bl.amount)), IntegerEntry(M(E, N), (bs + bl.amount)), IntegerEntry(O(E, N), J), IntegerEntry(X(E, "put", J, N, ai.transactionId), bl.amount)], unit) | |
377 | + | } | |
378 | + | else throw("Strict value is not equal to itself.") | |
379 | + | } | |
380 | + | else throw("Strict value is not equal to itself.") | |
381 | + | } | |
382 | + | ||
383 | + | ||
384 | + | ||
385 | + | @Callable(ai) | |
386 | + | func claimShareAsset (aV,bt) = { | |
387 | + | let bb = [am(ai)] | |
388 | + | if ((bb == bb)) | |
389 | + | then { | |
390 | + | let N = if ((bt == "")) | |
391 | + | then ai.caller | |
392 | + | else { | |
393 | + | let aN = ah(ai) | |
394 | + | if ((aN == aN)) | |
395 | + | then valueOrErrorMessage(addressFromString(bt), f("invalid user address")) | |
396 | + | else throw("Strict value is not equal to itself.") | |
397 | + | } | |
398 | + | if ((N == N)) | |
399 | + | then { | |
400 | + | let E = n(aV) | |
401 | + | let G = value(n(valueOrErrorMessage(getString(D(E)), f("invalid base asset id")))) | |
402 | + | if ((G == G)) | |
403 | + | then { | |
404 | + | let J = valueOrErrorMessage(getInteger(H(E)), f("invalid period")) | |
405 | + | if ((J == J)) | |
406 | + | then { | |
407 | + | let bs = valueOrElse(getInteger(M(E, N)), 0) | |
408 | + | let bu = if ((bs > 0)) | |
409 | + | then true | |
410 | + | else h("nothing to claim") | |
411 | + | if ((bu == bu)) | |
412 | + | then { | |
413 | + | let bq = valueOrErrorMessage(getInteger(O(E, N)), f("failed to get period")) | |
414 | + | let bv = if ((J > bq)) | |
415 | + | then true | |
416 | + | else h("invalid period") | |
417 | + | if ((bv == bv)) | |
418 | + | then { | |
419 | + | let aL = toBigInt(valueOrErrorMessage(getBinary(T(E, bq)), f("failed to get price"))) | |
420 | + | let bw = toInt(fraction(toBigInt(bs), e, aL)) | |
421 | + | $Tuple2([IntegerEntry(M(E, N), 0), DeleteEntry(O(E, N)), ScriptTransfer(N, bw, G), IntegerEntry(X(E, "claimShareAsset", J, N, ai.transactionId), bw)], unit) | |
422 | + | } | |
423 | + | else throw("Strict value is not equal to itself.") | |
424 | + | } | |
425 | + | else throw("Strict value is not equal to itself.") | |
426 | + | } | |
427 | + | else throw("Strict value is not equal to itself.") | |
428 | + | } | |
429 | + | else throw("Strict value is not equal to itself.") | |
430 | + | } | |
431 | + | else throw("Strict value is not equal to itself.") | |
432 | + | } | |
433 | + | else throw("Strict value is not equal to itself.") | |
434 | + | } | |
435 | + | ||
436 | + | ||
437 | + | ||
438 | + | @Callable(ai) | |
439 | + | func get () = { | |
440 | + | let bb = [am(ai)] | |
441 | + | if ((bb == bb)) | |
442 | + | then { | |
443 | + | let bl = if ((size(ai.payments) == 1)) | |
444 | + | then ai.payments[0] | |
445 | + | else h("exactly 1 payment is expected") | |
446 | + | let G = bl.assetId | |
447 | + | let E = value(n(valueOrErrorMessage(getString(F(G)), f("invalid share asset id")))) | |
448 | + | if ((E == E)) | |
449 | + | then { | |
450 | + | let N = ai.caller | |
451 | + | let bx = valueOrErrorMessage(aA(E), f("invalid asset")) | |
452 | + | let bn = bx._1 | |
453 | + | let aH = bx._2 | |
454 | + | let J = value(getInteger(H(E))) | |
455 | + | let by = getInteger(Q(E, N)) | |
456 | + | let bz = if ((by == unit)) | |
457 | + | then unit | |
458 | + | else { | |
459 | + | let bA = value(by) | |
460 | + | if ((bA == J)) | |
461 | + | then unit | |
462 | + | else invoke(this, "claimBaseAsset", [p(E), toString(N)], nil) | |
463 | + | } | |
464 | + | if ((bz == bz)) | |
465 | + | then { | |
466 | + | let bB = valueOrElse(getInteger(L(E)), 0) | |
467 | + | let bC = valueOrElse(getInteger(P(E, N)), 0) | |
468 | + | $Tuple2([IntegerEntry(L(E), (bB + bl.amount)), IntegerEntry(P(E, N), (bC + bl.amount)), IntegerEntry(Q(E, N), J), IntegerEntry(X(E, "get", J, N, ai.transactionId), bl.amount)], unit) | |
469 | + | } | |
470 | + | else throw("Strict value is not equal to itself.") | |
471 | + | } | |
472 | + | else throw("Strict value is not equal to itself.") | |
473 | + | } | |
474 | + | else throw("Strict value is not equal to itself.") | |
475 | + | } | |
476 | + | ||
477 | + | ||
478 | + | ||
479 | + | @Callable(ai) | |
480 | + | func claimBaseAsset (aV,bt) = { | |
481 | + | let bb = [am(ai)] | |
482 | + | if ((bb == bb)) | |
483 | + | then { | |
484 | + | let N = if ((bt == "")) | |
485 | + | then ai.caller | |
486 | + | else { | |
487 | + | let aN = ah(ai) | |
488 | + | if ((aN == aN)) | |
489 | + | then valueOrErrorMessage(addressFromString(bt), f("invalid user address")) | |
490 | + | else throw("Strict value is not equal to itself.") | |
491 | + | } | |
492 | + | if ((N == N)) | |
493 | + | then { | |
494 | + | let E = n(aV) | |
495 | + | let G = value(n(valueOrErrorMessage(getString(D(E)), f("invalid base asset id")))) | |
496 | + | if ((G == G)) | |
497 | + | then { | |
498 | + | let J = valueOrErrorMessage(getInteger(H(E)), f("invalid period")) | |
499 | + | if ((J == J)) | |
500 | + | then { | |
501 | + | let bC = valueOrElse(getInteger(P(E, N)), 0) | |
502 | + | let bu = if ((bC > 0)) | |
503 | + | then true | |
504 | + | else h("nothing to claim") | |
505 | + | if ((bu == bu)) | |
506 | + | then { | |
507 | + | let bA = valueOrErrorMessage(getInteger(Q(E, N)), f("failed to get period")) | |
508 | + | let bv = if ((J > bA)) | |
509 | + | then true | |
510 | + | else h("invalid period") | |
511 | + | if ((bv == bv)) | |
512 | + | then { | |
513 | + | let aL = toBigInt(valueOrErrorMessage(getBinary(V(E, bA)), f("failed to get price"))) | |
514 | + | let bD = toInt(fraction(toBigInt(bC), aL, e)) | |
515 | + | $Tuple2([IntegerEntry(P(E, N), 0), DeleteEntry(Q(E, N)), ScriptTransfer(N, bD, E), IntegerEntry(X(E, "claimBaseAsset", J, N, ai.transactionId), bD)], unit) | |
516 | + | } | |
517 | + | else throw("Strict value is not equal to itself.") | |
518 | + | } | |
519 | + | else throw("Strict value is not equal to itself.") | |
520 | + | } | |
521 | + | else throw("Strict value is not equal to itself.") | |
522 | + | } | |
523 | + | else throw("Strict value is not equal to itself.") | |
524 | + | } | |
525 | + | else throw("Strict value is not equal to itself.") | |
526 | + | } | |
527 | + | else throw("Strict value is not equal to itself.") | |
528 | + | } | |
529 | + | ||
530 | + | ||
531 | + | ||
532 | + | @Callable(ai) | |
533 | + | func finalize (aV) = { | |
534 | + | let bb = [am(ai)] | |
535 | + | if ((bb == bb)) | |
536 | + | then { | |
537 | + | let E = n(aV) | |
538 | + | let G = value(n(valueOrErrorMessage(getString(D(E)), f("invalid base asset id")))) | |
539 | + | if ((G == G)) | |
540 | + | then { | |
541 | + | let aI = valueOrErrorMessage(assetInfo(G), f("invalid share asset id")) | |
542 | + | let J = valueOrErrorMessage(getInteger(H(E)), f("invalid period")) | |
543 | + | if ((J == J)) | |
544 | + | then { | |
545 | + | let bE = getInteger(I(E, J)) | |
546 | + | let bF = if ((bE == unit)) | |
547 | + | then unit | |
548 | + | else { | |
549 | + | let bG = (height - value(bE)) | |
550 | + | let bH = max([0, (aw - bG)]) | |
551 | + | if ((bH == 0)) | |
552 | + | then unit | |
553 | + | else h(makeString(["finalization will be possible in ", toString(bH), " blocks"], "")) | |
554 | + | } | |
555 | + | if ((bF == bF)) | |
556 | + | then { | |
557 | + | let bI = valueOrErrorMessage(aA(E), f("invalid asset")) | |
558 | + | let bn = bI._1 | |
559 | + | let aH = bI._2 | |
560 | + | let bJ = valueOrErrorMessage({ | |
561 | + | let aF = invoke(ap, "claimWxDoNotThrow", [p(aH)], nil) | |
562 | + | if ($isInstanceOf(aF, "Int")) | |
563 | + | then aF | |
564 | + | else unit | |
565 | + | }, f("invalid claimWx result")) | |
566 | + | if ((bJ == bJ)) | |
567 | + | then { | |
568 | + | let br = valueOrElse(getInteger(K(E)), 0) | |
569 | + | let bB = valueOrElse(getInteger(L(E)), 0) | |
570 | + | let bK = { | |
571 | + | let bL = if (if ((bJ > 0)) | |
572 | + | then true | |
573 | + | else (br > 0)) | |
574 | + | then true | |
575 | + | else (bB > 0) | |
576 | + | if (bL) | |
577 | + | then true | |
578 | + | else h("nothing to finalize") | |
579 | + | } | |
580 | + | if ((bK == bK)) | |
581 | + | then { | |
582 | + | let bM = if ((bJ > 0)) | |
583 | + | then { | |
584 | + | let bN = fraction(bJ, az, ax) | |
585 | + | let bO = (bJ - bN) | |
586 | + | let bP = invoke(aq, "userMaxDurationREADONLY", [toString(this)], nil) | |
587 | + | let bQ = if ((bN > 0)) | |
588 | + | then { | |
589 | + | let ad = bP | |
590 | + | if (if (if ($isInstanceOf(ad._1, "String")) | |
591 | + | then $isInstanceOf(ad._2, "Int") | |
592 | + | else false) | |
593 | + | then $isInstanceOf(ad, "(String, Int)") | |
594 | + | else false) | |
595 | + | then { | |
596 | + | let bR = ad._1 | |
597 | + | let bS = ad._2 | |
598 | + | if ((bN > 0)) | |
599 | + | then invoke(aq, bR, [bS], [AttachedPayment(au, bN)]) | |
600 | + | else unit | |
601 | + | } | |
602 | + | else h("invalid lock params") | |
603 | + | } | |
604 | + | else unit | |
605 | + | if ((bQ == bQ)) | |
606 | + | then { | |
607 | + | let bT = if ((bO > 0)) | |
608 | + | then { | |
609 | + | let bU = au | |
610 | + | let bV = 0 | |
611 | + | let bW = p(at) | |
612 | + | let bX = toString(this) | |
613 | + | valueOrErrorMessage({ | |
614 | + | let aF = invoke(ar, "swap", [bV, bW, bX], [AttachedPayment(bU, bO)]) | |
615 | + | if ($isInstanceOf(aF, "Int")) | |
616 | + | then aF | |
617 | + | else unit | |
618 | + | }, f("invalid swap result")) | |
619 | + | } | |
620 | + | else 0 | |
621 | + | if ((bT == bT)) | |
622 | + | then { | |
623 | + | let bY = if ((bT > 0)) | |
624 | + | then { | |
625 | + | let bZ = 0 | |
626 | + | let ca = true | |
627 | + | valueOrErrorMessage({ | |
628 | + | let aF = invoke(bn, "putOneTknV2", [bZ, ca], [AttachedPayment(at, bT)]) | |
629 | + | if ($isInstanceOf(aF, "Int")) | |
630 | + | then aF | |
631 | + | else unit | |
632 | + | }, f("invalid putOneTknV2 result")) | |
633 | + | } | |
634 | + | else 0 | |
635 | + | if ((bY == bY)) | |
636 | + | then bY | |
637 | + | else throw("Strict value is not equal to itself.") | |
638 | + | } | |
639 | + | else throw("Strict value is not equal to itself.") | |
640 | + | } | |
641 | + | else throw("Strict value is not equal to itself.") | |
642 | + | } | |
643 | + | else unit | |
644 | + | if ((bM == bM)) | |
645 | + | then { | |
646 | + | let cb = if ((bB > 0)) | |
647 | + | then { | |
648 | + | let aL = aG(aH, G) | |
649 | + | if ((aL == aL)) | |
650 | + | then { | |
651 | + | let cc = toInt(fraction(toBigInt(bB), aL, e, FLOOR)) | |
652 | + | let bD = { | |
653 | + | let cd = E | |
654 | + | let bZ = 0 | |
655 | + | valueOrErrorMessage({ | |
656 | + | let aF = invoke(bn, "unstakeAndGetOneTknV2", [cc, p(cd), bZ], nil) | |
657 | + | if ($isInstanceOf(aF, "Int")) | |
658 | + | then aF | |
659 | + | else unit | |
660 | + | }, f("invalid unstakeAndGetOneTknV2 result")) | |
661 | + | } | |
662 | + | if ((bD == bD)) | |
663 | + | then { | |
664 | + | let ce = if ((aI.issuer == this)) | |
665 | + | then invoke(this, "burn", [G, bB], nil) | |
666 | + | else h("invalid share asset issuer") | |
667 | + | if ((ce == ce)) | |
668 | + | then { | |
669 | + | let cf = fraction(toBigInt(bD), e, toBigInt(bB), FLOOR) | |
670 | + | let cg = [BinaryEntry(V(E, J), toBytes(cf)), StringEntry(W(E), toString(cf))] | |
671 | + | cg | |
672 | + | } | |
673 | + | else throw("Strict value is not equal to itself.") | |
674 | + | } | |
675 | + | else throw("Strict value is not equal to itself.") | |
676 | + | } | |
677 | + | else throw("Strict value is not equal to itself.") | |
678 | + | } | |
679 | + | else nil | |
680 | + | if ((cb == cb)) | |
681 | + | then { | |
682 | + | let ch = if ((br > 0)) | |
683 | + | then { | |
684 | + | let bY = { | |
685 | + | let bZ = 0 | |
686 | + | let ca = true | |
687 | + | valueOrErrorMessage({ | |
688 | + | let aF = invoke(bn, "putOneTknV2", [bZ, ca], [AttachedPayment(E, br)]) | |
689 | + | if ($isInstanceOf(aF, "Int")) | |
690 | + | then aF | |
691 | + | else unit | |
692 | + | }, f("invalid putOneTknV2 result")) | |
693 | + | } | |
694 | + | if ((bY == bY)) | |
695 | + | then { | |
696 | + | let aL = aG(aH, G) | |
697 | + | if ((aL == aL)) | |
698 | + | then { | |
699 | + | let bw = toInt(fraction(toBigInt(bY), e, aL, FLOOR)) | |
700 | + | let ci = if ((aI.issuer == this)) | |
701 | + | then invoke(this, "emit", [G, bw], nil) | |
702 | + | else h("invalid share asset issuer") | |
703 | + | if ((ci == ci)) | |
704 | + | then { | |
705 | + | let cj = fraction(toBigInt(br), e, toBigInt(bw)) | |
706 | + | let ck = [BinaryEntry(T(E, J), toBytes(cj)), StringEntry(U(E), toString(cj))] | |
707 | + | ck | |
708 | + | } | |
709 | + | else throw("Strict value is not equal to itself.") | |
710 | + | } | |
711 | + | else throw("Strict value is not equal to itself.") | |
712 | + | } | |
713 | + | else throw("Strict value is not equal to itself.") | |
714 | + | } | |
715 | + | else nil | |
716 | + | if ((ch == ch)) | |
717 | + | then { | |
718 | + | let cl = (J + 1) | |
719 | + | let cm = aG(aH, G) | |
720 | + | let cn = (([IntegerEntry(H(E), cl), IntegerEntry(I(E, cl), height), IntegerEntry(L(E), 0), IntegerEntry(K(E), 0), BinaryEntry(R(E, J), toBytes(cm)), StringEntry(S(E), toString(cm))] ++ ch) ++ cb) | |
721 | + | $Tuple2(cn, toBytes(cm)) | |
722 | + | } | |
723 | + | else throw("Strict value is not equal to itself.") | |
724 | + | } | |
725 | + | else throw("Strict value is not equal to itself.") | |
726 | + | } | |
727 | + | else throw("Strict value is not equal to itself.") | |
728 | + | } | |
729 | + | else throw("Strict value is not equal to itself.") | |
730 | + | } | |
731 | + | else throw("Strict value is not equal to itself.") | |
732 | + | } | |
733 | + | else throw("Strict value is not equal to itself.") | |
734 | + | } | |
735 | + | else throw("Strict value is not equal to itself.") | |
736 | + | } | |
737 | + | else throw("Strict value is not equal to itself.") | |
738 | + | } | |
739 | + | else throw("Strict value is not equal to itself.") | |
740 | + | } | |
741 | + | ||
742 | + | ||
743 | + | @Verifier(co) | |
744 | + | func cp () = { | |
745 | + | let cq = { | |
746 | + | let ad = ac() | |
747 | + | if ($isInstanceOf(ad, "ByteVector")) | |
269 | 748 | then { | |
270 | - | let | |
271 | - | | |
749 | + | let ak = ad | |
750 | + | ak | |
272 | 751 | } | |
273 | - | else if ($isInstanceOf( | |
274 | - | then | |
752 | + | else if ($isInstanceOf(ad, "Unit")) | |
753 | + | then co.senderPublicKey | |
275 | 754 | else throw("Match error") | |
276 | 755 | } | |
277 | - | sigVerify( | |
756 | + | sigVerify(co.bodyBytes, co.proofs[0], cq) | |
278 | 757 | } | |
279 | 758 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | - | let b = | |
6 | + | let b = 8 | |
7 | 7 | ||
8 | - | func c (d) = valueOrErrorMessage(getString(this, d), ("No data for this.key=" + d)) | |
8 | + | let c = "WAVES" | |
9 | + | ||
10 | + | let d = 1000000000000000000 | |
11 | + | ||
12 | + | let e = toBigInt(d) | |
13 | + | ||
14 | + | func f (g) = makeString(["lp_staking_pools.ride:", g], " ") | |
9 | 15 | ||
10 | 16 | ||
11 | - | let e = throw("Pool disabled") | |
12 | - | ||
13 | - | let f = throw("Pool is not exist") | |
14 | - | ||
15 | - | let g = throw("Slippage is too big") | |
16 | - | ||
17 | - | func h () = "%s__managerPublicKey" | |
17 | + | func h (g) = throw(f(g)) | |
18 | 18 | ||
19 | 19 | ||
20 | - | func i () = " | |
20 | + | func i (j,k) = f(makeString(["mandatory ", toString(j), ".", k, " is not defined"], "")) | |
21 | 21 | ||
22 | 22 | ||
23 | - | func | |
23 | + | func l (j,k) = valueOrErrorMessage(getString(j, k), i(j, k)) | |
24 | 24 | ||
25 | 25 | ||
26 | - | let k = addressFromStringValue(c(j())) | |
27 | - | ||
28 | - | func l () = makeString(["%s", "protocolFee"], a) | |
26 | + | func m (j,k) = valueOrErrorMessage(getInteger(j, k), i(j, k)) | |
29 | 27 | ||
30 | 28 | ||
31 | - | func m () = makeString(["%s", "poolFee"], a) | |
29 | + | func n (o) = if ((o == c)) | |
30 | + | then unit | |
31 | + | else fromBase58String(o) | |
32 | 32 | ||
33 | 33 | ||
34 | - | func n (o,d) = valueOrErrorMessage(getString(o, d), makeString(["mandatory ", toString(o), ".", d, " is not defined"], "")) | |
34 | + | func p (o) = if ((o == unit)) | |
35 | + | then c | |
36 | + | else toBase58String(value(o)) | |
35 | 37 | ||
36 | 38 | ||
37 | - | let p = "%s__feeCollectorAddress" | |
38 | - | ||
39 | - | let q = addressFromStringValue(n(k, p)) | |
40 | - | ||
41 | - | func r (s) = { | |
42 | - | let t = s | |
43 | - | if ($isInstanceOf(t, "Int")) | |
44 | - | then { | |
45 | - | let u = t | |
46 | - | u | |
47 | - | } | |
48 | - | else throw("fail to cast into Int") | |
49 | - | } | |
39 | + | func q (r) = if ((r >= 0)) | |
40 | + | then r | |
41 | + | else h("value should be positive") | |
50 | 42 | ||
51 | 43 | ||
52 | - | func | |
44 | + | func s () = makeString(["%s", "factoryContract"], a) | |
53 | 45 | ||
54 | 46 | ||
55 | - | func y () = { | |
56 | - | let t = getString(h()) | |
57 | - | if ($isInstanceOf(t, "String")) | |
47 | + | func t () = makeString(["%s", "lpStakingContract"], a) | |
48 | + | ||
49 | + | ||
50 | + | func u () = makeString(["%s", "stakingContract"], a) | |
51 | + | ||
52 | + | ||
53 | + | func v () = makeString(["%s", "boostingContract"], a) | |
54 | + | ||
55 | + | ||
56 | + | func w () = makeString(["%s", "swapContract"], a) | |
57 | + | ||
58 | + | ||
59 | + | func x () = makeString(["%s", "assetsStoreContract"], a) | |
60 | + | ||
61 | + | ||
62 | + | func y () = makeString(["%s", "usdtAssetId"], a) | |
63 | + | ||
64 | + | ||
65 | + | func z () = makeString(["%s", "wxAssetId"], a) | |
66 | + | ||
67 | + | ||
68 | + | func A () = makeString(["%s", "shutdown"], a) | |
69 | + | ||
70 | + | ||
71 | + | func B () = makeString(["%s", "minDelay"], a) | |
72 | + | ||
73 | + | ||
74 | + | func C () = makeString(["%s", "lockFraction"], a) | |
75 | + | ||
76 | + | ||
77 | + | func D (E) = makeString(["%s%s", p(E), "shareAssetId"], a) | |
78 | + | ||
79 | + | ||
80 | + | func F (G) = makeString(["%s%s", p(G), "baseAssetId"], a) | |
81 | + | ||
82 | + | ||
83 | + | func H (E) = makeString(["%s%s", p(E), "period"], a) | |
84 | + | ||
85 | + | ||
86 | + | func I (E,J) = makeString(["%s%s%d", p(E), "periodStartHeight", toString(J)], a) | |
87 | + | ||
88 | + | ||
89 | + | func K (E) = makeString(["%s%s", p(E), "baseAssetAmountToConvert"], a) | |
90 | + | ||
91 | + | ||
92 | + | func L (E) = makeString(["%s%s", p(E), "shareAssetAmountToConvert"], a) | |
93 | + | ||
94 | + | ||
95 | + | func M (E,N) = makeString(["%s%s%s", p(E), toString(N), "baseAssetAmountToConvert"], a) | |
96 | + | ||
97 | + | ||
98 | + | func O (E,N) = makeString(["%s%s%s%s", p(E), toString(N), "baseAssetAmountToConvert", "period"], a) | |
99 | + | ||
100 | + | ||
101 | + | func P (E,N) = makeString(["%s%s%s", p(E), toString(N), "shareAssetAmountToConvert"], a) | |
102 | + | ||
103 | + | ||
104 | + | func Q (E,N) = makeString(["%s%s%s%s", p(E), toString(N), "shareAssetAmountToConvert", "period"], a) | |
105 | + | ||
106 | + | ||
107 | + | func R (E,J) = makeString(["%s%s%d", p(E), "price", toString(J)], a) | |
108 | + | ||
109 | + | ||
110 | + | func S (E) = makeString(["%s%s%s%d%d", p(E), "price", "history", toString(lastBlock.height), toString(lastBlock.timestamp)], a) | |
111 | + | ||
112 | + | ||
113 | + | func T (E,J) = makeString(["%s%s%d%s", p(E), "price", toString(J), "put"], a) | |
114 | + | ||
115 | + | ||
116 | + | func U (E) = makeString(["%s%s%s%s%d%d", p(E), "price", "history", "put", toString(lastBlock.height), toString(lastBlock.timestamp)], a) | |
117 | + | ||
118 | + | ||
119 | + | func V (E,J) = makeString(["%s%s%d%s", p(E), "price", toString(J), "get"], a) | |
120 | + | ||
121 | + | ||
122 | + | func W (E) = makeString(["%s%s%s%s%d%d", p(E), "price", "history", "get", toString(lastBlock.height), toString(lastBlock.timestamp)], a) | |
123 | + | ||
124 | + | ||
125 | + | func X (E,Y,J,N,Z) = makeString(["%s%s%s%s", "history", Y, toString(N), toBase58String(Z), toString(height)], a) | |
126 | + | ||
127 | + | ||
128 | + | func aa () = "%s__managerPublicKey" | |
129 | + | ||
130 | + | ||
131 | + | func ab () = "%s__pendingManagerPublicKey" | |
132 | + | ||
133 | + | ||
134 | + | func ac () = { | |
135 | + | let ad = getString(aa()) | |
136 | + | if ($isInstanceOf(ad, "String")) | |
58 | 137 | then { | |
59 | - | let | |
60 | - | fromBase58String( | |
138 | + | let ae = ad | |
139 | + | fromBase58String(ae) | |
61 | 140 | } | |
62 | - | else if ($isInstanceOf( | |
141 | + | else if ($isInstanceOf(ad, "Unit")) | |
63 | 142 | then unit | |
64 | 143 | else throw("Match error") | |
65 | 144 | } | |
66 | 145 | ||
67 | 146 | ||
68 | - | func | |
69 | - | let | |
70 | - | if ($isInstanceOf( | |
147 | + | func af () = { | |
148 | + | let ad = getString(ab()) | |
149 | + | if ($isInstanceOf(ad, "String")) | |
71 | 150 | then { | |
72 | - | let | |
73 | - | fromBase58String( | |
151 | + | let ae = ad | |
152 | + | fromBase58String(ae) | |
74 | 153 | } | |
75 | - | else if ($isInstanceOf( | |
154 | + | else if ($isInstanceOf(ad, "Unit")) | |
76 | 155 | then unit | |
77 | 156 | else throw("Match error") | |
78 | 157 | } | |
79 | 158 | ||
80 | 159 | ||
81 | - | func B (C) = { | |
82 | - | let t = y() | |
83 | - | if ($isInstanceOf(t, "ByteVector")) | |
160 | + | let ag = throw("Permission denied") | |
161 | + | ||
162 | + | func ah (ai) = if ((ai.caller == this)) | |
163 | + | then true | |
164 | + | else ag | |
165 | + | ||
166 | + | ||
167 | + | func aj (ai) = { | |
168 | + | let ad = ac() | |
169 | + | if ($isInstanceOf(ad, "ByteVector")) | |
84 | 170 | then { | |
85 | - | let D = t | |
86 | - | (C.callerPublicKey == D) | |
171 | + | let ak = ad | |
172 | + | if ((ai.callerPublicKey == ak)) | |
173 | + | then true | |
174 | + | else ag | |
87 | 175 | } | |
88 | - | else if ($isInstanceOf( | |
89 | - | then ( | |
176 | + | else if ($isInstanceOf(ad, "Unit")) | |
177 | + | then ah(ai) | |
90 | 178 | else throw("Match error") | |
91 | 179 | } | |
92 | 180 | ||
93 | 181 | ||
94 | - | func E (C) = if (B(C)) | |
182 | + | let al = valueOrElse(getBoolean(A()), false) | |
183 | + | ||
184 | + | func am (ai) = if (if (!(al)) | |
95 | 185 | then true | |
96 | - | else throw("permission denied") | |
186 | + | else aj(ai)) | |
187 | + | then true | |
188 | + | else throw("operation is disabled") | |
97 | 189 | ||
98 | 190 | ||
99 | - | func F (G) = if ((G == "WAVES")) | |
100 | - | then wavesBalance(this).available | |
101 | - | else assetBalance(this, fromBase58String(G)) | |
191 | + | let an = addressFromStringValue(l(this, s())) | |
102 | 192 | ||
193 | + | let ao = addressFromStringValue(l(this, t())) | |
103 | 194 | ||
104 | - | func H (I,J) = { | |
105 | - | let K = { | |
106 | - | let L = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [I, J], nil) | |
107 | - | if ($isInstanceOf(L, "String")) | |
108 | - | then L | |
195 | + | let ap = addressFromStringValue(l(this, u())) | |
196 | + | ||
197 | + | let aq = addressFromStringValue(l(this, v())) | |
198 | + | ||
199 | + | let ar = addressFromStringValue(l(this, w())) | |
200 | + | ||
201 | + | let as = addressFromStringValue(l(this, x())) | |
202 | + | ||
203 | + | let at = n(l(this, y())) | |
204 | + | ||
205 | + | let au = n(l(this, z())) | |
206 | + | ||
207 | + | let av = 1440 | |
208 | + | ||
209 | + | let aw = valueOrElse(getInteger(this, B()), av) | |
210 | + | ||
211 | + | let ax = 100000000 | |
212 | + | ||
213 | + | let ay = fraction(1, ax, 2) | |
214 | + | ||
215 | + | let az = valueOrElse(getInteger(this, C()), ay) | |
216 | + | ||
217 | + | func aA (aB) = { | |
218 | + | let aC = p(aB) | |
219 | + | let aD = p(at) | |
220 | + | let aE = { | |
221 | + | let aF = invoke(an, "poolInfoREADONLY", [aC, aD], nil) | |
222 | + | if ($isInstanceOf(aF, "(Address, ByteVector)")) | |
223 | + | then aF | |
109 | 224 | else unit | |
110 | 225 | } | |
111 | - | let M = { | |
112 | - | let L = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [J, I], nil) | |
113 | - | if ($isInstanceOf(L, "String")) | |
114 | - | then L | |
115 | - | else unit | |
116 | - | } | |
117 | - | let N = if ((K != unit)) | |
118 | - | then { | |
119 | - | let O = { | |
120 | - | let L = invoke(k, "getPoolAddressFromLpAssetREADONLY", [value(K)], nil) | |
121 | - | if ($isInstanceOf(L, "String")) | |
122 | - | then L | |
123 | - | else throw(($getType(L) + " couldn't be cast to String")) | |
124 | - | } | |
125 | - | $Tuple2(false, O) | |
126 | - | } | |
127 | - | else if ((M != unit)) | |
128 | - | then { | |
129 | - | let O = { | |
130 | - | let L = invoke(k, "getPoolAddressFromLpAssetREADONLY", [value(M)], nil) | |
131 | - | if ($isInstanceOf(L, "String")) | |
132 | - | then L | |
133 | - | else throw(($getType(L) + " couldn't be cast to String")) | |
134 | - | } | |
135 | - | $Tuple2(true, O) | |
136 | - | } | |
137 | - | else f | |
138 | - | let P = N._1 | |
139 | - | let O = N._2 | |
140 | - | let Q = { | |
141 | - | let L = invoke(k, "getPoolStatusREADONLY", [O], nil) | |
142 | - | if ($isInstanceOf(L, "Int")) | |
143 | - | then L | |
144 | - | else throw(($getType(L) + " couldn't be cast to Int")) | |
145 | - | } | |
146 | - | let R = if ((Q == 1)) | |
147 | - | then true | |
148 | - | else e | |
149 | - | if ((R == R)) | |
150 | - | then { | |
151 | - | let S = addressFromStringValue(valueOrElse(O, "")) | |
152 | - | $Tuple2(S, P) | |
153 | - | } | |
154 | - | else throw("Strict value is not equal to itself.") | |
226 | + | aE | |
155 | 227 | } | |
156 | 228 | ||
157 | 229 | ||
158 | - | @Callable(C) | |
159 | - | func swapCalculateREADONLY (T,I,J) = { | |
160 | - | let U = value(getInteger(l())) | |
161 | - | let V = fraction(toBigInt(T), toBigInt(U), b) | |
162 | - | let W = value(getInteger(m())) | |
163 | - | let X = fraction(toBigInt(T), toBigInt(W), b) | |
164 | - | let Y = if ((toInt(V) == 0)) | |
165 | - | then toBigInt(1) | |
166 | - | else V | |
167 | - | let Z = if ((toInt(X) == 0)) | |
168 | - | then toBigInt(1) | |
169 | - | else X | |
170 | - | let aa = ((toBigInt(T) - Y) - Z) | |
171 | - | let ab = H(I, J) | |
172 | - | let S = ab._1 | |
173 | - | let P = ab._2 | |
174 | - | let ac = { | |
175 | - | let L = invoke(S, "calculateAmountOutForSwapREADONLY", [toInt(aa), P, toInt(Z)], nil) | |
176 | - | if ($isInstanceOf(L, "Int")) | |
177 | - | then L | |
178 | - | else throw(($getType(L) + " couldn't be cast to Int")) | |
179 | - | } | |
180 | - | $Tuple2(nil, ac) | |
230 | + | func aG (aH,G) = { | |
231 | + | let aI = valueOrErrorMessage(assetInfo(G), "failed to get share asset info") | |
232 | + | let aJ = aI.quantity | |
233 | + | let aK = q(valueOrErrorMessage({ | |
234 | + | let aF = invoke(ap, "stakedByUserREADONLY", [p(aH), toString(this)], nil) | |
235 | + | if ($isInstanceOf(aF, "Int")) | |
236 | + | then aF | |
237 | + | else unit | |
238 | + | }, f("invalid stakedByUserREADONLY result"))) | |
239 | + | let aL = if ((aJ == 0)) | |
240 | + | then e | |
241 | + | else fraction(toBigInt(aK), e, toBigInt(aJ), FLOOR) | |
242 | + | aL | |
181 | 243 | } | |
182 | 244 | ||
183 | 245 | ||
184 | - | ||
185 | - | @Callable(C) | |
186 | - | func swap (ad,ae,af) = { | |
187 | - | let J = if ((ae == "")) | |
188 | - | then "WAVES" | |
189 | - | else ae | |
190 | - | let ag = value(C.payments[0]) | |
191 | - | let I = if ((ag.assetId == unit)) | |
192 | - | then "WAVES" | |
193 | - | else toBase58String(value(ag.assetId)) | |
194 | - | let T = value(ag.amount) | |
195 | - | let U = value(getInteger(l())) | |
196 | - | let V = fraction(toBigInt(T), toBigInt(U), b) | |
197 | - | let W = value(getInteger(m())) | |
198 | - | let X = fraction(toBigInt(T), toBigInt(W), b) | |
199 | - | let Y = if ((toInt(V) == 0)) | |
200 | - | then toBigInt(1) | |
201 | - | else V | |
202 | - | let Z = if ((toInt(X) == 0)) | |
203 | - | then toBigInt(1) | |
204 | - | else X | |
205 | - | let aa = ((toBigInt(T) - Y) - Z) | |
206 | - | let ah = [if ((size(C.payments) == 1)) | |
207 | - | then true | |
208 | - | else throw("exactly 1 payment are expected")] | |
209 | - | if ((ah == ah)) | |
246 | + | @Callable(ai) | |
247 | + | func setManager (aM) = { | |
248 | + | let aN = aj(ai) | |
249 | + | if ((aN == aN)) | |
210 | 250 | then { | |
211 | - | let ai = H(I, J) | |
212 | - | let S = ai._1 | |
213 | - | let P = ai._2 | |
214 | - | let aj = if ((I == "WAVES")) | |
215 | - | then unit | |
216 | - | else fromBase58String(I) | |
217 | - | let ak = { | |
218 | - | let L = invoke(S, "calculateAmountOutForSwapAndSendTokens", [toInt(aa), P, ad, af, toInt(Z)], [AttachedPayment(aj, toInt(aa))]) | |
219 | - | if ($isInstanceOf(L, "Int")) | |
220 | - | then L | |
221 | - | else throw(($getType(L) + " couldn't be cast to Int")) | |
222 | - | } | |
223 | - | $Tuple2([ScriptTransfer(q, toInt(Y), aj), ScriptTransfer(S, toInt(Z), aj)], ak) | |
224 | - | } | |
225 | - | else throw("Strict value is not equal to itself.") | |
226 | - | } | |
227 | - | ||
228 | - | ||
229 | - | ||
230 | - | @Callable(C) | |
231 | - | func setManager (al) = { | |
232 | - | let am = E(C) | |
233 | - | if ((am == am)) | |
234 | - | then { | |
235 | - | let an = fromBase58String(al) | |
236 | - | if ((an == an)) | |
237 | - | then [StringEntry(i(), al)] | |
251 | + | let aO = fromBase58String(aM) | |
252 | + | if ((aO == aO)) | |
253 | + | then [StringEntry(ab(), aM)] | |
238 | 254 | else throw("Strict value is not equal to itself.") | |
239 | 255 | } | |
240 | 256 | else throw("Strict value is not equal to itself.") | |
241 | 257 | } | |
242 | 258 | ||
243 | 259 | ||
244 | 260 | ||
245 | - | @Callable( | |
261 | + | @Callable(ai) | |
246 | 262 | func confirmManager () = { | |
247 | - | let | |
248 | - | let | |
263 | + | let aP = af() | |
264 | + | let aQ = if (isDefined(aP)) | |
249 | 265 | then true | |
250 | - | else | |
251 | - | if (( | |
266 | + | else h("no pending manager") | |
267 | + | if ((aQ == aQ)) | |
252 | 268 | then { | |
253 | - | let | |
269 | + | let aR = if ((ai.callerPublicKey == value(aP))) | |
254 | 270 | then true | |
255 | - | else | |
256 | - | if (( | |
257 | - | then [StringEntry( | |
271 | + | else h("you are not pending manager") | |
272 | + | if ((aR == aR)) | |
273 | + | then [StringEntry(aa(), toBase58String(value(aP))), DeleteEntry(ab())] | |
258 | 274 | else throw("Strict value is not equal to itself.") | |
259 | 275 | } | |
260 | 276 | else throw("Strict value is not equal to itself.") | |
261 | 277 | } | |
262 | 278 | ||
263 | 279 | ||
264 | - | @Verifier(ar) | |
265 | - | func as () = { | |
266 | - | let at = { | |
267 | - | let t = y() | |
268 | - | if ($isInstanceOf(t, "ByteVector")) | |
280 | + | ||
281 | + | @Callable(ai) | |
282 | + | func emit (aS,aT) = { | |
283 | + | let aN = ah(ai) | |
284 | + | if ((aN == aN)) | |
285 | + | then { | |
286 | + | let aU = true | |
287 | + | $Tuple2([Reissue(aS, aT, aU)], aT) | |
288 | + | } | |
289 | + | else throw("Strict value is not equal to itself.") | |
290 | + | } | |
291 | + | ||
292 | + | ||
293 | + | ||
294 | + | @Callable(ai) | |
295 | + | func burn (aS,aT) = { | |
296 | + | let aN = ah(ai) | |
297 | + | if ((aN == aN)) | |
298 | + | then $Tuple2([Burn(aS, aT)], aT) | |
299 | + | else throw("Strict value is not equal to itself.") | |
300 | + | } | |
301 | + | ||
302 | + | ||
303 | + | ||
304 | + | @Callable(ai) | |
305 | + | func create (aV,aW,aX,aY,aZ) = { | |
306 | + | let ba = "STAKING_LP" | |
307 | + | let E = n(aV) | |
308 | + | let bb = [aj(ai), if (isDefined(aA(E))) | |
309 | + | then true | |
310 | + | else h("invalid base asset")] | |
311 | + | if ((bb == bb)) | |
312 | + | then { | |
313 | + | let bc = [IntegerEntry(H(E), 0)] | |
314 | + | if ((aW == "")) | |
315 | + | then { | |
316 | + | let bd = 1 | |
317 | + | let be = Issue(aX, aY, bd, b, true) | |
318 | + | let bf = calculateAssetId(be) | |
319 | + | let bg = Burn(bf, bd) | |
320 | + | let bh = toBase58String(bf) | |
321 | + | let bi = invoke(as, "createOrUpdate", [bh, aZ, false], nil) | |
322 | + | if ((bi == bi)) | |
323 | + | then { | |
324 | + | let bj = invoke(as, "addLabel", [bh, ba], nil) | |
325 | + | if ((bj == bj)) | |
326 | + | then $Tuple2((bc ++ [be, bg, StringEntry(D(E), bh), StringEntry(F(bf), aV)]), bh) | |
327 | + | else throw("Strict value is not equal to itself.") | |
328 | + | } | |
329 | + | else throw("Strict value is not equal to itself.") | |
330 | + | } | |
331 | + | else { | |
332 | + | let G = fromBase58String(aW) | |
333 | + | let aI = valueOrErrorMessage(assetInfo(G), f("invalid share asset id")) | |
334 | + | let bk = if ((aI.issuer == ao)) | |
335 | + | then true | |
336 | + | else h("invalid share asset id issuer") | |
337 | + | if ((bk == bk)) | |
338 | + | then $Tuple2((bc ++ [StringEntry(D(E), aW), StringEntry(F(G), aV)]), aW) | |
339 | + | else throw("Strict value is not equal to itself.") | |
340 | + | } | |
341 | + | } | |
342 | + | else throw("Strict value is not equal to itself.") | |
343 | + | } | |
344 | + | ||
345 | + | ||
346 | + | ||
347 | + | @Callable(ai) | |
348 | + | func put () = { | |
349 | + | let bl = if ((size(ai.payments) == 1)) | |
350 | + | then ai.payments[0] | |
351 | + | else h("exactly 1 payment is expected") | |
352 | + | let E = bl.assetId | |
353 | + | let N = ai.caller | |
354 | + | let bb = [am(ai), if (isDefined(getString(D(E)))) | |
355 | + | then true | |
356 | + | else h("invalid asset")] | |
357 | + | if ((bb == bb)) | |
358 | + | then { | |
359 | + | let bm = valueOrErrorMessage(aA(E), f("invalid asset")) | |
360 | + | let bn = bm._1 | |
361 | + | let aH = bm._2 | |
362 | + | let J = value(getInteger(H(E))) | |
363 | + | let bo = getInteger(O(E, N)) | |
364 | + | let bp = if ((bo == unit)) | |
365 | + | then unit | |
366 | + | else { | |
367 | + | let bq = value(bo) | |
368 | + | if ((bq == J)) | |
369 | + | then unit | |
370 | + | else invoke(this, "claimShareAsset", [p(E), toString(N)], nil) | |
371 | + | } | |
372 | + | if ((bp == bp)) | |
373 | + | then { | |
374 | + | let br = valueOrElse(getInteger(K(E)), 0) | |
375 | + | let bs = valueOrElse(getInteger(M(E, N)), 0) | |
376 | + | $Tuple2([IntegerEntry(K(E), (br + bl.amount)), IntegerEntry(M(E, N), (bs + bl.amount)), IntegerEntry(O(E, N), J), IntegerEntry(X(E, "put", J, N, ai.transactionId), bl.amount)], unit) | |
377 | + | } | |
378 | + | else throw("Strict value is not equal to itself.") | |
379 | + | } | |
380 | + | else throw("Strict value is not equal to itself.") | |
381 | + | } | |
382 | + | ||
383 | + | ||
384 | + | ||
385 | + | @Callable(ai) | |
386 | + | func claimShareAsset (aV,bt) = { | |
387 | + | let bb = [am(ai)] | |
388 | + | if ((bb == bb)) | |
389 | + | then { | |
390 | + | let N = if ((bt == "")) | |
391 | + | then ai.caller | |
392 | + | else { | |
393 | + | let aN = ah(ai) | |
394 | + | if ((aN == aN)) | |
395 | + | then valueOrErrorMessage(addressFromString(bt), f("invalid user address")) | |
396 | + | else throw("Strict value is not equal to itself.") | |
397 | + | } | |
398 | + | if ((N == N)) | |
399 | + | then { | |
400 | + | let E = n(aV) | |
401 | + | let G = value(n(valueOrErrorMessage(getString(D(E)), f("invalid base asset id")))) | |
402 | + | if ((G == G)) | |
403 | + | then { | |
404 | + | let J = valueOrErrorMessage(getInteger(H(E)), f("invalid period")) | |
405 | + | if ((J == J)) | |
406 | + | then { | |
407 | + | let bs = valueOrElse(getInteger(M(E, N)), 0) | |
408 | + | let bu = if ((bs > 0)) | |
409 | + | then true | |
410 | + | else h("nothing to claim") | |
411 | + | if ((bu == bu)) | |
412 | + | then { | |
413 | + | let bq = valueOrErrorMessage(getInteger(O(E, N)), f("failed to get period")) | |
414 | + | let bv = if ((J > bq)) | |
415 | + | then true | |
416 | + | else h("invalid period") | |
417 | + | if ((bv == bv)) | |
418 | + | then { | |
419 | + | let aL = toBigInt(valueOrErrorMessage(getBinary(T(E, bq)), f("failed to get price"))) | |
420 | + | let bw = toInt(fraction(toBigInt(bs), e, aL)) | |
421 | + | $Tuple2([IntegerEntry(M(E, N), 0), DeleteEntry(O(E, N)), ScriptTransfer(N, bw, G), IntegerEntry(X(E, "claimShareAsset", J, N, ai.transactionId), bw)], unit) | |
422 | + | } | |
423 | + | else throw("Strict value is not equal to itself.") | |
424 | + | } | |
425 | + | else throw("Strict value is not equal to itself.") | |
426 | + | } | |
427 | + | else throw("Strict value is not equal to itself.") | |
428 | + | } | |
429 | + | else throw("Strict value is not equal to itself.") | |
430 | + | } | |
431 | + | else throw("Strict value is not equal to itself.") | |
432 | + | } | |
433 | + | else throw("Strict value is not equal to itself.") | |
434 | + | } | |
435 | + | ||
436 | + | ||
437 | + | ||
438 | + | @Callable(ai) | |
439 | + | func get () = { | |
440 | + | let bb = [am(ai)] | |
441 | + | if ((bb == bb)) | |
442 | + | then { | |
443 | + | let bl = if ((size(ai.payments) == 1)) | |
444 | + | then ai.payments[0] | |
445 | + | else h("exactly 1 payment is expected") | |
446 | + | let G = bl.assetId | |
447 | + | let E = value(n(valueOrErrorMessage(getString(F(G)), f("invalid share asset id")))) | |
448 | + | if ((E == E)) | |
449 | + | then { | |
450 | + | let N = ai.caller | |
451 | + | let bx = valueOrErrorMessage(aA(E), f("invalid asset")) | |
452 | + | let bn = bx._1 | |
453 | + | let aH = bx._2 | |
454 | + | let J = value(getInteger(H(E))) | |
455 | + | let by = getInteger(Q(E, N)) | |
456 | + | let bz = if ((by == unit)) | |
457 | + | then unit | |
458 | + | else { | |
459 | + | let bA = value(by) | |
460 | + | if ((bA == J)) | |
461 | + | then unit | |
462 | + | else invoke(this, "claimBaseAsset", [p(E), toString(N)], nil) | |
463 | + | } | |
464 | + | if ((bz == bz)) | |
465 | + | then { | |
466 | + | let bB = valueOrElse(getInteger(L(E)), 0) | |
467 | + | let bC = valueOrElse(getInteger(P(E, N)), 0) | |
468 | + | $Tuple2([IntegerEntry(L(E), (bB + bl.amount)), IntegerEntry(P(E, N), (bC + bl.amount)), IntegerEntry(Q(E, N), J), IntegerEntry(X(E, "get", J, N, ai.transactionId), bl.amount)], unit) | |
469 | + | } | |
470 | + | else throw("Strict value is not equal to itself.") | |
471 | + | } | |
472 | + | else throw("Strict value is not equal to itself.") | |
473 | + | } | |
474 | + | else throw("Strict value is not equal to itself.") | |
475 | + | } | |
476 | + | ||
477 | + | ||
478 | + | ||
479 | + | @Callable(ai) | |
480 | + | func claimBaseAsset (aV,bt) = { | |
481 | + | let bb = [am(ai)] | |
482 | + | if ((bb == bb)) | |
483 | + | then { | |
484 | + | let N = if ((bt == "")) | |
485 | + | then ai.caller | |
486 | + | else { | |
487 | + | let aN = ah(ai) | |
488 | + | if ((aN == aN)) | |
489 | + | then valueOrErrorMessage(addressFromString(bt), f("invalid user address")) | |
490 | + | else throw("Strict value is not equal to itself.") | |
491 | + | } | |
492 | + | if ((N == N)) | |
493 | + | then { | |
494 | + | let E = n(aV) | |
495 | + | let G = value(n(valueOrErrorMessage(getString(D(E)), f("invalid base asset id")))) | |
496 | + | if ((G == G)) | |
497 | + | then { | |
498 | + | let J = valueOrErrorMessage(getInteger(H(E)), f("invalid period")) | |
499 | + | if ((J == J)) | |
500 | + | then { | |
501 | + | let bC = valueOrElse(getInteger(P(E, N)), 0) | |
502 | + | let bu = if ((bC > 0)) | |
503 | + | then true | |
504 | + | else h("nothing to claim") | |
505 | + | if ((bu == bu)) | |
506 | + | then { | |
507 | + | let bA = valueOrErrorMessage(getInteger(Q(E, N)), f("failed to get period")) | |
508 | + | let bv = if ((J > bA)) | |
509 | + | then true | |
510 | + | else h("invalid period") | |
511 | + | if ((bv == bv)) | |
512 | + | then { | |
513 | + | let aL = toBigInt(valueOrErrorMessage(getBinary(V(E, bA)), f("failed to get price"))) | |
514 | + | let bD = toInt(fraction(toBigInt(bC), aL, e)) | |
515 | + | $Tuple2([IntegerEntry(P(E, N), 0), DeleteEntry(Q(E, N)), ScriptTransfer(N, bD, E), IntegerEntry(X(E, "claimBaseAsset", J, N, ai.transactionId), bD)], unit) | |
516 | + | } | |
517 | + | else throw("Strict value is not equal to itself.") | |
518 | + | } | |
519 | + | else throw("Strict value is not equal to itself.") | |
520 | + | } | |
521 | + | else throw("Strict value is not equal to itself.") | |
522 | + | } | |
523 | + | else throw("Strict value is not equal to itself.") | |
524 | + | } | |
525 | + | else throw("Strict value is not equal to itself.") | |
526 | + | } | |
527 | + | else throw("Strict value is not equal to itself.") | |
528 | + | } | |
529 | + | ||
530 | + | ||
531 | + | ||
532 | + | @Callable(ai) | |
533 | + | func finalize (aV) = { | |
534 | + | let bb = [am(ai)] | |
535 | + | if ((bb == bb)) | |
536 | + | then { | |
537 | + | let E = n(aV) | |
538 | + | let G = value(n(valueOrErrorMessage(getString(D(E)), f("invalid base asset id")))) | |
539 | + | if ((G == G)) | |
540 | + | then { | |
541 | + | let aI = valueOrErrorMessage(assetInfo(G), f("invalid share asset id")) | |
542 | + | let J = valueOrErrorMessage(getInteger(H(E)), f("invalid period")) | |
543 | + | if ((J == J)) | |
544 | + | then { | |
545 | + | let bE = getInteger(I(E, J)) | |
546 | + | let bF = if ((bE == unit)) | |
547 | + | then unit | |
548 | + | else { | |
549 | + | let bG = (height - value(bE)) | |
550 | + | let bH = max([0, (aw - bG)]) | |
551 | + | if ((bH == 0)) | |
552 | + | then unit | |
553 | + | else h(makeString(["finalization will be possible in ", toString(bH), " blocks"], "")) | |
554 | + | } | |
555 | + | if ((bF == bF)) | |
556 | + | then { | |
557 | + | let bI = valueOrErrorMessage(aA(E), f("invalid asset")) | |
558 | + | let bn = bI._1 | |
559 | + | let aH = bI._2 | |
560 | + | let bJ = valueOrErrorMessage({ | |
561 | + | let aF = invoke(ap, "claimWxDoNotThrow", [p(aH)], nil) | |
562 | + | if ($isInstanceOf(aF, "Int")) | |
563 | + | then aF | |
564 | + | else unit | |
565 | + | }, f("invalid claimWx result")) | |
566 | + | if ((bJ == bJ)) | |
567 | + | then { | |
568 | + | let br = valueOrElse(getInteger(K(E)), 0) | |
569 | + | let bB = valueOrElse(getInteger(L(E)), 0) | |
570 | + | let bK = { | |
571 | + | let bL = if (if ((bJ > 0)) | |
572 | + | then true | |
573 | + | else (br > 0)) | |
574 | + | then true | |
575 | + | else (bB > 0) | |
576 | + | if (bL) | |
577 | + | then true | |
578 | + | else h("nothing to finalize") | |
579 | + | } | |
580 | + | if ((bK == bK)) | |
581 | + | then { | |
582 | + | let bM = if ((bJ > 0)) | |
583 | + | then { | |
584 | + | let bN = fraction(bJ, az, ax) | |
585 | + | let bO = (bJ - bN) | |
586 | + | let bP = invoke(aq, "userMaxDurationREADONLY", [toString(this)], nil) | |
587 | + | let bQ = if ((bN > 0)) | |
588 | + | then { | |
589 | + | let ad = bP | |
590 | + | if (if (if ($isInstanceOf(ad._1, "String")) | |
591 | + | then $isInstanceOf(ad._2, "Int") | |
592 | + | else false) | |
593 | + | then $isInstanceOf(ad, "(String, Int)") | |
594 | + | else false) | |
595 | + | then { | |
596 | + | let bR = ad._1 | |
597 | + | let bS = ad._2 | |
598 | + | if ((bN > 0)) | |
599 | + | then invoke(aq, bR, [bS], [AttachedPayment(au, bN)]) | |
600 | + | else unit | |
601 | + | } | |
602 | + | else h("invalid lock params") | |
603 | + | } | |
604 | + | else unit | |
605 | + | if ((bQ == bQ)) | |
606 | + | then { | |
607 | + | let bT = if ((bO > 0)) | |
608 | + | then { | |
609 | + | let bU = au | |
610 | + | let bV = 0 | |
611 | + | let bW = p(at) | |
612 | + | let bX = toString(this) | |
613 | + | valueOrErrorMessage({ | |
614 | + | let aF = invoke(ar, "swap", [bV, bW, bX], [AttachedPayment(bU, bO)]) | |
615 | + | if ($isInstanceOf(aF, "Int")) | |
616 | + | then aF | |
617 | + | else unit | |
618 | + | }, f("invalid swap result")) | |
619 | + | } | |
620 | + | else 0 | |
621 | + | if ((bT == bT)) | |
622 | + | then { | |
623 | + | let bY = if ((bT > 0)) | |
624 | + | then { | |
625 | + | let bZ = 0 | |
626 | + | let ca = true | |
627 | + | valueOrErrorMessage({ | |
628 | + | let aF = invoke(bn, "putOneTknV2", [bZ, ca], [AttachedPayment(at, bT)]) | |
629 | + | if ($isInstanceOf(aF, "Int")) | |
630 | + | then aF | |
631 | + | else unit | |
632 | + | }, f("invalid putOneTknV2 result")) | |
633 | + | } | |
634 | + | else 0 | |
635 | + | if ((bY == bY)) | |
636 | + | then bY | |
637 | + | else throw("Strict value is not equal to itself.") | |
638 | + | } | |
639 | + | else throw("Strict value is not equal to itself.") | |
640 | + | } | |
641 | + | else throw("Strict value is not equal to itself.") | |
642 | + | } | |
643 | + | else unit | |
644 | + | if ((bM == bM)) | |
645 | + | then { | |
646 | + | let cb = if ((bB > 0)) | |
647 | + | then { | |
648 | + | let aL = aG(aH, G) | |
649 | + | if ((aL == aL)) | |
650 | + | then { | |
651 | + | let cc = toInt(fraction(toBigInt(bB), aL, e, FLOOR)) | |
652 | + | let bD = { | |
653 | + | let cd = E | |
654 | + | let bZ = 0 | |
655 | + | valueOrErrorMessage({ | |
656 | + | let aF = invoke(bn, "unstakeAndGetOneTknV2", [cc, p(cd), bZ], nil) | |
657 | + | if ($isInstanceOf(aF, "Int")) | |
658 | + | then aF | |
659 | + | else unit | |
660 | + | }, f("invalid unstakeAndGetOneTknV2 result")) | |
661 | + | } | |
662 | + | if ((bD == bD)) | |
663 | + | then { | |
664 | + | let ce = if ((aI.issuer == this)) | |
665 | + | then invoke(this, "burn", [G, bB], nil) | |
666 | + | else h("invalid share asset issuer") | |
667 | + | if ((ce == ce)) | |
668 | + | then { | |
669 | + | let cf = fraction(toBigInt(bD), e, toBigInt(bB), FLOOR) | |
670 | + | let cg = [BinaryEntry(V(E, J), toBytes(cf)), StringEntry(W(E), toString(cf))] | |
671 | + | cg | |
672 | + | } | |
673 | + | else throw("Strict value is not equal to itself.") | |
674 | + | } | |
675 | + | else throw("Strict value is not equal to itself.") | |
676 | + | } | |
677 | + | else throw("Strict value is not equal to itself.") | |
678 | + | } | |
679 | + | else nil | |
680 | + | if ((cb == cb)) | |
681 | + | then { | |
682 | + | let ch = if ((br > 0)) | |
683 | + | then { | |
684 | + | let bY = { | |
685 | + | let bZ = 0 | |
686 | + | let ca = true | |
687 | + | valueOrErrorMessage({ | |
688 | + | let aF = invoke(bn, "putOneTknV2", [bZ, ca], [AttachedPayment(E, br)]) | |
689 | + | if ($isInstanceOf(aF, "Int")) | |
690 | + | then aF | |
691 | + | else unit | |
692 | + | }, f("invalid putOneTknV2 result")) | |
693 | + | } | |
694 | + | if ((bY == bY)) | |
695 | + | then { | |
696 | + | let aL = aG(aH, G) | |
697 | + | if ((aL == aL)) | |
698 | + | then { | |
699 | + | let bw = toInt(fraction(toBigInt(bY), e, aL, FLOOR)) | |
700 | + | let ci = if ((aI.issuer == this)) | |
701 | + | then invoke(this, "emit", [G, bw], nil) | |
702 | + | else h("invalid share asset issuer") | |
703 | + | if ((ci == ci)) | |
704 | + | then { | |
705 | + | let cj = fraction(toBigInt(br), e, toBigInt(bw)) | |
706 | + | let ck = [BinaryEntry(T(E, J), toBytes(cj)), StringEntry(U(E), toString(cj))] | |
707 | + | ck | |
708 | + | } | |
709 | + | else throw("Strict value is not equal to itself.") | |
710 | + | } | |
711 | + | else throw("Strict value is not equal to itself.") | |
712 | + | } | |
713 | + | else throw("Strict value is not equal to itself.") | |
714 | + | } | |
715 | + | else nil | |
716 | + | if ((ch == ch)) | |
717 | + | then { | |
718 | + | let cl = (J + 1) | |
719 | + | let cm = aG(aH, G) | |
720 | + | let cn = (([IntegerEntry(H(E), cl), IntegerEntry(I(E, cl), height), IntegerEntry(L(E), 0), IntegerEntry(K(E), 0), BinaryEntry(R(E, J), toBytes(cm)), StringEntry(S(E), toString(cm))] ++ ch) ++ cb) | |
721 | + | $Tuple2(cn, toBytes(cm)) | |
722 | + | } | |
723 | + | else throw("Strict value is not equal to itself.") | |
724 | + | } | |
725 | + | else throw("Strict value is not equal to itself.") | |
726 | + | } | |
727 | + | else throw("Strict value is not equal to itself.") | |
728 | + | } | |
729 | + | else throw("Strict value is not equal to itself.") | |
730 | + | } | |
731 | + | else throw("Strict value is not equal to itself.") | |
732 | + | } | |
733 | + | else throw("Strict value is not equal to itself.") | |
734 | + | } | |
735 | + | else throw("Strict value is not equal to itself.") | |
736 | + | } | |
737 | + | else throw("Strict value is not equal to itself.") | |
738 | + | } | |
739 | + | else throw("Strict value is not equal to itself.") | |
740 | + | } | |
741 | + | ||
742 | + | ||
743 | + | @Verifier(co) | |
744 | + | func cp () = { | |
745 | + | let cq = { | |
746 | + | let ad = ac() | |
747 | + | if ($isInstanceOf(ad, "ByteVector")) | |
269 | 748 | then { | |
270 | - | let | |
271 | - | | |
749 | + | let ak = ad | |
750 | + | ak | |
272 | 751 | } | |
273 | - | else if ($isInstanceOf( | |
274 | - | then | |
752 | + | else if ($isInstanceOf(ad, "Unit")) | |
753 | + | then co.senderPublicKey | |
275 | 754 | else throw("Match error") | |
276 | 755 | } | |
277 | - | sigVerify( | |
756 | + | sigVerify(co.bodyBytes, co.proofs[0], cq) | |
278 | 757 | } | |
279 | 758 |
github/deemru/w8io/026f985 74.17 ms ◑