fix: polish crate docs, add READMEs, enforce missing_docs#158
Conversation
| pub struct DepthAndPrice { | ||
| /// Spot price (token_out per token_in) for this edge direction. | ||
| pub spot_price: f64, | ||
| /// Liquidity depth in USD (or native token terms). | ||
| /// Liquidity depth denominated in the chain's native token. | ||
| pub depth: f64, | ||
| } |
There was a problem hiding this comment.
@tvinagre can you confirm the denomination here please?
There was a problem hiding this comment.
I've checked the code and I think we have a bug.. depth is in raw units of sell_token - which is fine if we're comparing same In-out token paths, but that is not the case. I'm investigating this further and will open a PR soon if the bug exists
| @@ -7,6 +7,7 @@ use tycho_simulation::{tycho_core::traits::FeePriceGetter, tycho_ethereum::gas:: | |||
| use crate::feed::{market_data::SharedMarketDataRef, DataFeedError}; | |||
|
|
|||
| // TODO: Refactor gas price fetching into a `DerivedComputation`. | |||
There was a problem hiding this comment.
Unless we think it's irrelevant.
It's a discussion if gas should be treated as derived data or not - and if it should block solving or not
2c7492d to
b17e39d
Compare
dianacarvalho1
left a comment
There was a problem hiding this comment.
Thank you @kayibal ! 🙏🏼 only have smol comments
| //! "https://rpc.fynd.exchange", | ||
| //! "https://mainnet.infura.io/v3/YOUR_KEY", | ||
| //! "http://localhost:3000", | ||
| //! "https://reth-ethereum.ithaca.xyz/rpc", |
There was a problem hiding this comment.
I think in other places we are using https://eth.llamarpc.com. Should we be consistent?
clients/rust/README.md
Outdated
| ```toml | ||
| [dependencies] | ||
| fynd-client = "0" # see crates.io for the latest version | ||
| ``` |
There was a problem hiding this comment.
maybe just cargo add fynd-client then? 👀
fynd-core/src/encoding/mod.rs
Outdated
| /// Route encoder: converts solver output into ABI-encoded on-chain calldata. | ||
| /// | ||
| /// Wraps [tycho-execution](https://docs.propellerheads.xyz/tycho/for-solvers/execution) to | ||
| /// produce ABI-encoded calldata for single and sequential swaps, with and without Permit2. See |
There was a problem hiding this comment.
single, sequential and split swaps
There was a problem hiding this comment.
I know we don't have an algo that does splits yet but the encoding already supports it
…itSingle::new Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Add a Workflow section pointing to the swap_erc20 example, add a build_quote_only example, and replace placeholder address bytes with real mainnet addresses via alloy::primitives::address!. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Also adds field-level docs to FyndError::Api named fields, which were the only items not yet covered. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Replace placeholder https://rpc.fynd.exchange URLs with http://localhost:3000 (default Fynd) and http://localhost:8545 (Anvil). Add docs.fynd.xyz link in the crate intro and workflow section. Add README.md for crates.io. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…README Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Add docs.fynd.xyz link in crate intro. Add doc comments to all previously undocumented public items: module declarations, defaults constants, ApiDoc/ExperimentalApiDoc structs, StaleData::age_ms field, IncludeField variants, FyndRPCBuilder::build, and parse_chain. Add README.md for crates.io. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Add docs.fynd.xyz link and workflow description in crate intro. Add declarations, defaults constants, BellmanFordAlgorithm, AlgorithmError named fields, price_guard types, SolveError named fields, RouteValidationError/OrderValidationError variants and fields, QuoteRequest, WorkerPoolBuilder::new, FyndBuilder::chain, and test_utils helpers. Add README.md for crates.io. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Remove inline code examples from all READMEs. Each README now contains a brief description, install snippet, and links to docs.fynd.xyz instead of duplicating workflow steps and examples. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Rustdoc resolves //! inner docs in the parent module's scope, not the submodule's own scope. Fixed by using fully-qualified crate paths. Also fixed backtick display text in [`text`](path) links, which rustdoc treats as an additional intra-doc link resolution target. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Use succinct address!().to_vec().into() form in fynd-client doctest - Fix broken doctest (missing Result return context for ?) - Fix workspace-relative example path to crate-relative in lib.rs docs - Unpin fynd-client version in README (0.35 -> 0) - Expand encoding module docs with links to tycho-execution and encoding guide - Add direct link to API reference (docs.fynd.xyz/reference/api) in fynd-rpc Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Resolve review feedback: use `cargo add` in README, use ithaca RPC URL consistently, add split swaps to encoding docs, fix depth doc to raw sell_token units. Add missing doc comments for new public items introduced after rebase (FailedItemError variants, PriceGuard, HyperliquidProvider, Bytes methods). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
b17e39d to
4281989
Compare
Add `RUSTDOCFLAGS="-D warnings" cargo doc` to check.sh so broken doc links and code blocks are caught locally before CI. Fix unresolved intra-doc links in price_guard module (use crate-absolute paths) and a malformed code block in fynd-client lib.rs. Update knowledge docs with the new check.sh step. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
This PR is included in version 0.43.1 🎉 |
All four Rust crates now have complete, navigable docs on docs.rs. Previously,
missing_docswas not enforced, intra-doc links were broken, and the example code infynd-clientused a verbose address instantiation pattern and had a broken doctest.What changed:
#![deny(missing_docs)]across all crates; fill every gapfynd-coreandfynd-rpcencodingmodule doc with links to the tycho-execution and Fynd encoding guidedocs.fynd.xyz/reference/api) infynd-rpcfynd-clientdoctest: succinct address instantiation, correctResultreturn context, crate-relative example pathfynd-clientREADME version ("0.35"→"0")Users integrating the Rust crates get accurate, fully linked API docs on docs.rs and can navigate from the GitBook site directly to crate-level reference.
🤖 Generated with Claude Code