PatrickAlphaC / hardhat-fund-me-fcc

82 stars 184 forks source link

Mock contract not deploying #14

Closed luc-rig closed 2 years ago

luc-rig commented 2 years ago

yarn hardhat deploy

Gets the following error:

Error: cannot get the transaction for MockV3Aggregator's previous deployment, please check your node synced status.

As in the course, I am using the hardhat network (not localhost). Following the deployment of the mock contract, which is stored inside ./contracts/test:

await deploy("MockV3Aggregator", {
            contract: "MockV3Aggregator",
            from: deployer,
            log: true,
            args: [DECIMALS, INITIAL_ANSWER],
        })

Thank you in advance

luc-rig commented 2 years ago

Needed to delete the deployments folder which, probably, stores some data about previous deployments and try to get the contract instance instead of deploying it. Of course, since each run hardhat launch a blank network, it does not find any previous deployment