tx · DRMj4qAzS5cn8zDw9jmVZKyxwpYHguNEgpXAyEyHCHDE 3MwLuek2V6JjKybacSPjk4uo78pNkttERW1: -0.01400000 Waves 2019.10.04 12:56 [704823] smart account 3MwLuek2V6JjKybacSPjk4uo78pNkttERW1 > SELF 0.00000000 Waves
{ "type": 13, "id": "DRMj4qAzS5cn8zDw9jmVZKyxwpYHguNEgpXAyEyHCHDE", "fee": 1400000, "feeAssetId": null, "timestamp": 1570183003518, "version": 1, "sender": "3MwLuek2V6JjKybacSPjk4uo78pNkttERW1", "senderPublicKey": "J9XYsY58fH56YchACAvg2gFhmBF95dSf8LXAJB499n1J", "proofs": [ "D1KMmn9u13TuBEC8dqs4tAXpTv5cNA1dRmfAxzeiJbvsbN68A6cB1vzqSgG8RLc7WxaYcFESYAiMm4WBGYxLLZG" ], "script": "base64:AAIDAAAAAAAAAAAAAAAoAQAAABhnZXROdW1iZXJCeUFkZHJlc3NBbmRLZXkAAAACAAAAB2FkZHJlc3MAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAAHYWRkcmVzcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAABAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAABAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWECAAAAAAAAAA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BQAAAAxPcmRlckJvb2tLZXkFAAAADG5ld09yZGVyYm9vawkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAFmdldE9yZGVyRmlsbGVkVG90YWxLZXkAAAABBQAAAAdvcmRlcklkCQAAZAAAAAIFAAAAC2ZpbGxlZFRvdGFsBQAAAAV0b3RhbAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAEWdldE9yZGVyU3RhdHVzS2V5AAAAAQUAAAAHb3JkZXJJZAUAAAAGc3RhdHVzBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAApvcmRlck93bmVyBQAAAAxmaWxsZWRBbW91bnQFAAAAC2JvbmRBc3NldElkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAAQbmV1dHJpbm9Db250cmFjdAUAAAAFdG90YWwFAAAAD25ldXRyaW5vQXNzZXRJZAUAAAADbmlsAAAAAAfET2o=", "chainId": 84, "height": 704823, "spentComplexity": 0 } View: original | compacted Prev: 8SkJwaK2qjNp7zcae2JLNFaNrPBMsB4sPuzcbULxshBa Next: 9wZwj18qCh1QMfRKaxzXwxG7uwvchbS6utsMjc6td8ML Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b,c) = { | |
5 | 5 | let d = getInteger(addressFromStringValue(b), c) | |
6 | 6 | if ($isInstanceOf(d, "Int")) | |
7 | 7 | then { | |
8 | 8 | let e = d | |
9 | 9 | e | |
10 | 10 | } | |
11 | 11 | else 0 | |
12 | 12 | } | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func f (c) = { | |
16 | 16 | let d = getInteger(this, c) | |
17 | 17 | if ($isInstanceOf(d, "Int")) | |
18 | 18 | then { | |
19 | 19 | let e = d | |
20 | 20 | e | |
21 | 21 | } | |
22 | 22 | else 0 | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func g (c) = { | |
27 | 27 | let d = getString(this, c) | |
28 | 28 | if ($isInstanceOf(d, "String")) | |
29 | 29 | then { | |
30 | 30 | let e = d | |
31 | 31 | e | |
32 | 32 | } | |
33 | 33 | else "" | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | let h = "_" | |
38 | 38 | ||
39 | 39 | let i = 100000000 | |
40 | 40 | ||
41 | 41 | let j = "canceled" | |
42 | 42 | ||
43 | 43 | let k = "new" | |
44 | 44 | ||
45 | 45 | let l = "filled" | |
46 | 46 | ||
47 | 47 | let m = "orderbook" | |
48 | 48 | ||
49 | 49 | let n = "order_price_" | |
50 | 50 | ||
51 | 51 | let o = "order_total_" | |
52 | 52 | ||
53 | 53 | let p = "order_filled_total_" | |
54 | 54 | ||
55 | 55 | let q = "order_owner_" | |
56 | 56 | ||
57 | 57 | let r = "order_height_" | |
58 | 58 | ||
59 | 59 | let s = "order_status_" | |
60 | 60 | ||
61 | 61 | let t = "price" | |
62 | 62 | ||
63 | 63 | let u = "bond_asset_id" | |
64 | 64 | ||
65 | 65 | let v = "neutrino_asset_id" | |
66 | 66 | ||
67 | 67 | let w = "neutrino_contract" | |
68 | 68 | ||
69 | 69 | func x (y) = (n + y) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func z (y) = (o + y) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func A (y) = (q + y) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func B (y) = (r + y) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func C (y) = (s + y) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func D (y) = (p + y) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | let E = fromBase58String(g(v)) | |
88 | 88 | ||
89 | 89 | let F = fromBase58String(g(u)) | |
90 | 90 | ||
91 | 91 | let G = g(w) | |
92 | 92 | ||
93 | 93 | let H = a(G, t) | |
94 | 94 | ||
95 | 95 | let I = g(m) | |
96 | 96 | ||
97 | 97 | let J = wavesBalance(addressFromStringValue(G)) | |
98 | 98 | ||
99 | 99 | let K = { | |
100 | 100 | let L = extract(assetInfo(E)) | |
101 | 101 | (L.quantity - assetBalance(addressFromStringValue(G), E)) | |
102 | 102 | } | |
103 | 103 | ||
104 | 104 | func M (N) = f(x(N)) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func O (N) = f(z(N)) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func P (N) = g(A(N)) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func Q (N) = g(C(N)) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func R (N) = f(D(N)) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func S (N) = (N + h) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func T (y,U) = { | |
123 | 123 | let V = split(I, h) | |
124 | 124 | let W = S(y) | |
125 | 125 | if ((U == 0)) | |
126 | 126 | then (W + I) | |
127 | 127 | else if ((U >= (size(V) - 1))) | |
128 | 128 | then (I + W) | |
129 | 129 | else { | |
130 | 130 | let X = split(I, S(V[U])) | |
131 | 131 | (((X[0] + W) + S(V[U])) + X[1]) | |
132 | 132 | } | |
133 | 133 | } | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func Y (y) = { | |
137 | 137 | let X = split(I, S(y)) | |
138 | 138 | (X[0] + X[1]) | |
139 | 139 | } | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | @Callable(Z) | |
143 | 143 | func setOrder (H,U) = { | |
144 | 144 | let aa = extract(Z.payment) | |
145 | 145 | let ab = toBase58String(keccak256((((toBytes(H) + toBytes(aa.amount)) + Z.caller.bytes) + toBytes(height)))) | |
146 | 146 | if ((aa.assetId != E)) | |
147 | 147 | then throw("can use neutrino only") | |
148 | 148 | else if ((0 >= H)) | |
149 | 149 | then throw("price less zero") | |
150 | 150 | else if ((P(ab) != "")) | |
151 | 151 | then throw("order exists") | |
152 | 152 | else { | |
153 | 153 | let V = split(I, h) | |
154 | 154 | let ac = if ((U == 0)) | |
155 | 155 | then "" | |
156 | 156 | else V[(U - 1)] | |
157 | 157 | let ad = M(ac) | |
158 | 158 | let ae = if (if ((ac != "")) | |
159 | 159 | then (H > ad) | |
160 | 160 | else false) | |
161 | 161 | then true | |
162 | 162 | else false | |
163 | 163 | let af = V[U] | |
164 | 164 | let ag = M(af) | |
165 | 165 | let ah = if ((ag >= H)) | |
166 | 166 | then true | |
167 | 167 | else false | |
168 | 168 | if (if (ae) | |
169 | 169 | then true | |
170 | 170 | else ah) | |
171 | 171 | then throw(((("invalid order isPrevOrderError:" + toString(ah)) + " isNextOrderError:") + toString(ae))) | |
172 | 172 | else WriteSet([DataEntry(m, T(ab, U)), DataEntry(x(ab), H), DataEntry(z(ab), aa.amount), DataEntry(A(ab), toString(Z.caller)), DataEntry(B(ab), height), DataEntry(C(ab), k)]) | |
173 | 173 | } | |
174 | 174 | } | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | ||
178 | 178 | @Callable(Z) | |
179 | 179 | func cancelOrder (y) = { | |
180 | 180 | let ai = P(y) | |
181 | 181 | let aj = (O(y) - R(y)) | |
182 | 182 | if ((ai != toString(Z.caller))) | |
183 | 183 | then throw("permission denied") | |
184 | 184 | else ScriptResult(WriteSet([DataEntry(m, Y(y)), DataEntry(C(y), j)]), TransferSet([ScriptTransfer(Z.caller, aj, E)])) | |
185 | 185 | } | |
186 | 186 | ||
187 | 187 | ||
188 | 188 | ||
189 | 189 | @Callable(Z) | |
190 | 190 | func executeOrder () = { | |
191 | 191 | let ak = assetBalance(this, F) | |
192 | 192 | let al = ((K - ((J * H) / 100)) / i) | |
193 | 193 | let am = if ((0 >= al)) | |
194 | 194 | then 0 | |
195 | 195 | else al | |
196 | 196 | let an = if ((am >= ak)) | |
197 | 197 | then ak | |
198 | 198 | else am | |
199 | 199 | let ao = if ((am >= ak)) | |
200 | 200 | then 0 | |
201 | 201 | else (ak - am) | |
202 | 202 | if ((an == 0)) | |
203 | 203 | then TransferSet([ScriptTransfer(addressFromStringValue(G), ao, F)]) | |
204 | 204 | else { | |
205 | 205 | let y = split(I, h)[0] | |
206 | 206 | let ap = R(y) | |
207 | 207 | let aq = O(y) | |
208 | 208 | let ar = M(y) | |
209 | 209 | let as = P(y) | |
210 | 210 | let aj = ((((aq - ap) * 100) / ar) / i) | |
211 | 211 | let at = if ((an >= aj)) | |
212 | 212 | then Y(y) | |
213 | 213 | else I | |
214 | 214 | let au = if ((an >= aj)) | |
215 | 215 | then aj | |
216 | 216 | else an | |
217 | 217 | let av = (((au * ar) / 100) * i) | |
218 | 218 | let aw = if ((an >= aj)) | |
219 | 219 | then l | |
220 | 220 | else k | |
221 | 221 | ScriptResult(WriteSet([DataEntry(m, at), DataEntry(D(y), (ap + av)), DataEntry(C(y), aw)]), TransferSet([ScriptTransfer(addressFromStringValue(as), au, F), ScriptTransfer(addressFromStringValue(G), av, E)])) | |
222 | 222 | } | |
223 | 223 | } | |
224 | 224 | ||
225 | 225 |
github/deemru/w8io/026f985 36.24 ms ◑