Skip to content

Commit

Permalink
RPC MEV Blocker and fallback switcher (#139)
Browse files Browse the repository at this point in the history
- Refactor stuff to `eth_defi.provider`
- Add MEV blocking support in the form of `eth_defi.mev_blocker.MEVBlockerProvider`
- Add JSON-RPC fallback switching in the form of `eth_defi.fallback_provider.FallbackProvider`
- Add `HotWallet.create_for_testing`
  • Loading branch information
miohtama authored Jul 22, 2023
1 parent a34dcb9 commit e415516
Show file tree
Hide file tree
Showing 17 changed files with 1,560 additions and 926 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# 0.21.9
# 0.22

- Refactor a lot of functionality to a new submodule `eth_defi.provider`
- Add MEV blocking support in the form of `eth_defi.mev_blocker.MEVBlockerProvider`
- Add JSON-RPC fallback switching in the form of `eth_defi.fallback_provider.FallbackProvider`
- Add `HotWallet.create_for_testing`
- Add utility function `get_onchain_price()` to ask on-chain price of a
Uniswap v3 pool at any given block number
- Deprecate `eth_defi.anvil` -> `eth_defi.provider.anvil`
- Deprecate `eth_defi.ganache` -> `eth_defi.provider.ganache`

# 0.21.8

Expand Down
2 changes: 0 additions & 2 deletions docs/source/api/core/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ The core API is built on the top of Web3.py library.
eth_defi.confirmation
eth_defi.revert_reason
eth_defi.hotwallet
eth_defi.anvil
eth_defi.ganache
eth_defi.middleware
eth_defi.tx
eth_defi.trace
Expand Down
1 change: 1 addition & 0 deletions docs/source/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ API documentation
:maxdepth: 1

core/index
provider/index
usdc/index
uniswap_v2/index
uniswap_v3/index
Expand Down
24 changes: 24 additions & 0 deletions docs/source/api/provider/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
JSON-RPC provider API
---------------------

This submodule offers functionality to connect and enhance robustness of various EVM JSON-RPC API providers..

- Support for test and mainnet fork backends like :py:mod:`eth_defi.provider.anvil` and :py:mod:`eth_defi.provider.ganache`

- `Malicious Extractable Value (MEV) <https://tradingstrategy.ai/glossary/mev>`__ mitigations
in :py:mod:`eth_defi.provider.mev_blocker`

- Using multiple JSON-APRC providers and fallback providers in :py:mod:`eth_defi.provider.fallback`

- For the list of available Ethereum, Binance Smart Chain and such API providers please see `ethereumnodes.com <https://ethereumnodes.com>`__

.. autosummary::
:toctree: _autosummary_provider
:recursive:

eth_defi.provider.mev_blocker
eth_defi.provider.fallback
eth_defi.provider.anvil
eth_defi.provider.ganache
eth_defi.provider.named

Loading

0 comments on commit e415516

Please sign in to comment.