(Working from the Lynda Ethereum course)

Running the test code below I get the following error:

truffle tests
Warning: Both truffle-config.js and truffle.js were found. Using truffle-config.js.
Using network 'test'.

Compiling your contracts...
> Everything is up to date, there is nothing to compile.

/home/iii/Digital Ledger/contracts/migrations/2_depoly_contracts.js:1
var ApprovalContract = artificats.require("ApprovalContract");

ReferenceError: artificats is not defined
    at /home/iii/Digital Ledger/contracts/migrations/2_depoly_contracts.js:1:24
    at Script.runInContext (vm.js:107:20)
    at Script.runInNewContext (vm.js:113:17)
    at Object.file (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:354543:12)
    at Migration._load (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:462577:24)
    at process._tickCallback (internal/process/next_tick.js:68:7)
Truffle v5.1.15 (core: 5.1.15)
Node v10.15.2

Here is the contract as well:

pragma solidity ^0.5.16;

contract ApprovalContract {

  address payable public sender;
  address payable public receiver;
  address constant public approver = 0xd268143B6FBD9BC6533F778052710C962eaAa68C;

  function deposit(address payable _receiver) external payable {
    require(msg.value > 0);
    sender = msg.sender;
    receiver = _receiver;

    function viewApprover() external pure returns(address) {

   function approve() external {
    require(msg.sender == approver);


Change artificats to artifacts.

| improve this answer | |

Your Answer

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

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