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