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