I am trying to verify on hardhat an nft-tutorial by chainlink but am unable to. I have converted most of the code to hardhat compatible. The contract address on Rinkeby is 0xA4630A1f2DaC2474d7397E7e8F3A41Bd574C1f9d. I want to deploy using Hardhat not Truffle. Here is the link to the repo

Here is my command

npx hardhat verify --network rinkeby 0xA4630A1f2DaC2474d7397E7e8F3A41Bd574C1f9d "0xb3dCcb4Cf7a26f6cf6B120Cf5A73875B7BBc655B", "0x01BE23585060835E02B77ef475b0Cc51aA1e0709", "0x2ed0feb3e7fd2022120aa84fab1945545a9f2ffc9076fd6156fa96eaff4c1311"

Based on the hardhat docs, I should be able to run:

npx hardhat verify --network rinkeby DEPLOYED_CONTRACT_ADDRESS "Constructor argument 1" "Argument 2"

Getting this error when running the above code:

TypeError: Cannot read property 'contracts' of undefined

Sometimes I also get:

TypeError: Cannot read property 'engines' of undefined
  • You won't be able to verify pure truffle code with hardhat, but yet, I am running into similar errors here. I'll shop this link around. Mar 23 at 19:50
  • Have always wanted to try out Hardhat. Recently I have been unable to deploy to testnets because of some errors(ESOCKETTIMEDOUT error) which Alchemy and Infura teams were suspecting to be caused by Truffle. And for this nft tutorial specifically I deployed successfully with Hardhat where Truffle failed. Going forward what is the best practice, since I will be conceiving and implementing my projects(not following a tutorial like this case), is the hardhat workflow not as simple as having the solidity contracts in the relevant folder, and using the Hardhat workflow for deployment and beyond?
    – HallonDev
    Mar 24 at 4:50
  • HallonDev, can you add your repo here? Mar 25 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.