zeppelinos/zos-lib

Error when trying to load Contracts.js: artifacts not defined

Closed this issue · 0 comments

Hi,

tried to include zos-lib into my own Solidity project. Had some troubles in the beginning to load the library since it threw the error:

node_modules/zos-lib/lib/utils/Contracts.js:62
    if (!artifacts) throw "Could not retrieve truffle defaults";
    ^

ReferenceError: artifacts is not defined

Could fix this by adding the following line to Contracts.js

// Added line
var artifacts = require('truffle-artifactor');

Hope this helps. Cheers.