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