tx · B4bA9uX74UCSjD9ncDCNkXnUynwEX5MdnSxvExWypX1U
3NCkVR5gTgfosVUNRTsUHc6kXdhh2V3betH: -0.03700000 Waves
2023.01.09 11:35 [2397170] smart account 3NCkVR5gTgfosVUNRTsUHc6kXdhh2V3betH > SELF 0.00000000 Waves
{
"type": 13,
"id": "B4bA9uX74UCSjD9ncDCNkXnUynwEX5MdnSxvExWypX1U",
"fee": 3700000,
"feeAssetId": null,
"timestamp": 1673253318048,
"version": 2,
"chainId": 84,
"sender": "3NCkVR5gTgfosVUNRTsUHc6kXdhh2V3betH",
"senderPublicKey": "3mgJJUcUNFHYP2pNkbkfB2C8D4gSEKEGisFByu2i6xoM",
"proofs": [
"4U5X9TbHXp2wMJsPCib9roXwwTbTqVsvWzC6aMnkabtvX63vvTB3iT4nBkKrLxk5xUHxTXYPWsomJepL477j91kd"
],
"script": "base64:BgIiCAISBgoECAgICBIECgIICBIECgIIARIAEgMKAQgSAwoBCB8AB2tfZnVuZHMCB2tfZnVuZHMAD2tfdmlyZXNfYWRkcmVzcwIPa192aXJlc19hZGRyZXNzAA1rX3ZpcmVzX3ZhdWx0Ag1rX3ZpcmVzX3ZhdWx0ABZrX2Fzc2V0X2NsYWltZWRfcHJvZml0AhZrX2Fzc2V0X2NsYWltZWRfcHJvZml0ABRrX2Nvb3JkaW5hdG9yQWRkcmVzcwIUa19jb29yZGluYXRvckFkZHJlc3MAE2tfaW5zdXJhbmNlX2FkZHJlc3MCE2tfaW5zdXJhbmNlX2FkZHJlc3MAEGtfb3JkZXJzX2FkZHJlc3MCEGtfb3JkZXJzX2FkZHJlc3MAD2tfdmF1bHRfYWRkcmVzcwIPa192YXVsdF9hZGRyZXNzAAVrX2FtbQIFa19hbW0AD2tfYWRtaW5fYWRkcmVzcwIPa19hZG1pbl9hZGRyZXNzABJrX2FkbWluX3B1YmxpY19rZXkCEmtfYWRtaW5fcHVibGljX2tleQANa19xdW90ZV9hc3NldAINa19xdW90ZV9hc3NldAAPa19xdW90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WUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACQEOYWRtaW5QdWJsaWNLZXkA8GGP+g==",
"height": 2397170,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 3k6jZHZrFD1dioi6GjqhmQeHP4svrf2WGeqbYA6W5SwW
Next: 4qa9sF5Ct77GhVPnmvKGw1FueY37QqMAoFcgMEcdessd
Diff:
Old | New | | Differences |
---|
13 | 13 | | |
---|
14 | 14 | | let f = "k_insurance_address" |
---|
15 | 15 | | |
---|
16 | | - | let g = "k_amm" |
---|
| 16 | + | let g = "k_orders_address" |
---|
17 | 17 | | |
---|
18 | | - | let h = "k_admin_address" |
---|
| 18 | + | let h = "k_vault_address" |
---|
19 | 19 | | |
---|
20 | | - | let i = "k_admin_public_key" |
---|
| 20 | + | let i = "k_amm" |
---|
21 | 21 | | |
---|
22 | | - | let j = "k_quote_asset" |
---|
| 22 | + | let j = "k_admin_address" |
---|
23 | 23 | | |
---|
24 | | - | let k = "k_quote_staking" |
---|
| 24 | + | let k = "k_admin_public_key" |
---|
25 | 25 | | |
---|
26 | | - | let l = "k_staking_address" |
---|
| 26 | + | let l = "k_quote_asset" |
---|
27 | 27 | | |
---|
28 | | - | let m = "k_initialized" |
---|
| 28 | + | let m = "k_quote_staking" |
---|
29 | 29 | | |
---|
30 | | - | func n (o,p) = ((o + "_") + p) |
---|
| 30 | + | let n = "k_staking_address" |
---|
| 31 | + | |
---|
| 32 | + | let o = "k_initialized" |
---|
| 33 | + | |
---|
| 34 | + | func p (q,r) = ((q + "_") + r) |
---|
31 | 35 | | |
---|
32 | 36 | | |
---|
33 | | - | func q (r) = valueOrElse(getInteger(this, n(a, r)), 0) |
---|
| 37 | + | func s (t) = valueOrElse(getInteger(this, p(a, t)), 0) |
---|
34 | 38 | | |
---|
35 | 39 | | |
---|
36 | | - | func s () = valueOrErrorMessage(addressFromString(getStringValue(this, e)), "Coordinator not set") |
---|
| 40 | + | func u () = valueOrErrorMessage(addressFromString(getStringValue(this, e)), "Coordinator not set") |
---|
37 | 41 | | |
---|
38 | 42 | | |
---|
39 | | - | func t () = valueOrErrorMessage(addressFromString(getStringValue(s(), f)), "Insurance not set") |
---|
| 43 | + | func v () = valueOrErrorMessage(addressFromString(getStringValue(u(), f)), "Insurance not set") |
---|
40 | 44 | | |
---|
41 | 45 | | |
---|
42 | | - | func u (p) = valueOrElse(getBoolean(s(), n(g, p)), false) |
---|
| 46 | + | func w () = valueOrErrorMessage(addressFromString(getStringValue(u(), h)), "Vault not set") |
---|
43 | 47 | | |
---|
44 | 48 | | |
---|
45 | | - | func v () = valueOrElse(getBoolean(this, m), false) |
---|
| 49 | + | func x () = valueOrErrorMessage(addressFromString(getStringValue(u(), g)), "Orders not set") |
---|
46 | 50 | | |
---|
47 | 51 | | |
---|
48 | | - | func w () = addressFromString(getStringValue(s(), h)) |
---|
| 52 | + | func y (r) = valueOrElse(getBoolean(u(), p(i, r)), false) |
---|
49 | 53 | | |
---|
50 | 54 | | |
---|
51 | | - | func x () = fromBase58String(getStringValue(s(), i)) |
---|
| 55 | + | func z () = valueOrElse(getBoolean(this, o), false) |
---|
52 | 56 | | |
---|
53 | 57 | | |
---|
54 | | - | func y () = fromBase58String(getStringValue(s(), j)) |
---|
| 58 | + | func A () = addressFromString(getStringValue(u(), j)) |
---|
55 | 59 | | |
---|
56 | 60 | | |
---|
57 | | - | func z () = valueOrErrorMessage(addressFromString(getStringValue(s(), l)), "Staking not set") |
---|
| 61 | + | func B () = fromBase58String(getStringValue(u(), k)) |
---|
58 | 62 | | |
---|
59 | 63 | | |
---|
60 | | - | func A () = valueOrErrorMessage(addressFromString(getStringValue(this, b)), "Vires not set") |
---|
| 64 | + | func C () = fromBase58String(getStringValue(u(), l)) |
---|
61 | 65 | | |
---|
62 | 66 | | |
---|
63 | | - | func B (r) = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, n(c, r)), ("No vault for token " + r))), ("Invalid address for token " + r)) |
---|
| 67 | + | func D () = valueOrErrorMessage(addressFromString(getStringValue(u(), n)), "Staking not set") |
---|
64 | 68 | | |
---|
65 | 69 | | |
---|
66 | | - | func C (p) = if (if (u(p)) |
---|
67 | | - | then true |
---|
68 | | - | else (p == toString(t()))) |
---|
69 | | - | then true |
---|
70 | | - | else (p == toString(z())) |
---|
| 70 | + | func E () = valueOrErrorMessage(addressFromString(getStringValue(this, b)), "Vires not set") |
---|
71 | 71 | | |
---|
72 | 72 | | |
---|
73 | | - | func D (r,E) = [IntegerEntry(n(a, r), E)] |
---|
| 73 | + | func F (t) = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, p(c, t)), ("No vault for token " + t))), ("Invalid address for token " + t)) |
---|
74 | 74 | | |
---|
75 | 75 | | |
---|
76 | | - | @Callable(F) |
---|
77 | | - | func initialize (G,H,I,J) = if (v()) |
---|
| 76 | + | func G (r) = if (if (if (if (y(r)) |
---|
| 77 | + | then true |
---|
| 78 | + | else (r == toString(v()))) |
---|
| 79 | + | then true |
---|
| 80 | + | else (r == toString(D()))) |
---|
| 81 | + | then true |
---|
| 82 | + | else (r == toString(w()))) |
---|
| 83 | + | then true |
---|
| 84 | + | else (r == toString(x())) |
---|
| 85 | + | |
---|
| 86 | + | |
---|
| 87 | + | func H (t,I) = [IntegerEntry(p(a, t), I)] |
---|
| 88 | + | |
---|
| 89 | + | |
---|
| 90 | + | @Callable(J) |
---|
| 91 | + | func initialize (K,L,M,N) = if (z()) |
---|
78 | 92 | | then throw("Already initialized") |
---|
79 | | - | else [StringEntry(e, G), StringEntry(b, H), StringEntry(n(c, I), J), BooleanEntry(m, true)] |
---|
| 93 | + | else [StringEntry(e, K), StringEntry(b, L), StringEntry(p(c, M), N), BooleanEntry(o, true)] |
---|
80 | 94 | | |
---|
81 | 95 | | |
---|
82 | 96 | | |
---|
83 | | - | @Callable(F) |
---|
84 | | - | func addTokenVault (r,K) = if (if (!(v())) |
---|
| 97 | + | @Callable(J) |
---|
| 98 | + | func addTokenVault (t,O) = if (if (!(z())) |
---|
85 | 99 | | then true |
---|
86 | | - | else (F.caller != w())) |
---|
| 100 | + | else (J.caller != A())) |
---|
87 | 101 | | then throw("Invalid addTokenVault params") |
---|
88 | | - | else [StringEntry(n(c, r), K)] |
---|
| 102 | + | else [StringEntry(p(c, t), O)] |
---|
89 | 103 | | |
---|
90 | 104 | | |
---|
91 | 105 | | |
---|
92 | | - | @Callable(F) |
---|
93 | | - | func withdraw (r,L) = if (if (if (!(C(toString(F.caller)))) |
---|
| 106 | + | @Callable(J) |
---|
| 107 | + | func withdraw (t,P) = if (if (if (!(G(toString(J.caller)))) |
---|
94 | 108 | | then true |
---|
95 | | - | else !(v())) |
---|
| 109 | + | else !(z())) |
---|
96 | 110 | | then true |
---|
97 | | - | else (L > q(r))) |
---|
98 | | - | then throw(((("Invalid withdraw params " + toString(L)) + " > ") + toString(q(r)))) |
---|
| 111 | + | else (P > s(t))) |
---|
| 112 | + | then throw(((("Invalid withdraw params (manager) " + toString(P)) + " > ") + toString(s(t)))) |
---|
99 | 113 | | else { |
---|
100 | | - | let M = invoke(A(), "withdraw", [r, L], nil) |
---|
101 | | - | if ((M == M)) |
---|
| 114 | + | let Q = invoke(E(), "withdraw", [t, P], nil) |
---|
| 115 | + | if ((Q == Q)) |
---|
102 | 116 | | then { |
---|
103 | | - | let N = (q(r) - L) |
---|
104 | | - | (D(r, N) ++ [ScriptTransfer(F.caller, L, fromBase58String(r))]) |
---|
| 117 | + | let R = (s(t) - P) |
---|
| 118 | + | (H(t, R) ++ [ScriptTransfer(J.caller, P, fromBase58String(t))]) |
---|
105 | 119 | | } |
---|
106 | 120 | | else throw("Strict value is not equal to itself.") |
---|
107 | 121 | | } |
---|
108 | 122 | | |
---|
109 | 123 | | |
---|
110 | 124 | | |
---|
111 | | - | @Callable(F) |
---|
| 125 | + | @Callable(J) |
---|
112 | 126 | | func deposit () = { |
---|
113 | | - | let L = F.payments[0].amount |
---|
114 | | - | let r = toBase58String(valueOrErrorMessage(F.payments[0].assetId, "No assetId")) |
---|
115 | | - | if (if (if ((F.payments[0].assetId != y())) |
---|
| 127 | + | let P = J.payments[0].amount |
---|
| 128 | + | let t = toBase58String(valueOrErrorMessage(J.payments[0].assetId, "No assetId")) |
---|
| 129 | + | if (if (if ((J.payments[0].assetId != C())) |
---|
116 | 130 | | then true |
---|
117 | | - | else !(v())) |
---|
| 131 | + | else !(z())) |
---|
118 | 132 | | then true |
---|
119 | | - | else if (!(C(toString(F.caller)))) |
---|
120 | | - | then (F.caller != w()) |
---|
| 133 | + | else if (!(G(toString(J.caller)))) |
---|
| 134 | + | then (J.caller != A()) |
---|
121 | 135 | | else false) |
---|
122 | | - | then throw("Invalid deposit params") |
---|
| 136 | + | then throw("Invalid deposit params (manager)") |
---|
123 | 137 | | else { |
---|
124 | | - | let O = B(r) |
---|
125 | | - | let P = invoke(A(), "deposit", [toString(O), false], [AttachedPayment(F.payments[0].assetId, L)]) |
---|
126 | | - | if ((P == P)) |
---|
| 138 | + | let S = F(t) |
---|
| 139 | + | let T = invoke(E(), "deposit", [toString(S), false], [AttachedPayment(J.payments[0].assetId, P)]) |
---|
| 140 | + | if ((T == T)) |
---|
127 | 141 | | then { |
---|
128 | | - | let N = (q(r) + L) |
---|
129 | | - | D(r, N) |
---|
| 142 | + | let R = (s(t) + P) |
---|
| 143 | + | H(t, R) |
---|
130 | 144 | | } |
---|
131 | 145 | | else throw("Strict value is not equal to itself.") |
---|
132 | 146 | | } |
---|
|
134 | 148 | | |
---|
135 | 149 | | |
---|
136 | 150 | | |
---|
137 | | - | @Callable(F) |
---|
138 | | - | func claimProfit (r) = if (if (if ((fromBase58String(r) != y())) |
---|
| 151 | + | @Callable(J) |
---|
| 152 | + | func claimProfit (t) = if (if (if ((fromBase58String(t) != C())) |
---|
139 | 153 | | then true |
---|
140 | | - | else !(v())) |
---|
| 154 | + | else !(z())) |
---|
141 | 155 | | then true |
---|
142 | | - | else (F.caller != w())) |
---|
| 156 | + | else (J.caller != A())) |
---|
143 | 157 | | then throw("Invalid claimProfit params") |
---|
144 | 158 | | else { |
---|
145 | | - | let Q = invoke(B(r), "getCurrentTotals", [toString(this)], nil) |
---|
146 | | - | if ((Q == Q)) |
---|
| 159 | + | let U = invoke(F(t), "getCurrentTotals", [toString(this)], nil) |
---|
| 160 | + | if ((U == U)) |
---|
147 | 161 | | then { |
---|
148 | | - | let N = { |
---|
149 | | - | let R = Q |
---|
150 | | - | if ($isInstanceOf(R, "(Int, Int, Int, Int)")) |
---|
| 162 | + | let R = { |
---|
| 163 | + | let V = U |
---|
| 164 | + | if ($isInstanceOf(V, "(Int, Int, Int, Int)")) |
---|
151 | 165 | | then { |
---|
152 | | - | let S = R |
---|
153 | | - | S._3 |
---|
| 166 | + | let W = V |
---|
| 167 | + | W._3 |
---|
154 | 168 | | } |
---|
155 | 169 | | else throw("Invalid currentAmount type") |
---|
156 | 170 | | } |
---|
157 | | - | let T = (N - q(r)) |
---|
158 | | - | let M = invoke(A(), "withdraw", [r, T], nil) |
---|
159 | | - | if ((M == M)) |
---|
160 | | - | then [ScriptTransfer(F.caller, T, fromBase58String(r))] |
---|
| 171 | + | let X = (R - s(t)) |
---|
| 172 | + | let Q = invoke(E(), "withdraw", [t, X], nil) |
---|
| 173 | + | if ((Q == Q)) |
---|
| 174 | + | then [ScriptTransfer(J.caller, X, fromBase58String(t))] |
---|
161 | 175 | | else throw("Strict value is not equal to itself.") |
---|
162 | 176 | | } |
---|
163 | 177 | | else throw("Strict value is not equal to itself.") |
---|
|
165 | 179 | | |
---|
166 | 180 | | |
---|
167 | 181 | | |
---|
168 | | - | @Callable(F) |
---|
169 | | - | func view_claimProfit (r) = if (if ((fromBase58String(r) != y())) |
---|
| 182 | + | @Callable(J) |
---|
| 183 | + | func view_claimProfit (t) = if (if ((fromBase58String(t) != C())) |
---|
170 | 184 | | then true |
---|
171 | | - | else !(v())) |
---|
| 185 | + | else !(z())) |
---|
172 | 186 | | then throw("Invalid view_claimProfit params") |
---|
173 | 187 | | else { |
---|
174 | | - | let Q = invoke(B(r), "getCurrentTotals", [toString(this)], nil) |
---|
175 | | - | if ((Q == Q)) |
---|
| 188 | + | let U = invoke(F(t), "getCurrentTotals", [toString(this)], nil) |
---|
| 189 | + | if ((U == U)) |
---|
176 | 190 | | then { |
---|
177 | | - | let N = { |
---|
178 | | - | let R = Q |
---|
179 | | - | if ($isInstanceOf(R, "(Int, Int, Int, Int)")) |
---|
| 191 | + | let R = { |
---|
| 192 | + | let V = U |
---|
| 193 | + | if ($isInstanceOf(V, "(Int, Int, Int, Int)")) |
---|
180 | 194 | | then { |
---|
181 | | - | let S = R |
---|
182 | | - | S._3 |
---|
| 195 | + | let W = V |
---|
| 196 | + | W._3 |
---|
183 | 197 | | } |
---|
184 | 198 | | else throw("Invalid currentAmount type") |
---|
185 | 199 | | } |
---|
186 | | - | let T = (N - q(r)) |
---|
187 | | - | throw(((((toString(q(r)) + ",") + toString(N)) + ",") + toString(T))) |
---|
| 200 | + | let X = (R - s(t)) |
---|
| 201 | + | throw(((((toString(s(t)) + ",") + toString(R)) + ",") + toString(X))) |
---|
188 | 202 | | } |
---|
189 | 203 | | else throw("Strict value is not equal to itself.") |
---|
190 | 204 | | } |
---|
191 | 205 | | |
---|
192 | 206 | | |
---|
193 | | - | @Verifier(U) |
---|
194 | | - | func V () = sigVerify(U.bodyBytes, U.proofs[0], x()) |
---|
| 207 | + | @Verifier(Y) |
---|
| 208 | + | func Z () = sigVerify(Y.bodyBytes, Y.proofs[0], B()) |
---|
195 | 209 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = "k_funds" |
---|
5 | 5 | | |
---|
6 | 6 | | let b = "k_vires_address" |
---|
7 | 7 | | |
---|
8 | 8 | | let c = "k_vires_vault" |
---|
9 | 9 | | |
---|
10 | 10 | | let d = "k_asset_claimed_profit" |
---|
11 | 11 | | |
---|
12 | 12 | | let e = "k_coordinatorAddress" |
---|
13 | 13 | | |
---|
14 | 14 | | let f = "k_insurance_address" |
---|
15 | 15 | | |
---|
16 | | - | let g = "k_amm" |
---|
| 16 | + | let g = "k_orders_address" |
---|
17 | 17 | | |
---|
18 | | - | let h = "k_admin_address" |
---|
| 18 | + | let h = "k_vault_address" |
---|
19 | 19 | | |
---|
20 | | - | let i = "k_admin_public_key" |
---|
| 20 | + | let i = "k_amm" |
---|
21 | 21 | | |
---|
22 | | - | let j = "k_quote_asset" |
---|
| 22 | + | let j = "k_admin_address" |
---|
23 | 23 | | |
---|
24 | | - | let k = "k_quote_staking" |
---|
| 24 | + | let k = "k_admin_public_key" |
---|
25 | 25 | | |
---|
26 | | - | let l = "k_staking_address" |
---|
| 26 | + | let l = "k_quote_asset" |
---|
27 | 27 | | |
---|
28 | | - | let m = "k_initialized" |
---|
| 28 | + | let m = "k_quote_staking" |
---|
29 | 29 | | |
---|
30 | | - | func n (o,p) = ((o + "_") + p) |
---|
| 30 | + | let n = "k_staking_address" |
---|
| 31 | + | |
---|
| 32 | + | let o = "k_initialized" |
---|
| 33 | + | |
---|
| 34 | + | func p (q,r) = ((q + "_") + r) |
---|
31 | 35 | | |
---|
32 | 36 | | |
---|
33 | | - | func q (r) = valueOrElse(getInteger(this, n(a, r)), 0) |
---|
| 37 | + | func s (t) = valueOrElse(getInteger(this, p(a, t)), 0) |
---|
34 | 38 | | |
---|
35 | 39 | | |
---|
36 | | - | func s () = valueOrErrorMessage(addressFromString(getStringValue(this, e)), "Coordinator not set") |
---|
| 40 | + | func u () = valueOrErrorMessage(addressFromString(getStringValue(this, e)), "Coordinator not set") |
---|
37 | 41 | | |
---|
38 | 42 | | |
---|
39 | | - | func t () = valueOrErrorMessage(addressFromString(getStringValue(s(), f)), "Insurance not set") |
---|
| 43 | + | func v () = valueOrErrorMessage(addressFromString(getStringValue(u(), f)), "Insurance not set") |
---|
40 | 44 | | |
---|
41 | 45 | | |
---|
42 | | - | func u (p) = valueOrElse(getBoolean(s(), n(g, p)), false) |
---|
| 46 | + | func w () = valueOrErrorMessage(addressFromString(getStringValue(u(), h)), "Vault not set") |
---|
43 | 47 | | |
---|
44 | 48 | | |
---|
45 | | - | func v () = valueOrElse(getBoolean(this, m), false) |
---|
| 49 | + | func x () = valueOrErrorMessage(addressFromString(getStringValue(u(), g)), "Orders not set") |
---|
46 | 50 | | |
---|
47 | 51 | | |
---|
48 | | - | func w () = addressFromString(getStringValue(s(), h)) |
---|
| 52 | + | func y (r) = valueOrElse(getBoolean(u(), p(i, r)), false) |
---|
49 | 53 | | |
---|
50 | 54 | | |
---|
51 | | - | func x () = fromBase58String(getStringValue(s(), i)) |
---|
| 55 | + | func z () = valueOrElse(getBoolean(this, o), false) |
---|
52 | 56 | | |
---|
53 | 57 | | |
---|
54 | | - | func y () = fromBase58String(getStringValue(s(), j)) |
---|
| 58 | + | func A () = addressFromString(getStringValue(u(), j)) |
---|
55 | 59 | | |
---|
56 | 60 | | |
---|
57 | | - | func z () = valueOrErrorMessage(addressFromString(getStringValue(s(), l)), "Staking not set") |
---|
| 61 | + | func B () = fromBase58String(getStringValue(u(), k)) |
---|
58 | 62 | | |
---|
59 | 63 | | |
---|
60 | | - | func A () = valueOrErrorMessage(addressFromString(getStringValue(this, b)), "Vires not set") |
---|
| 64 | + | func C () = fromBase58String(getStringValue(u(), l)) |
---|
61 | 65 | | |
---|
62 | 66 | | |
---|
63 | | - | func B (r) = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, n(c, r)), ("No vault for token " + r))), ("Invalid address for token " + r)) |
---|
| 67 | + | func D () = valueOrErrorMessage(addressFromString(getStringValue(u(), n)), "Staking not set") |
---|
64 | 68 | | |
---|
65 | 69 | | |
---|
66 | | - | func C (p) = if (if (u(p)) |
---|
67 | | - | then true |
---|
68 | | - | else (p == toString(t()))) |
---|
69 | | - | then true |
---|
70 | | - | else (p == toString(z())) |
---|
| 70 | + | func E () = valueOrErrorMessage(addressFromString(getStringValue(this, b)), "Vires not set") |
---|
71 | 71 | | |
---|
72 | 72 | | |
---|
73 | | - | func D (r,E) = [IntegerEntry(n(a, r), E)] |
---|
| 73 | + | func F (t) = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, p(c, t)), ("No vault for token " + t))), ("Invalid address for token " + t)) |
---|
74 | 74 | | |
---|
75 | 75 | | |
---|
76 | | - | @Callable(F) |
---|
77 | | - | func initialize (G,H,I,J) = if (v()) |
---|
| 76 | + | func G (r) = if (if (if (if (y(r)) |
---|
| 77 | + | then true |
---|
| 78 | + | else (r == toString(v()))) |
---|
| 79 | + | then true |
---|
| 80 | + | else (r == toString(D()))) |
---|
| 81 | + | then true |
---|
| 82 | + | else (r == toString(w()))) |
---|
| 83 | + | then true |
---|
| 84 | + | else (r == toString(x())) |
---|
| 85 | + | |
---|
| 86 | + | |
---|
| 87 | + | func H (t,I) = [IntegerEntry(p(a, t), I)] |
---|
| 88 | + | |
---|
| 89 | + | |
---|
| 90 | + | @Callable(J) |
---|
| 91 | + | func initialize (K,L,M,N) = if (z()) |
---|
78 | 92 | | then throw("Already initialized") |
---|
79 | | - | else [StringEntry(e, G), StringEntry(b, H), StringEntry(n(c, I), J), BooleanEntry(m, true)] |
---|
| 93 | + | else [StringEntry(e, K), StringEntry(b, L), StringEntry(p(c, M), N), BooleanEntry(o, true)] |
---|
80 | 94 | | |
---|
81 | 95 | | |
---|
82 | 96 | | |
---|
83 | | - | @Callable(F) |
---|
84 | | - | func addTokenVault (r,K) = if (if (!(v())) |
---|
| 97 | + | @Callable(J) |
---|
| 98 | + | func addTokenVault (t,O) = if (if (!(z())) |
---|
85 | 99 | | then true |
---|
86 | | - | else (F.caller != w())) |
---|
| 100 | + | else (J.caller != A())) |
---|
87 | 101 | | then throw("Invalid addTokenVault params") |
---|
88 | | - | else [StringEntry(n(c, r), K)] |
---|
| 102 | + | else [StringEntry(p(c, t), O)] |
---|
89 | 103 | | |
---|
90 | 104 | | |
---|
91 | 105 | | |
---|
92 | | - | @Callable(F) |
---|
93 | | - | func withdraw (r,L) = if (if (if (!(C(toString(F.caller)))) |
---|
| 106 | + | @Callable(J) |
---|
| 107 | + | func withdraw (t,P) = if (if (if (!(G(toString(J.caller)))) |
---|
94 | 108 | | then true |
---|
95 | | - | else !(v())) |
---|
| 109 | + | else !(z())) |
---|
96 | 110 | | then true |
---|
97 | | - | else (L > q(r))) |
---|
98 | | - | then throw(((("Invalid withdraw params " + toString(L)) + " > ") + toString(q(r)))) |
---|
| 111 | + | else (P > s(t))) |
---|
| 112 | + | then throw(((("Invalid withdraw params (manager) " + toString(P)) + " > ") + toString(s(t)))) |
---|
99 | 113 | | else { |
---|
100 | | - | let M = invoke(A(), "withdraw", [r, L], nil) |
---|
101 | | - | if ((M == M)) |
---|
| 114 | + | let Q = invoke(E(), "withdraw", [t, P], nil) |
---|
| 115 | + | if ((Q == Q)) |
---|
102 | 116 | | then { |
---|
103 | | - | let N = (q(r) - L) |
---|
104 | | - | (D(r, N) ++ [ScriptTransfer(F.caller, L, fromBase58String(r))]) |
---|
| 117 | + | let R = (s(t) - P) |
---|
| 118 | + | (H(t, R) ++ [ScriptTransfer(J.caller, P, fromBase58String(t))]) |
---|
105 | 119 | | } |
---|
106 | 120 | | else throw("Strict value is not equal to itself.") |
---|
107 | 121 | | } |
---|
108 | 122 | | |
---|
109 | 123 | | |
---|
110 | 124 | | |
---|
111 | | - | @Callable(F) |
---|
| 125 | + | @Callable(J) |
---|
112 | 126 | | func deposit () = { |
---|
113 | | - | let L = F.payments[0].amount |
---|
114 | | - | let r = toBase58String(valueOrErrorMessage(F.payments[0].assetId, "No assetId")) |
---|
115 | | - | if (if (if ((F.payments[0].assetId != y())) |
---|
| 127 | + | let P = J.payments[0].amount |
---|
| 128 | + | let t = toBase58String(valueOrErrorMessage(J.payments[0].assetId, "No assetId")) |
---|
| 129 | + | if (if (if ((J.payments[0].assetId != C())) |
---|
116 | 130 | | then true |
---|
117 | | - | else !(v())) |
---|
| 131 | + | else !(z())) |
---|
118 | 132 | | then true |
---|
119 | | - | else if (!(C(toString(F.caller)))) |
---|
120 | | - | then (F.caller != w()) |
---|
| 133 | + | else if (!(G(toString(J.caller)))) |
---|
| 134 | + | then (J.caller != A()) |
---|
121 | 135 | | else false) |
---|
122 | | - | then throw("Invalid deposit params") |
---|
| 136 | + | then throw("Invalid deposit params (manager)") |
---|
123 | 137 | | else { |
---|
124 | | - | let O = B(r) |
---|
125 | | - | let P = invoke(A(), "deposit", [toString(O), false], [AttachedPayment(F.payments[0].assetId, L)]) |
---|
126 | | - | if ((P == P)) |
---|
| 138 | + | let S = F(t) |
---|
| 139 | + | let T = invoke(E(), "deposit", [toString(S), false], [AttachedPayment(J.payments[0].assetId, P)]) |
---|
| 140 | + | if ((T == T)) |
---|
127 | 141 | | then { |
---|
128 | | - | let N = (q(r) + L) |
---|
129 | | - | D(r, N) |
---|
| 142 | + | let R = (s(t) + P) |
---|
| 143 | + | H(t, R) |
---|
130 | 144 | | } |
---|
131 | 145 | | else throw("Strict value is not equal to itself.") |
---|
132 | 146 | | } |
---|
133 | 147 | | } |
---|
134 | 148 | | |
---|
135 | 149 | | |
---|
136 | 150 | | |
---|
137 | | - | @Callable(F) |
---|
138 | | - | func claimProfit (r) = if (if (if ((fromBase58String(r) != y())) |
---|
| 151 | + | @Callable(J) |
---|
| 152 | + | func claimProfit (t) = if (if (if ((fromBase58String(t) != C())) |
---|
139 | 153 | | then true |
---|
140 | | - | else !(v())) |
---|
| 154 | + | else !(z())) |
---|
141 | 155 | | then true |
---|
142 | | - | else (F.caller != w())) |
---|
| 156 | + | else (J.caller != A())) |
---|
143 | 157 | | then throw("Invalid claimProfit params") |
---|
144 | 158 | | else { |
---|
145 | | - | let Q = invoke(B(r), "getCurrentTotals", [toString(this)], nil) |
---|
146 | | - | if ((Q == Q)) |
---|
| 159 | + | let U = invoke(F(t), "getCurrentTotals", [toString(this)], nil) |
---|
| 160 | + | if ((U == U)) |
---|
147 | 161 | | then { |
---|
148 | | - | let N = { |
---|
149 | | - | let R = Q |
---|
150 | | - | if ($isInstanceOf(R, "(Int, Int, Int, Int)")) |
---|
| 162 | + | let R = { |
---|
| 163 | + | let V = U |
---|
| 164 | + | if ($isInstanceOf(V, "(Int, Int, Int, Int)")) |
---|
151 | 165 | | then { |
---|
152 | | - | let S = R |
---|
153 | | - | S._3 |
---|
| 166 | + | let W = V |
---|
| 167 | + | W._3 |
---|
154 | 168 | | } |
---|
155 | 169 | | else throw("Invalid currentAmount type") |
---|
156 | 170 | | } |
---|
157 | | - | let T = (N - q(r)) |
---|
158 | | - | let M = invoke(A(), "withdraw", [r, T], nil) |
---|
159 | | - | if ((M == M)) |
---|
160 | | - | then [ScriptTransfer(F.caller, T, fromBase58String(r))] |
---|
| 171 | + | let X = (R - s(t)) |
---|
| 172 | + | let Q = invoke(E(), "withdraw", [t, X], nil) |
---|
| 173 | + | if ((Q == Q)) |
---|
| 174 | + | then [ScriptTransfer(J.caller, X, fromBase58String(t))] |
---|
161 | 175 | | else throw("Strict value is not equal to itself.") |
---|
162 | 176 | | } |
---|
163 | 177 | | else throw("Strict value is not equal to itself.") |
---|
164 | 178 | | } |
---|
165 | 179 | | |
---|
166 | 180 | | |
---|
167 | 181 | | |
---|
168 | | - | @Callable(F) |
---|
169 | | - | func view_claimProfit (r) = if (if ((fromBase58String(r) != y())) |
---|
| 182 | + | @Callable(J) |
---|
| 183 | + | func view_claimProfit (t) = if (if ((fromBase58String(t) != C())) |
---|
170 | 184 | | then true |
---|
171 | | - | else !(v())) |
---|
| 185 | + | else !(z())) |
---|
172 | 186 | | then throw("Invalid view_claimProfit params") |
---|
173 | 187 | | else { |
---|
174 | | - | let Q = invoke(B(r), "getCurrentTotals", [toString(this)], nil) |
---|
175 | | - | if ((Q == Q)) |
---|
| 188 | + | let U = invoke(F(t), "getCurrentTotals", [toString(this)], nil) |
---|
| 189 | + | if ((U == U)) |
---|
176 | 190 | | then { |
---|
177 | | - | let N = { |
---|
178 | | - | let R = Q |
---|
179 | | - | if ($isInstanceOf(R, "(Int, Int, Int, Int)")) |
---|
| 191 | + | let R = { |
---|
| 192 | + | let V = U |
---|
| 193 | + | if ($isInstanceOf(V, "(Int, Int, Int, Int)")) |
---|
180 | 194 | | then { |
---|
181 | | - | let S = R |
---|
182 | | - | S._3 |
---|
| 195 | + | let W = V |
---|
| 196 | + | W._3 |
---|
183 | 197 | | } |
---|
184 | 198 | | else throw("Invalid currentAmount type") |
---|
185 | 199 | | } |
---|
186 | | - | let T = (N - q(r)) |
---|
187 | | - | throw(((((toString(q(r)) + ",") + toString(N)) + ",") + toString(T))) |
---|
| 200 | + | let X = (R - s(t)) |
---|
| 201 | + | throw(((((toString(s(t)) + ",") + toString(R)) + ",") + toString(X))) |
---|
188 | 202 | | } |
---|
189 | 203 | | else throw("Strict value is not equal to itself.") |
---|
190 | 204 | | } |
---|
191 | 205 | | |
---|
192 | 206 | | |
---|
193 | | - | @Verifier(U) |
---|
194 | | - | func V () = sigVerify(U.bodyBytes, U.proofs[0], x()) |
---|
| 207 | + | @Verifier(Y) |
---|
| 208 | + | func Z () = sigVerify(Y.bodyBytes, Y.proofs[0], B()) |
---|
195 | 209 | | |
---|