tx · CK4sYcu67kpWrryazaT54bguTXR2LWzHnenFWnhhvLGn

3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP:  -0.01800000 Waves

2023.07.27 13:55 [2684165] smart account 3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP > SELF 0.00000000 Waves

{ "type": 13, "id": "CK4sYcu67kpWrryazaT54bguTXR2LWzHnenFWnhhvLGn", "fee": 1800000, "feeAssetId": null, "timestamp": 1690455309524, "version": 2, "chainId": 84, "sender": "3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP", "senderPublicKey": "AoKo4segKHU4DeJnxXQYJj2u7J6XJeux6r8KLW52cd2Q", "proofs": [ "4CeC9iB1N4yYNpFNwTv7hTAHK5AH2oa97qQ1tSEfT2W5uCHKF3NADucKGstFmEyGxdaJNhdqvYAjYk3UPPYLGo3t" ], "script": "base64:BgIrCAISBQoDCAEIEgMKAQgSBAoCCAQSAwoBCBIDCgEIEgUKAwgBCBIECgIIATAACXNlcGFyYXRvcgICX18ABU1VTFQ4AIDC1y8BB3dyYXBFcnIBA21zZwkAuQkCCQDMCAICGHZvdGluZ192ZXJpZmllZF92Mi5yaWRlOgkAzAgCBQNtc2cFA25pbAIBIAEIdGhyb3dFcnIBA21zZwkAAgEJAQd3cmFwRXJyAQUDbXNnAQVhc0ludAEDdmFsBAckbWF0Y2gwBQN2YWwDCQABAgUHJG1hdGNoMAIDSW50BAZ2YWxJbnQFByRtYXRjaDAFBnZhbEludAkAAgECG0ZhaWxlZCB0byBjYXN0IGludG8gSW50ZWdlcgEQZ2V0SW50ZWdlck9yWmVybwIHYWRkcmVzcwNrZXkJAQt2YWx1ZU9yRWxzZQIJAJoIAgUHYWRkcmVzcwUDa2V5AAABEGdldEludGVnZXJPckZhaWwCB2FkZHJlc3MDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJoIAgUHYWRkcmVzcwUDa2V5CQEHd3JhcEVycgEJAKwCAgUDa2V5Ag8gaXMgbm90IGRlZ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XJkAwUNY2FsbGVyQWRkcmVzcwUHYXNzZXRJZAUFaW5kZXgFA25pbAkBCHRocm93RXJyAQIQbm90aGluZyB0byBjbGFpbQUMcmV3YXJkQWN0aW9uCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJ0eAEGdmVyaWZ5AAQPdGFyZ2V0UHVibGljS2V5BAckbWF0Y2gwCQEWbWFuYWdlclB1YmxpY0tleU9yVW5pdAADCQABAgUHJG1hdGNoMAIKQnl0ZVZlY3RvcgQCcGsFByRtYXRjaDAFAnBrAwkAAQIFByRtYXRjaDACBFVuaXQIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUPdGFyZ2V0UHVibGljS2V53B5nmw==", "height": 2684165, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5jKFfKGXisRRwPZWTzWMaWd65RF2gEkYvZz5ghmjyy2U Next: 8a3BDFGh4g8n8JXpMTA6kD59wusUwGNTwyCMwavRs5Qm Diff:
OldNewDifferences
1-{-# STDLIB_VERSION 7 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "__"
55
6-let b = "calculator.ride"
6+let b = 100000000
77
8-let c = 100000000
9-
10-let d = 1000000
11-
12-let e = "PENDING"
13-
14-let f = "FINISHED"
15-
16-let g = "WAVES"
17-
18-func h (i) = ((b + ": ") + i)
8+func c (d) = makeString(["voting_verified_v2.ride:", d], " ")
199
2010
21-func j (i) = throw(h(i))
11+func e (d) = throw(c(d))
2212
2313
24-func k (l) = {
25- let m = l
26- if ($isInstanceOf(m, "ByteVector"))
14+func f (g) = {
15+ let h = g
16+ if ($isInstanceOf(h, "Int"))
2717 then {
28- let n = m
29- toBase58String(n)
18+ let i = h
19+ i
3020 }
31- else if ($isInstanceOf(m, "Unit"))
32- then g
21+ else throw("Failed to cast into Integer")
22+ }
23+
24+
25+func j (k,l) = valueOrElse(getInteger(k, l), 0)
26+
27+
28+func m (k,l) = valueOrErrorMessage(getInteger(k, l), c((l + " is not defined")))
29+
30+
31+func n (k,l) = valueOrElse(getString(k, l), "")
32+
33+
34+func o (k,l) = valueOrErrorMessage(getString(k, l), c((l + " is not defined")))
35+
36+
37+let p = makeString(["%s", "boostingContract"], a)
38+
39+let q = makeString(["%s", "emissionContract"], a)
40+
41+let r = makeString(["%s", "assetsStoreContract"], a)
42+
43+let s = addressFromStringValue(getStringValue(p))
44+
45+let t = addressFromStringValue(getStringValue(q))
46+
47+let u = addressFromStringValue(getStringValue(r))
48+
49+let v = makeString(["%s", "config"], a)
50+
51+let w = split(o(t, v), a)[1]
52+
53+let x = fromBase58String(w)
54+
55+let y = makeString(["%s%s", "votingThreshold", "add"], a)
56+
57+let z = makeString(["%s%s", "votingThreshold", "remove"], a)
58+
59+let A = makeString(["%s", "periodLengthRemove"], a)
60+
61+let B = makeString(["%s", "maxPeriodLength"], a)
62+
63+let C = makeString(["%s", "minPeriodLength"], a)
64+
65+func D (E,F) = makeString(["%s%s%d", "votingRewardAssetId", E, toString(F)], a)
66+
67+
68+func G (H,E,F) = makeString(["%s%s%s%d", "votingReward", toString(H), E, toString(F)], a)
69+
70+
71+func I (E,F) = makeString(["%s%s%d", "totalVotingReward", E, toString(F)], a)
72+
73+
74+let J = makeString(["%s", "finalizeCallRewardAmount"], a)
75+
76+let K = makeString(["%s", "minSuggestRemoveBalance"], a)
77+
78+func L (E) = makeString(["%s%s", "currentIndex", E], a)
79+
80+
81+func M (E,F,N) = makeString(["%s%s%d%s", "vote", E, toString(F), toString(N)], a)
82+
83+
84+func O (P,Q) = makeString(["%s%d", toString(P), toString(Q)], a)
85+
86+
87+func R (E,F) = makeString(["%s%s%d", "suggestIssuer", E, toString(F)], a)
88+
89+
90+func S (H,E,F) = makeString(["%s%s%s%d", "history", toString(H), E, toString(F)], a)
91+
92+
93+let T = makeString(["%s", "feePerBlock"], a)
94+
95+let U = m(this, T)
96+
97+let V = makeString(["%s", "wxMinForSuggestAddAmountRequired"], a)
98+
99+let W = makeString(["%s", "wxForSuggestRemoveAmountRequired"], a)
100+
101+func X (E,F) = makeString(["%s%s%d", "votingInfo", E, toString(F)], a)
102+
103+
104+func Y (Z,aa,ab,ac,ad,ae,af,ag,ah,ai) = makeString(["%s%s%d%s%s%d%d%d%d%d", toString(Z), aa, toString(ab), ac, ad, toString(ae), toString(af), toString(ag), toString(ah), toString(ai)], a)
105+
106+
107+func aj (E) = makeString(["%s%s", "assetImage", E], a)
108+
109+
110+func ak (H,al) = {
111+ let Q = invoke(s, "getUserGwxAmountAtHeightREADONLY", [H, al], nil)
112+ f(Q)
113+ }
114+
115+
116+func am () = "%s__managerVaultAddress"
117+
118+
119+func an () = "%s__managerPublicKey"
120+
121+
122+func ao () = {
123+ let h = getString(am())
124+ if ($isInstanceOf(h, "String"))
125+ then {
126+ let ap = h
127+ addressFromStringValue(ap)
128+ }
129+ else this
130+ }
131+
132+
133+func aq () = {
134+ let ar = ao()
135+ let h = getString(ar, an())
136+ if ($isInstanceOf(h, "String"))
137+ then {
138+ let ap = h
139+ fromBase58String(ap)
140+ }
141+ else if ($isInstanceOf(h, "Unit"))
142+ then unit
33143 else throw("Match error")
34144 }
35145
36146
37-func o (p) = if ((0 > p))
38- then -(p)
39- else p
40-
41-
42-func q () = makeString(["%s", "factory"], a)
43-
44-
45-func r () = makeString(["%s", "lpAssetId"], a)
46-
47-
48-func s () = makeString(["%s", "xtnAssetId"], a)
49-
50-
51-func t () = makeString(["%s", "treasury"], a)
52-
53-
54-func u (l) = makeString(["%s%s", "invested", k(l)], a)
55-
56-
57-func v (w) = makeString(["%s%s", "available", toString(w)], a)
58-
59-
60-func x (w) = makeString(["%s%s", "claimed", toString(w)], a)
61-
62-
63-func y () = makeString(["%s", "currentPeriod"], a)
64-
65-
66-func z (A) = makeString(["%s%d", "price", toString(A)], a)
67-
68-
69-func B (A) = makeString(["%s%d", "startHeight", toString(A)], a)
70-
71-
72-func C () = "%s__periodLength"
73-
74-
75-func D () = "%s__blockProcessingReward"
76-
77-
78-func E () = "%s__nextBlockToProcess"
79-
80-
81-func F (G) = makeString(["%s%d", "blockProcessed", toString(G)], a)
82-
83-
84-func H () = "%s__withdrawal"
85-
86-
87-func I (w,J) = makeString(["%s%s%s", "withdrawal", toString(w), toBase58String(J)], a)
88-
89-
90-func K (L,M,N,O) = {
91- let P = {
92- let m = O
93- if ($isInstanceOf(m, "ByteVector"))
94- then {
95- let n = m
96- toBase58String(n)
97- }
98- else if ($isInstanceOf(m, "Unit"))
99- then "SOON"
100- else throw("Match error")
101- }
102- makeString(["%s%d%d%s", L, toString(M), toString(N), P], a)
147+func as (at) = {
148+ let au = split(at, a)
149+ let av = au[1]
150+ let Z = if ((av == "true"))
151+ then true
152+ else false
153+ let aa = au[2]
154+ let ab = parseIntValue(au[3])
155+ let ac = au[4]
156+ let ad = au[5]
157+ let ae = parseIntValue(au[6])
158+ let af = parseIntValue(au[7])
159+ let ag = parseIntValue(au[8])
160+ let ah = parseIntValue(au[9])
161+ let ai = parseIntValue(au[10])
162+ $Tuple10(Z, aa, ab, ac, ad, ae, af, ag, ah, ai)
103163 }
104164
105165
106-func Q (i) = {
107- let R = split(i, a)
108- if ((size(R) == 5))
109- then {
110- let L = R[1]
111- let M = valueOrErrorMessage(parseInt(R[2]), h("invalid lpAssetAmount"))
112- let N = valueOrErrorMessage(parseInt(R[3]), h("invalid targetPeriod"))
113- let O = R[4]
114- $Tuple4(L, M, N, O)
115- }
116- else j("invalid withdrawal request value")
166+func aw (E,ax) = {
167+ let at = valueOrErrorMessage(getString(X(E, ax)), c("voting info not found"))
168+ let ay = split(at, a)
169+ let ad = ay[5]
170+ let af = valueOrErrorMessage(parseIntValue(ay[7]), c("voting start height not found"))
171+ let az = valueOrErrorMessage(getString(R(E, ax)), c("voting issuer not found"))
172+ let aA = [if ((ad == "inProgress"))
173+ then true
174+ else e("no voting in progress"), if ((af > height))
175+ then true
176+ else e("voting expired")]
177+ if ((aA == aA))
178+ then $Tuple3(ad, af, az)
179+ else throw("Strict value is not equal to itself.")
117180 }
118181
119182
120-let S = {
121- let m = getString(this, q())
122- if ($isInstanceOf(m, "String"))
123- then {
124- let i = m
125- addressFromString(i)
126- }
127- else if ($isInstanceOf(m, "Unit"))
128- then unit
129- else throw("Match error")
130- }
131-
132-let T = valueOrErrorMessage(S, h("invalid factory address"))
133-
134-let U = {
135- let m = S
136- if ($isInstanceOf(m, "Address"))
137- then {
138- let V = m
139- let W = getString(V, r())
140- if ($isInstanceOf(W, "String"))
141- then {
142- let i = W
143- fromBase58String(i)
144- }
145- else if ($isInstanceOf(W, "Unit"))
146- then unit
147- else throw("Match error")
148- }
149- else if ($isInstanceOf(m, "Unit"))
150- then unit
151- else throw("Match error")
152- }
153-
154-let X = valueOrErrorMessage(U, h("invalid lpAssetId"))
155-
156-let Y = {
157- let m = S
158- if ($isInstanceOf(m, "Address"))
159- then {
160- let V = m
161- let W = getString(V, s())
162- if ($isInstanceOf(W, "String"))
163- then {
164- let i = W
165- fromBase58String(i)
166- }
167- else if ($isInstanceOf(W, "Unit"))
168- then unit
169- else throw("Match error")
170- }
171- else if ($isInstanceOf(m, "Unit"))
172- then unit
173- else throw("Match error")
174- }
175-
176-let Z = valueOrErrorMessage(Y, h("invalid xtnAssetId"))
177-
178-let aa = {
179- let m = S
180- if ($isInstanceOf(m, "Address"))
181- then {
182- let V = m
183- let W = getString(V, t())
184- if ($isInstanceOf(W, "String"))
185- then {
186- let i = W
187- addressFromString(i)
188- }
189- else if ($isInstanceOf(W, "Unit"))
190- then unit
191- else throw("Match error")
192- }
193- else if ($isInstanceOf(m, "Unit"))
194- then unit
195- else throw("Match error")
196- }
197-
198-let ab = valueOrErrorMessage(aa, h("invalid treasury address"))
199-
200-func ac (ad,ae) = if ((ad.caller == ae))
201- then true
202- else j("permission denied")
203-
204-
205-func af (ad) = ac(ad, T)
206-
207-
208-func ag (ah,ai) = {
209- let i = size(ah)
210- let aj = ah[0]
211- let ak = aj._1
212- let al = aj._2
213- let am = ah[1]
214- let an = am._1
215- let ao = am._2
216- let ap = ah[2]
217- let aq = ap._1
218- let ar = ap._2
219- if (if ((i > 0))
220- then (ak == ai)
221- else false)
222- then al
223- else if (if ((i > 1))
224- then (an == ai)
225- else false)
226- then ao
227- else if (if ((i > 2))
228- then (aq == ai)
229- else false)
230- then ar
231- else unit
183+func aB (aC,E,F) = {
184+ let aD = M(E, F, aC)
185+ let aE = valueOrErrorMessage(getString(aD), c("you have not voted"))
186+ let aF = split(aE, a)
187+ let Q = parseIntValue(aF[2])
188+ let aG = valueOrErrorMessage(getString(X(E, F)), c("voting info not found"))
189+ let aH = as(aG)
190+ let ah = aH._9
191+ let ai = aH._10
192+ let aI = fraction(Q, b, (ah + ai))
193+ let aJ = valueOrElse(getInteger(I(E, F)), 0)
194+ let aK = fraction(aI, aJ, b, FLOOR)
195+ aK
232196 }
233197
234198
235-@Callable(ad)
236-func claimLP (as) = {
237- let at = af(ad)
238- if ((at == at))
199+@Callable(aL)
200+func suggestAdd (E,aM,aN) = {
201+ let aO = aL.payments[0]
202+ let aP = value(aO.assetId)
203+ let aQ = value(aO.amount)
204+ let aR = getIntegerValue(C)
205+ let aS = getIntegerValue(B)
206+ let aT = {
207+ let aU = invoke(u, "isVerifiedREADONLY", [E], nil)
208+ if ($isInstanceOf(aU, "Boolean"))
209+ then aU
210+ else throw(($getType(aU) + " couldn't be cast to Boolean"))
211+ }
212+ let aA = [if (if ((aM >= aR))
213+ then (aS >= aM)
214+ else false)
215+ then true
216+ else e("invalid periodLength"), if ((aT == false))
217+ then true
218+ else e("token already verified"), if ((aQ > (aM * U)))
219+ then true
220+ else e("not enough wx for given period"), if ((aQ >= getIntegerValue(V)))
221+ then true
222+ else e("payment less then min for suggest")]
223+ if ((aA == aA))
239224 then {
240- let w = Address(as)
241- let au = valueOrElse(getInteger(T, v(w)), 0)
242- let av = valueOrElse(getInteger(T, x(w)), 0)
243- let aw = if ((au > 0))
244- then [invoke(T, "transferAsset", [as, au, X], nil), invoke(T, "integerEntry", [v(w), 0], nil), invoke(T, "integerEntry", [x(w), (av + au)], nil)]
245- else j("nothing to claim")
246- $Tuple2(nil, aw)
225+ let aV = L(E)
226+ let ax = getInteger(aV)
227+ let aW = if (isDefined(ax))
228+ then (value(ax) + 1)
229+ else 0
230+ let aX = if ((size(aL.payments) > 1))
231+ then {
232+ let aY = aL.payments[1]
233+ let aZ = toBase58String(value(aY.assetId))
234+ let ba = value(aY.amount)
235+ $Tuple4(true, aZ, ba, [StringEntry(D(E, aW), aZ), IntegerEntry(I(E, aW), ba)])
236+ }
237+ else $Tuple4(false, "EMPTY", 0, nil)
238+ let Z = aX._1
239+ let aa = aX._2
240+ let ab = aX._3
241+ let bb = aX._4
242+ let ag = valueOrErrorMessage(getInteger(y), c("votingThresholdAdd not set"))
243+ let at = Y(Z, aa, ab, "verification", "inProgress", height, (height + aM), ag, 0, 0)
244+ let bc = getIntegerValue(J)
245+ let bd = (aQ - bc)
246+ ([IntegerEntry(aV, aW), StringEntry(R(E, aW), toString(aL.caller)), StringEntry(X(E, aW), at), StringEntry(aj(E), aN), Burn(aP, bd)] ++ bb)
247247 }
248248 else throw("Strict value is not equal to itself.")
249249 }
250250
251251
252252
253-@Callable(ad)
254-func finalize (as,ax,ay,az,aA) = {
255- let at = af(ad)
253+@Callable(aL)
254+func suggestRemove (E) = {
255+ let be = ak(toString(aL.caller), height)
256+ let bf = getIntegerValue(K)
257+ let aO = aL.payments[0]
258+ let aP = value(aO.assetId)
259+ let aQ = value(aO.amount)
260+ let aT = {
261+ let aU = invoke(u, "isVerifiedREADONLY", [E], nil)
262+ if ($isInstanceOf(aU, "Boolean"))
263+ then aU
264+ else throw(($getType(aU) + " couldn't be cast to Boolean"))
265+ }
266+ let aA = [if (aT)
267+ then true
268+ else e("token not verified"), if ((be >= bf))
269+ then true
270+ else e("not enough gWXes"), if ((aQ >= getIntegerValue(W)))
271+ then true
272+ else e("payment less then min for suggest")]
273+ if ((aA == aA))
274+ then {
275+ let aV = L(E)
276+ let ax = getInteger(aV)
277+ let aW = if (isDefined(ax))
278+ then (value(ax) + 1)
279+ else 0
280+ let aM = valueOrErrorMessage(getInteger(A), c("periodLengthRemove not set"))
281+ let af = (height + aM)
282+ let ag = valueOrErrorMessage(getInteger(z), c("votingThresholdRemove not set"))
283+ let at = Y(false, "EMPTY", 0, "deverification", "inProgress", height, (height + aM), ag, 0, 0)
284+[IntegerEntry(aV, aW), StringEntry(R(E, aW), toString(aL.caller)), StringEntry(X(E, aW), at)]
285+ }
286+ else throw("Strict value is not equal to itself.")
287+ }
288+
289+
290+
291+@Callable(aL)
292+func vote (E,P) = {
293+ let aV = L(E)
294+ let ax = valueOrErrorMessage(getInteger(aV), c("voting does not exist"))
295+ let at = aw(E, ax)
256296 if ((at == at))
257297 then {
258- let aB = valueOrErrorMessage(getInteger(T, y()), h("invalid period"))
259- let aC = valueOrErrorMessage(getInteger(T, C()), h("invalid period length"))
260- let aD = valueOrErrorMessage(getInteger(T, B(aB)), h("invalid start height"))
261- let aE = valueOrErrorMessage(getInteger(T, z(aB)), h("invalid price"))
262- let aF = valueOrErrorMessage(getInteger(T, E()), h("invalid next block to process"))
263- let aG = ((aD + aC) - 1)
264- let aH = [if ((ad.originCaller == ab))
298+ let bg = at._2
299+ let bh = ak(toString(aL.caller), bg)
300+ let aD = M(E, ax, aL.caller)
301+ let aA = [if ((getString(aD) == unit))
265302 then true
266- else j("permission denied"), if ((aF > aG))
303+ else e("You have already voted"), if ((bh > 0))
267304 then true
268- else j("unprocessed blocks"), if ((ax >= 0))
269- then true
270- else j("invalid new treasury volume"), if ((ay >= 0))
271- then true
272- else j("invalid XTN price"), if (if ((az >= 0))
273- then (c >= az)
274- else false)
275- then true
276- else j("invalid PWR managers bonus"), if (if ((aA >= -(c)))
277- then (c >= aA)
278- else false)
279- then true
280- else j("invalid treasury volume diff allocation coefficient")]
281- if ((aH == aH))
305+ else throw("You'll not have gWX at the end of voting")]
306+ if ((aA == aA))
282307 then {
283- let aI = valueOrElse(getInteger(T, u(Z)), 0)
284- let aJ = valueOrElse(getInteger(T, u(unit)), 0)
285- let aK = fraction(aI, ay, d)
286- let aL = (aK + aJ)
287- let aM = (ax - aL)
288- let aN = if ((aM > 0))
289- then fraction(aM, az, c)
290- else 0
291- let aO = (aM - aN)
292- let aP = if ((aL > 0))
293- then fraction(aK, c, aL)
294- else 0
295- let aQ = fraction(aO, aP, c)
296- let aR = (aO - aQ)
297- let aS = o(aA)
298- let aT = fraction(aR, if ((0 > aA))
299- then aS
300- else 0, c)
301- let aU = fraction(aQ, if ((aA > 0))
302- then aS
303- else 0, c)
304- let aV = ((aQ - aU) + aT)
305- let aW = ((aR - aT) + aU)
306- let aX = (aJ + aW)
307- let aY = fraction((aK + aV), d, ay)
308- let aZ = (aB + 1)
309- let ba = valueOrErrorMessage(assetInfo(X), h("invalid lpAsset info")).quantity
310- let bb = fraction(aX, c, ba)
311- let bc = valueOrElse(getInteger(T, H()), 0)
312- let bd = max([0, fraction(bc, bb, c)])
313- let be = if ((size(ad.payments) > 0))
314- then ad.payments[0]
315- else unit
316- let bf = value(be).amount
317- let bg = value(be).assetId
318- let bh = if (if ((bd == 0))
319- then true
320- else if (if ((be != unit))
321- then (bg == unit)
322- else false)
323- then (bf >= bd)
324- else false)
325- then true
326- else j(("invalid payments, payment amount min: " + toString(bd)))
327- if ((bh == bh))
328- then {
329- let bi = if ((be != unit))
330- then [ScriptTransfer(T, bf, bg)]
331- else nil
332- let aw = [invoke(T, "integerEntry", [y(), aZ], nil), invoke(T, "integerEntry", [z(aZ), bb], nil), invoke(T, "integerEntry", [B(aZ), (aG + 1)], nil), invoke(T, "burn", [bc], nil), invoke(T, "integerEntry", [H(), 0], nil)]
333- $Tuple2(bi, aw)
334- }
335- else throw("Strict value is not equal to itself.")
308+ let aG = valueOrErrorMessage(getString(X(E, ax)), c("voting info not found"))
309+ let au = as(aG)
310+ let ah = au._9
311+ let ai = au._10
312+ let bi = if (P)
313+ then $Tuple2((ah + bh), ai)
314+ else $Tuple2(ah, (ai + bh))
315+ let bj = bi._1
316+ let bk = bi._2
317+ let bl = Y(au._1, au._2, au._3, au._4, au._5, au._6, au._7, au._8, bj, bk)
318+ let bm = {
319+ let h = getString(D(E, ax))
320+ if ($isInstanceOf(h, "String"))
321+ then {
322+ let bn = h
323+[StringEntry(G(aL.caller, E, ax), O(P, bh))]
324+ }
325+ else if ($isInstanceOf(h, "Unit"))
326+ then nil
327+ else throw("Match error")
328+ }
329+ ([StringEntry(aD, O(P, bh)), StringEntry(X(E, ax), bl)] ++ bm)
336330 }
337331 else throw("Strict value is not equal to itself.")
338332 }
341335
342336
343337
344-@Callable(ad)
345-func invest (as) = {
346- let at = af(ad)
338+@Callable(aL)
339+func cancelVote (E) = {
340+ let aV = L(E)
341+ let ax = valueOrErrorMessage(getInteger(aV), c("voting does not exist"))
342+ let aD = M(E, ax, aL.caller)
343+ let aE = valueOrErrorMessage(getString(aD), c("you have not voted"))
344+ let aF = split(aE, a)
345+ let P = aF[1]
346+ let Q = parseIntValue(aF[2])
347+ let at = aw(E, ax)
347348 if ((at == at))
348349 then {
349- let w = Address(as)
350- let aB = valueOrErrorMessage(getInteger(T, y()), h("invalid period"))
351- let aE = valueOrErrorMessage(getInteger(T, z(aB)), h("invalid price"))
352- let bj = if ((size(ad.payments) == 1))
353- then ad.payments[0]
354- else j("invalid payments")
355- let bk = if (if ((bj.assetId == unit))
356- then (bj.amount > 0)
357- else false)
358- then $Tuple2(bj.amount, bj.assetId)
359- else j("invalid payment amount")
360- let bf = bk._1
361- let bg = bk._2
362- let M = if ((aE > 0))
363- then fraction(bf, c, aE)
364- else 0
365- let bl = valueOrElse(getInteger(T, u(unit)), 0)
366- let bi = [ScriptTransfer(ab, bf, bg)]
367- let aw = [invoke(T, "integerEntry", [u(unit), (bl + bf)], nil), invoke(T, "reissue", [M], nil), invoke(T, "transferAsset", [as, M, X], nil)]
368- $Tuple2(bi, aw)
369- }
370- else throw("Strict value is not equal to itself.")
371- }
372-
373-
374-
375-@Callable(ad)
376-func withdraw (as) = {
377- let at = af(ad)
378- if ((at == at))
379- then {
380- let w = Address(as)
381- let aB = valueOrErrorMessage(getInteger(T, y()), h("invalid period"))
382- let bj = if ((size(ad.payments) == 1))
383- then ad.payments[0]
384- else j(h("invalid payments"))
385- let bg = if ((bj.assetId == X))
386- then X
387- else j("invalid payment asset")
388- let bf = if ((bj.amount > 0))
389- then bj.amount
390- else j("invalid payment amount")
391- let bm = valueOrElse(getInteger(T, H()), 0)
392- let bi = [ScriptTransfer(T, bf, bg)]
393- let aw = [invoke(T, "integerEntry", [H(), (bm + bf)], nil), invoke(T, "stringEntry", [I(w, ad.transactionId), K(e, bf, (aB + 1), unit)], nil)]
394- if ((aw == aw))
395- then $Tuple2(bi, aw)
396- else throw("Strict value is not equal to itself.")
397- }
398- else throw("Strict value is not equal to itself.")
399- }
400-
401-
402-
403-@Callable(ad)
404-func cancelWithdraw (as,J) = {
405- let at = af(ad)
406- if ((at == at))
407- then {
408- let w = Address(as)
409- let bn = valueOrErrorMessage(getString(T, I(w, J)), h("invalid withdrawal request"))
410- let aB = valueOrErrorMessage(getInteger(T, y()), h("invalid period"))
411- let bo = Q(bn)
412- let L = bo._1
413- let M = bo._2
414- let N = bo._3
415- let O = bo._4
416- let aH = [if ((L == e))
350+ let aA = [if (if ((P == "true"))
417351 then true
418- else j("invalid withdrawal request status"), if ((N > aB))
352+ else (P == "false"))
419353 then true
420- else j("invalid withdrawal request period")]
421- if ((aH == aH))
354+ else e("invalid vote")]
355+ if ((aA == aA))
422356 then {
423- let bm = valueOrErrorMessage(getInteger(T, H()), h("invalid total withdrawal amount"))
424- let aw = [invoke(T, "integerEntry", [H(), if ((bm >= M))
425- then (bm - M)
426- else j("invalid withdrawal amount")], nil), invoke(T, "deleteEntry", [I(w, J)], nil), invoke(T, "transferAsset", [as, M, X], nil)]
427- if ((aw == aw))
428- then $Tuple2(nil, aw)
429- else throw("Strict value is not equal to itself.")
357+ let aG = valueOrErrorMessage(getString(X(E, ax)), c("voting info not found"))
358+ let au = as(aG)
359+ let ah = au._9
360+ let ai = au._10
361+ let bo = if ((P == "true"))
362+ then $Tuple2((ah - Q), ai)
363+ else $Tuple2(ah, (ai - Q))
364+ let bj = bo._1
365+ let bk = bo._2
366+ let bl = Y(au._1, au._2, au._3, au._4, au._5, au._6, au._7, au._8, bj, bk)
367+[StringEntry(X(E, ax), bl), DeleteEntry(aD), DeleteEntry(G(aL.caller, E, ax))]
430368 }
431369 else throw("Strict value is not equal to itself.")
432370 }
435373
436374
437375
438-@Callable(ad)
439-func claimWaves (as,J) = {
440- let at = af(ad)
441- if ((at == at))
376+@Callable(aL)
377+func finalize (E) = {
378+ let aV = L(E)
379+ let ax = valueOrElse(getInteger(aV), 0)
380+ let bp = valueOrErrorMessage(getInteger(y), c("votingThresholdAdd not set"))
381+ let bq = valueOrErrorMessage(getInteger(z), c("votingThresholdRemove not set"))
382+ let aG = valueOrErrorMessage(getString(X(E, ax)), c("voting info not found"))
383+ let au = as(aG)
384+ let ac = au._4
385+ let ad = au._5
386+ let af = au._7
387+ let br = au._8
388+ let ah = au._9
389+ let ai = au._10
390+ let aA = [if ((ad == "inProgress"))
391+ then true
392+ else e("voting not in progress"), if ((height >= af))
393+ then true
394+ else e("voting not finished"), if (isDefined(getString(aj(E))))
395+ then true
396+ else e("asset image not set")]
397+ if ((aA == aA))
442398 then {
443- let w = Address(as)
444- let aB = valueOrErrorMessage(getInteger(T, y()), h("invalid period"))
445- let bn = valueOrErrorMessage(getString(T, I(w, J)), h("invalid withdrawal request"))
446- let bp = Q(bn)
447- let L = bp._1
448- let M = bp._2
449- let N = bp._3
450- let O = bp._4
451- if ((L == f))
452- then j("invalid withdrawal request status")
453- else if ((N > aB))
454- then j("invalid withdrawal request period")
455- else {
456- let bq = valueOrErrorMessage(getInteger(T, z(N)), h("invalid price"))
457- let br = if ((bq > 0))
458- then fraction(M, bq, c)
459- else 0
460- let aw = [invoke(T, "stringEntry", [I(w, J), K(f, M, N, ad.transactionId)], nil), invoke(T, "burn", [M], nil), invoke(T, "transferWaves", [as, br], nil)]
461- $Tuple2(nil, aw)
462- }
463- }
464- else throw("Strict value is not equal to itself.")
465- }
466-
467-
468-
469-@Callable(ad)
470-func processBlocks (as) = {
471- let at = af(ad)
472- if ((at == at))
473- then {
474- let w = Address(as)
475- let aB = valueOrErrorMessage(getInteger(T, y()), h("invalid period"))
476- let aC = valueOrErrorMessage(getInteger(T, C()), h("invalid period length"))
477- let aD = valueOrErrorMessage(getInteger(T, B(aB)), h("invalid start height"))
478- let aE = valueOrErrorMessage(getInteger(T, z(aB)), h("invalid price"))
479- let aF = valueOrErrorMessage(getInteger(T, E()), h("invalid next block to process"))
480- let aG = ((aD + aC) - 1)
481- let bs = 40
482- let bt = if (if (if ((height >= aF))
483- then if ((aF >= aD))
484- then true
485- else (aB == 0)
399+ let bs = if (if (((ah + ai) >= br))
400+ then (ah > ai)
486401 else false)
487- then (aG >= aF)
488- else false)
489- then min([((aG - aF) + 1), bs])
490- else j(h("invalid target block"))
491- let bu = valueOrErrorMessage(getInteger(T, D()), h("invalid block processing reward"))
492- let bv = (bu / bt)
493- let bw = (bu - (bv * bt))
494- func bx (by,bz) = if ((bz >= bt))
495- then by
496- else {
497- let bA = (aF + bz)
498- let bB = valueOrErrorMessage(blockInfoByHeight(bA), h("invalid block info"))
499- let bC = valueOrErrorMessage(ag(bB.rewards, ab), h(("invalid treasury reward for height " + toString(bA))))
500- let bD = bB.generator
501- let au = valueOrElse(getInteger(T, v(bD)), 0)
502- let bE = if ((bz == (bt - 1)))
503- then (bv + bw)
504- else bv
505- let M = if ((aE > 0))
506- then fraction((bC - bE), c, aE)
507- else 0
508- let bF = [invoke(T, "stringEntry", [F(bA), makeString([toBase58String(ad.transactionId), toString(aB), toString(bD), toBase58String(as), toString(bC), toString(bE), toString(M)], a)], nil), invoke(T, "integerEntry", [v(bD), (au + M)], nil)]
509- if ((bF == bF))
510- then (by + M)
511- else throw("Strict value is not equal to itself.")
402+ then true
403+ else false
404+ let bt = if (bs)
405+ then "accepted"
406+ else "rejected"
407+ let aN = getStringValue(aj(E))
408+ let bu = if (bs)
409+ then {
410+ let bv = if ((ac == "verification"))
411+ then invoke(u, "createOrUpdate", [E, aN, true], nil)
412+ else invoke(u, "setVerified", [E, false], nil)
413+ bv
512414 }
513-
514- let bG = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39]
515- let bH = {
516- let bI = bG
517- let bJ = size(bI)
518- let bK = 0
519- func bL (bM,bN) = if ((bN >= bJ))
520- then bM
521- else bx(bM, bI[bN])
522-
523- func bO (bM,bN) = if ((bN >= bJ))
524- then bM
525- else throw("List size exceeds 40")
526-
527- bO(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bK, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40)
528- }
529- if ((bH == bH))
415+ else nil
416+ if ((bu == bu))
530417 then {
531- let bi = [invoke(T, "transferWaves", [as, bu], nil), invoke(T, "reissue", [bH], nil), invoke(T, "integerEntry", [E(), (aF + bt)], nil)]
532- if ((bi == bi))
533- then $Tuple2(nil, unit)
534- else throw("Strict value is not equal to itself.")
418+ let bl = Y(au._1, au._2, au._3, au._4, bt, au._6, au._7, au._8, au._9, au._10)
419+ let bc = getIntegerValue(J)
420+[StringEntry(X(E, ax), bl), ScriptTransfer(aL.caller, bc, x)]
535421 }
536422 else throw("Strict value is not equal to itself.")
537423 }
539425 }
540426
541427
542-@Verifier(bP)
543-func bQ () = sigVerify(bP.bodyBytes, bP.proofs[0], bP.senderPublicKey)
428+
429+@Callable(aL)
430+func claimREADONLY (E,F,bw) = {
431+ let H = valueOrErrorMessage(addressFromString(bw), c("invalid address"))
432+ let bx = getString(D(E, F))
433+ let ab = if (isDefined(bx))
434+ then aB(H, E, F)
435+ else 0
436+ $Tuple2(nil, ab)
437+ }
438+
439+
440+
441+@Callable(aL)
442+func claim (E,F) = {
443+ let by = aL.caller
444+ let bz = S(by, E, F)
445+ let bA = getInteger(bz)
446+ let aA = [if ((bA == unit))
447+ then true
448+ else e("already claimed")]
449+ if ((aA == aA))
450+ then {
451+ let ab = if ((aB(by, E, F) > 0))
452+ then aB(by, E, F)
453+ else e("nothing to claim")
454+ let bx = getString(D(E, F))
455+ let bB = if (isDefined(bx))
456+ then {
457+ let bC = fromBase58String(value(bx))
458+[ScriptTransfer(by, ab, bC), IntegerEntry(bz, ab), DeleteEntry(G(by, E, F))]
459+ }
460+ else e("nothing to claim")
461+ bB
462+ }
463+ else throw("Strict value is not equal to itself.")
464+ }
465+
466+
467+@Verifier(bD)
468+func bE () = {
469+ let bF = {
470+ let h = aq()
471+ if ($isInstanceOf(h, "ByteVector"))
472+ then {
473+ let bn = h
474+ bn
475+ }
476+ else if ($isInstanceOf(h, "Unit"))
477+ then bD.senderPublicKey
478+ else throw("Match error")
479+ }
480+ sigVerify(bD.bodyBytes, bD.proofs[0], bF)
481+ }
544482
Full:
OldNewDifferences
1-{-# STDLIB_VERSION 7 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "__"
55
6-let b = "calculator.ride"
6+let b = 100000000
77
8-let c = 100000000
9-
10-let d = 1000000
11-
12-let e = "PENDING"
13-
14-let f = "FINISHED"
15-
16-let g = "WAVES"
17-
18-func h (i) = ((b + ": ") + i)
8+func c (d) = makeString(["voting_verified_v2.ride:", d], " ")
199
2010
21-func j (i) = throw(h(i))
11+func e (d) = throw(c(d))
2212
2313
24-func k (l) = {
25- let m = l
26- if ($isInstanceOf(m, "ByteVector"))
14+func f (g) = {
15+ let h = g
16+ if ($isInstanceOf(h, "Int"))
2717 then {
28- let n = m
29- toBase58String(n)
18+ let i = h
19+ i
3020 }
31- else if ($isInstanceOf(m, "Unit"))
32- then g
21+ else throw("Failed to cast into Integer")
22+ }
23+
24+
25+func j (k,l) = valueOrElse(getInteger(k, l), 0)
26+
27+
28+func m (k,l) = valueOrErrorMessage(getInteger(k, l), c((l + " is not defined")))
29+
30+
31+func n (k,l) = valueOrElse(getString(k, l), "")
32+
33+
34+func o (k,l) = valueOrErrorMessage(getString(k, l), c((l + " is not defined")))
35+
36+
37+let p = makeString(["%s", "boostingContract"], a)
38+
39+let q = makeString(["%s", "emissionContract"], a)
40+
41+let r = makeString(["%s", "assetsStoreContract"], a)
42+
43+let s = addressFromStringValue(getStringValue(p))
44+
45+let t = addressFromStringValue(getStringValue(q))
46+
47+let u = addressFromStringValue(getStringValue(r))
48+
49+let v = makeString(["%s", "config"], a)
50+
51+let w = split(o(t, v), a)[1]
52+
53+let x = fromBase58String(w)
54+
55+let y = makeString(["%s%s", "votingThreshold", "add"], a)
56+
57+let z = makeString(["%s%s", "votingThreshold", "remove"], a)
58+
59+let A = makeString(["%s", "periodLengthRemove"], a)
60+
61+let B = makeString(["%s", "maxPeriodLength"], a)
62+
63+let C = makeString(["%s", "minPeriodLength"], a)
64+
65+func D (E,F) = makeString(["%s%s%d", "votingRewardAssetId", E, toString(F)], a)
66+
67+
68+func G (H,E,F) = makeString(["%s%s%s%d", "votingReward", toString(H), E, toString(F)], a)
69+
70+
71+func I (E,F) = makeString(["%s%s%d", "totalVotingReward", E, toString(F)], a)
72+
73+
74+let J = makeString(["%s", "finalizeCallRewardAmount"], a)
75+
76+let K = makeString(["%s", "minSuggestRemoveBalance"], a)
77+
78+func L (E) = makeString(["%s%s", "currentIndex", E], a)
79+
80+
81+func M (E,F,N) = makeString(["%s%s%d%s", "vote", E, toString(F), toString(N)], a)
82+
83+
84+func O (P,Q) = makeString(["%s%d", toString(P), toString(Q)], a)
85+
86+
87+func R (E,F) = makeString(["%s%s%d", "suggestIssuer", E, toString(F)], a)
88+
89+
90+func S (H,E,F) = makeString(["%s%s%s%d", "history", toString(H), E, toString(F)], a)
91+
92+
93+let T = makeString(["%s", "feePerBlock"], a)
94+
95+let U = m(this, T)
96+
97+let V = makeString(["%s", "wxMinForSuggestAddAmountRequired"], a)
98+
99+let W = makeString(["%s", "wxForSuggestRemoveAmountRequired"], a)
100+
101+func X (E,F) = makeString(["%s%s%d", "votingInfo", E, toString(F)], a)
102+
103+
104+func Y (Z,aa,ab,ac,ad,ae,af,ag,ah,ai) = makeString(["%s%s%d%s%s%d%d%d%d%d", toString(Z), aa, toString(ab), ac, ad, toString(ae), toString(af), toString(ag), toString(ah), toString(ai)], a)
105+
106+
107+func aj (E) = makeString(["%s%s", "assetImage", E], a)
108+
109+
110+func ak (H,al) = {
111+ let Q = invoke(s, "getUserGwxAmountAtHeightREADONLY", [H, al], nil)
112+ f(Q)
113+ }
114+
115+
116+func am () = "%s__managerVaultAddress"
117+
118+
119+func an () = "%s__managerPublicKey"
120+
121+
122+func ao () = {
123+ let h = getString(am())
124+ if ($isInstanceOf(h, "String"))
125+ then {
126+ let ap = h
127+ addressFromStringValue(ap)
128+ }
129+ else this
130+ }
131+
132+
133+func aq () = {
134+ let ar = ao()
135+ let h = getString(ar, an())
136+ if ($isInstanceOf(h, "String"))
137+ then {
138+ let ap = h
139+ fromBase58String(ap)
140+ }
141+ else if ($isInstanceOf(h, "Unit"))
142+ then unit
33143 else throw("Match error")
34144 }
35145
36146
37-func o (p) = if ((0 > p))
38- then -(p)
39- else p
40-
41-
42-func q () = makeString(["%s", "factory"], a)
43-
44-
45-func r () = makeString(["%s", "lpAssetId"], a)
46-
47-
48-func s () = makeString(["%s", "xtnAssetId"], a)
49-
50-
51-func t () = makeString(["%s", "treasury"], a)
52-
53-
54-func u (l) = makeString(["%s%s", "invested", k(l)], a)
55-
56-
57-func v (w) = makeString(["%s%s", "available", toString(w)], a)
58-
59-
60-func x (w) = makeString(["%s%s", "claimed", toString(w)], a)
61-
62-
63-func y () = makeString(["%s", "currentPeriod"], a)
64-
65-
66-func z (A) = makeString(["%s%d", "price", toString(A)], a)
67-
68-
69-func B (A) = makeString(["%s%d", "startHeight", toString(A)], a)
70-
71-
72-func C () = "%s__periodLength"
73-
74-
75-func D () = "%s__blockProcessingReward"
76-
77-
78-func E () = "%s__nextBlockToProcess"
79-
80-
81-func F (G) = makeString(["%s%d", "blockProcessed", toString(G)], a)
82-
83-
84-func H () = "%s__withdrawal"
85-
86-
87-func I (w,J) = makeString(["%s%s%s", "withdrawal", toString(w), toBase58String(J)], a)
88-
89-
90-func K (L,M,N,O) = {
91- let P = {
92- let m = O
93- if ($isInstanceOf(m, "ByteVector"))
94- then {
95- let n = m
96- toBase58String(n)
97- }
98- else if ($isInstanceOf(m, "Unit"))
99- then "SOON"
100- else throw("Match error")
101- }
102- makeString(["%s%d%d%s", L, toString(M), toString(N), P], a)
147+func as (at) = {
148+ let au = split(at, a)
149+ let av = au[1]
150+ let Z = if ((av == "true"))
151+ then true
152+ else false
153+ let aa = au[2]
154+ let ab = parseIntValue(au[3])
155+ let ac = au[4]
156+ let ad = au[5]
157+ let ae = parseIntValue(au[6])
158+ let af = parseIntValue(au[7])
159+ let ag = parseIntValue(au[8])
160+ let ah = parseIntValue(au[9])
161+ let ai = parseIntValue(au[10])
162+ $Tuple10(Z, aa, ab, ac, ad, ae, af, ag, ah, ai)
103163 }
104164
105165
106-func Q (i) = {
107- let R = split(i, a)
108- if ((size(R) == 5))
109- then {
110- let L = R[1]
111- let M = valueOrErrorMessage(parseInt(R[2]), h("invalid lpAssetAmount"))
112- let N = valueOrErrorMessage(parseInt(R[3]), h("invalid targetPeriod"))
113- let O = R[4]
114- $Tuple4(L, M, N, O)
115- }
116- else j("invalid withdrawal request value")
166+func aw (E,ax) = {
167+ let at = valueOrErrorMessage(getString(X(E, ax)), c("voting info not found"))
168+ let ay = split(at, a)
169+ let ad = ay[5]
170+ let af = valueOrErrorMessage(parseIntValue(ay[7]), c("voting start height not found"))
171+ let az = valueOrErrorMessage(getString(R(E, ax)), c("voting issuer not found"))
172+ let aA = [if ((ad == "inProgress"))
173+ then true
174+ else e("no voting in progress"), if ((af > height))
175+ then true
176+ else e("voting expired")]
177+ if ((aA == aA))
178+ then $Tuple3(ad, af, az)
179+ else throw("Strict value is not equal to itself.")
117180 }
118181
119182
120-let S = {
121- let m = getString(this, q())
122- if ($isInstanceOf(m, "String"))
123- then {
124- let i = m
125- addressFromString(i)
126- }
127- else if ($isInstanceOf(m, "Unit"))
128- then unit
129- else throw("Match error")
130- }
131-
132-let T = valueOrErrorMessage(S, h("invalid factory address"))
133-
134-let U = {
135- let m = S
136- if ($isInstanceOf(m, "Address"))
137- then {
138- let V = m
139- let W = getString(V, r())
140- if ($isInstanceOf(W, "String"))
141- then {
142- let i = W
143- fromBase58String(i)
144- }
145- else if ($isInstanceOf(W, "Unit"))
146- then unit
147- else throw("Match error")
148- }
149- else if ($isInstanceOf(m, "Unit"))
150- then unit
151- else throw("Match error")
152- }
153-
154-let X = valueOrErrorMessage(U, h("invalid lpAssetId"))
155-
156-let Y = {
157- let m = S
158- if ($isInstanceOf(m, "Address"))
159- then {
160- let V = m
161- let W = getString(V, s())
162- if ($isInstanceOf(W, "String"))
163- then {
164- let i = W
165- fromBase58String(i)
166- }
167- else if ($isInstanceOf(W, "Unit"))
168- then unit
169- else throw("Match error")
170- }
171- else if ($isInstanceOf(m, "Unit"))
172- then unit
173- else throw("Match error")
174- }
175-
176-let Z = valueOrErrorMessage(Y, h("invalid xtnAssetId"))
177-
178-let aa = {
179- let m = S
180- if ($isInstanceOf(m, "Address"))
181- then {
182- let V = m
183- let W = getString(V, t())
184- if ($isInstanceOf(W, "String"))
185- then {
186- let i = W
187- addressFromString(i)
188- }
189- else if ($isInstanceOf(W, "Unit"))
190- then unit
191- else throw("Match error")
192- }
193- else if ($isInstanceOf(m, "Unit"))
194- then unit
195- else throw("Match error")
196- }
197-
198-let ab = valueOrErrorMessage(aa, h("invalid treasury address"))
199-
200-func ac (ad,ae) = if ((ad.caller == ae))
201- then true
202- else j("permission denied")
203-
204-
205-func af (ad) = ac(ad, T)
206-
207-
208-func ag (ah,ai) = {
209- let i = size(ah)
210- let aj = ah[0]
211- let ak = aj._1
212- let al = aj._2
213- let am = ah[1]
214- let an = am._1
215- let ao = am._2
216- let ap = ah[2]
217- let aq = ap._1
218- let ar = ap._2
219- if (if ((i > 0))
220- then (ak == ai)
221- else false)
222- then al
223- else if (if ((i > 1))
224- then (an == ai)
225- else false)
226- then ao
227- else if (if ((i > 2))
228- then (aq == ai)
229- else false)
230- then ar
231- else unit
183+func aB (aC,E,F) = {
184+ let aD = M(E, F, aC)
185+ let aE = valueOrErrorMessage(getString(aD), c("you have not voted"))
186+ let aF = split(aE, a)
187+ let Q = parseIntValue(aF[2])
188+ let aG = valueOrErrorMessage(getString(X(E, F)), c("voting info not found"))
189+ let aH = as(aG)
190+ let ah = aH._9
191+ let ai = aH._10
192+ let aI = fraction(Q, b, (ah + ai))
193+ let aJ = valueOrElse(getInteger(I(E, F)), 0)
194+ let aK = fraction(aI, aJ, b, FLOOR)
195+ aK
232196 }
233197
234198
235-@Callable(ad)
236-func claimLP (as) = {
237- let at = af(ad)
238- if ((at == at))
199+@Callable(aL)
200+func suggestAdd (E,aM,aN) = {
201+ let aO = aL.payments[0]
202+ let aP = value(aO.assetId)
203+ let aQ = value(aO.amount)
204+ let aR = getIntegerValue(C)
205+ let aS = getIntegerValue(B)
206+ let aT = {
207+ let aU = invoke(u, "isVerifiedREADONLY", [E], nil)
208+ if ($isInstanceOf(aU, "Boolean"))
209+ then aU
210+ else throw(($getType(aU) + " couldn't be cast to Boolean"))
211+ }
212+ let aA = [if (if ((aM >= aR))
213+ then (aS >= aM)
214+ else false)
215+ then true
216+ else e("invalid periodLength"), if ((aT == false))
217+ then true
218+ else e("token already verified"), if ((aQ > (aM * U)))
219+ then true
220+ else e("not enough wx for given period"), if ((aQ >= getIntegerValue(V)))
221+ then true
222+ else e("payment less then min for suggest")]
223+ if ((aA == aA))
239224 then {
240- let w = Address(as)
241- let au = valueOrElse(getInteger(T, v(w)), 0)
242- let av = valueOrElse(getInteger(T, x(w)), 0)
243- let aw = if ((au > 0))
244- then [invoke(T, "transferAsset", [as, au, X], nil), invoke(T, "integerEntry", [v(w), 0], nil), invoke(T, "integerEntry", [x(w), (av + au)], nil)]
245- else j("nothing to claim")
246- $Tuple2(nil, aw)
225+ let aV = L(E)
226+ let ax = getInteger(aV)
227+ let aW = if (isDefined(ax))
228+ then (value(ax) + 1)
229+ else 0
230+ let aX = if ((size(aL.payments) > 1))
231+ then {
232+ let aY = aL.payments[1]
233+ let aZ = toBase58String(value(aY.assetId))
234+ let ba = value(aY.amount)
235+ $Tuple4(true, aZ, ba, [StringEntry(D(E, aW), aZ), IntegerEntry(I(E, aW), ba)])
236+ }
237+ else $Tuple4(false, "EMPTY", 0, nil)
238+ let Z = aX._1
239+ let aa = aX._2
240+ let ab = aX._3
241+ let bb = aX._4
242+ let ag = valueOrErrorMessage(getInteger(y), c("votingThresholdAdd not set"))
243+ let at = Y(Z, aa, ab, "verification", "inProgress", height, (height + aM), ag, 0, 0)
244+ let bc = getIntegerValue(J)
245+ let bd = (aQ - bc)
246+ ([IntegerEntry(aV, aW), StringEntry(R(E, aW), toString(aL.caller)), StringEntry(X(E, aW), at), StringEntry(aj(E), aN), Burn(aP, bd)] ++ bb)
247247 }
248248 else throw("Strict value is not equal to itself.")
249249 }
250250
251251
252252
253-@Callable(ad)
254-func finalize (as,ax,ay,az,aA) = {
255- let at = af(ad)
253+@Callable(aL)
254+func suggestRemove (E) = {
255+ let be = ak(toString(aL.caller), height)
256+ let bf = getIntegerValue(K)
257+ let aO = aL.payments[0]
258+ let aP = value(aO.assetId)
259+ let aQ = value(aO.amount)
260+ let aT = {
261+ let aU = invoke(u, "isVerifiedREADONLY", [E], nil)
262+ if ($isInstanceOf(aU, "Boolean"))
263+ then aU
264+ else throw(($getType(aU) + " couldn't be cast to Boolean"))
265+ }
266+ let aA = [if (aT)
267+ then true
268+ else e("token not verified"), if ((be >= bf))
269+ then true
270+ else e("not enough gWXes"), if ((aQ >= getIntegerValue(W)))
271+ then true
272+ else e("payment less then min for suggest")]
273+ if ((aA == aA))
274+ then {
275+ let aV = L(E)
276+ let ax = getInteger(aV)
277+ let aW = if (isDefined(ax))
278+ then (value(ax) + 1)
279+ else 0
280+ let aM = valueOrErrorMessage(getInteger(A), c("periodLengthRemove not set"))
281+ let af = (height + aM)
282+ let ag = valueOrErrorMessage(getInteger(z), c("votingThresholdRemove not set"))
283+ let at = Y(false, "EMPTY", 0, "deverification", "inProgress", height, (height + aM), ag, 0, 0)
284+[IntegerEntry(aV, aW), StringEntry(R(E, aW), toString(aL.caller)), StringEntry(X(E, aW), at)]
285+ }
286+ else throw("Strict value is not equal to itself.")
287+ }
288+
289+
290+
291+@Callable(aL)
292+func vote (E,P) = {
293+ let aV = L(E)
294+ let ax = valueOrErrorMessage(getInteger(aV), c("voting does not exist"))
295+ let at = aw(E, ax)
256296 if ((at == at))
257297 then {
258- let aB = valueOrErrorMessage(getInteger(T, y()), h("invalid period"))
259- let aC = valueOrErrorMessage(getInteger(T, C()), h("invalid period length"))
260- let aD = valueOrErrorMessage(getInteger(T, B(aB)), h("invalid start height"))
261- let aE = valueOrErrorMessage(getInteger(T, z(aB)), h("invalid price"))
262- let aF = valueOrErrorMessage(getInteger(T, E()), h("invalid next block to process"))
263- let aG = ((aD + aC) - 1)
264- let aH = [if ((ad.originCaller == ab))
298+ let bg = at._2
299+ let bh = ak(toString(aL.caller), bg)
300+ let aD = M(E, ax, aL.caller)
301+ let aA = [if ((getString(aD) == unit))
265302 then true
266- else j("permission denied"), if ((aF > aG))
303+ else e("You have already voted"), if ((bh > 0))
267304 then true
268- else j("unprocessed blocks"), if ((ax >= 0))
269- then true
270- else j("invalid new treasury volume"), if ((ay >= 0))
271- then true
272- else j("invalid XTN price"), if (if ((az >= 0))
273- then (c >= az)
274- else false)
275- then true
276- else j("invalid PWR managers bonus"), if (if ((aA >= -(c)))
277- then (c >= aA)
278- else false)
279- then true
280- else j("invalid treasury volume diff allocation coefficient")]
281- if ((aH == aH))
305+ else throw("You'll not have gWX at the end of voting")]
306+ if ((aA == aA))
282307 then {
283- let aI = valueOrElse(getInteger(T, u(Z)), 0)
284- let aJ = valueOrElse(getInteger(T, u(unit)), 0)
285- let aK = fraction(aI, ay, d)
286- let aL = (aK + aJ)
287- let aM = (ax - aL)
288- let aN = if ((aM > 0))
289- then fraction(aM, az, c)
290- else 0
291- let aO = (aM - aN)
292- let aP = if ((aL > 0))
293- then fraction(aK, c, aL)
294- else 0
295- let aQ = fraction(aO, aP, c)
296- let aR = (aO - aQ)
297- let aS = o(aA)
298- let aT = fraction(aR, if ((0 > aA))
299- then aS
300- else 0, c)
301- let aU = fraction(aQ, if ((aA > 0))
302- then aS
303- else 0, c)
304- let aV = ((aQ - aU) + aT)
305- let aW = ((aR - aT) + aU)
306- let aX = (aJ + aW)
307- let aY = fraction((aK + aV), d, ay)
308- let aZ = (aB + 1)
309- let ba = valueOrErrorMessage(assetInfo(X), h("invalid lpAsset info")).quantity
310- let bb = fraction(aX, c, ba)
311- let bc = valueOrElse(getInteger(T, H()), 0)
312- let bd = max([0, fraction(bc, bb, c)])
313- let be = if ((size(ad.payments) > 0))
314- then ad.payments[0]
315- else unit
316- let bf = value(be).amount
317- let bg = value(be).assetId
318- let bh = if (if ((bd == 0))
319- then true
320- else if (if ((be != unit))
321- then (bg == unit)
322- else false)
323- then (bf >= bd)
324- else false)
325- then true
326- else j(("invalid payments, payment amount min: " + toString(bd)))
327- if ((bh == bh))
328- then {
329- let bi = if ((be != unit))
330- then [ScriptTransfer(T, bf, bg)]
331- else nil
332- let aw = [invoke(T, "integerEntry", [y(), aZ], nil), invoke(T, "integerEntry", [z(aZ), bb], nil), invoke(T, "integerEntry", [B(aZ), (aG + 1)], nil), invoke(T, "burn", [bc], nil), invoke(T, "integerEntry", [H(), 0], nil)]
333- $Tuple2(bi, aw)
334- }
335- else throw("Strict value is not equal to itself.")
308+ let aG = valueOrErrorMessage(getString(X(E, ax)), c("voting info not found"))
309+ let au = as(aG)
310+ let ah = au._9
311+ let ai = au._10
312+ let bi = if (P)
313+ then $Tuple2((ah + bh), ai)
314+ else $Tuple2(ah, (ai + bh))
315+ let bj = bi._1
316+ let bk = bi._2
317+ let bl = Y(au._1, au._2, au._3, au._4, au._5, au._6, au._7, au._8, bj, bk)
318+ let bm = {
319+ let h = getString(D(E, ax))
320+ if ($isInstanceOf(h, "String"))
321+ then {
322+ let bn = h
323+[StringEntry(G(aL.caller, E, ax), O(P, bh))]
324+ }
325+ else if ($isInstanceOf(h, "Unit"))
326+ then nil
327+ else throw("Match error")
328+ }
329+ ([StringEntry(aD, O(P, bh)), StringEntry(X(E, ax), bl)] ++ bm)
336330 }
337331 else throw("Strict value is not equal to itself.")
338332 }
339333 else throw("Strict value is not equal to itself.")
340334 }
341335
342336
343337
344-@Callable(ad)
345-func invest (as) = {
346- let at = af(ad)
338+@Callable(aL)
339+func cancelVote (E) = {
340+ let aV = L(E)
341+ let ax = valueOrErrorMessage(getInteger(aV), c("voting does not exist"))
342+ let aD = M(E, ax, aL.caller)
343+ let aE = valueOrErrorMessage(getString(aD), c("you have not voted"))
344+ let aF = split(aE, a)
345+ let P = aF[1]
346+ let Q = parseIntValue(aF[2])
347+ let at = aw(E, ax)
347348 if ((at == at))
348349 then {
349- let w = Address(as)
350- let aB = valueOrErrorMessage(getInteger(T, y()), h("invalid period"))
351- let aE = valueOrErrorMessage(getInteger(T, z(aB)), h("invalid price"))
352- let bj = if ((size(ad.payments) == 1))
353- then ad.payments[0]
354- else j("invalid payments")
355- let bk = if (if ((bj.assetId == unit))
356- then (bj.amount > 0)
357- else false)
358- then $Tuple2(bj.amount, bj.assetId)
359- else j("invalid payment amount")
360- let bf = bk._1
361- let bg = bk._2
362- let M = if ((aE > 0))
363- then fraction(bf, c, aE)
364- else 0
365- let bl = valueOrElse(getInteger(T, u(unit)), 0)
366- let bi = [ScriptTransfer(ab, bf, bg)]
367- let aw = [invoke(T, "integerEntry", [u(unit), (bl + bf)], nil), invoke(T, "reissue", [M], nil), invoke(T, "transferAsset", [as, M, X], nil)]
368- $Tuple2(bi, aw)
369- }
370- else throw("Strict value is not equal to itself.")
371- }
372-
373-
374-
375-@Callable(ad)
376-func withdraw (as) = {
377- let at = af(ad)
378- if ((at == at))
379- then {
380- let w = Address(as)
381- let aB = valueOrErrorMessage(getInteger(T, y()), h("invalid period"))
382- let bj = if ((size(ad.payments) == 1))
383- then ad.payments[0]
384- else j(h("invalid payments"))
385- let bg = if ((bj.assetId == X))
386- then X
387- else j("invalid payment asset")
388- let bf = if ((bj.amount > 0))
389- then bj.amount
390- else j("invalid payment amount")
391- let bm = valueOrElse(getInteger(T, H()), 0)
392- let bi = [ScriptTransfer(T, bf, bg)]
393- let aw = [invoke(T, "integerEntry", [H(), (bm + bf)], nil), invoke(T, "stringEntry", [I(w, ad.transactionId), K(e, bf, (aB + 1), unit)], nil)]
394- if ((aw == aw))
395- then $Tuple2(bi, aw)
396- else throw("Strict value is not equal to itself.")
397- }
398- else throw("Strict value is not equal to itself.")
399- }
400-
401-
402-
403-@Callable(ad)
404-func cancelWithdraw (as,J) = {
405- let at = af(ad)
406- if ((at == at))
407- then {
408- let w = Address(as)
409- let bn = valueOrErrorMessage(getString(T, I(w, J)), h("invalid withdrawal request"))
410- let aB = valueOrErrorMessage(getInteger(T, y()), h("invalid period"))
411- let bo = Q(bn)
412- let L = bo._1
413- let M = bo._2
414- let N = bo._3
415- let O = bo._4
416- let aH = [if ((L == e))
350+ let aA = [if (if ((P == "true"))
417351 then true
418- else j("invalid withdrawal request status"), if ((N > aB))
352+ else (P == "false"))
419353 then true
420- else j("invalid withdrawal request period")]
421- if ((aH == aH))
354+ else e("invalid vote")]
355+ if ((aA == aA))
422356 then {
423- let bm = valueOrErrorMessage(getInteger(T, H()), h("invalid total withdrawal amount"))
424- let aw = [invoke(T, "integerEntry", [H(), if ((bm >= M))
425- then (bm - M)
426- else j("invalid withdrawal amount")], nil), invoke(T, "deleteEntry", [I(w, J)], nil), invoke(T, "transferAsset", [as, M, X], nil)]
427- if ((aw == aw))
428- then $Tuple2(nil, aw)
429- else throw("Strict value is not equal to itself.")
357+ let aG = valueOrErrorMessage(getString(X(E, ax)), c("voting info not found"))
358+ let au = as(aG)
359+ let ah = au._9
360+ let ai = au._10
361+ let bo = if ((P == "true"))
362+ then $Tuple2((ah - Q), ai)
363+ else $Tuple2(ah, (ai - Q))
364+ let bj = bo._1
365+ let bk = bo._2
366+ let bl = Y(au._1, au._2, au._3, au._4, au._5, au._6, au._7, au._8, bj, bk)
367+[StringEntry(X(E, ax), bl), DeleteEntry(aD), DeleteEntry(G(aL.caller, E, ax))]
430368 }
431369 else throw("Strict value is not equal to itself.")
432370 }
433371 else throw("Strict value is not equal to itself.")
434372 }
435373
436374
437375
438-@Callable(ad)
439-func claimWaves (as,J) = {
440- let at = af(ad)
441- if ((at == at))
376+@Callable(aL)
377+func finalize (E) = {
378+ let aV = L(E)
379+ let ax = valueOrElse(getInteger(aV), 0)
380+ let bp = valueOrErrorMessage(getInteger(y), c("votingThresholdAdd not set"))
381+ let bq = valueOrErrorMessage(getInteger(z), c("votingThresholdRemove not set"))
382+ let aG = valueOrErrorMessage(getString(X(E, ax)), c("voting info not found"))
383+ let au = as(aG)
384+ let ac = au._4
385+ let ad = au._5
386+ let af = au._7
387+ let br = au._8
388+ let ah = au._9
389+ let ai = au._10
390+ let aA = [if ((ad == "inProgress"))
391+ then true
392+ else e("voting not in progress"), if ((height >= af))
393+ then true
394+ else e("voting not finished"), if (isDefined(getString(aj(E))))
395+ then true
396+ else e("asset image not set")]
397+ if ((aA == aA))
442398 then {
443- let w = Address(as)
444- let aB = valueOrErrorMessage(getInteger(T, y()), h("invalid period"))
445- let bn = valueOrErrorMessage(getString(T, I(w, J)), h("invalid withdrawal request"))
446- let bp = Q(bn)
447- let L = bp._1
448- let M = bp._2
449- let N = bp._3
450- let O = bp._4
451- if ((L == f))
452- then j("invalid withdrawal request status")
453- else if ((N > aB))
454- then j("invalid withdrawal request period")
455- else {
456- let bq = valueOrErrorMessage(getInteger(T, z(N)), h("invalid price"))
457- let br = if ((bq > 0))
458- then fraction(M, bq, c)
459- else 0
460- let aw = [invoke(T, "stringEntry", [I(w, J), K(f, M, N, ad.transactionId)], nil), invoke(T, "burn", [M], nil), invoke(T, "transferWaves", [as, br], nil)]
461- $Tuple2(nil, aw)
462- }
463- }
464- else throw("Strict value is not equal to itself.")
465- }
466-
467-
468-
469-@Callable(ad)
470-func processBlocks (as) = {
471- let at = af(ad)
472- if ((at == at))
473- then {
474- let w = Address(as)
475- let aB = valueOrErrorMessage(getInteger(T, y()), h("invalid period"))
476- let aC = valueOrErrorMessage(getInteger(T, C()), h("invalid period length"))
477- let aD = valueOrErrorMessage(getInteger(T, B(aB)), h("invalid start height"))
478- let aE = valueOrErrorMessage(getInteger(T, z(aB)), h("invalid price"))
479- let aF = valueOrErrorMessage(getInteger(T, E()), h("invalid next block to process"))
480- let aG = ((aD + aC) - 1)
481- let bs = 40
482- let bt = if (if (if ((height >= aF))
483- then if ((aF >= aD))
484- then true
485- else (aB == 0)
399+ let bs = if (if (((ah + ai) >= br))
400+ then (ah > ai)
486401 else false)
487- then (aG >= aF)
488- else false)
489- then min([((aG - aF) + 1), bs])
490- else j(h("invalid target block"))
491- let bu = valueOrErrorMessage(getInteger(T, D()), h("invalid block processing reward"))
492- let bv = (bu / bt)
493- let bw = (bu - (bv * bt))
494- func bx (by,bz) = if ((bz >= bt))
495- then by
496- else {
497- let bA = (aF + bz)
498- let bB = valueOrErrorMessage(blockInfoByHeight(bA), h("invalid block info"))
499- let bC = valueOrErrorMessage(ag(bB.rewards, ab), h(("invalid treasury reward for height " + toString(bA))))
500- let bD = bB.generator
501- let au = valueOrElse(getInteger(T, v(bD)), 0)
502- let bE = if ((bz == (bt - 1)))
503- then (bv + bw)
504- else bv
505- let M = if ((aE > 0))
506- then fraction((bC - bE), c, aE)
507- else 0
508- let bF = [invoke(T, "stringEntry", [F(bA), makeString([toBase58String(ad.transactionId), toString(aB), toString(bD), toBase58String(as), toString(bC), toString(bE), toString(M)], a)], nil), invoke(T, "integerEntry", [v(bD), (au + M)], nil)]
509- if ((bF == bF))
510- then (by + M)
511- else throw("Strict value is not equal to itself.")
402+ then true
403+ else false
404+ let bt = if (bs)
405+ then "accepted"
406+ else "rejected"
407+ let aN = getStringValue(aj(E))
408+ let bu = if (bs)
409+ then {
410+ let bv = if ((ac == "verification"))
411+ then invoke(u, "createOrUpdate", [E, aN, true], nil)
412+ else invoke(u, "setVerified", [E, false], nil)
413+ bv
512414 }
513-
514- let bG = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39]
515- let bH = {
516- let bI = bG
517- let bJ = size(bI)
518- let bK = 0
519- func bL (bM,bN) = if ((bN >= bJ))
520- then bM
521- else bx(bM, bI[bN])
522-
523- func bO (bM,bN) = if ((bN >= bJ))
524- then bM
525- else throw("List size exceeds 40")
526-
527- bO(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bL(bK, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40)
528- }
529- if ((bH == bH))
415+ else nil
416+ if ((bu == bu))
530417 then {
531- let bi = [invoke(T, "transferWaves", [as, bu], nil), invoke(T, "reissue", [bH], nil), invoke(T, "integerEntry", [E(), (aF + bt)], nil)]
532- if ((bi == bi))
533- then $Tuple2(nil, unit)
534- else throw("Strict value is not equal to itself.")
418+ let bl = Y(au._1, au._2, au._3, au._4, bt, au._6, au._7, au._8, au._9, au._10)
419+ let bc = getIntegerValue(J)
420+[StringEntry(X(E, ax), bl), ScriptTransfer(aL.caller, bc, x)]
535421 }
536422 else throw("Strict value is not equal to itself.")
537423 }
538424 else throw("Strict value is not equal to itself.")
539425 }
540426
541427
542-@Verifier(bP)
543-func bQ () = sigVerify(bP.bodyBytes, bP.proofs[0], bP.senderPublicKey)
428+
429+@Callable(aL)
430+func claimREADONLY (E,F,bw) = {
431+ let H = valueOrErrorMessage(addressFromString(bw), c("invalid address"))
432+ let bx = getString(D(E, F))
433+ let ab = if (isDefined(bx))
434+ then aB(H, E, F)
435+ else 0
436+ $Tuple2(nil, ab)
437+ }
438+
439+
440+
441+@Callable(aL)
442+func claim (E,F) = {
443+ let by = aL.caller
444+ let bz = S(by, E, F)
445+ let bA = getInteger(bz)
446+ let aA = [if ((bA == unit))
447+ then true
448+ else e("already claimed")]
449+ if ((aA == aA))
450+ then {
451+ let ab = if ((aB(by, E, F) > 0))
452+ then aB(by, E, F)
453+ else e("nothing to claim")
454+ let bx = getString(D(E, F))
455+ let bB = if (isDefined(bx))
456+ then {
457+ let bC = fromBase58String(value(bx))
458+[ScriptTransfer(by, ab, bC), IntegerEntry(bz, ab), DeleteEntry(G(by, E, F))]
459+ }
460+ else e("nothing to claim")
461+ bB
462+ }
463+ else throw("Strict value is not equal to itself.")
464+ }
465+
466+
467+@Verifier(bD)
468+func bE () = {
469+ let bF = {
470+ let h = aq()
471+ if ($isInstanceOf(h, "ByteVector"))
472+ then {
473+ let bn = h
474+ bn
475+ }
476+ else if ($isInstanceOf(h, "Unit"))
477+ then bD.senderPublicKey
478+ else throw("Match error")
479+ }
480+ sigVerify(bD.bodyBytes, bD.proofs[0], bF)
481+ }
544482

github/deemru/w8io/169f3d6 
67.41 ms