Skip to content

Commit

Permalink
fix hardhat gas issue (#649)
Browse files Browse the repository at this point in the history
Co-authored-by: Hugo Masclet <[email protected]>
  • Loading branch information
kalote and Hugoo authored Sep 29, 2023
1 parent 108afac commit 3e2b118
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/contracts/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,17 @@ import * as dotenv from 'dotenv';
dotenv.config();

async function main() {
// Hardhat has some issues with EIP 1559 settings, so we force it
// See this issue for more info: https://github.com/NomicFoundation/hardhat/issues/3418
const { maxFeePerGas, maxPriorityFeePerGas } = await ethers.provider.getFeeData();

const customToken = await ethers.getContractFactory('CustomToken');

const Token = await customToken.deploy();
const Token = await customToken.deploy({
maxFeePerGas,
maxPriorityFeePerGas,
type: 2,
});
const token = await Token.waitForDeployment();
const CustomTokenAddress = await token.getAddress();
console.log(`Token address: ${CustomTokenAddress}`);
Expand Down

0 comments on commit 3e2b118

Please sign in to comment.