# zos-lib

> JavaScript library for the ZeppelinOS smart contract platform

Latest version **2.4.3** (published 2020-02-20) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.4.3 |
| Published | 2020-02-20 |
| First published | 2018-04-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 35 |
| Unpacked size | 10.8 MB |
| Known vulnerabilities | 0 (+26 in 3 direct dependencies) |
| Install scripts | no |
| Maintainers | facuspagnuolo, frangio, maraoz, spalladino |
| Keywords | zeppelinos, zeppelin, ethereum, smartcontracts, solidity, upgradeability, security, proxy, evm |

## Links

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

## Dependencies (35)

- [cbor](https://npm.io/package/cbor.md) ^4.1.5
- [glob](https://npm.io/package/glob.md) ^7.1.3
- [web3](https://npm.io/package/web3.md) 1.0.0-beta.37
- [axios](https://npm.io/package/axios.md) ^0.18.0
- [chalk](https://npm.io/package/chalk.md) ^2.4.1
- [ethers](https://npm.io/package/ethers.md) ^4.0.20
- [semver](https://npm.io/package/semver.md) ^5.5.1
- [spinnies](https://npm.io/package/spinnies.md) ^0.4.3
- [lodash.map](https://npm.io/package/lodash.map.md) ^4.6.0
- [web3-utils](https://npm.io/package/web3-utils.md) 1.0.0-beta.37
- [@types/cbor](https://npm.io/package/@types/cbor.md) ^2.0.0
- [@types/web3](https://npm.io/package/@types/web3.md) ^1.0.14
- [lodash.keys](https://npm.io/package/lodash.keys.md) ^4.2.0
- [lodash.omit](https://npm.io/package/lodash.omit.md) ^4.5.0
- [lodash.pick](https://npm.io/package/lodash.pick.md) ^4.4.0
- [lodash.some](https://npm.io/package/lodash.some.md) ^4.6.0
- [lodash.uniq](https://npm.io/package/lodash.uniq.md) ^4.5.0
- [bignumber.js](https://npm.io/package/bignumber.js.md) ^7.2.0
- [lodash.every](https://npm.io/package/lodash.every.md) ^4.6.0
- [lodash.concat](https://npm.io/package/lodash.concat.md) ^4.5.0
- [lodash.pickby](https://npm.io/package/lodash.pickby.md) ^4.6.0
- [lodash.random](https://npm.io/package/lodash.random.md) ^3.2.0
- [lodash.values](https://npm.io/package/lodash.values.md) ^4.3.0
- [lodash.flatten](https://npm.io/package/lodash.flatten.md) ^4.4.0
- [lodash.isarray](https://npm.io/package/lodash.isarray.md) ^4.0.0
- [lodash.isempty](https://npm.io/package/lodash.isempty.md) ^4.4.0
- [lodash.isequal](https://npm.io/package/lodash.isequal.md) ^4.5.0
- [lodash.reverse](https://npm.io/package/lodash.reverse.md) ^4.0.1
- [lodash.without](https://npm.io/package/lodash.without.md) ^4.4.0
- [lodash.findlast](https://npm.io/package/lodash.findlast.md) ^4.6.0
- [lodash.includes](https://npm.io/package/lodash.includes.md) ^4.3.0
- [lodash.invertby](https://npm.io/package/lodash.invertby.md) ^4.7.0
- [lodash.isstring](https://npm.io/package/lodash.isstring.md) ^4.0.1
- [lodash.difference](https://npm.io/package/lodash.difference.md) ^4.5.0
- [truffle-flattener](https://npm.io/package/truffle-flattener.md) ^1.4.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.4.3 (latest) — 2020-02-20
- 2.4.2 — 2019-07-18
- 2.4.1 — 2019-07-02
- 2.4.0 — 2019-06-24
- 2.4.0-rc.4 — 2019-06-21
- 2.4.0-rc.3 — 2019-06-19
- 2.4.0-rc.2 — 2019-06-15
- 2.4.0-rc.1 — 2019-06-13
- 2.4.0-rc.0 — 2019-06-10
- 2.3.1 — 2019-06-05
- 2.3.0 — 2019-05-27
- 2.3.0-rc.3 — 2019-05-24
- 2.3.0-rc.2 — 2019-05-20
- 2.3.0-rc.1 — 2019-05-10
- 2.3.0-rc.0 — 2019-05-03
- … 64 more at https://npm.io/package/zos-lib/versions

## 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.com/zeppelinos/zos.svg?branch=master)](https://travis-ci.com/zeppelinos/zos)
[![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
> const { ZWeb3, Contracts, SimpleProject } = require('zos-lib')
> // Initialize a web3 provider.
> ZWeb3.initialize("http://localhost:9545")
> // Load the contract.
> const MyContract = Contracts.getFromLocal('MyContract')
> // Instantiate a project.
> myProject = new SimpleProject('MyProject', { from: await ZWeb3.defaultAccount() })
> // Create a proxy for the contract.
> myProject.createProxy(MyContract).then(proxy => myProxy = proxy)
> // Make a change on the contract, and compile it.
> const MyContractUpgraded = Contracts.getFromLocal('MyContract')
> myProject.upgradeProxy(proxy, MyContractUpgraded)
```

## 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/zos-lib · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
