Skip to content

An unofficial python client for Uniswap V3, built for human beings.

License

Notifications You must be signed in to change notification settings

valentinmk/uniswap-v3

Repository files navigation

uniswap-v3

Python 3.10 Python 3.11

Pytest

Documentation Status

WORK IN PROGRESS

An unofficial python client for Uniswap V3, built for human beings.

TODO

  1. version 0.0.1 - swaps

You are here

  • Base classes
  • Original scenarios from an official documentations
    • "Creating a Pool instance"
    • "Fetching Spot Prices"
    • "Creating a Trade"
    • (Extra) Execute a Trade
  1. version 0.0.2 - Position NFTs
  • Mint
  • Increase liquidity
  • Decrease liquidity
  • Collect
  • Position info
  • "Swap and Add Liquidity Atomically" (?)
  1. version 0.0.3 - multicall support
  • multicall interface
  1. version 0.0.4 - Position NFT for humans
  • Mint
  • Increase liquidity
  • Decrease liquidity
  • Collect
  • Position info
  1. version 0.0.5 - library design - client to BaseContract
  • send_transaction to BaseContract
  • multicall2 to decrease RPS of provider
  • multiple providers
  1. version 0.0.6 - Position NFT for humans
  • mint for Humans with the corner cases with ETH -> WETH
  • test for the mint for Humans around pair with different decimals like ETH-USDT (18 vs 6?)
  • increase liquidity with the corner cases with ETH -> WETH
  • decrease liquidity with the corner cases with ETH -> WETH
  • collect liquidity with the corner cases with ETH -> WETH
  1. version 0.0.7 - PYPI publishing and docs

  2. version 0.0.8 - finish with tests

  3. version 0.0.9 - smart-routing / similar to AlphaRouter

  • "Integrating the Auto Router"

Development Guide (sort of)

Hints

Use export $(cat _.env | xargs) to load yours _.env file in the terminal.

END

Testing

Before testing run pip install -r requirements_dev.txt. Runs with pytest -vs tests/test_3.py -m devel --cov uniswap. For main branch releases will be executed via pytest tests -m release --cov uniswap. Please check tests/conftest.py and pytest.ini for details.

Docs

Notes:

  • To collect docs from docstrings: sphinx-apidoc -o source ../uniswap -M -f
  • To clean and build docs: make clean && make html

About

An unofficial python client for Uniswap V3, built for human beings.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages