Catalog npm
Back to packageRELEASE DETAILS

6.4.5

npm

@0x/migrations

0x smart contract migrations

Published2 Nov 2020
Direct dependencies43
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 43

Native requirements
43 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
}
^6.1.0runtime
ethereum-types
Environment
{
  "local_name": "ethereum-types",
  "alias": false,
  "peer_metadata": null
}
^3.3.3runtime
@0x/sol-compiler
Environment
{
  "local_name": "@0x/sol-compiler",
  "alias": false,
  "peer_metadata": null
}
^4.2.7runtime
@0x/subproviders
Environment
{
  "local_name": "@0x/subproviders",
  "alias": false,
  "peer_metadata": null
}
^6.1.9runtime
@0x/web3-wrapper
Environment
{
  "local_name": "@0x/web3-wrapper",
  "alias": false,
  "peer_metadata": null
}
^7.2.8runtime
@0x/base-contract
Environment
{
  "local_name": "@0x/base-contract",
  "alias": false,
  "peer_metadata": null
}
^6.2.11runtime
@0x/contracts-erc20
Environment
{
  "local_name": "@0x/contracts-erc20",
  "alias": false,
  "peer_metadata": null
}
^3.2.5runtime
@0x/contracts-utils
Environment
{
  "local_name": "@0x/contracts-utils",
  "alias": false,
  "peer_metadata": null
}
^4.5.5runtime
@0x/contracts-erc721
Environment
{
  "local_name": "@0x/contracts-erc721",
  "alias": false,
  "peer_metadata": null
}
^3.1.11runtime
@ledgerhq/hw-app-eth
Environment
{
  "local_name": "@ledgerhq/hw-app-eth",
  "alias": false,
  "peer_metadata": null
}
^4.3.0runtime
@0x/contracts-erc1155
Environment
{
  "local_name": "@0x/contracts-erc1155",
  "alias": false,
  "peer_metadata": null
}
^2.1.11runtime
@0x/contracts-staking
Environment
{
  "local_name": "@0x/contracts-staking",
  "alias": false,
  "peer_metadata": null
}
^2.0.18runtime
@0x/contracts-zero-ex
Environment
{
  "local_name": "@0x/contracts-zero-ex",
  "alias": false,
  "peer_metadata": null
}
^0.6.0runtime
@0x/contract-addresses
Environment
{
  "local_name": "@0x/contract-addresses",
  "alias": false,
  "peer_metadata": null
}
^5.0.1runtime
@0x/contracts-exchange
Environment
{
  "local_name": "@0x/contracts-exchange",
  "alias": false,
  "peer_metadata": null
}
^3.2.11runtime
@0x/contracts-multisig
Environment
{
  "local_name": "@0x/contracts-multisig",
  "alias": false,
  "peer_metadata": null
}
^4.1.11runtime
@0x/typescript-typings
Environment
{
  "local_name": "@0x/typescript-typings",
  "alias": false,
  "peer_metadata": null
}
^5.1.5runtime
@0x/contracts-dev-utils
Environment
{
  "local_name": "@0x/contracts-dev-utils",
  "alias": false,
  "peer_metadata": null
}
^1.3.9runtime
@0x/contracts-extensions
Environment
{
  "local_name": "@0x/contracts-extensions",
  "alias": false,
  "peer_metadata": null
}
^6.2.5runtime
@0x/contracts-asset-proxy
Environment
{
  "local_name": "@0x/contracts-asset-proxy",
  "alias": false,
  "peer_metadata": null
}
^3.6.2runtime
@0x/contracts-coordinator
Environment
{
  "local_name": "@0x/contracts-coordinator",
  "alias": false,
  "peer_metadata": null
}
^3.1.11runtime
@types/web3-provider-engine
Environment
{
  "local_name": "@types/web3-provider-engine",
  "alias": false,
  "peer_metadata": null
}
^14.0.0runtime
@0x/contracts-exchange-forwarder
Environment
{
  "local_name": "@0x/contracts-exchange-forwarder",
  "alias": false,
  "peer_metadata": null
}
^4.2.11runtime
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
yargs
Environment
{
  "local_name": "yargs",
  "alias": false,
  "peer_metadata": null
}
^10.0.3development
gitpkg
Environment
{
  "local_name": "gitpkg",
  "alias": false,
  "peer_metadata": null
}
git+https://github.com/0xProject/gitpkg.gitdevelopment
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
@0x/types
Environment
{
  "local_name": "@0x/types",
  "alias": false,
  "peer_metadata": null
}
^3.3.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
}
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
}
^4.0.1development
@0x/ts-doc-gen
Environment
{
  "local_name": "@0x/ts-doc-gen",
  "alias": false,
  "peer_metadata": null
}
^0.0.28development
@0x/tslint-config
Environment
{
  "local_name": "@0x/tslint-config",
  "alias": false,
  "peer_metadata": null
}
^4.1.3development
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": "13cf2a7a1c24f549f7b8e643d591cfff2db8f0a3",
  "tarball": "https://registry.npmjs.org/@0x/migrations/-/migrations-6.4.5.tgz",
  "fileCount": 62,
  "integrity": "sha512-MXmjde1qzMikRdTwWH1V0717yq7pUQ25SQ8x6tAH2s6CGpoQZN4aV7RxT3mrTTDzEGhbP/8shvQHYbjP9i/ZqA==",
  "signatures": [
    {
      "sig": "MEUCIQC1OywYPE2XSD3oudQt3pG9aufgBUxKWdxUoiim2l6V5gIgU59GD7NU7kcRRr72X7u0QjkG/jIit6n49EdNkirNoIY=",
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
    }
  ],
  "unpackedSize": 170648,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoIauCRA9TVsSAnZWagAA9rUP/10hAENToiZe2UbAkgMn\nmgit7QKxESJSwZs0fvppYQEc4ka5QV4hArdRO/TrNrPR+tbvvsJWFPgsiS/7\nmPaWq3ZSwGEb1OskYuw/tO1EdSEO0NlfjFJEpWbCjLPuq6QantojMqIjAEgP\nsANpgIQXxq0o0pTJb41SsMdLTpE/Wzbi5fqfOhjx6a6ZhMfv2Z6Ev2RiJr9r\nWgFuCGFPt2GKIZxrXeQq3llWjmSN6s0bYNmGcluiohfpGsnuqJ/5ql0H1k2B\neCYcIzPcnsDhLVE9kSFj66wYdzlShg1UghY10UM03r+g1Z6KmsfXBbaItfIL\nbI0fA/dkZ30RmfFfYcBXYFOsz/UlaSS0WYL3ce9dYaCynKdBhK4EjLBsJqpD\nxNuS3pqeZ3inUcD3HSeSEc7Gfl7lLiA69qWxz5mupOYAkHOfMxVvxV9sg/kH\nLVaHmZOGpc9cmmOZ4DccpaL7/nvC6++5XT9yP3/Oy97jC+CzEj36qwQa1TMB\npJOPlZdhZMhHddOqjsY9ufJ2SlMzvTjcr8NNLKsk5VaXa452MSANUVrBMnd6\nE1xzW/LBKP8u4/U4ExHIuOXUPu1rapbezCB+dwq9hA+d6/sdzfSc3WWBF1IG\ndJNTCv0hNLGS+c/9KcfNSLFH8lBs6b2EJaDKzBpDnN4gW2VqJg4yB5w1QZf+\nZ8ZU\r\n=VzyP\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:752fc0ece8a558d72092ac41aa5995f5d43042fb490feacc38fa5ba5f0c7f91c

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 →