tx · 55tTXqErqwjBKRGrwM5AXWAFqjf3Ps8PsGJJgSRvJmuL

3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd:  -0.01400000 Waves

2022.03.03 20:41 [1948107] smart account 3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd > SELF 0.00000000 Waves

{ "type": 13, "id": "55tTXqErqwjBKRGrwM5AXWAFqjf3Ps8PsGJJgSRvJmuL", "fee": 1400000, "feeAssetId": null, "timestamp": 1646329323554, "version": 1, "sender": "3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd", "senderPublicKey": "CdnTmMHxT68Qa4MtHEnAiUhsdKTi2YkHPGn92ThinVNt", "proofs": [ "4KBE6LKPGq8KEiMP1PfVkVdn8q8YmjiEZ7wZ477LWviFnsh5U9aKum9rPvK8eoNJ6WBg2MBduiLwvPgUWrVKGGnA", "Lf3cF94EKDQhHejrfvoBFXgG5SbpExQjx1ekbRc3rtUfgMuzxTPdzx2HZM5us1RZni45aiEbG6ifFUQJRzkS9hd", "2nPA6ccj576huDHs9Ry7T1DuFHbqBSqD9RpTyEevjVHv3cGqgYxbeWxyyTGSxBsHLwjAC9bvjGygaWDmaHL7rZ3i" ], "script": "base64:AAIFAAAAAAAAAAsIAhIAEgASAwoBCAAAAEEBAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AAAAAAAAAAAAAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQIAAAAAAQAAABZnZXRCb29sQnlBZGRyZXNzQW5kS2V5AAAAAgAAAAdhZGRyZXNzAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBsAAAACBQAAAAdhZGRyZXNzBQAAAANrZXkHAQAAABhnZXRTdHJpbmdCeUFkZHJlc3NBbm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c0xpc3QAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAADCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQkAAlkAAAABCQABkQAAAAIFAAAAEHB1YktleUFkbWluc0xpc3QAAAAAAAAAAAEAAAAAAAAAAAEAAAAAAAAAAAADCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAgkAAlkAAAABCQABkQAAAAIFAAAAEHB1YktleUFkbWluc0xpc3QAAAAAAAAAAAIAAAAAAAAAAAEAAAAAAAAAAAADCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAwkAAlkAAAABCQABkQAAAAIFAAAAEHB1YktleUFkbWluc0xpc3QAAAAAAAAAAAMAAAAAAAAAAAIAAAAAAAAAAAAJAABnAAAAAgUAAAAFY291bnQAAAAAAAAAAAM7OEQs", "chainId": 84, "height": 1948107, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EAWBESPVWVrG6ZnmYRcgBJfuq1dAHLFc2wUR69FJGdJD Next: tR842EtG18pM3FDw9LX9n9exxroMzjMsgxs4o6JJnQP Diff:
OldNewDifferences
144144
145145 let ai = Address(base58'3N24ZPUAMhFm76N3vbNiiDtFqfUnmBHTc5N')
146146
147-let aj = c(J)
147+let aj = addressFromStringValue(c(J))
148148
149149 let ak = base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ'
150150
186186 func aB (M,aC,aD,aE,aF,aG,X,aH) = [IntegerEntry(N(M), X), IntegerEntry(O(M), aC), IntegerEntry(S(M), aD), StringEntry(P(M), aE), IntegerEntry(Q(M), height), StringEntry(R(M), aF), IntegerEntry(("debug_order_currentPrice_" + M), aH), IntegerEntry(L(M), aG)]
187187
188188
189-func aI (aJ,aK) = (((((((((((((((((((((((((((((((((((aJ + "[nsbtAmountRaw=") + toString(n(aK[0]))) + " usdnPayment=") + toString(n(aK[1]))) + " wRaw=") + toString(n(aK[2]))) + " uRaw=") + toString(n(aK[3]))) + " mRaw=") + toString(n(aK[4]))) + " sRaw=") + toString(n(aK[5]))) + " nsbtCurveParam_a=") + toString(n(aK[6]))) + " nsbtCurveParam_b=") + toString(n(aK[7]))) + " wReservesInUsdn=") + toString(n(aK[8]))) + " price=") + toString(n(aK[9]))) + " multBR=") + toString(n(aK[10]))) + " multPower=") + toString(n(aK[11]))) + " multExpInPower=") + l(aK[12])) + " multK=") + l(aK[13])) + " step1=") + l(aK[14])) + " step2=") + l(aK[15])) + " step3=") + l(aK[16])) + "]")
189+func aI (aJ,aK) = (((((((((((((((((((((((((((((((((((aJ + "[nsbtAmountRaw=") + toString(n(aK[0]))) + " usdnPayment=") + toString(n(aK[1]))) + " wRaw=") + toString(n(aK[2]))) + " uRaw=") + toString(n(aK[3]))) + " mRaw=") + toString(n(aK[4]))) + " sRaw=") + toString(n(aK[5]))) + " nsbtCurveParam_a=") + toString(n(aK[6]))) + " nsbtCurveParam_b=") + toString(n(aK[7]))) + " wReservesInUsdn=") + toString(n(aK[8]))) + " price=") + toString(n(aK[9]))) + " multBR=") + toString(n(aK[10]))) + " multPower=") + toString(n(aK[11]))) + " multExpInPower=") + l(aK[12])) + " multK=") + l(aK[13])) + " step1=") + l(aK[14])) + " step2=") + l(aK[15])) + " step3=") + toString(n(aK[16]))) + "]")
190190
191191
192192 @Callable(aL)
202202 then throw((("min " + toString(an)) + " waves expected"))
203203 else {
204204 let aP = aL.caller
205- let aQ = h(invoke(addressFromStringValue(aj), "calcNeutinoMetricsMATH", nil, nil))
205+ let aQ = h(invoke(aj, "calcNeutinoMetricsMATH", nil, nil))
206206 if ((aQ == aQ))
207207 then {
208208 let aH = n(aQ[0])
210210 let aS = n(aQ[5])
211211 let aT = n(aQ[9])
212212 let aU = value(assetInfo(al)).quantity
213- let aK = h(invoke(addressFromStringValue(aj), "curveFunctionMATH", [aR, aS, aH, aU, aT, aO], nil))
213+ let aK = h(invoke(aj, "curveFunctionMATH", [aR, aS, aH, aU, aT, aO], nil))
214214 if ((aK == aK))
215215 then {
216216 let aV = n(aK[0])
236236
237237
238238 @Callable(aL)
239+func sellNsbt () = if (am)
240+ then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
241+ else {
242+ let aM = value(aL.payments[0])
243+ let aN = aM.amount
244+ if ((aM.assetId != al))
245+ then throw("can use NSBT only")
246+ else {
247+ let aQ = h(invoke(aj, "calcNeutinoMetricsMATH", nil, nil))
248+ if ((aQ == aQ))
249+ then {
250+ let aT = n(aQ[10])
251+ let aY = n(h(invoke(aj, "calcContractNsbtPriceBySupplyMATH", [(aT - aN)], nil))[0])
252+ if ((aY == aY))
253+ then if ((q > aY))
254+ then throw((("resulting nsbt price would be < 1 (" + toString(aY)) + " usdn"))
255+ else {
256+ let aZ = invoke(ag, "transferUsdnToUser", [aN, toString(aL.caller)], nil)
257+ if ((aZ == aZ))
258+ then $Tuple2(nil, aY)
259+ else throw("Strict value is not equal to itself.")
260+ }
261+ else throw("Strict value is not equal to itself.")
262+ }
263+ else throw("Strict value is not equal to itself.")
264+ }
265+ }
266+
267+
268+
269+@Callable(aL)
239270 func cancelOrder (M) = {
240271 let aE = as(M)
241272 let W = (ar(M) - au(M))
242- let aY = toString(aL.caller)
243- let aZ = aw(M)
244- let ba = av(M)
273+ let ba = toString(aL.caller)
274+ let bb = aw(M)
275+ let bc = av(M)
245276 if ((at(M) != A))
246277 then throw("invalid order status")
247278 else [StringEntry(I, if ((ao == M))
248- then aZ
249- else ao), StringEntry(U(ba), aZ), StringEntry(T(aZ), ba), StringEntry(R(M), z), ScriptTransfer(aL.caller, W, unit)]
279+ then bb
280+ else ao), StringEntry(U(bc), bb), StringEntry(T(bb), bc), StringEntry(R(M), z), ScriptTransfer(aL.caller, W, unit)]
250281 }
251282
252283
253-@Verifier(bb)
254-func bc () = {
255- let bd = ["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"]
256- let be = ((((if (sigVerify(bb.bodyBytes, bb.proofs[0], fromBase58String(bd[0])))
284+@Verifier(bd)
285+func be () = {
286+ let bf = ["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"]
287+ let bg = ((((if (sigVerify(bd.bodyBytes, bd.proofs[0], fromBase58String(bf[0])))
257288 then 1
258- else 0) + (if (sigVerify(bb.bodyBytes, bb.proofs[1], fromBase58String(bd[1])))
289+ else 0) + (if (sigVerify(bd.bodyBytes, bd.proofs[1], fromBase58String(bf[1])))
259290 then 1
260- else 0)) + (if (sigVerify(bb.bodyBytes, bb.proofs[2], fromBase58String(bd[2])))
291+ else 0)) + (if (sigVerify(bd.bodyBytes, bd.proofs[2], fromBase58String(bf[2])))
261292 then 1
262- else 0)) + (if (sigVerify(bb.bodyBytes, bb.proofs[3], fromBase58String(bd[3])))
293+ else 0)) + (if (sigVerify(bd.bodyBytes, bd.proofs[3], fromBase58String(bf[3])))
263294 then 2
264295 else 0))
265- (be >= 3)
296+ (bg >= 3)
266297 }
267298
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func a (b) = valueOrElse(getInteger(this, b), 0)
55
66
77 func c (b) = valueOrElse(getString(this, b), "")
88
99
1010 func d (e,b) = valueOrElse(getBoolean(e, b), false)
1111
1212
1313 func f (e,b) = valueOrElse(getString(e, b), "")
1414
1515
1616 func g (e,b) = valueOrElse(getInteger(e, b), 0)
1717
1818
1919 func h (i) = {
2020 let j = i
2121 if ($isInstanceOf(j, "List[Any]"))
2222 then {
2323 let k = j
2424 k
2525 }
2626 else throw("fail to cast into List[Any]")
2727 }
2828
2929
3030 func l (i) = {
3131 let j = i
3232 if ($isInstanceOf(j, "String"))
3333 then {
3434 let m = j
3535 m
3636 }
3737 else throw("fail to cast into String")
3838 }
3939
4040
4141 func n (i) = {
4242 let j = i
4343 if ($isInstanceOf(j, "Int"))
4444 then {
4545 let o = j
4646 o
4747 }
4848 else throw("fail to cast into Int")
4949 }
5050
5151
5252 let p = 100000000
5353
5454 let q = 1000000
5555
5656 let r = toBigInt(1000000)
5757
5858 let s = 1000000
5959
6060 let t = 100000000
6161
6262 let u = toBigInt(10000000000000000)
6363
6464 let v = 8
6565
6666 let w = 16
6767
6868 let x = (10 * p)
6969
7070 let y = 95
7171
7272 let z = "canceled"
7373
7474 let A = "new"
7575
7676 let B = "filled"
7777
7878 let C = "price"
7979
8080 let D = "bond_asset_id"
8181
8282 let E = "neutrino_asset_id"
8383
8484 let F = "balance_lock_"
8585
8686 let G = (F + "waves")
8787
8888 let H = (F + "neutrino")
8989
9090 let I = "order_first"
9191
9292 let J = "math_contract"
9393
9494 let K = "min_waves_nsbt_buy"
9595
9696 func L (M) = ("debug_order_roi_" + M)
9797
9898
9999 func N (M) = ("order_price_" + M)
100100
101101
102102 func O (M) = ("order_total_" + M)
103103
104104
105105 func P (M) = ("order_owner_" + M)
106106
107107
108108 func Q (M) = ("order_height_" + M)
109109
110110
111111 func R (M) = ("order_status_" + M)
112112
113113
114114 func S (M) = ("order_filled_total_" + M)
115115
116116
117117 func T (M) = ("order_prev_" + M)
118118
119119
120120 func U (M) = ("order_next_" + M)
121121
122122
123123 func V (W,X) = fraction(fraction(W, s, X), p, q)
124124
125125
126126 func Y (W,X) = fraction(fraction(W, X, s), q, p)
127127
128128
129129 func Z (W,X) = Y(W, X)
130130
131131
132132 func aa (W,X) = V(W, X)
133133
134134
135135 func ab (ac,ad) = fraction(toBigInt(ac), u, toBigInt(ad))
136136
137137
138138 func ae (i,af) = toInt(fraction(i, toBigInt(af), u))
139139
140140
141141 let ag = Address(base58'3N9be2mwrA52WJho6DiesZkk4351GvpnWuj')
142142
143143 let ah = Address(base58'3MrwvfA9VRYwhHy4NuWPQGdxCtZdhH4LMMa')
144144
145145 let ai = Address(base58'3N24ZPUAMhFm76N3vbNiiDtFqfUnmBHTc5N')
146146
147-let aj = c(J)
147+let aj = addressFromStringValue(c(J))
148148
149149 let ak = base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ'
150150
151151 let al = base58'F3iaxzruFeKujfVfYSZEkejpjh67wmRfPCRHiNmWKp3Z'
152152
153153 let am = d(ah, "is_blocked")
154154
155155 let an = valueOrElse(getInteger(this, K), 10)
156156
157157 let ao = c(I)
158158
159159 func ap (aq) = a(N(aq))
160160
161161
162162 func ar (aq) = a(O(aq))
163163
164164
165165 func as (aq) = c(P(aq))
166166
167167
168168 func at (aq) = c(R(aq))
169169
170170
171171 func au (aq) = a(S(aq))
172172
173173
174174 func av (aq) = c(T(aq))
175175
176176
177177 func aw (aq) = c(U(aq))
178178
179179
180180 func ax (X) = ((s * s) / X)
181181
182182
183183 func ay (az,aA) = fraction(az, (q * s), aA)
184184
185185
186186 func aB (M,aC,aD,aE,aF,aG,X,aH) = [IntegerEntry(N(M), X), IntegerEntry(O(M), aC), IntegerEntry(S(M), aD), StringEntry(P(M), aE), IntegerEntry(Q(M), height), StringEntry(R(M), aF), IntegerEntry(("debug_order_currentPrice_" + M), aH), IntegerEntry(L(M), aG)]
187187
188188
189-func aI (aJ,aK) = (((((((((((((((((((((((((((((((((((aJ + "[nsbtAmountRaw=") + toString(n(aK[0]))) + " usdnPayment=") + toString(n(aK[1]))) + " wRaw=") + toString(n(aK[2]))) + " uRaw=") + toString(n(aK[3]))) + " mRaw=") + toString(n(aK[4]))) + " sRaw=") + toString(n(aK[5]))) + " nsbtCurveParam_a=") + toString(n(aK[6]))) + " nsbtCurveParam_b=") + toString(n(aK[7]))) + " wReservesInUsdn=") + toString(n(aK[8]))) + " price=") + toString(n(aK[9]))) + " multBR=") + toString(n(aK[10]))) + " multPower=") + toString(n(aK[11]))) + " multExpInPower=") + l(aK[12])) + " multK=") + l(aK[13])) + " step1=") + l(aK[14])) + " step2=") + l(aK[15])) + " step3=") + l(aK[16])) + "]")
189+func aI (aJ,aK) = (((((((((((((((((((((((((((((((((((aJ + "[nsbtAmountRaw=") + toString(n(aK[0]))) + " usdnPayment=") + toString(n(aK[1]))) + " wRaw=") + toString(n(aK[2]))) + " uRaw=") + toString(n(aK[3]))) + " mRaw=") + toString(n(aK[4]))) + " sRaw=") + toString(n(aK[5]))) + " nsbtCurveParam_a=") + toString(n(aK[6]))) + " nsbtCurveParam_b=") + toString(n(aK[7]))) + " wReservesInUsdn=") + toString(n(aK[8]))) + " price=") + toString(n(aK[9]))) + " multBR=") + toString(n(aK[10]))) + " multPower=") + toString(n(aK[11]))) + " multExpInPower=") + l(aK[12])) + " multK=") + l(aK[13])) + " step1=") + l(aK[14])) + " step2=") + l(aK[15])) + " step3=") + toString(n(aK[16]))) + "]")
190190
191191
192192 @Callable(aL)
193193 func buyNsbt () = {
194194 let aM = value(aL.payments[0])
195195 let aN = aM.amount
196196 let aO = aN
197197 if (am)
198198 then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
199199 else if (isDefined(aM.assetId))
200200 then throw("can use waves only")
201201 else if (((an * p) > aN))
202202 then throw((("min " + toString(an)) + " waves expected"))
203203 else {
204204 let aP = aL.caller
205- let aQ = h(invoke(addressFromStringValue(aj), "calcNeutinoMetricsMATH", nil, nil))
205+ let aQ = h(invoke(aj, "calcNeutinoMetricsMATH", nil, nil))
206206 if ((aQ == aQ))
207207 then {
208208 let aH = n(aQ[0])
209209 let aR = n(aQ[3])
210210 let aS = n(aQ[5])
211211 let aT = n(aQ[9])
212212 let aU = value(assetInfo(al)).quantity
213- let aK = h(invoke(addressFromStringValue(aj), "curveFunctionMATH", [aR, aS, aH, aU, aT, aO], nil))
213+ let aK = h(invoke(aj, "curveFunctionMATH", [aR, aS, aH, aU, aT, aO], nil))
214214 if ((aK == aK))
215215 then {
216216 let aV = n(aK[0])
217217 if ((0 >= aV))
218218 then throw("nsbtAmount <= 0")
219219 else if ((aO > (aV * 9223372)))
220220 then throw(((("Nsbt2Waves price exceeds MAX_INT: " + toString(aO)) + "/") + toString(aV)))
221221 else {
222222 let aW = ay(aO, aV)
223223 let aG = 0
224224 let aX = invoke(ag, "acceptWaves", nil, aL.payments)
225225 if ((aX == aX))
226226 then $Tuple2((aB(toBase58String(aL.transactionId), aN, aN, toString(aP), B, aG, aW, aH) ++ [ScriptTransfer(aP, aV, al), StringEntry("debug_curveResult", aI("curveResult", aK))]), aV)
227227 else throw("Strict value is not equal to itself.")
228228 }
229229 }
230230 else throw("Strict value is not equal to itself.")
231231 }
232232 else throw("Strict value is not equal to itself.")
233233 }
234234 }
235235
236236
237237
238238 @Callable(aL)
239+func sellNsbt () = if (am)
240+ then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
241+ else {
242+ let aM = value(aL.payments[0])
243+ let aN = aM.amount
244+ if ((aM.assetId != al))
245+ then throw("can use NSBT only")
246+ else {
247+ let aQ = h(invoke(aj, "calcNeutinoMetricsMATH", nil, nil))
248+ if ((aQ == aQ))
249+ then {
250+ let aT = n(aQ[10])
251+ let aY = n(h(invoke(aj, "calcContractNsbtPriceBySupplyMATH", [(aT - aN)], nil))[0])
252+ if ((aY == aY))
253+ then if ((q > aY))
254+ then throw((("resulting nsbt price would be < 1 (" + toString(aY)) + " usdn"))
255+ else {
256+ let aZ = invoke(ag, "transferUsdnToUser", [aN, toString(aL.caller)], nil)
257+ if ((aZ == aZ))
258+ then $Tuple2(nil, aY)
259+ else throw("Strict value is not equal to itself.")
260+ }
261+ else throw("Strict value is not equal to itself.")
262+ }
263+ else throw("Strict value is not equal to itself.")
264+ }
265+ }
266+
267+
268+
269+@Callable(aL)
239270 func cancelOrder (M) = {
240271 let aE = as(M)
241272 let W = (ar(M) - au(M))
242- let aY = toString(aL.caller)
243- let aZ = aw(M)
244- let ba = av(M)
273+ let ba = toString(aL.caller)
274+ let bb = aw(M)
275+ let bc = av(M)
245276 if ((at(M) != A))
246277 then throw("invalid order status")
247278 else [StringEntry(I, if ((ao == M))
248- then aZ
249- else ao), StringEntry(U(ba), aZ), StringEntry(T(aZ), ba), StringEntry(R(M), z), ScriptTransfer(aL.caller, W, unit)]
279+ then bb
280+ else ao), StringEntry(U(bc), bb), StringEntry(T(bb), bc), StringEntry(R(M), z), ScriptTransfer(aL.caller, W, unit)]
250281 }
251282
252283
253-@Verifier(bb)
254-func bc () = {
255- let bd = ["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"]
256- let be = ((((if (sigVerify(bb.bodyBytes, bb.proofs[0], fromBase58String(bd[0])))
284+@Verifier(bd)
285+func be () = {
286+ let bf = ["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"]
287+ let bg = ((((if (sigVerify(bd.bodyBytes, bd.proofs[0], fromBase58String(bf[0])))
257288 then 1
258- else 0) + (if (sigVerify(bb.bodyBytes, bb.proofs[1], fromBase58String(bd[1])))
289+ else 0) + (if (sigVerify(bd.bodyBytes, bd.proofs[1], fromBase58String(bf[1])))
259290 then 1
260- else 0)) + (if (sigVerify(bb.bodyBytes, bb.proofs[2], fromBase58String(bd[2])))
291+ else 0)) + (if (sigVerify(bd.bodyBytes, bd.proofs[2], fromBase58String(bf[2])))
261292 then 1
262- else 0)) + (if (sigVerify(bb.bodyBytes, bb.proofs[3], fromBase58String(bd[3])))
293+ else 0)) + (if (sigVerify(bd.bodyBytes, bd.proofs[3], fromBase58String(bf[3])))
263294 then 2
264295 else 0))
265- (be >= 3)
296+ (bg >= 3)
266297 }
267298

github/deemru/w8io/169f3d6 
66.10 ms