@0x/dev-utils
TypeScript icon, indicating that this package has built-in type declarations

5.0.3 • Public • Published

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

yarn add @0x/dev-utils

If your project is in TypeScript, add the following to your tsconfig.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 before getting started.

Install dependencies

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

yarn config set workspaces-experimental true

Then install dependencies

yarn install

Build

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

PKG=@0x/dev-utils yarn build

Or continuously rebuild on change:

PKG=@0x/dev-utils yarn watch

Clean

yarn clean

Lint

yarn lint

Run Tests

yarn test

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
5.0.3404latest
2.4.0-beta.41protocolV3

Version History

VersionDownloads (Last 7 Days)Published
5.0.3404
5.0.20
5.0.11
5.0.07
4.2.148
4.2.131
4.2.121
4.2.119
4.2.1014
4.2.90
4.2.87
4.2.710
4.2.61
4.2.51
4.2.41
4.2.31
4.2.23
4.2.113
4.2.01
4.1.61
4.1.50
4.1.40
4.1.314
4.1.25
4.1.11
4.1.00
4.0.21
4.0.114
4.0.01
3.3.616
3.3.50
3.3.41
3.3.30
3.3.21
3.3.10
3.3.012
3.2.20
3.2.18
3.2.00
3.1.30
3.1.21
3.1.10
3.1.01
3.0.21
3.0.10
3.0.01
2.4.0-beta.41
2.4.0-beta.31
2.4.0-beta.21
2.4.0-beta.11
2.4.0-beta.00
2.3.32
2.3.20
2.3.10
2.3.00
2.2.60
2.2.50
2.2.40
2.2.31
2.2.20
2.2.10
2.2.00
2.1.40
2.1.30
2.1.20
2.1.10
2.1.00
2.0.20
2.0.10
2.0.00
1.0.240
1.0.230
1.0.221
1.0.210
1.0.200
1.0.190
1.0.180
1.0.170
1.0.160
1.0.150
1.0.140
1.0.130

Package Sidebar

Install

npm i @0x/dev-utils

Weekly Downloads

570

Version

5.0.3

License

Apache-2.0

Unpacked Size

80 kB

Total Files

41

Last publish

Collaborators

  • rhinodavid
  • mwelche
  • savdont
  • kyuc
  • henryzhu
  • tobernguyen
  • dekz
  • amirbandeali
  • phil-ociraptor