uniswap-v4-sdk

Crates.iouniswap-v4-sdk
lib.rsuniswap-v4-sdk
version0.10.0
created_at2024-12-26 06:21:42.839365+00
updated_at2025-08-26 04:51:50.959489+00
descriptionUniswap V4 SDK for Rust
homepage
repositoryhttps://github.com/shuhuiluo/uniswap-v4-sdk-rs
max_upload_size
id1495465
size471,266
Shuhui Luo (shuhuiluo)

documentation

README

Uniswap V4 SDK Rust

Rust CI docs.rs crates.io

A Rust SDK for building applications on top of Uniswap V4. Rewrite of the TypeScript V4 SDK.

It is feature-complete with matching unit tests.

Features

  • Opinionated Rust implementation of the Uniswap V4 SDK with a focus on readability and performance

  • Usage of alloy-rs types

  • Consistent API and types with the V3 SDK and SDK Core

  • An extensions feature for additional functionalities related to Uniswap V4, including:

Supported Rust Versions (MSRV)

The current MSRV (minimum supported Rust version) is 1.86.

Getting started

Add the following to your Cargo.toml file:

uniswap-v4-sdk = { version = "0.10.0", features = ["extensions", "std"] }

Usage

The package structure follows that of the TypeScript SDK, but with snake_case instead of camelCase.

For easy import, use the prelude:

use uniswap_v4_sdk::prelude::*;

Note on no_std

By default, this library does not depend on the standard library (std). However, the std feature can be enabled.

Contributing

Contributions are welcome. Please open an issue if you have any questions or suggestions.

Testing

Tests are run with

cargo test

Linting

Linting is done with clippy and rustfmt. To run the linter, use:

cargo clippy --all-targets --all-features -- -D warnings
cargo fmt --all -- --check

License

This project is licensed under the MIT License.

Acknowledgements

This project is inspired by and adapted from the following projects:

Commit count: 69

cargo fmt