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:AAIDAAAAAAAAAAAAAAAcAAAAAAROT05FAgAAAAABAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAABAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEFAAAABE5PTkUAAAAADE9yZGVyQm9va0tleQIAAAAJb3JkZXJib29rAAAAAA1PcmRlclByaWNlS2V5AgAAAAxvcmRlcl9wcmljZV8AAAAADU9yZGVyVG90YWxLZXkCAAAADG9yZGVyX3RvdGFsXwAAAAATT3JkZXJGaWxsZWRUb3RhbEtleQIAAAATb3JkZXJfZmlsbGVkX3RvdGFsXwAAAAANT3JkZXJPd25lcktleQIAAAAMb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29yZGVySWQJAABkAAAAAgUAAAALZmlsbGVkVG90YWwFAAAABXRvdGFsCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAADk9yZGVyU3RhdHVzS2V5BQAAAAdvcmRlcklkBQAAAAZzdGF0dXMFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAADGZpbGxlZEFtb3VudAUAAAALQm9uZEFzc2V0SWQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAABBOZXV0cmlub0NvbnRyYWN0BQAAAAV0b3RhbAUAAAAPTmV1dHJpbm9Bc3NldElkBQAAAANuaWwAAAAALuLM1Q==", "chainId": 84, "height": 678783, "spentComplexity": 0 } View: original | compacted Prev: A81CkduwFsXS6Jzh3DhkM9yziFZBLH2mxfXZSAsnaLPX Next: 2xvABcx3A9ckkWt3o1qnJ3C6iTMQD1yqucS1UE2LDHWH Diff:
OldNewDifferences
143143
144144
145145 @Callable(L)
146-func execute () = {
146+func executeOrder () = {
147147 let G = split(q, x)[0]
148148 let X = assetBalance(this, y)
149149 let Y = w(G)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = ""
55
66 func b (c) = {
77 let d = getInteger(this, c)
88 if ($isInstanceOf(d, "Int"))
99 then {
1010 let e = d
1111 e
1212 }
1313 else 0
1414 }
1515
1616
1717 func f (c) = {
1818 let d = getString(this, c)
1919 if ($isInstanceOf(d, "String"))
2020 then {
2121 let e = d
2222 e
2323 }
2424 else a
2525 }
2626
2727
2828 let g = "orderbook"
2929
3030 let h = "order_price_"
3131
3232 let i = "order_total_"
3333
3434 let j = "order_filled_total_"
3535
3636 let k = "order_owner_"
3737
3838 let l = "order_height_"
3939
4040 let m = "order_status_"
4141
4242 let n = "bond_asset_id"
4343
4444 let o = "neutrino_asset_id"
4545
4646 let p = "neutrino_contract"
4747
4848 let q = f(g)
4949
5050 func r (s) = b((h + s))
5151
5252
5353 func t (s) = b((i + s))
5454
5555
5656 func u (s) = f((k + s))
5757
5858
5959 func v (s) = f((m + s))
6060
6161
6262 func w (s) = b((j + s))
6363
6464
6565 let x = "_"
6666
6767 let y = fromBase58String(f(n))
6868
6969 let z = fromBase58String(f(o))
7070
7171 let A = f(p)
7272
7373 let B = 100000000
7474
7575 let C = "canceled"
7676
7777 let D = "new"
7878
7979 let E = "filled"
8080
8181 func F (G,H) = {
8282 let I = split(q, x)
8383 let J = (G + x)
8484 if ((H == 0))
8585 then (J + q)
8686 else if ((H >= (size(I) - 1)))
8787 then (q + J)
8888 else {
8989 let K = split(q, (I[H] + x))
9090 (((K[0] + J) + (I[H] + x)) + K[1])
9191 }
9292 }
9393
9494
9595 @Callable(L)
9696 func setOrder (M,H) = {
9797 let N = extract(L.payment)
9898 let O = toBase58String(keccak256((((toBytes(M) + toBytes(N.amount)) + L.caller.bytes) + toBytes(height))))
9999 if ((N.assetId != z))
100100 then throw("can use neutrino only")
101101 else if ((0 >= M))
102102 then throw("price less zero")
103103 else if ((u(O) != a))
104104 then throw("order exists")
105105 else {
106106 let I = split(q, x)
107107 let P = if ((H == 0))
108108 then ""
109109 else I[(H - 1)]
110110 let Q = r(P)
111111 let R = if (if ((P != ""))
112112 then (M > Q)
113113 else false)
114114 then true
115115 else false
116116 let S = I[H]
117117 let T = r(S)
118118 let U = if ((T >= M))
119119 then true
120120 else false
121121 if (if (R)
122122 then true
123123 else U)
124124 then throw(((("invalid order isPrevOrderError:" + toString(U)) + " isNextOrderError:") + toString(R)))
125125 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)])
126126 }
127127 }
128128
129129
130130
131131 @Callable(L)
132132 func cancelOrder (G) = {
133133 let V = u(G)
134134 let W = (t(G) - w(G))
135135 if ((V != toString(L.caller)))
136136 then throw("permission denied")
137137 else {
138138 let K = split(q, (G + x))
139139 ScriptResult(WriteSet([DataEntry(g, (K[0] + K[1])), DataEntry((m + G), C)]), TransferSet([ScriptTransfer(L.caller, W, z)]))
140140 }
141141 }
142142
143143
144144
145145 @Callable(L)
146-func execute () = {
146+func executeOrder () = {
147147 let G = split(q, x)[0]
148148 let X = assetBalance(this, y)
149149 let Y = w(G)
150150 let Z = t(G)
151151 let aa = r(G)
152152 let W = ((((Z - Y) * 100) / aa) / B)
153153 let ab = if ((X >= W))
154154 then split(q, (G + x))[1]
155155 else q
156156 let ac = if ((X >= W))
157157 then W
158158 else X
159159 let ad = (((ac * aa) / 100) * B)
160160 let ae = if ((X >= W))
161161 then E
162162 else D
163163 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)]))
164164 }
165165
166166

github/deemru/w8io/169f3d6 
34.92 ms