-
Notifications
You must be signed in to change notification settings - Fork 199
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
Fix position deviation calculation by using price instead of sqrt price #821
Merged
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
86e2e8d
Fix calculation of position deviation. Update README. Add changeset.
calintje ce39bce
Update README and add comments to cargo.toml
calintje 2243f3f
Yarn format
calintje fa95920
Merge branch 'main' into calintje/example-bot-update
calintje a584301
Remove Cargo.lock from .gitignore
calintje 50414f7
Update dependabot
calintje c1dd966
Fix depandabot.yml
calintje 7eb0fe3
Fix depandabot.yml
calintje 0950aed
Fix depandabot.yml
calintje eddb0cd
Fix depandabot.yml
calintje 9fde595
Fix depandabot.yml
calintje File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@orca-so/whirlpools-example-rust-repositioning-bot": patch | ||
--- | ||
|
||
Fix calculation of position deviation |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've not received any response from this dev, but I guess it is nice to run
yarn run build
at the root.Our "working" directory has generated crate, so this procedure works.
But what happens if we clone the repository at a new place.
https://discord.com/channels/798712664590254081/1049776001367949413/1349564173893374014
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Building the entire repo with
yarn build
from root can maybe be a bit overkill? For some users, that also causes issues if they're not using the correct version of Rust. Also, if devs want to continue building from this reference example, they will most likely use it in a new repo.A few lines below this comment in the README there is a note to change the reference to the dependency from local to the versions.
Maybe it's more user friendly to have devs update the
cargo.toml
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point.
Before even considering running it outside of this repository, simply cloning the repository and running cargo build results in an error because generated does not exist.
Therefore, it would be helpful to either include instructions to modify the dependencies or provide an option to switch dependencies within Cargo.toml. (If the latter is a bit difficult, instructing users to modify Cargo.toml manually could be a viable approach.)
In any case, users who want to work with the SDK expect it to run smoothly, so reducing potential stumbling points would be beneficial.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The suggested option to switch dependencies within Cargo.toml is nice. However, I was not able to get that to work without errors.
For now, I will leave it like this:
I improved the README, explaining that there are two ways to build and use this project:
I added comments in the
Cargo.toml
.