-
Notifications
You must be signed in to change notification settings - Fork 35
Description
It's a common use-case to want to send a private transaction in conjunction with a bundle, similar to the backrun example in the TS reference implementation.
However, importing both traits will lead to compiler error: they have methods having the same name. Differentiating them, can be verbose see example below.
Proposal 1: Split the API client
One way to address this is by breaking up the EthBundleApiClient into two separate clients:
-
EthTxApiClient: this client would exclusively handle individual transactions. It would encompass methods such as:send_private_transactionsend_raw_private_transactioncancel_private_transaction
-
EthBundleApiClient: this client would retain methods specifically designed for bundle operations, including:send_bundlesim_bundlecancel_bundle
Proposal 2: Prefix the 'eth' methods
An alternative solution would be to prefix the eth methods, for instance, renaming send_bundle to eth_send_bundle. However, this approach might introduce a new expectation for the mev_* methods to follow a similar naming convention, like mev_send_bundle.
This inconsistency can be confusing for users. Therefore, Proposal 1 might be more intuitive.