Hello friends. I started adding zos and the upgradable contracts to my existing project, following along here and here but I’m having trouble with zos
commands push
and add
.
Even though I have my contracts compiled, looks like it tries to recompile anyways, and global node_modules look like they’re being ignored. And if I add the relative path to the modules in my contract, it gives the error that within Pausable.sol
in the openzeppelin-eth lib, it can’t import Initializable.sol
.
Check out my terminal output:
carlos:babylon$ truffle compile --all
Compiling your contracts...
===========================
> Compiling ./contracts/Babylon.sol
> Compiling ./contracts/BabyloniaToken.sol
> Compiling ./contracts/EthPriceOracleI.sol
> Compiling ./contracts/EthPriceOracleMock.sol
> Compiling ./contracts/HelbizToken.sol
> Compiling ./contracts/Migrations.sol
> Compiling openzeppelin-eth/contracts/access/Roles.sol
> Compiling openzeppelin-eth/contracts/access/roles/MinterRole.sol
> Compiling openzeppelin-eth/contracts/access/roles/PauserRole.sol
> Compiling openzeppelin-eth/contracts/lifecycle/Pausable.sol
> Compiling openzeppelin-eth/contracts/math/SafeMath.sol
> Compiling openzeppelin-eth/contracts/ownership/Ownable.sol
> Compiling openzeppelin-eth/contracts/token/ERC20/ERC20.sol
> Compiling openzeppelin-eth/contracts/token/ERC20/ERC20Burnable.sol
> Compiling openzeppelin-eth/contracts/token/ERC20/ERC20Detailed.sol
> Compiling openzeppelin-eth/contracts/token/ERC20/ERC20Mintable.sol
> Compiling openzeppelin-eth/contracts/token/ERC20/ERC20Pausable.sol
> Compiling openzeppelin-eth/contracts/token/ERC20/IERC20.sol
> Compiling openzeppelin-eth/contracts/token/ERC20/StandaloneERC20.sol
> Compiling zos-lib/contracts/Initializable.sol
> Artifacts written to /Users/carlos/Desktop/helbiz/babylon/build/contracts
> Compiled successfully using:
- solc: 0.5.0+commit.1d4f565a.Emscripten.clang
carlos:babylon$ npx zos add Babylon
Compiling contracts with Truffle...
Error compiling:
Cannot find import Pausable.sol from Babylon.sol. If it's a relative path, ensure it starts with `./` or `../`.
Compilation failed. See above.
Command failed: /Users/carlos/Desktop/helbiz/babylon/node_modules/.bin/truffle compile --all
carlos:babylon$ npx zos add Babylon
Compiling contracts with Truffle...
Error compiling:
Cannot find import Initializable.sol from Pausable.sol. If it's a relative path, ensure it starts with `./` or `../`.
Compilation failed. See above.
Command failed: /Users/carlos/Desktop/helbiz/babylon/node_modules/.bin/truffle compile --all