tx · XmxYZEQEVcdr6P8f7WBRQerPDHPqrEXdCeP2nVeopce 3N8kB3UEjWWvTRBtGpGUErAevaK2q6u2eCM: -0.01000000 Waves 2023.01.19 13:45 [2411709] smart account 3N8kB3UEjWWvTRBtGpGUErAevaK2q6u2eCM > SELF 0.00000000 Waves
{ "type": 13, "id": "XmxYZEQEVcdr6P8f7WBRQerPDHPqrEXdCeP2nVeopce", "fee": 1000000, "feeAssetId": null, "timestamp": 1674125159786, "version": 2, "chainId": 84, "sender": "3N8kB3UEjWWvTRBtGpGUErAevaK2q6u2eCM", "senderPublicKey": "6ybktvseycJDGHTjJm3tz9iT2SKaTNtLLCZsJZRemtoM", "proofs": [ "rkqaT6MZn3fiYXXLCPfjGzmaKNASNXsokP6UuahGa9sSzLHvTmaRCMMKyGmHUafd62sTPV2uocSuQR2wmMf5rvU" ], "script": "base64:BgIOCAISABIDCgEBEgMKAQIMAApvcGVyYXRvclBrASBYykJ087k1O5DHz1iBa4azTNxFvIHPRd6zv7WPhbjSXAAPb3BlcmF0b3JBZGRyZXNzCQCnCAEFCm9wZXJhdG9yUGsAC2Rlbm9taW5hdG9yAIDC1y8ACnRyYW5zZmVyVmsBxAZJiseGR4OvD50UwPpiv9Wu+vak/IMcJagw7zD0vEVpAAGtWTGorU9F+BnDS31sM2zEUQk0eEStz1cdOSRTU6IRhhaLPZV2pbqNB7BLzpneWyHFboV1/UxTQwM+3U2iKRJ/ZgQgG8j6CxwB+qa28nFluRUD8uuvuv4fJVShka3VAHjpm/26Z5kHCZNaIMdos8+A5U5ZABVgswLCkTMTMh0XYLwrMj8KwJ4K/etp/npFeaEUBa4kJsy07ozLXY/EVANG/3whY/QUaFj+bqxD/2vnwYierhtJVhYqUa5xtdtrJpgXfkWnejpVpFdVbMnoV6ysfx1L4PF5p2xycA3ghAQHgnlhzBm8Bf9+MTkkQc0Lhas1+JR7597oUBDi20eVGApL49s3Vu60fV0OR9CQEoLk6bRYjcPjl5pFs3pNrG3uFrnEJTAZWHQ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XgJAAIBAhxUcmFuc2FjdGlvbiBpbmRleCBpcyB0b28gYmlnAwkBASEBCQCWEwMFCnRyYW5zZmVyVmsFB3R4UHJvb2YFDnRyYW5zZmVySW5wdXRzCQACAQITVHggcHJvb2YgaXMgaW52YWxpZAMJAQEhAQkAlBMDBQZ0cmVlVmsFCXRyZWVQcm9vZgUKdHJlZUlucHV0cwkAAgECFVRyZWUgcHJvb2YgaXMgaW52YWxpZAMFD251bGxpZmllckV4aXN0cwkAAgECDERvdWJsZSBzcGVuZAkAzggCCQDOCAIFA3JlcwUHZGF0YVJlcwUGZmVlUmVzCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJ0eAEGdmVyaWZ5AAQHJG1hdGNoMAUCdHgDCQABAgUHJG1hdGNoMAIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAWQFByRtYXRjaDAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFCm9wZXJhdG9yUGsHWZ+Wcg==", "height": 2411709, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 6VnwRiznJbm2wm3FFpwUmQi9fN8Bo25so8dhNKFFaoJo Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = base58'6ybktvseycJDGHTjJm3tz9iT2SKaTNtLLCZsJZRemtoM' | |
5 | + | ||
6 | + | let b = addressFromPublicKey(a) | |
7 | + | ||
8 | + | let c = 100000000 | |
9 | + | ||
10 | + | let d = base64'SYrHhkeDrw+dFMD6Yr/Vrvr2pPyDHCWoMO8w9LxFaQABrVkxqK1PRfgZw0t9bDNsxFEJNHhErc9XHTkkU1OiEYYWiz2VdqW6jQewS86Z3lshxW6Fdf1MU0MDPt1NoikSf2YEIBvI+gscA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MSv1ZlKhNgbjvc8GFwfScaiOtcM0fDjNcUeChr2NpgbQV+y4XTvC8sjwVXEareR6FvrGlyEdKcFx+vIagiT77lQ3MK/EfxwlNHsEdAy0sWThEjpDykFPiYWG6T5IJWIGtdhrcPdePYv1GX0wCakWmTMh9NWYby1erGRPnDxWxeFcOBN4DPhkSQKg/DMH1LkY/GlCqIdfdX5Mr+0CMQWnmr8oECA5QgeOJ1ZnSQmO18Jg9rclNx9mhqD3iux0b+o293HkYg4d75ZOBeUqLdx63/eIe/VEuwIkGFBs4sU9WHEsdqpx8QKpByl6ZKgiOcx/wrW0cwTvm34cq5pRVGunz+qu90se2PqAjOjiIRoDvrcCR7qlN0iTvBedZRTlOtbOxAiXOb/nwFrsmf8wFiebpKkjbNkNvTiLGRiea53xusmuNwANOZtfYMT03Kwf1bgRFrkM6TqgEVZq1Vl7wjFhGu3CFrk5popRZ0X8zhJqn5IPLt6g/0ImUPee8frB6VtMYYkmQ7ZCWTwKEPGDIgQAAACMoBtyPY40yogNVj5bF/LbEe5QGKZjwyfMj58AY5ocK00CEsC3Nm1wSKR6xi8NSbjhPZRw0/zChVK9K8ceAO4ijNFpOFuOpTO6aEq0o7spO/E0JTwTStxF0jdD9NCydSTLZi4DdtHHkcph4Sao8AwV4qd50wavb0/hxCXkVWTvErgnIWCgjrfgzQBDfa99z0alUbwyBBd8odwfJU7bERsH/SfhNempxiwEU1uq6TPQ2NxgN3fgXo5i9dHrSaI2ZQd7R9hyJVeMlBaz6uP4gS1XYlt5LkT+TFGT/vidKlcMHQx945x1Iivq728eKgJ4aBI5Ja1nxj7QC7d98xukukQl' | |
13 | + | ||
14 | + | let f = toBytes(parseBigIntValue("11469701942666298368112882412133877458305516134926649826543144744382391691533")) | |
15 | + | ||
16 | + | func g (h) = ("R:" + toString(h)) | |
17 | + | ||
18 | + | ||
19 | + | func i (j) = ("N:" + toBase58String(j)) | |
20 | + | ||
21 | + | ||
22 | + | func k (l) = ("D:" + toBase58String(l)) | |
23 | + | ||
24 | + | ||
25 | + | let m = "PoolIndex" | |
26 | + | ||
27 | + | func n (o,p,q) = drop(take(o, q), p) | |
28 | + | ||
29 | + | ||
30 | + | func r (l,s) = { | |
31 | + | let t = k(l.bytes) | |
32 | + | let u = { | |
33 | + | let v = getInteger(t) | |
34 | + | if ($isInstanceOf(v, "Int")) | |
35 | + | then { | |
36 | + | let w = v | |
37 | + | w | |
38 | + | } | |
39 | + | else 0 | |
40 | + | } | |
41 | + | let x = (u - s) | |
42 | + | if ((0 > s)) | |
43 | + | then throw("Can't spend negative amount") | |
44 | + | else if ((0 > x)) | |
45 | + | then throw("Not enough balance") | |
46 | + | else [IntegerEntry(t, x)] | |
47 | + | } | |
48 | + | ||
49 | + | ||
50 | + | @Callable(y) | |
51 | + | func deposit () = { | |
52 | + | let z = value(y.payments[0]) | |
53 | + | if (isDefined(z.assetId)) | |
54 | + | then throw("Only WAVES is allowed at the moment") | |
55 | + | else { | |
56 | + | let t = k(y.caller.bytes) | |
57 | + | let u = { | |
58 | + | let v = getInteger(this, t) | |
59 | + | if ($isInstanceOf(v, "Int")) | |
60 | + | then { | |
61 | + | let w = v | |
62 | + | w | |
63 | + | } | |
64 | + | else 0 | |
65 | + | } | |
66 | + | let x = (u + z.amount) | |
67 | + | [IntegerEntry(t, x)] | |
68 | + | } | |
69 | + | } | |
70 | + | ||
71 | + | ||
72 | + | ||
73 | + | @Callable(y) | |
74 | + | func withdraw (s) = { | |
75 | + | let t = k(y.caller.bytes) | |
76 | + | let u = { | |
77 | + | let v = getInteger(this, t) | |
78 | + | if ($isInstanceOf(v, "Int")) | |
79 | + | then { | |
80 | + | let w = v | |
81 | + | w | |
82 | + | } | |
83 | + | else 0 | |
84 | + | } | |
85 | + | let x = (u - s) | |
86 | + | if ((0 > s)) | |
87 | + | then throw("Can't withdraw negative amount") | |
88 | + | else if ((0 > x)) | |
89 | + | then throw("Not enough balance") | |
90 | + | else [IntegerEntry(t, x), ScriptTransfer(y.caller, s, unit)] | |
91 | + | } | |
92 | + | ||
93 | + | ||
94 | + | ||
95 | + | @Callable(y) | |
96 | + | func transact (A) = { | |
97 | + | let j = n(A, 0, 32) | |
98 | + | let B = n(A, 32, 64) | |
99 | + | let C = n(A, 64, 96) | |
100 | + | let D = n(A, 96, 128) | |
101 | + | let E = toInt(n(D, 0, 8)) | |
102 | + | let F = toInt(n(D, 8, 22)) | |
103 | + | let G = toInt(n(D, 22, 28)) | |
104 | + | let H = n(D, 28, 31) | |
105 | + | let I = n(A, 128, 384) | |
106 | + | let J = n(A, 384, 640) | |
107 | + | let K = n(A, 640, 672) | |
108 | + | let L = toInt(n(A, 672, 674)) | |
109 | + | let M = if ((L == 0)) | |
110 | + | then { | |
111 | + | let N = (32 + 64) | |
112 | + | let O = dropRight(takeRight(A, N), 64) | |
113 | + | let P = takeRight(A, 64) | |
114 | + | $Tuple3(n(A, 674, (size(A) - N)), O, P) | |
115 | + | } | |
116 | + | else $Tuple3(n(A, 674, size(A)), unit, unit) | |
117 | + | let Q = M._1 | |
118 | + | let O = M._2 | |
119 | + | let P = M._3 | |
120 | + | let R = toInt(n(Q, 0, 8)) | |
121 | + | let S = keccak256(Q) | |
122 | + | let T = valueOrElse(getBinary(g(G)), f) | |
123 | + | if ((T == T)) | |
124 | + | then { | |
125 | + | let U = valueOrElse(getInteger(m), 0) | |
126 | + | let V = valueOrElse(getBinary(g(U)), f) | |
127 | + | let W = { | |
128 | + | let v = getBinary(i(j)) | |
129 | + | if ($isInstanceOf(v, "Unit")) | |
130 | + | then { | |
131 | + | let w = v | |
132 | + | false | |
133 | + | } | |
134 | + | else true | |
135 | + | } | |
136 | + | let X = ((((S + j) + B) + D) + S) | |
137 | + | let Y = ((V + K) + B) | |
138 | + | let Z = [BinaryEntry(g(G), K), BinaryEntry(i(j), keccak256((B + D))), IntegerEntry(m, (U + 128))] | |
139 | + | let aa = { | |
140 | + | let v = L | |
141 | + | if ((0 == v)) | |
142 | + | then { | |
143 | + | let ab = value(O) | |
144 | + | let ac = addressFromPublicKey(ab) | |
145 | + | if ((0 > E)) | |
146 | + | then throw("Can't deposit negative amount") | |
147 | + | else if (!(sigVerify_8Kb((j + ab), value(P), ab))) | |
148 | + | then throw("Invalid deposit signature") | |
149 | + | else r(ac, (E * c)) | |
150 | + | } | |
151 | + | else if ((1 == v)) | |
152 | + | then if ((E != 0)) | |
153 | + | then throw("Native amount must be zero for transfers") | |
154 | + | else nil | |
155 | + | else if ((2 == v)) | |
156 | + | then { | |
157 | + | let ad = (toInt(n(Q, 8, 16)) * c) | |
158 | + | if ((ad > 0)) | |
159 | + | then throw("Withdraw amount must be positive") | |
160 | + | else [ScriptTransfer(y.caller, -(ad), unit)] | |
161 | + | } | |
162 | + | else throw("Unknown tx type") | |
163 | + | } | |
164 | + | let ae = if ((R > 0)) | |
165 | + | then { | |
166 | + | let af = (R * c) | |
167 | + | [ScriptTransfer(b, R, unit)] | |
168 | + | } | |
169 | + | else nil | |
170 | + | if ((G > U)) | |
171 | + | then throw("Transaction index is too big") | |
172 | + | else if (!(bn256Groth16Verify_5inputs(d, I, X))) | |
173 | + | then throw("Tx proof is invalid") | |
174 | + | else if (!(bn256Groth16Verify_3inputs(e, J, Y))) | |
175 | + | then throw("Tree proof is invalid") | |
176 | + | else if (W) | |
177 | + | then throw("Double spend") | |
178 | + | else ((aa ++ Z) ++ ae) | |
179 | + | } | |
180 | + | else throw("Strict value is not equal to itself.") | |
181 | + | } | |
182 | + | ||
183 | + | ||
184 | + | @Verifier(A) | |
185 | + | func ag () = { | |
186 | + | let v = A | |
187 | + | if ($isInstanceOf(v, "SetScriptTransaction")) | |
188 | + | then { | |
189 | + | let ah = v | |
190 | + | sigVerify(A.bodyBytes, A.proofs[0], a) | |
191 | + | } | |
192 | + | else false | |
193 | + | } | |
194 | + |
github/deemru/w8io/026f985 23.15 ms ◑