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:AAIDAAAAAAAAACIIARIDCgEIEgYKBAgICAESCgoICAgBAQEBCAgSBQoDCAgIAAAACgAAAAAETk9ORQIAAAAEbm9uZQAAAAAGb3JhY2xlCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAECAAAAIzNOQWNvZVdkVVRXbjhjc1hKUEc0N3YxRmp0amNmcXhiNXR1AAAAAAVhc2tJRAIAAAAFV0FWRVMAAAAABWJpZElEAgAAAAVVU0QtTgAAAAAGbWluUGlwAAAAAAAAD0JAAQAAAAhnZW5LZXlJRAAAAAEAAAAEYWRkcgkAAlgAAAABCQAB9wAAAAEJAAGbAAAAAQkAASwAAAACBQAAAARhZGRyCQAEJQAAAAEFAAAABHRoaXMBAAAAB2dlbkdyaWQAAAACAAAAAWEAAAABYgMJAAAAAAAAAgUAAAABYQIAAAAACQABpAAAAAEFAAAAAWIJAAEsAAAAAgkAASwAAAACBQAAAAFhAgAAAAF8CQABpAAAAAEFAAAAAWIBAAAAB2dlbkxpc3QAAAACAAAAAWEAAAABYgkABEwAAAACBQAAAAFiBQAAAAFhAQAA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EwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAVrZXlJRAIAAAAJX3VwT3V0R1REAAAAAAAAAAAACQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAABWtleUlEAgAAAAtfZG93bk91dEdURAAAAAAAAAAAAAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAVrZXlJRAIAAAAHX3Byb2ZpdAAAAAAAAAAAAAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAVrZXlJRAIAAAAKX3Byb2ZpdEZlZQAAAAAAAAAAAAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAVrZXlJRAIAAAAIX2dyaWRBc2sCAAAADnVuZGVmaW5lZCBhc2tzCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAABWtleUlEAgAAAAhfZ3JpZEJpZAIAAAAOdW5kZWZpbmVkIGJpZHMJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAFa2V5SUQCAAAAC19ibG9ja1N0YXJ0AAAAAAAAAAAACQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAABWtleUlEAgAAAApfYmxvY2tTdG9wAAAAAAAAAAAACQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAABWtleUlEAgAAAAdfc3RhdHVzAgAAAAdjcmVhdGVkBQAAAANuaWwAAAAA7AToIQ==", "chainId": 84, "height": 780497, "spentComplexity": 0 } View: original | compacted Prev: ezK786AtEukUsTTp8RRB2VVYkxZQW63SUZqJZtboSYZ Next: A2tX6pNKMBQqB7AhvDfD282TDaN8RnL99xmYkSZAswib Diff:
Old | New | Differences | |
---|---|---|---|
19 | 19 | else ((a + "|") + toString(b)) | |
20 | 20 | ||
21 | 21 | ||
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 | |
23 | 32 | ||
24 | 33 | ||
25 | 34 | @Callable(i) | |
26 | - | func | |
35 | + | func sendGridAsk (gridA) = { | |
27 | 36 | 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) | |
30 | 100 | } | |
31 | 101 | ||
32 | 102 | ||
33 | 103 | ||
34 | 104 | @Callable(i) | |
35 | - | func defineScalping (title, | |
105 | + | func defineScalping (title,gridA,gridB,step) = { | |
36 | 106 | let sender = toBase58String(i.caller.bytes) | |
37 | 107 | let deposited = extract(i.payment) | |
38 | 108 | let keyID = genKeyID(sender) | |
40 | 110 | if ((100000000 >= deposited.amount)) | |
41 | 111 | then throw(("Amount under of required: " + toString(deposited.amount))) | |
42 | 112 | 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] | |
47 | 114 | let ver = { | |
48 | - | let $ | |
49 | - | let $ | |
50 | - | let $ | |
51 | - | if (($ | |
52 | - | then $ | |
115 | + | let $list15311555 = arr | |
116 | + | let $size15311555 = size($list15311555) | |
117 | + | let $acc015311555 = nil | |
118 | + | if (($size15311555 == 0)) | |
119 | + | then $acc015311555 | |
53 | 120 | else { | |
54 | - | let $ | |
55 | - | if (($ | |
56 | - | then $ | |
121 | + | let $acc115311555 = genList($acc015311555, $list15311555[0]) | |
122 | + | if (($size15311555 == 1)) | |
123 | + | then $acc115311555 | |
57 | 124 | else { | |
58 | - | let $ | |
59 | - | if (($ | |
60 | - | then $ | |
125 | + | let $acc215311555 = genList($acc115311555, $list15311555[1]) | |
126 | + | if (($size15311555 == 2)) | |
127 | + | then $acc215311555 | |
61 | 128 | else { | |
62 | - | let $ | |
63 | - | if (($ | |
64 | - | then $ | |
129 | + | let $acc315311555 = genList($acc215311555, $list15311555[2]) | |
130 | + | if (($size15311555 == 3)) | |
131 | + | then $acc315311555 | |
65 | 132 | else { | |
66 | - | let $ | |
67 | - | if (($ | |
68 | - | then $ | |
133 | + | let $acc415311555 = genList($acc315311555, $list15311555[3]) | |
134 | + | if (($size15311555 == 4)) | |
135 | + | then $acc415311555 | |
69 | 136 | else { | |
70 | - | let $ | |
71 | - | if (($ | |
72 | - | then $ | |
137 | + | let $acc515311555 = genList($acc415311555, $list15311555[4]) | |
138 | + | if (($size15311555 == 5)) | |
139 | + | then $acc515311555 | |
73 | 140 | else { | |
74 | - | let $ | |
75 | - | if (($ | |
76 | - | then $ | |
141 | + | let $acc615311555 = genList($acc515311555, $list15311555[5]) | |
142 | + | if (($size15311555 == 6)) | |
143 | + | then $acc615311555 | |
77 | 144 | else { | |
78 | - | let $ | |
79 | - | if (($ | |
80 | - | then $ | |
145 | + | let $acc715311555 = genList($acc615311555, $list15311555[6]) | |
146 | + | if (($size15311555 == 7)) | |
147 | + | then $acc715311555 | |
81 | 148 | else { | |
82 | - | let $ | |
83 | - | if (($ | |
84 | - | then $ | |
149 | + | let $acc815311555 = genList($acc715311555, $list15311555[7]) | |
150 | + | if (($size15311555 == 8)) | |
151 | + | then $acc815311555 | |
85 | 152 | else { | |
86 | - | let $ | |
87 | - | if (($ | |
88 | - | then $ | |
153 | + | let $acc915311555 = genList($acc815311555, $list15311555[8]) | |
154 | + | if (($size15311555 == 9)) | |
155 | + | then $acc915311555 | |
89 | 156 | else { | |
90 | - | let $ | |
91 | - | if (($ | |
92 | - | then $ | |
157 | + | let $acc1015311555 = genList($acc915311555, $list15311555[9]) | |
158 | + | if (($size15311555 == 10)) | |
159 | + | then $acc1015311555 | |
93 | 160 | else { | |
94 | - | let $ | |
161 | + | let $acc1115311555 = genList($acc1015311555, $list15311555[10]) | |
95 | 162 | throw("List size exceed 10") | |
96 | 163 | } | |
97 | 164 | } | |
105 | 172 | } | |
106 | 173 | } | |
107 | 174 | } | |
108 | - | WriteSet( | |
175 | + | WriteSet(nil) | |
109 | 176 | } | |
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")]) | |
110 | 195 | } | |
111 | 196 | ||
112 | 197 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let NONE = "none" | |
5 | 5 | ||
6 | 6 | let oracle = addressFromStringValue("3NAcoeWdUTWn8csXJPG47v1Fjtjcfqxb5tu") | |
7 | 7 | ||
8 | 8 | let askID = "WAVES" | |
9 | 9 | ||
10 | 10 | let bidID = "USD-N" | |
11 | 11 | ||
12 | 12 | let minPip = 1000000 | |
13 | 13 | ||
14 | 14 | func genKeyID (addr) = toBase58String(sha256(toBytes((addr + toString(this))))) | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func genGrid (a,b) = if ((a == "")) | |
18 | 18 | then toString(b) | |
19 | 19 | else ((a + "|") + toString(b)) | |
20 | 20 | ||
21 | 21 | ||
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 | |
23 | 32 | ||
24 | 33 | ||
25 | 34 | @Callable(i) | |
26 | - | func | |
35 | + | func sendGridAsk (gridA) = { | |
27 | 36 | 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) | |
30 | 100 | } | |
31 | 101 | ||
32 | 102 | ||
33 | 103 | ||
34 | 104 | @Callable(i) | |
35 | - | func defineScalping (title, | |
105 | + | func defineScalping (title,gridA,gridB,step) = { | |
36 | 106 | let sender = toBase58String(i.caller.bytes) | |
37 | 107 | let deposited = extract(i.payment) | |
38 | 108 | let keyID = genKeyID(sender) | |
39 | 109 | let usdV = getIntegerValue(oracle, "waves_usd_2") | |
40 | 110 | if ((100000000 >= deposited.amount)) | |
41 | 111 | then throw(("Amount under of required: " + toString(deposited.amount))) | |
42 | 112 | 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] | |
47 | 114 | let ver = { | |
48 | - | let $ | |
49 | - | let $ | |
50 | - | let $ | |
51 | - | if (($ | |
52 | - | then $ | |
115 | + | let $list15311555 = arr | |
116 | + | let $size15311555 = size($list15311555) | |
117 | + | let $acc015311555 = nil | |
118 | + | if (($size15311555 == 0)) | |
119 | + | then $acc015311555 | |
53 | 120 | else { | |
54 | - | let $ | |
55 | - | if (($ | |
56 | - | then $ | |
121 | + | let $acc115311555 = genList($acc015311555, $list15311555[0]) | |
122 | + | if (($size15311555 == 1)) | |
123 | + | then $acc115311555 | |
57 | 124 | else { | |
58 | - | let $ | |
59 | - | if (($ | |
60 | - | then $ | |
125 | + | let $acc215311555 = genList($acc115311555, $list15311555[1]) | |
126 | + | if (($size15311555 == 2)) | |
127 | + | then $acc215311555 | |
61 | 128 | else { | |
62 | - | let $ | |
63 | - | if (($ | |
64 | - | then $ | |
129 | + | let $acc315311555 = genList($acc215311555, $list15311555[2]) | |
130 | + | if (($size15311555 == 3)) | |
131 | + | then $acc315311555 | |
65 | 132 | else { | |
66 | - | let $ | |
67 | - | if (($ | |
68 | - | then $ | |
133 | + | let $acc415311555 = genList($acc315311555, $list15311555[3]) | |
134 | + | if (($size15311555 == 4)) | |
135 | + | then $acc415311555 | |
69 | 136 | else { | |
70 | - | let $ | |
71 | - | if (($ | |
72 | - | then $ | |
137 | + | let $acc515311555 = genList($acc415311555, $list15311555[4]) | |
138 | + | if (($size15311555 == 5)) | |
139 | + | then $acc515311555 | |
73 | 140 | else { | |
74 | - | let $ | |
75 | - | if (($ | |
76 | - | then $ | |
141 | + | let $acc615311555 = genList($acc515311555, $list15311555[5]) | |
142 | + | if (($size15311555 == 6)) | |
143 | + | then $acc615311555 | |
77 | 144 | else { | |
78 | - | let $ | |
79 | - | if (($ | |
80 | - | then $ | |
145 | + | let $acc715311555 = genList($acc615311555, $list15311555[6]) | |
146 | + | if (($size15311555 == 7)) | |
147 | + | then $acc715311555 | |
81 | 148 | else { | |
82 | - | let $ | |
83 | - | if (($ | |
84 | - | then $ | |
149 | + | let $acc815311555 = genList($acc715311555, $list15311555[7]) | |
150 | + | if (($size15311555 == 8)) | |
151 | + | then $acc815311555 | |
85 | 152 | else { | |
86 | - | let $ | |
87 | - | if (($ | |
88 | - | then $ | |
153 | + | let $acc915311555 = genList($acc815311555, $list15311555[8]) | |
154 | + | if (($size15311555 == 9)) | |
155 | + | then $acc915311555 | |
89 | 156 | else { | |
90 | - | let $ | |
91 | - | if (($ | |
92 | - | then $ | |
157 | + | let $acc1015311555 = genList($acc915311555, $list15311555[9]) | |
158 | + | if (($size15311555 == 10)) | |
159 | + | then $acc1015311555 | |
93 | 160 | else { | |
94 | - | let $ | |
161 | + | let $acc1115311555 = genList($acc1015311555, $list15311555[10]) | |
95 | 162 | throw("List size exceed 10") | |
96 | 163 | } | |
97 | 164 | } | |
98 | 165 | } | |
99 | 166 | } | |
100 | 167 | } | |
101 | 168 | } | |
102 | 169 | } | |
103 | 170 | } | |
104 | 171 | } | |
105 | 172 | } | |
106 | 173 | } | |
107 | 174 | } | |
108 | - | WriteSet( | |
175 | + | WriteSet(nil) | |
109 | 176 | } | |
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")]) | |
110 | 195 | } | |
111 | 196 | ||
112 | 197 |
github/deemru/w8io/026f985 86.33 ms ◑