getting-started.rst 755 B

123456789101112131415161718192021222324
  1. Getting Started
  2. =============================================
  3. OpenZeppelin integrates with `Truffle <https://github.com/ConsenSys/truffle/>`_, an Ethereum development environment. Please install Truffle and initialize your project with ``truffle init``::
  4. npm install -g truffle
  5. mkdir myproject && cd myproject
  6. truffle init
  7. To install the OpenZeppelin library, run::
  8. npm install zeppelin-solidity
  9. # If you are using yarn, add dependency like this -
  10. yarn add zeppelin-solidity
  11. After that, you'll get all the library's contracts in the `node_modules/zeppelin-solidity/contracts` folder. You can use the contracts in the library like so::
  12. import "zeppelin-solidity/contracts/ownership/Ownable.sol";
  13. contract MyContract is Ownable {
  14. ...
  15. }