-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
52 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.. _multi rpc: | ||
|
||
Configuring multiple RPC endpoints | ||
================================== | ||
|
||
The package supports creating :py:class:`eth_defi.provider.multi_provider.MultiProviderWeb3` | ||
instances of :py:class:`Web3` core connector. | ||
|
||
These instances support multiple JSON-RPC providers, mainly | ||
|
||
- Automatic fallback to another JSON-RPC provider when one fails | ||
|
||
- Using `Malicious Extractable Value protection <https://tradingstrategy.ai/glossary/mev>`__ | ||
with a special endpoints when broadcasting a transaction | ||
|
||
Configuring | ||
----------- | ||
|
||
The multi RPC endpoints can be created with :py:func:`eth_defi.provider.multi_provider.create_multi_provider_web3`. | ||
|
||
Instead of giving a single RPC endpoint URL, you give a list URLs. | ||
|
||
- List can be newline separated or space separated | ||
|
||
- For MEV protection endpoint, you prefix your URL with `mev+` | ||
|
||
Example: | ||
|
||
.. code-block:: | ||
# Uses MEVblocker.io to broadcast transactions | ||
# and two separate nodes for reading blockchain data | ||
config = "mev+https://rpc.mevblocker.io https://myethereumnode1.example.com https://fallback.example.com" | ||
web3 = create_multi_provider_web3(config) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "web3-ethereum-defi" | ||
version = "0.22.1" | ||
version = "0.22.2" | ||
description = "Python library for Uniswap, Aave, ChainLink, Enzyme and other protocols on BNB Chain, Polygon, Ethereum and other blockchains" | ||
authors = ["Mikko Ohtamaa <[email protected]>"] | ||
license = "MIT" | ||
|