tx · FVPaHXec7ajAhMnNV7tjE3bu8Wyc79ZRhCTVub361eZt

3NC8pQxcnDTtDkhzv5Eje8qqW4qoFawLnAb:  -0.01000000 Waves

2019.08.27 19:39 [649853] smart account 3NC8pQxcnDTtDkhzv5Eje8qqW4qoFawLnAb > SELF 0.00000000 Waves

{ "type": 13, "id": "FVPaHXec7ajAhMnNV7tjE3bu8Wyc79ZRhCTVub361eZt", "fee": 1000000, "feeAssetId": null, "timestamp": 1566924021695, "version": 1, "sender": "3NC8pQxcnDTtDkhzv5Eje8qqW4qoFawLnAb", "senderPublicKey": "5vyi92HdgdTabKCQzDHGrgQ4ASjtoT3XrCUXr459sWuc", "proofs": [ "4oQ2WEfjpCtJd52Ho4NxrADaREuSpkPVZRvp66ZofMFP7SM2KojRRnxMY17zrvWe8WSV5HKQosq1Kd1yCDj5EpNV" ], "script": "base64:AAIDAAAAAAAAAAAAAAAUAAAAAAROT05FAgAAAAABAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAABAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEFAAAABE5PTkUAAAAADE9yZGVyQm9va0tleQIAAAAJb3JkZXJib29rAAAAAA1PcmRlclByaWNlS2V5AgAAAAxvcmRlcl9wcmljZV8AAAAADk9yZGVyQW1vdW50S2V5AgAAAA1vcmRlcl9hbW91bnRfAAAAAA1PcmRlck93bmVyS2V5AgAAAAxvcmRlcl9vd25lcl8AAAAADk9yZGVySGVpZ2h0S2V5AgAAAA1vcmRlcl9oZW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vdGFsBQAAAAtCb25kQXNzZXRJZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAEFAAAAEE5ldXRyaW5vQ29udHJhY3QFAAAAC29yZGVyQW1vdW50BQAAAA9OZXV0cmlub0Fzc2V0SWQFAAAAA25pbAkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAOT3JkZXJBbW91bnRLZXkFAAAAB29yZGVySWQJAABlAAAAAgUAAAAFdG90YWwFAAAADW5ld0JvbmRBbW91bnQFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAADW5ld0JvbmRBbW91bnQFAAAAC0JvbmRBc3NldElkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAAQTmV1dHJpbm9Db250cmFjdAkAAGkAAAACCQAAaAAAAAIJAABpAAAAAgUAAAANbmV3Qm9uZEFtb3VudAUAAAAKb3JkZXJQcmljZQAAAAAAAAAAZAUAAAAHV2F2ZWxldAUAAAAPTmV1dHJpbm9Bc3NldElkBQAAAANuaWwAAAAAvUIuvw==", "chainId": 84, "height": 649853, "spentComplexity": 0 } View: original | compacted Prev: none Next: 7Lep4Rd7gRnjTvNbfeVPCfRQFc2t6Duy95ey9BfvgdV1 Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = ""
5+
6+func b (c) = {
7+ let d = getInteger(this, c)
8+ if ($isInstanceOf(d, "Int"))
9+ then {
10+ let e = d
11+ e
12+ }
13+ else 0
14+ }
15+
16+
17+func f (c) = {
18+ let d = getString(this, c)
19+ if ($isInstanceOf(d, "String"))
20+ then {
21+ let e = d
22+ e
23+ }
24+ else a
25+ }
26+
27+
28+let g = "orderbook"
29+
30+let h = "order_price_"
31+
32+let i = "order_amount_"
33+
34+let j = "order_owner_"
35+
36+let k = "order_height_"
37+
38+let l = "bond_asset_id"
39+
40+let m = "neutrino_asset_id"
41+
42+let n = "neutrino_contract_address"
43+
44+func o () = f(g)
45+
46+
47+func p (q) = b((h + q))
48+
49+
50+func r (q) = b((i + q))
51+
52+
53+func s (q) = f((j + q))
54+
55+
56+let t = "_"
57+
58+let u = fromBase58String(f(l))
59+
60+let v = fromBase58String(f(m))
61+
62+let w = f(n)
63+
64+let x = 100000000
65+
66+@Callable(y)
67+func setOrder (z,A) = {
68+ let B = o()
69+ let C = extract(y.payment)
70+ let D = toBase58String(keccak256((((toBytes(z) + toBytes(C.amount)) + y.caller.bytes) + toBytes(height))))
71+ if ((C.assetId != v))
72+ then throw("can use neutrino only")
73+ else if ((s(D) != a))
74+ then throw("order exists")
75+ else if ((B == a))
76+ then WriteSet([DataEntry(g, (t + D)), DataEntry((h + D), z), DataEntry((i + D), C.amount), DataEntry((j + D), toString(y.caller)), DataEntry((k + D), height)])
77+ else if ((A == 0))
78+ then {
79+ let E = split(B, t)[1]
80+ let F = p(E)
81+ if ((z > F))
82+ then WriteSet([DataEntry(g, ((t + D) + B)), DataEntry((h + D), z), DataEntry((i + D), C.amount), DataEntry((j + D), toString(y.caller)), DataEntry((k + D), height)])
83+ else throw("invalid price prev order")
84+ }
85+ else {
86+ let G = split(B, t)
87+ let H = G[A]
88+ let I = p(H)
89+ if ((z > I))
90+ then throw("invalid price next order")
91+ else if (((A + 1) >= size(G)))
92+ then WriteSet([DataEntry(g, ((B + t) + D)), DataEntry((h + D), z), DataEntry((i + D), C.amount), DataEntry((j + D), toString(y.caller)), DataEntry((k + D), height)])
93+ else {
94+ let E = G[(A + 1)]
95+ let F = p(E)
96+ if ((z > F))
97+ then {
98+ let J = split(B, H)[0]
99+ let K = split(B, H)[1]
100+ WriteSet([DataEntry(g, ((((J + H) + t) + D) + K)), DataEntry((h + D), z), DataEntry((i + D), C.amount), DataEntry((j + D), toString(y.caller)), DataEntry((k + D), height)])
101+ }
102+ else throw("invalid price prev order")
103+ }
104+ }
105+ }
106+
107+
108+
109+@Callable(y)
110+func cancelOrder (L) = {
111+ let B = o()
112+ let M = s(L)
113+ let N = r(L)
114+ if ((M != toString(y.caller)))
115+ then throw("permission denied")
116+ else {
117+ let J = split(B, (t + L))[0]
118+ let K = split(B, (t + L))[1]
119+ ScriptResult(WriteSet([DataEntry(g, (J + K)), DataEntry((h + L), 0), DataEntry((i + L), 0)]), TransferSet([ScriptTransfer(y.caller, N, v)]))
120+ }
121+ }
122+
123+
124+
125+@Callable(y)
126+func execute () = {
127+ let B = o()
128+ let L = split(B, t)[1]
129+ let O = r(L)
130+ let P = p(L)
131+ let Q = (((O / P) * 100) / x)
132+ let R = assetBalance(this, u)
133+ if ((R >= Q))
134+ then {
135+ let K = split(B, (t + L))[1]
136+ ScriptResult(WriteSet([DataEntry(g, K), DataEntry((h + L), 0), DataEntry((i + L), 0)]), TransferSet([ScriptTransfer(y.caller, Q, u), ScriptTransfer(addressFromStringValue(w), O, v)]))
137+ }
138+ else ScriptResult(WriteSet([DataEntry((i + L), (Q - R))]), TransferSet([ScriptTransfer(y.caller, R, u), ScriptTransfer(addressFromStringValue(w), (((R / P) * 100) / x), v)]))
139+ }
140+
141+

github/deemru/w8io/169f3d6 
26.54 ms