NomicFoundation / hardhat

Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software.
https://hardhat.org
Other
7.12k stars 1.36k forks source link

IgnitionError: IGN1 #5497

Closed Abhishekkochar closed 1 month ago

Abhishekkochar commented 1 month ago

Encountering the below error when trying to run the following code:

import { buildModule } from "@nomicfoundation/hardhat-ignition/modules";

const NFTModule = buildModule("Doodle", (m) => {
  const _name = m.getParameter("_name", "Doodle");
  const _symbol = m.getParameter("_symbol", "DD");
  const _oracle = m.getParameter("_oracle", 0xA2F78ab2355fe2f984D808B5CeE7FD0A93D5270E); // USDC/USD - Seploia testnet price oracle

  const _tokenAddress = m.getParameter("_tokenAddress", 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); // USDC - Seploia testnet

  const doodleNft = m.contract("Doodle", [_name, _symbol, _oracle, _tokenAddress]);

  return { doodleNft };
});

export default NFTModule;

Error when running npx hardhat ignition deploy ./ignition/modules/Doodle.ts --network sepolia --verify

Screenshot 2024-07-09 at 2 31 43 PM

Solidity code:

 constructor(string memory _name, string memory _symbol, address _oracle, address _tokenAddress) ERC721(_name, _symbol){
        oracle = IOracle(_oracle);
        supportedToken = IERC20(_tokenAddress);
    }
kanej commented 1 month ago

I would express the addresses as strings:

"0xA2F78ab2355fe2f984D808B5CeE7FD0A93D5270E"

Does the deployment fail on first run? Does the deployment fail when run against the in-memory Hardhat node?

Abhishekkochar commented 1 month ago

I would express the addresses as strings:

"0xA2F78ab2355fe2f984D808B5CeE7FD0A93D5270E"

Does the deployment fail on first run? Does the deployment fail when run against the in-memory Hardhat node?

Deployment succeeds when running on local node. I had to delete the deployment copy to have this work.