Skip to content
On this page

setNextBlockBaseFeePerGas

Sets the next block's base fee per gas.

Import

ts
import { setNextBlockBaseFeePerGas } from 'viem/test'

Usage

ts
import { setNextBlockBaseFeePerGas } from 'viem/test'
import { testClient } from '.'
 
await setNextBlockBaseFeePerGas(testClient, { 
  baseFeePerGas: parseGwei('20')
})

Parameters

baseFeePerGas

  • Type: bigint

Base fee per gas.

ts
await setNextBlockBaseFeePerGas(testClient, {
  baseFeePerGas: parseGwei('30') 
})

Released under the MIT License.