Catalog npm
Back to packageRELEASE DETAILS

4.3.1

npm

@0x/migrations

0x smart contract migrations

Published3 Sept 2019
Direct dependencies29
Transitive dependenciesNot calculated

README

Current package documentation

Migrations

Migrate the 0x system of smart contracts on the network of your choice using these migrations.

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/migrations yarn build

Or continuously rebuild on change:

PKG=@0x/migrations yarn watch

Clean

yarn clean

Lint

yarn lint

Migrate

V2 smart contracts

In order to migrate the V2 0x smart contracts to TestRPC/Ganache running at http://localhost:8545, run:

yarn migrate:v2

Publish

0x Ganache Snapshot

The 0x Ganache snapshot can be generated and published in this package. In order to build the snapshot for this version of migrations run:

yarn build:snapshot

This will run the migrations in Ganache and output a zip file to be uploaded to the s3 bucket. For example, after running this command you will have created 0x_ganache_snapshot-2.2.2.zip. To publish the zip file to the s3 bucket run:

yarn publish:snapshot

This snapshot will now be publicly available at http://ganache-snapshots.0x.org.s3.amazonaws.com/0x_ganache_snapshot-latest.zip and also versioned with the package.json version.

0x Ganache Docker Image

We also publish a simple docker image which downloads the latest snapshot, extracts and runs Ganache. This is not required to be built when migrations change as it always downloads and runs the latest zip file. If you have made changes to the Dockerfile then a publish of the image is required. To do this run:

yarn build:snapshot:docker
yarn publish:snapshot:docker

The result is a published docker image to the 0xorg docker registry. To start the docker image run:

docker run -p 8545:8545 -ti 0xorg/ganache-cli:latest

This will pull the latest zip in the s3 bucket, extract and start Ganache with the snapshot.

In the event you need a specific version of the published Ganache snapshot run the following specifying the VERSION environment variable:

docker run -e VERSION=2.2.2 -p 8545:8545 -ti 0xorg/ganache-cli:latest

Production

If deploying contract changes to mainnet, @0x/contract-artifacts should also be updated and published. The artifacts must be copied from each contracts/{package-name}/generated-artifacts/{contract}.json.

Downloads & popularity

Awaiting observations

No metric observations yet

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

Declared dependencies 29

Native requirements
29 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
ethers
Environment
{
  "local_name": "ethers",
  "alias": false,
  "peer_metadata": null
}
~4.0.4runtime
lodash
Environment
{
  "local_name": "lodash",
  "alias": false,
  "peer_metadata": null
}
^4.17.11runtime
@0x/utils
Environment
{
  "local_name": "@0x/utils",
  "alias": false,
  "peer_metadata": null
}
^4.5.1runtime
ethereum-types
Environment
{
  "local_name": "ethereum-types",
  "alias": false,
  "peer_metadata": null
}
^2.1.5runtime
@0x/order-utils
Environment
{
  "local_name": "@0x/order-utils",
  "alias": false,
  "peer_metadata": null
}
^8.3.1runtime
@0x/sol-compiler
Environment
{
  "local_name": "@0x/sol-compiler",
  "alias": false,
  "peer_metadata": null
}
^3.1.14runtime
@0x/subproviders
Environment
{
  "local_name": "@0x/subproviders",
  "alias": false,
  "peer_metadata": null
}
^5.0.3runtime
@0x/web3-wrapper
Environment
{
  "local_name": "@0x/web3-wrapper",
  "alias": false,
  "peer_metadata": null
}
^6.0.12runtime
@0x/base-contract
Environment
{
  "local_name": "@0x/base-contract",
  "alias": false,
  "peer_metadata": null
}
^5.3.3runtime
@0x/abi-gen-wrappers
Environment
{
  "local_name": "@0x/abi-gen-wrappers",
  "alias": false,
  "peer_metadata": null
}
^5.3.1runtime
@ledgerhq/hw-app-eth
Environment
{
  "local_name": "@ledgerhq/hw-app-eth",
  "alias": false,
  "peer_metadata": null
}
^4.3.0runtime
@0x/contract-addresses
Environment
{
  "local_name": "@0x/contract-addresses",
  "alias": false,
  "peer_metadata": null
}
^3.1.0runtime
@0x/contract-artifacts
Environment
{
  "local_name": "@0x/contract-artifacts",
  "alias": false,
  "peer_metadata": null
}
^2.2.1runtime
@0x/typescript-typings
Environment
{
  "local_name": "@0x/typescript-typings",
  "alias": false,
  "peer_metadata": null
}
^4.2.5runtime
@types/web3-provider-engine
Environment
{
  "local_name": "@types/web3-provider-engine",
  "alias": false,
  "peer_metadata": null
}
^14.0.0runtime
shx
Environment
{
  "local_name": "shx",
  "alias": false,
  "peer_metadata": null
}
^0.2.2development
yargs
Environment
{
  "local_name": "yargs",
  "alias": false,
  "peer_metadata": null
}
^10.0.3development
tslint
Environment
{
  "local_name": "tslint",
  "alias": false,
  "peer_metadata": null
}
5.11.0development
typedoc
Environment
{
  "local_name": "typedoc",
  "alias": false,
  "peer_metadata": null
}
^0.15.0development
@0x/types
Environment
{
  "local_name": "@0x/types",
  "alias": false,
  "peer_metadata": null
}
^2.4.2development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
3.0.1development
npm-run-all
Environment
{
  "local_name": "npm-run-all",
  "alias": false,
  "peer_metadata": null
}
^4.1.2development
@types/yargs
Environment
{
  "local_name": "@types/yargs",
  "alias": false,
  "peer_metadata": null
}
^11.0.0development
@0x/dev-utils
Environment
{
  "local_name": "@0x/dev-utils",
  "alias": false,
  "peer_metadata": null
}
^2.3.2development
@0x/ts-doc-gen
Environment
{
  "local_name": "@0x/ts-doc-gen",
  "alias": false,
  "peer_metadata": null
}
^0.0.21development
@0x/tslint-config
Environment
{
  "local_name": "@0x/tslint-config",
  "alias": false,
  "peer_metadata": null
}
^3.0.1development
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
}
14.0.6development
@ledgerhq/hw-transport-node-hid
Environment
{
  "local_name": "@ledgerhq/hw-transport-node-hid",
  "alias": false,
  "peer_metadata": null
}
^4.3.0optional

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "74321e2487cac037a0e7a1d0067b3c4fa396e4c6",
  "tarball": "https://registry.npmjs.org/@0x/migrations/-/migrations-4.3.1.tgz",
  "fileCount": 46,
  "integrity": "sha512-wwxwAEiBm8WuBwNAk+qLVs9BRfOpG/Ii+XW9uZHlesq+fViu81p0JOazQKFhO0HXd9LVEkd47vbwxrWuXVxwjw==",
  "signatures": [
    {
      "sig": "MEYCIQCo/m8BoZg7Wcj1SwHlIdrMR9OG4eQa3IdeGqLS6pcWygIhAPDljsxVlkTKgfDAeq8D911MEnPQpPj5nWlQd7vkj0Ah",
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
    }
  ],
  "unpackedSize": 110859,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbnzpCRA9TVsSAnZWagAAR4IP/0JYnZiDUr7F7ZhFNLQe\nyp5wT7llX8cCP6nqFW/37LpOEvo3MouJFvK/Ckbj7IbXmsnMvln58izOo6P3\nmGD876KizW/v6MQLPUYd26Rfnm3rSvttR4zsROKVrjvPAY4PLUr0yCCsmqEW\nw4fAXsdE7DaP7EjvPdqXrkaYCSRinp0moYhoXYTPpfG3IfEe1DeLYbtxzoh9\nShrUFL7BtRxp5/kjjhpTw0n5XY7nhest+vATFZfccMJz7VphZovWb1AK0HR1\nmVf4GIIhH2mv5mzdHTccue+/5nRLLqSZ04icRO1GO/sgfcrmmS9sjMss+Hlq\nh1lb92uHyka1dfSytWZ/hq+xnm23YZUmkP4Bc98mg4VZTZU6Wunp4VnkUvOn\nmLmg+ZrjqB6njq3mIWkugscY8MX+AlEAedm/K4evl7K2mQ+0gKp+BZ70hl6w\nPxuQKI+41ZPRGxDJwsu4HW2jhafHXnrRfFcygM7UW1Qf8J9k32o9HKYH+n1a\njbeaA0C7aletZvlrjVWCpswHbdkv+gGBfsP0Unw52fqWtRZk/2AFCEPRlB/Y\np3dAQvBs0Kcrc+iW3FHbr3bvtUTyp3c5/dPhQSHWHjLGtoK2WkD3VsXKFh1I\nX+GTFRClAr91TzJnJIK63Vx8v79/mUqP5q30hwRlpuTgY7FMjo2dc0hwOuLb\n84tR\r\n=iqij\r\n-----END PGP SIGNATURE-----\r\n"
}

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:28 UTC

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

Record identity

package_version:6bc521da5843a29f5dc00a400ce930fdb68f876f5ec2bded10aeb2a772a75959

Other collected versions

8.1.1919 May8.1.1822 Apr8.1.1731 Mar8.1.162 Mar8.1.1522 Feb8.1.1424 DecView all collected versions →