Skip to content

Commit

Permalink
1.1.1 Release commit
Browse files Browse the repository at this point in the history
  • Loading branch information
gabedonnan committed Sep 20, 2023
1 parent 8f0c916 commit 47cd6ab
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 60 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ Features include:
- "eth_subscribe" functionality
- Websocket pooling for high performance calls
- Support for RPC batching, allowing multiple calls to the same function at once
- Currency conversion for wei, so you don't have to rely on external libs like Web3.py
- Currency conversion, with support for esoteric denomination names (e.g. lovelace)
- Private transaction and Bundle support for communication directly with block builders
- Automatic nonce management for transactions, with automatic gas management coming in the future

### Implemented RPC methods

Expand All @@ -26,12 +27,12 @@ The following builder classes are currently implemented:

- Titan Builder
- Rsync Builder
- Beaver Builder (Using same parameters as rsync, may need adjustment)
- Builder0x69
- Flashbots Builder (additional robustness testing needed)
- Flashbots Builder
- Beaver Builder (Very poorly documented parameters online, may need adjustment)

With support for creating custom builder classes by inheriting from the `Builder` class.
An implementation of the Beaver Builder and support for [mevboost](mevboost.pics) coming in future versions.

Each of these now have support for [mevboost](https://mevboost.pics) bundles.

### Example usage

Expand Down Expand Up @@ -185,7 +186,7 @@ pythereum = {git = "https://github.com/gabedonnan/pythereum.git"}
or

```toml
pythereum = "^1.1.0"
pythereum = "^1.1.1"
```

If you would like to install the library via pypi instead of via this git repository.
Expand Down
2 changes: 1 addition & 1 deletion old_unittests.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ async def test_get_block_by_hash(self):
print(r)

async def test_get_block_by_number(self):
r = await self.rpc.get_block_by_number(17578346, False)
r = await self.rpc.get_block_by_number(BlockTag.latest, True)
print(r)

async def test_get_syncing(self):
Expand Down
90 changes: 45 additions & 45 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pythereum"
version = "1.1.0"
version = "1.1.1"
description = "A lightweight Ethereum JSON RPC library written in python"
authors = ["gabedonnan <[email protected]>"]
readme = "README.md"
Expand All @@ -14,7 +14,7 @@ pytest = "^7.4.2"
pytest-asyncio = "^0.21.1"
aiohttp = "^3.8.5"
eth-account = "^0.9.0"
eth-utils = "^2.2.0"
eth-utils = "^2.2.1"

[build-system]
requires = ["poetry-core"]
Expand Down
8 changes: 2 additions & 6 deletions pythereum/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1081,9 +1081,7 @@ async def new_filter(
:param websocket: An optional external websocket for calls to this function
:return: Returns an integer filter ID
"""
param = self._object_formatter(
from_block=from_block, to_block=to_block, address=address, topics=topics
)
param = {"from": from_block, "to": to_block, "address": address, "topics": topics}
msg = await self._send_message("eth_newFilter", [param], websocket)
match msg:
case None:
Expand Down Expand Up @@ -1216,9 +1214,7 @@ async def get_logs(
:param websocket: An optional external websocket for calls to this function
:return: Returns a list of log objects or nothing if no changes have occurred since last poll
"""
param = self._object_formatter(
from_block=from_block, to_block=to_block, address=address, topics=topics
)
param = {"from": from_block, "to": to_block, "address": address, "topics": topics}
msg = await self._send_message("eth_getLogs", [param], websocket)
match msg:
case None:
Expand Down

0 comments on commit 47cd6ab

Please sign in to comment.