# @truffle-types/deployment-context

> Provides basic structure for deployment work

Latest version **0.5.0** (published 2019-07-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @truffle-types/deployment-context
pnpm add @truffle-types/deployment-context
yarn add @truffle-types/deployment-context
bun add @truffle-types/deployment-context
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2019-07-26 |
| First published | 2018-11-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 23.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Alex Rudziak |
| Maintainers | alesanro, be1box |

## Links

- npm: https://www.npmjs.com/package/@truffle-types/deployment-context
- Repository: https://gitlab.instinctools.com:blockchain/npm-componens/truffle-types
- Homepage: https://gitlab.instinctools.com/blockchain/npm-componens/truffle-types
- Issues: https://gitlab.instinctools.com/blockchain/npm-componens/truffle-types/issues
- npm.io page: https://npm.io/package/@truffle-types/deployment-context

## Dependencies (3)

- [bignumber.js](https://npm.io/package/bignumber.js.md) ^4.0.2
- [@truffle-types/address-saver](https://npm.io/package/@truffle-types/address-saver.md) ^0.1.8
- [@truffle-types/truffle-types-v4](https://npm.io/package/@truffle-types/truffle-types-v4.md) ^0.1.1

## Recent versions

- 0.5.0 (latest) — 2019-07-26
- 0.4.3 — 2019-07-17
- 0.4.2 — 2019-06-03
- 0.4.1 — 2019-04-12
- 0.4.0 — 2019-04-11
- 0.3.0 — 2019-04-11
- 0.2.0 — 2019-04-11
- 0.1.27 — 2019-02-07
- 0.1.26 — 2019-02-07
- 0.1.25 — 2019-02-06
- 0.1.24 — 2019-02-06
- 0.1.23 — 2019-02-04
- 0.1.22 — 2018-12-17
- 0.1.21 — 2018-12-17
- 0.1.20 — 2018-12-07
- … 18 more at https://npm.io/package/@truffle-types/deployment-context/versions

## README

# Deployment context

Provides structure for deployment context where all needed information could be held.

## Install

```bash
yarn add @truffle-types/deployment-context
```

## Usage

Import in migrations or tests:

```typescript
import { DeploymentCoordinator } from "@truffle-types/deployment-context";

//...

const deploymentCoordinator = new DeploymentCoordinator(
  web3,
  artifacts,
  deployer,
  "./deployed-addresses.json"
);

//Actions with main context:

//get context
deploymentCoordinator.mainContext();

//Actions with deprecation context:

//create context
deploymentCoordinator.snapshot();

//get context
deploymentCoordinator.deprecationContext();

//delete context
deploymentCoordinator.finalizeSnapshot();
```

### API

Deployment coordinator provides the ability to manage several deployment contexts: **main and deprecation contexts**

Deprecation context, at the time of its creation, is a copy of the main context.

Main deployment context allows to use contract address read/write function.

Deprecation deployment context allows to use contract address readonly function.

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