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

expose more functions from rust SDK #1010

Closed
wakamex opened this issue Oct 17, 2023 · 5 comments
Closed

expose more functions from rust SDK #1010

wakamex opened this issue Oct 17, 2023 · 5 comments
Assignees
Labels
enhancement A feature or refactor request good first issue New to the repo? Start here! sdk

Comments

@wakamex
Copy link
Contributor

wakamex commented Oct 17, 2023

things that would be useful for me right now:

  • get_bonds_out_for_shares_in
  • get_shares_out_for_bonds_in
  • get_bonds_in_for_shares_out
  • get_shares_in_for_bonds_out

please put your suggestions below.

@wakamex wakamex added the enhancement A feature or refactor request label Oct 17, 2023
@dpaiton
Copy link
Member

dpaiton commented Apr 11, 2024

These are all private functions in the yieldspace.rs library. What is the use case for making them public?

@wakamex
Copy link
Contributor Author

wakamex commented Apr 15, 2024

should we add something like the measure_value function into the rust SDK? https://github.com/delvtech/agent0/pull/1352/files#diff-588ee93bc3288ed7ed17a880e6ffdda7c986c72d22d289b23fbef3e2e0c07a4bR42

@wakamex
Copy link
Contributor Author

wakamex commented Apr 15, 2024

this predict function definitely feels like it should be in the rust SDK because it's very low-level https://github.com/delvtech/agent0/blob/a317f3d2fd0ece2627814a7d2368d6c87c52e9e4/src/agent0/core/hyperdrive/utilities/predict.py

@dpaiton
Copy link
Member

dpaiton commented Apr 15, 2024

I agree some of this can more heavily rely on the rust sdk. However, I think we should still avoid using any fns from yieldspace.rs. Instead, lets audit the agent0 _mock_contract.py file and ensure that all of the required high-level rust sdk functions are available (e.g. the fees can all be determined from rust now). We can then rewrite the predict.py and measure_value to use these higher-level functions.

@dpaiton
Copy link
Member

dpaiton commented Jun 5, 2024

closing in favor of #1514

@dpaiton dpaiton closed this as not planned Won't fix, can't repro, duplicate, stale Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A feature or refactor request good first issue New to the repo? Start here! sdk
Projects
None yet
Development

No branches or pull requests

2 participants