Skip to content
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

Add support for eth_sendBundle method to interact with private relays. #3113

Closed
F4ever opened this issue Sep 29, 2023 · 0 comments
Closed

Add support for eth_sendBundle method to interact with private relays. #3113

F4ever opened this issue Sep 29, 2023 · 0 comments

Comments

@F4ever
Copy link

F4ever commented Sep 29, 2023

Hey everyone!

Let's add eth_sendBundle method to interact with private relays.
It could be done with new optional middleware.

w = Web3()

w.middleware_onion.add(
   construct_private_relayes_middleware(
        auction_bundler_private_key=...,
        relay_urls=[
            ....
        ]
   )
)

tx = contract.function.do()

latest_num = w.eth.get_block('pending').number

# Send 
w.eth.send_bundle([tx], blocks_range=list(range(latest_num, latest_num + 10)))

try:
    rec = result.receipts()
except TransactionNotFound:
     ... # bad
else:
    ... # good
@F4ever F4ever closed this as completed May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant