# cc-zos-lib

> JavaScript library for the ZeppelinOS smart contract platform

Latest version **2.1.2** (published 2018-12-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install cc-zos-lib
pnpm add cc-zos-lib
yarn add cc-zos-lib
bun add cc-zos-lib
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.2 |
| Published | 2018-12-15 |
| First published | 2018-12-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 8.3 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 451 |
| Maintainers | connorc |
| Keywords | zeppelinos, zeppelin, ethereum, smartcontracts, solidity, upgradeability, security, proxy, evm |

## Links

- npm: https://www.npmjs.com/package/cc-zos-lib
- Repository: https://github.com/zeppelinos/zos
- Homepage: https://github.com/zeppelinos/zos/tree/master/packages/lib#readme
- Issues: https://github.com/zeppelinos/zos/issues
- npm.io page: https://npm.io/package/cc-zos-lib

## Dependencies (11)

- [glob](https://npm.io/package/glob.md) ^7.1.3
- [web3](https://npm.io/package/web3.md) ^0.18.4
- [chalk](https://npm.io/package/chalk.md) ^2.4.1
- [semver](https://npm.io/package/semver.md) ^5.5.1
- [bignumber.js](https://npm.io/package/bignumber.js.md) ^7.2.0
- [ethereumjs-abi](https://npm.io/package/ethereumjs-abi.md) ^0.6.5
- [truffle-config](https://npm.io/package/truffle-config.md) ^1.0.6
- [truffle-contract](https://npm.io/package/truffle-contract.md) ^3.0.6
- [truffle-flattener](https://npm.io/package/truffle-flattener.md) ^1.2.8
- [truffle-provisioner](https://npm.io/package/truffle-provisioner.md) ^0.1.1
- [openzeppelin-solidity](https://npm.io/package/openzeppelin-solidity.md) ~1.10.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 2.1.2 (latest) — 2018-12-15
- 2.1.1 — 2018-12-15

## README

# ZeppelinOS JavaScript Library _(zos-lib)_

[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg)](https://github.com/RichardLitt/standard-readme)
[![NPM Package](https://img.shields.io/npm/v/zos-lib.svg?style=flat-square)](https://www.npmjs.org/package/zos-lib)
[![Build Status](https://travis-ci.org/zeppelinos/zos-lib.svg?branch=master)](https://travis-ci.org/zeppelinos/zos-lib)
[![Coverage Status](https://coveralls.io/repos/github/zeppelinos/zos-lib/badge.svg?branch=master)](https://coveralls.io/github/zeppelinos/zos-lib?branch=master)

> JavaScript library for the ZeppelinOS smart contract platform.

ZeppelinOS is a platform to develop, deploy and operate smart contract
projects on Ethereum and every other EVM and eWASM-powered blockchain.

This is the repository for the ZeppelinOS JavaScript library. It is mainly used
by the
[`zos` command-line interface](https://github.com/zeppelinos/zos/tree/master/packages/cli#zeppelinos-command-line-interface),
which is the recommended way to use ZeppelinOS; but this library can also be
used directly to operate ZeppelinOS projects when a programmatic interface is
preferred or more flexibility and lower-level access is required.

## Install

First, install [Node.js](http://nodejs.org/) and [npm](https://npmjs.com/).
Then, install the ZeppelinOS JavaScript Library running:

```sh
npm install zos-lib
```

## Usage

Suppose there is a contract called `MyContract` in the file
`contracts/MyContract.sol`, already compiled to
`build/contracts/MyContract.json`, and that there is a development blockchain
network running locally in port 9545.

Open a Node.js console:

```sh
node
```

```js
> // Connect web3 to the local provider.
> var Web3 = require('web3')
> web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:9545"))
> // Load the contract.
> const { Contracts, SimpleProject } = require('cc-zos-lib')
> const MyContract = Contracts.getFromLocal('MyContract')
> // Instantiate a project.
> myProject = new SimpleProject('MyProject', { from: web3.eth.accounts[0] });
> // Create a proxy for the contract.
> myProject.createProxy(MyContract).then(proxy => myProxy = proxy)
> // Make a change on the contract, and compile it.
> const MyContractV1 = Contracts.getFromLocal('MyContract')
> myProject.upgradeProxy(proxy, MyContractV1)

## Security

If you find a security issue, please contact us at security@zeppelinos.org. We
give rewards for reported issues, according to impact and severity.

## API

TODO.

## Maintainers

* [@facuspagnuolo](https://github.com/facuspagnuolo/)
* [@spalladino](https://github.com/spalladino)

## Contribute

To contribute, join our
[community channel on Telegram](https://t.me/zeppelinos) where you can talk to
all the ZeppelinOS developers, contributors, partners and users.

You can also follow the recent developments of the project in our
[blog](https://blog.zeppelin.solutions/) and
[Twitter account](https://twitter.com/zeppelinorg).

## License

[MIT](LICENSE.md) © Zeppelin

---
_Source: https://npm.io/package/cc-zos-lib · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
