-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grant review feedback #1
Comments
Hello, I just updated the readme with new client initalization options. It uses either the init constructor or the classmethod. They are both desribed in the Usage section. |
Also some thoughts:
|
re @ZigaMr
this looks fine, couldn't find a better alternative
Yeah, you don't need the transaction receipt. A plain transaction from provider.get_transaction is sufficient to reconstruct the tx for simulation, which is all we need. |
@ZigaMr I also had just a couple comments on the readme: one note here, and the others I'll just make a PR for. The examples all seem to imply that the user would create a new client for every request. Rather, we should try to suggest that the client is instantiated once and passed as an argument to functions that use it. so instead of async def build_and_send():
client = MevShareClient.from_config(network='goerli', config_dir='../config.json')
# ...
print(await client.send_bundle(params)) we should have something like async def build_and_send(client: MevShareClient):
# ...
print(await client.send_bundle(params)) so the user can just refer to the example of how to instantiate a MevShareClient, and we don't have to keep rewriting it. not necessarily a big deal but it does feel cleaner, and suggests the user to implement best practices |
@ZigaMr posted a PR w/ some readme tweaks here: https://github.com/ZigaMr/mev-share-py/pull/2/files |
@ZigaMr on the custom RLP encoder, I think you can use what your eth provider already has. From web3.py: haven't tested, but looks like this function gives you the format you need to call |
Hey @zeroXbrock thanks for the feedback, I'm just going to comment all the updates I made:
|
Another important change, as per your suggestion, the custom callbacks are now expected to receive pendingTx/pendingBundle parameter as well as MevShareClient object which is just a reference to the already initialized client. You can review it in the latest commit. |
Looking better, @ZigaMr! I took another look and found a few more things:
|
posting this issue here for reviewers to leave comments
The text was updated successfully, but these errors were encountered: