I'm a newb dev and want to play with smart contracts, and was trying to figure this out. Ive installed truffle and openzeppelin, everything seems to check out, but in Mist I still get an error when I try to import Math.sol saying it can't be found, what do I do?
[Ethereum] How to import from / install OpenZeppelin properly
importmistopenzeppelintruffle
Best Answer
Here are the full steps starting from a blank truffle project. You could replace
truffle init
withtruffle unbox <package>
if you want to start from a Truffle box.truffle init
: initialize truffle in the directorytruffle install zeppelin
: install open-zeppelin using ETH Package ManagerA new folder will be created called
installed_contracts
which contains all the files.You can import the
Math.sol
library by adding this line in your contract in thecontracts
folder: