tx · 9pffgZavpp7usvcGmXXBZ5oQXtG5UA8ZomeuVFg3epAr 3NC1z7rSjmjRbrab3ja4DcnCw1xZkauKhSo: -0.01400000 Waves 2020.10.15 10:17 [1221362] smart account 3NC1z7rSjmjRbrab3ja4DcnCw1xZkauKhSo > SELF 0.00000000 Waves
{ "type": 13, "id": "9pffgZavpp7usvcGmXXBZ5oQXtG5UA8ZomeuVFg3epAr", "fee": 1400000, "feeAssetId": null, "timestamp": 1602746298852, "version": 1, "sender": "3NC1z7rSjmjRbrab3ja4DcnCw1xZkauKhSo", "senderPublicKey": "FyXgaE6rRdPKPgcSheVHX7SMhDdiGGdcq2vD3HCazAwC", "proofs": [ "hLuc1HH1o1SX6d7gYkWiZa9KHkSWXh5CmXZbB1ehPW8YVNXtKgFJWWaHYjc7JGaRd8j25WpQS9XK24ANbfjujzq" ], "script": "base64:AAIEAAAAAAAAAA4IAhIAEgASBAoCCAgSAAAAAFkBAAAAEWtleUFjY3VtdWxhdGVkRmVlAAAAAAIAAAASJXNfX2FjY3VtdWxhdGVkRmVlAQAAAA5rZXlVY29sbGF0ZXJhbAAAAAACAAAADyVzX191Y29sbGF0ZXJhbAEAAAAZa2V5VG90YWxMZW5kZWRBdE90aGVyQWNjcwAAAAACAAAAGiVzX190b3RhbExlbmRlZEF0T3RoZXJBY2NzAQAAABNrZXlBc3NldExvY2tlZFRvdGFsAAAAAQAAAAdhc3NldElkCQABLAAAAAICAAAAGCVzJXNfX2Fzc2V0TG9ja2VkVG90YWxfXwUAAAAHYXNzZXRJZAEAAAATa2V5QWNjb3VudE9wZXJhdGlvbgAAAAMAAAAMdW5sb2NrSGVpZ2h0AAAAB2FkZHJlc3MAAAAGc3RhdHVzCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAeJXMlcyVkJXNfX2RlZm9Bc3NldE9wZXJhdGlvbl9fBQAAAAdhZGRyZXNzAgAAAAJfXwkAAaQAAAABBQAAAAx1bmxvY2tI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QAAAgAAAAECAAAAJWltcG9zc2libGUgdG8gY2FsbCBzZWxmIHJlYmVhbG5jZURlYnQGAwMDCQAAAAAAAAIIBQAAAANpbnYAAAAIZnVuY3Rpb24CAAAADGxvY2tOZXV0cmlubwYJAAAAAAAAAggFAAAAA2ludgAAAAhmdW5jdGlvbgIAAAAObG9ja05ldXRyaW5vU1AGCQAAAAAAAAIIBQAAAANpbnYAAAAIZnVuY3Rpb24CAAAADnVubG9ja05ldXRyaW5vAwkBAAAAAiE9AAAAAgkABCUAAAABBQAAABJuZXV0cmlub1N0YWtpbmdBY2MJAAQlAAAAAQkABCQAAAABCAUAAAADaW52AAAABGRBcHAJAAACAAAAAQIAAAAlaW52YWxpZCBuZXV0cmlubyBzdGFraW5nIGRhcHAgYWRkcmVzcwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAJAQAAACJmYWN0b3J5UmVhZERlZm9TdGFraW5nUGFjZW1ha2VyUHViAAAAAAkAAAIAAAABAgAAACNOb3QgYWxsb3dlZCBpbnZvY2F0aW9uIG1ldGhvZCBjYWxscwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkS18Em", "chainId": 84, "height": 1221362, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6SaKmGDc5L52xK8f9wBRi7nbi1e7zBfkAzmQRHi5UizX Next: 2g1jeaZn6q5mG2ecVpkcjRHLqUrMYJwnVgDjQXTTJxNu Diff:
Old | New | Differences | |
---|---|---|---|
25 | 25 | func m (l) = ("%s%s__price__" + l) | |
26 | 26 | ||
27 | 27 | ||
28 | - | let n = 1 | |
29 | - | ||
30 | - | let o = 2 | |
31 | - | ||
32 | - | let p = 3 | |
33 | - | ||
34 | - | let q = 4 | |
35 | - | ||
36 | - | let r = 5 | |
37 | - | ||
38 | - | func s (t,u,v,w,x,y,z) = makeString(["%d%s%d%s%d%d%d", toString(t), u, toString(w), x, toString(v), toString(y), toString(z)], "__") | |
28 | + | func n (l) = ("%s%s__lastHeight__" + l) | |
39 | 29 | ||
40 | 30 | ||
41 | - | func A (B,C,D,E,F) = makeString(["%s%s%d%s%d%d%d", B, toBase58String(value(C.assetId)), toString(C.amount), toBase58String(value(D.assetId)), toString(D.amount), toString(E), toString(F)], "__") | |
31 | + | let o = 1 | |
32 | + | ||
33 | + | let p = 2 | |
34 | + | ||
35 | + | let q = 3 | |
36 | + | ||
37 | + | let r = 4 | |
38 | + | ||
39 | + | let s = 5 | |
40 | + | ||
41 | + | func t (u,v,w,x,y,z,A) = makeString(["%d%s%d%s%d%d%d", toString(u), v, toString(x), y, toString(w), toString(z), toString(A)], "__") | |
42 | 42 | ||
43 | 43 | ||
44 | - | func G (H) = { | |
45 | - | let I = valueOrErrorMessage(getString(this, H), ("There is no request for passed arguments: " + H)) | |
46 | - | split(I, "__") | |
44 | + | func B (C,D,E,F,G) = makeString(["%s%s%d%s%d%d%d", C, toBase58String(value(D.assetId)), toString(D.amount), toBase58String(value(E.assetId)), toString(E.amount), toString(F), toString(G)], "__") | |
45 | + | ||
46 | + | ||
47 | + | func H (I) = { | |
48 | + | let J = valueOrErrorMessage(getString(this, I), ("There is no request for passed arguments: " + I)) | |
49 | + | split(J, "__") | |
47 | 50 | } | |
48 | 51 | ||
49 | 52 | ||
50 | - | let | |
53 | + | let K = -1 | |
51 | 54 | ||
52 | - | let | |
55 | + | let L = "NULL" | |
53 | 56 | ||
54 | - | let | |
57 | + | let M = addressFromStringValue(valueOrErrorMessage(getString(this, j()), ((("No config at this=" + toString(this)) + " for key=") + j()))) | |
55 | 58 | ||
56 | - | func | |
59 | + | func N () = "%s%s__commonConfig__debtAssetId" | |
57 | 60 | ||
58 | 61 | ||
59 | - | func | |
62 | + | func O () = "%s%s__commonConfig__debtAssetEtalonBalance" | |
60 | 63 | ||
61 | 64 | ||
62 | - | func | |
65 | + | func P (Q) = (("%s%s%s__defoAsset__" + Q) + "__config") | |
63 | 66 | ||
64 | 67 | ||
65 | - | func | |
68 | + | func R (S) = (("%s%s%s__defoAsset__" + toString(S)) + "__currentPool") | |
66 | 69 | ||
67 | 70 | ||
68 | - | func | |
71 | + | func T (l) = (("%s%s%s__defoAsset__" + l) + "__addressByAssetCode") | |
69 | 72 | ||
70 | 73 | ||
71 | - | func | |
74 | + | func U (V) = (("%s%s%s__defoAsset__" + V) + "__poolMakers") | |
72 | 75 | ||
73 | 76 | ||
74 | - | func | |
77 | + | func W () = "%s%s__commonConfig__defoStakingPacemakerPub" | |
75 | 78 | ||
76 | 79 | ||
77 | - | func | |
80 | + | func X () = valueOrErrorMessage(getString(M, N()), ((("No config at factory=" + toString(M)) + " for key=") + N())) | |
78 | 81 | ||
79 | 82 | ||
80 | - | func | |
83 | + | func Y (Q) = split(valueOrErrorMessage(getString(M, P(Q)), ((("No config at factory=" + toString(M)) + " for key=") + P(Q))), "__") | |
81 | 84 | ||
82 | 85 | ||
83 | - | func | |
84 | - | let | |
85 | - | $Tuple2( | |
86 | + | func Z (l) = { | |
87 | + | let Q = valueOrErrorMessage(getString(M, T(l)), ((("No config at factory=" + toString(M)) + " for key=") + T(l))) | |
88 | + | $Tuple2(Q, Y(Q)) | |
86 | 89 | } | |
87 | 90 | ||
88 | 91 | ||
89 | - | func | |
92 | + | func aa (Q) = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(M, U(Q)), ((("No config at factory=" + toString(M)) + " for key=") + U(Q)))), ("address extraction error for key=" + U(Q))) | |
90 | 93 | ||
91 | 94 | ||
92 | - | func | |
95 | + | func ab () = fromBase58String(valueOrErrorMessage(getString(M, W()), ((("No config at factory=" + toString(M)) + " for key=") + W()))) | |
93 | 96 | ||
94 | 97 | ||
95 | - | let | |
98 | + | let ac = 1 | |
96 | 99 | ||
97 | - | let | |
100 | + | let ad = 2 | |
98 | 101 | ||
99 | - | let | |
102 | + | let ae = 3 | |
100 | 103 | ||
101 | - | let | |
104 | + | let af = 4 | |
102 | 105 | ||
103 | - | let | |
106 | + | let ag = 5 | |
104 | 107 | ||
105 | - | let | |
108 | + | let ah = 6 | |
106 | 109 | ||
107 | - | let | |
110 | + | let ai = 7 | |
108 | 111 | ||
109 | - | let | |
112 | + | let aj = 8 | |
110 | 113 | ||
111 | - | let | |
114 | + | let ak = 9 | |
112 | 115 | ||
113 | - | let | |
116 | + | let al = 10 | |
114 | 117 | ||
115 | - | let | |
118 | + | let am = 11 | |
116 | 119 | ||
117 | - | let | |
120 | + | let an = 12 | |
118 | 121 | ||
119 | - | let | |
122 | + | let ao = 13 | |
120 | 123 | ||
121 | - | let | |
124 | + | let ap = 14 | |
122 | 125 | ||
123 | - | let | |
126 | + | let aq = Y(toString(this)) | |
124 | 127 | ||
125 | - | let | |
128 | + | let ar = aq[ac] | |
126 | 129 | ||
127 | - | let | |
130 | + | let as = aq[ad] | |
128 | 131 | ||
129 | - | let | |
132 | + | let at = fromBase58String(as) | |
130 | 133 | ||
131 | - | let | |
134 | + | let au = addressFromStringValue(aq[aj]) | |
132 | 135 | ||
133 | - | let | |
136 | + | let av = parseIntValue(aq[ah]) | |
134 | 137 | ||
135 | - | let | |
138 | + | let aw = aq[ag] | |
136 | 139 | ||
137 | - | let | |
140 | + | let ax = fromBase58String(aw) | |
138 | 141 | ||
139 | - | let | |
142 | + | let ay = parseIntValue(aq[af]) | |
140 | 143 | ||
141 | - | let | |
144 | + | let az = parseIntValue(aq[ak]) | |
142 | 145 | ||
143 | - | let | |
146 | + | let aA = parseIntValue(aq[al]) | |
144 | 147 | ||
145 | - | let | |
148 | + | let aB = parseIntValue(aq[am]) | |
146 | 149 | ||
147 | - | let | |
150 | + | let aC = parseIntValue(aq[an]) | |
148 | 151 | ||
149 | - | let | |
152 | + | let aD = parseIntValue(aq[ao]) | |
150 | 153 | ||
151 | - | let | |
154 | + | let aE = parseIntValue(aq[ap]) | |
152 | 155 | ||
153 | - | func | |
156 | + | func aF () = "%s__isBlocked" | |
154 | 157 | ||
155 | 158 | ||
156 | - | func aF () = valueOrErrorMessage(getInteger(at, "currIdx"), ("No currIdx at controlAcc=" + toString(at))) | |
159 | + | let aG = valueOrElse(getBoolean(au, aF()), false) | |
160 | + | ||
161 | + | func aH (l) = valueOrErrorMessage(getInteger(au, m(l)), ((("No price at priceOracle=" + toString(au)) + " for key=") + m(l))) | |
157 | 162 | ||
158 | 163 | ||
159 | - | func aG (aH) = { | |
160 | - | let aI = ("idxHeight_" + toString(aH)) | |
161 | - | valueOrElse(getInteger(at, aI), 0) | |
164 | + | func aI (l) = valueOrErrorMessage(getInteger(au, n(l)), ((("No lastHeight at priceOracle=" + toString(au)) + " for key=") + n(l))) | |
165 | + | ||
166 | + | ||
167 | + | func aJ () = valueOrErrorMessage(getInteger(au, "currIdx"), ("No currIdx at controlAcc=" + toString(au))) | |
168 | + | ||
169 | + | ||
170 | + | func aK (aL) = { | |
171 | + | let aM = ("idxHeight_" + toString(aL)) | |
172 | + | valueOrElse(getInteger(au, aM), 0) | |
162 | 173 | } | |
163 | 174 | ||
164 | 175 | ||
165 | - | func | |
166 | - | let | |
167 | - | valueOrErrorMessage(getInteger( | |
176 | + | func aN (aO) = { | |
177 | + | let aP = ("price_" + toString(aO)) | |
178 | + | valueOrErrorMessage(getInteger(au, aP), ((("No " + aP) + " at controlAcc=") + toString(au))) | |
168 | 179 | } | |
169 | 180 | ||
170 | 181 | ||
171 | - | let | |
182 | + | let aQ = aI(ar) | |
172 | 183 | ||
173 | - | let | |
184 | + | let aR = ((aQ - aQ) > 5) | |
174 | 185 | ||
175 | - | func aO (e) = ("%s%s__stakingBalance__" + e) | |
186 | + | let aS = "%s%s__commonConfig__defoStakingAddress" | |
187 | + | ||
188 | + | let aT = "%s%s__commonConfig__neutrinoStakingAddress" | |
189 | + | ||
190 | + | func aU (e) = ("%s%s__stakingBalance__" + e) | |
176 | 191 | ||
177 | 192 | ||
178 | - | func | |
193 | + | func aV () = ((("rpd_balance_" + aw) + "_") + toString(this)) | |
179 | 194 | ||
180 | 195 | ||
181 | - | let | |
196 | + | let aW = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(M, aS), ((("No config at factoryAcc" + toString(M)) + " for key=") + aS))), ("address extraction error for key=" + aS)) | |
182 | 197 | ||
183 | - | let | |
198 | + | let aX = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(M, aT), ((("No config at factoryAcc" + toString(M)) + " for key=") + aT))), ("address extraction error for key=" + aT)) | |
184 | 199 | ||
185 | - | func | |
200 | + | func aY () = valueOrElse(getInteger(aW, aU(as)), 0) | |
186 | 201 | ||
187 | 202 | ||
188 | - | func | |
203 | + | func aZ () = valueOrElse(getInteger(aX, aV()), 0) | |
189 | 204 | ||
190 | 205 | ||
191 | - | let | |
206 | + | let ba = valueOrElse(getInteger(this, b()), 0) | |
192 | 207 | ||
193 | - | let | |
208 | + | let bb = valueOrElse(getInteger(this, a()), 0) | |
194 | 209 | ||
195 | - | let | |
210 | + | let bc = getIntegerValue(M, R(this)) | |
196 | 211 | ||
197 | - | let | |
212 | + | let bd = fromBase58String(X()) | |
198 | 213 | ||
199 | - | let | |
214 | + | let be = getIntegerValue(M, O()) | |
200 | 215 | ||
201 | - | let | |
216 | + | let bf = (be - assetBalance(this, bd)) | |
202 | 217 | ||
203 | - | let | |
218 | + | let bg = ((assetBalance(this, ax) + aZ()) + bf) | |
204 | 219 | ||
205 | - | let | |
220 | + | let w = aH(aq[ac]) | |
206 | 221 | ||
207 | - | let | |
222 | + | let bh = (((ay + av) * w) / ay) | |
208 | 223 | ||
209 | - | let | |
224 | + | let bi = (value(assetInfo(at)).quantity - assetBalance(this, at)) | |
210 | 225 | ||
211 | - | func bd (be,bf,bg,bh,bi,bj) = { | |
212 | - | let bk = (fraction(ba, bb, ax) - bc) | |
213 | - | let bl = fraction(bf, bi, ax) | |
214 | - | let bm = if ((bl > bk)) | |
215 | - | then bk | |
216 | - | else bl | |
217 | - | let bn = fraction((ax - bj), bm, ax) | |
218 | - | let z = (bm - bn) | |
219 | - | let bo = fraction(bm, ax, bi) | |
220 | - | let bp = (bf - bo) | |
221 | - | if ((0 >= bk)) | |
222 | - | then throw((("impossible to issue new " + aq) + ": not enough collateral")) | |
223 | - | else if (if ((bh > bf)) | |
224 | - | then (toString(be) != toString(aQ)) | |
225 | - | else false) | |
226 | - | then throw(((((("impossible to issue new " + aq) + ": payment=") + toString(bf)) + "is less then min amount=") + toString(bh))) | |
227 | - | else $Tuple2([IntegerEntry(b(), (aU + bo)), StringEntry(f(height, toString(be), "FINISHED"), s(bf, toBase58String(bg), v, bn, toBase58String(as), bm, z)), Reissue(as, (bn + z), true), ScriptTransfer(be, bn, as), ScriptTransfer(be, bp, bg), ScriptTransfer(Z(toString(this)), z, as), IntegerEntry(a(), (aV + z))], bp) | |
226 | + | func bj (bk,bl,bm,bn,bo,bp) = { | |
227 | + | let bq = fraction(bl, bo, ay) | |
228 | + | let br = fraction((ay - bp), bq, ay) | |
229 | + | let A = (bq - br) | |
230 | + | let bs = fraction(bq, ay, bo) | |
231 | + | let bt = (bl - bs) | |
232 | + | if (if ((bn > bl)) | |
233 | + | then (toString(bk) != toString(aW)) | |
234 | + | else false) | |
235 | + | then throw(((((("impossible to issue new " + ar) + ": payment=") + toString(bl)) + "is less then min amount=") + toString(bn))) | |
236 | + | else $Tuple2([IntegerEntry(b(), (ba + bs)), StringEntry(f(height, toString(bk), "FINISHED"), t(bl, toBase58String(bm), w, br, toBase58String(at), bq, A)), Reissue(at, (br + A), true), ScriptTransfer(bk, br, at), ScriptTransfer(bk, bt, bm), ScriptTransfer(aa(toString(this)), A, at), IntegerEntry(a(), (bb + A))], bt) | |
228 | 237 | } | |
229 | 238 | ||
230 | 239 | ||
231 | - | @Callable(bq) | |
232 | - | func buyAsset () = { | |
233 | - | let br = value(bq.payments[0]) | |
234 | - | let bs = value(br.assetId) | |
235 | - | if ((bs != aw)) | |
236 | - | then throw(((("Payment asset id doesn't match basic asset: expected=" + toBase58String(aw)) + " actual=") + toBase58String(bs))) | |
237 | - | else bd(bq.caller, br.amount, bs, ay, v, aC)._1 | |
238 | - | } | |
240 | + | @Callable(bu) | |
241 | + | func buyAsset () = throw("NGN buyAsset operation is temporary unavailable") | |
239 | 242 | ||
240 | 243 | ||
241 | 244 | ||
242 | - | @Callable( | |
245 | + | @Callable(bu) | |
243 | 246 | func sellAsset () = { | |
244 | - | let br = value(bq.payments[0]) | |
245 | - | let bt = value(br.assetId) | |
246 | - | let bu = toString(bq.caller) | |
247 | - | if ((bt != as)) | |
248 | - | then throw(((("Invalid payment asset id: expected=" + toBase58String(as)) + " actual=") + toBase58String(bt))) | |
249 | - | else if ((az > br.amount)) | |
250 | - | then throw(((("Payment amount less then mininimal allowed: paymentAmount=" + toString(br.amount)) + " minAmount=") + toString(az))) | |
251 | - | else { | |
252 | - | let bv = fraction(br.amount, ax, v) | |
253 | - | let bw = if ((bv > ba)) | |
254 | - | then ba | |
255 | - | else bv | |
256 | - | let bx = fraction(bw, v, ax) | |
257 | - | let bp = (br.amount - bx) | |
258 | - | let by = fraction(aD, bx, ax) | |
259 | - | let bz = (bx - by) | |
260 | - | let bA = fraction(bz, ax, v) | |
261 | - | [IntegerEntry(b(), (aU - bA)), StringEntry(f(height, bu, "FINISHED"), s(br.amount, toBase58String(bt), v, bA, av, bx, by)), Burn(as, bz), ScriptTransfer(bq.caller, bA, aw), ScriptTransfer(bq.caller, bp, as), ScriptTransfer(Z(toString(this)), by, as), IntegerEntry(a(), (aV + by))] | |
262 | - | } | |
263 | - | } | |
264 | - | ||
265 | - | ||
266 | - | ||
267 | - | @Callable(bq) | |
268 | - | func crossExchange (bB,bC) = { | |
269 | - | let br = value(bq.payments[0]) | |
270 | - | let bt = value(br.assetId) | |
271 | - | let bD = toBase58String(bt) | |
272 | - | let bE = br.amount | |
273 | - | let bu = toString(bq.caller) | |
274 | - | let bF = ap | |
275 | - | let bG = Y(bC) | |
276 | - | let bH = bG._2 | |
277 | - | let bI = valueOrErrorMessage(addressFromString(bG._1), ("couldn't parse address from string for assetCode=" + bC)) | |
278 | - | let bJ = valueOrErrorMessage(parseInt(bH[ak]), ("minSellPmt parsing error: rawVal=" + bH[ak])) | |
279 | - | if ((ap[ab] != bB)) | |
280 | - | then throw(((("buyAsset confirmation failed: buyAssetIdConfirm=" + ap[ab]) + " BUT buyAssetId=") + bB)) | |
281 | - | else if ((bH[ac] != bD)) | |
282 | - | then throw(((("sellAsset confirmation failed: sellAssetIdConfirm=" + bH[ac]) + "BUT pmtAsset=") + bD)) | |
283 | - | else if ((ap[ad] != "ISSUED")) | |
284 | - | then throw(((("toAsset has not been issued yet: buyAssetId=" + bB) + " BUT status=") + ap[ad])) | |
285 | - | else if ((bH[ad] != "ISSUED")) | |
286 | - | then throw(((("fromAssetCfg has not been issued yet: sellAssetId=" + bD) + " BUT status=") + bH[ad])) | |
247 | + | let bv = value(bu.payments[0]) | |
248 | + | let bw = value(bv.assetId) | |
249 | + | let bx = toString(bu.caller) | |
250 | + | if (aG) | |
251 | + | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
252 | + | else if (aR) | |
253 | + | then throw(((("last price finalization has been more then 5 blocks ago: priceLastHeight=" + toString(aQ)) + " currHeight=") + toString(height))) | |
254 | + | else if ((bw != at)) | |
255 | + | then throw(((("Invalid payment asset id: expected=" + toBase58String(at)) + " actual=") + toBase58String(bw))) | |
256 | + | else if ((aA > bv.amount)) | |
257 | + | then throw(((("Payment amount less then mininimal allowed: paymentAmount=" + toString(bv.amount)) + " minAmount=") + toString(aA))) | |
287 | 258 | else { | |
288 | - | let | |
289 | - | let | |
290 | - | | |
291 | - | | |
292 | - | let | |
293 | - | let | |
294 | - | let | |
295 | - | let | |
296 | - | let | |
297 | - | ||
259 | + | let by = fraction(bv.amount, ay, w) | |
260 | + | let bz = if ((by > bg)) | |
261 | + | then bg | |
262 | + | else by | |
263 | + | let bA = fraction(bz, w, ay) | |
264 | + | let bt = (bv.amount - bA) | |
265 | + | let bB = fraction(aE, bA, ay) | |
266 | + | let bC = (bA - bB) | |
267 | + | let bD = fraction(bC, ay, w) | |
268 | + | [IntegerEntry(b(), (ba - bD)), StringEntry(f(height, bx, "FINISHED"), t(bv.amount, toBase58String(bw), w, bD, aw, bA, bB)), Burn(at, bC), ScriptTransfer(bu.caller, bD, ax), ScriptTransfer(bu.caller, bt, at), ScriptTransfer(aa(toString(this)), bB, at), IntegerEntry(a(), (bb + bB))] | |
298 | 269 | } | |
299 | 270 | } | |
300 | 271 | ||
301 | 272 | ||
302 | 273 | ||
303 | - | @Callable(bq) | |
274 | + | @Callable(bu) | |
275 | + | func crossExchange (bE,bF) = throw("NGN crossExchange operation is temporary unavailable") | |
276 | + | ||
277 | + | ||
278 | + | ||
279 | + | @Callable(bu) | |
304 | 280 | func rebalanceDebts () = { | |
305 | - | let bS = value(bq.payments[0]) | |
306 | - | let bT = value(bS.assetId) | |
307 | - | let bU = value(bq.payments[1]) | |
308 | - | let bV = value(bU.assetId) | |
309 | - | let bW = toString(bq.caller) | |
310 | - | let bX = X(bW) | |
311 | - | let B = bX[ab] | |
312 | - | let bO = k(B) | |
313 | - | let bY = valueOrErrorMessage(getInteger(this, bO), ("No debts for " + B)) | |
314 | - | if ((aX != bT)) | |
315 | - | then throw(((("invalid debt asset id in the first paymet: expected=" + toBase58String(aX)) + " actual=") + toBase58String(bT))) | |
316 | - | else if ((aw != bV)) | |
317 | - | then throw(((("invalid base asset id in the second payment: expected=" + toBase58String(aw)) + " actual=") + toBase58String(bV))) | |
318 | - | else if ((bS.amount != bU.amount)) | |
319 | - | then throw("first payment amount doesn't match to the second payment amount") | |
320 | - | else if ((0 >= bY)) | |
321 | - | then throw(("lendedAmt is less then zero: lendedAmt=" + toString(bY))) | |
322 | - | else if ((ay >= bS.amount)) | |
323 | - | then throw(((("attached payment must be greater then minBasicBuyAmount: pmt0.amount=" + toString(bS.amount)) + " minBasicBuyAmount=") + toString(ay))) | |
324 | - | else if ((bS.amount > bY)) | |
325 | - | then throw(((("attached payment is grater than required: pmtAmount=" + toString(bS.amount)) + " lendedAmt=") + toString(bY))) | |
326 | - | else { | |
327 | - | let bN = valueOrElse(getInteger(this, c()), 0) | |
328 | - | let F = (bY - bS.amount) | |
329 | - | [IntegerEntry(bO, F), IntegerEntry(c(), (bN - bS.amount)), StringEntry(("%s%s__rebalanceTrace__" + toBase58String(bq.transactionId)), A(B, bS, bU, bY, F))] | |
330 | - | } | |
281 | + | let bG = value(bu.payments[0]) | |
282 | + | let bH = value(bG.assetId) | |
283 | + | let bI = value(bu.payments[1]) | |
284 | + | let bJ = value(bI.assetId) | |
285 | + | let bK = toString(bu.caller) | |
286 | + | let bL = Y(bK) | |
287 | + | let C = bL[ac] | |
288 | + | let bM = k(C) | |
289 | + | let bN = valueOrErrorMessage(getInteger(this, bM), ("No debts for " + C)) | |
290 | + | if (aG) | |
291 | + | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
292 | + | else if ((bd != bH)) | |
293 | + | then throw(((("invalid debt asset id in the first paymet: expected=" + toBase58String(bd)) + " actual=") + toBase58String(bH))) | |
294 | + | else if ((ax != bJ)) | |
295 | + | then throw(((("invalid base asset id in the second payment: expected=" + toBase58String(ax)) + " actual=") + toBase58String(bJ))) | |
296 | + | else if ((bG.amount != bI.amount)) | |
297 | + | then throw("first payment amount doesn't match to the second payment amount") | |
298 | + | else if ((0 >= bN)) | |
299 | + | then throw(("lendedAmt is less then zero: lendedAmt=" + toString(bN))) | |
300 | + | else if (((100 * ay) >= bG.amount)) | |
301 | + | then throw(("attached payment must be greater then 100: pmt0.amount=" + toString(bG.amount))) | |
302 | + | else if ((bG.amount > bN)) | |
303 | + | then throw(((("attached payment is grater than required: pmtAmount=" + toString(bG.amount)) + " lendedAmt=") + toString(bN))) | |
304 | + | else { | |
305 | + | let bO = valueOrElse(getInteger(this, c()), 0) | |
306 | + | let G = (bN - bG.amount) | |
307 | + | [IntegerEntry(bM, G), IntegerEntry(c(), (bO - bG.amount)), StringEntry(("%s%s__rebalanceTrace__" + toBase58String(bu.transactionId)), B(C, bG, bI, bN, G))] | |
308 | + | } | |
331 | 309 | } | |
332 | 310 | ||
333 | 311 | ||
334 | - | @Verifier( | |
335 | - | func | |
336 | - | let | |
337 | - | if ($isInstanceOf( | |
312 | + | @Verifier(bP) | |
313 | + | func bQ () = { | |
314 | + | let bR = bP | |
315 | + | if ($isInstanceOf(bR, "InvokeScriptTransaction")) | |
338 | 316 | then { | |
339 | - | let | |
340 | - | if (( | |
341 | - | then throw(("fee amount is greater than max allowed: " + toString( | |
342 | - | else if (isDefined( | |
317 | + | let bS = bR | |
318 | + | if ((bS.fee > (900 * 1000))) | |
319 | + | then throw(("fee amount is greater than max allowed: " + toString(bS.fee))) | |
320 | + | else if (isDefined(bS.feeAssetId)) | |
343 | 321 | then throw("only Waves is allowed as feeAssetId") | |
344 | - | else if (( | |
322 | + | else if ((bS.function == "rebalanceDebts")) | |
345 | 323 | then { | |
346 | - | let | |
347 | - | if (( | |
324 | + | let bT = toString(addressFromRecipient(bS.dApp)) | |
325 | + | if ((Y(bT)[ae] != "ISSUED")) | |
348 | 326 | then throw("only defo dapp is allowed") | |
349 | - | else if (( | |
327 | + | else if ((bT == toString(this))) | |
350 | 328 | then throw("impossible to call self rebealnceDebt") | |
351 | 329 | else true | |
352 | 330 | } | |
353 | - | else if (if (if (( | |
331 | + | else if (if (if ((bS.function == "lockNeutrino")) | |
354 | 332 | then true | |
355 | - | else ( | |
333 | + | else (bS.function == "lockNeutrinoSP")) | |
356 | 334 | then true | |
357 | - | else ( | |
358 | - | then if ((toString( | |
335 | + | else (bS.function == "unlockNeutrino")) | |
336 | + | then if ((toString(aX) != toString(addressFromRecipient(bS.dApp)))) | |
359 | 337 | then throw("invalid neutrino staking dapp address") | |
360 | - | else sigVerify( | |
338 | + | else sigVerify(bP.bodyBytes, bP.proofs[0], ab()) | |
361 | 339 | else throw("Not allowed invocation method calls") | |
362 | 340 | } | |
363 | - | else sigVerify( | |
341 | + | else sigVerify(bP.bodyBytes, bP.proofs[0], bP.senderPublicKey) | |
364 | 342 | } | |
365 | 343 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a () = "%s__accumulatedFee" | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func b () = "%s__ucollateral" | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | func c () = "%s__totalLendedAtOtherAccs" | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func d (e) = ("%s%s__assetLockedTotal__" + e) | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func f (g,h,i) = ((((("%s%s%d%s__defoAssetOperation__" + h) + "__") + toString(g)) + "__") + i) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func j () = "%s__factory" | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func k (l) = ("%s%s__lendedBaseAssetAmount__" + l) | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func m (l) = ("%s%s__price__" + l) | |
26 | 26 | ||
27 | 27 | ||
28 | - | let n = 1 | |
29 | - | ||
30 | - | let o = 2 | |
31 | - | ||
32 | - | let p = 3 | |
33 | - | ||
34 | - | let q = 4 | |
35 | - | ||
36 | - | let r = 5 | |
37 | - | ||
38 | - | func s (t,u,v,w,x,y,z) = makeString(["%d%s%d%s%d%d%d", toString(t), u, toString(w), x, toString(v), toString(y), toString(z)], "__") | |
28 | + | func n (l) = ("%s%s__lastHeight__" + l) | |
39 | 29 | ||
40 | 30 | ||
41 | - | func A (B,C,D,E,F) = makeString(["%s%s%d%s%d%d%d", B, toBase58String(value(C.assetId)), toString(C.amount), toBase58String(value(D.assetId)), toString(D.amount), toString(E), toString(F)], "__") | |
31 | + | let o = 1 | |
32 | + | ||
33 | + | let p = 2 | |
34 | + | ||
35 | + | let q = 3 | |
36 | + | ||
37 | + | let r = 4 | |
38 | + | ||
39 | + | let s = 5 | |
40 | + | ||
41 | + | func t (u,v,w,x,y,z,A) = makeString(["%d%s%d%s%d%d%d", toString(u), v, toString(x), y, toString(w), toString(z), toString(A)], "__") | |
42 | 42 | ||
43 | 43 | ||
44 | - | func G (H) = { | |
45 | - | let I = valueOrErrorMessage(getString(this, H), ("There is no request for passed arguments: " + H)) | |
46 | - | split(I, "__") | |
44 | + | func B (C,D,E,F,G) = makeString(["%s%s%d%s%d%d%d", C, toBase58String(value(D.assetId)), toString(D.amount), toBase58String(value(E.assetId)), toString(E.amount), toString(F), toString(G)], "__") | |
45 | + | ||
46 | + | ||
47 | + | func H (I) = { | |
48 | + | let J = valueOrErrorMessage(getString(this, I), ("There is no request for passed arguments: " + I)) | |
49 | + | split(J, "__") | |
47 | 50 | } | |
48 | 51 | ||
49 | 52 | ||
50 | - | let | |
53 | + | let K = -1 | |
51 | 54 | ||
52 | - | let | |
55 | + | let L = "NULL" | |
53 | 56 | ||
54 | - | let | |
57 | + | let M = addressFromStringValue(valueOrErrorMessage(getString(this, j()), ((("No config at this=" + toString(this)) + " for key=") + j()))) | |
55 | 58 | ||
56 | - | func | |
59 | + | func N () = "%s%s__commonConfig__debtAssetId" | |
57 | 60 | ||
58 | 61 | ||
59 | - | func | |
62 | + | func O () = "%s%s__commonConfig__debtAssetEtalonBalance" | |
60 | 63 | ||
61 | 64 | ||
62 | - | func | |
65 | + | func P (Q) = (("%s%s%s__defoAsset__" + Q) + "__config") | |
63 | 66 | ||
64 | 67 | ||
65 | - | func | |
68 | + | func R (S) = (("%s%s%s__defoAsset__" + toString(S)) + "__currentPool") | |
66 | 69 | ||
67 | 70 | ||
68 | - | func | |
71 | + | func T (l) = (("%s%s%s__defoAsset__" + l) + "__addressByAssetCode") | |
69 | 72 | ||
70 | 73 | ||
71 | - | func | |
74 | + | func U (V) = (("%s%s%s__defoAsset__" + V) + "__poolMakers") | |
72 | 75 | ||
73 | 76 | ||
74 | - | func | |
77 | + | func W () = "%s%s__commonConfig__defoStakingPacemakerPub" | |
75 | 78 | ||
76 | 79 | ||
77 | - | func | |
80 | + | func X () = valueOrErrorMessage(getString(M, N()), ((("No config at factory=" + toString(M)) + " for key=") + N())) | |
78 | 81 | ||
79 | 82 | ||
80 | - | func | |
83 | + | func Y (Q) = split(valueOrErrorMessage(getString(M, P(Q)), ((("No config at factory=" + toString(M)) + " for key=") + P(Q))), "__") | |
81 | 84 | ||
82 | 85 | ||
83 | - | func | |
84 | - | let | |
85 | - | $Tuple2( | |
86 | + | func Z (l) = { | |
87 | + | let Q = valueOrErrorMessage(getString(M, T(l)), ((("No config at factory=" + toString(M)) + " for key=") + T(l))) | |
88 | + | $Tuple2(Q, Y(Q)) | |
86 | 89 | } | |
87 | 90 | ||
88 | 91 | ||
89 | - | func | |
92 | + | func aa (Q) = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(M, U(Q)), ((("No config at factory=" + toString(M)) + " for key=") + U(Q)))), ("address extraction error for key=" + U(Q))) | |
90 | 93 | ||
91 | 94 | ||
92 | - | func | |
95 | + | func ab () = fromBase58String(valueOrErrorMessage(getString(M, W()), ((("No config at factory=" + toString(M)) + " for key=") + W()))) | |
93 | 96 | ||
94 | 97 | ||
95 | - | let | |
98 | + | let ac = 1 | |
96 | 99 | ||
97 | - | let | |
100 | + | let ad = 2 | |
98 | 101 | ||
99 | - | let | |
102 | + | let ae = 3 | |
100 | 103 | ||
101 | - | let | |
104 | + | let af = 4 | |
102 | 105 | ||
103 | - | let | |
106 | + | let ag = 5 | |
104 | 107 | ||
105 | - | let | |
108 | + | let ah = 6 | |
106 | 109 | ||
107 | - | let | |
110 | + | let ai = 7 | |
108 | 111 | ||
109 | - | let | |
112 | + | let aj = 8 | |
110 | 113 | ||
111 | - | let | |
114 | + | let ak = 9 | |
112 | 115 | ||
113 | - | let | |
116 | + | let al = 10 | |
114 | 117 | ||
115 | - | let | |
118 | + | let am = 11 | |
116 | 119 | ||
117 | - | let | |
120 | + | let an = 12 | |
118 | 121 | ||
119 | - | let | |
122 | + | let ao = 13 | |
120 | 123 | ||
121 | - | let | |
124 | + | let ap = 14 | |
122 | 125 | ||
123 | - | let | |
126 | + | let aq = Y(toString(this)) | |
124 | 127 | ||
125 | - | let | |
128 | + | let ar = aq[ac] | |
126 | 129 | ||
127 | - | let | |
130 | + | let as = aq[ad] | |
128 | 131 | ||
129 | - | let | |
132 | + | let at = fromBase58String(as) | |
130 | 133 | ||
131 | - | let | |
134 | + | let au = addressFromStringValue(aq[aj]) | |
132 | 135 | ||
133 | - | let | |
136 | + | let av = parseIntValue(aq[ah]) | |
134 | 137 | ||
135 | - | let | |
138 | + | let aw = aq[ag] | |
136 | 139 | ||
137 | - | let | |
140 | + | let ax = fromBase58String(aw) | |
138 | 141 | ||
139 | - | let | |
142 | + | let ay = parseIntValue(aq[af]) | |
140 | 143 | ||
141 | - | let | |
144 | + | let az = parseIntValue(aq[ak]) | |
142 | 145 | ||
143 | - | let | |
146 | + | let aA = parseIntValue(aq[al]) | |
144 | 147 | ||
145 | - | let | |
148 | + | let aB = parseIntValue(aq[am]) | |
146 | 149 | ||
147 | - | let | |
150 | + | let aC = parseIntValue(aq[an]) | |
148 | 151 | ||
149 | - | let | |
152 | + | let aD = parseIntValue(aq[ao]) | |
150 | 153 | ||
151 | - | let | |
154 | + | let aE = parseIntValue(aq[ap]) | |
152 | 155 | ||
153 | - | func | |
156 | + | func aF () = "%s__isBlocked" | |
154 | 157 | ||
155 | 158 | ||
156 | - | func aF () = valueOrErrorMessage(getInteger(at, "currIdx"), ("No currIdx at controlAcc=" + toString(at))) | |
159 | + | let aG = valueOrElse(getBoolean(au, aF()), false) | |
160 | + | ||
161 | + | func aH (l) = valueOrErrorMessage(getInteger(au, m(l)), ((("No price at priceOracle=" + toString(au)) + " for key=") + m(l))) | |
157 | 162 | ||
158 | 163 | ||
159 | - | func aG (aH) = { | |
160 | - | let aI = ("idxHeight_" + toString(aH)) | |
161 | - | valueOrElse(getInteger(at, aI), 0) | |
164 | + | func aI (l) = valueOrErrorMessage(getInteger(au, n(l)), ((("No lastHeight at priceOracle=" + toString(au)) + " for key=") + n(l))) | |
165 | + | ||
166 | + | ||
167 | + | func aJ () = valueOrErrorMessage(getInteger(au, "currIdx"), ("No currIdx at controlAcc=" + toString(au))) | |
168 | + | ||
169 | + | ||
170 | + | func aK (aL) = { | |
171 | + | let aM = ("idxHeight_" + toString(aL)) | |
172 | + | valueOrElse(getInteger(au, aM), 0) | |
162 | 173 | } | |
163 | 174 | ||
164 | 175 | ||
165 | - | func | |
166 | - | let | |
167 | - | valueOrErrorMessage(getInteger( | |
176 | + | func aN (aO) = { | |
177 | + | let aP = ("price_" + toString(aO)) | |
178 | + | valueOrErrorMessage(getInteger(au, aP), ((("No " + aP) + " at controlAcc=") + toString(au))) | |
168 | 179 | } | |
169 | 180 | ||
170 | 181 | ||
171 | - | let | |
182 | + | let aQ = aI(ar) | |
172 | 183 | ||
173 | - | let | |
184 | + | let aR = ((aQ - aQ) > 5) | |
174 | 185 | ||
175 | - | func aO (e) = ("%s%s__stakingBalance__" + e) | |
186 | + | let aS = "%s%s__commonConfig__defoStakingAddress" | |
187 | + | ||
188 | + | let aT = "%s%s__commonConfig__neutrinoStakingAddress" | |
189 | + | ||
190 | + | func aU (e) = ("%s%s__stakingBalance__" + e) | |
176 | 191 | ||
177 | 192 | ||
178 | - | func | |
193 | + | func aV () = ((("rpd_balance_" + aw) + "_") + toString(this)) | |
179 | 194 | ||
180 | 195 | ||
181 | - | let | |
196 | + | let aW = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(M, aS), ((("No config at factoryAcc" + toString(M)) + " for key=") + aS))), ("address extraction error for key=" + aS)) | |
182 | 197 | ||
183 | - | let | |
198 | + | let aX = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(M, aT), ((("No config at factoryAcc" + toString(M)) + " for key=") + aT))), ("address extraction error for key=" + aT)) | |
184 | 199 | ||
185 | - | func | |
200 | + | func aY () = valueOrElse(getInteger(aW, aU(as)), 0) | |
186 | 201 | ||
187 | 202 | ||
188 | - | func | |
203 | + | func aZ () = valueOrElse(getInteger(aX, aV()), 0) | |
189 | 204 | ||
190 | 205 | ||
191 | - | let | |
206 | + | let ba = valueOrElse(getInteger(this, b()), 0) | |
192 | 207 | ||
193 | - | let | |
208 | + | let bb = valueOrElse(getInteger(this, a()), 0) | |
194 | 209 | ||
195 | - | let | |
210 | + | let bc = getIntegerValue(M, R(this)) | |
196 | 211 | ||
197 | - | let | |
212 | + | let bd = fromBase58String(X()) | |
198 | 213 | ||
199 | - | let | |
214 | + | let be = getIntegerValue(M, O()) | |
200 | 215 | ||
201 | - | let | |
216 | + | let bf = (be - assetBalance(this, bd)) | |
202 | 217 | ||
203 | - | let | |
218 | + | let bg = ((assetBalance(this, ax) + aZ()) + bf) | |
204 | 219 | ||
205 | - | let | |
220 | + | let w = aH(aq[ac]) | |
206 | 221 | ||
207 | - | let | |
222 | + | let bh = (((ay + av) * w) / ay) | |
208 | 223 | ||
209 | - | let | |
224 | + | let bi = (value(assetInfo(at)).quantity - assetBalance(this, at)) | |
210 | 225 | ||
211 | - | func bd (be,bf,bg,bh,bi,bj) = { | |
212 | - | let bk = (fraction(ba, bb, ax) - bc) | |
213 | - | let bl = fraction(bf, bi, ax) | |
214 | - | let bm = if ((bl > bk)) | |
215 | - | then bk | |
216 | - | else bl | |
217 | - | let bn = fraction((ax - bj), bm, ax) | |
218 | - | let z = (bm - bn) | |
219 | - | let bo = fraction(bm, ax, bi) | |
220 | - | let bp = (bf - bo) | |
221 | - | if ((0 >= bk)) | |
222 | - | then throw((("impossible to issue new " + aq) + ": not enough collateral")) | |
223 | - | else if (if ((bh > bf)) | |
224 | - | then (toString(be) != toString(aQ)) | |
225 | - | else false) | |
226 | - | then throw(((((("impossible to issue new " + aq) + ": payment=") + toString(bf)) + "is less then min amount=") + toString(bh))) | |
227 | - | else $Tuple2([IntegerEntry(b(), (aU + bo)), StringEntry(f(height, toString(be), "FINISHED"), s(bf, toBase58String(bg), v, bn, toBase58String(as), bm, z)), Reissue(as, (bn + z), true), ScriptTransfer(be, bn, as), ScriptTransfer(be, bp, bg), ScriptTransfer(Z(toString(this)), z, as), IntegerEntry(a(), (aV + z))], bp) | |
226 | + | func bj (bk,bl,bm,bn,bo,bp) = { | |
227 | + | let bq = fraction(bl, bo, ay) | |
228 | + | let br = fraction((ay - bp), bq, ay) | |
229 | + | let A = (bq - br) | |
230 | + | let bs = fraction(bq, ay, bo) | |
231 | + | let bt = (bl - bs) | |
232 | + | if (if ((bn > bl)) | |
233 | + | then (toString(bk) != toString(aW)) | |
234 | + | else false) | |
235 | + | then throw(((((("impossible to issue new " + ar) + ": payment=") + toString(bl)) + "is less then min amount=") + toString(bn))) | |
236 | + | else $Tuple2([IntegerEntry(b(), (ba + bs)), StringEntry(f(height, toString(bk), "FINISHED"), t(bl, toBase58String(bm), w, br, toBase58String(at), bq, A)), Reissue(at, (br + A), true), ScriptTransfer(bk, br, at), ScriptTransfer(bk, bt, bm), ScriptTransfer(aa(toString(this)), A, at), IntegerEntry(a(), (bb + A))], bt) | |
228 | 237 | } | |
229 | 238 | ||
230 | 239 | ||
231 | - | @Callable(bq) | |
232 | - | func buyAsset () = { | |
233 | - | let br = value(bq.payments[0]) | |
234 | - | let bs = value(br.assetId) | |
235 | - | if ((bs != aw)) | |
236 | - | then throw(((("Payment asset id doesn't match basic asset: expected=" + toBase58String(aw)) + " actual=") + toBase58String(bs))) | |
237 | - | else bd(bq.caller, br.amount, bs, ay, v, aC)._1 | |
238 | - | } | |
240 | + | @Callable(bu) | |
241 | + | func buyAsset () = throw("NGN buyAsset operation is temporary unavailable") | |
239 | 242 | ||
240 | 243 | ||
241 | 244 | ||
242 | - | @Callable( | |
245 | + | @Callable(bu) | |
243 | 246 | func sellAsset () = { | |
244 | - | let br = value(bq.payments[0]) | |
245 | - | let bt = value(br.assetId) | |
246 | - | let bu = toString(bq.caller) | |
247 | - | if ((bt != as)) | |
248 | - | then throw(((("Invalid payment asset id: expected=" + toBase58String(as)) + " actual=") + toBase58String(bt))) | |
249 | - | else if ((az > br.amount)) | |
250 | - | then throw(((("Payment amount less then mininimal allowed: paymentAmount=" + toString(br.amount)) + " minAmount=") + toString(az))) | |
251 | - | else { | |
252 | - | let bv = fraction(br.amount, ax, v) | |
253 | - | let bw = if ((bv > ba)) | |
254 | - | then ba | |
255 | - | else bv | |
256 | - | let bx = fraction(bw, v, ax) | |
257 | - | let bp = (br.amount - bx) | |
258 | - | let by = fraction(aD, bx, ax) | |
259 | - | let bz = (bx - by) | |
260 | - | let bA = fraction(bz, ax, v) | |
261 | - | [IntegerEntry(b(), (aU - bA)), StringEntry(f(height, bu, "FINISHED"), s(br.amount, toBase58String(bt), v, bA, av, bx, by)), Burn(as, bz), ScriptTransfer(bq.caller, bA, aw), ScriptTransfer(bq.caller, bp, as), ScriptTransfer(Z(toString(this)), by, as), IntegerEntry(a(), (aV + by))] | |
262 | - | } | |
263 | - | } | |
264 | - | ||
265 | - | ||
266 | - | ||
267 | - | @Callable(bq) | |
268 | - | func crossExchange (bB,bC) = { | |
269 | - | let br = value(bq.payments[0]) | |
270 | - | let bt = value(br.assetId) | |
271 | - | let bD = toBase58String(bt) | |
272 | - | let bE = br.amount | |
273 | - | let bu = toString(bq.caller) | |
274 | - | let bF = ap | |
275 | - | let bG = Y(bC) | |
276 | - | let bH = bG._2 | |
277 | - | let bI = valueOrErrorMessage(addressFromString(bG._1), ("couldn't parse address from string for assetCode=" + bC)) | |
278 | - | let bJ = valueOrErrorMessage(parseInt(bH[ak]), ("minSellPmt parsing error: rawVal=" + bH[ak])) | |
279 | - | if ((ap[ab] != bB)) | |
280 | - | then throw(((("buyAsset confirmation failed: buyAssetIdConfirm=" + ap[ab]) + " BUT buyAssetId=") + bB)) | |
281 | - | else if ((bH[ac] != bD)) | |
282 | - | then throw(((("sellAsset confirmation failed: sellAssetIdConfirm=" + bH[ac]) + "BUT pmtAsset=") + bD)) | |
283 | - | else if ((ap[ad] != "ISSUED")) | |
284 | - | then throw(((("toAsset has not been issued yet: buyAssetId=" + bB) + " BUT status=") + ap[ad])) | |
285 | - | else if ((bH[ad] != "ISSUED")) | |
286 | - | then throw(((("fromAssetCfg has not been issued yet: sellAssetId=" + bD) + " BUT status=") + bH[ad])) | |
247 | + | let bv = value(bu.payments[0]) | |
248 | + | let bw = value(bv.assetId) | |
249 | + | let bx = toString(bu.caller) | |
250 | + | if (aG) | |
251 | + | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
252 | + | else if (aR) | |
253 | + | then throw(((("last price finalization has been more then 5 blocks ago: priceLastHeight=" + toString(aQ)) + " currHeight=") + toString(height))) | |
254 | + | else if ((bw != at)) | |
255 | + | then throw(((("Invalid payment asset id: expected=" + toBase58String(at)) + " actual=") + toBase58String(bw))) | |
256 | + | else if ((aA > bv.amount)) | |
257 | + | then throw(((("Payment amount less then mininimal allowed: paymentAmount=" + toString(bv.amount)) + " minAmount=") + toString(aA))) | |
287 | 258 | else { | |
288 | - | let | |
289 | - | let | |
290 | - | | |
291 | - | | |
292 | - | let | |
293 | - | let | |
294 | - | let | |
295 | - | let | |
296 | - | let | |
297 | - | ||
259 | + | let by = fraction(bv.amount, ay, w) | |
260 | + | let bz = if ((by > bg)) | |
261 | + | then bg | |
262 | + | else by | |
263 | + | let bA = fraction(bz, w, ay) | |
264 | + | let bt = (bv.amount - bA) | |
265 | + | let bB = fraction(aE, bA, ay) | |
266 | + | let bC = (bA - bB) | |
267 | + | let bD = fraction(bC, ay, w) | |
268 | + | [IntegerEntry(b(), (ba - bD)), StringEntry(f(height, bx, "FINISHED"), t(bv.amount, toBase58String(bw), w, bD, aw, bA, bB)), Burn(at, bC), ScriptTransfer(bu.caller, bD, ax), ScriptTransfer(bu.caller, bt, at), ScriptTransfer(aa(toString(this)), bB, at), IntegerEntry(a(), (bb + bB))] | |
298 | 269 | } | |
299 | 270 | } | |
300 | 271 | ||
301 | 272 | ||
302 | 273 | ||
303 | - | @Callable(bq) | |
274 | + | @Callable(bu) | |
275 | + | func crossExchange (bE,bF) = throw("NGN crossExchange operation is temporary unavailable") | |
276 | + | ||
277 | + | ||
278 | + | ||
279 | + | @Callable(bu) | |
304 | 280 | func rebalanceDebts () = { | |
305 | - | let bS = value(bq.payments[0]) | |
306 | - | let bT = value(bS.assetId) | |
307 | - | let bU = value(bq.payments[1]) | |
308 | - | let bV = value(bU.assetId) | |
309 | - | let bW = toString(bq.caller) | |
310 | - | let bX = X(bW) | |
311 | - | let B = bX[ab] | |
312 | - | let bO = k(B) | |
313 | - | let bY = valueOrErrorMessage(getInteger(this, bO), ("No debts for " + B)) | |
314 | - | if ((aX != bT)) | |
315 | - | then throw(((("invalid debt asset id in the first paymet: expected=" + toBase58String(aX)) + " actual=") + toBase58String(bT))) | |
316 | - | else if ((aw != bV)) | |
317 | - | then throw(((("invalid base asset id in the second payment: expected=" + toBase58String(aw)) + " actual=") + toBase58String(bV))) | |
318 | - | else if ((bS.amount != bU.amount)) | |
319 | - | then throw("first payment amount doesn't match to the second payment amount") | |
320 | - | else if ((0 >= bY)) | |
321 | - | then throw(("lendedAmt is less then zero: lendedAmt=" + toString(bY))) | |
322 | - | else if ((ay >= bS.amount)) | |
323 | - | then throw(((("attached payment must be greater then minBasicBuyAmount: pmt0.amount=" + toString(bS.amount)) + " minBasicBuyAmount=") + toString(ay))) | |
324 | - | else if ((bS.amount > bY)) | |
325 | - | then throw(((("attached payment is grater than required: pmtAmount=" + toString(bS.amount)) + " lendedAmt=") + toString(bY))) | |
326 | - | else { | |
327 | - | let bN = valueOrElse(getInteger(this, c()), 0) | |
328 | - | let F = (bY - bS.amount) | |
329 | - | [IntegerEntry(bO, F), IntegerEntry(c(), (bN - bS.amount)), StringEntry(("%s%s__rebalanceTrace__" + toBase58String(bq.transactionId)), A(B, bS, bU, bY, F))] | |
330 | - | } | |
281 | + | let bG = value(bu.payments[0]) | |
282 | + | let bH = value(bG.assetId) | |
283 | + | let bI = value(bu.payments[1]) | |
284 | + | let bJ = value(bI.assetId) | |
285 | + | let bK = toString(bu.caller) | |
286 | + | let bL = Y(bK) | |
287 | + | let C = bL[ac] | |
288 | + | let bM = k(C) | |
289 | + | let bN = valueOrErrorMessage(getInteger(this, bM), ("No debts for " + C)) | |
290 | + | if (aG) | |
291 | + | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
292 | + | else if ((bd != bH)) | |
293 | + | then throw(((("invalid debt asset id in the first paymet: expected=" + toBase58String(bd)) + " actual=") + toBase58String(bH))) | |
294 | + | else if ((ax != bJ)) | |
295 | + | then throw(((("invalid base asset id in the second payment: expected=" + toBase58String(ax)) + " actual=") + toBase58String(bJ))) | |
296 | + | else if ((bG.amount != bI.amount)) | |
297 | + | then throw("first payment amount doesn't match to the second payment amount") | |
298 | + | else if ((0 >= bN)) | |
299 | + | then throw(("lendedAmt is less then zero: lendedAmt=" + toString(bN))) | |
300 | + | else if (((100 * ay) >= bG.amount)) | |
301 | + | then throw(("attached payment must be greater then 100: pmt0.amount=" + toString(bG.amount))) | |
302 | + | else if ((bG.amount > bN)) | |
303 | + | then throw(((("attached payment is grater than required: pmtAmount=" + toString(bG.amount)) + " lendedAmt=") + toString(bN))) | |
304 | + | else { | |
305 | + | let bO = valueOrElse(getInteger(this, c()), 0) | |
306 | + | let G = (bN - bG.amount) | |
307 | + | [IntegerEntry(bM, G), IntegerEntry(c(), (bO - bG.amount)), StringEntry(("%s%s__rebalanceTrace__" + toBase58String(bu.transactionId)), B(C, bG, bI, bN, G))] | |
308 | + | } | |
331 | 309 | } | |
332 | 310 | ||
333 | 311 | ||
334 | - | @Verifier( | |
335 | - | func | |
336 | - | let | |
337 | - | if ($isInstanceOf( | |
312 | + | @Verifier(bP) | |
313 | + | func bQ () = { | |
314 | + | let bR = bP | |
315 | + | if ($isInstanceOf(bR, "InvokeScriptTransaction")) | |
338 | 316 | then { | |
339 | - | let | |
340 | - | if (( | |
341 | - | then throw(("fee amount is greater than max allowed: " + toString( | |
342 | - | else if (isDefined( | |
317 | + | let bS = bR | |
318 | + | if ((bS.fee > (900 * 1000))) | |
319 | + | then throw(("fee amount is greater than max allowed: " + toString(bS.fee))) | |
320 | + | else if (isDefined(bS.feeAssetId)) | |
343 | 321 | then throw("only Waves is allowed as feeAssetId") | |
344 | - | else if (( | |
322 | + | else if ((bS.function == "rebalanceDebts")) | |
345 | 323 | then { | |
346 | - | let | |
347 | - | if (( | |
324 | + | let bT = toString(addressFromRecipient(bS.dApp)) | |
325 | + | if ((Y(bT)[ae] != "ISSUED")) | |
348 | 326 | then throw("only defo dapp is allowed") | |
349 | - | else if (( | |
327 | + | else if ((bT == toString(this))) | |
350 | 328 | then throw("impossible to call self rebealnceDebt") | |
351 | 329 | else true | |
352 | 330 | } | |
353 | - | else if (if (if (( | |
331 | + | else if (if (if ((bS.function == "lockNeutrino")) | |
354 | 332 | then true | |
355 | - | else ( | |
333 | + | else (bS.function == "lockNeutrinoSP")) | |
356 | 334 | then true | |
357 | - | else ( | |
358 | - | then if ((toString( | |
335 | + | else (bS.function == "unlockNeutrino")) | |
336 | + | then if ((toString(aX) != toString(addressFromRecipient(bS.dApp)))) | |
359 | 337 | then throw("invalid neutrino staking dapp address") | |
360 | - | else sigVerify( | |
338 | + | else sigVerify(bP.bodyBytes, bP.proofs[0], ab()) | |
361 | 339 | else throw("Not allowed invocation method calls") | |
362 | 340 | } | |
363 | - | else sigVerify( | |
341 | + | else sigVerify(bP.bodyBytes, bP.proofs[0], bP.senderPublicKey) | |
364 | 342 | } | |
365 | 343 |
github/deemru/w8io/169f3d6 125.19 ms ◑