tx · 6ARt7ebvjbErdkRLYQhVrH1S9xCpcsXL5UWeWrZ61muE 3N2ZtCEGncHQjQF4g4oQBDeRRZoUQ3kJ7Nm: -1.04000000 Waves 2023.04.01 12:18 [2515346] smart account 3N2ZtCEGncHQjQF4g4oQBDeRRZoUQ3kJ7Nm > SELF 0.00000000 Waves
{ "type": 13, "id": "6ARt7ebvjbErdkRLYQhVrH1S9xCpcsXL5UWeWrZ61muE", "fee": 104000000, "feeAssetId": null, "timestamp": 1680340733810, "version": 2, "chainId": 84, "sender": "3N2ZtCEGncHQjQF4g4oQBDeRRZoUQ3kJ7Nm", "senderPublicKey": "EKmhAeU9yA52DSvBnr1WtWQWyyiCrauDYkmgnTns7ZkA", "proofs": [ "3cwVWhTy7gPZxx9WiSWuMFg6tUGEb9hwU7WvuPcE617wu736aeQy9XeLN6hHXBfy5kTqvMZSJ86cw6bJaUZbdGLU" ], "script": "base64:AAIFAAAAAAAAABwIAhILCgkBAQEBAQEIAQESCwoJAQEBAQEBCAEBAAAACAAAAAAURGFwcF9BZGRyZXNzX3B1Yl9rZXkBAAAAIDt0RfG+UDnkUrGYjjYAjr/q4kPWHyAQKg1dGLENBEMMAAAAABhwcm9kdWN0X2xhdW5jaF90aW1lc3RhbXAAAAABhgpF7AAAAAAAFHByb2R1Y3RfbGF1bmNoX2Vycm9yAgAAACNQcm9kdWN0IExhdW5jaCBUaW1lc3RhbXAgaXMgc2V0IGF0IAAAAAAQbm9fcGF5bWVudF9lcnJvcgIAAAA3Tm8gcGF5bWVudCBhdHRhY2hlZCwgUGxlYXNlIEF0dGFjaCBUb2tlbiBpbiBwYXltZW50WzFdLgAAAAASY2xvc2VkX29yYWNsZV9lcm9yAgAAADFPcmFjbGUgaXMgY2xvc2VkLiBXYWl0IFVudGlsIE9yYWNsZSBpcyBUdXJuZWQgT24uAAAAABF3aGl0ZWxpc3RfYWRkcmVzcwkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQUAAAAURGFwcF9BZGR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XNzAgAAAAxfVG90YWxfUHV0c18JAAGkAAAAAQUAAAAUcmVhZF9PcHRpb25Db3VudGVySUQFAAAAHVRvdGFsVXNlclB1dGluU3BlY2lmaWNDb3VudGVyBQAAAANuaWwAAAAAlmviWA==", "height": 2515346, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DDm94CenkCkSGinB7Bd3TPiDWmi7W134WJe8JfxkeC1p Next: HW5i1hecWEjyQCr4AYGMgTXJt4T1Y3pt1rJR3MNVQW4a Diff:
Old | New | Differences | |
---|---|---|---|
107 | 107 | } | |
108 | 108 | ||
109 | 109 | ||
110 | + | ||
111 | + | @Callable(i) | |
112 | + | func placeoptionPut (Total_Pool_Liquidity,OptionCounterID,House_risk,Price,Call_Limits,Put_Limits,Oracle_Status,Start_Order_Timestamp,End_Order_Timestamp) = { | |
113 | + | let calleraddress = toBase58String(i.caller.bytes) | |
114 | + | let pmt = if ((size(i.payments) == 1)) | |
115 | + | then i.payments[0] | |
116 | + | else throw(no_payment_error) | |
117 | + | let ifBlacklisted = getString(this, ("addr_BLACKLISTED_" + calleraddress)) | |
118 | + | let read_start_order_permit_timestamp = Start_Order_Timestamp | |
119 | + | let read_end_order_permit_timestamp = End_Order_Timestamp | |
120 | + | let read_total_pool_liquidity = Total_Pool_Liquidity | |
121 | + | let new_total_pool_liquidity = (read_total_pool_liquidity + pmt.amount) | |
122 | + | let read_OptionCounterID = OptionCounterID | |
123 | + | let OpionExpireCounter = 1 | |
124 | + | let OptionExpireCounterID = (read_OptionCounterID + OpionExpireCounter) | |
125 | + | let PreviousOptionOrders = match getInteger(this, "Total_Option_Orders") { | |
126 | + | case a: Int => | |
127 | + | a | |
128 | + | case _ => | |
129 | + | 0 | |
130 | + | } | |
131 | + | let TotalOptionOrders = (PreviousOptionOrders + 1) | |
132 | + | let PreviousFundsAddedInSpecificOptionOrder = match getInteger(this, ("Total_Funds_Added_In_Option_Order_" + toString(read_OptionCounterID))) { | |
133 | + | case a: Int => | |
134 | + | a | |
135 | + | case _ => | |
136 | + | 0 | |
137 | + | } | |
138 | + | let TotalFundsAddedInSpecificOptionOrder = (PreviousFundsAddedInSpecificOptionOrder + pmt.amount) | |
139 | + | let PreviousOptionOrdersinSpecificCounter = match getInteger(this, ("Total_Option_Orders_" + toString(read_OptionCounterID))) { | |
140 | + | case a: Int => | |
141 | + | a | |
142 | + | case _ => | |
143 | + | 0 | |
144 | + | } | |
145 | + | let TotalOptionOrdersinSpecificCounter = (PreviousOptionOrdersinSpecificCounter + 1) | |
146 | + | let PreviousPut = match getInteger(this, "Total_Puts") { | |
147 | + | case a: Int => | |
148 | + | a | |
149 | + | case _ => | |
150 | + | 0 | |
151 | + | } | |
152 | + | let TotalPut = (PreviousPut + 1) | |
153 | + | let PreviousPutinSpecificCounter = match getInteger(this, ("Total_Puts_" + toString(read_OptionCounterID))) { | |
154 | + | case a: Int => | |
155 | + | a | |
156 | + | case _ => | |
157 | + | 0 | |
158 | + | } | |
159 | + | let TotalPutinSpecificCounter = (PreviousPutinSpecificCounter + 1) | |
160 | + | let PreviousUserPut = match getInteger(this, (calleraddress + "_Total_Puts")) { | |
161 | + | case a: Int => | |
162 | + | a | |
163 | + | case _ => | |
164 | + | 0 | |
165 | + | } | |
166 | + | let TotalUserPut = (PreviousUserPut + 1) | |
167 | + | let PreviousUserPutinSpecificCounter = match getInteger(this, ((calleraddress + "_Total_Puts_") + toString(read_OptionCounterID))) { | |
168 | + | case a: Int => | |
169 | + | a | |
170 | + | case _ => | |
171 | + | 0 | |
172 | + | } | |
173 | + | let TotalUserPutinSpecificCounter = (PreviousUserPutinSpecificCounter + 1) | |
174 | + | let Pending_Option_limits = match getInteger(this, "Pending_Option_Limits") { | |
175 | + | case a: Int => | |
176 | + | a | |
177 | + | case _ => | |
178 | + | 0 | |
179 | + | } | |
180 | + | let Funds_at_risk = House_risk | |
181 | + | if ((i.caller != whitelist_address)) | |
182 | + | then throw((("This Address is not Authorized. Only " + toString(whitelist_address)) + " is Authorized Address to Sign it.")) | |
183 | + | else if ((product_launch_timestamp > lastBlock.timestamp)) | |
184 | + | then throw((product_launch_error + toString(product_launch_timestamp))) | |
185 | + | else if ((Oracle_Status == "Close")) | |
186 | + | then throw(closed_oracle_eror) | |
187 | + | else if ((ifBlacklisted == "Yes")) | |
188 | + | then throw((calleraddress + " Address is Blacklisted. Please contact Admin to Whitelist it.")) | |
189 | + | else if (isDefined(pmt.assetId)) | |
190 | + | then throw("Only TN is allowed to deposit at the moment") | |
191 | + | else if ((lastBlock.timestamp >= read_end_order_permit_timestamp)) | |
192 | + | then throw("Option Order placing Timing Limits are Over. Please Join in Next Cycle.") | |
193 | + | else if ((minimum_order_size > pmt.amount)) | |
194 | + | then throw((("Placed Order Size is less than [" + toString(minimum_order_size)) + "/10^8] TN.")) | |
195 | + | else if ((pmt.amount > maximum_order_size)) | |
196 | + | then throw((("Placed Order Size is more than [" + toString(maximum_order_size)) + "/10^8] TN.")) | |
197 | + | else [StringEntry(((("Put_" + calleraddress) + "_") + toString(TotalUserPut)), toString(Price)), IntegerEntry(((("Put_Amount_" + calleraddress) + "_") + toString(TotalUserPut)), pmt.amount), StringEntry(((("Put_Start_End_" + calleraddress) + "_") + toString(TotalUserPut)), ((toString(read_OptionCounterID) + "_") + toString(OptionExpireCounterID))), IntegerEntry("Total_Option_Orders", TotalOptionOrders), IntegerEntry(("Total_Funds_Added_In_Option_Order_" + toString(read_OptionCounterID)), TotalFundsAddedInSpecificOptionOrder), IntegerEntry("Total_Pool_Liquidity", new_total_pool_liquidity), IntegerEntry(("Total_Pool_Liquidity_" + toString(read_OptionCounterID)), (new_total_pool_liquidity - TotalFundsAddedInSpecificOptionOrder)), IntegerEntry(("Funds_At_Risk_" + toString(read_OptionCounterID)), Funds_at_risk), IntegerEntry("Call_Limits", Call_Limits), IntegerEntry("Put_Limits", Put_Limits), IntegerEntry(("Total_Option_Orders_" + toString(read_OptionCounterID)), TotalOptionOrdersinSpecificCounter), IntegerEntry("Total_Puts", TotalPut), IntegerEntry(("Total_Puts_" + toString(read_OptionCounterID)), TotalPutinSpecificCounter), IntegerEntry((calleraddress + "_Total_Puts"), TotalUserPut), IntegerEntry(((calleraddress + "_Total_Puts_") + toString(read_OptionCounterID)), TotalUserPutinSpecificCounter)] | |
198 | + | } | |
199 | + | ||
200 | + |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let Dapp_Address_pub_key = base58'515tSAyMUbAb8kKjcpGDpqALGfCgcwfWmWKKkcBKTcGB' | |
5 | 5 | ||
6 | 6 | let product_launch_timestamp = 1675209600000 | |
7 | 7 | ||
8 | 8 | let product_launch_error = "Product Launch Timestamp is set at " | |
9 | 9 | ||
10 | 10 | let no_payment_error = "No payment attached, Please Attach Token in payment[1]." | |
11 | 11 | ||
12 | 12 | let closed_oracle_eror = "Oracle is closed. Wait Until Oracle is Turned On." | |
13 | 13 | ||
14 | 14 | let whitelist_address = addressFromPublicKey(Dapp_Address_pub_key) | |
15 | 15 | ||
16 | 16 | let minimum_order_size = 10000000 | |
17 | 17 | ||
18 | 18 | let maximum_order_size = 10000000000 | |
19 | 19 | ||
20 | 20 | @Callable(i) | |
21 | 21 | func placeoptionCall (Total_Pool_Liquidity,OptionCounterID,House_risk,Price,Call_Limits,Put_Limits,Oracle_Status,Start_Order_Timestamp,End_Order_Timestamp) = { | |
22 | 22 | let calleraddress = toBase58String(i.caller.bytes) | |
23 | 23 | let pmt = if ((size(i.payments) == 1)) | |
24 | 24 | then i.payments[0] | |
25 | 25 | else throw(no_payment_error) | |
26 | 26 | let ifBlacklisted = getString(this, ("addr_BLACKLISTED_" + calleraddress)) | |
27 | 27 | let read_start_order_permit_timestamp = Start_Order_Timestamp | |
28 | 28 | let read_end_order_permit_timestamp = End_Order_Timestamp | |
29 | 29 | let read_total_pool_liquidity = Total_Pool_Liquidity | |
30 | 30 | let new_total_pool_liquidity = (read_total_pool_liquidity + pmt.amount) | |
31 | 31 | let read_OptionCounterID = OptionCounterID | |
32 | 32 | let OpionExpireCounter = 1 | |
33 | 33 | let OptionExpireCounterID = (read_OptionCounterID + OpionExpireCounter) | |
34 | 34 | let PreviousOptionOrders = match getInteger(this, "Total_Option_Orders") { | |
35 | 35 | case a: Int => | |
36 | 36 | a | |
37 | 37 | case _ => | |
38 | 38 | 0 | |
39 | 39 | } | |
40 | 40 | let TotalOptionOrders = (PreviousOptionOrders + 1) | |
41 | 41 | let PreviousFundsAddedInSpecificOptionOrder = match getInteger(this, ("Total_Funds_Added_In_Option_Order_" + toString(read_OptionCounterID))) { | |
42 | 42 | case a: Int => | |
43 | 43 | a | |
44 | 44 | case _ => | |
45 | 45 | 0 | |
46 | 46 | } | |
47 | 47 | let TotalFundsAddedInSpecificOptionOrder = (PreviousFundsAddedInSpecificOptionOrder + pmt.amount) | |
48 | 48 | let PreviousOptionOrdersinSpecificCounter = match getInteger(this, ("Total_Option_Orders_" + toString(read_OptionCounterID))) { | |
49 | 49 | case a: Int => | |
50 | 50 | a | |
51 | 51 | case _ => | |
52 | 52 | 0 | |
53 | 53 | } | |
54 | 54 | let TotalOptionOrdersinSpecificCounter = (PreviousOptionOrdersinSpecificCounter + 1) | |
55 | 55 | let PreviousCall = match getInteger(this, "Total_Calls") { | |
56 | 56 | case a: Int => | |
57 | 57 | a | |
58 | 58 | case _ => | |
59 | 59 | 0 | |
60 | 60 | } | |
61 | 61 | let TotalCall = (PreviousCall + 1) | |
62 | 62 | let PreviousCallinSpecificCounter = match getInteger(this, ("Total_Calls_" + toString(read_OptionCounterID))) { | |
63 | 63 | case a: Int => | |
64 | 64 | a | |
65 | 65 | case _ => | |
66 | 66 | 0 | |
67 | 67 | } | |
68 | 68 | let TotalCallinSpecificCounter = (PreviousCallinSpecificCounter + 1) | |
69 | 69 | let PreviousUserCall = match getInteger(this, (calleraddress + "_Total_Calls")) { | |
70 | 70 | case a: Int => | |
71 | 71 | a | |
72 | 72 | case _ => | |
73 | 73 | 0 | |
74 | 74 | } | |
75 | 75 | let TotalUserCall = (PreviousUserCall + 1) | |
76 | 76 | let PreviousUserCallinSpecificCounter = match getInteger(this, ((calleraddress + "_Total_Calls_") + toString(read_OptionCounterID))) { | |
77 | 77 | case a: Int => | |
78 | 78 | a | |
79 | 79 | case _ => | |
80 | 80 | 0 | |
81 | 81 | } | |
82 | 82 | let TotalUserCallinSpecificCounter = (PreviousUserCallinSpecificCounter + 1) | |
83 | 83 | let Pending_Option_limits = match getInteger(this, "Pending_Option_Limits") { | |
84 | 84 | case a: Int => | |
85 | 85 | a | |
86 | 86 | case _ => | |
87 | 87 | 0 | |
88 | 88 | } | |
89 | 89 | let Funds_at_risk = House_risk | |
90 | 90 | if ((i.caller != whitelist_address)) | |
91 | 91 | then throw((("This Address is not Authorized. Only " + toString(whitelist_address)) + " is Authorized Address to Sign it.")) | |
92 | 92 | else if ((product_launch_timestamp > lastBlock.timestamp)) | |
93 | 93 | then throw((product_launch_error + toString(product_launch_timestamp))) | |
94 | 94 | else if ((Oracle_Status == "Close")) | |
95 | 95 | then throw(closed_oracle_eror) | |
96 | 96 | else if ((ifBlacklisted == "Yes")) | |
97 | 97 | then throw((calleraddress + " Address is Blacklisted. Please contact Admin to Whitelist it.")) | |
98 | 98 | else if (isDefined(pmt.assetId)) | |
99 | 99 | then throw("Only TN is allowed to deposit at the moment") | |
100 | 100 | else if ((lastBlock.timestamp >= read_end_order_permit_timestamp)) | |
101 | 101 | then throw("Option Order placing Timing Limits are Over. Please Join in Next Cycle.") | |
102 | 102 | else if ((minimum_order_size > pmt.amount)) | |
103 | 103 | then throw((("Placed Order Size is less than [" + toString(minimum_order_size)) + "/10^8] TN.")) | |
104 | 104 | else if ((pmt.amount > maximum_order_size)) | |
105 | 105 | then throw((("Placed Order Size is more than [" + toString(maximum_order_size)) + "/10^8] TN.")) | |
106 | 106 | else [StringEntry(((("Call_" + calleraddress) + "_") + toString(TotalUserCall)), toString(Price)), IntegerEntry(((("Call_Amount_" + calleraddress) + "_") + toString(TotalUserCall)), pmt.amount), StringEntry(((("Call_Start_End_" + calleraddress) + "_") + toString(TotalUserCall)), ((toString(read_OptionCounterID) + "_") + toString(OptionExpireCounterID))), IntegerEntry("Total_Option_Orders", TotalOptionOrders), IntegerEntry(("Total_Funds_Added_In_Option_Order_" + toString(read_OptionCounterID)), TotalFundsAddedInSpecificOptionOrder), IntegerEntry("Total_Pool_Liquidity", new_total_pool_liquidity), IntegerEntry(("Total_Pool_Liquidity_" + toString(read_OptionCounterID)), (new_total_pool_liquidity - TotalFundsAddedInSpecificOptionOrder)), IntegerEntry(("Funds_At_Risk_" + toString(read_OptionCounterID)), Funds_at_risk), IntegerEntry("Call_Limits", Call_Limits), IntegerEntry("Put_Limits", Put_Limits), IntegerEntry(("Total_Option_Orders_" + toString(read_OptionCounterID)), TotalOptionOrdersinSpecificCounter), IntegerEntry("Total_Calls", TotalCall), IntegerEntry(("Total_Calls_" + toString(read_OptionCounterID)), TotalCallinSpecificCounter), IntegerEntry((calleraddress + "_Total_Calls"), TotalUserCall), IntegerEntry(((calleraddress + "_Total_Calls_") + toString(read_OptionCounterID)), TotalUserCallinSpecificCounter)] | |
107 | 107 | } | |
108 | 108 | ||
109 | 109 | ||
110 | + | ||
111 | + | @Callable(i) | |
112 | + | func placeoptionPut (Total_Pool_Liquidity,OptionCounterID,House_risk,Price,Call_Limits,Put_Limits,Oracle_Status,Start_Order_Timestamp,End_Order_Timestamp) = { | |
113 | + | let calleraddress = toBase58String(i.caller.bytes) | |
114 | + | let pmt = if ((size(i.payments) == 1)) | |
115 | + | then i.payments[0] | |
116 | + | else throw(no_payment_error) | |
117 | + | let ifBlacklisted = getString(this, ("addr_BLACKLISTED_" + calleraddress)) | |
118 | + | let read_start_order_permit_timestamp = Start_Order_Timestamp | |
119 | + | let read_end_order_permit_timestamp = End_Order_Timestamp | |
120 | + | let read_total_pool_liquidity = Total_Pool_Liquidity | |
121 | + | let new_total_pool_liquidity = (read_total_pool_liquidity + pmt.amount) | |
122 | + | let read_OptionCounterID = OptionCounterID | |
123 | + | let OpionExpireCounter = 1 | |
124 | + | let OptionExpireCounterID = (read_OptionCounterID + OpionExpireCounter) | |
125 | + | let PreviousOptionOrders = match getInteger(this, "Total_Option_Orders") { | |
126 | + | case a: Int => | |
127 | + | a | |
128 | + | case _ => | |
129 | + | 0 | |
130 | + | } | |
131 | + | let TotalOptionOrders = (PreviousOptionOrders + 1) | |
132 | + | let PreviousFundsAddedInSpecificOptionOrder = match getInteger(this, ("Total_Funds_Added_In_Option_Order_" + toString(read_OptionCounterID))) { | |
133 | + | case a: Int => | |
134 | + | a | |
135 | + | case _ => | |
136 | + | 0 | |
137 | + | } | |
138 | + | let TotalFundsAddedInSpecificOptionOrder = (PreviousFundsAddedInSpecificOptionOrder + pmt.amount) | |
139 | + | let PreviousOptionOrdersinSpecificCounter = match getInteger(this, ("Total_Option_Orders_" + toString(read_OptionCounterID))) { | |
140 | + | case a: Int => | |
141 | + | a | |
142 | + | case _ => | |
143 | + | 0 | |
144 | + | } | |
145 | + | let TotalOptionOrdersinSpecificCounter = (PreviousOptionOrdersinSpecificCounter + 1) | |
146 | + | let PreviousPut = match getInteger(this, "Total_Puts") { | |
147 | + | case a: Int => | |
148 | + | a | |
149 | + | case _ => | |
150 | + | 0 | |
151 | + | } | |
152 | + | let TotalPut = (PreviousPut + 1) | |
153 | + | let PreviousPutinSpecificCounter = match getInteger(this, ("Total_Puts_" + toString(read_OptionCounterID))) { | |
154 | + | case a: Int => | |
155 | + | a | |
156 | + | case _ => | |
157 | + | 0 | |
158 | + | } | |
159 | + | let TotalPutinSpecificCounter = (PreviousPutinSpecificCounter + 1) | |
160 | + | let PreviousUserPut = match getInteger(this, (calleraddress + "_Total_Puts")) { | |
161 | + | case a: Int => | |
162 | + | a | |
163 | + | case _ => | |
164 | + | 0 | |
165 | + | } | |
166 | + | let TotalUserPut = (PreviousUserPut + 1) | |
167 | + | let PreviousUserPutinSpecificCounter = match getInteger(this, ((calleraddress + "_Total_Puts_") + toString(read_OptionCounterID))) { | |
168 | + | case a: Int => | |
169 | + | a | |
170 | + | case _ => | |
171 | + | 0 | |
172 | + | } | |
173 | + | let TotalUserPutinSpecificCounter = (PreviousUserPutinSpecificCounter + 1) | |
174 | + | let Pending_Option_limits = match getInteger(this, "Pending_Option_Limits") { | |
175 | + | case a: Int => | |
176 | + | a | |
177 | + | case _ => | |
178 | + | 0 | |
179 | + | } | |
180 | + | let Funds_at_risk = House_risk | |
181 | + | if ((i.caller != whitelist_address)) | |
182 | + | then throw((("This Address is not Authorized. Only " + toString(whitelist_address)) + " is Authorized Address to Sign it.")) | |
183 | + | else if ((product_launch_timestamp > lastBlock.timestamp)) | |
184 | + | then throw((product_launch_error + toString(product_launch_timestamp))) | |
185 | + | else if ((Oracle_Status == "Close")) | |
186 | + | then throw(closed_oracle_eror) | |
187 | + | else if ((ifBlacklisted == "Yes")) | |
188 | + | then throw((calleraddress + " Address is Blacklisted. Please contact Admin to Whitelist it.")) | |
189 | + | else if (isDefined(pmt.assetId)) | |
190 | + | then throw("Only TN is allowed to deposit at the moment") | |
191 | + | else if ((lastBlock.timestamp >= read_end_order_permit_timestamp)) | |
192 | + | then throw("Option Order placing Timing Limits are Over. Please Join in Next Cycle.") | |
193 | + | else if ((minimum_order_size > pmt.amount)) | |
194 | + | then throw((("Placed Order Size is less than [" + toString(minimum_order_size)) + "/10^8] TN.")) | |
195 | + | else if ((pmt.amount > maximum_order_size)) | |
196 | + | then throw((("Placed Order Size is more than [" + toString(maximum_order_size)) + "/10^8] TN.")) | |
197 | + | else [StringEntry(((("Put_" + calleraddress) + "_") + toString(TotalUserPut)), toString(Price)), IntegerEntry(((("Put_Amount_" + calleraddress) + "_") + toString(TotalUserPut)), pmt.amount), StringEntry(((("Put_Start_End_" + calleraddress) + "_") + toString(TotalUserPut)), ((toString(read_OptionCounterID) + "_") + toString(OptionExpireCounterID))), IntegerEntry("Total_Option_Orders", TotalOptionOrders), IntegerEntry(("Total_Funds_Added_In_Option_Order_" + toString(read_OptionCounterID)), TotalFundsAddedInSpecificOptionOrder), IntegerEntry("Total_Pool_Liquidity", new_total_pool_liquidity), IntegerEntry(("Total_Pool_Liquidity_" + toString(read_OptionCounterID)), (new_total_pool_liquidity - TotalFundsAddedInSpecificOptionOrder)), IntegerEntry(("Funds_At_Risk_" + toString(read_OptionCounterID)), Funds_at_risk), IntegerEntry("Call_Limits", Call_Limits), IntegerEntry("Put_Limits", Put_Limits), IntegerEntry(("Total_Option_Orders_" + toString(read_OptionCounterID)), TotalOptionOrdersinSpecificCounter), IntegerEntry("Total_Puts", TotalPut), IntegerEntry(("Total_Puts_" + toString(read_OptionCounterID)), TotalPutinSpecificCounter), IntegerEntry((calleraddress + "_Total_Puts"), TotalUserPut), IntegerEntry(((calleraddress + "_Total_Puts_") + toString(read_OptionCounterID)), TotalUserPutinSpecificCounter)] | |
198 | + | } | |
199 | + | ||
200 | + |
github/deemru/w8io/026f985 45.57 ms ◑