tx · Cypc9kVJFufe8gUmtjQiGZ4nyXVZWZ8dMeY46P85gCSG

3MwjJKGp7PLGJh7pzYrnrN9TnMXph6oL4nH:  -0.05000000 Waves

2019.11.25 10:42 [780497] smart account 3MwjJKGp7PLGJh7pzYrnrN9TnMXph6oL4nH > SELF 0.00000000 Waves

{ "type": 13, "id": "Cypc9kVJFufe8gUmtjQiGZ4nyXVZWZ8dMeY46P85gCSG", "fee": 5000000, "feeAssetId": null, "timestamp": 1574667614494, "version": 1, "sender": "3MwjJKGp7PLGJh7pzYrnrN9TnMXph6oL4nH", "senderPublicKey": "9Pw6KBYMgEWmrg24tEc8SkHPhMUBwRmHaJoKjWgDkUAK", "proofs": [ "5kJSRdSV4BvTBVhBmn8xGuSFxuLpuShQpUz2hW9WBJmJz6KmkVgARtDQ3Ei3exWkSHHNjr6z3D6LGziw1hbKToYW" ], "script": "base64:AAIDAAAAAAAAACIIARIDCgEIEgYKBAgICAESCgoICAgBAQEBCAgSBQoDCAgIAAAACgAAAAAETk9ORQIAAAAEbm9uZQAAAAAGb3JhY2xlCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAECAAAAIzNOQWNvZVdkVVRXbjhjc1hKUEc0N3YxRmp0amNmcXhiNXR1AAAAAAVhc2tJRAIAAAAFV0FWRVMAAAAABWJpZElEAgAAAAVVU0QtTgAAAAAGbWluUGlwAAAAAAAAD0JAAQAAAAhnZW5LZXlJRAAAAAEAAAAEYWRkcgkAAlgAAAABCQAB9wAAAAEJAAGbAAAAAQkAASwAAAACBQAAAARhZGRyCQAEJQAAAAEFAAAABHRoaXMBAAAAB2dlbkdyaWQAAAACAAAAAWEAAAABYgMJAAAAAAAAAgUAAAABYQIAAAAACQABpAAAAAEFAAAAAWIJAAEsAAAAAgkAASwAAAACBQAAAAFhAgAAAAF8CQABpAAAAAEFAAAAAWIBAAAAB2dlbkxpc3QAAAACAAAAAWEAAAABYgkABEwAAAACBQAAAAFiBQAAAAFhAQA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ABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAVrZXlJRAIAAAAJX3VwT3V0R1REAAAAAAAAAAAACQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAABWtleUlEAgAAAAtfZG93bk91dEdURAAAAAAAAAAAAAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAVrZXlJRAIAAAAHX3Byb2ZpdAAAAAAAAAAAAAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAVrZXlJRAIAAAAKX3Byb2ZpdEZlZQAAAAAAAAAAAAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAVrZXlJRAIAAAAIX2dyaWRBc2sCAAAADnVuZGVmaW5lZCBhc2tzCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAABWtleUlEAgAAAAhfZ3JpZEJpZAIAAAAOdW5kZWZpbmVkIGJpZHMJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAFa2V5SUQCAAAAC19ibG9ja1N0YXJ0AAAAAAAAAAAACQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAABWtleUlEAgAAAApfYmxvY2tTdG9wAAAAAAAAAAAACQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAABWtleUlEAgAAAAdfc3RhdHVzAgAAAAdjcmVhdGVkBQAAAANuaWwAAAAA7AToIQ==", "chainId": 84, "height": 780497, "spentComplexity": 0 } View: original | compacted Prev: ezK786AtEukUsTTp8RRB2VVYkxZQW63SUZqJZtboSYZ Next: A2tX6pNKMBQqB7AhvDfD282TDaN8RnL99xmYkSZAswib Diff:
OldNewDifferences
1919 else ((a + "|") + toString(b))
2020
2121
22-func genList (a,b) = a :: a
22+func genList (a,b) = b :: a
23+
24+
25+func genListInt (a,b) = {
26+ let parseB = parseIntValue(b)
27+(a[0] + 2) :: a
28+ }
29+
30+
31+func revListInt (a,b) = b :: a
2332
2433
2534 @Callable(i)
26-func createScalper (title,type,addr) = {
35+func sendGridAsk (gridA) = {
2736 let sender = toBase58String(i.caller.bytes)
28- let keyID = genKeyID(addr)
29- WriteSet([DataEntry((keyID + "_scalperID"), addr), DataEntry((keyID + "_title"), title), DataEntry((keyID + "_type"), type), DataEntry((keyID + "_fundraised"), 0), DataEntry((keyID + "_priceOpen"), 0), DataEntry((keyID + "_priceClose"), 0), DataEntry((keyID + "_upOutGTD"), 0), DataEntry((keyID + "_downOutGTD"), 0), DataEntry((keyID + "_profit"), 0), DataEntry((keyID + "_profitFee"), 0), DataEntry((keyID + "_grid"), 0), DataEntry((keyID + "_steps"), 0), DataEntry((keyID + "_ordering"), "middle"), DataEntry((keyID + "_reOrderOut"), "middle"), DataEntry((keyID + "_gridAsk"), "undefined asks"), DataEntry((keyID + "_gridBid"), "undefined bids"), DataEntry((keyID + "_lifetime"), 0), DataEntry((keyID + "_blockStart"), 0), DataEntry((keyID + "_blockStop"), 0), DataEntry((keyID + "_status"), "created")])
37+ let gridAsk = split(gridA, "|")
38+ let ver = {
39+ let $list779812 = gridAsk
40+ let $size779812 = size($list779812)
41+ let $acc0779812 = [69]
42+ if (($size779812 == 0))
43+ then $acc0779812
44+ else {
45+ let $acc1779812 = genListInt($acc0779812, $list779812[0])
46+ if (($size779812 == 1))
47+ then $acc1779812
48+ else {
49+ let $acc2779812 = genListInt($acc1779812, $list779812[1])
50+ if (($size779812 == 2))
51+ then $acc2779812
52+ else {
53+ let $acc3779812 = genListInt($acc2779812, $list779812[2])
54+ if (($size779812 == 3))
55+ then $acc3779812
56+ else {
57+ let $acc4779812 = genListInt($acc3779812, $list779812[3])
58+ if (($size779812 == 4))
59+ then $acc4779812
60+ else {
61+ let $acc5779812 = genListInt($acc4779812, $list779812[4])
62+ if (($size779812 == 5))
63+ then $acc5779812
64+ else {
65+ let $acc6779812 = genListInt($acc5779812, $list779812[5])
66+ if (($size779812 == 6))
67+ then $acc6779812
68+ else {
69+ let $acc7779812 = genListInt($acc6779812, $list779812[6])
70+ if (($size779812 == 7))
71+ then $acc7779812
72+ else {
73+ let $acc8779812 = genListInt($acc7779812, $list779812[7])
74+ if (($size779812 == 8))
75+ then $acc8779812
76+ else {
77+ let $acc9779812 = genListInt($acc8779812, $list779812[8])
78+ if (($size779812 == 9))
79+ then $acc9779812
80+ else {
81+ let $acc10779812 = genListInt($acc9779812, $list779812[9])
82+ if (($size779812 == 10))
83+ then $acc10779812
84+ else {
85+ let $acc11779812 = genListInt($acc10779812, $list779812[10])
86+ throw("List size exceed 10")
87+ }
88+ }
89+ }
90+ }
91+ }
92+ }
93+ }
94+ }
95+ }
96+ }
97+ }
98+ }
99+ WriteSet(nil)
30100 }
31101
32102
33103
34104 @Callable(i)
35-func defineScalping (title,grids,step) = {
105+func defineScalping (title,gridA,gridB,step) = {
36106 let sender = toBase58String(i.caller.bytes)
37107 let deposited = extract(i.payment)
38108 let keyID = genKeyID(sender)
40110 if ((100000000 >= deposited.amount))
41111 then throw(("Amount under of required: " + toString(deposited.amount)))
42112 else {
43- let foundAsk = (deposited.amount / 2)
44- let orderAsk = (foundAsk / (grids / 2))
45- let arr = [1, 2, 3, 4, 5]
46- let arrr = [1]
113+ let arr = [5, 4, 3, 2, 1]
47114 let ver = {
48- let $list21992223 = arr
49- let $size21992223 = size($list21992223)
50- let $acc021992223 = ""
51- if (($size21992223 == 0))
52- then $acc021992223
115+ let $list15311555 = arr
116+ let $size15311555 = size($list15311555)
117+ let $acc015311555 = nil
118+ if (($size15311555 == 0))
119+ then $acc015311555
53120 else {
54- let $acc121992223 = genGrid($acc021992223, $list21992223[0])
55- if (($size21992223 == 1))
56- then $acc121992223
121+ let $acc115311555 = genList($acc015311555, $list15311555[0])
122+ if (($size15311555 == 1))
123+ then $acc115311555
57124 else {
58- let $acc221992223 = genGrid($acc121992223, $list21992223[1])
59- if (($size21992223 == 2))
60- then $acc221992223
125+ let $acc215311555 = genList($acc115311555, $list15311555[1])
126+ if (($size15311555 == 2))
127+ then $acc215311555
61128 else {
62- let $acc321992223 = genGrid($acc221992223, $list21992223[2])
63- if (($size21992223 == 3))
64- then $acc321992223
129+ let $acc315311555 = genList($acc215311555, $list15311555[2])
130+ if (($size15311555 == 3))
131+ then $acc315311555
65132 else {
66- let $acc421992223 = genGrid($acc321992223, $list21992223[3])
67- if (($size21992223 == 4))
68- then $acc421992223
133+ let $acc415311555 = genList($acc315311555, $list15311555[3])
134+ if (($size15311555 == 4))
135+ then $acc415311555
69136 else {
70- let $acc521992223 = genGrid($acc421992223, $list21992223[4])
71- if (($size21992223 == 5))
72- then $acc521992223
137+ let $acc515311555 = genList($acc415311555, $list15311555[4])
138+ if (($size15311555 == 5))
139+ then $acc515311555
73140 else {
74- let $acc621992223 = genGrid($acc521992223, $list21992223[5])
75- if (($size21992223 == 6))
76- then $acc621992223
141+ let $acc615311555 = genList($acc515311555, $list15311555[5])
142+ if (($size15311555 == 6))
143+ then $acc615311555
77144 else {
78- let $acc721992223 = genGrid($acc621992223, $list21992223[6])
79- if (($size21992223 == 7))
80- then $acc721992223
145+ let $acc715311555 = genList($acc615311555, $list15311555[6])
146+ if (($size15311555 == 7))
147+ then $acc715311555
81148 else {
82- let $acc821992223 = genGrid($acc721992223, $list21992223[7])
83- if (($size21992223 == 8))
84- then $acc821992223
149+ let $acc815311555 = genList($acc715311555, $list15311555[7])
150+ if (($size15311555 == 8))
151+ then $acc815311555
85152 else {
86- let $acc921992223 = genGrid($acc821992223, $list21992223[8])
87- if (($size21992223 == 9))
88- then $acc921992223
153+ let $acc915311555 = genList($acc815311555, $list15311555[8])
154+ if (($size15311555 == 9))
155+ then $acc915311555
89156 else {
90- let $acc1021992223 = genGrid($acc921992223, $list21992223[9])
91- if (($size21992223 == 10))
92- then $acc1021992223
157+ let $acc1015311555 = genList($acc915311555, $list15311555[9])
158+ if (($size15311555 == 10))
159+ then $acc1015311555
93160 else {
94- let $acc1121992223 = genGrid($acc1021992223, $list21992223[10])
161+ let $acc1115311555 = genList($acc1015311555, $list15311555[10])
95162 throw("List size exceed 10")
96163 }
97164 }
105172 }
106173 }
107174 }
108- WriteSet([DataEntry((keyID + "_fundraised"), deposited.amount)])
175+ WriteSet(nil)
109176 }
177+ }
178+
179+
180+
181+@Callable(i)
182+func defineScalper (title,addr,grid,steps,lifetime,ordering,odering,reOrderOut) = {
183+ let sender = toBase58String(i.caller.bytes)
184+ let keyID = genKeyID(addr)
185+ WriteSet([DataEntry((keyID + "_grid"), 0), DataEntry((keyID + "_steps"), 0), DataEntry((keyID + "_lifetime"), 0), DataEntry((keyID + "_ordering"), "middle"), DataEntry((keyID + "_reOrderOut"), "middle")])
186+ }
187+
188+
189+
190+@Callable(i)
191+func createScalper (title,type,addr) = {
192+ let sender = toBase58String(i.caller.bytes)
193+ let keyID = genKeyID(addr)
194+ WriteSet([DataEntry((keyID + "_scalperID"), addr), DataEntry((keyID + "_title"), title), DataEntry((keyID + "_type"), type), DataEntry((keyID + "_grid"), 0), DataEntry((keyID + "_steps"), 0), DataEntry((keyID + "_lifetime"), 0), DataEntry((keyID + "_ordering"), "middle"), DataEntry((keyID + "_reOrderOut"), "middle"), DataEntry((keyID + "_fundraised"), 0), DataEntry((keyID + "_priceOpen"), 0), DataEntry((keyID + "_priceClose"), 0), DataEntry((keyID + "_upOutGTD"), 0), DataEntry((keyID + "_downOutGTD"), 0), DataEntry((keyID + "_profit"), 0), DataEntry((keyID + "_profitFee"), 0), DataEntry((keyID + "_gridAsk"), "undefined asks"), DataEntry((keyID + "_gridBid"), "undefined bids"), DataEntry((keyID + "_blockStart"), 0), DataEntry((keyID + "_blockStop"), 0), DataEntry((keyID + "_status"), "created")])
110195 }
111196
112197
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let NONE = "none"
55
66 let oracle = addressFromStringValue("3NAcoeWdUTWn8csXJPG47v1Fjtjcfqxb5tu")
77
88 let askID = "WAVES"
99
1010 let bidID = "USD-N"
1111
1212 let minPip = 1000000
1313
1414 func genKeyID (addr) = toBase58String(sha256(toBytes((addr + toString(this)))))
1515
1616
1717 func genGrid (a,b) = if ((a == ""))
1818 then toString(b)
1919 else ((a + "|") + toString(b))
2020
2121
22-func genList (a,b) = a :: a
22+func genList (a,b) = b :: a
23+
24+
25+func genListInt (a,b) = {
26+ let parseB = parseIntValue(b)
27+(a[0] + 2) :: a
28+ }
29+
30+
31+func revListInt (a,b) = b :: a
2332
2433
2534 @Callable(i)
26-func createScalper (title,type,addr) = {
35+func sendGridAsk (gridA) = {
2736 let sender = toBase58String(i.caller.bytes)
28- let keyID = genKeyID(addr)
29- WriteSet([DataEntry((keyID + "_scalperID"), addr), DataEntry((keyID + "_title"), title), DataEntry((keyID + "_type"), type), DataEntry((keyID + "_fundraised"), 0), DataEntry((keyID + "_priceOpen"), 0), DataEntry((keyID + "_priceClose"), 0), DataEntry((keyID + "_upOutGTD"), 0), DataEntry((keyID + "_downOutGTD"), 0), DataEntry((keyID + "_profit"), 0), DataEntry((keyID + "_profitFee"), 0), DataEntry((keyID + "_grid"), 0), DataEntry((keyID + "_steps"), 0), DataEntry((keyID + "_ordering"), "middle"), DataEntry((keyID + "_reOrderOut"), "middle"), DataEntry((keyID + "_gridAsk"), "undefined asks"), DataEntry((keyID + "_gridBid"), "undefined bids"), DataEntry((keyID + "_lifetime"), 0), DataEntry((keyID + "_blockStart"), 0), DataEntry((keyID + "_blockStop"), 0), DataEntry((keyID + "_status"), "created")])
37+ let gridAsk = split(gridA, "|")
38+ let ver = {
39+ let $list779812 = gridAsk
40+ let $size779812 = size($list779812)
41+ let $acc0779812 = [69]
42+ if (($size779812 == 0))
43+ then $acc0779812
44+ else {
45+ let $acc1779812 = genListInt($acc0779812, $list779812[0])
46+ if (($size779812 == 1))
47+ then $acc1779812
48+ else {
49+ let $acc2779812 = genListInt($acc1779812, $list779812[1])
50+ if (($size779812 == 2))
51+ then $acc2779812
52+ else {
53+ let $acc3779812 = genListInt($acc2779812, $list779812[2])
54+ if (($size779812 == 3))
55+ then $acc3779812
56+ else {
57+ let $acc4779812 = genListInt($acc3779812, $list779812[3])
58+ if (($size779812 == 4))
59+ then $acc4779812
60+ else {
61+ let $acc5779812 = genListInt($acc4779812, $list779812[4])
62+ if (($size779812 == 5))
63+ then $acc5779812
64+ else {
65+ let $acc6779812 = genListInt($acc5779812, $list779812[5])
66+ if (($size779812 == 6))
67+ then $acc6779812
68+ else {
69+ let $acc7779812 = genListInt($acc6779812, $list779812[6])
70+ if (($size779812 == 7))
71+ then $acc7779812
72+ else {
73+ let $acc8779812 = genListInt($acc7779812, $list779812[7])
74+ if (($size779812 == 8))
75+ then $acc8779812
76+ else {
77+ let $acc9779812 = genListInt($acc8779812, $list779812[8])
78+ if (($size779812 == 9))
79+ then $acc9779812
80+ else {
81+ let $acc10779812 = genListInt($acc9779812, $list779812[9])
82+ if (($size779812 == 10))
83+ then $acc10779812
84+ else {
85+ let $acc11779812 = genListInt($acc10779812, $list779812[10])
86+ throw("List size exceed 10")
87+ }
88+ }
89+ }
90+ }
91+ }
92+ }
93+ }
94+ }
95+ }
96+ }
97+ }
98+ }
99+ WriteSet(nil)
30100 }
31101
32102
33103
34104 @Callable(i)
35-func defineScalping (title,grids,step) = {
105+func defineScalping (title,gridA,gridB,step) = {
36106 let sender = toBase58String(i.caller.bytes)
37107 let deposited = extract(i.payment)
38108 let keyID = genKeyID(sender)
39109 let usdV = getIntegerValue(oracle, "waves_usd_2")
40110 if ((100000000 >= deposited.amount))
41111 then throw(("Amount under of required: " + toString(deposited.amount)))
42112 else {
43- let foundAsk = (deposited.amount / 2)
44- let orderAsk = (foundAsk / (grids / 2))
45- let arr = [1, 2, 3, 4, 5]
46- let arrr = [1]
113+ let arr = [5, 4, 3, 2, 1]
47114 let ver = {
48- let $list21992223 = arr
49- let $size21992223 = size($list21992223)
50- let $acc021992223 = ""
51- if (($size21992223 == 0))
52- then $acc021992223
115+ let $list15311555 = arr
116+ let $size15311555 = size($list15311555)
117+ let $acc015311555 = nil
118+ if (($size15311555 == 0))
119+ then $acc015311555
53120 else {
54- let $acc121992223 = genGrid($acc021992223, $list21992223[0])
55- if (($size21992223 == 1))
56- then $acc121992223
121+ let $acc115311555 = genList($acc015311555, $list15311555[0])
122+ if (($size15311555 == 1))
123+ then $acc115311555
57124 else {
58- let $acc221992223 = genGrid($acc121992223, $list21992223[1])
59- if (($size21992223 == 2))
60- then $acc221992223
125+ let $acc215311555 = genList($acc115311555, $list15311555[1])
126+ if (($size15311555 == 2))
127+ then $acc215311555
61128 else {
62- let $acc321992223 = genGrid($acc221992223, $list21992223[2])
63- if (($size21992223 == 3))
64- then $acc321992223
129+ let $acc315311555 = genList($acc215311555, $list15311555[2])
130+ if (($size15311555 == 3))
131+ then $acc315311555
65132 else {
66- let $acc421992223 = genGrid($acc321992223, $list21992223[3])
67- if (($size21992223 == 4))
68- then $acc421992223
133+ let $acc415311555 = genList($acc315311555, $list15311555[3])
134+ if (($size15311555 == 4))
135+ then $acc415311555
69136 else {
70- let $acc521992223 = genGrid($acc421992223, $list21992223[4])
71- if (($size21992223 == 5))
72- then $acc521992223
137+ let $acc515311555 = genList($acc415311555, $list15311555[4])
138+ if (($size15311555 == 5))
139+ then $acc515311555
73140 else {
74- let $acc621992223 = genGrid($acc521992223, $list21992223[5])
75- if (($size21992223 == 6))
76- then $acc621992223
141+ let $acc615311555 = genList($acc515311555, $list15311555[5])
142+ if (($size15311555 == 6))
143+ then $acc615311555
77144 else {
78- let $acc721992223 = genGrid($acc621992223, $list21992223[6])
79- if (($size21992223 == 7))
80- then $acc721992223
145+ let $acc715311555 = genList($acc615311555, $list15311555[6])
146+ if (($size15311555 == 7))
147+ then $acc715311555
81148 else {
82- let $acc821992223 = genGrid($acc721992223, $list21992223[7])
83- if (($size21992223 == 8))
84- then $acc821992223
149+ let $acc815311555 = genList($acc715311555, $list15311555[7])
150+ if (($size15311555 == 8))
151+ then $acc815311555
85152 else {
86- let $acc921992223 = genGrid($acc821992223, $list21992223[8])
87- if (($size21992223 == 9))
88- then $acc921992223
153+ let $acc915311555 = genList($acc815311555, $list15311555[8])
154+ if (($size15311555 == 9))
155+ then $acc915311555
89156 else {
90- let $acc1021992223 = genGrid($acc921992223, $list21992223[9])
91- if (($size21992223 == 10))
92- then $acc1021992223
157+ let $acc1015311555 = genList($acc915311555, $list15311555[9])
158+ if (($size15311555 == 10))
159+ then $acc1015311555
93160 else {
94- let $acc1121992223 = genGrid($acc1021992223, $list21992223[10])
161+ let $acc1115311555 = genList($acc1015311555, $list15311555[10])
95162 throw("List size exceed 10")
96163 }
97164 }
98165 }
99166 }
100167 }
101168 }
102169 }
103170 }
104171 }
105172 }
106173 }
107174 }
108- WriteSet([DataEntry((keyID + "_fundraised"), deposited.amount)])
175+ WriteSet(nil)
109176 }
177+ }
178+
179+
180+
181+@Callable(i)
182+func defineScalper (title,addr,grid,steps,lifetime,ordering,odering,reOrderOut) = {
183+ let sender = toBase58String(i.caller.bytes)
184+ let keyID = genKeyID(addr)
185+ WriteSet([DataEntry((keyID + "_grid"), 0), DataEntry((keyID + "_steps"), 0), DataEntry((keyID + "_lifetime"), 0), DataEntry((keyID + "_ordering"), "middle"), DataEntry((keyID + "_reOrderOut"), "middle")])
186+ }
187+
188+
189+
190+@Callable(i)
191+func createScalper (title,type,addr) = {
192+ let sender = toBase58String(i.caller.bytes)
193+ let keyID = genKeyID(addr)
194+ WriteSet([DataEntry((keyID + "_scalperID"), addr), DataEntry((keyID + "_title"), title), DataEntry((keyID + "_type"), type), DataEntry((keyID + "_grid"), 0), DataEntry((keyID + "_steps"), 0), DataEntry((keyID + "_lifetime"), 0), DataEntry((keyID + "_ordering"), "middle"), DataEntry((keyID + "_reOrderOut"), "middle"), DataEntry((keyID + "_fundraised"), 0), DataEntry((keyID + "_priceOpen"), 0), DataEntry((keyID + "_priceClose"), 0), DataEntry((keyID + "_upOutGTD"), 0), DataEntry((keyID + "_downOutGTD"), 0), DataEntry((keyID + "_profit"), 0), DataEntry((keyID + "_profitFee"), 0), DataEntry((keyID + "_gridAsk"), "undefined asks"), DataEntry((keyID + "_gridBid"), "undefined bids"), DataEntry((keyID + "_blockStart"), 0), DataEntry((keyID + "_blockStop"), 0), DataEntry((keyID + "_status"), "created")])
110195 }
111196
112197

github/deemru/w8io/026f985 
86.33 ms