tx · 82ff7UF6vdzGVw5Tiiv39a3tZj31vA1JngQFmQY9dXmc 3NC8pQxcnDTtDkhzv5Eje8qqW4qoFawLnAb: -0.01400000 Waves 2019.09.17 17:51 [680387] smart account 3NC8pQxcnDTtDkhzv5Eje8qqW4qoFawLnAb > SELF 0.00000000 Waves
{ "type": 13, "id": "82ff7UF6vdzGVw5Tiiv39a3tZj31vA1JngQFmQY9dXmc", "fee": 1400000, "feeAssetId": null, "timestamp": 1568731990543, "version": 1, "sender": "3NC8pQxcnDTtDkhzv5Eje8qqW4qoFawLnAb", "senderPublicKey": "5vyi92HdgdTabKCQzDHGrgQ4ASjtoT3XrCUXr459sWuc", "proofs": [ "4pDsSzmYthTFTCobGb4Z77dxKoAt1N61pCqz64aXSY4RMWKEZgBmhSBxh1wwnBXiQh6xbcMAb61ddZTXGuGYesyz" ], "script": "base64:AAIDAAAAAAAAAAAAAAAjAAAAAAROT05FAgAAAAABAAAAGGdldE51bWJlckJ5QWRkcmVzc0FuZEtleQAAAAIAAAAHYWRkcmVzcwAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAAdhZGRyZXNzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hd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V0BAAAAAZzdGF0dXMDCQAAZwAAAAIFAAAACmJvbmRBbW91bnQFAAAABmFtb3VudAUAAAAGRklMTEVEBQAAAANORVcJAQAAAAxTY3JpcHRSZXN1bHQAAAACCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAAxPcmRlckJvb2tLZXkFAAAADG5ld09yZGVyYm9vawkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAABNPcmRlckZpbGxlZFRvdGFsS2V5BQAAAAdvcmRlcklkCQAAZAAAAAIFAAAAC2ZpbGxlZFRvdGFsBQAAAAV0b3RhbAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAA5PcmRlclN0YXR1c0tleQUAAAAHb3JkZXJJZAUAAAAGc3RhdHVzBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAxmaWxsZWRBbW91bnQFAAAAC0JvbmRBc3NldElkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAAQTmV1dHJpbm9Db250cmFjdAUAAAAFdG90YWwFAAAAD05ldXRyaW5vQXNzZXRJZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAEFAAAAEE5ldXRyaW5vQ29udHJhY3QFAAAADHJldHVybkFtb3VudAUAAAALQm9uZEFzc2V0SWQFAAAAA25pbAAAAAC/Mpf5", "chainId": 84, "height": 680387, "spentComplexity": 0 } View: original | compacted Prev: AvNmEXL9mz6UCxcT6Hv42SYb7F2zBCH8XL2uKY9Tdzms Next: 3R3ndyHFpNWsWLCyQtSqBrwbeHp56eG5pnaabFnFX5YD 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 = "neutrino_supply" | |
62 | 62 | ||
63 | 63 | let u = "waves_reserve" | |
64 | 64 | ||
65 | 65 | let v = h(i) | |
66 | 66 | ||
67 | 67 | func w (x) = g((j + x)) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func y (x) = g((k + x)) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func z (x) = h((m + x)) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func A (x) = h((o + x)) | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func B (x) = g((l + x)) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | let C = h(s) | |
83 | 83 | ||
84 | 84 | let D = b(C, u) | |
85 | 85 | ||
86 | 86 | let E = b(C, t) | |
87 | 87 | ||
88 | 88 | let F = b(C, p) | |
89 | 89 | ||
90 | 90 | let G = "_" | |
91 | 91 | ||
92 | 92 | let H = fromBase58String(h(q)) | |
93 | 93 | ||
94 | 94 | let I = fromBase58String(h(r)) | |
95 | 95 | ||
96 | 96 | let J = 100000000 | |
97 | 97 | ||
98 | 98 | let K = "canceled" | |
99 | 99 | ||
100 | 100 | let L = "new" | |
101 | 101 | ||
102 | 102 | let M = "filled" | |
103 | 103 | ||
104 | 104 | func N (O,P) = { | |
105 | 105 | let Q = split(v, G) | |
106 | 106 | let R = (O + G) | |
107 | 107 | if ((P == 0)) | |
108 | 108 | then (R + v) | |
109 | 109 | else if ((P >= (size(Q) - 1))) | |
110 | 110 | then (v + R) | |
111 | 111 | else { | |
112 | 112 | let S = split(v, (Q[P] + G)) | |
113 | 113 | (((S[0] + R) + (Q[P] + G)) + S[1]) | |
114 | 114 | } | |
115 | 115 | } | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | @Callable(T) | |
119 | 119 | func setOrder (F,P) = { | |
120 | 120 | let U = extract(T.payment) | |
121 | 121 | let V = toBase58String(keccak256((((toBytes(F) + toBytes(U.amount)) + T.caller.bytes) + toBytes(height)))) | |
122 | 122 | if ((U.assetId != I)) | |
123 | 123 | then throw("can use neutrino only") | |
124 | 124 | else if ((0 >= F)) | |
125 | 125 | then throw("price less zero") | |
126 | 126 | else if ((z(V) != a)) | |
127 | 127 | then throw("order exists") | |
128 | 128 | else { | |
129 | 129 | let Q = split(v, G) | |
130 | 130 | let W = if ((P == 0)) | |
131 | 131 | then "" | |
132 | 132 | else Q[(P - 1)] | |
133 | 133 | let X = w(W) | |
134 | 134 | let Y = if (if ((W != "")) | |
135 | 135 | then (F > X) | |
136 | 136 | else false) | |
137 | 137 | then true | |
138 | 138 | else false | |
139 | 139 | let Z = Q[P] | |
140 | 140 | let aa = w(Z) | |
141 | 141 | let ab = if ((aa >= F)) | |
142 | 142 | then true | |
143 | 143 | else false | |
144 | 144 | if (if (Y) | |
145 | 145 | then true | |
146 | 146 | else ab) | |
147 | 147 | then throw(((("invalid order isPrevOrderError:" + toString(ab)) + " isNextOrderError:") + toString(Y))) | |
148 | 148 | else WriteSet([DataEntry(i, N(V, P)), DataEntry((j + V), F), DataEntry((k + V), U.amount), DataEntry((m + V), toString(T.caller)), DataEntry((n + V), height), DataEntry((o + V), L)]) | |
149 | 149 | } | |
150 | 150 | } | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | ||
154 | 154 | @Callable(T) | |
155 | 155 | func cancelOrder (O) = { | |
156 | 156 | let ac = z(O) | |
157 | 157 | let ad = (y(O) - B(O)) | |
158 | 158 | if ((ac != toString(T.caller))) | |
159 | 159 | then throw("permission denied") | |
160 | 160 | else { | |
161 | 161 | let S = split(v, (O + G)) | |
162 | 162 | ScriptResult(WriteSet([DataEntry(i, (S[0] + S[1])), DataEntry((o + O), K)]), TransferSet([ScriptTransfer(T.caller, ad, I)])) | |
163 | 163 | } | |
164 | 164 | } | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | ||
168 | 168 | @Callable(T) | |
169 | 169 | func executeOrder () = { | |
170 | 170 | let O = split(v, G)[0] | |
171 | 171 | let ae = assetBalance(this, H) | |
172 | 172 | let af = ((E - ((D * F) / 100)) / J) | |
173 | 173 | let ag = if ((af >= ae)) | |
174 | 174 | then ae | |
175 | 175 | else af | |
176 | 176 | let ah = if ((af >= ae)) | |
177 | 177 | then 0 | |
178 | 178 | else (ae - af) | |
179 | 179 | if ((ag == 0)) | |
180 | 180 | then TransferSet([ScriptTransfer(addressFromStringValue(C), ah, H)]) | |
181 | 181 | else { | |
182 | 182 | let ai = B(O) | |
183 | 183 | let aj = y(O) | |
184 | 184 | let ak = w(O) | |
185 | 185 | let ad = ((((aj - ai) * 100) / ak) / J) | |
186 | 186 | let al = if ((ag >= ad)) | |
187 | 187 | then split(v, (O + G))[1] | |
188 | 188 | else v | |
189 | 189 | let am = if ((ag >= ad)) | |
190 | 190 | then ad | |
191 | 191 | else ag | |
192 | 192 | let an = (((am * ak) / 100) * J) | |
193 | 193 | let ao = if ((ag >= ad)) | |
194 | 194 | then M | |
195 | 195 | else L | |
196 | 196 | ScriptResult(WriteSet([DataEntry(i, al), DataEntry((l + O), (ai + an)), DataEntry((o + O), ao)]), TransferSet([ScriptTransfer(T.caller, am, H), ScriptTransfer(addressFromStringValue(C), an, I), ScriptTransfer(addressFromStringValue(C), ah, H)])) | |
197 | 197 | } | |
198 | 198 | } | |
199 | 199 | ||
200 | 200 |
github/deemru/w8io/169f3d6 39.48 ms ◑