tx · 6c2P7kdQjRgRKy34VFUuH5uycQUApwXfdyrsGBSAoiXq

3MuTR6FqVriefgvXkJtNxj8CNh3nBbuqidJ:  -0.01400000 Waves

2019.09.27 23:00 [695284] smart account 3MuTR6FqVriefgvXkJtNxj8CNh3nBbuqidJ > SELF 0.00000000 Waves

{ "type": 13, "id": "6c2P7kdQjRgRKy34VFUuH5uycQUApwXfdyrsGBSAoiXq", "fee": 1400000, "feeAssetId": null, "timestamp": 1569614456307, "version": 1, "sender": "3MuTR6FqVriefgvXkJtNxj8CNh3nBbuqidJ", "senderPublicKey": "7Egc9nr6FA2hbNNbo8H21n8htzQ5nYzsLc6eku6JU5pn", "proofs": [ "2j939BmcH771yw4fwmXudY6r8Lk94XHNmT1jCvtMPFmrgNCCUv3gdrxzzgV1VWw8Jq7uhk3Kda5RaSw2b5gDhXBq" ], "script": "base64:AAIDAAAAAAAAAAAAAAAoAQAAABhnZXROdW1iZXJCeUFkZHJlc3NBbmRLZXkAAAACAAAAB2FkZHJlc3MAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAAHYWRkcmVzcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAABAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAABAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAA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YXRhRW50cnkAAAACBQAAAAxPcmRlckJvb2tLZXkFAAAADG5ld09yZGVyYm9vawkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAFmdldE9yZGVyRmlsbGVkVG90YWxLZXkAAAABBQAAAAdvcmRlcklkCQAAZAAAAAIFAAAAC2ZpbGxlZFRvdGFsBQAAAAV0b3RhbAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAEWdldE9yZGVyU3RhdHVzS2V5AAAAAQUAAAAHb3JkZXJJZAUAAAAGc3RhdHVzBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAApvcmRlck93bmVyBQAAAAxmaWxsZWRBbW91bnQFAAAAC2JvbmRBc3NldElkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAAQbmV1dHJpbm9Db250cmFjdAUAAAAFdG90YWwFAAAAD25ldXRyaW5vQXNzZXRJZAUAAAADbmlsAAAAAAfET2o=", "chainId": 84, "height": 695284, "spentComplexity": 0 } View: original | compacted Prev: AsNFd69NnkoKX7UCP1WttdkZHEEyPL5mxPdfpfSLzQP9 Next: DJEQVQty694sMLyJ5Sm3GEDZkGLex32FZLsFHqc8516i Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func a (b,c) = {
55 let d = getInteger(addressFromStringValue(b), c)
66 if ($isInstanceOf(d, "Int"))
77 then {
88 let e = d
99 e
1010 }
1111 else 0
1212 }
1313
1414
1515 func f (c) = {
1616 let d = getInteger(this, c)
1717 if ($isInstanceOf(d, "Int"))
1818 then {
1919 let e = d
2020 e
2121 }
2222 else 0
2323 }
2424
2525
2626 func g (c) = {
2727 let d = getString(this, c)
2828 if ($isInstanceOf(d, "String"))
2929 then {
3030 let e = d
3131 e
3232 }
3333 else ""
3434 }
3535
3636
3737 let h = "_"
3838
3939 let i = 100000000
4040
4141 let j = "canceled"
4242
4343 let k = "new"
4444
4545 let l = "filled"
4646
4747 let m = "orderbook"
4848
4949 let n = "order_price_"
5050
5151 let o = "order_total_"
5252
5353 let p = "order_filled_total_"
5454
5555 let q = "order_owner_"
5656
5757 let r = "order_height_"
5858
5959 let s = "order_status_"
6060
6161 let t = "price"
6262
6363 let u = "bond_asset_id"
6464
6565 let v = "neutrino_asset_id"
6666
6767 let w = "neutrino_contract"
6868
6969 func x (y) = (n + y)
7070
7171
7272 func z (y) = (o + y)
7373
7474
7575 func A (y) = (q + y)
7676
7777
7878 func B (y) = (r + y)
7979
8080
8181 func C (y) = (s + y)
8282
8383
8484 func D (y) = (p + y)
8585
8686
8787 let E = fromBase58String(g(v))
8888
8989 let F = fromBase58String(g(u))
9090
9191 let G = g(w)
9292
9393 let H = a(G, t)
9494
9595 let I = g(m)
9696
9797 let J = wavesBalance(addressFromStringValue(G))
9898
9999 let K = {
100100 let L = extract(assetInfo(E))
101101 (L.quantity - assetBalance(addressFromStringValue(G), E))
102102 }
103103
104104 func M (N) = f(x(N))
105105
106106
107107 func O (N) = f(z(N))
108108
109109
110110 func P (N) = g(A(N))
111111
112112
113113 func Q (N) = g(C(N))
114114
115115
116116 func R (N) = f(D(N))
117117
118118
119119 func S (N) = (N + h)
120120
121121
122122 func T (y,U) = {
123123 let V = split(I, h)
124124 let W = S(y)
125125 if ((U == 0))
126126 then (W + I)
127127 else if ((U >= (size(V) - 1)))
128128 then (I + W)
129129 else {
130130 let X = split(I, S(V[U]))
131131 (((X[0] + W) + S(V[U])) + X[1])
132132 }
133133 }
134134
135135
136136 func Y (y) = {
137137 let X = split(I, S(y))
138138 (X[0] + X[1])
139139 }
140140
141141
142142 @Callable(Z)
143143 func setOrder (H,U) = {
144144 let aa = extract(Z.payment)
145145 let ab = toBase58String(keccak256((((toBytes(H) + toBytes(aa.amount)) + Z.caller.bytes) + toBytes(height))))
146146 if ((aa.assetId != E))
147147 then throw("can use neutrino only")
148148 else if ((0 >= H))
149149 then throw("price less zero")
150150 else if ((P(ab) != ""))
151151 then throw("order exists")
152152 else {
153153 let V = split(I, h)
154154 let ac = if ((U == 0))
155155 then ""
156156 else V[(U - 1)]
157157 let ad = M(ac)
158158 let ae = if (if ((ac != ""))
159159 then (H > ad)
160160 else false)
161161 then true
162162 else false
163163 let af = V[U]
164164 let ag = M(af)
165165 let ah = if ((ag >= H))
166166 then true
167167 else false
168168 if (if (ae)
169169 then true
170170 else ah)
171171 then throw(((("invalid order isPrevOrderError:" + toString(ah)) + " isNextOrderError:") + toString(ae)))
172172 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)])
173173 }
174174 }
175175
176176
177177
178178 @Callable(Z)
179179 func cancelOrder (y) = {
180180 let ai = P(y)
181181 let aj = (O(y) - R(y))
182182 if ((ai != toString(Z.caller)))
183183 then throw("permission denied")
184184 else ScriptResult(WriteSet([DataEntry(m, Y(y)), DataEntry(C(y), j)]), TransferSet([ScriptTransfer(Z.caller, aj, E)]))
185185 }
186186
187187
188188
189189 @Callable(Z)
190190 func executeOrder () = {
191191 let ak = assetBalance(this, F)
192192 let al = ((K - ((J * H) / 100)) / i)
193193 let am = if ((0 >= al))
194194 then 0
195195 else al
196196 let an = if ((am >= ak))
197197 then ak
198198 else am
199199 let ao = if ((am >= ak))
200200 then 0
201201 else (ak - am)
202202 if ((an == 0))
203203 then TransferSet([ScriptTransfer(addressFromStringValue(G), ao, F)])
204204 else {
205205 let y = split(I, h)[0]
206206 let ap = R(y)
207207 let aq = O(y)
208208 let ar = M(y)
209209 let as = P(y)
210210 let aj = ((((aq - ap) * 100) / ar) / i)
211211 let at = if ((an >= aj))
212212 then Y(y)
213213 else I
214214 let au = if ((an >= aj))
215215 then aj
216216 else an
217217 let av = (((au * ar) / 100) * i)
218218 let aw = if ((an >= aj))
219219 then l
220220 else k
221221 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)]))
222222 }
223223 }
224224
225225

github/deemru/w8io/026f985 
33.06 ms