Facing Error at the of deploying Smart Contract on sepolia testnet using Hardhat

Problem:
While deploying the contract using hardhat ignition I am facing this strange error. I have provided the smart contract and the deploy script below. I am deploying on sepolia testNet.

This is my Voting Smart Contract:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract Voting {
    struct Candidate {
        string name;
        uint256 voteCount;
    }

    Candidate[] public candidates;
    address owner;
    mapping(address => bool) public voters;

    uint256 public votingStart;
    uint256 public votingEnd;

    constructor(string[] memory _candidateName, uint256 _durationInMinutes) {
        for (uint256 i = 0; i < _candidateName.length; i++) {
            candidates.push(Candidate({name: _candidateName[i], voteCount: 0}));
        }
        owner = msg.sender;
        votingStart = block.timestamp;
        votingEnd = block.timestamp + (_durationInMinutes * 1 minutes);
    }

    modifier onlyOwner() {
        require(msg.sender == owner);
        _;
    }

    function addCandidate(string memory _name) public onlyOwner {
        candidates.push(Candidate({name: _name, voteCount: 0}));
    }

    function vote(uint256 _candidateIndex) public {
        require(!voters[msg.sender], "You have already voted.");
        require(
            _candidateIndex < candidates.length,
            "Invalid candidate index."
        );

        candidates[_candidateIndex].voteCount++;
        voters[msg.sender] = true;
    }

    function getAllVotesOfCandiates() public view returns (Candidate[] memory) {
        return candidates;
    }

    function getVotingStatus() public view returns (bool) {
        return (block.timestamp >= votingStart && block.timestamp < votingEnd);
    }

    function getRemainingTime() public view returns (uint256) {
        require(block.timestamp >= votingStart, "Voting has not started yet.");
        if (block.timestamp >= votingEnd) {
            return 0;
        }
        return votingEnd - block.timestamp;
    }
}

Deploy Script :

const { buildModule } = require("@nomicfoundation/hardhat-ignition/modules");

module.exports = buildModule("VoteModule", (m) => {
  const Candidates = ["Atharva", "Pratham"];
  const Time = 120;

  const vote = m.contract("Voting", [Candidates, Time]);

  return { vote };
});

Error:

Batch #1
  Executing VoteModule#Voting...

An unexpected error occurred:

IgnitionError: IGN1: Internal Hardhat Ignition invariant was violated: Expected failed simulation after having failed to estimate gas
    at assertIgnitionInvariant (C:UsersHPOneDriveDesktopsamplenode_modules@nomicfoundationignition-coresrcinternalutilsassertions.ts:9:11)
    at sendTransactionForOnchainInteraction (C:UsersHPOneDriveDesktopsamplenode_modules@nomicfoundationignition-coresrcinternalexecutionfuture-processorhelpersnetwork-interaction-execution.ts:156:28)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)        
    at sendTransaction (C:UsersHPOneDriveDesktopsamplenode_modules@nomicfoundationignition-coresrcinternalexecutionfuture-processorhandlerssend-transaction.ts:86:18)
    at FutureProcessor.processFuture (C:UsersHPOneDriveDesktopsamplenode_modules@nomidules@nomicfoundationignition-coresrcinternalexecutionexecution-engine.ts:153:30)     
    at ExecutionEngine.executeModule (C:UsersHPOneDriveDesktopsamplenode_modules@nomicfoundationignition-coresrcinternalexecutionexecution-engine.ts:114:25)
    at Deployer.deploy (C:UsersHPOneDriveDesktopsamplenode_modules@nomicfoundationignition-coresrcinternaldeployer.ts:194:25)
    at SimpleTaskDefinition.action (C:UsersHPOneDriveDesktopsamplenode_modules@nomicfoundationhardhat-ignitionsrcindex.ts:302:24)
    at Environment._runTaskDefinition (C:UsersHPOneDriveDesktopsamplenode_moduleshardhatsrcinternalcoreruntime-environment.ts:359:14)

Please suggest me any solution.

I am able to deploy the core contract of hardhat with the already written script on sepolia testnet.

New contributor

Atharva Dankhade is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật