hardhat-gas-reporter
hardhat-gas-reporter copied to clipboard
EIP-1559 support
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);`