tx · 8egnpN8ni4wvEeZTEQndwqHJs7sWjcbTqaVqSKCEJc9M 3NBhCjipaSBkkoRSBdcyx2ui7wnY4HnxiVW: -0.01300000 Waves 2023.05.04 13:11 [2562877] smart account 3NBhCjipaSBkkoRSBdcyx2ui7wnY4HnxiVW > SELF 0.00000000 Waves
{ "type": 13, "id": "8egnpN8ni4wvEeZTEQndwqHJs7sWjcbTqaVqSKCEJc9M", "fee": 1300000, "feeAssetId": null, "timestamp": 1683195127225, "version": 2, "chainId": 84, "sender": "3NBhCjipaSBkkoRSBdcyx2ui7wnY4HnxiVW", "senderPublicKey": "FwXakLfcNwZygjHPVBd5TDZ4C5Wrgpoi9U69GufmFkQ", "proofs": [ "4SfLDikSbsx3gnsfQdBn1meYJHtjxzxtDs9cgaujNoRBBn1JFXwktRyHDkURfYcpa1mvYhevcoDAZ1gZQcjWqYFk" ], "script": "base64:BgIlCAISCgoICAgBAQEBAQESAwoBCBIDCgEIEgUKAwgIARIECgIICBIAA1NFUAICX18BE2tleU1hbmFnZXJQdWJsaWNLZXkAAhQlc19fbWFuYWdlclB1YmxpY0tleQEWa2V5TWFuYWdlclZhdWx0QWRkcmVzcwACFyVzX19tYW5hZ2VyVmF1bHRBZGRyZXNzARdnZXRNYW5hZ2VyQWRkcmVzc09yRmFpbAAJARFAZXh0ck5hdGl2ZSgxMDYyKQEJARFAZXh0ck5hdGl2ZSgxMDU4KQEJARZrZXlNYW5hZ2VyVmF1bHRBZGRyZXNzAAEQa2V5V2l0aGRyYXdEZWxheQIGYXNzZXRBBmFzc2V0QgkAuQkCCQDMCAICBiVzJXMlcwkAzAgCAg13aXRoZHJhd0RlbGF5CQDMCAIFBmFzc2V0QQkAzAgCBQZhc3NldEIFA25pbAUDU0VQARVrZXlEZXBvc2l0RmVlUGVybWlsbGUCBmFzc2V0QQZhc3NldEIJALkJAgkAzAgCAgYlcyVzJXMJAMwIAgISZGVwb3NpdEZlZVBlcm1pbGxlCQDMCAIFBmFzc2V0QQkAzAgC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YXNzZXRBBQZhc3NldEIAAAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIFC3RvV2l0aGRyYXdBBQ53aXRoZHJhd0Fzc2V0QQUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJ0eAEGdmVyaWZ5AAQPdGFyZ2V0UHVibGljS2V5BAckbWF0Y2gwCQEWbWFuYWdlclB1YmxpY0tleU9yVW5pdAADCQABAgUHJG1hdGNoMAIKQnl0ZVZlY3RvcgQCcGsFByRtYXRjaDAFAnBrAwkAAQIFByRtYXRjaDACBFVuaXQIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUPdGFyZ2V0UHVibGljS2V5FVMfmg==", "height": 2562877, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CLSZFcsU3jobwVaGwq9wqTvsA9R4hKieuD4Fezk7fgAU Next: none Diff:
Old | New | Differences | |
---|---|---|---|
6 | 6 | func b () = "%s__managerPublicKey" | |
7 | 7 | ||
8 | 8 | ||
9 | - | func c () = "%s__ | |
9 | + | func c () = "%s__managerVaultAddress" | |
10 | 10 | ||
11 | 11 | ||
12 | - | func d ( | |
12 | + | func d () = addressFromStringValue(getStringValue(c())) | |
13 | 13 | ||
14 | 14 | ||
15 | - | func | |
15 | + | func e (f,g) = makeString(["%s%s%s", "withdrawDelay", f, g], a) | |
16 | 16 | ||
17 | 17 | ||
18 | - | func h ( | |
18 | + | func h (f,g) = makeString(["%s%s%s", "depositFeePermille", f, g], a) | |
19 | 19 | ||
20 | 20 | ||
21 | - | func i ( | |
21 | + | func i (f,g) = makeString(["%s%s%s", "withdrawFeePermille", f, g], a) | |
22 | 22 | ||
23 | 23 | ||
24 | - | func j ( | |
24 | + | func j (f,g) = makeString(["%s%s%s", "minAmountDeposit", f, g], a) | |
25 | 25 | ||
26 | 26 | ||
27 | - | func k ( | |
27 | + | func k (f,g) = makeString(["%s%s%s", "assetsPairStatus", f, g], a) | |
28 | 28 | ||
29 | 29 | ||
30 | - | func l ( | |
30 | + | func l (f,g) = makeString(["%s%s%s", "minAmountWithdraw", f, g], a) | |
31 | 31 | ||
32 | 32 | ||
33 | - | func | |
33 | + | func m (f,g,n) = makeString(["%s%s%s%s", "balance", f, g, n], a) | |
34 | 34 | ||
35 | 35 | ||
36 | - | func o ( | |
36 | + | func o (f,g) = makeString(["%s%s%s%s", "totalFeeCollected", "deposit", f, g], a) | |
37 | 37 | ||
38 | 38 | ||
39 | - | func | |
39 | + | func p (n,f,g,q) = makeString(["%s%s%s%s%s%d", "withdrawProcess", "inProgress", n, f, g, toString(q)], a) | |
40 | 40 | ||
41 | 41 | ||
42 | - | func r () = { | |
43 | - | let s = getString(b()) | |
44 | - | if ($isInstanceOf(s, "String")) | |
42 | + | func r (n,f,g,q) = makeString(["%s%s%s%s%s%d", "withdrawProcess", "done", n, f, g, toString(q)], a) | |
43 | + | ||
44 | + | ||
45 | + | func s () = { | |
46 | + | let t = d() | |
47 | + | let u = getString(t, b()) | |
48 | + | if ($isInstanceOf(u, "String")) | |
45 | 49 | then { | |
46 | - | let | |
47 | - | fromBase58String( | |
50 | + | let v = u | |
51 | + | fromBase58String(v) | |
48 | 52 | } | |
49 | - | else if ($isInstanceOf( | |
53 | + | else if ($isInstanceOf(u, "Unit")) | |
50 | 54 | then unit | |
51 | 55 | else throw("Match error") | |
52 | 56 | } | |
53 | 57 | ||
54 | 58 | ||
55 | - | func u () = { | |
56 | - | let s = getString(c()) | |
57 | - | if ($isInstanceOf(s, "String")) | |
59 | + | func w (x) = { | |
60 | + | let y = throw("Permission denied.") | |
61 | + | let u = s() | |
62 | + | if ($isInstanceOf(u, "ByteVector")) | |
58 | 63 | then { | |
59 | - | let t = s | |
60 | - | fromBase58String(t) | |
64 | + | let z = u | |
65 | + | if ((x.callerPublicKey == z)) | |
66 | + | then true | |
67 | + | else y | |
61 | 68 | } | |
62 | - | else if ($isInstanceOf(s, "Unit")) | |
63 | - | then unit | |
69 | + | else if ($isInstanceOf(u, "Unit")) | |
70 | + | then if ((x.caller == this)) | |
71 | + | then true | |
72 | + | else y | |
64 | 73 | else throw("Match error") | |
65 | 74 | } | |
66 | 75 | ||
67 | 76 | ||
68 | - | func v (w) = { | |
69 | - | let x = throw("Permission denied.") | |
70 | - | let s = r() | |
71 | - | if ($isInstanceOf(s, "ByteVector")) | |
72 | - | then { | |
73 | - | let y = s | |
74 | - | if ((w.callerPublicKey == y)) | |
75 | - | then true | |
76 | - | else x | |
77 | - | } | |
78 | - | else if ($isInstanceOf(s, "Unit")) | |
79 | - | then if ((w.caller == this)) | |
80 | - | then true | |
81 | - | else x | |
82 | - | else throw("Match error") | |
83 | - | } | |
77 | + | func A (B) = makeString(["otc_multiasset.ride:", B], " ") | |
84 | 78 | ||
85 | 79 | ||
86 | - | func | |
80 | + | func C (B) = throw(A(B)) | |
87 | 81 | ||
88 | 82 | ||
89 | - | func B (A) = throw(z(A)) | |
90 | - | ||
91 | - | ||
92 | - | @Callable(w) | |
93 | - | func registerAsset (e,f,C,D,E,F,G,H) = { | |
94 | - | let I = v(w) | |
95 | - | if ((I == I)) | |
83 | + | @Callable(x) | |
84 | + | func registerAsset (f,g,D,E,F,G,H,I) = { | |
85 | + | let J = w(x) | |
86 | + | if ((J == J)) | |
96 | 87 | then { | |
97 | - | let | |
98 | - | let | |
99 | - | let | |
100 | - | let | |
101 | - | let | |
102 | - | let | |
103 | - | [ | |
88 | + | let K = e(f, g) | |
89 | + | let L = h(f, g) | |
90 | + | let M = i(f, g) | |
91 | + | let N = j(f, g) | |
92 | + | let O = l(f, g) | |
93 | + | let P = k(f, g) | |
94 | + | [IntegerEntry(K, D), IntegerEntry(L, E), IntegerEntry(M, F), IntegerEntry(N, G), IntegerEntry(O, H), IntegerEntry(P, I)] | |
104 | 95 | } | |
105 | 96 | else throw("Strict value is not equal to itself.") | |
106 | 97 | } | |
107 | 98 | ||
108 | 99 | ||
109 | 100 | ||
110 | - | @Callable( | |
111 | - | func swapAssetsAToB ( | |
112 | - | let | |
113 | - | let | |
114 | - | let | |
115 | - | let | |
116 | - | let | |
117 | - | let | |
118 | - | let | |
119 | - | let | |
120 | - | let | |
121 | - | let | |
122 | - | let | |
123 | - | let | |
101 | + | @Callable(x) | |
102 | + | func swapAssetsAToB (g) = { | |
103 | + | let Q = value(x.payments[0]) | |
104 | + | let f = toBase58String(value(Q.assetId)) | |
105 | + | let R = fromBase58String(value(g)) | |
106 | + | let n = toString(x.caller) | |
107 | + | let G = valueOrErrorMessage(getInteger(j(f, g)), A("This asset pair does not exist.")) | |
108 | + | let S = Q.amount | |
109 | + | let E = valueOrErrorMessage(getInteger(h(f, g)), A("The deposit fee for this pair of assets is not set.")) | |
110 | + | let T = ((S / 1000) * E) | |
111 | + | let U = valueOrElse(getInteger(m(f, g, n)), 0) | |
112 | + | let V = valueOrElse(getInteger(o(f, g)), 0) | |
113 | + | let I = valueOrErrorMessage(getInteger(k(f, g)), A("The asset pair status for this pair of assets is not set.")) | |
114 | + | let W = if ((I == 0)) | |
124 | 115 | then true | |
125 | - | else | |
126 | - | if (( | |
116 | + | else C("The couple's deposit is blocked.") | |
117 | + | if ((W == W)) | |
127 | 118 | then { | |
128 | - | let | |
119 | + | let X = if ((S >= G)) | |
129 | 120 | then true | |
130 | - | else | |
131 | - | if (( | |
121 | + | else C("The deposit amount is less than the minimum.") | |
122 | + | if ((X == X)) | |
132 | 123 | then { | |
133 | - | let | |
134 | - | let | |
124 | + | let Y = ((U + S) - T) | |
125 | + | let Z = if ((Y > 0)) | |
135 | 126 | then true | |
136 | - | else | |
137 | - | if (( | |
138 | - | then [IntegerEntry( | |
127 | + | else C("The final balance is less than or equal to 0.") | |
128 | + | if ((Z == Z)) | |
129 | + | then [IntegerEntry(m(f, g, n), Y), IntegerEntry(o(f, g), (V + T)), ScriptTransfer(x.caller, (S - T), R)] | |
139 | 130 | else throw("Strict value is not equal to itself.") | |
140 | 131 | } | |
141 | 132 | else throw("Strict value is not equal to itself.") | |
145 | 136 | ||
146 | 137 | ||
147 | 138 | ||
148 | - | @Callable( | |
149 | - | func initializationSwapAssetsBToA ( | |
150 | - | let | |
151 | - | let | |
152 | - | let | |
153 | - | let | |
154 | - | let | |
155 | - | let | |
156 | - | let | |
157 | - | let | |
158 | - | let | |
159 | - | let | |
160 | - | let | |
161 | - | let | |
162 | - | let | |
139 | + | @Callable(x) | |
140 | + | func initializationSwapAssetsBToA (f) = { | |
141 | + | let Q = value(x.payments[0]) | |
142 | + | let aa = Q.amount | |
143 | + | let g = toBase58String(value(Q.assetId)) | |
144 | + | let n = toString(x.caller) | |
145 | + | let H = valueOrErrorMessage(getInteger(l(f, g)), A("The minimum withdrawal amount for this pair of assets is not set.")) | |
146 | + | let ab = (height + valueOrErrorMessage(getInteger(e(f, g)), A("Withdrawal delay is not set for the specified pair."))) | |
147 | + | let U = valueOrErrorMessage(getInteger(m(f, g, n)), A("This user balance does not exist.")) | |
148 | + | let V = valueOrElse(getInteger(o(f, g)), 0) | |
149 | + | let M = i(f, g) | |
150 | + | let F = valueOrErrorMessage(getInteger(M), A("The withdrawal fee for this pair of assets is not set.")) | |
151 | + | let T = ((aa / 1000) * F) | |
152 | + | let Y = (U - aa) | |
153 | + | let Z = if ((Y >= 0)) | |
163 | 154 | then true | |
164 | - | else | |
165 | - | if (( | |
155 | + | else C("Swap amount fail, amount is to small.") | |
156 | + | if ((Z == Z)) | |
166 | 157 | then { | |
167 | - | let | |
158 | + | let X = if ((aa >= H)) | |
168 | 159 | then true | |
169 | - | else | |
170 | - | if (( | |
160 | + | else C("The withdraw amount is less than the minimum.") | |
161 | + | if ((X == X)) | |
171 | 162 | then { | |
172 | - | let | |
163 | + | let ac = if ((getInteger(p(n, f, g, ab)) == unit)) | |
173 | 164 | then true | |
174 | - | else | |
175 | - | if (( | |
176 | - | then [IntegerEntry( | |
165 | + | else C("At this height, there is already an exchange of this pair.") | |
166 | + | if ((ac == ac)) | |
167 | + | then [IntegerEntry(m(f, g, n), Y), IntegerEntry(p(n, f, g, ab), (aa - T)), IntegerEntry(o(f, g), (V + T))] | |
177 | 168 | else throw("Strict value is not equal to itself.") | |
178 | 169 | } | |
179 | 170 | else throw("Strict value is not equal to itself.") | |
183 | 174 | ||
184 | 175 | ||
185 | 176 | ||
186 | - | @Callable( | |
187 | - | func withdrawAsset ( | |
188 | - | let | |
189 | - | let | |
190 | - | let | |
191 | - | let | |
177 | + | @Callable(x) | |
178 | + | func withdrawAsset (f,g,q) = { | |
179 | + | let n = toString(x.caller) | |
180 | + | let aa = valueOrErrorMessage(getInteger(p(n, f, g, q)), A("At this height, withdraw was not initialized with this pair of assets.")) | |
181 | + | let R = fromBase58String(value(f)) | |
182 | + | let ad = if ((height >= q)) | |
192 | 183 | then true | |
193 | - | else | |
194 | - | if (( | |
195 | - | then [DeleteEntry( | |
184 | + | else C((("Withdrawal is possible after " + toString(q)) + " height or you have already withdrawn.")) | |
185 | + | if ((ad == ad)) | |
186 | + | then [DeleteEntry(p(n, f, g, q)), IntegerEntry(r(n, f, g, q), aa), ScriptTransfer(x.caller, aa, R)] | |
196 | 187 | else throw("Strict value is not equal to itself.") | |
197 | 188 | } | |
198 | 189 | ||
199 | 190 | ||
200 | 191 | ||
201 | - | @Callable( | |
202 | - | func withdrawFee ( | |
203 | - | let | |
204 | - | if (( | |
192 | + | @Callable(x) | |
193 | + | func withdrawFee (f,g) = { | |
194 | + | let J = w(x) | |
195 | + | if ((J == J)) | |
205 | 196 | then { | |
206 | - | let | |
207 | - | let | |
208 | - | [IntegerEntry( | |
197 | + | let ae = valueOrElse(getInteger(o(f, g)), 0) | |
198 | + | let af = fromBase58String(value(f)) | |
199 | + | [IntegerEntry(o(f, g), 0), ScriptTransfer(x.caller, ae, af)] | |
209 | 200 | } | |
210 | 201 | else throw("Strict value is not equal to itself.") | |
211 | 202 | } | |
212 | 203 | ||
213 | 204 | ||
214 | - | ||
215 | - | @Callable(w) | |
216 | - | func setManager (af) = { | |
217 | - | let I = v(w) | |
218 | - | if ((I == I)) | |
219 | - | then { | |
220 | - | let ag = fromBase58String(af) | |
221 | - | if ((ag == ag)) | |
222 | - | then [StringEntry(c(), af)] | |
223 | - | else throw("Strict value is not equal to itself.") | |
224 | - | } | |
225 | - | else throw("Strict value is not equal to itself.") | |
226 | - | } | |
227 | - | ||
228 | - | ||
229 | - | ||
230 | - | @Callable(w) | |
231 | - | func confirmManager () = { | |
232 | - | let ah = u() | |
233 | - | let ai = if (isDefined(ah)) | |
234 | - | then true | |
235 | - | else B("No pending manager.") | |
236 | - | if ((ai == ai)) | |
237 | - | then { | |
238 | - | let aj = if ((w.callerPublicKey == value(ah))) | |
239 | - | then true | |
240 | - | else B("You are not pending manager.") | |
241 | - | if ((aj == aj)) | |
242 | - | then [StringEntry(b(), toBase58String(value(ah))), DeleteEntry(c())] | |
243 | - | else throw("Strict value is not equal to itself.") | |
244 | - | } | |
245 | - | else throw("Strict value is not equal to itself.") | |
246 | - | } | |
247 | - | ||
248 | - | ||
249 | - | @Verifier(ak) | |
250 | - | func al () = { | |
251 | - | let am = { | |
252 | - | let s = r() | |
253 | - | if ($isInstanceOf(s, "ByteVector")) | |
205 | + | @Verifier(ag) | |
206 | + | func ah () = { | |
207 | + | let ai = { | |
208 | + | let u = s() | |
209 | + | if ($isInstanceOf(u, "ByteVector")) | |
254 | 210 | then { | |
255 | - | let | |
256 | - | | |
211 | + | let z = u | |
212 | + | z | |
257 | 213 | } | |
258 | - | else if ($isInstanceOf( | |
259 | - | then | |
214 | + | else if ($isInstanceOf(u, "Unit")) | |
215 | + | then ag.senderPublicKey | |
260 | 216 | else throw("Match error") | |
261 | 217 | } | |
262 | - | sigVerify( | |
218 | + | sigVerify(ag.bodyBytes, ag.proofs[0], ai) | |
263 | 219 | } | |
264 | 220 |
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 | 6 | func b () = "%s__managerPublicKey" | |
7 | 7 | ||
8 | 8 | ||
9 | - | func c () = "%s__ | |
9 | + | func c () = "%s__managerVaultAddress" | |
10 | 10 | ||
11 | 11 | ||
12 | - | func d ( | |
12 | + | func d () = addressFromStringValue(getStringValue(c())) | |
13 | 13 | ||
14 | 14 | ||
15 | - | func | |
15 | + | func e (f,g) = makeString(["%s%s%s", "withdrawDelay", f, g], a) | |
16 | 16 | ||
17 | 17 | ||
18 | - | func h ( | |
18 | + | func h (f,g) = makeString(["%s%s%s", "depositFeePermille", f, g], a) | |
19 | 19 | ||
20 | 20 | ||
21 | - | func i ( | |
21 | + | func i (f,g) = makeString(["%s%s%s", "withdrawFeePermille", f, g], a) | |
22 | 22 | ||
23 | 23 | ||
24 | - | func j ( | |
24 | + | func j (f,g) = makeString(["%s%s%s", "minAmountDeposit", f, g], a) | |
25 | 25 | ||
26 | 26 | ||
27 | - | func k ( | |
27 | + | func k (f,g) = makeString(["%s%s%s", "assetsPairStatus", f, g], a) | |
28 | 28 | ||
29 | 29 | ||
30 | - | func l ( | |
30 | + | func l (f,g) = makeString(["%s%s%s", "minAmountWithdraw", f, g], a) | |
31 | 31 | ||
32 | 32 | ||
33 | - | func | |
33 | + | func m (f,g,n) = makeString(["%s%s%s%s", "balance", f, g, n], a) | |
34 | 34 | ||
35 | 35 | ||
36 | - | func o ( | |
36 | + | func o (f,g) = makeString(["%s%s%s%s", "totalFeeCollected", "deposit", f, g], a) | |
37 | 37 | ||
38 | 38 | ||
39 | - | func | |
39 | + | func p (n,f,g,q) = makeString(["%s%s%s%s%s%d", "withdrawProcess", "inProgress", n, f, g, toString(q)], a) | |
40 | 40 | ||
41 | 41 | ||
42 | - | func r () = { | |
43 | - | let s = getString(b()) | |
44 | - | if ($isInstanceOf(s, "String")) | |
42 | + | func r (n,f,g,q) = makeString(["%s%s%s%s%s%d", "withdrawProcess", "done", n, f, g, toString(q)], a) | |
43 | + | ||
44 | + | ||
45 | + | func s () = { | |
46 | + | let t = d() | |
47 | + | let u = getString(t, b()) | |
48 | + | if ($isInstanceOf(u, "String")) | |
45 | 49 | then { | |
46 | - | let | |
47 | - | fromBase58String( | |
50 | + | let v = u | |
51 | + | fromBase58String(v) | |
48 | 52 | } | |
49 | - | else if ($isInstanceOf( | |
53 | + | else if ($isInstanceOf(u, "Unit")) | |
50 | 54 | then unit | |
51 | 55 | else throw("Match error") | |
52 | 56 | } | |
53 | 57 | ||
54 | 58 | ||
55 | - | func u () = { | |
56 | - | let s = getString(c()) | |
57 | - | if ($isInstanceOf(s, "String")) | |
59 | + | func w (x) = { | |
60 | + | let y = throw("Permission denied.") | |
61 | + | let u = s() | |
62 | + | if ($isInstanceOf(u, "ByteVector")) | |
58 | 63 | then { | |
59 | - | let t = s | |
60 | - | fromBase58String(t) | |
64 | + | let z = u | |
65 | + | if ((x.callerPublicKey == z)) | |
66 | + | then true | |
67 | + | else y | |
61 | 68 | } | |
62 | - | else if ($isInstanceOf(s, "Unit")) | |
63 | - | then unit | |
69 | + | else if ($isInstanceOf(u, "Unit")) | |
70 | + | then if ((x.caller == this)) | |
71 | + | then true | |
72 | + | else y | |
64 | 73 | else throw("Match error") | |
65 | 74 | } | |
66 | 75 | ||
67 | 76 | ||
68 | - | func v (w) = { | |
69 | - | let x = throw("Permission denied.") | |
70 | - | let s = r() | |
71 | - | if ($isInstanceOf(s, "ByteVector")) | |
72 | - | then { | |
73 | - | let y = s | |
74 | - | if ((w.callerPublicKey == y)) | |
75 | - | then true | |
76 | - | else x | |
77 | - | } | |
78 | - | else if ($isInstanceOf(s, "Unit")) | |
79 | - | then if ((w.caller == this)) | |
80 | - | then true | |
81 | - | else x | |
82 | - | else throw("Match error") | |
83 | - | } | |
77 | + | func A (B) = makeString(["otc_multiasset.ride:", B], " ") | |
84 | 78 | ||
85 | 79 | ||
86 | - | func | |
80 | + | func C (B) = throw(A(B)) | |
87 | 81 | ||
88 | 82 | ||
89 | - | func B (A) = throw(z(A)) | |
90 | - | ||
91 | - | ||
92 | - | @Callable(w) | |
93 | - | func registerAsset (e,f,C,D,E,F,G,H) = { | |
94 | - | let I = v(w) | |
95 | - | if ((I == I)) | |
83 | + | @Callable(x) | |
84 | + | func registerAsset (f,g,D,E,F,G,H,I) = { | |
85 | + | let J = w(x) | |
86 | + | if ((J == J)) | |
96 | 87 | then { | |
97 | - | let | |
98 | - | let | |
99 | - | let | |
100 | - | let | |
101 | - | let | |
102 | - | let | |
103 | - | [ | |
88 | + | let K = e(f, g) | |
89 | + | let L = h(f, g) | |
90 | + | let M = i(f, g) | |
91 | + | let N = j(f, g) | |
92 | + | let O = l(f, g) | |
93 | + | let P = k(f, g) | |
94 | + | [IntegerEntry(K, D), IntegerEntry(L, E), IntegerEntry(M, F), IntegerEntry(N, G), IntegerEntry(O, H), IntegerEntry(P, I)] | |
104 | 95 | } | |
105 | 96 | else throw("Strict value is not equal to itself.") | |
106 | 97 | } | |
107 | 98 | ||
108 | 99 | ||
109 | 100 | ||
110 | - | @Callable( | |
111 | - | func swapAssetsAToB ( | |
112 | - | let | |
113 | - | let | |
114 | - | let | |
115 | - | let | |
116 | - | let | |
117 | - | let | |
118 | - | let | |
119 | - | let | |
120 | - | let | |
121 | - | let | |
122 | - | let | |
123 | - | let | |
101 | + | @Callable(x) | |
102 | + | func swapAssetsAToB (g) = { | |
103 | + | let Q = value(x.payments[0]) | |
104 | + | let f = toBase58String(value(Q.assetId)) | |
105 | + | let R = fromBase58String(value(g)) | |
106 | + | let n = toString(x.caller) | |
107 | + | let G = valueOrErrorMessage(getInteger(j(f, g)), A("This asset pair does not exist.")) | |
108 | + | let S = Q.amount | |
109 | + | let E = valueOrErrorMessage(getInteger(h(f, g)), A("The deposit fee for this pair of assets is not set.")) | |
110 | + | let T = ((S / 1000) * E) | |
111 | + | let U = valueOrElse(getInteger(m(f, g, n)), 0) | |
112 | + | let V = valueOrElse(getInteger(o(f, g)), 0) | |
113 | + | let I = valueOrErrorMessage(getInteger(k(f, g)), A("The asset pair status for this pair of assets is not set.")) | |
114 | + | let W = if ((I == 0)) | |
124 | 115 | then true | |
125 | - | else | |
126 | - | if (( | |
116 | + | else C("The couple's deposit is blocked.") | |
117 | + | if ((W == W)) | |
127 | 118 | then { | |
128 | - | let | |
119 | + | let X = if ((S >= G)) | |
129 | 120 | then true | |
130 | - | else | |
131 | - | if (( | |
121 | + | else C("The deposit amount is less than the minimum.") | |
122 | + | if ((X == X)) | |
132 | 123 | then { | |
133 | - | let | |
134 | - | let | |
124 | + | let Y = ((U + S) - T) | |
125 | + | let Z = if ((Y > 0)) | |
135 | 126 | then true | |
136 | - | else | |
137 | - | if (( | |
138 | - | then [IntegerEntry( | |
127 | + | else C("The final balance is less than or equal to 0.") | |
128 | + | if ((Z == Z)) | |
129 | + | then [IntegerEntry(m(f, g, n), Y), IntegerEntry(o(f, g), (V + T)), ScriptTransfer(x.caller, (S - T), R)] | |
139 | 130 | else throw("Strict value is not equal to itself.") | |
140 | 131 | } | |
141 | 132 | else throw("Strict value is not equal to itself.") | |
142 | 133 | } | |
143 | 134 | else throw("Strict value is not equal to itself.") | |
144 | 135 | } | |
145 | 136 | ||
146 | 137 | ||
147 | 138 | ||
148 | - | @Callable( | |
149 | - | func initializationSwapAssetsBToA ( | |
150 | - | let | |
151 | - | let | |
152 | - | let | |
153 | - | let | |
154 | - | let | |
155 | - | let | |
156 | - | let | |
157 | - | let | |
158 | - | let | |
159 | - | let | |
160 | - | let | |
161 | - | let | |
162 | - | let | |
139 | + | @Callable(x) | |
140 | + | func initializationSwapAssetsBToA (f) = { | |
141 | + | let Q = value(x.payments[0]) | |
142 | + | let aa = Q.amount | |
143 | + | let g = toBase58String(value(Q.assetId)) | |
144 | + | let n = toString(x.caller) | |
145 | + | let H = valueOrErrorMessage(getInteger(l(f, g)), A("The minimum withdrawal amount for this pair of assets is not set.")) | |
146 | + | let ab = (height + valueOrErrorMessage(getInteger(e(f, g)), A("Withdrawal delay is not set for the specified pair."))) | |
147 | + | let U = valueOrErrorMessage(getInteger(m(f, g, n)), A("This user balance does not exist.")) | |
148 | + | let V = valueOrElse(getInteger(o(f, g)), 0) | |
149 | + | let M = i(f, g) | |
150 | + | let F = valueOrErrorMessage(getInteger(M), A("The withdrawal fee for this pair of assets is not set.")) | |
151 | + | let T = ((aa / 1000) * F) | |
152 | + | let Y = (U - aa) | |
153 | + | let Z = if ((Y >= 0)) | |
163 | 154 | then true | |
164 | - | else | |
165 | - | if (( | |
155 | + | else C("Swap amount fail, amount is to small.") | |
156 | + | if ((Z == Z)) | |
166 | 157 | then { | |
167 | - | let | |
158 | + | let X = if ((aa >= H)) | |
168 | 159 | then true | |
169 | - | else | |
170 | - | if (( | |
160 | + | else C("The withdraw amount is less than the minimum.") | |
161 | + | if ((X == X)) | |
171 | 162 | then { | |
172 | - | let | |
163 | + | let ac = if ((getInteger(p(n, f, g, ab)) == unit)) | |
173 | 164 | then true | |
174 | - | else | |
175 | - | if (( | |
176 | - | then [IntegerEntry( | |
165 | + | else C("At this height, there is already an exchange of this pair.") | |
166 | + | if ((ac == ac)) | |
167 | + | then [IntegerEntry(m(f, g, n), Y), IntegerEntry(p(n, f, g, ab), (aa - T)), IntegerEntry(o(f, g), (V + T))] | |
177 | 168 | else throw("Strict value is not equal to itself.") | |
178 | 169 | } | |
179 | 170 | else throw("Strict value is not equal to itself.") | |
180 | 171 | } | |
181 | 172 | else throw("Strict value is not equal to itself.") | |
182 | 173 | } | |
183 | 174 | ||
184 | 175 | ||
185 | 176 | ||
186 | - | @Callable( | |
187 | - | func withdrawAsset ( | |
188 | - | let | |
189 | - | let | |
190 | - | let | |
191 | - | let | |
177 | + | @Callable(x) | |
178 | + | func withdrawAsset (f,g,q) = { | |
179 | + | let n = toString(x.caller) | |
180 | + | let aa = valueOrErrorMessage(getInteger(p(n, f, g, q)), A("At this height, withdraw was not initialized with this pair of assets.")) | |
181 | + | let R = fromBase58String(value(f)) | |
182 | + | let ad = if ((height >= q)) | |
192 | 183 | then true | |
193 | - | else | |
194 | - | if (( | |
195 | - | then [DeleteEntry( | |
184 | + | else C((("Withdrawal is possible after " + toString(q)) + " height or you have already withdrawn.")) | |
185 | + | if ((ad == ad)) | |
186 | + | then [DeleteEntry(p(n, f, g, q)), IntegerEntry(r(n, f, g, q), aa), ScriptTransfer(x.caller, aa, R)] | |
196 | 187 | else throw("Strict value is not equal to itself.") | |
197 | 188 | } | |
198 | 189 | ||
199 | 190 | ||
200 | 191 | ||
201 | - | @Callable( | |
202 | - | func withdrawFee ( | |
203 | - | let | |
204 | - | if (( | |
192 | + | @Callable(x) | |
193 | + | func withdrawFee (f,g) = { | |
194 | + | let J = w(x) | |
195 | + | if ((J == J)) | |
205 | 196 | then { | |
206 | - | let | |
207 | - | let | |
208 | - | [IntegerEntry( | |
197 | + | let ae = valueOrElse(getInteger(o(f, g)), 0) | |
198 | + | let af = fromBase58String(value(f)) | |
199 | + | [IntegerEntry(o(f, g), 0), ScriptTransfer(x.caller, ae, af)] | |
209 | 200 | } | |
210 | 201 | else throw("Strict value is not equal to itself.") | |
211 | 202 | } | |
212 | 203 | ||
213 | 204 | ||
214 | - | ||
215 | - | @Callable(w) | |
216 | - | func setManager (af) = { | |
217 | - | let I = v(w) | |
218 | - | if ((I == I)) | |
219 | - | then { | |
220 | - | let ag = fromBase58String(af) | |
221 | - | if ((ag == ag)) | |
222 | - | then [StringEntry(c(), af)] | |
223 | - | else throw("Strict value is not equal to itself.") | |
224 | - | } | |
225 | - | else throw("Strict value is not equal to itself.") | |
226 | - | } | |
227 | - | ||
228 | - | ||
229 | - | ||
230 | - | @Callable(w) | |
231 | - | func confirmManager () = { | |
232 | - | let ah = u() | |
233 | - | let ai = if (isDefined(ah)) | |
234 | - | then true | |
235 | - | else B("No pending manager.") | |
236 | - | if ((ai == ai)) | |
237 | - | then { | |
238 | - | let aj = if ((w.callerPublicKey == value(ah))) | |
239 | - | then true | |
240 | - | else B("You are not pending manager.") | |
241 | - | if ((aj == aj)) | |
242 | - | then [StringEntry(b(), toBase58String(value(ah))), DeleteEntry(c())] | |
243 | - | else throw("Strict value is not equal to itself.") | |
244 | - | } | |
245 | - | else throw("Strict value is not equal to itself.") | |
246 | - | } | |
247 | - | ||
248 | - | ||
249 | - | @Verifier(ak) | |
250 | - | func al () = { | |
251 | - | let am = { | |
252 | - | let s = r() | |
253 | - | if ($isInstanceOf(s, "ByteVector")) | |
205 | + | @Verifier(ag) | |
206 | + | func ah () = { | |
207 | + | let ai = { | |
208 | + | let u = s() | |
209 | + | if ($isInstanceOf(u, "ByteVector")) | |
254 | 210 | then { | |
255 | - | let | |
256 | - | | |
211 | + | let z = u | |
212 | + | z | |
257 | 213 | } | |
258 | - | else if ($isInstanceOf( | |
259 | - | then | |
214 | + | else if ($isInstanceOf(u, "Unit")) | |
215 | + | then ag.senderPublicKey | |
260 | 216 | else throw("Match error") | |
261 | 217 | } | |
262 | - | sigVerify( | |
218 | + | sigVerify(ag.bodyBytes, ag.proofs[0], ai) | |
263 | 219 | } | |
264 | 220 |
github/deemru/w8io/169f3d6 79.58 ms ◑