Skip to content

Commit

Permalink
Merge branch 'main' into julien-marchand-patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
jlwllmr authored Jan 6, 2025
2 parents ab1892c + 9aca473 commit e8785e5
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 374 deletions.
33 changes: 29 additions & 4 deletions docs/api/reference/linea-estimategas.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@ fee per gas.

:::tip

You can also call the API using [Infura's supported Linea endpoints](https://docs.infura.io/api/networks/linea/choose-a-network).
You can also call the API using [Infura's supported Linea endpoints](https://docs.metamask.io/services/reference/linea/json-rpc-methods/).

:::

### Request

<Tabs>
<Tabs groupId="sdk-lang">
<TabItem value="curl">

```bash
Expand All @@ -73,7 +74,7 @@ You can also call the API using [Infura's supported Linea endpoints](https://doc
```

</TabItem>
{/* <TabItem value="ethers.js">
<TabItem value="ethers.js">
```javascript
type LineaEstimateGasResponse = {
baseFeePerGas: string;
Expand All @@ -93,7 +94,7 @@ You can also call the API using [Infura's supported Linea endpoints](https://doc
const fees: LineaEstimateGasResponse = await provider.send("linea_estimateGas", [params]);
console.log(fees);
```
</TabItem> */}
</TabItem>
<TabItem value="viem">
```javascript
import { createPublicClient, http, parseEther } from 'viem'
Expand Down Expand Up @@ -125,6 +126,9 @@ You can also call the API using [Infura's supported Linea endpoints](https://doc

### Response

<Tabs groupId="sdk-lang">
<TabItem value="curl">

```JSON
{
"jsonrpc": "2.0",
Expand All @@ -137,6 +141,27 @@ You can also call the API using [Infura's supported Linea endpoints](https://doc
}
```

</TabItem>
<TabItem value="ethers.js">
```javascript
{
baseFeePerGas: "0x7",
gasLimit: "0xcf08",
priorityFeePerGas: "0x43a82a4"
}
```
</TabItem>
<TabItem value="viem">
```javascript
{
baseFeePerGas: 7n,
gasLimit: 53000n,
priorityFeePerGas: 4444716n
}
```
</TabItem>
</Tabs>

Where:
- `baseFeePerGas` - Uses the Linea base fee which is set at 7 wei.
- `gasLimit` - Uses the standard `eth_estimateGas` API calculation.
Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/how-to/connect-wallet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ uses the common EIP-1193 standard. There are a few wallets that also have [separ

Next, head to your app file.

Import the the relevant providers from Wagmi and Tanstack Query, as well as the `QueryClient`
Import the the relevant providers from Wagmi and TanStack Query, as well as the `QueryClient`
function we'll use:

```tsx
Expand Down
Loading

0 comments on commit e8785e5

Please sign in to comment.