ensdomains/docs

Failed to deploy ReverseRegistrar contract

phenix3443 opened this issue · 1 comments

When I followed the deploying-ens-on-a-private-chain to deploy the contract via hardhat I encountered the following error:

$ npx hardhat run scripts/deploy.js

HardhatError: HH700: Artifact for contract "ReverseRegistrar" not found. 
    at Artifacts._handleWrongArtifactForContractName (/Users/lsl/go/src/github/Uniswap/uniswap-v2-deploy/node_modules/hardhat/src/internal/artifacts.ts:702:11)
    at Artifacts._getArtifactPathFromFiles (/Users/lsl/go/src/github/Uniswap/uniswap-v2-deploy/node_modules/hardhat/src/internal/artifacts.ts:827:19)
    at Artifacts._getArtifactPath (/Users/lsl/go/src/github/Uniswap/uniswap-v2-deploy/node_modules/hardhat/src/internal/artifacts.ts:507:21)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at runNextTicks (node:internal/process/task_queues:64:3)
    at listOnTimeout (node:internal/timers:538:9)
    at processTimers (node:internal/timers:512:7)
    at async Artifacts.readArtifact (/Users/lsl/go/src/github/Uniswap/uniswap-v2-deploy/node_modules/hardhat/src/internal/artifacts.ts:71:26)
    at async getContractFactory (/Users/lsl/go/src/github/Uniswap/uniswap-v2-deploy/node_modules/@nomiclabs/hardhat-ethers/src/internal/helpers.ts:99:22)
    at async main (/Users/lsl/go/src/github/Uniswap/uniswap-v2-deploy/scripts/deploy_ens.ts:43:28)

package.json content:

{
  "name": "ens-deploy",
  "version": "1.0.0",
  "description": "ens contracts deploy",
  "main": "deploy.js",
  "scripts": {
    "compile": "pnpm hardhat compile",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@ensdomains/ens-contracts": "^0.0.20",
    "hardhat": "^2.13.0",
    "web3": "^1.8.2"
  },
  "devDependencies": {
    "@ethersproject/abi": "^5.4.7",
    "@ethersproject/providers": "^5.4.7",
    "@nomicfoundation/hardhat-chai-matchers": "^1.0.0",
    "@nomicfoundation/hardhat-network-helpers": "^1.0.0",
    "@nomicfoundation/hardhat-toolbox": "^2.0.0",
    "@nomiclabs/hardhat-ethers": "^2.0.0",
    "@nomiclabs/hardhat-etherscan": "^3.0.0",
    "@typechain/ethers-v5": "^10.1.0",
    "@typechain/hardhat": "^6.1.2",
    "@types/chai": "^4.2.0",
    "@types/mocha": ">=9.1.0",
    "@types/node": ">=12.0.0",
    "chai": "^4.2.0",
    "eth-ens-namehash": "^2.0.8",
    "ethers": "^5.4.7",
    "hardhat-gas-reporter": "^1.0.8",
    "solidity-coverage": "^0.8.0",
    "ts-node": ">=8.0.0",
    "typechain": "^8.1.0",
    "typescript": ">=4.5.0"
  }
}

Is there a problem somewhere? Very much feel your answer.

I needed this to in the dependencies:

import {ENSRegistry} from "@ensdomains/ens-contracts/contracts/registry/ENSRegistry.sol";
import {PublicResolver} from "@ensdomains/ens-contracts/contracts/resolvers/PublicResolver.sol";
import {FIFSRegistrar} from "@ensdomains/ens-contracts/contracts/registry/FIFSRegistrar.sol";
import {ReverseRegistrar} from "@ensdomains/ens-contracts/contracts/reverseRegistrar/ReverseRegistrar.sol";

Note the last line, it forget to add it to the docs