tx · BJbFWETL5ucuhkmgaHvCsLNKxXXi1H2NzHbMgvMyt791 3N53siKhr59udoWv8myp2B3sEXcRmY5j7b2: -0.01600000 Waves 2023.02.28 17:34 [2469681] smart account 3N53siKhr59udoWv8myp2B3sEXcRmY5j7b2 > SELF 0.00000000 Waves
{ "type": 13, "id": "BJbFWETL5ucuhkmgaHvCsLNKxXXi1H2NzHbMgvMyt791", "fee": 1600000, "feeAssetId": null, "timestamp": 1677594964524, "version": 2, "chainId": 84, "sender": "3N53siKhr59udoWv8myp2B3sEXcRmY5j7b2", "senderPublicKey": "39MQ3tMDeghcEji1wBaaBdguHU3bebLKhA7uzqrNf1Mq", "proofs": [ "5R2qwtvTmULkN4cvzUAPmcMNPjqjWsPAccLSHVYi3o4BXwkW7qr2G8bmjAv5z4xGH4p73tUNFXaVHBehZunFRt1N" ], "script": "base64:BgLgEggCEgcKBQgICAEIEgMKAQESABIAEgUKAwgICBIDCgEIEgQKAgIBEgQKAgIBEgMKAQgSAwoBCBIAIgNTRVAiB3dyYXBFcnIiA21zZyIIdGhyb3dFcnIiD2dldFN0cmluZ09yRmFpbCIDa2V5IhBnZXRCb29sZWFuT3JGYWlsIg5mYWlsRXhlY3V0ZUdldCIMYmFzZUFzc2V0U3RyIg51c2VyQWRkcmVzc1N0ciIKZ2V0VHhJZFN0ciILa2V5QXNzZXRDZmciFmtleU5leHRJbnRlcm5hbEFzc2V0SWQiDGtleVByaWNlTGFzdCIVaW50ZXJuYWxCYXNldEFzc2V0U3RyIhJrZXlUb3BVcExhc3RIZWlnaHQiBnNlbmRlciIPa2V5UHJpY2VIaXN0b3J5IgFoIgl0aW1lc3RhbXAiDmtleVRvdGFsTG9ja2VkIhRrZXlUb3RhbExvY2tlZEJ5VXNlciIUaW50ZXJuYWxCYXNlQXNzZXRTdHIiH2tleU1hcHBpbmdzSW50ZXJuYWwyYmFzZUFzc2V0SWQiEWludGVybmFsQmFzZUFzc2V0Ih9rZXlNYXBwaW5nc0Jhc2VBc3Nld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AmJKAwkAAAIIBQFUD2NhbGxlclB1YmxpY0tleQkBBXZhbHVlAQUCYkgGCQEBZAECG3lvdSBhcmUgbm90IHBlbmRpbmcgbWFuYWdlcgMJAAACBQJiSgUCYkoJAMwIAgkBC1N0cmluZ0VudHJ5AgkBAUwACQDYBAEJAQV2YWx1ZQEFAmJICQDMCAIJAQtEZWxldGVFbnRyeQEJAQFNAAUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJiSwECYkwABAJiTQQBTwkBAU4AAwkAAQIFAU8CCkJ5dGVWZWN0b3IEAVYFAU8FAVYDCQABAgUBTwIEVW5pdAgFAmJLD3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJiSwlib2R5Qnl0ZXMJAJEDAggFAmJLBnByb29mcwAABQJiTR+MzJc=", "height": 2469681, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 6ostDXTFnpkMzQoCmP5XKJbRAygtyyWBbnYMx7QUZTnZ Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = "__" | |
5 | + | ||
6 | + | func b (c) = makeString(["lp_staking.ride:", c], " ") | |
7 | + | ||
8 | + | ||
9 | + | func d (c) = throw(b(c)) | |
10 | + | ||
11 | + | ||
12 | + | func e (f) = valueOrErrorMessage(getString(this, f), ("No data for this.key=" + f)) | |
13 | + | ||
14 | + | ||
15 | + | func g (f) = valueOrErrorMessage(getBoolean(this, f), ("No data for this.key=" + f)) | |
16 | + | ||
17 | + | ||
18 | + | func h (c,i,j,k) = throw(((((((c + ": baseAssetStr=") + i) + " userAddressStr=") + j) + " getTxIdStr=") + k)) | |
19 | + | ||
20 | + | ||
21 | + | func l (i) = ("%s%s%s__config__asset__" + i) | |
22 | + | ||
23 | + | ||
24 | + | func m () = "%s__nextInternalAssetId" | |
25 | + | ||
26 | + | ||
27 | + | func n (o) = ("%s%s%d__price__last__" + o) | |
28 | + | ||
29 | + | ||
30 | + | func p (o,q) = makeString(["%s%s%s%d%s__topup__last__height", o, q], a) | |
31 | + | ||
32 | + | ||
33 | + | func r (o,s,t) = makeString(["%s%s%d%d%d__price__history", o, toString(s), toString(t)], a) | |
34 | + | ||
35 | + | ||
36 | + | func u (o) = ("%s%s%d__total__locked__" + o) | |
37 | + | ||
38 | + | ||
39 | + | func v (w,j) = makeString(["%s%s%d%s__total__locked", w, j], a) | |
40 | + | ||
41 | + | ||
42 | + | func x (y) = ("%s%s%d__mappings__internal2baseAssetId__" + toString(y)) | |
43 | + | ||
44 | + | ||
45 | + | func z (i) = ("%s%s%s__mappings__baseAsset2internalId__" + i) | |
46 | + | ||
47 | + | ||
48 | + | func A (B) = ("%s%s%s__mappings__share2baseAssetId__" + B) | |
49 | + | ||
50 | + | ||
51 | + | func C (i) = ("%s%s%s__mappings__baseAsset2shareId__" + i) | |
52 | + | ||
53 | + | ||
54 | + | func D (w) = ("%s%s%d__shutdown__put__" + w) | |
55 | + | ||
56 | + | ||
57 | + | func E (w) = ("%s%d__shutdown__" + w) | |
58 | + | ||
59 | + | ||
60 | + | func F (w) = ("%s%s%d__shutdown__manager__" + w) | |
61 | + | ||
62 | + | ||
63 | + | let G = 1 | |
64 | + | ||
65 | + | let H = 2 | |
66 | + | ||
67 | + | let I = 3 | |
68 | + | ||
69 | + | let J = 4 | |
70 | + | ||
71 | + | let K = 5 | |
72 | + | ||
73 | + | func L () = "%s__managerPublicKey" | |
74 | + | ||
75 | + | ||
76 | + | func M () = "%s__pendingManagerPublicKey" | |
77 | + | ||
78 | + | ||
79 | + | func N () = { | |
80 | + | let O = getString(L()) | |
81 | + | if ($isInstanceOf(O, "String")) | |
82 | + | then { | |
83 | + | let P = O | |
84 | + | fromBase58String(P) | |
85 | + | } | |
86 | + | else if ($isInstanceOf(O, "Unit")) | |
87 | + | then unit | |
88 | + | else throw("Match error") | |
89 | + | } | |
90 | + | ||
91 | + | ||
92 | + | func Q () = { | |
93 | + | let O = getString(M()) | |
94 | + | if ($isInstanceOf(O, "String")) | |
95 | + | then { | |
96 | + | let P = O | |
97 | + | fromBase58String(P) | |
98 | + | } | |
99 | + | else if ($isInstanceOf(O, "Unit")) | |
100 | + | then unit | |
101 | + | else throw("Match error") | |
102 | + | } | |
103 | + | ||
104 | + | ||
105 | + | let R = throw("Permission denied") | |
106 | + | ||
107 | + | func S (T) = if ((T.caller == this)) | |
108 | + | then true | |
109 | + | else R | |
110 | + | ||
111 | + | ||
112 | + | func U (T) = { | |
113 | + | let O = N() | |
114 | + | if ($isInstanceOf(O, "ByteVector")) | |
115 | + | then { | |
116 | + | let V = O | |
117 | + | if ((T.callerPublicKey == V)) | |
118 | + | then true | |
119 | + | else R | |
120 | + | } | |
121 | + | else if ($isInstanceOf(O, "Unit")) | |
122 | + | then S(T) | |
123 | + | else throw("Match error") | |
124 | + | } | |
125 | + | ||
126 | + | ||
127 | + | let W = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], a)), b("lp_staking_pools contract address is undefined"))), b("invalid lp_staking_pools contract address")) | |
128 | + | ||
129 | + | func X (B,w,Y,Z,aa) = makeString(["%s%d%d%d%d", B, w, toString(Y), toString(Z), toString(aa)], a) | |
130 | + | ||
131 | + | ||
132 | + | let ab = 1 | |
133 | + | ||
134 | + | let ac = 2 | |
135 | + | ||
136 | + | func ad (ae,af) = makeString(["%d%d", toString(ae), toString(af)], a) | |
137 | + | ||
138 | + | ||
139 | + | func ag (f) = { | |
140 | + | let ah = split(valueOrElse(getString(this, f), ad(0, 0)), a) | |
141 | + | [-1, parseIntValue(ah[ab]), parseIntValue(ah[ac])] | |
142 | + | } | |
143 | + | ||
144 | + | ||
145 | + | func ai (aj,w,ak,al) = makeString(["%s%d%s%s", aj, w, ak, al], a) | |
146 | + | ||
147 | + | ||
148 | + | let am = 1 | |
149 | + | ||
150 | + | let an = 2 | |
151 | + | ||
152 | + | let ao = 3 | |
153 | + | ||
154 | + | let ap = 4 | |
155 | + | ||
156 | + | let aq = 5 | |
157 | + | ||
158 | + | let ar = 6 | |
159 | + | ||
160 | + | let as = 7 | |
161 | + | ||
162 | + | let at = 8 | |
163 | + | ||
164 | + | func au (av,aw,ax,ay,az,aA,aB,aC) = makeString(["%s%d%d%d%d%d%d%d", av, aw, ax, ay, az, aA, aB, aC], a) | |
165 | + | ||
166 | + | ||
167 | + | func aD (av,aw,ax,ay,az,aA,aB,aC) = au(av, toString(aw), toString(ax), toString(ay), toString(az), toString(aA), toString(aB), toString(aC)) | |
168 | + | ||
169 | + | ||
170 | + | func aE (aF,aG,aH) = au(aG, aF[an], aF[ao], aF[ap], aF[aq], aF[ar], aF[as], toString(aH)) | |
171 | + | ||
172 | + | ||
173 | + | func aI (i) = { | |
174 | + | let f = l(i) | |
175 | + | split(e(f), a) | |
176 | + | } | |
177 | + | ||
178 | + | ||
179 | + | func aJ (f,ae,af) = { | |
180 | + | let aK = ag(f) | |
181 | + | StringEntry(f, ad((aK[ab] + ae), (aK[ac] + af))) | |
182 | + | } | |
183 | + | ||
184 | + | ||
185 | + | func aL (f,ae,af) = { | |
186 | + | let aK = ag(f) | |
187 | + | StringEntry(f, ad((aK[ab] - ae), (aK[ac] - af))) | |
188 | + | } | |
189 | + | ||
190 | + | ||
191 | + | func aM (w,aN,aO,aP,Y,Z) = { | |
192 | + | let ah = ag(u(w)) | |
193 | + | let aQ = ah[ac] | |
194 | + | let aR = assetBalance(this, aN) | |
195 | + | let aS = ((aR - aQ) + aO) | |
196 | + | if ((0 > aS)) | |
197 | + | then throw(((("baseAssetBalanceConsideringLock < 0: baseAssetBalance=" + toString(aR)) + " baseAssetBalanceConsideringLock=") + toString(aS))) | |
198 | + | else { | |
199 | + | let aT = value(assetInfo(aP)).quantity | |
200 | + | let ax = if ((aT == 0)) | |
201 | + | then (1 * Z) | |
202 | + | else fraction(aS, Z, aT) | |
203 | + | $Tuple5(ax, aR, aQ, aS, aT) | |
204 | + | } | |
205 | + | } | |
206 | + | ||
207 | + | ||
208 | + | func aU (w,aN,aP,Y,Z) = aM(w, aN, 0, aP, Y, Z) | |
209 | + | ||
210 | + | ||
211 | + | func aV (i) = { | |
212 | + | let aN = fromBase58String(i) | |
213 | + | let aW = aI(i) | |
214 | + | let B = aW[G] | |
215 | + | let aP = fromBase58String(B) | |
216 | + | let Y = parseIntValue(aW[I]) | |
217 | + | let Z = parseIntValue(aW[J]) | |
218 | + | let w = aW[H] | |
219 | + | let aX = aU(w, aN, aP, Y, Z) | |
220 | + | $Tuple6(IntegerEntry("price", aX._1), IntegerEntry("decimalsMultPrice", Z), IntegerEntry("baseAssetBalance", aX._2), IntegerEntry("totalLockedBaseAmount", aX._3), IntegerEntry("baseAssetBalanceConsideringLock", aX._4), IntegerEntry("shareEmission", aX._5)) | |
221 | + | } | |
222 | + | ||
223 | + | ||
224 | + | @Callable(T) | |
225 | + | func adminRegisterAsset (i,aY,aZ,ba,bb) = { | |
226 | + | let aN = fromBase58String(i) | |
227 | + | let bc = value(assetInfo(aN)).decimals | |
228 | + | let bd = U(T) | |
229 | + | if ((bd == bd)) | |
230 | + | then if ((toString(addressFromStringValue(bb)) != bb)) | |
231 | + | then throw("invalid shutdownManagerAddress") | |
232 | + | else if ((0 > ba)) | |
233 | + | then throw(("invalid getDelayinBlocks=" + toString(ba))) | |
234 | + | else { | |
235 | + | let be = Issue(aY, aZ, 1, bc, true) | |
236 | + | let aP = calculateAssetId(be) | |
237 | + | let B = toBase58String(aP) | |
238 | + | let Z = ((100 * 1000) * 1000) | |
239 | + | let Y = pow(10, 0, bc, 0, 0, DOWN) | |
240 | + | let bf = (1 * Z) | |
241 | + | let bg = valueOrElse(getInteger(this, m()), 0) | |
242 | + | let w = toString(bg) | |
243 | + | [StringEntry(l(i), X(B, w, Y, Z, ba)), StringEntry(x(bg), i), StringEntry(z(i), w), StringEntry(A(B), i), StringEntry(C(i), B), BooleanEntry(D(w), false), StringEntry(F(w), bb), IntegerEntry(m(), (bg + 1)), IntegerEntry(n(w), bf), IntegerEntry(r(w, height, lastBlock.timestamp), bf), be, Burn(aP, 1)] | |
244 | + | } | |
245 | + | else throw("Strict value is not equal to itself.") | |
246 | + | } | |
247 | + | ||
248 | + | ||
249 | + | ||
250 | + | @Callable(T) | |
251 | + | func shutdownPut (bh) = { | |
252 | + | let bi = toString(bh) | |
253 | + | let bj = e(x(bh)) | |
254 | + | let bb = e(F(bi)) | |
255 | + | if ((1 > size(bj))) | |
256 | + | then throw("invalid internalBaseAssetId") | |
257 | + | else if ((toString(T.caller) != bb)) | |
258 | + | then throw("access denied") | |
259 | + | else [BooleanEntry(D(toString(bh)), true)] | |
260 | + | } | |
261 | + | ||
262 | + | ||
263 | + | ||
264 | + | @Callable(T) | |
265 | + | func put () = { | |
266 | + | let bk = value(T.payments[0]) | |
267 | + | let aN = value(bk.assetId) | |
268 | + | let i = toBase58String(aN) | |
269 | + | let j = toString(T.caller) | |
270 | + | let aW = aI(i) | |
271 | + | let B = aW[G] | |
272 | + | let aP = fromBase58String(B) | |
273 | + | let Y = parseIntValue(aW[I]) | |
274 | + | let Z = parseIntValue(aW[J]) | |
275 | + | let w = aW[H] | |
276 | + | let bl = g(D(w)) | |
277 | + | let bm = valueOrElse(getBoolean(E(w)), false) | |
278 | + | if (if (bl) | |
279 | + | then true | |
280 | + | else bm) | |
281 | + | then throw("put operation is blocked") | |
282 | + | else { | |
283 | + | let ax = aU(w, aN, aP, Y, Z)._1 | |
284 | + | let ae = fraction(bk.amount, Z, ax) | |
285 | + | [Reissue(aP, ae, true), ScriptTransfer(T.caller, ae, aP), StringEntry(ai("P", w, j, toBase58String(T.transactionId)), aD("FINISHED", bk.amount, ax, ae, height, lastBlock.timestamp, height, lastBlock.timestamp))] | |
286 | + | } | |
287 | + | } | |
288 | + | ||
289 | + | ||
290 | + | ||
291 | + | @Callable(T) | |
292 | + | func submitGetRequest () = { | |
293 | + | let bk = value(T.payments[0]) | |
294 | + | let aP = value(bk.assetId) | |
295 | + | let B = toBase58String(aP) | |
296 | + | let bn = toBase58String(T.callerPublicKey) | |
297 | + | let ak = T.caller | |
298 | + | let j = toString(ak) | |
299 | + | let ae = bk.amount | |
300 | + | let i = e(A(B)) | |
301 | + | let aN = fromBase58String(i) | |
302 | + | let aW = aI(i) | |
303 | + | let Y = parseIntValue(aW[I]) | |
304 | + | let Z = parseIntValue(aW[J]) | |
305 | + | let bo = parseIntValue(aW[K]) | |
306 | + | let w = aW[H] | |
307 | + | let bm = valueOrElse(getBoolean(E(w)), false) | |
308 | + | if (bm) | |
309 | + | then throw("operation is blocked") | |
310 | + | else { | |
311 | + | let ax = aU(w, aN, aP, Y, Z)._1 | |
312 | + | let af = fraction(ae, ax, Z) | |
313 | + | let bp = ai("G", w, j, toBase58String(T.transactionId)) | |
314 | + | let bq = aD("PENDING", ae, ax, af, height, lastBlock.timestamp, (height + bo), 0) | |
315 | + | [Burn(aP, ae), StringEntry(bp, bq), aJ(u(w), ae, af), aJ(v(w, j), ae, af)] | |
316 | + | } | |
317 | + | } | |
318 | + | ||
319 | + | ||
320 | + | ||
321 | + | @Callable(T) | |
322 | + | func executeGetRequest (i,j,k) = { | |
323 | + | let ak = addressFromStringValue(j) | |
324 | + | let br = aI(i) | |
325 | + | let aP = fromBase58String(br[G]) | |
326 | + | let aN = fromBase58String(i) | |
327 | + | let w = br[H] | |
328 | + | let bm = valueOrElse(getBoolean(E(w)), false) | |
329 | + | if (bm) | |
330 | + | then throw("operation is blocked") | |
331 | + | else { | |
332 | + | let bp = ai("G", w, j, k) | |
333 | + | let bs = split(e(bp), a) | |
334 | + | let av = bs[am] | |
335 | + | let aB = parseIntValue(bs[as]) | |
336 | + | let bt = parseIntValue(bs[an]) | |
337 | + | let bu = parseIntValue(bs[ap]) | |
338 | + | if ((av != "PENDING")) | |
339 | + | then h("Status is not PENDING", i, j, k) | |
340 | + | else if ((aB > height)) | |
341 | + | then h(((("EndHeight[" + toString(aB)) + "] > ") + toString(height)), i, j, k) | |
342 | + | else [ScriptTransfer(ak, bu, aN), StringEntry(bp, aE(bs, "FINISHED", lastBlock.timestamp)), aL(u(w), bt, bu), aL(v(w, j), bt, bu)] | |
343 | + | } | |
344 | + | } | |
345 | + | ||
346 | + | ||
347 | + | ||
348 | + | @Callable(T) | |
349 | + | func topUpBalance (i) = { | |
350 | + | let br = aI(i) | |
351 | + | let bk = value(T.payments[0]) | |
352 | + | let bv = value(bk.assetId) | |
353 | + | let bw = toBase58String(bv) | |
354 | + | let aP = fromBase58String(br[G]) | |
355 | + | let Y = parseIntValue(br[I]) | |
356 | + | let Z = parseIntValue(br[J]) | |
357 | + | let w = br[H] | |
358 | + | let bx = p(w, toString(T.caller)) | |
359 | + | let by = valueOrElse(getInteger(this, bx), 0) | |
360 | + | let bm = valueOrElse(getBoolean(E(w)), false) | |
361 | + | if (bm) | |
362 | + | then throw("operation is blocked") | |
363 | + | else if ((i != bw)) | |
364 | + | then throw("attached payment's asset id is NOT matched passed baseAssetStr") | |
365 | + | else if ((size(T.payments) > 1)) | |
366 | + | then throw("only one payment can be attached") | |
367 | + | else if ((100 > (height - by))) | |
368 | + | then throw("1 topUp per 100 blocks from the same address is allowed") | |
369 | + | else { | |
370 | + | let ax = aM(w, bv, bk.amount, aP, Y, Z)._1 | |
371 | + | [IntegerEntry(n(w), ax), IntegerEntry(r(w, height, lastBlock.timestamp), ax), IntegerEntry(bx, height)] | |
372 | + | } | |
373 | + | } | |
374 | + | ||
375 | + | ||
376 | + | ||
377 | + | @Callable(T) | |
378 | + | func emit (bz,bA) = { | |
379 | + | let bB = [if ((T.caller == W)) | |
380 | + | then true | |
381 | + | else d("permission denied"), if ((bA > 0)) | |
382 | + | then true | |
383 | + | else d("invalid amount to emit"), if ((getString(A(toBase58String(bz))) != unit)) | |
384 | + | then true | |
385 | + | else d("invalid assetId")] | |
386 | + | if ((bB == bB)) | |
387 | + | then { | |
388 | + | let bC = true | |
389 | + | $Tuple2([Reissue(bz, bA, bC), ScriptTransfer(W, bA, bz)], bA) | |
390 | + | } | |
391 | + | else throw("Strict value is not equal to itself.") | |
392 | + | } | |
393 | + | ||
394 | + | ||
395 | + | ||
396 | + | @Callable(T) | |
397 | + | func burn (bz,bA) = { | |
398 | + | let bB = [if ((T.caller == W)) | |
399 | + | then true | |
400 | + | else d("permission denied"), if ((bA > 0)) | |
401 | + | then true | |
402 | + | else d("invalid amount to burn"), if ((getString(A(toBase58String(bz))) != unit)) | |
403 | + | then true | |
404 | + | else d("invalid assetId")] | |
405 | + | if ((bB == bB)) | |
406 | + | then $Tuple2([Burn(bz, bA)], bA) | |
407 | + | else throw("Strict value is not equal to itself.") | |
408 | + | } | |
409 | + | ||
410 | + | ||
411 | + | ||
412 | + | @Callable(T) | |
413 | + | func currentSysParamsREST (i) = { | |
414 | + | let bD = aV(i) | |
415 | + | let ax = bD._1.value | |
416 | + | let Z = bD._2.value | |
417 | + | let aR = bD._3.value | |
418 | + | let aQ = bD._4.value | |
419 | + | let aS = bD._5.value | |
420 | + | let aT = bD._6.value | |
421 | + | let bE = makeString(["startCurrentSysParamsREST", toString(ax), toString(Z), toString(aR), toString(aQ), toString(aS), toString(aT), "endCurrentSysParamsREST"], a) | |
422 | + | throw(bE) | |
423 | + | } | |
424 | + | ||
425 | + | ||
426 | + | ||
427 | + | @Callable(T) | |
428 | + | func setManager (bF) = { | |
429 | + | let bd = U(T) | |
430 | + | if ((bd == bd)) | |
431 | + | then { | |
432 | + | let bG = fromBase58String(bF) | |
433 | + | if ((bG == bG)) | |
434 | + | then [StringEntry(M(), bF)] | |
435 | + | else throw("Strict value is not equal to itself.") | |
436 | + | } | |
437 | + | else throw("Strict value is not equal to itself.") | |
438 | + | } | |
439 | + | ||
440 | + | ||
441 | + | ||
442 | + | @Callable(T) | |
443 | + | func confirmManager () = { | |
444 | + | let bH = Q() | |
445 | + | let bI = if (isDefined(bH)) | |
446 | + | then true | |
447 | + | else d("no pending manager") | |
448 | + | if ((bI == bI)) | |
449 | + | then { | |
450 | + | let bJ = if ((T.callerPublicKey == value(bH))) | |
451 | + | then true | |
452 | + | else d("you are not pending manager") | |
453 | + | if ((bJ == bJ)) | |
454 | + | then [StringEntry(L(), toBase58String(value(bH))), DeleteEntry(M())] | |
455 | + | else throw("Strict value is not equal to itself.") | |
456 | + | } | |
457 | + | else throw("Strict value is not equal to itself.") | |
458 | + | } | |
459 | + | ||
460 | + | ||
461 | + | @Verifier(bK) | |
462 | + | func bL () = { | |
463 | + | let bM = { | |
464 | + | let O = N() | |
465 | + | if ($isInstanceOf(O, "ByteVector")) | |
466 | + | then { | |
467 | + | let V = O | |
468 | + | V | |
469 | + | } | |
470 | + | else if ($isInstanceOf(O, "Unit")) | |
471 | + | then bK.senderPublicKey | |
472 | + | else throw("Match error") | |
473 | + | } | |
474 | + | sigVerify(bK.bodyBytes, bK.proofs[0], bM) | |
475 | + | } | |
476 | + |
github/deemru/w8io/169f3d6 68.87 ms ◑