Skip to content

Commit

Permalink
add request methods linea-estimategas.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
qvkare authored Dec 26, 2024
1 parent 43f4cdc commit 5dd9c13
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions docs/api/reference/linea-estimategas.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ You can also call the API using [Infura's supported Linea endpoints](https://doc

### Request

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

```bash
Expand All @@ -73,7 +73,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 +93,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 +125,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 +140,27 @@ You can also call the API using [Infura's supported Linea endpoints](https://doc
}
```

</TabItem>
<TabItem value="ethers.js">
```javascript
{
baseFeePerGas: "0x7",

Check failure on line 147 in docs/api/reference/linea-estimategas.mdx

View workflow job for this annotation

GitHub Actions / Spelling

[vale] reported by reviewdog 🐶 [proselint.Typography] Consider using the '×' symbol instead of '0x7'. Raw Output: {"message": "[proselint.Typography] Consider using the '×' symbol instead of '0x7'.", "location": {"path": "docs/api/reference/linea-estimategas.mdx", "range": {"start": {"line": 147, "column": 21}}}, "severity": "ERROR"}
gasLimit: "0xcf08",

Check failure on line 148 in docs/api/reference/linea-estimategas.mdx

View workflow job for this annotation

GitHub Actions / Spelling

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'gasLimit'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'gasLimit'?", "location": {"path": "docs/api/reference/linea-estimategas.mdx", "range": {"start": {"line": 148, "column": 5}}}, "severity": "ERROR"}
priorityFeePerGas: "0x43a82a4"

Check failure on line 149 in docs/api/reference/linea-estimategas.mdx

View workflow job for this annotation

GitHub Actions / Spelling

[vale] reported by reviewdog 🐶 [proselint.Typography] Consider using the '×' symbol instead of '0x43'. Raw Output: {"message": "[proselint.Typography] Consider using the '×' symbol instead of '0x43'.", "location": {"path": "docs/api/reference/linea-estimategas.mdx", "range": {"start": {"line": 149, "column": 25}}}, "severity": "ERROR"}
}
```
</TabItem>
<TabItem value="viem">
```javascript
{
baseFeePerGas: 7n,
gasLimit: 53000n,

Check failure on line 157 in docs/api/reference/linea-estimategas.mdx

View workflow job for this annotation

GitHub Actions / Spelling

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'gasLimit'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'gasLimit'?", "location": {"path": "docs/api/reference/linea-estimategas.mdx", "range": {"start": {"line": 157, "column": 5}}}, "severity": "ERROR"}
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

0 comments on commit 5dd9c13

Please sign in to comment.