# @0x/contracts-test-utils

> Test utils for 0x contracts

Latest version **5.4.60** (published 2023-11-16) · Apache-2.0 license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 5.4.60 |
| Published | 2023-11-16 |
| First published | 2018-12-11 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.12 |
| Dependencies | 31 |
| Unpacked size | 223.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 406 |
| Maintainers | aeph4muh, rhinodavid, mwelche, savdont, kyuc, henryzhu, tobernguyen, dekz, amirbandeali, phil-ociraptor |

## Links

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

## Dependencies (31)

- [chai](https://npm.io/package/chai.md) ^4.0.1
- [bn.js](https://npm.io/package/bn.js.md) ^4.11.8
- [mocha](https://npm.io/package/mocha.md) ^6.2.0
- [ethers](https://npm.io/package/ethers.md) ~4.0.4
- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [@0x/types](https://npm.io/package/@0x/types.md) ^3.3.7
- [@0x/utils](https://npm.io/package/@0x/utils.md) ^7.0.0
- [@0x/assert](https://npm.io/package/@0x/assert.md) ^3.0.36
- [decimal.js](https://npm.io/package/decimal.js.md) ^10.2.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
- [@types/bn.js](https://npm.io/package/@types/bn.js.md) ^4.11.0
- [@types/mocha](https://npm.io/package/@types/mocha.md) ^5.2.7
- [@0x/dev-utils](https://npm.io/package/@0x/dev-utils.md) ^5.0.2
- [@0x/sol-trace](https://npm.io/package/@0x/sol-trace.md) ^3.0.46
- [@types/lodash](https://npm.io/package/@types/lodash.md) 4.14.104
- [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/order-utils](https://npm.io/package/@0x/order-utils.md) ^10.4.28
- [ethereumjs-util](https://npm.io/package/ethereumjs-util.md) ^7.0.10
- [@0x/json-schemas](https://npm.io/package/@0x/json-schemas.md) ^6.4.4
- [@0x/sol-profiler](https://npm.io/package/@0x/sol-profiler.md) ^4.1.36
- [@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
- [js-combinatorics](https://npm.io/package/js-combinatorics.md) ^0.5.3
- [@0x/base-contract](https://npm.io/package/@0x/base-contract.md) ^7.0.0
- [make-promises-safe](https://npm.io/package/make-promises-safe.md) ^1.1.0
- [@0x/contract-addresses](https://npm.io/package/@0x/contract-addresses.md) ^8.13.0
- [@0x/typescript-typings](https://npm.io/package/@0x/typescript-typings.md) ^5.3.1
- [@types/js-combinatorics](https://npm.io/package/@types/js-combinatorics.md) ^0.5.29

## Recent versions

- 5.4.60 (latest) — 2023-11-16
- 5.3.23-multiplex.0 (multiplex) — 2021-03-16
- 3.2.0-beta.4 (protocolV3) — 2019-12-02
- 5.4.59 — 2023-08-29
- 5.4.58 — 2023-08-18
- 5.4.57 — 2023-08-09
- 5.4.56 — 2023-07-21
- 5.4.55 — 2023-07-19
- 5.4.54 — 2023-05-10
- 5.4.53 — 2023-05-01
- 5.4.52 — 2023-04-20
- 5.4.51 — 2023-04-17
- 5.4.49 — 2023-03-10
- 5.4.48 — 2023-03-01
- 5.4.47 — 2023-02-01
- … 117 more at https://npm.io/package/@0x/contracts-test-utils/versions

## README

## Contracts test utils

This package contains test utilities used by other smart contracts packages.

## Usage

```typescript
import {
    chaiSetup,
    constants,
    expectContractCallFailedAsync,
    expectContractCreationFailedAsync,
    expectTransactionFailedAsync,
    expectTransactionFailedWithoutReasonAsync,
    increaseTimeAndMineBlockAsync,
    provider,
    sendTransactionResult,
    txDefaults,
    web3Wrapper,
} from '@0x/contracts-test-utils';
```

## Contributing

We strongly recommend that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository.

Please read our [contribution guidelines](../../.github/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/contracts-test-utils yarn build
```

Or continuously rebuild on change:

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

### Clean

```bash
yarn clean
```

### Lint

```bash
yarn lint
```

### Run Tests

```bash
yarn test
```

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