Skip to content

Commit dde4a7d

Browse files
authored
1.0.0 release (#53)
* add pypi files, update README, set version to 1.0.0 * fix package typo * add build files to gitignore
1 parent 08dd94c commit dde4a7d

File tree

5 files changed

+111
-11
lines changed

5 files changed

+111
-11
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
__pycache__
22
*.pyc
33
.idea
4+
build/
5+
dist/
6+
flashbots.egg-info/

PKG-INFO

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
Metadata-Version: 2.1
2+
Name: flashbots
3+
Version: 1.0.0
4+
Summary: flashbots client
5+
Author: Georgios Konstantopoulos
6+
Author-email: me@gakonst.com
7+
Requires-Python: >=3.9,<4.0
8+
Classifier: Programming Language :: Python :: 3
9+
Classifier: Programming Language :: Python :: 3.9
10+
Requires-Dist: web3 (>=5.22.0,<6)
11+
Description-Content-Type: text/markdown
12+
13+
This library works by injecting a new module in the Web3.py instance, which allows
14+
submitting "bundles" of transactions directly to miners. This is done by also creating
15+
a middleware which captures calls to `eth_sendBundle` and `eth_callBundle`, and sends
16+
them to an RPC endpoint which you have specified, which corresponds to `mev-geth`.
17+
To apply correct headers we use FlashbotProvider which injects the correct header on post.
18+
19+
## Example
20+
21+
```python
22+
from eth_account.signers.local import LocalAccount
23+
from web3 import Web3, HTTPProvider
24+
from flashbots import flashbot
25+
from eth_account.account import Account
26+
import os
27+
28+
ETH_ACCOUNT_SIGNATURE: LocalAccount = Account.from_key(os.environ.get("ETH_SIGNATURE_KEY"))
29+
30+
31+
w3 = Web3(HTTPProvider("http://localhost:8545"))
32+
flashbot(w3, ETH_ACCOUNT_SIGNATURE)
33+
```
34+
35+
Now the `w3.flashbots.sendBundle` method should be available to you. Look in `examples/simple.py` for usage examples
36+
37+
# Development and testing
38+
39+
Setup and run (mev-)geth with Websocket support:
40+
41+
```sh
42+
geth --http --http.api eth,net,web3,txpool --syncmode full
43+
```
44+
45+
Install [poetry](https://python-poetry.org/)
46+
47+
Poetry will automatically fix your venv and all packages needed
48+
49+
```sh
50+
poetry install
51+
```
52+
53+
Tips: PyCharm has a poetry plugin
54+
55+
## Linting
56+
57+
It's advisable to run black with default rules for linting
58+
59+
```sh
60+
sudo pip install black # Black should be installed with a global entrypoint
61+
black .
62+
```

README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
# web3-flashbots
12

2-
This library works by injecting a new module in the Web3.py instance, which allows
3+
This library works by injecting flashbots as a new module in the Web3.py instance, which allows
34
submitting "bundles" of transactions directly to miners. This is done by also creating
45
a middleware which captures calls to `eth_sendBundle` and `eth_callBundle`, and sends
5-
them to an RPC endpoint which you have specified, which corresponds to `mev-geth`.
6-
To apply correct headers we use FlashbotProvider which injects the correct header on post
6+
them to an RPC endpoint which you have specified, which corresponds to `mev-geth`.
7+
8+
To apply correct headers we use FlashbotProvider which injects the correct header on post.
79

810
## Example
911

@@ -23,27 +25,29 @@ flashbot(w3, ETH_ACCOUNT_SIGNATURE)
2325

2426
Now the `w3.flashbots.sendBundle` method should be available to you. Look in `examples/simple.py` for usage examples
2527

26-
# Development and testing
28+
## Development and testing
2729

2830
Setup and run (mev-)geth with Websocket support:
29-
```
31+
32+
```sh
3033
geth --http --http.api eth,net,web3,txpool --syncmode full
3134
```
3235

3336
Install [poetry](https://python-poetry.org/)
3437

35-
Poetry will automatically fix your venv and all packages needed
36-
```
38+
Poetry will automatically fix your venv and all packages needed.
39+
40+
```sh
3741
poetry install
3842
```
39-
Tips: PyCharm has a poetry plugin
4043

44+
Tips: PyCharm has a poetry plugin
4145

4246
## Linting
47+
4348
It's advisable to run black with default rules for linting
4449

45-
```
50+
```sh
4651
sudo pip install black # Black should be installed with a global entrypoint
4752
black .
4853
```
49-

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tool.poetry]
22
authors = ["Georgios Konstantopoulos <me@gakonst.com>", "Nikolas Papaioannou <n0k0@hacky.software>"]
33
name = "flashbots"
4-
version = "1.0.1"
4+
version = "1.0.0"
55
description = ""
66
readme = "README.md"
77

setup.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# -*- coding: utf-8 -*-
2+
from setuptools import setup
3+
4+
packages = \
5+
['flashbots']
6+
7+
package_data = \
8+
{'': ['*']}
9+
10+
install_requires = \
11+
['web3>=5.22.0,<6']
12+
13+
setup_kwargs = {
14+
'name': 'flashbots',
15+
'version': '1.0.0',
16+
'description': 'web3-flashbots.py',
17+
'long_description': '\nThis library works by injecting a new module in the Web3.py instance, which allows\nsubmitting "bundles" of transactions directly to miners. This is done by also creating\na middleware which captures calls to `eth_sendBundle` and `eth_callBundle`, and sends\nthem to an RPC endpoint which you have specified, which corresponds to `mev-geth`. \nTo apply correct headers we use FlashbotProvider which injects the correct header on post \n\n## Example\n\n```python\nfrom eth_account.signers.local import LocalAccount\nfrom web3 import Web3, HTTPProvider\nfrom flashbots import flashbot\nfrom eth_account.account import Account\nimport os\n\nETH_ACCOUNT_SIGNATURE: LocalAccount = Account.from_key(os.environ.get("ETH_SIGNATURE_KEY"))\n\n\nw3 = Web3(HTTPProvider("http://localhost:8545"))\nflashbot(w3, ETH_ACCOUNT_SIGNATURE)\n```\n\nNow the `w3.flashbots.sendBundle` method should be available to you. Look in `examples/simple.py` for usage examples\n\n# Development and testing\n\nSetup and run (mev-)geth with Websocket support:\n```\ngeth --http --http.api eth,net,web3,txpool --syncmode full\n```\n\nInstall [poetry](https://python-poetry.org/)\n\nPoetry will automatically fix your venv and all packages needed\n```\npoetry install\n```\nTips: PyCharm has a poetry plugin\n\n\n## Linting\nIt\'s advisable to run black with default rules for linting\n\n```\nsudo pip install black # Black should be installed with a global entrypoint\nblack .\n```\n\n',
18+
'long_description_content_type': 'text/markdown',
19+
'author': 'Georgios Konstantopoulos',
20+
'author_email': 'me@gakonst.com',
21+
'maintainer': None,
22+
'maintainer_email': None,
23+
'url': None,
24+
'packages': packages,
25+
'package_data': package_data,
26+
'install_requires': install_requires,
27+
'python_requires': '>=3.9,<4.0',
28+
}
29+
30+
31+
setup(**setup_kwargs)

0 commit comments

Comments
 (0)