# useWeb3

### Ethereum Provider | [**EIP-1193**](https://eips.ethereum.org/EIPS/eip-1193)

The Ethereum Provider acts as a bridge for Web3 libraries designed for EVM chains, such as [EthersJS](https://eips.ethereum.org/EIPS/eip-1193) and [Web3JS](https://docs.web3js.org/guides/web3_providers_guide/#injected-provider). For example, integrating Tweed with a dApp built using EthersJS is straightforward and requires only three lines of code.\
implements the `chainChanged` functionality to support the EVMs that are supported by the tweed infrastructure.

<details>

<summary>getEthereumProvider()</summary>

```tsx
import { useWeb3 } from "@paytweed/core-react";

const { getEthereumProvider } = useWeb3();

const provider = getEthereumProvider(Network.ETHEREUM_SEPOLIA)
```

**Method parameters**

[**chain**](#user-content-fn-1)[^1] <mark style="color:red;">REQUIRED</mark>  <mark style="color:blue;">string</mark>

</details>

[^1]: Use the `Network` enum to set the chain of the provider


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.paytweed.com/developer-tools/tweed-sdks/core-react/useweb3.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
