aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/deploy/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/deploy/src')
-rw-r--r--packages/contracts/deploy/src/commands.ts8
-rw-r--r--packages/contracts/deploy/src/compiler.ts21
-rw-r--r--packages/contracts/deploy/src/deployer.ts25
-rw-r--r--packages/contracts/deploy/src/utils/contract.ts6
-rw-r--r--packages/contracts/deploy/src/utils/encoder.ts2
-rw-r--r--packages/contracts/deploy/src/utils/fs_wrapper.ts2
-rw-r--r--packages/contracts/deploy/src/utils/types.ts2
7 files changed, 34 insertions, 32 deletions
diff --git a/packages/contracts/deploy/src/commands.ts b/packages/contracts/deploy/src/commands.ts
index fc421a760..b87b9e632 100644
--- a/packages/contracts/deploy/src/commands.ts
+++ b/packages/contracts/deploy/src/commands.ts
@@ -1,7 +1,7 @@
-import {migrator} from './../migrations/migrate';
-import {Compiler} from './compiler';
-import {Deployer} from './deployer';
-import {CompilerOptions, DeployerOptions} from './utils/types';
+import { migrator } from './../migrations/migrate';
+import { Compiler } from './compiler';
+import { Deployer } from './deployer';
+import { CompilerOptions, DeployerOptions } from './utils/types';
export const commands = {
async compileAsync(opts: CompilerOptions): Promise<void> {
diff --git a/packages/contracts/deploy/src/compiler.ts b/packages/contracts/deploy/src/compiler.ts
index 02b8699b6..8b99371fa 100644
--- a/packages/contracts/deploy/src/compiler.ts
+++ b/packages/contracts/deploy/src/compiler.ts
@@ -4,8 +4,8 @@ import * as path from 'path';
import solc = require('solc');
import * as Web3 from 'web3';
-import {binPaths} from './../solc/bin_paths';
-import {fsWrapper} from './utils/fs_wrapper';
+import { binPaths } from './../solc/bin_paths';
+import { fsWrapper } from './utils/fs_wrapper';
import {
CompilerOptions,
ContractArtifact,
@@ -14,7 +14,7 @@ import {
ContractSources,
ImportContents,
} from './utils/types';
-import {utils} from './utils/utils';
+import { utils } from './utils/utils';
const SOLIDITY_FILE_EXTENSION = '.sol';
@@ -150,9 +150,10 @@ export class Compiler {
currentArtifact = JSON.parse(currentArtifactString);
oldNetworks = currentArtifact.networks;
const oldNetwork: ContractData = oldNetworks[this._networkId];
- shouldCompile = _.isUndefined(oldNetwork) ||
- oldNetwork.keccak256 !== sourceHash ||
- oldNetwork.optimizer_enabled !== this._optimizerEnabled;
+ shouldCompile =
+ _.isUndefined(oldNetwork) ||
+ oldNetwork.keccak256 !== sourceHash ||
+ oldNetwork.optimizer_enabled !== this._optimizerEnabled;
} catch (err) {
shouldCompile = true;
}
@@ -174,9 +175,11 @@ export class Compiler {
const sourcesToCompile = {
sources: input,
};
- const compiled = solcInstance.compile(sourcesToCompile,
- this._optimizerEnabled,
- this._findImportsIfSourcesExist.bind(this));
+ const compiled = solcInstance.compile(
+ sourcesToCompile,
+ this._optimizerEnabled,
+ this._findImportsIfSourcesExist.bind(this),
+ );
if (!_.isUndefined(compiled.errors)) {
_.each(compiled.errors, errMsg => {
diff --git a/packages/contracts/deploy/src/deployer.ts b/packages/contracts/deploy/src/deployer.ts
index ea1de59d3..6f03581e8 100644
--- a/packages/contracts/deploy/src/deployer.ts
+++ b/packages/contracts/deploy/src/deployer.ts
@@ -1,17 +1,13 @@
-import {TxData} from '@0xproject/types';
-import {Web3Wrapper} from '@0xproject/web3-wrapper';
+import { TxData } from '@0xproject/types';
+import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
import * as Web3 from 'web3';
-import {Contract} from './utils/contract';
-import {encoder} from './utils/encoder';
-import {fsWrapper} from './utils/fs_wrapper';
-import {
- ContractArtifact,
- ContractData,
- DeployerOptions,
-} from './utils/types';
-import {utils} from './utils/utils';
+import { Contract } from './utils/contract';
+import { encoder } from './utils/encoder';
+import { fsWrapper } from './utils/fs_wrapper';
+import { ContractArtifact, ContractData, DeployerOptions } from './utils/types';
+import { utils } from './utils/utils';
// Gas added to gas estimate to make sure there is sufficient gas for deployment.
const EXTRA_GAS = 200000;
@@ -99,8 +95,11 @@ export class Deployer {
* @param contractAddress Contract address to save to artifact.
* @param args Contract constructor arguments that will be encoded and saved to artifact.
*/
- private async _saveContractDataToArtifactAsync(contractName: string,
- contractAddress: string, args: any[]): Promise<void> {
+ private async _saveContractDataToArtifactAsync(
+ contractName: string,
+ contractAddress: string,
+ args: any[],
+ ): Promise<void> {
const contractArtifact: ContractArtifact = this._loadContractArtifactIfExists(contractName);
const contractData: ContractData = this._getContractDataFromArtifactIfExists(contractArtifact);
const abi = contractData.abi;
diff --git a/packages/contracts/deploy/src/utils/contract.ts b/packages/contracts/deploy/src/utils/contract.ts
index ffad9ed70..2c8bbb79e 100644
--- a/packages/contracts/deploy/src/utils/contract.ts
+++ b/packages/contracts/deploy/src/utils/contract.ts
@@ -1,9 +1,9 @@
-import {schemas, SchemaValidator} from '@0xproject/json-schemas';
-import {promisify} from '@0xproject/utils';
+import { schemas, SchemaValidator } from '@0xproject/json-schemas';
+import { promisify } from '@0xproject/utils';
import * as _ from 'lodash';
import * as Web3 from 'web3';
-import {AbiType} from './types';
+import { AbiType } from './types';
export class Contract implements Web3.ContractInstance {
public address: string;
diff --git a/packages/contracts/deploy/src/utils/encoder.ts b/packages/contracts/deploy/src/utils/encoder.ts
index 0248e9f03..d5f807774 100644
--- a/packages/contracts/deploy/src/utils/encoder.ts
+++ b/packages/contracts/deploy/src/utils/encoder.ts
@@ -2,7 +2,7 @@ import * as _ from 'lodash';
import * as Web3 from 'web3';
import * as web3Abi from 'web3-eth-abi';
-import {AbiType} from './types';
+import { AbiType } from './types';
export const encoder = {
encodeConstructorArgsFromAbi(args: any[], abi: Web3.ContractAbi): string {
diff --git a/packages/contracts/deploy/src/utils/fs_wrapper.ts b/packages/contracts/deploy/src/utils/fs_wrapper.ts
index 90785d0dd..34c7caa0e 100644
--- a/packages/contracts/deploy/src/utils/fs_wrapper.ts
+++ b/packages/contracts/deploy/src/utils/fs_wrapper.ts
@@ -1,4 +1,4 @@
-import {promisify} from '@0xproject/utils';
+import { promisify } from '@0xproject/utils';
import * as fs from 'fs';
export const fsWrapper = {
diff --git a/packages/contracts/deploy/src/utils/types.ts b/packages/contracts/deploy/src/utils/types.ts
index 6831079e6..e054b9cc2 100644
--- a/packages/contracts/deploy/src/utils/types.ts
+++ b/packages/contracts/deploy/src/utils/types.ts
@@ -1,4 +1,4 @@
-import {TxData} from '@0xproject/types';
+import { TxData } from '@0xproject/types';
import * as Web3 from 'web3';
import * as yargs from 'yargs';