MEVBlockerProvider

Documentation for eth_defi.provider.mev_blocker.MEVBlockerProvider Python class.

class MEVBlockerProvider[source]

Routes methods that execute transaction through a special MEV proof endpoint.

  • Depending on whether we are sending a transaction or reading from the blockchain, switch between the JSON-RPC endpoint.

  • Route all outgoing transactions through a special MEV blocker endpoint

Attributes summary

call_endpoint_uri

Return the active node URI where call JSON-RPCs go.

ccip_read_max_redirects

endpoint_uri

Map us to the transact provider by the default

global_ccip_read_enabled

has_persistent_connection

is_async

middlewares

provider_counter

Keep tabs on how much API traffic we generate through each endpoint

Methods summary

__init__(call_provider, transact_provider[, ...])

decode_rpc_response(raw_response)

encode_rpc_request(method, params)

is_connected([show_traceback])

is_transact_method(method)

Does this RPC method do a transaction

make_request(method, params)

request_func(w3, outer_middlewares)

@param outer_middlewares is an iterable of middlewares,

__init__(call_provider, transact_provider, transact_methods=('eth_sendTransaction', 'eth_sendRawTransaction'))[source]
Parameters
provider_counter

Keep tabs on how much API traffic we generate through each endpoint

is_transact_method(method)[source]

Does this RPC method do a transaction

Parameters

method (web3.types.RPCEndpoint) –

Return type

bool

property endpoint_uri: str

Map us to the transact provider by the default

property call_endpoint_uri: str

Return the active node URI where call JSON-RPCs go.

Warning

Endpoint URIs often contain API keys. They should be never publicly displayed as is.