pin_fallback_provider_by_host
Documentation for eth_defi.event_reader.multicall_batcher.pin_fallback_provider_by_host function.
- pin_fallback_provider_by_host(fallback_provider, host_substring)
Pin a
FallbackProviderto the provider whose host matches a substring.Unlike
FallbackProvider.switch_provider()(which cycles or randomises), this deterministically selects a specific upstream — used to force HyperEVM multicall retries onto the Alchemy single node, bypassing goldsky’s eRPC consensus endpoint. Seedocs/README-hyperevm-goldsky-failure.md.The switch goes through
FallbackProvider.switch_to_provider_index(), so the pinned provider is chain-id verified and rolled back if it is misconfigured or routing to the wrong chain — we never silently read from a bad endpoint.- Parameters
fallback_provider (eth_defi.provider.fallback.FallbackProvider) – The fallback provider to repoint.
host_substring (str) – Lower-case substring matched against
get_provider_name()output.
- Returns
Trueif a matching provider was found and successfully selected,Falseif no provider matched or the match failed chain-id verification (in which case the caller should resume normal provider switching).- Return type