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