setNextBlockBaseFeePerGas
Sets the next block's base fee per gas.
Usage
ts
import { parseGwei } from 'viem'
import { testClient } from './client'
await testClient.setNextBlockBaseFeePerGas({
baseFeePerGas: parseGwei('20')
})
ts
import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
export const testClient = createTestClient({
chain: foundry,
mode: 'anvil',
transport: http(),
})
Parameters
baseFeePerGas
- Type:
bigint
Base fee per gas.
ts
await testClient.setNextBlockBaseFeePerGas({
baseFeePerGas: parseGwei('30')
})