# @0x/dev-utils

> 0x dev TS utils

Latest version **5.0.3** (published 2023-04-07) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @0x/dev-utils
pnpm add @0x/dev-utils
yarn add @0x/dev-utils
bun add @0x/dev-utils
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.0.3 |
| Published | 2023-04-07 |
| First published | 2018-10-18 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=6.12 |
| Dependencies | 14 |
| Unpacked size | 78.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 98 |
| Maintainers | rhinodavid, mwelche, savdont, eobbad, aeph4muh, idokleinman, jadetran, kyuc, henryzhu, tobernguyen, dex_tracker, dekz, amirbandeali, phil-ociraptor |

## Links

- npm: https://www.npmjs.com/package/@0x/dev-utils
- Repository: https://github.com/0xProject/tools
- Homepage: https://github.com/0xProject/tools/tree/main/dev-utils
- Issues: https://github.com/0xProject/tools/issues
- npm.io page: https://npm.io/package/@0x/dev-utils

## Dependencies (14)

- [chai](https://npm.io/package/chai.md) ^4.0.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [@0x/types](https://npm.io/package/@0x/types.md) ^3.3.7
- [@0x/utils](https://npm.io/package/@0x/utils.md) ^7.0.0
- [dirty-chai](https://npm.io/package/dirty-chai.md) ^2.0.1
- [@types/node](https://npm.io/package/@types/node.md) 12.12.54
- [chai-bignumber](https://npm.io/package/chai-bignumber.md) ^3.0.0
- [ethereum-types](https://npm.io/package/ethereum-types.md) ^3.7.1
- [@0x/subproviders](https://npm.io/package/@0x/subproviders.md) ^8.0.1
- [@0x/web3-wrapper](https://npm.io/package/@0x/web3-wrapper.md) ^8.0.1
- [chai-as-promised](https://npm.io/package/chai-as-promised.md) ^7.1.0
- [web3-provider-engine](https://npm.io/package/web3-provider-engine.md) 16.0.4
- [@0x/typescript-typings](https://npm.io/package/@0x/typescript-typings.md) ^5.3.2
- [@types/web3-provider-engine](https://npm.io/package/@types/web3-provider-engine.md) ^14.0.0

## Recent versions

- 5.0.3 (latest) — 2023-04-07
- 2.4.0-beta.4 (protocolV3) — 2019-12-02
- 5.0.2 — 2023-04-07
- 5.0.1 — 2023-01-26
- 5.0.0 — 2022-08-18
- 4.2.14 — 2022-03-16
- 4.2.13 — 2022-03-16
- 4.2.12 — 2022-02-26
- 4.2.11 — 2022-01-19
- 4.2.10 — 2021-09-23
- 4.2.9 — 2021-08-25
- 4.2.8 — 2021-06-28
- 4.2.7 — 2021-04-28
- 4.2.6 — 2021-04-26
- 4.2.5 — 2021-04-26
- … 67 more at https://npm.io/package/@0x/dev-utils/versions

## README

## Dev utils

Dev utils to be shared across 0x projects and packages

## Configuration

Some env variables might be set to change the behaviour of created web3 providers/instances.

```
VERBOSE_GANACHE: boolean. Enables verbose Ganache logging. Every request/response payload. Slightly slower, but useful for testing.
SOLIDITY_COVERAGE: boolean. If set - adds coverage subprovider which intercepts all calls/transactions and can be later used to compute code coverage.
```

Boolean env variables should be either `true` or `false`. Defaults to `false` if not set.

## Install

```bash
yarn add @0x/dev-utils
```

If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:

```json
"compilerOptions": {
    "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"],
}
```

## Troubleshooting

If you are still seeing TS type errors complaining about missing DOM types such as `Response`:

```
error TS2304: Cannot find name 'Response'.
```

Then you need to explicitly add the `dom` lib to your compiler options in `tsconfig.json`. The `dom` library is included by default, but customizing the `lib` option can cause it to be dropped.

```
"compilerOptions": {
    "lib": [..., "dom"],
```

## Contributing

We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.

Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.

### Install dependencies

If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:

```bash
yarn config set workspaces-experimental true
```

Then install dependencies

```bash
yarn install
```

### Build

To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:

```bash
PKG=@0x/dev-utils yarn build
```

Or continuously rebuild on change:

```bash
PKG=@0x/dev-utils yarn watch
```

### Clean

```bash
yarn clean
```

### Lint

```bash
yarn lint
```

### Run Tests

```bash
yarn test
```

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