Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: change priceToIndex to public #31

Merged
merged 6 commits into from
Apr 5, 2023
Merged

feat: change priceToIndex to public #31

merged 6 commits into from
Apr 5, 2023

Conversation

detectivekim
Copy link
Contributor

fix issue #30.

JhChoy
JhChoy previously approved these changes Apr 5, 2023
@codecov-commenter
Copy link

Codecov Report

Patch coverage has no change and project coverage change: -0.38 ⚠️

Comparison is base (e1a3e46) 99.23% compared to head (97bce07) 98.85%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #31      +/-   ##
==========================================
- Coverage   99.23%   98.85%   -0.38%     
==========================================
  Files           9        9              
  Lines         521      523       +2     
  Branches       93       93              
==========================================
  Hits          517      517              
- Misses          3        5       +2     
  Partials        1        1              
Impacted Files Coverage Δ
contracts/OrderBook.sol 99.69% <ø> (ø)
contracts/markets/StableMarket.sol 0.00% <0.00%> (ø)
contracts/markets/VolatileMarket.sol 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

onemonster
onemonster previously approved these changes Apr 5, 2023
@graykode graykode merged commit ea78532 into main Apr 5, 2023
@graykode graykode deleted the feat/priceToIndex branch April 5, 2023 12:19
@github-actions

This comment has been minimized.

@github-actions
Copy link

github-actions bot commented Apr 5, 2023

Test with 02d6466.

  • EHET : Empty heap with empty segment tree
  • EHDT : Empty heap with dirty segment tree
  • FHET : Filled heap with empty segment tree
  • FHFT : Filled heap with filled segment tree

Changes to gas cost

Generated at commit: 02d64662068f65dc6aabbce7cae2135c805abf98, compared to commit: 0ccec4c2d7833da5e770c1dc32ddbb483ee912e4

🧾 Summary (10% most significant diffs)

Contract Method Avg (+/-) %
GasReporter contract EHDT_FullyCancelBid
EHET_FullyCancelAsk
FHET_FullyCancelAsk
FHFT_FullyCancelAsk
FHFT_FullyCancelBid
cancelOrder
+44 ❌
+44 ❌
+44 ❌
+44 ❌
+44 ❌
+35 ❌
+0.04%
+0.04%
+0.04%
+0.04%
+0.04%
+0.08%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
GasReporter contract 948,376 (0) EHDT_FullyCancelAsk
EHDT_FullyCancelBid
EHDT_FullyClaimAsk
EHDT_FullyClaimBid
EHDT_FullyMarketAsk
EHDT_FullyMarketBid
EHDT_LimitAsk
EHDT_LimitBid
EHDT_PartiallyCancelAsk
EHDT_PartiallyCancelBid
EHDT_PartiallyMarketAsk
EHDT_PartiallyMarketBid
EHET_FullyCancelAsk
EHET_FullyCancelBid
EHET_FullyClaimAsk
EHET_FullyClaimBid
EHET_FullyMarketAsk
EHET_FullyMarketBid
EHET_LimitAsk
EHET_LimitBid
EHET_PartiallyCancelAsk
EHET_PartiallyCancelBid
EHET_PartiallyMarketAsk
EHET_PartiallyMarketBid
FHET_FullyCancelAsk
FHET_FullyCancelBid
FHET_FullyMarketAsk
FHET_FullyMarketBid
FHET_LimitAsk
FHET_LimitBid
FHET_PartiallyCancelAsk
FHET_PartiallyCancelBid
FHET_PartiallyMarketAsk
FHET_PartiallyMarketBid
FHFT_FullyCancelAsk
FHFT_FullyCancelBid
FHFT_FullyMarketAsk
FHFT_FullyMarketBid
FHFT_LimitAsk
FHFT_LimitBid
FHFT_PartiallyCancelAsk
FHFT_PartiallyCancelBid
FHFT_PartiallyMarketAsk
FHFT_PartiallyMarketBid
cancelOrder
limitAskOrder
limitBidOrder
marketAskOrder
marketBidOrder
121,763 (+44)
120,862 (+44)
80,809 (+22)
80,736 (+22)
111,840 (-45)
114,974 (-45)
143,743 (+22)
156,794 (+22)
153,375 (+44)
152,510 (+44)
111,862 (-45)
107,561 (-45)
121,697 (+44)
137,963 (+44)
80,788 (+22)
80,735 (+22)
111,927 (-45)
100,300 (-36)
260,876 (+22)
239,656 (+22)
170,542 (+44)
169,631 (+44)
111,861 (-45)
90,531 (-36)
121,719 (+44)
137,920 (+44)
111,928 (-45)
100,333 (-36)
187,138 (+22)
166,238 (+22)
125,293 (+44)
141,517 (+44)
111,861 (-45)
90,531 (-36)
121,698 (+44)
120,795 (+44)
111,884 (-45)
114,996 (-45)
121,424 (+22)
117,473 (+22)
125,315 (+44)
124,460 (+44)
111,862 (-45)
107,583 (-45)
40,773 (+35)
46,932 (+18)
44,756 (+17)
83,973 (-45)
45,321 (-36)
+0.04%
+0.04%
+0.03%
+0.03%
-0.04%
-0.04%
+0.02%
+0.01%
+0.03%
+0.03%
-0.04%
-0.04%
+0.04%
+0.03%
+0.03%
+0.03%
-0.04%
-0.04%
+0.01%
+0.01%
+0.03%
+0.03%
-0.04%
-0.04%
+0.04%
+0.03%
-0.04%
-0.04%
+0.01%
+0.01%
+0.04%
+0.03%
-0.04%
-0.04%
+0.04%
+0.04%
-0.04%
-0.04%
+0.02%
+0.02%
+0.04%
+0.04%
-0.04%
-0.04%
+0.09%
+0.04%
+0.04%
-0.05%
-0.08%
121,763 (+44)
120,862 (+44)
80,809 (+22)
80,736 (+22)
111,840 (-45)
114,974 (-45)
143,743 (+22)
156,794 (+22)
153,375 (+44)
152,510 (+44)
111,862 (-45)
107,561 (-45)
121,697 (+44)
137,963 (+44)
80,788 (+22)
80,735 (+22)
111,927 (-45)
100,300 (-36)
260,876 (+22)
239,656 (+22)
170,542 (+44)
169,631 (+44)
111,861 (-45)
90,531 (-36)
121,719 (+44)
137,920 (+44)
111,928 (-45)
100,333 (-36)
187,138 (+22)
166,238 (+22)
125,293 (+44)
141,517 (+44)
111,861 (-45)
90,531 (-36)
121,698 (+44)
120,795 (+44)
111,884 (-45)
114,996 (-45)
121,424 (+22)
117,473 (+22)
125,315 (+44)
124,460 (+44)
111,862 (-45)
107,583 (-45)
41,814 (+35)
74,548 (+22)
84,466 (+21)
84,973 (-45)
49,986 (-40)
+0.04%
+0.04%
+0.03%
+0.03%
-0.04%
-0.04%
+0.02%
+0.01%
+0.03%
+0.03%
-0.04%
-0.04%
+0.04%
+0.03%
+0.03%
+0.03%
-0.04%
-0.04%
+0.01%
+0.01%
+0.03%
+0.03%
-0.04%
-0.04%
+0.04%
+0.03%
-0.04%
-0.04%
+0.01%
+0.01%
+0.04%
+0.03%
-0.04%
-0.04%
+0.04%
+0.04%
-0.04%
-0.04%
+0.02%
+0.02%
+0.04%
+0.04%
-0.04%
-0.04%
+0.08%
+0.03%
+0.02%
-0.05%
-0.08%
121,763 (+44)
120,862 (+44)
80,809 (+22)
80,736 (+22)
111,840 (-45)
114,974 (-45)
143,743 (+22)
156,794 (+22)
153,375 (+44)
152,510 (+44)
111,862 (-45)
107,561 (-45)
121,697 (+44)
137,963 (+44)
80,788 (+22)
80,735 (+22)
111,927 (-45)
100,300 (-36)
260,876 (+22)
239,656 (+22)
170,542 (+44)
169,631 (+44)
111,861 (-45)
90,531 (-36)
121,719 (+44)
137,920 (+44)
111,928 (-45)
100,333 (-36)
187,138 (+22)
166,238 (+22)
125,293 (+44)
141,517 (+44)
111,861 (-45)
90,531 (-36)
121,698 (+44)
120,795 (+44)
111,884 (-45)
114,996 (-45)
121,424 (+22)
117,473 (+22)
125,315 (+44)
124,460 (+44)
111,862 (-45)
107,583 (-45)
42,854 (+35)
79,696 (+22)
96,877 (+22)
84,973 (-45)
49,986 (-40)
+0.04%
+0.04%
+0.03%
+0.03%
-0.04%
-0.04%
+0.02%
+0.01%
+0.03%
+0.03%
-0.04%
-0.04%
+0.04%
+0.03%
+0.03%
+0.03%
-0.04%
-0.04%
+0.01%
+0.01%
+0.03%
+0.03%
-0.04%
-0.04%
+0.04%
+0.03%
-0.04%
-0.04%
+0.01%
+0.01%
+0.04%
+0.03%
-0.04%
-0.04%
+0.04%
+0.04%
-0.04%
-0.04%
+0.02%
+0.02%
+0.04%
+0.04%
-0.04%
-0.04%
+0.08%
+0.03%
+0.02%
-0.05%
-0.08%
121,763 (+44)
120,862 (+44)
80,809 (+22)
80,736 (+22)
111,840 (-45)
114,974 (-45)
143,743 (+22)
156,794 (+22)
153,375 (+44)
152,510 (+44)
111,862 (-45)
107,561 (-45)
121,697 (+44)
137,963 (+44)
80,788 (+22)
80,735 (+22)
111,927 (-45)
100,300 (-36)
260,876 (+22)
239,656 (+22)
170,542 (+44)
169,631 (+44)
111,861 (-45)
90,531 (-36)
121,719 (+44)
137,920 (+44)
111,928 (-45)
100,333 (-36)
187,138 (+22)
166,238 (+22)
125,293 (+44)
141,517 (+44)
111,861 (-45)
90,531 (-36)
121,698 (+44)
120,795 (+44)
111,884 (-45)
114,996 (-45)
121,424 (+22)
117,473 (+22)
125,315 (+44)
124,460 (+44)
111,862 (-45)
107,583 (-45)
61,974 (+35)
215,096 (+22)
234,287 (+22)
85,973 (-45)
54,651 (-45)
+0.04%
+0.04%
+0.03%
+0.03%
-0.04%
-0.04%
+0.02%
+0.01%
+0.03%
+0.03%
-0.04%
-0.04%
+0.04%
+0.03%
+0.03%
+0.03%
-0.04%
-0.04%
+0.01%
+0.01%
+0.03%
+0.03%
-0.04%
-0.04%
+0.04%
+0.03%
-0.04%
-0.04%
+0.01%
+0.01%
+0.04%
+0.03%
-0.04%
-0.04%
+0.04%
+0.04%
-0.04%
-0.04%
+0.02%
+0.02%
+0.04%
+0.04%
-0.04%
-0.04%
+0.06%
+0.01%
+0.01%
-0.05%
-0.08%
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
294,912 (0)
245,784 (0)
245,784 (0)
4 (0)
4 (0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants