tx · HzGeDH5SVpVj39fHMsb8MDoigBoFtGjvdC5HJx8JsoKv

3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd:  -0.01400000 Waves

2022.03.18 10:35 [1969106] smart account 3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd > SELF 0.00000000 Waves

{ "type": 13, "id": "HzGeDH5SVpVj39fHMsb8MDoigBoFtGjvdC5HJx8JsoKv", "fee": 1400000, "feeAssetId": null, "timestamp": 1647588949441, "version": 1, "sender": "3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd", "senderPublicKey": "CdnTmMHxT68Qa4MtHEnAiUhsdKTi2YkHPGn92ThinVNt", "proofs": [ "3ndGXx78eE28vLSADWsdXBBYtnKLbqekVyxbnrLj2Vg6LatmtQyxqCZSJY5JmKscz5k88WhW8dGxGhhSsSEaZABJ", "3FDJBQXgfQ8eJaNw115TqbzcWT2SGHgZ3Een6sTdqxfQBVc2Trs6VpyipqXwEKcdG49qtqebxCxbanL7gKcDtkZa", "2VHdbPB8YXdTj8ZWWJMLTr6YYpr5DCJgcpeEwaFdrUaqzXi9642uCAmJFKXevkK54C84wFS9xtHiYP5r9Cait7He" ], "script": "base64:AAIFAAAAAAAAAA8IAhIAEgASAwoBCBIAEgAAAABDAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQAAAAAAAAAAAAEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkCAAAAAAEAAAAWZ2V0Qm9vbEJ5QWRkcmVzc0FuZEtleQAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQbAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5BwEAAAAYZ2V0U3RyaW5nQnlBZGRyZXNz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gkAAGQAAAACAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAJAAJZAAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEJAAJZAAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAABAAAAAAAAAAABAAAAAAAAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAIJAAJZAAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAACAAAAAAAAAAABAAAAAAAAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAMJAAJZAAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAADAAAAAAAAAAACAAAAAAAAAAAACQAAZwAAAAIFAAAABWNvdW50AAAAAAAAAAADPsQsYg==", "chainId": 84, "height": 1969106, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: hikumg7MGwM6qqCtdBnzEj3snWC3JY8JDJ7Nsh32nbE Next: H6f3X1ng34CrNLJUQPVyS8HUauzTic338HNd6qHjHnyM Diff:
OldNewDifferences
184184 func az (Y) = ((s * s) / Y)
185185
186186
187-func aA (aB,aC) = fraction(aB, (q * s), aC)
187+func aA (aB,aC) = fraction(toBigInt(aB), toBigInt((q * s)), toBigInt(aC))
188188
189189
190-func aD (N,aE,aF,aG,aH,aI,Y,aJ) = [IntegerEntry(O(N), Y), IntegerEntry(P(N), aE), IntegerEntry(T(N), aF), StringEntry(Q(N), aG), IntegerEntry(R(N), height), StringEntry(S(N), aH), IntegerEntry(("debug_order_currentPrice_" + N), aJ), IntegerEntry(M(N), aI)]
190+func aD (N,aE,aF,aG,aH,aI,Y,aJ) = [StringEntry(O(N), toString(Y)), IntegerEntry(P(N), aE), IntegerEntry(T(N), aF), StringEntry(Q(N), aG), IntegerEntry(R(N), height), StringEntry(S(N), aH), IntegerEntry(("debug_order_currentPrice_" + N), aJ), IntegerEntry(M(N), aI)]
191191
192192
193193 func aK (aL,aM) = (((((((((((((((((((((((((((((((((((aL + "[nsbtAmountRaw=") + toString(n(aM[0]))) + " usdnPayment=") + toString(n(aM[1]))) + " wRaw=") + toString(n(aM[2]))) + " uRaw=") + toString(n(aM[3]))) + " mRaw=") + toString(n(aM[4]))) + " sRaw=") + toString(n(aM[5]))) + " nsbtCurveParam_a=") + toString(n(aM[6]))) + " nsbtCurveParam_b=") + toString(n(aM[7]))) + " wReservesInUsdn=") + toString(n(aM[8]))) + " price=") + toString(n(aM[9]))) + " multBR=") + toString(n(aM[10]))) + " multPower=") + toString(n(aM[11]))) + " multExpInPower=") + l(aM[12])) + " multK=") + l(aM[13])) + " step1=") + l(aM[14])) + " step2=") + l(aM[15])) + " step3=") + toString(n(aM[16]))) + "]")
207207 else {
208208 let aR = aN.caller
209209 let aS = h(invoke(ak, "calcNeutinoMetricsREADONLY", nil, nil))
210- if ((aS == aS))
211- then {
212- let aJ = n(aS[0])
213- let aM = h(invoke(ak, "curveFunctionREADONLY", [aQ], nil))
214- if ((aM == aM))
215- then {
216- let aT = n(aM[0])
217- if ((0 >= aT))
218- then throw("nsbtAmount <= 0")
219- else if ((aQ > (aT * 9223372)))
220- then throw(((("Nsbt2Waves price exceeds MAX_INT: " + toString(aQ)) + "/") + toString(aT)))
221- else {
222- let aU = aA(aQ, aT)
223- let aI = 0
224- let aV = invoke(ah, "acceptWaves", nil, aN.payments)
225- if ((aV == aV))
226- then $Tuple2((aD(toBase58String(aN.transactionId), aP, aP, toString(aR), B, aI, aU, aJ) ++ [ScriptTransfer(aR, aT, am), StringEntry("debug_curveResult", aK("curveResult", aM))]), aT)
227- else throw("Strict value is not equal to itself.")
228- }
229- }
210+ let aJ = n(aS[0])
211+ let aM = h(invoke(ak, "curveFunctionREADONLY", [aQ], nil))
212+ let aT = n(aM[0])
213+ if ((0 >= aT))
214+ then throw("nsbtAmount <= 0")
215+ else {
216+ let aU = aA(aQ, aT)
217+ let aI = 0
218+ let aV = invoke(ah, "acceptWaves", nil, aN.payments)
219+ if ((aV == aV))
220+ then $Tuple2((aD(toBase58String(aN.transactionId), aP, aP, toString(aR), B, aI, aU, aJ) ++ [ScriptTransfer(aR, aT, am), StringEntry("debug_curveResult", aK("curveResult", aM))]), aT)
230221 else throw("Strict value is not equal to itself.")
231222 }
232- else throw("Strict value is not equal to itself.")
233223 }
234224 }
235225
246236 else if ((ap > aP))
247237 then throw((("min " + toString((ap / q))) + " nsbt expected"))
248238 else {
249- let aS = h(invoke(ak, "calcNeutinoMetricsREADONLY", nil, nil))
250- if ((aS == aS))
251- then {
252- let aW = n(aS[10])
253- let aX = n(h(invoke(ak, "calcContractNsbtPriceBySupplyREADONLY", [(aW - aP)], nil))[0])
239+ let aW = n(h(invoke(ak, "calcContractNsbtPriceSYSREADONLY", [-(aP)], nil))[0])
240+ if ((q > aW))
241+ then throw((("resulting nsbt price would be < 1 (" + toString(aW)) + " usdn"))
242+ else {
243+ let aX = invoke(ah, "transferUsdnToUser", [aP, toString(aN.caller)], nil)
254244 if ((aX == aX))
255- then if ((q > aX))
256- then throw((("resulting nsbt price would be < 1 (" + toString(aX)) + " usdn"))
257- else {
258- let aY = invoke(ah, "transferUsdnToUser", [aP, toString(aN.caller)], nil)
259- if ((aY == aY))
260- then $Tuple2(nil, aX)
261- else throw("Strict value is not equal to itself.")
262- }
245+ then $Tuple2(nil, aW)
263246 else throw("Strict value is not equal to itself.")
264247 }
265- else throw("Strict value is not equal to itself.")
266248 }
267249 }
268250
272254 func cancelOrder (N) = {
273255 let aG = au(N)
274256 let X = (at(N) - aw(N))
275- let aZ = toString(aN.caller)
276- let ba = ay(N)
277- let bb = ax(N)
257+ let aY = toString(aN.caller)
258+ let aZ = ay(N)
259+ let ba = ax(N)
278260 if ((av(N) != A))
279261 then throw("invalid order status")
280262 else [StringEntry(I, if ((aq == N))
281- then ba
282- else aq), StringEntry(V(bb), ba), StringEntry(U(ba), bb), StringEntry(S(N), z), ScriptTransfer(aN.caller, X, unit)]
263+ then aZ
264+ else aq), StringEntry(V(ba), aZ), StringEntry(U(aZ), ba), StringEntry(S(N), z), ScriptTransfer(aN.caller, X, unit)]
283265 }
284266
285267
293275 func minNsbtAmountForSellSYSREADONLY () = $Tuple2(nil, ap)
294276
295277
296-@Verifier(bc)
297-func bd () = {
298- let be = ["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"]
299- let bf = ((((if (sigVerify(bc.bodyBytes, bc.proofs[0], fromBase58String(be[0])))
278+@Verifier(bb)
279+func bc () = {
280+ let bd = ["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"]
281+ let be = ((((if (sigVerify(bb.bodyBytes, bb.proofs[0], fromBase58String(bd[0])))
300282 then 1
301- else 0) + (if (sigVerify(bc.bodyBytes, bc.proofs[1], fromBase58String(be[1])))
283+ else 0) + (if (sigVerify(bb.bodyBytes, bb.proofs[1], fromBase58String(bd[1])))
302284 then 1
303- else 0)) + (if (sigVerify(bc.bodyBytes, bc.proofs[2], fromBase58String(be[2])))
285+ else 0)) + (if (sigVerify(bb.bodyBytes, bb.proofs[2], fromBase58String(bd[2])))
304286 then 1
305- else 0)) + (if (sigVerify(bc.bodyBytes, bc.proofs[3], fromBase58String(be[3])))
287+ else 0)) + (if (sigVerify(bb.bodyBytes, bb.proofs[3], fromBase58String(bd[3])))
306288 then 2
307289 else 0))
308- (bf >= 3)
290+ (be >= 3)
309291 }
310292
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 let L = "min_nsbt_sell"
9797
9898 func M (N) = ("debug_order_roi_" + N)
9999
100100
101101 func O (N) = ("order_price_" + N)
102102
103103
104104 func P (N) = ("order_total_" + N)
105105
106106
107107 func Q (N) = ("order_owner_" + N)
108108
109109
110110 func R (N) = ("order_height_" + N)
111111
112112
113113 func S (N) = ("order_status_" + N)
114114
115115
116116 func T (N) = ("order_filled_total_" + N)
117117
118118
119119 func U (N) = ("order_prev_" + N)
120120
121121
122122 func V (N) = ("order_next_" + N)
123123
124124
125125 func W (X,Y) = fraction(fraction(X, s, Y), p, q)
126126
127127
128128 func Z (X,Y) = fraction(fraction(X, Y, s), q, p)
129129
130130
131131 func aa (X,Y) = Z(X, Y)
132132
133133
134134 func ab (X,Y) = W(X, Y)
135135
136136
137137 func ac (ad,ae) = fraction(toBigInt(ad), u, toBigInt(ae))
138138
139139
140140 func af (i,ag) = toInt(fraction(i, toBigInt(ag), u))
141141
142142
143143 let ah = Address(base58'3N9be2mwrA52WJho6DiesZkk4351GvpnWuj')
144144
145145 let ai = Address(base58'3MrwvfA9VRYwhHy4NuWPQGdxCtZdhH4LMMa')
146146
147147 let aj = Address(base58'3N24ZPUAMhFm76N3vbNiiDtFqfUnmBHTc5N')
148148
149149 let ak = addressFromStringValue(c(J))
150150
151151 let al = base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ'
152152
153153 let am = base58'F3iaxzruFeKujfVfYSZEkejpjh67wmRfPCRHiNmWKp3Z'
154154
155155 let an = d(ai, "is_blocked")
156156
157157 let ao = valueOrElse(getInteger(this, K), 1000000000)
158158
159159 let ap = valueOrElse(getInteger(this, L), 1000000)
160160
161161 let aq = c(I)
162162
163163 func ar (as) = a(O(as))
164164
165165
166166 func at (as) = a(P(as))
167167
168168
169169 func au (as) = c(Q(as))
170170
171171
172172 func av (as) = c(S(as))
173173
174174
175175 func aw (as) = a(T(as))
176176
177177
178178 func ax (as) = c(U(as))
179179
180180
181181 func ay (as) = c(V(as))
182182
183183
184184 func az (Y) = ((s * s) / Y)
185185
186186
187-func aA (aB,aC) = fraction(aB, (q * s), aC)
187+func aA (aB,aC) = fraction(toBigInt(aB), toBigInt((q * s)), toBigInt(aC))
188188
189189
190-func aD (N,aE,aF,aG,aH,aI,Y,aJ) = [IntegerEntry(O(N), Y), IntegerEntry(P(N), aE), IntegerEntry(T(N), aF), StringEntry(Q(N), aG), IntegerEntry(R(N), height), StringEntry(S(N), aH), IntegerEntry(("debug_order_currentPrice_" + N), aJ), IntegerEntry(M(N), aI)]
190+func aD (N,aE,aF,aG,aH,aI,Y,aJ) = [StringEntry(O(N), toString(Y)), IntegerEntry(P(N), aE), IntegerEntry(T(N), aF), StringEntry(Q(N), aG), IntegerEntry(R(N), height), StringEntry(S(N), aH), IntegerEntry(("debug_order_currentPrice_" + N), aJ), IntegerEntry(M(N), aI)]
191191
192192
193193 func aK (aL,aM) = (((((((((((((((((((((((((((((((((((aL + "[nsbtAmountRaw=") + toString(n(aM[0]))) + " usdnPayment=") + toString(n(aM[1]))) + " wRaw=") + toString(n(aM[2]))) + " uRaw=") + toString(n(aM[3]))) + " mRaw=") + toString(n(aM[4]))) + " sRaw=") + toString(n(aM[5]))) + " nsbtCurveParam_a=") + toString(n(aM[6]))) + " nsbtCurveParam_b=") + toString(n(aM[7]))) + " wReservesInUsdn=") + toString(n(aM[8]))) + " price=") + toString(n(aM[9]))) + " multBR=") + toString(n(aM[10]))) + " multPower=") + toString(n(aM[11]))) + " multExpInPower=") + l(aM[12])) + " multK=") + l(aM[13])) + " step1=") + l(aM[14])) + " step2=") + l(aM[15])) + " step3=") + toString(n(aM[16]))) + "]")
194194
195195
196196 @Callable(aN)
197197 func buyNsbt () = {
198198 let aO = value(aN.payments[0])
199199 let aP = aO.amount
200200 let aQ = aP
201201 if (an)
202202 then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
203203 else if (isDefined(aO.assetId))
204204 then throw("can use waves only")
205205 else if ((ao > aP))
206206 then throw((("min " + toString((ao / p))) + " waves expected"))
207207 else {
208208 let aR = aN.caller
209209 let aS = h(invoke(ak, "calcNeutinoMetricsREADONLY", nil, nil))
210- if ((aS == aS))
211- then {
212- let aJ = n(aS[0])
213- let aM = h(invoke(ak, "curveFunctionREADONLY", [aQ], nil))
214- if ((aM == aM))
215- then {
216- let aT = n(aM[0])
217- if ((0 >= aT))
218- then throw("nsbtAmount <= 0")
219- else if ((aQ > (aT * 9223372)))
220- then throw(((("Nsbt2Waves price exceeds MAX_INT: " + toString(aQ)) + "/") + toString(aT)))
221- else {
222- let aU = aA(aQ, aT)
223- let aI = 0
224- let aV = invoke(ah, "acceptWaves", nil, aN.payments)
225- if ((aV == aV))
226- then $Tuple2((aD(toBase58String(aN.transactionId), aP, aP, toString(aR), B, aI, aU, aJ) ++ [ScriptTransfer(aR, aT, am), StringEntry("debug_curveResult", aK("curveResult", aM))]), aT)
227- else throw("Strict value is not equal to itself.")
228- }
229- }
210+ let aJ = n(aS[0])
211+ let aM = h(invoke(ak, "curveFunctionREADONLY", [aQ], nil))
212+ let aT = n(aM[0])
213+ if ((0 >= aT))
214+ then throw("nsbtAmount <= 0")
215+ else {
216+ let aU = aA(aQ, aT)
217+ let aI = 0
218+ let aV = invoke(ah, "acceptWaves", nil, aN.payments)
219+ if ((aV == aV))
220+ then $Tuple2((aD(toBase58String(aN.transactionId), aP, aP, toString(aR), B, aI, aU, aJ) ++ [ScriptTransfer(aR, aT, am), StringEntry("debug_curveResult", aK("curveResult", aM))]), aT)
230221 else throw("Strict value is not equal to itself.")
231222 }
232- else throw("Strict value is not equal to itself.")
233223 }
234224 }
235225
236226
237227
238228 @Callable(aN)
239229 func sellNsbt () = if (an)
240230 then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
241231 else {
242232 let aO = value(aN.payments[0])
243233 let aP = aO.amount
244234 if ((aO.assetId != am))
245235 then throw("can use NSBT only")
246236 else if ((ap > aP))
247237 then throw((("min " + toString((ap / q))) + " nsbt expected"))
248238 else {
249- let aS = h(invoke(ak, "calcNeutinoMetricsREADONLY", nil, nil))
250- if ((aS == aS))
251- then {
252- let aW = n(aS[10])
253- let aX = n(h(invoke(ak, "calcContractNsbtPriceBySupplyREADONLY", [(aW - aP)], nil))[0])
239+ let aW = n(h(invoke(ak, "calcContractNsbtPriceSYSREADONLY", [-(aP)], nil))[0])
240+ if ((q > aW))
241+ then throw((("resulting nsbt price would be < 1 (" + toString(aW)) + " usdn"))
242+ else {
243+ let aX = invoke(ah, "transferUsdnToUser", [aP, toString(aN.caller)], nil)
254244 if ((aX == aX))
255- then if ((q > aX))
256- then throw((("resulting nsbt price would be < 1 (" + toString(aX)) + " usdn"))
257- else {
258- let aY = invoke(ah, "transferUsdnToUser", [aP, toString(aN.caller)], nil)
259- if ((aY == aY))
260- then $Tuple2(nil, aX)
261- else throw("Strict value is not equal to itself.")
262- }
245+ then $Tuple2(nil, aW)
263246 else throw("Strict value is not equal to itself.")
264247 }
265- else throw("Strict value is not equal to itself.")
266248 }
267249 }
268250
269251
270252
271253 @Callable(aN)
272254 func cancelOrder (N) = {
273255 let aG = au(N)
274256 let X = (at(N) - aw(N))
275- let aZ = toString(aN.caller)
276- let ba = ay(N)
277- let bb = ax(N)
257+ let aY = toString(aN.caller)
258+ let aZ = ay(N)
259+ let ba = ax(N)
278260 if ((av(N) != A))
279261 then throw("invalid order status")
280262 else [StringEntry(I, if ((aq == N))
281- then ba
282- else aq), StringEntry(V(bb), ba), StringEntry(U(ba), bb), StringEntry(S(N), z), ScriptTransfer(aN.caller, X, unit)]
263+ then aZ
264+ else aq), StringEntry(V(ba), aZ), StringEntry(U(aZ), ba), StringEntry(S(N), z), ScriptTransfer(aN.caller, X, unit)]
283265 }
284266
285267
286268
287269 @Callable(aN)
288270 func minWavesAmountNsbtBuySYSREADONLY () = $Tuple2(nil, ao)
289271
290272
291273
292274 @Callable(aN)
293275 func minNsbtAmountForSellSYSREADONLY () = $Tuple2(nil, ap)
294276
295277
296-@Verifier(bc)
297-func bd () = {
298- let be = ["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"]
299- let bf = ((((if (sigVerify(bc.bodyBytes, bc.proofs[0], fromBase58String(be[0])))
278+@Verifier(bb)
279+func bc () = {
280+ let bd = ["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"]
281+ let be = ((((if (sigVerify(bb.bodyBytes, bb.proofs[0], fromBase58String(bd[0])))
300282 then 1
301- else 0) + (if (sigVerify(bc.bodyBytes, bc.proofs[1], fromBase58String(be[1])))
283+ else 0) + (if (sigVerify(bb.bodyBytes, bb.proofs[1], fromBase58String(bd[1])))
302284 then 1
303- else 0)) + (if (sigVerify(bc.bodyBytes, bc.proofs[2], fromBase58String(be[2])))
285+ else 0)) + (if (sigVerify(bb.bodyBytes, bb.proofs[2], fromBase58String(bd[2])))
304286 then 1
305- else 0)) + (if (sigVerify(bc.bodyBytes, bc.proofs[3], fromBase58String(be[3])))
287+ else 0)) + (if (sigVerify(bb.bodyBytes, bb.proofs[3], fromBase58String(bd[3])))
306288 then 2
307289 else 0))
308- (bf >= 3)
290+ (be >= 3)
309291 }
310292

github/deemru/w8io/026f985 
53.60 ms