Error is in this line

const deploymentReceipt = await contract.deploymentTransection.wait(1);

Entire code I am using to deploy contract and wait

const { ethers, run, network } = require("hardhat");

async function main() {
    const simpleStorage = await ethers.deployContract("SimpleStorage");
    console.log("deploying contract... ");
    await simpleStorage.waitForDeployment();
    const simpleStorageAddress = await simpleStorage.getAddress();

    console.log(`Deployed contract contract to : ${simpleStorageAddress}`);
    if (network.config.chainID === 11155111 && process.env.ETHERSCAN_API_KEY) {
        await simpleStorage.deploymentTransaction.wait(3);
        await verify(simpleStorageAddress, []);

async function verify(contractAddress, args) {
    console.log("Verifying Contract");
    try {
        await run("verify:verify", {
            address: contractAddress,
            constructorArguments: args,
    } catch (err) {
        if (err.message.toLowerCase().includes("already verified")) {
            console.log("Already Verified");
        } else {

    .then(() => process.exit())
    .catch((err) => {
        process. Exit(1);


$ yarn hardhat run scripts/deploy.js --network sepolia
yarn run v1.22.19
$ "D:\STFU\VS Code\Blockchain\HardHatSimpleStorage\node_modules\.bin\hardhat" run scripts/deploy.js --network sepolia
deploying contract... 
Deployed contract contract to : 0x9D8d3CF1aE495Eb7e4202502f9584cEa0b264690
TypeError: simpleStorage.deploymentTransaction.wait is not a function
    at main (D:\STFU\VS Code\Blockchain\HardHatSimpleStorage\scripts\deploy.js:11:51)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

The thing I want to achieve is to wait for few blocks confirmations.

What to do? Please help!

2 Answers 2



 await simpleStorage.deploymentTransaction.wait(3);


await simpleStorage.deployTransaction.wait(6)
  • it wont work...
    – Aditya
    Jul 6, 2023 at 13:13
  • Did you try???? Jul 7, 2023 at 4:00
  • yes.. i tried everything i know.. as well as what i could find on internet.. it works for earlier versions ethers but not for 6.4.0
    – Aditya
    Jul 12, 2023 at 12:35
  • the correct syntax is: await simpleStorage.deploymentTransaction().wait(3); note the round parenthesis
    – mariuss
    Nov 30, 2023 at 21:03
await simpleStorage.deploymentTransaction().wait(3);

Note that deploymentTransaction is a function call, it requires the round parenthesis.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.