hardhat-gas-reporter icon indicating copy to clipboard operation
hardhat-gas-reporter copied to clipboard

EIP-1559 support

Open cgewecke opened this issue 4 months ago • 0 comments

HH has open issues about adding this:

  • https://github.com/NomicFoundation/hardhat/issues/3418
  • https://github.com/NomicFoundation/hardhat/issues/1866

Also relevant...it is actually possible to set these...workaround from:

  • https://github.com/NomicFoundation/hardhat/issues/3298
const FEE_DATA = {
    maxFeePerGas:         ethers.utils.parseUnits('100', 'gwei'),
    maxPriorityFeePerGas: ethers.utils.parseUnits('5',   'gwei'),
    baseFeePerGas : ethers.utils.parseUnits('20',   'gwei'),
};

  // Wrap the provider so we can override fee data.
  const provider = new ethers.providers.FallbackProvider([ethers.provider], 1);
  provider.getFeeData = async () => FEE_DATA;

  const signer = new ethers.Wallet(process.env.PRI_KEY1, provider);
  const StakingRewards = await ethers.getContractFactory("StakingRewards",signer);`

cgewecke avatar Mar 03 '24 18:03 cgewecke