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

Add python wrappers for get_max_long, get_max_short #555

Merged
merged 4 commits into from
Aug 15, 2023

Conversation

sentilesdal
Copy link
Contributor

Adds some wrappers for the get_max_long and get_max_short rust functions. Basic tests were added just to double check the error handling of the wrappers.

  • add wrappers for get_max_long/short
  • add some basic checks

@github-actions
Copy link

github-actions bot commented Aug 14, 2023

Hyperdrive Gas Benchmark

Benchmark suite Current: 1a1294d Previous: 91163bc Deviation Status
addLiquidity: min 807 gas 807 gas 0% 🟰
addLiquidity: avg 43622 gas 44021 gas -0.9064%
addLiquidity: max 80591 gas 80591 gas 0% 🟰
checkpoint: min 514 gas 514 gas 0% 🟰
checkpoint: avg 23181 gas 23181 gas 0% 🟰
checkpoint: max 34040 gas 34040 gas 0% 🟰
closeLong: min 852 gas 852 gas 0% 🟰
closeLong: avg 45854 gas 45871 gas -0.0371%
closeLong: max 77759 gas 85951 gas -9.5310%
closeShort: min 809 gas 809 gas 0% 🟰
closeShort: avg 42139 gas 42251 gas -0.2651%
closeShort: max 87386 gas 87386 gas 0% 🟰
initialize: min 714 gas 714 gas 0% 🟰
initialize: avg 159447 gas 159447 gas 0% 🟰
initialize: max 233486 gas 233486 gas 0% 🟰
openLong: min 740 gas 740 gas 0% 🟰
openLong: avg 113176 gas 113783 gas -0.5335%
openLong: max 179317 gas 179317 gas 0% 🟰
openShort: min 804 gas 804 gas 0% 🟰
openShort: avg 151280 gas 150351 gas 0.6179% 🚨
openShort: max 219084 gas 219084 gas 0% 🟰
removeLiquidity: min 784 gas 784 gas 0% 🟰
removeLiquidity: avg 57394 gas 57394 gas 0% 🟰
removeLiquidity: max 119628 gas 119628 gas 0% 🟰

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Member

@dpaiton dpaiton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm; almost there!

Copy link
Member

@dpaiton dpaiton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add these funcs to the stubs now that we have those?

@coveralls
Copy link
Collaborator

coveralls commented Aug 15, 2023

Coverage Status

coverage: 98.524%. remained the same when pulling 1a1294d on matt-max-long-wrapper into fe876b7 on main.

@sentilesdal sentilesdal enabled auto-merge (squash) August 15, 2023 17:42
Copy link
Member

@dpaiton dpaiton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple of docstring fix requests, otherwise good!

@sentilesdal sentilesdal merged commit 709cd0d into main Aug 15, 2023
9 checks passed
@sentilesdal sentilesdal deleted the matt-max-long-wrapper branch August 15, 2023 19:10
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.

3 participants