# @openzeppelin/upgrades

> JavaScript library for the OpenZeppelin smart contract platform

Latest version **2.8.0** (published 2020-03-25) · MIT license · 0 weekly downloads

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

## Install

```sh
npm install @openzeppelin/upgrades
pnpm add @openzeppelin/upgrades
yarn add @openzeppelin/upgrades
bun add @openzeppelin/upgrades
```

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.8.0 |
| Published | 2020-03-25 |
| First published | 2019-07-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 15 |
| Unpacked size | 6.1 MB |
| Known vulnerabilities | 0 (+25 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 451 |
| Maintainers | frangio, jcarpanelli, nventuro, spalladino, ylv.io |
| Keywords | openzeppelin, openzeppelin-sdk, zeppelinos, zeppelin, ethereum, smart-contracts, solidity, upgradeability, security, proxy, evm |

## Links

- npm: https://www.npmjs.com/package/@openzeppelin/upgrades
- 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/@openzeppelin/upgrades

## Dependencies (15)

- [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.2.2
- [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
- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [semver](https://npm.io/package/semver.md) ^5.5.1
- [spinnies](https://npm.io/package/spinnies.md) ^0.4.2
- [web3-eth](https://npm.io/package/web3-eth.md) 1.2.2
- [web3-utils](https://npm.io/package/web3-utils.md) 1.2.2
- [@types/cbor](https://npm.io/package/@types/cbor.md) ^2.0.0
- [bignumber.js](https://npm.io/package/bignumber.js.md) ^7.2.0
- [truffle-flattener](https://npm.io/package/truffle-flattener.md) ^1.4.0
- [web3-eth-contract](https://npm.io/package/web3-eth-contract.md) 1.2.2

## 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.8.0 (latest) — 2020-03-25
- 2.6.0-byzantium.0 (byzantium) — 2019-11-25
- 2.8.0-rc.4 — 2020-03-16
- 2.8.0-rc.3 — 2020-03-09
- 2.7.2 — 2020-03-09
- 2.8.0-rc.2 — 2020-02-19
- 2.8.0-rc.1 — 2020-02-17
- 2.8.0-rc.0 — 2020-02-14
- 2.7.1 — 2020-02-11
- 2.7.0 — 2020-02-10
- 2.7.0-rc.4 — 2020-02-07
- 2.7.0-rc.2 — 2020-01-31
- 2.7.0-rc.1 — 2020-01-28
- 2.7.0-rc.0 — 2020-01-20
- 2.6.0 — 2019-11-11
- … 8 more at https://npm.io/package/@openzeppelin/upgrades/versions

## README

# OpenZeppelin SDK JavaScript Library _(@openzeppelin/upgrades)_

[![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/@openzeppelin/upgrades.svg?style=flat-square)](https://www.npmjs.org/package/@openzeppelin/upgrades)
[![CircleCI](https://circleci.com/gh/OpenZeppelin/openzeppelin-sdk/tree/master.svg?style=shield)](https://circleci.com/gh/OpenZeppelin/openzeppelin-sdk/tree/master)

> JavaScript library for the OpenZeppelin smart contract platform.

OpenZeppelin SDK 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 OpenZeppelin SDK JavaScript library. It is mainly used
by the
[`openzeppelin-sdk` command-line interface](https://github.com/OpenZeppelin/openzeppelin-sdk/tree/master/packages/cli#openzeppelin-sdk-command-line-interface-openzeppelincli),
which is the recommended way to use the OpenZeppelin SDK; but this library can also be
used directly to operate 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 OpenZeppelin SDK JavaScript Library running:

```sh
npm install @openzeppelin/upgrades
```

## 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('@openzeppelin/upgrades')
> // 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@openzeppelin.com. We
give rewards for reported issues, according to impact and severity.

## API

TODO.

## Maintainers

* [@spalladino](https://github.com/spalladino)
* [@jcarpanelli](https://github.com/jcarpanelli)
* [@ylv-io](https://github.com/ylv-io)

## Contribute

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

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

## License

[MIT](LICENSE.md) © OpenZeppelin

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