diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-02-28 06:41:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-28 06:41:59 +0800 |
commit | 7aa070f9eaef734274df6e6eaa4590fe30d52899 (patch) | |
tree | 454cc4800db190b664d65609c62048a989e2d933 /packages/deployer | |
parent | c2ec2291e8243266f52a3b89f38ba67ce1215c22 (diff) | |
parent | ce0b92d681cfb510ede09296b60260637781f875 (diff) | |
download | dexon-sol-tools-7aa070f9eaef734274df6e6eaa4590fe30d52899.tar dexon-sol-tools-7aa070f9eaef734274df6e6eaa4590fe30d52899.tar.gz dexon-sol-tools-7aa070f9eaef734274df6e6eaa4590fe30d52899.tar.bz2 dexon-sol-tools-7aa070f9eaef734274df6e6eaa4590fe30d52899.tar.lz dexon-sol-tools-7aa070f9eaef734274df6e6eaa4590fe30d52899.tar.xz dexon-sol-tools-7aa070f9eaef734274df6e6eaa4590fe30d52899.tar.zst dexon-sol-tools-7aa070f9eaef734274df6e6eaa4590fe30d52899.zip |
Merge pull request #413 from 0xProject/feature/ethers-contracts
abi-gen V2 abi and ethers-contracts
Diffstat (limited to 'packages/deployer')
-rw-r--r-- | packages/deployer/package.json | 1 | ||||
-rw-r--r-- | packages/deployer/src/cli.ts | 7 | ||||
-rw-r--r-- | packages/deployer/src/deployer.ts | 2 | ||||
-rw-r--r-- | packages/deployer/tsconfig.json | 1 |
4 files changed, 8 insertions, 3 deletions
diff --git a/packages/deployer/package.json b/packages/deployer/package.json index f969e4eda..2a6668fa6 100644 --- a/packages/deployer/package.json +++ b/packages/deployer/package.json @@ -36,6 +36,7 @@ "tslint": "5.8.0", "types-bn": "^0.0.1", "typescript": "2.7.1", + "ethers-typescript-typings": "^0.0.1", "web3-typescript-typings": "^0.9.11" }, "dependencies": { diff --git a/packages/deployer/src/cli.ts b/packages/deployer/src/cli.ts index ba156ac20..c976e8f97 100644 --- a/packages/deployer/src/cli.ts +++ b/packages/deployer/src/cli.ts @@ -10,8 +10,8 @@ import { constants } from './utils/constants'; import { CliOptions, CompilerOptions, DeployerOptions } from './utils/types'; const DEFAULT_OPTIMIZER_ENABLED = false; -const DEFAULT_CONTRACTS_DIR = path.resolve('src'); -const DEFAULT_ARTIFACTS_DIR = path.resolve('artifacts'); +const DEFAULT_CONTRACTS_DIR = path.resolve('src/contracts'); +const DEFAULT_ARTIFACTS_DIR = path.resolve('src/artifacts'); const DEFAULT_NETWORK_ID = 50; const DEFAULT_JSONRPC_PORT = 8545; const DEFAULT_GAS_PRICE = (10 ** 9 * 2).toString(); @@ -100,6 +100,9 @@ async function onDeployCommand(argv: CliOptions): Promise<void> { */ function getContractsSetFromList(contracts: string): Set<string> { const specifiedContracts = new Set(); + if (contracts === '*') { + return new Set(['*']); + } const contractsArray = contracts.split(','); _.forEach(contractsArray, contractName => { const fileName = `${contractName}${constants.SOLIDITY_FILE_EXTENSION}`; diff --git a/packages/deployer/src/deployer.ts b/packages/deployer/src/deployer.ts index 021645fd1..6710bcc85 100644 --- a/packages/deployer/src/deployer.ts +++ b/packages/deployer/src/deployer.ts @@ -174,7 +174,7 @@ export class Deployer { const block = await this.web3Wrapper.getBlockAsync('latest'); let gas: number; try { - const gasEstimate: number = await this.web3Wrapper.estimateGasAsync(data); + const gasEstimate: number = await this.web3Wrapper.estimateGasAsync({ data }); gas = Math.min(gasEstimate + EXTRA_GAS, block.gasLimit); } catch (err) { gas = block.gasLimit; diff --git a/packages/deployer/tsconfig.json b/packages/deployer/tsconfig.json index 4e1edb510..897446b66 100644 --- a/packages/deployer/tsconfig.json +++ b/packages/deployer/tsconfig.json @@ -11,6 +11,7 @@ "../../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/ethers-typescript-typings/index.d.ts", "../../node_modules/web3-typescript-typings/index.d.ts" ] } |