aboutsummaryrefslogtreecommitdiffstats
path: root/packages/deployer/src/deployer.ts
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-02-18 06:07:05 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-02-21 05:19:12 +0800
commit7fb66bf71a0a86c693a0411c6e03d81982b9054e (patch)
tree524e67ee16acf9bd993f439e9850128a40311596 /packages/deployer/src/deployer.ts
parent097fc477a2e06b8004d98e77dc17d98ab26ab3f1 (diff)
downloaddexon-sol-tools-7fb66bf71a0a86c693a0411c6e03d81982b9054e.tar
dexon-sol-tools-7fb66bf71a0a86c693a0411c6e03d81982b9054e.tar.gz
dexon-sol-tools-7fb66bf71a0a86c693a0411c6e03d81982b9054e.tar.bz2
dexon-sol-tools-7fb66bf71a0a86c693a0411c6e03d81982b9054e.tar.lz
dexon-sol-tools-7fb66bf71a0a86c693a0411c6e03d81982b9054e.tar.xz
dexon-sol-tools-7fb66bf71a0a86c693a0411c6e03d81982b9054e.tar.zst
dexon-sol-tools-7fb66bf71a0a86c693a0411c6e03d81982b9054e.zip
Check dependencies when determining if should be recompiled
Diffstat (limited to 'packages/deployer/src/deployer.ts')
-rw-r--r--packages/deployer/src/deployer.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/deployer/src/deployer.ts b/packages/deployer/src/deployer.ts
index 6f03581e8..b14401050 100644
--- a/packages/deployer/src/deployer.ts
+++ b/packages/deployer/src/deployer.ts
@@ -6,7 +6,7 @@ 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 { ContractArtifact, ContractNetworkData, DeployerOptions } from './utils/types';
import { utils } from './utils/utils';
// Gas added to gas estimate to make sure there is sufficient gas for deployment.
@@ -36,7 +36,7 @@ export class Deployer {
*/
public async deployAsync(contractName: string, args: any[] = []): Promise<Web3.ContractInstance> {
const contractArtifact: ContractArtifact = this._loadContractArtifactIfExists(contractName);
- const contractData: ContractData = this._getContractDataFromArtifactIfExists(contractArtifact);
+ const contractData: ContractNetworkData = this._getContractDataFromArtifactIfExists(contractArtifact);
const data = contractData.unlinked_binary;
const from = await this._getFromAddressAsync();
const gas = await this._getAllowableGasEstimateAsync(data);
@@ -101,7 +101,7 @@ export class Deployer {
args: any[],
): Promise<void> {
const contractArtifact: ContractArtifact = this._loadContractArtifactIfExists(contractName);
- const contractData: ContractData = this._getContractDataFromArtifactIfExists(contractArtifact);
+ const contractData: ContractNetworkData = this._getContractDataFromArtifactIfExists(contractArtifact);
const abi = contractData.abi;
const encodedConstructorArgs = encoder.encodeConstructorArgsFromAbi(args, abi);
const newContractData = {
@@ -139,7 +139,7 @@ export class Deployer {
* @param contractArtifact The contract artifact.
* @return Network specific contract data.
*/
- private _getContractDataFromArtifactIfExists(contractArtifact: ContractArtifact): ContractData {
+ private _getContractDataFromArtifactIfExists(contractArtifact: ContractArtifact): ContractNetworkData {
const contractData = contractArtifact.networks[this._networkId];
if (_.isUndefined(contractData)) {
throw new Error(`Data not found in artifact for contract: ${contractArtifact.contract_name}`);