Skip to content

How to change baseFeePerGas in testing #5265

Discussion options

You must be logged in to vote

@RippleLeaf We don't currently have a way to set the baseFeePerGas, but we do have an issue for it, so you can expect to see this feature in the near(ish) future.

In terms of workarounds, you have a few options:

  1. Update your tests to set appropriate an gasPrice on your transactions. However, I obviously don't know the details of what you're working on, so this may not be feasible or helpful.
  2. Start Ganache with the --chain.hardfork berlin option. This will use berlin hardfork rules for the chain, which was before blocks had a baseFeePerGas.
  3. Use evm_mine to lower the baseFeePerGas of blocks. Every time a block is mined, the baseFeePerGas is either lowered or raised based off of how full the…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@MicaiahReid
Comment options

Comment options

You must be logged in to vote
3 replies
@RippleLeaf
Comment options

@staminna
Comment options

@MicaiahReid
Comment options

Answer selected by RippleLeaf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants