The folder structure is as follows:

  +- Multiply
  |        +- Solidity
  |                 +- contracts
  |                           +- MultiplyContract.sol
  +- UUIDProvider
               +- Solidity
                        +- contracts
                                  +- UUIDProviderContract.sol

And I want to test the (main) contract : MultiplyContract.sol

The migrations\2_deploy_contracts.js file looks like this:

var UUIDProviderContract = artifacts.require("../../UUIDProvider/Solidity/contracts/UUIDProviderContract.sol");
var MultiplyContract = artifacts.require("MultiplyContract");

module.exports = function (deployer) {

    var multiplier = 4;
    deployer.deploy(MultiplyContract, multiplier);

However when running truffle test, I get this error:

Compiling .\contracts\Migrations.sol...
Compiling .\contracts\MultiplyContract.sol...
Compiling .\test\TestMultiplyContract.sol...
Compiling truffle/Assert.sol...
Compiling truffle/DeployedAddresses.sol...
  throw new Error("Could not find artifacts for " + import_path + " from any sources");

So how to include the UUIDProviderContract.sol ?

Or is this not possible and should I copy this to the same location as MultiplyContract.sol?

1 Answer 1


Truffle looks for contract folder and compile all the contracts under it and sub folders.


should refer to compiled Contract not the sol file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.