Catalog npm
Back to packageRELEASE DETAILS

1.0.4

npm

@0x/contracts-gen

Generates boilerplate code for smart contracts packages

Published26 Feb 2019
Direct dependencies14
Transitive dependenciesNot calculated

README

Current package documentation

Contracts Gen

This package allows you to generate boilerplate TypeScript code and configs for smart contracts packages.

Installation

yarn add -g @0x/contracts-gen

Usage

Run it from within your smart contracts packages.

contracts-gen

You should run this tool after each time you move your contracts around to regenerate boilerplate code and configs.

What can it generate

This tool does the following:

  • Reads your compiler.json. Specifically the list of smart contracts.
  • Creates wrapper.ts file which exports all contract wrappers.
  • Creates artifacts.ts file which exports all contract artifacts.
  • Generates list of JSON artifact files in tsconfig.json
  • Generates a glob for abi-gen in package.json

On top of that - if your compiler.json has contracts referenced just by name - it will resolve the name to relative path and put it there. It also sorts all the lists in it's output leading to smaller and cleaner diffs.

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/contracts-gen yarn build

Or continuously rebuild on change:

PKG=@0x/contracts-gen yarn watch

Clean

yarn clean

Lint

yarn lint

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 14

Native requirements
14 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
lodash
Environment
{
  "local_name": "lodash",
  "alias": false,
  "peer_metadata": null
}
^4.17.11runtime
prettier
Environment
{
  "local_name": "prettier",
  "alias": false,
  "peer_metadata": null
}
^1.16.3runtime
@0x/types
Environment
{
  "local_name": "@0x/types",
  "alias": false,
  "peer_metadata": null
}
^2.1.1runtime
@0x/utils
Environment
{
  "local_name": "@0x/utils",
  "alias": false,
  "peer_metadata": null
}
^4.2.1runtime
to-snake-case
Environment
{
  "local_name": "to-snake-case",
  "alias": false,
  "peer_metadata": null
}
^1.0.0runtime
ethereum-types
Environment
{
  "local_name": "ethereum-types",
  "alias": false,
  "peer_metadata": null
}
^2.1.0runtime
@0x/sol-resolver
Environment
{
  "local_name": "@0x/sol-resolver",
  "alias": false,
  "peer_metadata": null
}
^2.0.4runtime
@0x/typescript-typings
Environment
{
  "local_name": "@0x/typescript-typings",
  "alias": false,
  "peer_metadata": null
}
^4.1.0runtime
shx
Environment
{
  "local_name": "shx",
  "alias": false,
  "peer_metadata": null
}
^0.2.2development
tslint
Environment
{
  "local_name": "tslint",
  "alias": false,
  "peer_metadata": null
}
5.11.0development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
3.0.1development
@types/node
Environment
{
  "local_name": "@types/node",
  "alias": false,
  "peer_metadata": null
}
*development
@types/prettier
Environment
{
  "local_name": "@types/prettier",
  "alias": false,
  "peer_metadata": null
}
^1.15.2development
@0x/tslint-config
Environment
{
  "local_name": "@0x/tslint-config",
  "alias": false,
  "peer_metadata": null
}
^3.0.0development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "2bde898060d7ef3e1c12077399c934b984df08ad",
  "tarball": "https://registry.npmjs.org/@0x/contracts-gen/-/contracts-gen-1.0.4.tgz",
  "fileCount": 19,
  "integrity": "sha512-1G29JGtMTVn+cGSVgMjBeoR3P08RS7Kb8NCQSTnVvDX+gT0WEX0VI+9pKcHz+lOb7XjzojryJa6RoV/crzijVA==",
  "signatures": [
    {
      "sig": "MEUCIQC2xYACGe9iU+TAUGbOInW4y6UvwdHSElw0KmEKnmoSWAIgf8up7maTxyQqbEYuMBJ6sNW8fv3/MVJIVXtVMjTOFc0=",
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
    }
  ],
  "unpackedSize": 21478,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdcGuCRA9TVsSAnZWagAAf9IP/2IyQrtP02CYBTokET78\nZb/PHRPA5Ai4i7m/ZYtwGscAFhA9BgXmEQjIQXdjg5R0HdDN4Wus9F91AOg+\nX0onbYTugHz/WgLuLLY8pNDIn3181Hxl+mtontLh0QmK1xIGOwhEFE37WLXC\noESP5EhKNtx8Ch5O1/WEC6/qSvCTJB3TyV2r/hG17TBeomCSKTiFrLJ7zTZM\ndOw4gWuWOKvAuc+obE/YsGLvKlh4aOCOObQuUnMyC1mSsfRG2lZkI0cb3kmE\n535b7k4T23pPk04kUhr+d5/RYOn4BYloEwRzDUAv0PvZ5sPAmnCNUw9xdO5P\nQSEMhhE8/6CwN8ac05lbmFQ4LQno9vafhQJLNaAr7nAUQlgsNprD1pTm1sdP\nZ3hSAA2LWr3qouH59bynFU3zfvGzGPoM9uWpJ/uzbUHRVc/ZoZbfSywEjS23\nlIrODvuD+7peWEmqxOc0KtV80f+RcWUnd/WoSwnfd9OJWJNfOJQGYxyksfxw\nGGSvC/3nw2mAw+3GZ0/ydroerHIAfiQ3zeqpjPujD0WynTL1FK3jaKYM5vDK\nKtk1TT/g902bbqy//og8gWGea1f7HUPNi9H1WYLtXKon0RsBEA1dt7FCrGnO\nmoOl3V/ktiCNKiqzPL0YYkelGYq8NWv2bHAv4FGitFMm8Y083tljvG+wfaK+\nfRul\r\n=1OW2\r\n-----END PGP SIGNATURE-----\r\n"
}

Repository

PENDING
0xproject/0x-monorepo

Shared repository data · GitHub

License detected in repository
Not collected

Repository

PENDING
0xproject/tools

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:25 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:47bd6ed70a1511cce63aba02bcee01ac72fbc279e23ecc956db6e65717c02b17

Other collected versions

2.0.517 Apr2.0.507 Apr2.0.4926 Jan2.0.4813 Oct2.0.4718 Aug2.0.4616 MarView all collected versions →