diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-01-09 10:02:41 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-01-09 10:02:41 +0800 |
commit | 8019b1b8231cac24dfc6aa3bb2d5115eff11ee89 (patch) | |
tree | d270d71404bd3aab44c79dcadf16e348614e9214 /packages/contracts/deploy/src/compiler.ts | |
parent | 8fe81c9d090ce50496f3150602f19433e7aedd1e (diff) | |
parent | 7a56e83fa3ca02d796deba3359da480834a9f6ea (diff) | |
download | dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar.gz dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar.bz2 dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar.lz dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar.xz dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar.zst dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.zip |
Merge branch 'development' into refactor/httpClientJsonParsing
* development: (21 commits)
Update connect CHANGELOG
Changes to abi-gen after code review
Added constructor ABIs to abi-gen
Describe #295 in a CHANGELOG
Add #302 description to changelog
Fix formatting
Apply prettier config
Install prettier
Remove formatting esilnt rules
sendTransactionAsync should return txHash string
Added Event generation to abi-gen
Publish
Add dates to CHANGELOG entries
Update subproviders CHANGELOG
Support both personal_sign and eth_sign
Fix Ledger tests given change from `personal_sign` to `eth_sign`
Update subprovider to catch correct RPC method
Rename guide
Update contribution guide
Fix broken links in the abi-gen README
...
Diffstat (limited to 'packages/contracts/deploy/src/compiler.ts')
-rw-r--r-- | packages/contracts/deploy/src/compiler.ts | 21 |
1 files changed, 12 insertions, 9 deletions
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 => { |