In the code base, the logic for instantiating `Web3` endpoint in `web3_provider_for_endpoint` may be more complex than necessary, and could be simplified.