Catalog npm
Back to packageRELEASE DETAILS

4.8.3

npm

@0x/sol-compiler

Solidity compiler wrapper and artifactor

Published26 Jan 2023
Direct dependencies50
Transitive dependenciesNot calculated

README

Current package documentation

@0x/sol-compiler

Sol-compiler is a wrapper around solc-js that adds:

  • Smart re-compilation: Only recompiles when smart contracts have changed
  • Ability to compile an entire project instead of only individual .sol files
  • Compilation using the Solidity version specified at the top of each individual .sol file
  • Proper parsing of Solidity version ranges
  • Support for the standard input description for what information you'd like added to the resulting artifacts file (i.e 100% configurable artifacts content).

Read the Documentation.

Installation

CLI Installation

yarn global add @0x/sol-compiler

API Installation

yarn add @0x/sol-compiler

If your project is in TypeScript, add the following to your tsconfig.json:

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

Import

import { Compiler } from '@0x/sol-compiler';

or

var Compiler = require('@0x/sol-compiler').Compiler;

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/sol-compiler yarn build

Or continuously rebuild on change:

PKG=@0x/sol-compiler yarn watch

Clean

yarn clean

Lint

yarn lint

Run Tests

yarn test

Downloads & popularity

Awaiting observations

No metric observations yet

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

Declared dependencies 50

Native requirements
50 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
solc
Environment
{
  "local_name": "solc",
  "alias": false,
  "peer_metadata": null
}
^0.8runtime
chalk
Environment
{
  "local_name": "chalk",
  "alias": false,
  "peer_metadata": null
}
^2.3.0runtime
yargs
Environment
{
  "local_name": "yargs",
  "alias": false,
  "peer_metadata": null
}
^17.5.1runtime
lodash
Environment
{
  "local_name": "lodash",
  "alias": false,
  "peer_metadata": null
}
^4.17.21runtime
mkdirp
Environment
{
  "local_name": "mkdirp",
  "alias": false,
  "peer_metadata": null
}
^0.5.1runtime
semver
Environment
{
  "local_name": "semver",
  "alias": false,
  "peer_metadata": null
}
5.5.0runtime
chokidar
Environment
{
  "local_name": "chokidar",
  "alias": false,
  "peer_metadata": null
}
^3.0.2runtime
@0x/types
Environment
{
  "local_name": "@0x/types",
  "alias": false,
  "peer_metadata": null
}
^3.3.7runtime
@0x/utils
Environment
{
  "local_name": "@0x/utils",
  "alias": false,
  "peer_metadata": null
}
^7.0.0runtime
pluralize
Environment
{
  "local_name": "pluralize",
  "alias": false,
  "peer_metadata": null
}
^7.0.0runtime
@0x/assert
Environment
{
  "local_name": "@0x/assert",
  "alias": false,
  "peer_metadata": null
}
^3.0.35runtime
@types/node
Environment
{
  "local_name": "@types/node",
  "alias": false,
  "peer_metadata": null
}
12.12.54runtime
@types/yargs
Environment
{
  "local_name": "@types/yargs",
  "alias": false,
  "peer_metadata": null
}
^11.0.0runtime
web3-eth-abi
Environment
{
  "local_name": "web3-eth-abi",
  "alias": false,
  "peer_metadata": null
}
^1.0.0-beta.24runtime
ethereum-types
Environment
{
  "local_name": "ethereum-types",
  "alias": false,
  "peer_metadata": null
}
^3.7.1runtime
strip-comments
Environment
{
  "local_name": "strip-comments",
  "alias": false,
  "peer_metadata": null
}
^2.0.1runtime
ethereumjs-util
Environment
{
  "local_name": "ethereumjs-util",
  "alias": false,
  "peer_metadata": null
}
^7.1.5runtime
@0x/json-schemas
Environment
{
  "local_name": "@0x/json-schemas",
  "alias": false,
  "peer_metadata": null
}
^6.4.5runtime
@0x/sol-resolver
Environment
{
  "local_name": "@0x/sol-resolver",
  "alias": false,
  "peer_metadata": null
}
^3.1.13runtime
@0x/web3-wrapper
Environment
{
  "local_name": "@0x/web3-wrapper",
  "alias": false,
  "peer_metadata": null
}
^8.0.0runtime
source-map-support
Environment
{
  "local_name": "source-map-support",
  "alias": false,
  "peer_metadata": null
}
^0.5.0runtime
require-from-string
Environment
{
  "local_name": "require-from-string",
  "alias": false,
  "peer_metadata": null
}
^2.0.1runtime
@0x/typescript-typings
Environment
{
  "local_name": "@0x/typescript-typings",
  "alias": false,
  "peer_metadata": null
}
^5.3.2runtime
nyc
Environment
{
  "local_name": "nyc",
  "alias": false,
  "peer_metadata": null
}
^11.0.1development
shx
Environment
{
  "local_name": "shx",
  "alias": false,
  "peer_metadata": null
}
^0.2.2development
chai
Environment
{
  "local_name": "chai",
  "alias": false,
  "peer_metadata": null
}
^4.0.1development
mocha
Environment
{
  "local_name": "mocha",
  "alias": false,
  "peer_metadata": null
}
^6.2.0development
tslint
Environment
{
  "local_name": "tslint",
  "alias": false,
  "peer_metadata": null
}
5.11.0development
typedoc
Environment
{
  "local_name": "typedoc",
  "alias": false,
  "peer_metadata": null
}
~0.16.11development
types-bn
Environment
{
  "local_name": "types-bn",
  "alias": false,
  "peer_metadata": null
}
^0.0.1development
copyfiles
Environment
{
  "local_name": "copyfiles",
  "alias": false,
  "peer_metadata": null
}
^2.0.0development
dirty-chai
Environment
{
  "local_name": "dirty-chai",
  "alias": false,
  "peer_metadata": null
}
^2.0.1development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
4.2.2development
npm-run-all
Environment
{
  "local_name": "npm-run-all",
  "alias": false,
  "peer_metadata": null
}
^4.1.2development
@types/mocha
Environment
{
  "local_name": "@types/mocha",
  "alias": false,
  "peer_metadata": null
}
^5.2.7development
@0x/dev-utils
Environment
{
  "local_name": "@0x/dev-utils",
  "alias": false,
  "peer_metadata": null
}
^5.0.1development
@types/mkdirp
Environment
{
  "local_name": "@types/mkdirp",
  "alias": false,
  "peer_metadata": null
}
^0.5.2development
@types/semver
Environment
{
  "local_name": "@types/semver",
  "alias": false,
  "peer_metadata": null
}
5.5.0development
@0x/ts-doc-gen
Environment
{
  "local_name": "@0x/ts-doc-gen",
  "alias": false,
  "peer_metadata": null
}
^0.0.28development
chai-bignumber
Environment
{
  "local_name": "chai-bignumber",
  "alias": false,
  "peer_metadata": null
}
^3.0.0development
@types/pluralize
Environment
{
  "local_name": "@types/pluralize",
  "alias": false,
  "peer_metadata": null
}
^0.0.29development
chai-as-promised
Environment
{
  "local_name": "chai-as-promised",
  "alias": false,
  "peer_metadata": null
}
^7.1.0development
@0x/tslint-config
Environment
{
  "local_name": "@0x/tslint-config",
  "alias": false,
  "peer_metadata": null
}
^4.1.5development
zeppelin-solidity
Environment
{
  "local_name": "zeppelin-solidity",
  "alias": false,
  "peer_metadata": null
}
1.8.0development
make-promises-safe
Environment
{
  "local_name": "make-promises-safe",
  "alias": false,
  "peer_metadata": null
}
^1.1.0development
web3-provider-engine
Environment
{
  "local_name": "web3-provider-engine",
  "alias": false,
  "peer_metadata": null
}
16.0.4development
@types/strip-comments
Environment
{
  "local_name": "@types/strip-comments",
  "alias": false,
  "peer_metadata": null
}
^2.0.0development
web3-typescript-typings
Environment
{
  "local_name": "web3-typescript-typings",
  "alias": false,
  "peer_metadata": null
}
^0.10.2development
@types/require-from-string
Environment
{
  "local_name": "@types/require-from-string",
  "alias": false,
  "peer_metadata": null
}
^1.2.0development
@types/web3-provider-engine
Environment
{
  "local_name": "@types/web3-provider-engine",
  "alias": false,
  "peer_metadata": null
}
^14.0.0development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "9be058bad352ad3d3b81713dd18c69596fac7eef",
  "tarball": "https://registry.npmjs.org/@0x/sol-compiler/-/sol-compiler-4.8.3.tgz",
  "fileCount": 70,
  "integrity": "sha512-ZYAoXK7J5VcU3g1EL8vjc9SCLIJCenIlcJ4m1pxSrUrHbnRHLesTRj8GTsV/PRqjwHgQNeCiT62ina3Qk8aKdg==",
  "signatures": [
    {
      "sig": "MEUCIQD5o7tqQajU50iMUQbzc72kGlcofRa5Opokq9rGMW/RIAIgCZfnKLrw+SYwVK9FEKio161TZI1R3Pa+YGIf7aq3sTM=",
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
    }
  ],
  "unpackedSize": 172141,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj0pyLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmocAQ//cw1a8uaOin3KK9NmGp+Qhky7/GpSvp6ZRcv7xJ6vSgj7Kas8\r\nOFfJxv9eealngR7eNdJiP9KTgDJN6fUdL1NX5oD4hyFGAE5oS1zAewr6e+fs\r\ni7rkiunS2j1aQKvKtIhFe0Z5nnwlfw0J46LX99xUdwluvahZ6eJ4XVc9T9uh\r\nL3zYk38C64gSbY3o/ZmmTx68fcIphgQOlCpf0P0etreYt2o1vKZ5LuFpLB0j\r\nfOai83WrkO/bPnZP/Y4XBHV8J7Kg369JNVcZtOuT4EeV/a+Vx0hxZxMvGa06\r\nak2xiPdrdmSgEiWJ+1HqIre9bbRgVfMSn+RUnTjajeEYIU5zpr6KCt1vUdjj\r\nWjnmInkzGnj3F7MLM94mH/zskt97tDJFamboIMasAdKoPDZurQR0U5FhNN+c\r\nO25qi29mM1QnmFqNRK/L/+r3fa4hTT195EDf296g+kmk72w1PJqlih9+vBxE\r\noPaQH47+y2AI6pl3chPzQc5ruMicLWVciDJlG6Urbhf6ZcPxP/NfpILzwd8E\r\nuyKBpjDfMxMG/TmbfePIQJO1q2CilTcEdEx18kMUKX7Ck+6HN1fPt6eUTJUE\r\nGjY4etbRd63mUMqWBdEebdlYtkS6dpggPj9wh8yOQSR1MtkyKCrYoW/lHMuL\r\nYfKYEXYtIoeuZR914MFBl2I45icn6zOf3XY=\r\n=0XbG\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:29 UTC

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

Record identity

package_version:02b3db4bdc382fb7750f9a34dc134aaab7453f4ec45ede8f9074c47c285c8d9b

Other collected versions

4.8.57 Apr4.8.47 Apr4.8.218 Aug4.8.116 Mar4.8.016 Mar4.7.926 FebView all collected versions →