tx · 955pwN2gQ3KaUdziNw2bwgV3tEjTWLRwvT2BbqbeG6Qz 3N8kB3UEjWWvTRBtGpGUErAevaK2q6u2eCM: -0.01000000 Waves 2023.11.02 18:09 [2825880] smart account 3N8kB3UEjWWvTRBtGpGUErAevaK2q6u2eCM > SELF 0.00000000 Waves
{ "type": 13, "id": "955pwN2gQ3KaUdziNw2bwgV3tEjTWLRwvT2BbqbeG6Qz", "fee": 1000000, "feeAssetId": null, "timestamp": 1698937872714, "version": 2, "chainId": 84, "sender": "3N8kB3UEjWWvTRBtGpGUErAevaK2q6u2eCM", "senderPublicKey": "6ybktvseycJDGHTjJm3tz9iT2SKaTNtLLCZsJZRemtoM", "proofs": [ "4ihaRfiFspC72nFWnUBNWrPEFmCfW4Afj5bAqMMaog8bhrv7kMSJ92zH9c44GE2j1SBRiyPPiPR9Xfu95VKa5Ga2" ], "script": "base64:BgITCAISAwoBAhIAEgMKAQESAwoBAg4AB293bmVyUGsBIFjKQnTzuTU7kMfPWIFrhrNM3EW8gc9F3rO/tY+FuNJcAAtkZW5vbWluYXRvcgCAwtcvAAp0cmFuc2ZlclZrAcQGSYrHhkeDrw+dFMD6Yr/Vrvr2pPyDHCWoMO8w9LxFaQABrVkxqK1PRfgZw0t9bDNsxFEJNHhErc9XHTkkU1OiEYYWiz2VdqW6jQewS86Z3lshxW6Fdf1MU0MDPt1NoikSf2YEIBvI+gscAfqmtvJxZbkVA/Lrr7r+HyVUoZGt1QB46Zv9umeZBwmTWiDHaLPPgOVOWQAVYLMCwpEzEzIdF2C8KzI/CsCeCv3raf56RXmhFAWuJCbMtO6My12PxFQDRv98IWP0FGhY/m6sQ/9r58GInq4bSVYWKlGucbXbayaYF35Fp3o6VaRXVWzJ6FesrH8dS+DxeadscnAN4IQEB4J5YcwZvAX/fjE5JEHNC4WrNfiUe+fe6FAQ4ttHlRgKS+PbN1butH1dDkfQkBKC5Om0WI3D45eaRbN6Taxt7ha5xCUwGVh0LQ+Wf/j9bY+un1Cwur9w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pY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkABAckbWF0Y2gwBQJ0eAMJAAECBQckbWF0Y2gwAhRTZXRTY3JpcHRUcmFuc2FjdGlvbgQBZAUHJG1hdGNoMAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUHb3duZXJQawMJAAECBQckbWF0Y2gwAhdJbnZva2VTY3JpcHRUcmFuc2FjdGlvbgQBZAUHJG1hdGNoMAQHJG1hdGNoMQgFAWQIZnVuY3Rpb24DCQAAAgINc2V0T3BlcmF0b3JQawUHJG1hdGNoMQkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUHb3duZXJQawMJAAACAgh0cmFuc2FjdAUHJG1hdGNoMQQKb3BlcmF0b3JQawkBDWdldE9wZXJhdG9yUGsACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQpvcGVyYXRvclBrCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5BzqUbK4=", "height": 2825880, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9bgCno2uV9NBNaan1MSRAjVzoY9Yidpe6MKPf2XUEbae Next: 5yNpcWxTAPstoVdiyMwVvrtgUcuVY7k1tys44B7KNxJ Diff:
Old | New | Differences | |
---|---|---|---|
114 | 114 | ||
115 | 115 | @Callable(A) | |
116 | 116 | func transact (D) = { | |
117 | - | let E = z() | |
118 | - | let F = addressFromPublicKey(E) | |
119 | - | let i = o(D, 0, 32) | |
120 | - | let G = o(D, 32, 32) | |
121 | - | let H = o(D, 64, 32) | |
122 | - | let I = o(D, 96, 32) | |
123 | - | let J = toInt(o(I, 0, 8)) | |
124 | - | let K = toInt(o(I, 8, 14)) | |
125 | - | let L = toInt(o(I, 22, 6)) | |
126 | - | let M = o(I, 28, 3) | |
127 | - | let N = o(D, 128, 256) | |
128 | - | let O = o(D, 384, 256) | |
129 | - | let P = o(D, 640, 32) | |
130 | - | let Q = toInt(o(D, 672, 2)) | |
131 | - | let R = if ((Q == 0)) | |
117 | + | let i = take(D, 32) | |
118 | + | let E = o(D, 32, 32) | |
119 | + | let F = o(D, 64, 32) | |
120 | + | let G = o(D, 96, 32) | |
121 | + | let H = toInt(take(G, 8)) | |
122 | + | let I = toBigInt(o(G, 8, 14)) | |
123 | + | let J = toInt((base58'2DyVD' + o(G, 22, 6))) | |
124 | + | let K = o(G, 28, 3) | |
125 | + | let L = o(D, 128, 256) | |
126 | + | let M = o(D, 384, 256) | |
127 | + | let N = o(D, 640, 32) | |
128 | + | let O = toInt((base58'3gznry4ApWXU7' + o(D, 672, 2))) | |
129 | + | let P = drop(D, 674) | |
130 | + | let Q = if ((O == 0)) | |
132 | 131 | then { | |
133 | - | let S = drop(D, 674) | |
134 | - | let T = (32 + 64) | |
135 | - | let U = dropRight(takeRight(D, T), 64) | |
136 | - | let V = takeRight(D, 64) | |
137 | - | $Tuple3(o(D, 674, (size(S) - T)), U, V) | |
132 | + | let R = (32 + 64) | |
133 | + | let S = dropRight(takeRight(P, R), 64) | |
134 | + | let T = takeRight(P, 64) | |
135 | + | $Tuple3(dropRight(P, R), S, T) | |
138 | 136 | } | |
139 | - | else $Tuple3( | |
140 | - | let | |
141 | - | let | |
142 | - | let | |
143 | - | let | |
144 | - | let | |
145 | - | let | |
146 | - | let | |
147 | - | let | |
148 | - | let | |
149 | - | if (( | |
137 | + | else $Tuple3(P, unit, unit) | |
138 | + | let U = Q._1 | |
139 | + | let S = Q._2 | |
140 | + | let T = Q._3 | |
141 | + | let V = toInt(take(U, 8)) | |
142 | + | let W = valueOrElse(getBinary(m), toBytes(toBigInt(0))) | |
143 | + | let X = keccak256(U) | |
144 | + | let Y = (W + X) | |
145 | + | let Z = keccak256(Y) | |
146 | + | let aa = valueOrElse(getBinary(f(J)), e) | |
147 | + | if ((aa == aa)) | |
150 | 148 | then { | |
151 | - | let | |
152 | - | let | |
153 | - | let | |
149 | + | let ab = valueOrElse(getInteger(l), 0) | |
150 | + | let ac = valueOrElse(getBinary(f(ab)), e) | |
151 | + | let ad = { | |
154 | 152 | let w = getBinary(h(i)) | |
155 | 153 | if ($isInstanceOf(w, "Unit")) | |
156 | 154 | then { | |
159 | 157 | } | |
160 | 158 | else true | |
161 | 159 | } | |
162 | - | let | |
163 | - | let | |
164 | - | let | |
165 | - | let | |
166 | - | let w = | |
160 | + | let ae = ((((X + i) + E) + G) + X) | |
161 | + | let af = ((ac + N) + E) | |
162 | + | let ag = [BinaryEntry(f(J), N), BinaryEntry(h(i), keccak256((E + G))), IntegerEntry(l, (ab + 128)), BinaryEntry(m, Z)] | |
163 | + | let ah = { | |
164 | + | let w = O | |
167 | 165 | if ((0 == w)) | |
168 | 166 | then { | |
169 | - | let | |
170 | - | let | |
171 | - | if ((0 > | |
167 | + | let ai = value(S) | |
168 | + | let aj = addressFromPublicKey(ai) | |
169 | + | if ((0 > H)) | |
172 | 170 | then throw("Can't deposit negative amount") | |
173 | - | else if (!(sigVerify_8Kb((i + | |
171 | + | else if (!(sigVerify_8Kb((i + ai), value(T), ai))) | |
174 | 172 | then throw("Invalid deposit signature") | |
175 | - | else s( | |
173 | + | else s(aj, (H * b)) | |
176 | 174 | } | |
177 | 175 | else if ((1 == w)) | |
178 | - | then if (( | |
176 | + | then if ((H != 0)) | |
179 | 177 | then throw("Native amount must be zero for transfers") | |
180 | 178 | else nil | |
181 | 179 | else if ((2 == w)) | |
182 | 180 | then { | |
183 | - | let | |
184 | - | if (( | |
181 | + | let ak = (toInt(o(U, 8, 8)) * b) | |
182 | + | if ((ak > 0)) | |
185 | 183 | then throw("Withdraw amount must be positive") | |
186 | - | else [ScriptTransfer(A.caller, -( | |
184 | + | else [ScriptTransfer(A.caller, -(ak), unit)] | |
187 | 185 | } | |
188 | 186 | else throw("Unknown tx type") | |
189 | 187 | } | |
190 | - | let | |
188 | + | let al = if ((V > 0)) | |
191 | 189 | then { | |
192 | - | let ao = (X * b) | |
193 | - | [ScriptTransfer(F, X, unit)] | |
190 | + | let am = (V * b) | |
191 | + | let an = z() | |
192 | + | let ao = addressFromPublicKey(an) | |
193 | + | [ScriptTransfer(ao, V, unit)] | |
194 | 194 | } | |
195 | 195 | else nil | |
196 | - | if (( | |
196 | + | if ((J > ab)) | |
197 | 197 | then throw("Invalid transaction index") | |
198 | - | else if (!(bn256Groth16Verify_5inputs(c, | |
198 | + | else if (!(bn256Groth16Verify_5inputs(c, L, ae))) | |
199 | 199 | then throw("Tx proof is invalid") | |
200 | - | else if (!(bn256Groth16Verify_3inputs(d, | |
200 | + | else if (!(bn256Groth16Verify_3inputs(d, M, af))) | |
201 | 201 | then throw("Tree proof is invalid") | |
202 | - | else if ( | |
202 | + | else if (ad) | |
203 | 203 | then throw("Double spend") | |
204 | - | else (( | |
204 | + | else ((ah ++ ag) ++ al) | |
205 | 205 | } | |
206 | 206 | else throw("Strict value is not equal to itself.") | |
207 | 207 | } | |
223 | 223 | then sigVerify(D.bodyBytes, D.proofs[0], a) | |
224 | 224 | else if (("transact" == ar)) | |
225 | 225 | then { | |
226 | - | let | |
227 | - | sigVerify(D.bodyBytes, D.proofs[0], | |
226 | + | let an = z() | |
227 | + | sigVerify(D.bodyBytes, D.proofs[0], an) | |
228 | 228 | } | |
229 | 229 | else sigVerify(D.bodyBytes, D.proofs[0], D.senderPublicKey) | |
230 | 230 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'6ybktvseycJDGHTjJm3tz9iT2SKaTNtLLCZsJZRemtoM' | |
5 | 5 | ||
6 | 6 | let b = 100000000 | |
7 | 7 | ||
8 | 8 | let c = base64'SYrHhkeDrw+dFMD6Yr/Vrvr2p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akKGfGnRHaM/Jd0vbiJ723UUAM=' | |
9 | 9 | ||
10 | 10 | let d = base64'qGBPhudr70q2hdpdMHxxPVdk+MJDazUwWbBTl+eJCx/zUEagbSAhrTUc40Jajsexh+ThMSv1ZlKhNgbjvc8GFwfScaiOtcM0fDjNcUeChr2NpgbQV+y4XTvC8sjwVXEareR6FvrGlyEdKcFx+vIagiT77lQ3MK/EfxwlNHsEdAy0sWThEjpDykFPiYWG6T5IJWIGtdhrcPdePYv1GX0wCakWmTMh9NWYby1erGRPnDxWxeFcOBN4DPhkSQKg/DMH1LkY/GlCqIdfdX5Mr+0CMQWnmr8oECA5QgeOJ1ZnSQmO18Jg9rclNx9mhqD3iux0b+o293HkYg4d75ZOBeUqLdx63/eIe/VEuwIkGFBs4sU9WHEsdqpx8QKpByl6ZKgiOcx/wrW0cwTvm34cq5pRVGunz+qu90se2PqAjOjiIRoDvrcCR7qlN0iTvBedZRTlOtbOxAiXOb/nwFrsmf8wFiebpKkjbNkNvTiLGRiea53xusmuNwANOZtfYMT03Kwf1bgRFrkM6TqgEVZq1Vl7wjFhGu3CFrk5popRZ0X8zhJqn5IPLt6g/0ImUPee8frB6VtMYYkmQ7ZCWTwKEPGDIgQAAACMoBtyPY40yogNVj5bF/LbEe5QGKZjwyfMj58AY5ocK00CEsC3Nm1wSKR6xi8NSbjhPZRw0/zChVK9K8ceAO4ijNFpOFuOpTO6aEq0o7spO/E0JTwTStxF0jdD9NCydSTLZi4DdtHHkcph4Sao8AwV4qd50wavb0/hxCXkVWTvErgnIWCgjrfgzQBDfa99z0alUbwyBBd8odwfJU7bERsH/SfhNempxiwEU1uq6TPQ2NxgN3fgXo5i9dHrSaI2ZQd7R9hyJVeMlBaz6uP4gS1XYlt5LkT+TFGT/vidKlcMHQx945x1Iivq728eKgJ4aBI5Ja1nxj7QC7d98xukukQl' | |
11 | 11 | ||
12 | 12 | let e = toBytes(parseBigIntValue("11469701942666298368112882412133877458305516134926649826543144744382391691533")) | |
13 | 13 | ||
14 | 14 | func f (g) = ("R:" + toString(g)) | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func h (i) = ("N:" + toBase58String(i)) | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func j (k) = ("D:" + toBase58String(k)) | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | let l = "PoolIndex" | |
24 | 24 | ||
25 | 25 | let m = "AllMessagesHash" | |
26 | 26 | ||
27 | 27 | let n = "OperatorPk" | |
28 | 28 | ||
29 | 29 | func o (p,q,r) = take(drop(p, q), r) | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func s (k,t) = { | |
33 | 33 | let u = j(k.bytes) | |
34 | 34 | let v = { | |
35 | 35 | let w = getInteger(u) | |
36 | 36 | if ($isInstanceOf(w, "Int")) | |
37 | 37 | then { | |
38 | 38 | let x = w | |
39 | 39 | x | |
40 | 40 | } | |
41 | 41 | else 0 | |
42 | 42 | } | |
43 | 43 | let y = (v - t) | |
44 | 44 | if ((0 > t)) | |
45 | 45 | then throw("Can't spend negative amount") | |
46 | 46 | else if ((0 > y)) | |
47 | 47 | then throw("Not enough balance") | |
48 | 48 | else [IntegerEntry(u, y)] | |
49 | 49 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func z () = { | |
53 | 53 | let w = getBinary(n) | |
54 | 54 | if ($isInstanceOf(w, "ByteVector")) | |
55 | 55 | then { | |
56 | 56 | let x = w | |
57 | 57 | x | |
58 | 58 | } | |
59 | 59 | else a | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | @Callable(A) | |
64 | 64 | func setOperatorPk (B) = if ((size(B) != 32)) | |
65 | 65 | then throw("Operator public key must be 32 bytes long") | |
66 | 66 | else [BinaryEntry(n, B)] | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | ||
70 | 70 | @Callable(A) | |
71 | 71 | func deposit () = { | |
72 | 72 | let C = value(A.payments[0]) | |
73 | 73 | if (isDefined(C.assetId)) | |
74 | 74 | then throw("Only WAVES is allowed at the moment") | |
75 | 75 | else { | |
76 | 76 | let u = j(A.caller.bytes) | |
77 | 77 | let v = { | |
78 | 78 | let w = getInteger(this, u) | |
79 | 79 | if ($isInstanceOf(w, "Int")) | |
80 | 80 | then { | |
81 | 81 | let x = w | |
82 | 82 | x | |
83 | 83 | } | |
84 | 84 | else 0 | |
85 | 85 | } | |
86 | 86 | let y = (v + C.amount) | |
87 | 87 | [IntegerEntry(u, y)] | |
88 | 88 | } | |
89 | 89 | } | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | ||
93 | 93 | @Callable(A) | |
94 | 94 | func withdraw (t) = { | |
95 | 95 | let u = j(A.caller.bytes) | |
96 | 96 | let v = { | |
97 | 97 | let w = getInteger(this, u) | |
98 | 98 | if ($isInstanceOf(w, "Int")) | |
99 | 99 | then { | |
100 | 100 | let x = w | |
101 | 101 | x | |
102 | 102 | } | |
103 | 103 | else 0 | |
104 | 104 | } | |
105 | 105 | let y = (v - t) | |
106 | 106 | if ((0 > t)) | |
107 | 107 | then throw("Can't withdraw negative amount") | |
108 | 108 | else if ((0 > y)) | |
109 | 109 | then throw("Not enough balance") | |
110 | 110 | else [IntegerEntry(u, y), ScriptTransfer(A.caller, t, unit)] | |
111 | 111 | } | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | ||
115 | 115 | @Callable(A) | |
116 | 116 | func transact (D) = { | |
117 | - | let E = z() | |
118 | - | let F = addressFromPublicKey(E) | |
119 | - | let i = o(D, 0, 32) | |
120 | - | let G = o(D, 32, 32) | |
121 | - | let H = o(D, 64, 32) | |
122 | - | let I = o(D, 96, 32) | |
123 | - | let J = toInt(o(I, 0, 8)) | |
124 | - | let K = toInt(o(I, 8, 14)) | |
125 | - | let L = toInt(o(I, 22, 6)) | |
126 | - | let M = o(I, 28, 3) | |
127 | - | let N = o(D, 128, 256) | |
128 | - | let O = o(D, 384, 256) | |
129 | - | let P = o(D, 640, 32) | |
130 | - | let Q = toInt(o(D, 672, 2)) | |
131 | - | let R = if ((Q == 0)) | |
117 | + | let i = take(D, 32) | |
118 | + | let E = o(D, 32, 32) | |
119 | + | let F = o(D, 64, 32) | |
120 | + | let G = o(D, 96, 32) | |
121 | + | let H = toInt(take(G, 8)) | |
122 | + | let I = toBigInt(o(G, 8, 14)) | |
123 | + | let J = toInt((base58'2DyVD' + o(G, 22, 6))) | |
124 | + | let K = o(G, 28, 3) | |
125 | + | let L = o(D, 128, 256) | |
126 | + | let M = o(D, 384, 256) | |
127 | + | let N = o(D, 640, 32) | |
128 | + | let O = toInt((base58'3gznry4ApWXU7' + o(D, 672, 2))) | |
129 | + | let P = drop(D, 674) | |
130 | + | let Q = if ((O == 0)) | |
132 | 131 | then { | |
133 | - | let S = drop(D, 674) | |
134 | - | let T = (32 + 64) | |
135 | - | let U = dropRight(takeRight(D, T), 64) | |
136 | - | let V = takeRight(D, 64) | |
137 | - | $Tuple3(o(D, 674, (size(S) - T)), U, V) | |
132 | + | let R = (32 + 64) | |
133 | + | let S = dropRight(takeRight(P, R), 64) | |
134 | + | let T = takeRight(P, 64) | |
135 | + | $Tuple3(dropRight(P, R), S, T) | |
138 | 136 | } | |
139 | - | else $Tuple3( | |
140 | - | let | |
141 | - | let | |
142 | - | let | |
143 | - | let | |
144 | - | let | |
145 | - | let | |
146 | - | let | |
147 | - | let | |
148 | - | let | |
149 | - | if (( | |
137 | + | else $Tuple3(P, unit, unit) | |
138 | + | let U = Q._1 | |
139 | + | let S = Q._2 | |
140 | + | let T = Q._3 | |
141 | + | let V = toInt(take(U, 8)) | |
142 | + | let W = valueOrElse(getBinary(m), toBytes(toBigInt(0))) | |
143 | + | let X = keccak256(U) | |
144 | + | let Y = (W + X) | |
145 | + | let Z = keccak256(Y) | |
146 | + | let aa = valueOrElse(getBinary(f(J)), e) | |
147 | + | if ((aa == aa)) | |
150 | 148 | then { | |
151 | - | let | |
152 | - | let | |
153 | - | let | |
149 | + | let ab = valueOrElse(getInteger(l), 0) | |
150 | + | let ac = valueOrElse(getBinary(f(ab)), e) | |
151 | + | let ad = { | |
154 | 152 | let w = getBinary(h(i)) | |
155 | 153 | if ($isInstanceOf(w, "Unit")) | |
156 | 154 | then { | |
157 | 155 | let x = w | |
158 | 156 | false | |
159 | 157 | } | |
160 | 158 | else true | |
161 | 159 | } | |
162 | - | let | |
163 | - | let | |
164 | - | let | |
165 | - | let | |
166 | - | let w = | |
160 | + | let ae = ((((X + i) + E) + G) + X) | |
161 | + | let af = ((ac + N) + E) | |
162 | + | let ag = [BinaryEntry(f(J), N), BinaryEntry(h(i), keccak256((E + G))), IntegerEntry(l, (ab + 128)), BinaryEntry(m, Z)] | |
163 | + | let ah = { | |
164 | + | let w = O | |
167 | 165 | if ((0 == w)) | |
168 | 166 | then { | |
169 | - | let | |
170 | - | let | |
171 | - | if ((0 > | |
167 | + | let ai = value(S) | |
168 | + | let aj = addressFromPublicKey(ai) | |
169 | + | if ((0 > H)) | |
172 | 170 | then throw("Can't deposit negative amount") | |
173 | - | else if (!(sigVerify_8Kb((i + | |
171 | + | else if (!(sigVerify_8Kb((i + ai), value(T), ai))) | |
174 | 172 | then throw("Invalid deposit signature") | |
175 | - | else s( | |
173 | + | else s(aj, (H * b)) | |
176 | 174 | } | |
177 | 175 | else if ((1 == w)) | |
178 | - | then if (( | |
176 | + | then if ((H != 0)) | |
179 | 177 | then throw("Native amount must be zero for transfers") | |
180 | 178 | else nil | |
181 | 179 | else if ((2 == w)) | |
182 | 180 | then { | |
183 | - | let | |
184 | - | if (( | |
181 | + | let ak = (toInt(o(U, 8, 8)) * b) | |
182 | + | if ((ak > 0)) | |
185 | 183 | then throw("Withdraw amount must be positive") | |
186 | - | else [ScriptTransfer(A.caller, -( | |
184 | + | else [ScriptTransfer(A.caller, -(ak), unit)] | |
187 | 185 | } | |
188 | 186 | else throw("Unknown tx type") | |
189 | 187 | } | |
190 | - | let | |
188 | + | let al = if ((V > 0)) | |
191 | 189 | then { | |
192 | - | let ao = (X * b) | |
193 | - | [ScriptTransfer(F, X, unit)] | |
190 | + | let am = (V * b) | |
191 | + | let an = z() | |
192 | + | let ao = addressFromPublicKey(an) | |
193 | + | [ScriptTransfer(ao, V, unit)] | |
194 | 194 | } | |
195 | 195 | else nil | |
196 | - | if (( | |
196 | + | if ((J > ab)) | |
197 | 197 | then throw("Invalid transaction index") | |
198 | - | else if (!(bn256Groth16Verify_5inputs(c, | |
198 | + | else if (!(bn256Groth16Verify_5inputs(c, L, ae))) | |
199 | 199 | then throw("Tx proof is invalid") | |
200 | - | else if (!(bn256Groth16Verify_3inputs(d, | |
200 | + | else if (!(bn256Groth16Verify_3inputs(d, M, af))) | |
201 | 201 | then throw("Tree proof is invalid") | |
202 | - | else if ( | |
202 | + | else if (ad) | |
203 | 203 | then throw("Double spend") | |
204 | - | else (( | |
204 | + | else ((ah ++ ag) ++ al) | |
205 | 205 | } | |
206 | 206 | else throw("Strict value is not equal to itself.") | |
207 | 207 | } | |
208 | 208 | ||
209 | 209 | ||
210 | 210 | @Verifier(D) | |
211 | 211 | func ap () = { | |
212 | 212 | let w = D | |
213 | 213 | if ($isInstanceOf(w, "SetScriptTransaction")) | |
214 | 214 | then { | |
215 | 215 | let aq = w | |
216 | 216 | sigVerify(D.bodyBytes, D.proofs[0], a) | |
217 | 217 | } | |
218 | 218 | else if ($isInstanceOf(w, "InvokeScriptTransaction")) | |
219 | 219 | then { | |
220 | 220 | let aq = w | |
221 | 221 | let ar = aq.function | |
222 | 222 | if (("setOperatorPk" == ar)) | |
223 | 223 | then sigVerify(D.bodyBytes, D.proofs[0], a) | |
224 | 224 | else if (("transact" == ar)) | |
225 | 225 | then { | |
226 | - | let | |
227 | - | sigVerify(D.bodyBytes, D.proofs[0], | |
226 | + | let an = z() | |
227 | + | sigVerify(D.bodyBytes, D.proofs[0], an) | |
228 | 228 | } | |
229 | 229 | else sigVerify(D.bodyBytes, D.proofs[0], D.senderPublicKey) | |
230 | 230 | } | |
231 | 231 | else false | |
232 | 232 | } | |
233 | 233 |
github/deemru/w8io/169f3d6 50.05 ms ◑