Search code examples
ethereumtruffleganache

Why Could not find artifacts for contract from any sources


I am using windows 10 with truffle and ganache-cli. I have 2 contracts file to be deployed contain interfaces of other contracts defined within the contract:

Contracts:

ERC721Mintable.sol

  • Ownable
  • Pausable is Ownable
  • ERC165
  • ERC721 is Pausable, ERC165
  • ERC721Enumerable is ERC165, ERC721
  • ERC721MetaData is ERC721Enumerable, usingOraclize
  • CraveuERC721Token is ERC721MetaData

Verifier.sol

SolnSquareVerifier.sol

pragma solidity >=0.4.21 <0.6.0;

import "./ERC721Mintable.sol";
import "./Verifier.sol";

contract SolnSqaureVerifier is CraveuERC721Token {

    SquareVerifier squareVerifier;

    constructor(address verifierAddress) public {
        squareVerifier = SquareVerifier(verifierAddress);
    }

Here's my deploy_contracts.js:

const SquareVerifier = artifacts.require("Verifier");
const SolnSquareVerifier = artifacts.require("SolnSquareVerifier");

module.exports = function(deployer) {
  deployer.deploy(SquareVerifier).then( () => {
    return deployer.deploy(SolnSquareVerifier, SquareVerifier.address);
  });
};

I am using truffle version 5.0.18

Error Produced: Error: Error: Could not find artifacts for SolnSquareVerifier from any sources


Solution

  • There is a typo in your contract name SolnSqaureVerifier, it should be SolnSquareVerifier