> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# Set Minimum Gas Price \[node.setMinGasPrice]

Changes the minimum gas price (in wei) accepted by the network.

:::warning
`setMinGasPrice` can only be used on networks that do not have EIP-1559 enabled.
:::

## Usage

This example changes the minimum gas price (in wei) accepted by the network.

:::code-group
```ts twoslash [example.ts]
import { client } from './viem.config'

await client.node.setMinGasPrice({
  gasPrice: 1_000_000_000n,
})
```

```ts twoslash [viem.config.ts] filename="viem.config.ts"
import { Client, http, testActions } from 'viem'
import { anvil } from 'viem/chains'

export const client = Client.create({
  chain: anvil,
  transport: http(),
}).extend(testActions())
```
:::

### Standalone Action

Call `Actions.node.setMinGasPrice` directly by passing the Client as the first argument.

:::code-group
```ts twoslash [example.ts]
import { Actions } from 'viem'
import { client } from './viem.config'

await Actions.node.setMinGasPrice(client, {
  gasPrice: 1_000_000_000n,
})
```

```ts twoslash [viem.config.ts] filename="viem.config.ts"
import { Client, http } from 'viem'
import { anvil } from 'viem/chains'

export const client = Client.create({
  chain: anvil,
  transport: http(),
})
```
:::

## Return Value

`void`

No value is returned.

## Parameters

### gasPrice

* **Type:** `bigint`

The gas price (in wei) to set.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'

const client = Client.create({
  chain: mainnet,
  transport: http(),
})
// ---cut---
await Actions.node.setMinGasPrice(client, {
  gasPrice: 1_000_000_000n, // [!code focus]
  mode: 'hardhat',
})
```

### mode

* **Type:** `'anvil' | 'hardhat' | 'ganache'`
* **Default:** `'anvil'`

The test node implementation to target.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'

const client = Client.create({
  chain: mainnet,
  transport: http(),
})
// ---cut---
await Actions.node.setMinGasPrice(client, {
  gasPrice: 1_000_000_000n,
  mode: 'hardhat', // [!code focus]
})
```
