tx · 88Q9PZWhruvsXjkn5kzxLGt7NHAMuhFccib1Tfr58XbS 3MvXnAcEtL9x3i499UcvTQZPufrT5ZZUEd5: -0.01400000 Waves 2022.09.15 18:33 [2230413] smart account 3MvXnAcEtL9x3i499UcvTQZPufrT5ZZUEd5 > SELF 0.00000000 Waves
{ "type": 13, "id": "88Q9PZWhruvsXjkn5kzxLGt7NHAMuhFccib1Tfr58XbS", "fee": 1400000, "feeAssetId": null, "timestamp": 1663255977756, "version": 1, "sender": "3MvXnAcEtL9x3i499UcvTQZPufrT5ZZUEd5", "senderPublicKey": "GSAhb4fdky75LiCZ4p4DDK4rmWpmsgGBg1ZVdtPfmRES", "proofs": [ "3Ce1paouzspeP9Gq71pKDz78fCg4FhEymakELZaxWK2NHV6krNU1etZrPAt7ZRcQDbrjnKa4eshXubY4twE8bs5x" ], "script": "base64:BgIsCAISCgoICAgBAQEBAQESAwoBCBIDCgEIEgUKAwgIARIECgIICBIDCgEIEgAUAANTRVACAl9fARNrZXlNYW5hZ2VyUHVibGljS2V5AAIUJXNfX21hbmFnZXJQdWJsaWNLZXkBGmtleVBlbmRpbmdNYW5hZ2VyUHVibGljS2V5AAIbJXNfX3BlbmRpbmdNYW5hZ2VyUHVibGljS2V5ARBrZXlXaXRoZHJhd0RlbGF5AgZhc3NldEEGYXNzZXRCCQC5CQIJAMwIAgIGJXMlcyVzCQDMCAICDXdpdGhkcmF3RGVsYXkJAMwIAgUGYXNzZXRBCQDMCAIFBmFzc2V0QgUDbmlsBQNTRVABFWtleURlcG9zaXRGZWVQZXJtaWxsZQIGYXNzZXRBBmFzc2V0QgkAuQkCCQDMCAICBiVzJXMlcwkAzAgCAhJkZXBvc2l0RmVlUGVybWlsbGUJAMwIAgUGYXNzZXRBCQDMCAIFBmFzc2V0QgUDbmlsBQNTRVABFmtleVdpdGhkcmF3RmVlUGVybWlsbGUCBmFzc2V0QQZhc3NldEIJALkJAgkAzAgCAgYlcyVzJXMJAMwIAgITd2l0aGRyYXdGZW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} View: original | compacted Prev: zW2PW8MLZuACT52u9w7FsurykWxCiXKPVPGd8EJSTnC Next: 7bXPjVxo5UJkRzws11vR8Bc4rQNnx6Emo7JLHGRmnUK3 Diff:
Old | New | Differences | |
---|---|---|---|
89 | 89 | } | |
90 | 90 | ||
91 | 91 | ||
92 | - | func B (C) = throw(makeString(["otc_multiasset.ride:", C], " ")) | |
92 | + | func B (C) = makeString(["otc_multiasset.ride:", C], " ") | |
93 | + | ||
94 | + | ||
95 | + | func D (C) = throw(B(C)) | |
93 | 96 | ||
94 | 97 | ||
95 | 98 | @Callable(y) | |
96 | - | func registerAsset (e,f | |
97 | - | let | |
98 | - | if (( | |
99 | + | func registerAsset (e,f,E,F,G,H,I,J) = { | |
100 | + | let K = x(y) | |
101 | + | if ((K == K)) | |
99 | 102 | then { | |
100 | - | let | |
101 | - | let | |
102 | - | let | |
103 | - | let | |
104 | - | let | |
105 | - | let | |
106 | - | [ | |
103 | + | let L = d(e, f) | |
104 | + | let M = g(e, f) | |
105 | + | let N = h(e, f) | |
106 | + | let O = i(e, f) | |
107 | + | let P = k(e, f) | |
108 | + | let Q = j(e, f) | |
109 | + | [IntegerEntry(L, E), IntegerEntry(M, F), IntegerEntry(N, G), IntegerEntry(O, H), IntegerEntry(P, I), IntegerEntry(Q, J)] | |
107 | 110 | } | |
108 | 111 | else throw("Strict value is not equal to itself.") | |
109 | 112 | } | |
112 | 115 | ||
113 | 116 | @Callable(y) | |
114 | 117 | func swapAssetsAToB (f) = { | |
115 | - | let | |
116 | - | let e = toBase58String(value( | |
117 | - | let | |
118 | + | let R = value(y.payments[0]) | |
119 | + | let e = toBase58String(value(R.assetId)) | |
120 | + | let S = fromBase58String(value(f)) | |
118 | 121 | let m = toString(y.caller) | |
119 | - | let | |
120 | - | let | |
121 | - | let | |
122 | - | let | |
123 | - | let | |
124 | - | let | |
125 | - | let | |
126 | - | let | |
122 | + | let H = valueOrErrorMessage(getInteger(i(e, f)), B("This asset pair does not exist.")) | |
123 | + | let T = R.amount | |
124 | + | let F = valueOrElse(getInteger(g(e, f)), 0) | |
125 | + | let U = ((T / 1000) * F) | |
126 | + | let V = valueOrElse(getInteger(l(e, f, m)), 0) | |
127 | + | let W = valueOrElse(getInteger(n(e, f)), 0) | |
128 | + | let X = value(getInteger(j(e, f))) | |
129 | + | let Y = if ((X == 0)) | |
127 | 130 | then true | |
128 | - | else | |
129 | - | if (( | |
131 | + | else D("The couple's deposit is blocked.") | |
132 | + | if ((Y == Y)) | |
130 | 133 | then { | |
131 | - | let | |
134 | + | let Z = if ((T >= H)) | |
132 | 135 | then true | |
133 | - | else | |
134 | - | if (( | |
136 | + | else D("The deposit amount is less than the minimum.") | |
137 | + | if ((Z == Z)) | |
135 | 138 | then { | |
136 | - | let | |
137 | - | let | |
139 | + | let aa = ((V + T) - U) | |
140 | + | let ab = if ((aa > 0)) | |
138 | 141 | then true | |
139 | - | else | |
140 | - | if (( | |
141 | - | then [IntegerEntry(l(e, f, m), | |
142 | + | else D("The final balance is less than or equal to 0.") | |
143 | + | if ((ab == ab)) | |
144 | + | then [IntegerEntry(l(e, f, m), aa), IntegerEntry(n(e, f), (W + U)), ScriptTransfer(y.caller, (T - U), S)] | |
142 | 145 | else throw("Strict value is not equal to itself.") | |
143 | 146 | } | |
144 | 147 | else throw("Strict value is not equal to itself.") | |
150 | 153 | ||
151 | 154 | @Callable(y) | |
152 | 155 | func initializationSwapAssetsBToA (e) = { | |
153 | - | let | |
154 | - | let | |
155 | - | let f = toBase58String(value( | |
156 | + | let R = value(y.payments[0]) | |
157 | + | let ac = R.amount | |
158 | + | let f = toBase58String(value(R.assetId)) | |
156 | 159 | let m = toString(y.caller) | |
157 | - | let | |
158 | - | let | |
159 | - | let | |
160 | - | let | |
161 | - | let | |
162 | - | let | |
163 | - | let | |
164 | - | let | |
165 | - | let | |
160 | + | let I = valueOrErrorMessage(getInteger(k(e, f)), B("The minimum withdrawal amount for this pair of assets is not set.")) | |
161 | + | let ad = (height + valueOrElse(getInteger(d(e, f)), 0)) | |
162 | + | let V = valueOrErrorMessage(getInteger(l(e, f, m)), B("This user balance does not exist.")) | |
163 | + | let W = valueOrElse(getInteger(n(e, f)), 0) | |
164 | + | let N = h(e, f) | |
165 | + | let G = valueOrElse(getInteger(N), 0) | |
166 | + | let U = ((ac / 1000) * G) | |
167 | + | let aa = (V - (ac + U)) | |
168 | + | let ab = if ((aa >= 0)) | |
166 | 169 | then true | |
167 | - | else | |
168 | - | if (( | |
170 | + | else D("Swap amount fail, amount is to small.") | |
171 | + | if ((ab == ab)) | |
169 | 172 | then { | |
170 | - | let | |
173 | + | let Z = if ((ac >= I)) | |
171 | 174 | then true | |
172 | - | else B("At this height, there is already an exchange of this pair.") | |
173 | - | if ((ad == ad)) | |
174 | - | then [IntegerEntry(p(e, f, m), ac), IntegerEntry(l(e, f, m), Z), IntegerEntry(q(m, e, f, ac), (ab - T)), IntegerEntry(o(e, f), (V + T))] | |
175 | + | else D("The withdraw amount is less than the minimum.") | |
176 | + | if ((Z == Z)) | |
177 | + | then { | |
178 | + | let ae = if ((valueOrElse(getInteger(q(m, e, f, ad)), 0) == 0)) | |
179 | + | then true | |
180 | + | else D("At this height, there is already an exchange of this pair.") | |
181 | + | if ((ae == ae)) | |
182 | + | then [IntegerEntry(p(e, f, m), ad), IntegerEntry(l(e, f, m), aa), IntegerEntry(q(m, e, f, ad), (ac - U)), IntegerEntry(o(e, f), (W + U))] | |
183 | + | else throw("Strict value is not equal to itself.") | |
184 | + | } | |
175 | 185 | else throw("Strict value is not equal to itself.") | |
176 | 186 | } | |
177 | 187 | else throw("Strict value is not equal to itself.") | |
182 | 192 | @Callable(y) | |
183 | 193 | func withdrawAsset (e,f,r) = { | |
184 | 194 | let m = toString(y.caller) | |
185 | - | let | |
186 | - | let | |
187 | - | let | |
188 | - | let af = if ((height >= | |
195 | + | let ad = value(getInteger(p(e, f, m))) | |
196 | + | let ac = value(getInteger(q(m, e, f, r))) | |
197 | + | let S = fromBase58String(value(e)) | |
198 | + | let af = if ((height >= ad)) | |
189 | 199 | then true | |
190 | - | else | |
200 | + | else D((("Withdrawal is possible after " + toString(r)) + " height or you have already withdrawn.")) | |
191 | 201 | if ((af == af)) | |
192 | - | then [DeleteEntry(q(m, e, f, r)), IntegerEntry(s(m, e, f, r), | |
202 | + | then [DeleteEntry(q(m, e, f, r)), IntegerEntry(s(m, e, f, r), ac), IntegerEntry(l(e, f, m), ac), ScriptTransfer(y.caller, ac, S)] | |
193 | 203 | else throw("Strict value is not equal to itself.") | |
194 | 204 | } | |
195 | 205 | ||
197 | 207 | ||
198 | 208 | @Callable(y) | |
199 | 209 | func withdrawFee (e,f) = { | |
200 | - | let | |
201 | - | if (( | |
210 | + | let K = x(y) | |
211 | + | if ((K == K)) | |
202 | 212 | then { | |
203 | 213 | let ag = valueOrElse(getInteger(n(e, f)), 0) | |
204 | 214 | let ah = fromBase58String(value(e)) | |
213 | 223 | ||
214 | 224 | @Callable(y) | |
215 | 225 | func setManager (ak) = { | |
216 | - | let | |
217 | - | if (( | |
226 | + | let K = x(y) | |
227 | + | if ((K == K)) | |
218 | 228 | then { | |
219 | 229 | let al = fromBase58String(ak) | |
220 | 230 | if ((al == al)) | |
231 | 241 | let am = w() | |
232 | 242 | let an = if (isDefined(am)) | |
233 | 243 | then true | |
234 | - | else | |
244 | + | else D("no pending manager") | |
235 | 245 | if ((an == an)) | |
236 | 246 | then { | |
237 | 247 | let ao = if ((y.callerPublicKey == value(am))) | |
238 | 248 | then true | |
239 | - | else | |
249 | + | else D("you are not pending manager") | |
240 | 250 | if ((ao == ao)) | |
241 | 251 | then [StringEntry(b(), toBase58String(value(am))), DeleteEntry(c())] | |
242 | 252 | else throw("Strict value is not equal to itself.") |
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%s", "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%s", "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 | - | func B (C) = throw(makeString(["otc_multiasset.ride:", C], " ")) | |
92 | + | func B (C) = makeString(["otc_multiasset.ride:", C], " ") | |
93 | + | ||
94 | + | ||
95 | + | func D (C) = throw(B(C)) | |
93 | 96 | ||
94 | 97 | ||
95 | 98 | @Callable(y) | |
96 | - | func registerAsset (e,f | |
97 | - | let | |
98 | - | if (( | |
99 | + | func registerAsset (e,f,E,F,G,H,I,J) = { | |
100 | + | let K = x(y) | |
101 | + | if ((K == K)) | |
99 | 102 | then { | |
100 | - | let | |
101 | - | let | |
102 | - | let | |
103 | - | let | |
104 | - | let | |
105 | - | let | |
106 | - | [ | |
103 | + | let L = d(e, f) | |
104 | + | let M = g(e, f) | |
105 | + | let N = h(e, f) | |
106 | + | let O = i(e, f) | |
107 | + | let P = k(e, f) | |
108 | + | let Q = j(e, f) | |
109 | + | [IntegerEntry(L, E), IntegerEntry(M, F), IntegerEntry(N, G), IntegerEntry(O, H), IntegerEntry(P, I), IntegerEntry(Q, J)] | |
107 | 110 | } | |
108 | 111 | else throw("Strict value is not equal to itself.") | |
109 | 112 | } | |
110 | 113 | ||
111 | 114 | ||
112 | 115 | ||
113 | 116 | @Callable(y) | |
114 | 117 | func swapAssetsAToB (f) = { | |
115 | - | let | |
116 | - | let e = toBase58String(value( | |
117 | - | let | |
118 | + | let R = value(y.payments[0]) | |
119 | + | let e = toBase58String(value(R.assetId)) | |
120 | + | let S = fromBase58String(value(f)) | |
118 | 121 | let m = toString(y.caller) | |
119 | - | let | |
120 | - | let | |
121 | - | let | |
122 | - | let | |
123 | - | let | |
124 | - | let | |
125 | - | let | |
126 | - | let | |
122 | + | let H = valueOrErrorMessage(getInteger(i(e, f)), B("This asset pair does not exist.")) | |
123 | + | let T = R.amount | |
124 | + | let F = valueOrElse(getInteger(g(e, f)), 0) | |
125 | + | let U = ((T / 1000) * F) | |
126 | + | let V = valueOrElse(getInteger(l(e, f, m)), 0) | |
127 | + | let W = valueOrElse(getInteger(n(e, f)), 0) | |
128 | + | let X = value(getInteger(j(e, f))) | |
129 | + | let Y = if ((X == 0)) | |
127 | 130 | then true | |
128 | - | else | |
129 | - | if (( | |
131 | + | else D("The couple's deposit is blocked.") | |
132 | + | if ((Y == Y)) | |
130 | 133 | then { | |
131 | - | let | |
134 | + | let Z = if ((T >= H)) | |
132 | 135 | then true | |
133 | - | else | |
134 | - | if (( | |
136 | + | else D("The deposit amount is less than the minimum.") | |
137 | + | if ((Z == Z)) | |
135 | 138 | then { | |
136 | - | let | |
137 | - | let | |
139 | + | let aa = ((V + T) - U) | |
140 | + | let ab = if ((aa > 0)) | |
138 | 141 | then true | |
139 | - | else | |
140 | - | if (( | |
141 | - | then [IntegerEntry(l(e, f, m), | |
142 | + | else D("The final balance is less than or equal to 0.") | |
143 | + | if ((ab == ab)) | |
144 | + | then [IntegerEntry(l(e, f, m), aa), IntegerEntry(n(e, f), (W + U)), ScriptTransfer(y.caller, (T - U), S)] | |
142 | 145 | else throw("Strict value is not equal to itself.") | |
143 | 146 | } | |
144 | 147 | else throw("Strict value is not equal to itself.") | |
145 | 148 | } | |
146 | 149 | else throw("Strict value is not equal to itself.") | |
147 | 150 | } | |
148 | 151 | ||
149 | 152 | ||
150 | 153 | ||
151 | 154 | @Callable(y) | |
152 | 155 | func initializationSwapAssetsBToA (e) = { | |
153 | - | let | |
154 | - | let | |
155 | - | let f = toBase58String(value( | |
156 | + | let R = value(y.payments[0]) | |
157 | + | let ac = R.amount | |
158 | + | let f = toBase58String(value(R.assetId)) | |
156 | 159 | let m = toString(y.caller) | |
157 | - | let | |
158 | - | let | |
159 | - | let | |
160 | - | let | |
161 | - | let | |
162 | - | let | |
163 | - | let | |
164 | - | let | |
165 | - | let | |
160 | + | let I = valueOrErrorMessage(getInteger(k(e, f)), B("The minimum withdrawal amount for this pair of assets is not set.")) | |
161 | + | let ad = (height + valueOrElse(getInteger(d(e, f)), 0)) | |
162 | + | let V = valueOrErrorMessage(getInteger(l(e, f, m)), B("This user balance does not exist.")) | |
163 | + | let W = valueOrElse(getInteger(n(e, f)), 0) | |
164 | + | let N = h(e, f) | |
165 | + | let G = valueOrElse(getInteger(N), 0) | |
166 | + | let U = ((ac / 1000) * G) | |
167 | + | let aa = (V - (ac + U)) | |
168 | + | let ab = if ((aa >= 0)) | |
166 | 169 | then true | |
167 | - | else | |
168 | - | if (( | |
170 | + | else D("Swap amount fail, amount is to small.") | |
171 | + | if ((ab == ab)) | |
169 | 172 | then { | |
170 | - | let | |
173 | + | let Z = if ((ac >= I)) | |
171 | 174 | then true | |
172 | - | else B("At this height, there is already an exchange of this pair.") | |
173 | - | if ((ad == ad)) | |
174 | - | then [IntegerEntry(p(e, f, m), ac), IntegerEntry(l(e, f, m), Z), IntegerEntry(q(m, e, f, ac), (ab - T)), IntegerEntry(o(e, f), (V + T))] | |
175 | + | else D("The withdraw amount is less than the minimum.") | |
176 | + | if ((Z == Z)) | |
177 | + | then { | |
178 | + | let ae = if ((valueOrElse(getInteger(q(m, e, f, ad)), 0) == 0)) | |
179 | + | then true | |
180 | + | else D("At this height, there is already an exchange of this pair.") | |
181 | + | if ((ae == ae)) | |
182 | + | then [IntegerEntry(p(e, f, m), ad), IntegerEntry(l(e, f, m), aa), IntegerEntry(q(m, e, f, ad), (ac - U)), IntegerEntry(o(e, f), (W + U))] | |
183 | + | else throw("Strict value is not equal to itself.") | |
184 | + | } | |
175 | 185 | else throw("Strict value is not equal to itself.") | |
176 | 186 | } | |
177 | 187 | else throw("Strict value is not equal to itself.") | |
178 | 188 | } | |
179 | 189 | ||
180 | 190 | ||
181 | 191 | ||
182 | 192 | @Callable(y) | |
183 | 193 | func withdrawAsset (e,f,r) = { | |
184 | 194 | let m = toString(y.caller) | |
185 | - | let | |
186 | - | let | |
187 | - | let | |
188 | - | let af = if ((height >= | |
195 | + | let ad = value(getInteger(p(e, f, m))) | |
196 | + | let ac = value(getInteger(q(m, e, f, r))) | |
197 | + | let S = fromBase58String(value(e)) | |
198 | + | let af = if ((height >= ad)) | |
189 | 199 | then true | |
190 | - | else | |
200 | + | else D((("Withdrawal is possible after " + toString(r)) + " height or you have already withdrawn.")) | |
191 | 201 | if ((af == af)) | |
192 | - | then [DeleteEntry(q(m, e, f, r)), IntegerEntry(s(m, e, f, r), | |
202 | + | then [DeleteEntry(q(m, e, f, r)), IntegerEntry(s(m, e, f, r), ac), IntegerEntry(l(e, f, m), ac), ScriptTransfer(y.caller, ac, S)] | |
193 | 203 | else throw("Strict value is not equal to itself.") | |
194 | 204 | } | |
195 | 205 | ||
196 | 206 | ||
197 | 207 | ||
198 | 208 | @Callable(y) | |
199 | 209 | func withdrawFee (e,f) = { | |
200 | - | let | |
201 | - | if (( | |
210 | + | let K = x(y) | |
211 | + | if ((K == K)) | |
202 | 212 | then { | |
203 | 213 | let ag = valueOrElse(getInteger(n(e, f)), 0) | |
204 | 214 | let ah = fromBase58String(value(e)) | |
205 | 215 | let ai = valueOrElse(getInteger(o(e, f)), 0) | |
206 | 216 | let aj = fromBase58String(value(f)) | |
207 | 217 | [IntegerEntry(n(e, f), 0), ScriptTransfer(y.caller, ag, ah), IntegerEntry(o(e, f), 0), ScriptTransfer(y.caller, ai, aj)] | |
208 | 218 | } | |
209 | 219 | else throw("Strict value is not equal to itself.") | |
210 | 220 | } | |
211 | 221 | ||
212 | 222 | ||
213 | 223 | ||
214 | 224 | @Callable(y) | |
215 | 225 | func setManager (ak) = { | |
216 | - | let | |
217 | - | if (( | |
226 | + | let K = x(y) | |
227 | + | if ((K == K)) | |
218 | 228 | then { | |
219 | 229 | let al = fromBase58String(ak) | |
220 | 230 | if ((al == al)) | |
221 | 231 | then [StringEntry(c(), ak)] | |
222 | 232 | else throw("Strict value is not equal to itself.") | |
223 | 233 | } | |
224 | 234 | else throw("Strict value is not equal to itself.") | |
225 | 235 | } | |
226 | 236 | ||
227 | 237 | ||
228 | 238 | ||
229 | 239 | @Callable(y) | |
230 | 240 | func confirmManager () = { | |
231 | 241 | let am = w() | |
232 | 242 | let an = if (isDefined(am)) | |
233 | 243 | then true | |
234 | - | else | |
244 | + | else D("no pending manager") | |
235 | 245 | if ((an == an)) | |
236 | 246 | then { | |
237 | 247 | let ao = if ((y.callerPublicKey == value(am))) | |
238 | 248 | then true | |
239 | - | else | |
249 | + | else D("you are not pending manager") | |
240 | 250 | if ((ao == ao)) | |
241 | 251 | then [StringEntry(b(), toBase58String(value(am))), DeleteEntry(c())] | |
242 | 252 | else throw("Strict value is not equal to itself.") | |
243 | 253 | } | |
244 | 254 | else throw("Strict value is not equal to itself.") | |
245 | 255 | } | |
246 | 256 | ||
247 | 257 | ||
248 | 258 | @Verifier(ap) | |
249 | 259 | func aq () = { | |
250 | 260 | let ar = { | |
251 | 261 | let u = t() | |
252 | 262 | if ($isInstanceOf(u, "ByteVector")) | |
253 | 263 | then { | |
254 | 264 | let A = u | |
255 | 265 | A | |
256 | 266 | } | |
257 | 267 | else if ($isInstanceOf(u, "Unit")) | |
258 | 268 | then ap.senderPublicKey | |
259 | 269 | else throw("Match error") | |
260 | 270 | } | |
261 | 271 | sigVerify(ap.bodyBytes, ap.proofs[0], ar) | |
262 | 272 | } | |
263 | 273 |
github/deemru/w8io/169f3d6 62.93 ms ◑