diff options
author | Leonid <logvinov.leon@gmail.com> | 2018-01-19 20:43:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-19 20:43:32 +0800 |
commit | e1af25c8a6fa96c665d63fff2033d7611b023db2 (patch) | |
tree | 5769ca73d50c497e46e6c6c927700ae0fa00bec9 | |
parent | 9ccf63b44afe1ae6ccc2b9298ee35697d6be9e30 (diff) | |
parent | 6091f818da7cddcb4a22a573f7726ba9b76b398e (diff) | |
download | dexon-sol-tools-e1af25c8a6fa96c665d63fff2033d7611b023db2.tar dexon-sol-tools-e1af25c8a6fa96c665d63fff2033d7611b023db2.tar.gz dexon-sol-tools-e1af25c8a6fa96c665d63fff2033d7611b023db2.tar.bz2 dexon-sol-tools-e1af25c8a6fa96c665d63fff2033d7611b023db2.tar.lz dexon-sol-tools-e1af25c8a6fa96c665d63fff2033d7611b023db2.tar.xz dexon-sol-tools-e1af25c8a6fa96c665d63fff2033d7611b023db2.tar.zst dexon-sol-tools-e1af25c8a6fa96c665d63fff2033d7611b023db2.zip |
Merge pull request #323 from 0xProject/feature/separate-deployer
Move deployer to a separate package
-rw-r--r-- | .circleci/config.yml | 6 | ||||
-rw-r--r-- | packages/contracts/package.json | 12 | ||||
-rw-r--r-- | packages/contracts/util/types.ts | 18 | ||||
-rw-r--r-- | packages/deployer/README.md | 73 | ||||
-rw-r--r-- | packages/deployer/package.json | 43 | ||||
-rw-r--r-- | packages/deployer/scripts/postpublish.js | 39 | ||||
-rw-r--r-- | packages/deployer/src/cli.ts (renamed from packages/contracts/deploy/cli.ts) | 4 | ||||
-rw-r--r-- | packages/deployer/src/commands.ts (renamed from packages/contracts/deploy/src/commands.ts) | 2 | ||||
-rw-r--r-- | packages/deployer/src/compiler.ts (renamed from packages/contracts/deploy/src/compiler.ts) | 5 | ||||
-rw-r--r-- | packages/deployer/src/deployer.ts (renamed from packages/contracts/deploy/src/deployer.ts) | 0 | ||||
-rw-r--r-- | packages/deployer/src/globals.d.ts | 8 | ||||
-rw-r--r-- | packages/deployer/src/migrations/config/multisig_sample.ts | 10 | ||||
-rw-r--r-- | packages/deployer/src/migrations/config/token_info.ts (renamed from packages/contracts/deploy/migrations/config/token_info.ts) | 4 | ||||
-rw-r--r-- | packages/deployer/src/migrations/migrate.ts (renamed from packages/contracts/deploy/migrations/migrate.ts) | 4 | ||||
-rw-r--r-- | packages/deployer/src/solc/bin_paths.ts (renamed from packages/contracts/deploy/solc/bin_paths.ts) | 0 | ||||
-rw-r--r-- | packages/deployer/src/solc/solc_bin/soljson-v0.4.10+commit.f0d539ae.js (renamed from packages/contracts/deploy/solc/solc_bin/soljson-v0.4.10+commit.f0d539ae.js) | 0 | ||||
-rw-r--r-- | packages/deployer/src/solc/solc_bin/soljson-v0.4.11+commit.68ef5810.js (renamed from packages/contracts/deploy/solc/solc_bin/soljson-v0.4.11+commit.68ef5810.js) | 0 | ||||
-rw-r--r-- | packages/deployer/src/solc/solc_bin/soljson-v0.4.12+commit.194ff033.js (renamed from packages/contracts/deploy/solc/solc_bin/soljson-v0.4.12+commit.194ff033.js) | 0 | ||||
-rw-r--r-- | packages/deployer/src/solc/solc_bin/soljson-v0.4.13+commit.fb4cb1a.js (renamed from packages/contracts/deploy/solc/solc_bin/soljson-v0.4.13+commit.fb4cb1a.js) | 0 | ||||
-rw-r--r-- | packages/deployer/src/solc/solc_bin/soljson-v0.4.14+commit.c2215d46.js (renamed from packages/contracts/deploy/solc/solc_bin/soljson-v0.4.14+commit.c2215d46.js) | 0 | ||||
-rw-r--r-- | packages/deployer/src/solc/solc_bin/soljson-v0.4.15+commit.bbb8e64f.js (renamed from packages/contracts/deploy/solc/solc_bin/soljson-v0.4.15+commit.bbb8e64f.js) | 0 | ||||
-rw-r--r-- | packages/deployer/src/solc/solc_bin/soljson-v0.4.16+commit.d7661dd9.js (renamed from packages/contracts/deploy/solc/solc_bin/soljson-v0.4.16+commit.d7661dd9.js) | 0 | ||||
-rw-r--r-- | packages/deployer/src/solc/solc_bin/soljson-v0.4.17+commit.bdeb9e52.js (renamed from packages/contracts/deploy/solc/solc_bin/soljson-v0.4.17+commit.bdeb9e52.js) | 0 | ||||
-rw-r--r-- | packages/deployer/src/solc/solc_bin/soljson-v0.4.18+commit.9cf6e910.js (renamed from packages/contracts/deploy/solc/solc_bin/soljson-v0.4.18+commit.9cf6e910.js) | 0 | ||||
-rw-r--r-- | packages/deployer/src/types.ts | 23 | ||||
-rw-r--r-- | packages/deployer/src/utils/constants.ts (renamed from packages/contracts/deploy/src/utils/constants.ts) | 0 | ||||
-rw-r--r-- | packages/deployer/src/utils/contract.ts (renamed from packages/contracts/deploy/src/utils/contract.ts) | 0 | ||||
-rw-r--r-- | packages/deployer/src/utils/encoder.ts (renamed from packages/contracts/deploy/src/utils/encoder.ts) | 0 | ||||
-rw-r--r-- | packages/deployer/src/utils/fs_wrapper.ts (renamed from packages/contracts/deploy/src/utils/fs_wrapper.ts) | 0 | ||||
-rw-r--r-- | packages/deployer/src/utils/types.ts (renamed from packages/contracts/deploy/src/utils/types.ts) | 0 | ||||
-rw-r--r-- | packages/deployer/src/utils/utils.ts (renamed from packages/contracts/deploy/src/utils/utils.ts) | 0 | ||||
-rw-r--r-- | packages/deployer/test/deploy_test.ts (renamed from packages/contracts/deploy/test/deploy_test.ts) | 8 | ||||
-rw-r--r-- | packages/deployer/test/fixtures/contracts/Exchange.sol (renamed from packages/contracts/deploy/test/fixtures/contracts/Exchange.sol) | 0 | ||||
-rw-r--r-- | packages/deployer/test/fixtures/contracts/TokenTransferProxy.sol (renamed from packages/contracts/deploy/test/fixtures/contracts/TokenTransferProxy.sol) | 0 | ||||
-rw-r--r-- | packages/deployer/test/fixtures/contracts/base/Ownable.sol (renamed from packages/contracts/deploy/test/fixtures/contracts/base/Ownable.sol) | 0 | ||||
-rw-r--r-- | packages/deployer/test/fixtures/contracts/base/SafeMath.sol (renamed from packages/contracts/deploy/test/fixtures/contracts/base/SafeMath.sol) | 0 | ||||
-rw-r--r-- | packages/deployer/test/fixtures/contracts/base/Token.sol (renamed from packages/contracts/deploy/test/fixtures/contracts/base/Token.sol) | 0 | ||||
-rw-r--r-- | packages/deployer/test/fixtures/exchange_bin.ts (renamed from packages/contracts/deploy/test/fixtures/exchange_bin.ts) | 0 | ||||
-rw-r--r-- | packages/deployer/test/util/constants.ts (renamed from packages/contracts/deploy/test/util/constants.ts) | 0 | ||||
-rw-r--r-- | packages/deployer/tsconfig.json | 16 | ||||
-rw-r--r-- | yarn.lock | 2 |
41 files changed, 244 insertions, 33 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index d95940898..17c4cc58d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,7 +52,7 @@ jobs: name: testrpc command: npm run testrpc -- --db testrpc_snapshot background: true - - run: yarn lerna:run --scope contracts test:circleci:contracts + - run: yarn lerna:run --scope contracts test:circleci test-deployer: docker: - image: circleci/node:6.12 @@ -65,7 +65,7 @@ jobs: name: testrpc command: npm run testrpc -- --db testrpc_snapshot background: true - - run: yarn lerna:run --scope contracts test:circleci:deployer + - run: yarn lerna:run --scope @0xproject/deployer test:circleci test-rest: docker: - image: circleci/node:6.12 @@ -78,7 +78,7 @@ jobs: name: testrpc command: npm run testrpc -- --db testrpc_snapshot background: true - - run: yarn lerna:run --ignore contracts --ignore 0x.js --ignore subproviders test:circleci + - run: yarn lerna:run --ignore contracts --ignore 0x.js --ignore @0xproject/deployer test:circleci lint: working_directory: ~/repo docker: diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 1cf716f92..3049c1666 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -11,14 +11,13 @@ "build": "rm -rf ./lib; copyfiles ./build/**/* ./deploy/solc/solc_bin/* ./deploy/test/fixtures/contracts/**/* ./deploy/test/fixtures/contracts/* ./lib; tsc;", "test": "npm run build; truffle test", - "compile": "npm run build; node lib/deploy/cli.js compile", + "compile:comment": + "Yarn workspaces do not link binaries correctly so we need to reference them directly https://github.com/yarnpkg/yarn/issues/3846", + "compile": "node ../deployer/lib/src/cli.js compile", "clean": "rm -rf ./lib", - "migrate:truffle": "npm run build; truffle migrate", - "migrate": "npm run build; node lib/deploy/cli.js migrate", + "migrate": "node ../deployer/lib/src/cli.js migrate", "lint": "tslint --project . 'migrations/**/*.ts' 'test/**/*.ts' 'util/**/*.ts' 'deploy/**/*.ts'", - "test:circleci:contracts": "yarn test", - "test:circleci:deployer": "yarn test:deployer", - "test:deployer": "npm run build; mocha lib/deploy/test/*_test.js" + "test:circleci": "yarn test" }, "repository": { "type": "git", @@ -58,6 +57,7 @@ }, "dependencies": { "0x.js": "^0.30.0", + "@0xproject/deployer": "*", "@0xproject/json-schemas": "^0.7.3", "@0xproject/utils": "^0.2.0", "@0xproject/web3-wrapper": "^0.1.5", diff --git a/packages/contracts/util/types.ts b/packages/contracts/util/types.ts index 58a7e6a2d..e511ca9f4 100644 --- a/packages/contracts/util/types.ts +++ b/packages/contracts/util/types.ts @@ -84,15 +84,6 @@ export interface TransactionDataParams { args: any[]; } -export interface Token { - address?: string; - name: string; - symbol: string; - decimals: number; - ipfsHash: string; - swarmHash: string; -} - export interface MultiSigConfig { owners: string[]; confirmationsRequired: number; @@ -103,6 +94,15 @@ export interface MultiSigConfigByNetwork { [networkName: string]: MultiSigConfig; } +export interface Token { + address?: string; + name: string; + symbol: string; + decimals: number; + ipfsHash: string; + swarmHash: string; +} + export interface TokenInfoByNetwork { development: Token[]; live: Token[]; diff --git a/packages/deployer/README.md b/packages/deployer/README.md new file mode 100644 index 000000000..4293f82d4 --- /dev/null +++ b/packages/deployer/README.md @@ -0,0 +1,73 @@ +## @0xproject/deployer + +This repository contains a CLI tool that facilitates compiling and deployment of smart contracts. + +## Installation + +```bash +yarn add @0xproject/deployer +``` + +## Usage + +```bash +node ./node_modules/@0xproject/deployer/lib/cli.js --help +cli.js [command] + +Commands: + cli.js compile compile contracts + cli.js migrate compile and deploy contracts using migration scripts + cli.js deploy deploy a single contract with provided arguments + +Options: + --version Show version number [boolean] + --contracts-dir path of contracts directory to compile + [string] [default: "/Users/leonidlogvinov/Dev/0x/0x.js/contracts"] + --network-id mainnet=1, kovan=42, testrpc=50 [number] [default: 50] + --should-optimize enable optimizer [boolean] [default: false] + --artifacts-dir path to write contracts artifacts to + [string] [default: "/Users/leonidlogvinov/Dev/0x/0x.js/build/artifacts/"] + --jsonrpc-port port connected to JSON RPC [number] [default: 8545] + --gas-price gasPrice to be used for transactions + [string] [default: "2000000000"] + --account account to use for deploying contracts [string] + --help Show help [boolean] +``` + +## Contributing + +We strongly recommend that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. + +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. + +### Install Dependencies + +If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: + +```bash +yarn config set workspaces-experimental true +``` + +Then install dependencies + +```bash +yarn install +``` + +### Build + +```bash +yarn build +``` + +### Lint + +```bash +yarn lint +``` + +### Run Tests + +```bash +yarn test +``` diff --git a/packages/deployer/package.json b/packages/deployer/package.json new file mode 100644 index 000000000..b359382c5 --- /dev/null +++ b/packages/deployer/package.json @@ -0,0 +1,43 @@ +{ + "name": "@0xproject/deployer", + "version": "0.0.1", + "description": "Smart contract deployer of 0x protocol", + "main": "lib/src/cli.js", + "scripts": { + "build": "yarn clean && copyfiles 'test/fixtures/contracts/**/*' src/solc/solc_bin/* ./lib && tsc", + "test": "npm run build; mocha lib/test/*_test.js", + "compile": "npm run build; node lib/src/cli.js compile", + "clean": "rm -rf ./lib", + "migrate": "npm run build; node lib/src/cli.js migrate", + "lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'", + "test:circleci": "yarn test" + }, + "bin": { + "0x-deployer": "lib/src/cli.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x.js.git" + }, + "author": "Amir Bandeali", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/0xProject/0x.js/issues" + }, + "homepage": "https://github.com/0xProject/0x.js/packages/deployer/README.md", + "devDependencies": { + "copyfiles": "^1.2.0", + "web3-typescript-typings": "^0.9.3", + "types-bn": "^0.0.1", + "typescript": "~2.6.1" + }, + "dependencies": { + "@0xproject/utils": "^0.1.3", + "@0xproject/web3-wrapper": "^0.1.4", + "lodash": "^4.17.4", + "solc": "^0.4.18", + "yargs": "^10.0.3", + "web3-eth-abi": "^1.0.0-beta.24", + "web3": "^0.20.0" + } +} diff --git a/packages/deployer/scripts/postpublish.js b/packages/deployer/scripts/postpublish.js new file mode 100644 index 000000000..24384b228 --- /dev/null +++ b/packages/deployer/scripts/postpublish.js @@ -0,0 +1,39 @@ +const execAsync = require('async-child-process').execAsync; +const postpublish_utils = require('../../../scripts/postpublish_utils'); +const packageJSON = require('../package.json'); + +const cwd = __dirname + '/..'; +const subPackageName = packageJSON.name; +const S3BucketPath = 's3://connect-docs-jsons/'; + +let tag; +let version; +postpublish_utils + .getLatestTagAndVersionAsync(subPackageName) + .then(function(result) { + tag = result.tag; + version = result.version; + const releaseName = postpublish_utils.getReleaseName(subPackageName, version); + return postpublish_utils.publishReleaseNotes(tag, releaseName); + }) + .then(function(release) { + console.log('POSTPUBLISH: Release successful, generating docs...'); + const jsonFilePath = __dirname + '/../' + postpublish_utils.generatedDocsDirectoryName + '/index.json'; + return execAsync('JSON_FILE_PATH=' + jsonFilePath + ' PROJECT_DIR=' + __dirname + '/.. yarn docs:json', { + cwd, + }); + }) + .then(function(result) { + if (result.stderr !== '') { + throw new Error(result.stderr); + } + const fileName = 'v' + version + '.json'; + console.log('POSTPUBLISH: Doc generation successful, uploading docs... as ', fileName); + const s3Url = S3BucketPath + fileName; + return execAsync('S3_URL=' + s3Url + ' yarn upload_docs_json', { + cwd, + }); + }) + .catch(function(err) { + throw err; + }); diff --git a/packages/contracts/deploy/cli.ts b/packages/deployer/src/cli.ts index 53ae3bcfa..decb37fdc 100644 --- a/packages/contracts/deploy/cli.ts +++ b/packages/deployer/src/cli.ts @@ -5,8 +5,8 @@ import * as path from 'path'; import * as Web3 from 'web3'; import * as yargs from 'yargs'; -import { commands } from './src/commands'; -import { CliOptions, CompilerOptions, DeployerOptions } from './src/utils/types'; +import { commands } from './commands'; +import { CliOptions, CompilerOptions, DeployerOptions } from './utils/types'; const DEFAULT_OPTIMIZER_ENABLED = false; const DEFAULT_CONTRACTS_DIR = path.resolve('contracts'); diff --git a/packages/contracts/deploy/src/commands.ts b/packages/deployer/src/commands.ts index b87b9e632..2acef8e8f 100644 --- a/packages/contracts/deploy/src/commands.ts +++ b/packages/deployer/src/commands.ts @@ -1,4 +1,4 @@ -import { migrator } from './../migrations/migrate'; +import { migrator } from './migrations/migrate'; import { Compiler } from './compiler'; import { Deployer } from './deployer'; import { CompilerOptions, DeployerOptions } from './utils/types'; diff --git a/packages/contracts/deploy/src/compiler.ts b/packages/deployer/src/compiler.ts index 8b99371fa..63db6c865 100644 --- a/packages/contracts/deploy/src/compiler.ts +++ b/packages/deployer/src/compiler.ts @@ -4,7 +4,7 @@ import * as path from 'path'; import solc = require('solc'); import * as Web3 from 'web3'; -import { binPaths } from './../solc/bin_paths'; +import { binPaths } from './solc/bin_paths'; import { fsWrapper } from './utils/fs_wrapper'; import { CompilerOptions, @@ -113,7 +113,6 @@ export class Compiler { public async compileAllAsync(): Promise<void> { await this._createArtifactsDirIfDoesNotExistAsync(); this._contractSourcesIfExists = await Compiler._getContractSourcesAsync(this._contractsDir); - const contractBaseNames = _.keys(this._contractSourcesIfExists); const compiledContractPromises = _.map(contractBaseNames, async (contractBaseName: string): Promise<void> => { return this._compileContractAsync(contractBaseName); @@ -167,7 +166,7 @@ export class Compiler { }; const solcVersion = Compiler._parseSolidityVersion(source); const fullSolcVersion = binPaths[solcVersion]; - const solcBinPath = `./../solc/solc_bin/${fullSolcVersion}`; + const solcBinPath = `./solc/solc_bin/${fullSolcVersion}`; const solcBin = require(solcBinPath); const solcInstance = solc.setupMethods(solcBin); diff --git a/packages/contracts/deploy/src/deployer.ts b/packages/deployer/src/deployer.ts index 6f03581e8..6f03581e8 100644 --- a/packages/contracts/deploy/src/deployer.ts +++ b/packages/deployer/src/deployer.ts diff --git a/packages/deployer/src/globals.d.ts b/packages/deployer/src/globals.d.ts new file mode 100644 index 000000000..0a35002da --- /dev/null +++ b/packages/deployer/src/globals.d.ts @@ -0,0 +1,8 @@ +declare module 'solc' { + export function compile(sources: any, optimizerEnabled: number, findImports: (importPath: string) => any): any; + export function setupMethods(solcBin: any): any; +} + +declare module 'web3-eth-abi' { + export function encodeParameters(typesArray: string[], parameters: any[]): string; +} diff --git a/packages/deployer/src/migrations/config/multisig_sample.ts b/packages/deployer/src/migrations/config/multisig_sample.ts new file mode 100644 index 000000000..dabeb7a4f --- /dev/null +++ b/packages/deployer/src/migrations/config/multisig_sample.ts @@ -0,0 +1,10 @@ +import { MultiSigConfigByNetwork } from '../../types'; + +// Make a copy of this file named `multisig.js` and input custom params as needed +export const multiSig: MultiSigConfigByNetwork = { + kovan: { + owners: [], + confirmationsRequired: 0, + secondsRequired: 0, + }, +}; diff --git a/packages/contracts/deploy/migrations/config/token_info.ts b/packages/deployer/src/migrations/config/token_info.ts index 751150c03..7e822fc3b 100644 --- a/packages/contracts/deploy/migrations/config/token_info.ts +++ b/packages/deployer/src/migrations/config/token_info.ts @@ -1,5 +1,5 @@ -import { constants } from './../../src/utils/constants'; -import { Token } from './../../src/utils/types'; +import { constants } from '../../utils/constants'; +import { Token } from '../../types'; export const tokenInfo: Token[] = [ { diff --git a/packages/contracts/deploy/migrations/migrate.ts b/packages/deployer/src/migrations/migrate.ts index 3efd1f9a6..393806b45 100644 --- a/packages/contracts/deploy/migrations/migrate.ts +++ b/packages/deployer/src/migrations/migrate.ts @@ -2,8 +2,8 @@ import { BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as _ from 'lodash'; -import { Deployer } from './../src/deployer'; -import { constants } from './../src/utils/constants'; +import { Deployer } from '../deployer'; +import { constants } from '../utils/constants'; import { tokenInfo } from './config/token_info'; export const migrator = { diff --git a/packages/contracts/deploy/solc/bin_paths.ts b/packages/deployer/src/solc/bin_paths.ts index e5b107101..e5b107101 100644 --- a/packages/contracts/deploy/solc/bin_paths.ts +++ b/packages/deployer/src/solc/bin_paths.ts diff --git a/packages/contracts/deploy/solc/solc_bin/soljson-v0.4.10+commit.f0d539ae.js b/packages/deployer/src/solc/solc_bin/soljson-v0.4.10+commit.f0d539ae.js index abeaeef1a..abeaeef1a 100644 --- a/packages/contracts/deploy/solc/solc_bin/soljson-v0.4.10+commit.f0d539ae.js +++ b/packages/deployer/src/solc/solc_bin/soljson-v0.4.10+commit.f0d539ae.js diff --git a/packages/contracts/deploy/solc/solc_bin/soljson-v0.4.11+commit.68ef5810.js b/packages/deployer/src/solc/solc_bin/soljson-v0.4.11+commit.68ef5810.js index 522ad2afe..522ad2afe 100644 --- a/packages/contracts/deploy/solc/solc_bin/soljson-v0.4.11+commit.68ef5810.js +++ b/packages/deployer/src/solc/solc_bin/soljson-v0.4.11+commit.68ef5810.js diff --git a/packages/contracts/deploy/solc/solc_bin/soljson-v0.4.12+commit.194ff033.js b/packages/deployer/src/solc/solc_bin/soljson-v0.4.12+commit.194ff033.js index 959545448..959545448 100644 --- a/packages/contracts/deploy/solc/solc_bin/soljson-v0.4.12+commit.194ff033.js +++ b/packages/deployer/src/solc/solc_bin/soljson-v0.4.12+commit.194ff033.js diff --git a/packages/contracts/deploy/solc/solc_bin/soljson-v0.4.13+commit.fb4cb1a.js b/packages/deployer/src/solc/solc_bin/soljson-v0.4.13+commit.fb4cb1a.js index 73705304e..73705304e 100644 --- a/packages/contracts/deploy/solc/solc_bin/soljson-v0.4.13+commit.fb4cb1a.js +++ b/packages/deployer/src/solc/solc_bin/soljson-v0.4.13+commit.fb4cb1a.js diff --git a/packages/contracts/deploy/solc/solc_bin/soljson-v0.4.14+commit.c2215d46.js b/packages/deployer/src/solc/solc_bin/soljson-v0.4.14+commit.c2215d46.js index 56bba18f2..56bba18f2 100644 --- a/packages/contracts/deploy/solc/solc_bin/soljson-v0.4.14+commit.c2215d46.js +++ b/packages/deployer/src/solc/solc_bin/soljson-v0.4.14+commit.c2215d46.js diff --git a/packages/contracts/deploy/solc/solc_bin/soljson-v0.4.15+commit.bbb8e64f.js b/packages/deployer/src/solc/solc_bin/soljson-v0.4.15+commit.bbb8e64f.js index c01807a87..c01807a87 100644 --- a/packages/contracts/deploy/solc/solc_bin/soljson-v0.4.15+commit.bbb8e64f.js +++ b/packages/deployer/src/solc/solc_bin/soljson-v0.4.15+commit.bbb8e64f.js diff --git a/packages/contracts/deploy/solc/solc_bin/soljson-v0.4.16+commit.d7661dd9.js b/packages/deployer/src/solc/solc_bin/soljson-v0.4.16+commit.d7661dd9.js index 5a8b08af9..5a8b08af9 100644 --- a/packages/contracts/deploy/solc/solc_bin/soljson-v0.4.16+commit.d7661dd9.js +++ b/packages/deployer/src/solc/solc_bin/soljson-v0.4.16+commit.d7661dd9.js diff --git a/packages/contracts/deploy/solc/solc_bin/soljson-v0.4.17+commit.bdeb9e52.js b/packages/deployer/src/solc/solc_bin/soljson-v0.4.17+commit.bdeb9e52.js index b91555a9f..b91555a9f 100644 --- a/packages/contracts/deploy/solc/solc_bin/soljson-v0.4.17+commit.bdeb9e52.js +++ b/packages/deployer/src/solc/solc_bin/soljson-v0.4.17+commit.bdeb9e52.js diff --git a/packages/contracts/deploy/solc/solc_bin/soljson-v0.4.18+commit.9cf6e910.js b/packages/deployer/src/solc/solc_bin/soljson-v0.4.18+commit.9cf6e910.js index 5b99e8c72..5b99e8c72 100644 --- a/packages/contracts/deploy/solc/solc_bin/soljson-v0.4.18+commit.9cf6e910.js +++ b/packages/deployer/src/solc/solc_bin/soljson-v0.4.18+commit.9cf6e910.js diff --git a/packages/deployer/src/types.ts b/packages/deployer/src/types.ts new file mode 100644 index 000000000..58d1e5b4f --- /dev/null +++ b/packages/deployer/src/types.ts @@ -0,0 +1,23 @@ +export interface MultiSigConfig { + owners: string[]; + confirmationsRequired: number; + secondsRequired: number; +} + +export interface MultiSigConfigByNetwork { + [networkName: string]: MultiSigConfig; +} + +export interface Token { + address?: string; + name: string; + symbol: string; + decimals: number; + ipfsHash: string; + swarmHash: string; +} + +export interface TokenInfoByNetwork { + development: Token[]; + live: Token[]; +} diff --git a/packages/contracts/deploy/src/utils/constants.ts b/packages/deployer/src/utils/constants.ts index 8871a470d..8871a470d 100644 --- a/packages/contracts/deploy/src/utils/constants.ts +++ b/packages/deployer/src/utils/constants.ts diff --git a/packages/contracts/deploy/src/utils/contract.ts b/packages/deployer/src/utils/contract.ts index 546e82dfb..546e82dfb 100644 --- a/packages/contracts/deploy/src/utils/contract.ts +++ b/packages/deployer/src/utils/contract.ts diff --git a/packages/contracts/deploy/src/utils/encoder.ts b/packages/deployer/src/utils/encoder.ts index d5f807774..d5f807774 100644 --- a/packages/contracts/deploy/src/utils/encoder.ts +++ b/packages/deployer/src/utils/encoder.ts diff --git a/packages/contracts/deploy/src/utils/fs_wrapper.ts b/packages/deployer/src/utils/fs_wrapper.ts index 34c7caa0e..34c7caa0e 100644 --- a/packages/contracts/deploy/src/utils/fs_wrapper.ts +++ b/packages/deployer/src/utils/fs_wrapper.ts diff --git a/packages/contracts/deploy/src/utils/types.ts b/packages/deployer/src/utils/types.ts index e054b9cc2..e054b9cc2 100644 --- a/packages/contracts/deploy/src/utils/types.ts +++ b/packages/deployer/src/utils/types.ts diff --git a/packages/contracts/deploy/src/utils/utils.ts b/packages/deployer/src/utils/utils.ts index 4390d8813..4390d8813 100644 --- a/packages/contracts/deploy/src/utils/utils.ts +++ b/packages/deployer/src/utils/utils.ts diff --git a/packages/contracts/deploy/test/deploy_test.ts b/packages/deployer/test/deploy_test.ts index 51dbf0e5b..5df729a04 100644 --- a/packages/contracts/deploy/test/deploy_test.ts +++ b/packages/deployer/test/deploy_test.ts @@ -1,10 +1,10 @@ import * as chai from 'chai'; import 'mocha'; -import { Compiler } from './../src/compiler'; -import { Deployer } from './../src/deployer'; -import { fsWrapper } from './../src/utils/fs_wrapper'; -import { CompilerOptions, ContractArtifact, ContractData, DoneCallback } from './../src/utils/types'; +import { Compiler } from '../src/compiler'; +import { Deployer } from '../src/deployer'; +import { fsWrapper } from '../src/utils/fs_wrapper'; +import { CompilerOptions, ContractArtifact, ContractData, DoneCallback } from '../src/utils/types'; import { constructor_args, exchange_binary } from './fixtures/exchange_bin'; import { constants } from './util/constants'; diff --git a/packages/contracts/deploy/test/fixtures/contracts/Exchange.sol b/packages/deployer/test/fixtures/contracts/Exchange.sol index 1b6819700..1b6819700 100644 --- a/packages/contracts/deploy/test/fixtures/contracts/Exchange.sol +++ b/packages/deployer/test/fixtures/contracts/Exchange.sol diff --git a/packages/contracts/deploy/test/fixtures/contracts/TokenTransferProxy.sol b/packages/deployer/test/fixtures/contracts/TokenTransferProxy.sol index 90c8e7d66..90c8e7d66 100644 --- a/packages/contracts/deploy/test/fixtures/contracts/TokenTransferProxy.sol +++ b/packages/deployer/test/fixtures/contracts/TokenTransferProxy.sol diff --git a/packages/contracts/deploy/test/fixtures/contracts/base/Ownable.sol b/packages/deployer/test/fixtures/contracts/base/Ownable.sol index 2a74c3717..2a74c3717 100644 --- a/packages/contracts/deploy/test/fixtures/contracts/base/Ownable.sol +++ b/packages/deployer/test/fixtures/contracts/base/Ownable.sol diff --git a/packages/contracts/deploy/test/fixtures/contracts/base/SafeMath.sol b/packages/deployer/test/fixtures/contracts/base/SafeMath.sol index 7414684a8..7414684a8 100644 --- a/packages/contracts/deploy/test/fixtures/contracts/base/SafeMath.sol +++ b/packages/deployer/test/fixtures/contracts/base/SafeMath.sol diff --git a/packages/contracts/deploy/test/fixtures/contracts/base/Token.sol b/packages/deployer/test/fixtures/contracts/base/Token.sol index c03f8c567..c03f8c567 100644 --- a/packages/contracts/deploy/test/fixtures/contracts/base/Token.sol +++ b/packages/deployer/test/fixtures/contracts/base/Token.sol diff --git a/packages/contracts/deploy/test/fixtures/exchange_bin.ts b/packages/deployer/test/fixtures/exchange_bin.ts index a6eae515e..a6eae515e 100644 --- a/packages/contracts/deploy/test/fixtures/exchange_bin.ts +++ b/packages/deployer/test/fixtures/exchange_bin.ts diff --git a/packages/contracts/deploy/test/util/constants.ts b/packages/deployer/test/util/constants.ts index d52076607..d52076607 100644 --- a/packages/contracts/deploy/test/util/constants.ts +++ b/packages/deployer/test/util/constants.ts diff --git a/packages/deployer/tsconfig.json b/packages/deployer/tsconfig.json new file mode 100644 index 000000000..4e1edb510 --- /dev/null +++ b/packages/deployer/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../../tsconfig", + "compilerOptions": { + "outDir": "lib", + "strictFunctionTypes": false, + "strictNullChecks": false + }, + "include": [ + "./src/**/*", + "./test/**/*", + "../../node_modules/types-bn/index.d.ts", + "../../node_modules/types-ethereumjs-util/index.d.ts", + "../../node_modules/chai-typescript-typings/index.d.ts", + "../../node_modules/web3-typescript-typings/index.d.ts" + ] +} @@ -2,7 +2,7 @@ # yarn lockfile v1 -"@0xproject/utils@^0.1.0": +"@0xproject/utils@^0.1.0", "@0xproject/utils@^0.1.3": version "0.1.3" resolved "https://registry.yarnpkg.com/@0xproject/utils/-/utils-0.1.3.tgz#58a9c7e19ab7710e0af17a0c2f1c7fc1b3140e85" dependencies: |