tx · 2r1pMMbvY2SayHU6Q9bLG2vvKAW8Nd8Et7pK4q1eeSgY 3NBqs2vfpyT5cMdUJ97mEJ1Ycp2y8GbAZDA: -0.01300000 Waves 2023.05.10 13:07 [2571648] smart account 3NBqs2vfpyT5cMdUJ97mEJ1Ycp2y8GbAZDA > SELF 0.00000000 Waves
{ "type": 13, "id": "2r1pMMbvY2SayHU6Q9bLG2vvKAW8Nd8Et7pK4q1eeSgY", "fee": 1300000, "feeAssetId": null, "timestamp": 1683713280287, "version": 2, "chainId": 84, "sender": "3NBqs2vfpyT5cMdUJ97mEJ1Ycp2y8GbAZDA", "senderPublicKey": "H19CeJVbUnfsK8EYs8K6fHxwBH7pLyxw8WCDFu7D4rGQ", "proofs": [ "1UvLoEGvb6tX69A6kPygnLfdTnaf3wCtBqKNnbFPobM6S9LE45i49A8LYXxSZs9ALkapdhJByQUJ7xM6xkbUi4P" ], "script": "base64:AAIFAAAAAAAABf0IAhIJCgcIAQEBAQEIEgMKAQgSAwoBARIAEgAiA1NFUCIHd3JhcEVyciIDbXNnIgh0aHJvd0VyciIPZ2V0U3RyaW5nT3JGYWlsIgdhZGRyZXNzIgNrZXkiEWtleUZhY3RvcnlBZGRyZXNzIhlrZXlWb3RpbmdWZXJpZmllZENvbnRyYWN0IiJrZXlWb3RpbmdFbWlzc2lvbkNhbmRpZGF0ZUNvbnRyYWN0IhRrZXlVc2VyUG9vbHNDb250cmFjdCIWdm90aW5nVmVyaWZpZWRDb250cmFjdCIfdm90aW5nRW1pc3Npb25DYW5kaWRhdGVDb250cmFjdCIRdXNlclBvb2xzQ29udHJhY3QiGElkeEZhY3RvcnlDZmdTdGFraW5nRGFwcCIZSWR4RmFjdG9yeUNmZ0Jvb3N0aW5nRGFwcCIUSWR4RmFjdG9yeUNmZ0lkb0RhcHAiFUlkeEZhY3RvcnlDZmdUZWFtRGFwcCIZSWR4RmFjdG9yeUNmZ0VtaXNzaW9uRGFwcCIVSWR4RmFjdG9yeUNmZ1Jlc3REY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2571648, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9vzsiqofpS5Cj8Ny4cxoArxyzgs9jg7YRVSWb5bUC3tW Next: 9idrWeaZjmVTjCAjpG4LDD2d6okaYVXCToR5NXtFwch3 Diff:
Old | New | Differences | |
---|---|---|---|
113 | 113 | func Z () = "%s__managerPublicKey" | |
114 | 114 | ||
115 | 115 | ||
116 | - | func aa () = "%s__ | |
116 | + | func aa () = "%s__managerVaultAddress" | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func ab () = { | |
120 | - | let ac = getString(Z()) | |
120 | + | let ac = getString(aa()) | |
121 | + | if ($isInstanceOf(ac, "String")) | |
122 | + | then { | |
123 | + | let ad = ac | |
124 | + | addressFromStringValue(ad) | |
125 | + | } | |
126 | + | else this | |
127 | + | } | |
128 | + | ||
129 | + | ||
130 | + | func ae () = { | |
131 | + | let af = ab() | |
132 | + | let ac = getString(af, Z()) | |
121 | 133 | if ($isInstanceOf(ac, "String")) | |
122 | 134 | then { | |
123 | 135 | let ad = ac | |
129 | 141 | } | |
130 | 142 | ||
131 | 143 | ||
132 | - | func ae () = { | |
133 | - | let ac = getString(aa()) | |
134 | - | if ($isInstanceOf(ac, "String")) | |
144 | + | func ag (ah) = { | |
145 | + | let ai = d("Permission denied") | |
146 | + | let ac = ae() | |
147 | + | if ($isInstanceOf(ac, "ByteVector")) | |
135 | 148 | then { | |
136 | - | let ad = ac | |
137 | - | fromBase58String(ad) | |
149 | + | let aj = ac | |
150 | + | if ((ah.callerPublicKey == aj)) | |
151 | + | then true | |
152 | + | else ai | |
138 | 153 | } | |
139 | 154 | else if ($isInstanceOf(ac, "Unit")) | |
140 | - | then unit | |
155 | + | then if ((ah.caller == this)) | |
156 | + | then true | |
157 | + | else ai | |
141 | 158 | else throw("Match error") | |
142 | 159 | } | |
143 | 160 | ||
144 | 161 | ||
145 | - | func af (ag) = { | |
146 | - | let ah = d("Permission denied") | |
147 | - | let ac = ab() | |
148 | - | if ($isInstanceOf(ac, "ByteVector")) | |
149 | - | then { | |
150 | - | let ai = ac | |
151 | - | if ((ag.callerPublicKey == ai)) | |
152 | - | then true | |
153 | - | else ah | |
154 | - | } | |
155 | - | else if ($isInstanceOf(ac, "Unit")) | |
156 | - | then if ((ag.caller == this)) | |
157 | - | then true | |
158 | - | else ah | |
159 | - | else throw("Match error") | |
160 | - | } | |
161 | - | ||
162 | - | ||
163 | - | @Callable(ag) | |
164 | - | func constructor (aj,ak,al,am,an,ao,ap) = { | |
165 | - | let aq = af(ag) | |
166 | - | if ((aq == aq)) | |
167 | - | then [IntegerEntry(O(ao, am), ak), IntegerEntry(N(), ak), IntegerEntry(S(ao, am), al), IntegerEntry(R(), al), IntegerEntry(T(), am), IntegerEntry(U(), an), IntegerEntry(V(), (am + an)), StringEntry(h(), aj), StringEntry(M(), ("%s__" + ap))] | |
162 | + | @Callable(ah) | |
163 | + | func constructor (ak,al,am,an,ao,ap,aq) = { | |
164 | + | let ar = ag(ah) | |
165 | + | if ((ar == ar)) | |
166 | + | then [IntegerEntry(O(ap, an), al), IntegerEntry(N(), al), IntegerEntry(S(ap, an), am), IntegerEntry(R(), am), IntegerEntry(T(), an), IntegerEntry(U(), ao), IntegerEntry(V(), (an + ao)), StringEntry(h(), ak), StringEntry(M(), ("%s__" + aq))] | |
168 | 167 | else throw("Strict value is not equal to itself.") | |
169 | 168 | } | |
170 | 169 | ||
171 | 170 | ||
172 | 171 | ||
173 | - | @Callable( | |
174 | - | func constructorV2 ( | |
175 | - | let | |
176 | - | if (( | |
177 | - | then $Tuple2([StringEntry(i, | |
172 | + | @Callable(ah) | |
173 | + | func constructorV2 (as) = { | |
174 | + | let ar = ag(ah) | |
175 | + | if ((ar == ar)) | |
176 | + | then $Tuple2([StringEntry(i, as)], unit) | |
178 | 177 | else throw("Strict value is not equal to itself.") | |
179 | 178 | } | |
180 | 179 | ||
181 | 180 | ||
182 | 181 | ||
183 | - | @Callable( | |
184 | - | func emit ( | |
182 | + | @Callable(ah) | |
183 | + | func emit (at) = if ((0 >= at)) | |
185 | 184 | then $Tuple2(nil, nil) | |
186 | 185 | else { | |
187 | - | let | |
188 | - | let I = F( | |
189 | - | let | |
190 | - | let | |
191 | - | let | |
192 | - | if (if (( | |
193 | - | then ( | |
186 | + | let au = D() | |
187 | + | let I = F(au) | |
188 | + | let av = K(I) | |
189 | + | let aw = L(I) | |
190 | + | let ax = ah.caller | |
191 | + | if (if ((ax != av)) | |
192 | + | then (ax != aw) | |
194 | 193 | else false) | |
195 | 194 | then d("permissions denied") | |
196 | 195 | else { | |
197 | - | let | |
198 | - | let | |
199 | - | $Tuple2([ScriptTransfer( | |
196 | + | let aq = split(e(this, M()), a)[1] | |
197 | + | let ay = fromBase58String(aq) | |
198 | + | $Tuple2([ScriptTransfer(ax, at, ay)], [ay]) | |
200 | 199 | } | |
201 | 200 | } | |
202 | 201 | ||
203 | 202 | ||
204 | 203 | ||
205 | - | @Callable( | |
204 | + | @Callable(ah) | |
206 | 205 | func burn () = { | |
207 | - | let | |
208 | - | let I = F( | |
209 | - | let | |
210 | - | if ((size( | |
206 | + | let au = D() | |
207 | + | let I = F(au) | |
208 | + | let az = H(I) | |
209 | + | if ((size(ah.payments) != 1)) | |
211 | 210 | then d("exact one payment is allowed") | |
212 | 211 | else { | |
213 | - | let | |
214 | - | let | |
215 | - | let | |
216 | - | let | |
217 | - | if (( | |
212 | + | let aA = ah.payments[0] | |
213 | + | let aB = value(aA.assetId) | |
214 | + | let aC = aA.amount | |
215 | + | let ay = fromBase58String(split(e(this, M()), a)[1]) | |
216 | + | if ((aB != ay)) | |
218 | 217 | then d("invalid wxAssetId is passed") | |
219 | - | else if (!(containsElement([ | |
218 | + | else if (!(containsElement([az, l, m, n], ah.caller))) | |
220 | 219 | then d("permissions denied") | |
221 | - | else [Burn( | |
220 | + | else [Burn(aB, aC), StringEntry(("%s%s%s__history__burn__" + toBase58String(ah.transactionId)), makeString(["%d%d%d", toString(height), toString(lastBlock.timestamp), toString(aC)], a))] | |
222 | 221 | } | |
223 | 222 | } | |
224 | 223 | ||
225 | 224 | ||
226 | 225 | ||
227 | - | @Callable(ag) | |
228 | - | func setManager (aC) = { | |
229 | - | let aq = af(ag) | |
230 | - | if ((aq == aq)) | |
231 | - | then { | |
232 | - | let aD = fromBase58String(aC) | |
233 | - | if ((aD == aD)) | |
234 | - | then [StringEntry(aa(), aC)] | |
235 | - | else throw("Strict value is not equal to itself.") | |
236 | - | } | |
237 | - | else throw("Strict value is not equal to itself.") | |
238 | - | } | |
239 | - | ||
240 | - | ||
241 | - | ||
242 | - | @Callable(ag) | |
243 | - | func confirmManager () = { | |
244 | - | let aE = ae() | |
245 | - | let aF = if (isDefined(aE)) | |
246 | - | then true | |
247 | - | else d("No pending manager") | |
248 | - | if ((aF == aF)) | |
249 | - | then { | |
250 | - | let aG = if ((ag.callerPublicKey == value(aE))) | |
251 | - | then true | |
252 | - | else d("You are not pending manager") | |
253 | - | if ((aG == aG)) | |
254 | - | then [StringEntry(Z(), toBase58String(value(aE))), DeleteEntry(aa())] | |
255 | - | else throw("Strict value is not equal to itself.") | |
256 | - | } | |
257 | - | else throw("Strict value is not equal to itself.") | |
258 | - | } | |
259 | - | ||
260 | - | ||
261 | - | ||
262 | - | @Callable(ag) | |
226 | + | @Callable(ah) | |
263 | 227 | func getBoostCoeffREADONLY () = $Tuple2(nil, Y) | |
264 | 228 | ||
265 | 229 | ||
266 | - | @Verifier( | |
267 | - | func | |
268 | - | let | |
269 | - | let ac = | |
230 | + | @Verifier(aD) | |
231 | + | func aE () = { | |
232 | + | let aF = { | |
233 | + | let ac = ae() | |
270 | 234 | if ($isInstanceOf(ac, "ByteVector")) | |
271 | 235 | then { | |
272 | - | let | |
273 | - | | |
236 | + | let aj = ac | |
237 | + | aj | |
274 | 238 | } | |
275 | 239 | else if ($isInstanceOf(ac, "Unit")) | |
276 | - | then | |
240 | + | then aD.senderPublicKey | |
277 | 241 | else throw("Match error") | |
278 | 242 | } | |
279 | - | sigVerify( | |
243 | + | sigVerify(aD.bodyBytes, aD.proofs[0], aF) | |
280 | 244 | } | |
281 | 245 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | func b (c) = makeString(["emission.ride:", toString(this), c], " ") | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | func d (c) = throw(b(c)) | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func e (f,g) = valueOrErrorMessage(getString(f, g), b((("mandatory this." + g) + " is not defined"))) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func h () = "%s%s__config__factoryAddress" | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | let i = "%s%s__config__votingVerifiedContract" | |
19 | 19 | ||
20 | 20 | let j = "%s%s__config__votingEmissionCandidateContract" | |
21 | 21 | ||
22 | 22 | let k = "%s%s__config__userPoolsContract" | |
23 | 23 | ||
24 | 24 | let l = addressFromStringValue(e(this, i)) | |
25 | 25 | ||
26 | 26 | let m = addressFromStringValue(e(this, j)) | |
27 | 27 | ||
28 | 28 | let n = addressFromStringValue(e(this, k)) | |
29 | 29 | ||
30 | 30 | let o = 1 | |
31 | 31 | ||
32 | 32 | let p = 2 | |
33 | 33 | ||
34 | 34 | let q = 3 | |
35 | 35 | ||
36 | 36 | let r = 4 | |
37 | 37 | ||
38 | 38 | let s = 5 | |
39 | 39 | ||
40 | 40 | let t = 6 | |
41 | 41 | ||
42 | 42 | let u = 7 | |
43 | 43 | ||
44 | 44 | let v = 10 | |
45 | 45 | ||
46 | 46 | func w () = "%s__factoryConfig" | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func x (y) = makeString(["%s%s%s", y, "mappings__lpAsset2PoolContract"], a) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func z () = "%s__lpTokensList" | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func A (y) = makeString(["%s%s%s", y, "mappings__lpAsset2PoolContract"], a) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func B (C) = makeString(["%s%s", "poolWeight", C], a) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func D () = addressFromStringValue(e(this, h())) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func E () = split(valueOrElse(getString(D(), z()), ""), a) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func F (G) = split(e(G, w()), a) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func H (I) = addressFromStringValue(I[p]) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func J (I) = addressFromStringValue(I[s]) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func K (I) = addressFromStringValue(I[o]) | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func L (I) = addressFromStringValue(I[v]) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func M () = "%s__config" | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func N () = "%s%s__ratePerBlockMax__current" | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func O (P,Q) = makeString(["%s%s%d%d__ratePerBlockMax__start", toString(P), toString(Q)], a) | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func R () = "%s%s__ratePerBlock__current" | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func S (P,Q) = makeString(["%s%s%d%d__ratePerBlock__start", toString(P), toString(Q)], a) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func T () = "%s%s__emission__startBlock" | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func U () = "%s%s__emission__duration" | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func V () = "%s%s__emission__endBlock" | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func W () = "%s__boostCoeff" | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | let X = 3 | |
110 | 110 | ||
111 | 111 | let Y = valueOrElse(getInteger(this, W()), X) | |
112 | 112 | ||
113 | 113 | func Z () = "%s__managerPublicKey" | |
114 | 114 | ||
115 | 115 | ||
116 | - | func aa () = "%s__ | |
116 | + | func aa () = "%s__managerVaultAddress" | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func ab () = { | |
120 | - | let ac = getString(Z()) | |
120 | + | let ac = getString(aa()) | |
121 | + | if ($isInstanceOf(ac, "String")) | |
122 | + | then { | |
123 | + | let ad = ac | |
124 | + | addressFromStringValue(ad) | |
125 | + | } | |
126 | + | else this | |
127 | + | } | |
128 | + | ||
129 | + | ||
130 | + | func ae () = { | |
131 | + | let af = ab() | |
132 | + | let ac = getString(af, Z()) | |
121 | 133 | if ($isInstanceOf(ac, "String")) | |
122 | 134 | then { | |
123 | 135 | let ad = ac | |
124 | 136 | fromBase58String(ad) | |
125 | 137 | } | |
126 | 138 | else if ($isInstanceOf(ac, "Unit")) | |
127 | 139 | then unit | |
128 | 140 | else throw("Match error") | |
129 | 141 | } | |
130 | 142 | ||
131 | 143 | ||
132 | - | func ae () = { | |
133 | - | let ac = getString(aa()) | |
134 | - | if ($isInstanceOf(ac, "String")) | |
144 | + | func ag (ah) = { | |
145 | + | let ai = d("Permission denied") | |
146 | + | let ac = ae() | |
147 | + | if ($isInstanceOf(ac, "ByteVector")) | |
135 | 148 | then { | |
136 | - | let ad = ac | |
137 | - | fromBase58String(ad) | |
149 | + | let aj = ac | |
150 | + | if ((ah.callerPublicKey == aj)) | |
151 | + | then true | |
152 | + | else ai | |
138 | 153 | } | |
139 | 154 | else if ($isInstanceOf(ac, "Unit")) | |
140 | - | then unit | |
155 | + | then if ((ah.caller == this)) | |
156 | + | then true | |
157 | + | else ai | |
141 | 158 | else throw("Match error") | |
142 | 159 | } | |
143 | 160 | ||
144 | 161 | ||
145 | - | func af (ag) = { | |
146 | - | let ah = d("Permission denied") | |
147 | - | let ac = ab() | |
148 | - | if ($isInstanceOf(ac, "ByteVector")) | |
149 | - | then { | |
150 | - | let ai = ac | |
151 | - | if ((ag.callerPublicKey == ai)) | |
152 | - | then true | |
153 | - | else ah | |
154 | - | } | |
155 | - | else if ($isInstanceOf(ac, "Unit")) | |
156 | - | then if ((ag.caller == this)) | |
157 | - | then true | |
158 | - | else ah | |
159 | - | else throw("Match error") | |
160 | - | } | |
161 | - | ||
162 | - | ||
163 | - | @Callable(ag) | |
164 | - | func constructor (aj,ak,al,am,an,ao,ap) = { | |
165 | - | let aq = af(ag) | |
166 | - | if ((aq == aq)) | |
167 | - | then [IntegerEntry(O(ao, am), ak), IntegerEntry(N(), ak), IntegerEntry(S(ao, am), al), IntegerEntry(R(), al), IntegerEntry(T(), am), IntegerEntry(U(), an), IntegerEntry(V(), (am + an)), StringEntry(h(), aj), StringEntry(M(), ("%s__" + ap))] | |
162 | + | @Callable(ah) | |
163 | + | func constructor (ak,al,am,an,ao,ap,aq) = { | |
164 | + | let ar = ag(ah) | |
165 | + | if ((ar == ar)) | |
166 | + | then [IntegerEntry(O(ap, an), al), IntegerEntry(N(), al), IntegerEntry(S(ap, an), am), IntegerEntry(R(), am), IntegerEntry(T(), an), IntegerEntry(U(), ao), IntegerEntry(V(), (an + ao)), StringEntry(h(), ak), StringEntry(M(), ("%s__" + aq))] | |
168 | 167 | else throw("Strict value is not equal to itself.") | |
169 | 168 | } | |
170 | 169 | ||
171 | 170 | ||
172 | 171 | ||
173 | - | @Callable( | |
174 | - | func constructorV2 ( | |
175 | - | let | |
176 | - | if (( | |
177 | - | then $Tuple2([StringEntry(i, | |
172 | + | @Callable(ah) | |
173 | + | func constructorV2 (as) = { | |
174 | + | let ar = ag(ah) | |
175 | + | if ((ar == ar)) | |
176 | + | then $Tuple2([StringEntry(i, as)], unit) | |
178 | 177 | else throw("Strict value is not equal to itself.") | |
179 | 178 | } | |
180 | 179 | ||
181 | 180 | ||
182 | 181 | ||
183 | - | @Callable( | |
184 | - | func emit ( | |
182 | + | @Callable(ah) | |
183 | + | func emit (at) = if ((0 >= at)) | |
185 | 184 | then $Tuple2(nil, nil) | |
186 | 185 | else { | |
187 | - | let | |
188 | - | let I = F( | |
189 | - | let | |
190 | - | let | |
191 | - | let | |
192 | - | if (if (( | |
193 | - | then ( | |
186 | + | let au = D() | |
187 | + | let I = F(au) | |
188 | + | let av = K(I) | |
189 | + | let aw = L(I) | |
190 | + | let ax = ah.caller | |
191 | + | if (if ((ax != av)) | |
192 | + | then (ax != aw) | |
194 | 193 | else false) | |
195 | 194 | then d("permissions denied") | |
196 | 195 | else { | |
197 | - | let | |
198 | - | let | |
199 | - | $Tuple2([ScriptTransfer( | |
196 | + | let aq = split(e(this, M()), a)[1] | |
197 | + | let ay = fromBase58String(aq) | |
198 | + | $Tuple2([ScriptTransfer(ax, at, ay)], [ay]) | |
200 | 199 | } | |
201 | 200 | } | |
202 | 201 | ||
203 | 202 | ||
204 | 203 | ||
205 | - | @Callable( | |
204 | + | @Callable(ah) | |
206 | 205 | func burn () = { | |
207 | - | let | |
208 | - | let I = F( | |
209 | - | let | |
210 | - | if ((size( | |
206 | + | let au = D() | |
207 | + | let I = F(au) | |
208 | + | let az = H(I) | |
209 | + | if ((size(ah.payments) != 1)) | |
211 | 210 | then d("exact one payment is allowed") | |
212 | 211 | else { | |
213 | - | let | |
214 | - | let | |
215 | - | let | |
216 | - | let | |
217 | - | if (( | |
212 | + | let aA = ah.payments[0] | |
213 | + | let aB = value(aA.assetId) | |
214 | + | let aC = aA.amount | |
215 | + | let ay = fromBase58String(split(e(this, M()), a)[1]) | |
216 | + | if ((aB != ay)) | |
218 | 217 | then d("invalid wxAssetId is passed") | |
219 | - | else if (!(containsElement([ | |
218 | + | else if (!(containsElement([az, l, m, n], ah.caller))) | |
220 | 219 | then d("permissions denied") | |
221 | - | else [Burn( | |
220 | + | else [Burn(aB, aC), StringEntry(("%s%s%s__history__burn__" + toBase58String(ah.transactionId)), makeString(["%d%d%d", toString(height), toString(lastBlock.timestamp), toString(aC)], a))] | |
222 | 221 | } | |
223 | 222 | } | |
224 | 223 | ||
225 | 224 | ||
226 | 225 | ||
227 | - | @Callable(ag) | |
228 | - | func setManager (aC) = { | |
229 | - | let aq = af(ag) | |
230 | - | if ((aq == aq)) | |
231 | - | then { | |
232 | - | let aD = fromBase58String(aC) | |
233 | - | if ((aD == aD)) | |
234 | - | then [StringEntry(aa(), aC)] | |
235 | - | else throw("Strict value is not equal to itself.") | |
236 | - | } | |
237 | - | else throw("Strict value is not equal to itself.") | |
238 | - | } | |
239 | - | ||
240 | - | ||
241 | - | ||
242 | - | @Callable(ag) | |
243 | - | func confirmManager () = { | |
244 | - | let aE = ae() | |
245 | - | let aF = if (isDefined(aE)) | |
246 | - | then true | |
247 | - | else d("No pending manager") | |
248 | - | if ((aF == aF)) | |
249 | - | then { | |
250 | - | let aG = if ((ag.callerPublicKey == value(aE))) | |
251 | - | then true | |
252 | - | else d("You are not pending manager") | |
253 | - | if ((aG == aG)) | |
254 | - | then [StringEntry(Z(), toBase58String(value(aE))), DeleteEntry(aa())] | |
255 | - | else throw("Strict value is not equal to itself.") | |
256 | - | } | |
257 | - | else throw("Strict value is not equal to itself.") | |
258 | - | } | |
259 | - | ||
260 | - | ||
261 | - | ||
262 | - | @Callable(ag) | |
226 | + | @Callable(ah) | |
263 | 227 | func getBoostCoeffREADONLY () = $Tuple2(nil, Y) | |
264 | 228 | ||
265 | 229 | ||
266 | - | @Verifier( | |
267 | - | func | |
268 | - | let | |
269 | - | let ac = | |
230 | + | @Verifier(aD) | |
231 | + | func aE () = { | |
232 | + | let aF = { | |
233 | + | let ac = ae() | |
270 | 234 | if ($isInstanceOf(ac, "ByteVector")) | |
271 | 235 | then { | |
272 | - | let | |
273 | - | | |
236 | + | let aj = ac | |
237 | + | aj | |
274 | 238 | } | |
275 | 239 | else if ($isInstanceOf(ac, "Unit")) | |
276 | - | then | |
240 | + | then aD.senderPublicKey | |
277 | 241 | else throw("Match error") | |
278 | 242 | } | |
279 | - | sigVerify( | |
243 | + | sigVerify(aD.bodyBytes, aD.proofs[0], aF) | |
280 | 244 | } | |
281 | 245 |
github/deemru/w8io/026f985 50.05 ms ◑