Repository navigation
Write scaffolded code for solana bitget solver - #5106
AryanGodara wants to merge 4 commits into
Conversation
Signed-off-by: Aryan Godara <aryangodara03@gmail.com>
…caffold Signed-off-by: Aryan Godara <aryangodara03@gmail.com>
| pub struct Bitget; | ||
|
|
||
| impl Bitget { | ||
| // TODO(BE-253): quote the order and build the swap. |
Signed-off-by: Aryan Godara <aryangodara03@gmail.com>
|
Claude finished @AryanGodara's task in 1m 49s —— View job Review: Bitget solver scaffoldReviewed the full diff against No blocking issues. One non-blocking note posted inline:
Everything else (the |
Signed-off-by: Aryan Godara <aryangodara03@gmail.com>
75aef89 to
da27e6f
Compare
| pub struct BitgetConfig { | ||
| /// Base URL of the Bitget swap API. `swap` is joined onto it, so it needs | ||
| /// the trailing slash. | ||
| pub endpoint: Url, |
There was a problem hiding this comment.
Non-blocking / for the next PR: correctness here relies entirely on a prose comment ("needs the trailing slash"). Because Url::join("swap") replaces the last path segment when the base lacks a trailing slash, a deploy config of .../swapx/pro (no slash) would silently resolve to .../swapx/swap rather than .../swapx/pro/swap — a wrong endpoint with no error. Worth validating/normalizing the trailing slash in the Bitget constructor when the swap adapter lands (BE-253), rather than trusting operators to read the comment.
Description
Wire in the config, the CLI subcommand and the
Dexvariant for the new Bitget Solana solver. The swap adapter comes in the next PR, so up to this PRbitgetanswers every order with no solution.Changes
dex::Error: Jupiter's error enum moves up to thedexmodule, so the solve loop andQuoteno longer name Jupiter's type.[dex]table, loaded per subcommand.endpoint,api-key,api-secretandslippage-bps. The struct has noDebug, so the secret can't reach the logs.Dex::Bitgetwith a stubswapthat returnsNotFound, and abitgetsubcommand.How to test
Closes BE-252