aboutsummaryrefslogtreecommitdiffstats
path: root/packages/deployer/test/deployer_test.ts
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-04-04 08:39:55 +0800
committerGreg Hysen <greg.hysen@gmail.com>2018-04-10 08:22:58 +0800
commit61fc3346c2fe2adc33dfe84aa50780d61e10efdf (patch)
tree1f5ab2cddf7093db8f8fb419ef70da66a9997c7b /packages/deployer/test/deployer_test.ts
parent073bf738ddb271b6b4158798baf4cac3cb0608e9 (diff)
downloaddexon-sol-tools-61fc3346c2fe2adc33dfe84aa50780d61e10efdf.tar
dexon-sol-tools-61fc3346c2fe2adc33dfe84aa50780d61e10efdf.tar.gz
dexon-sol-tools-61fc3346c2fe2adc33dfe84aa50780d61e10efdf.tar.bz2
dexon-sol-tools-61fc3346c2fe2adc33dfe84aa50780d61e10efdf.tar.lz
dexon-sol-tools-61fc3346c2fe2adc33dfe84aa50780d61e10efdf.tar.xz
dexon-sol-tools-61fc3346c2fe2adc33dfe84aa50780d61e10efdf.tar.zst
dexon-sol-tools-61fc3346c2fe2adc33dfe84aa50780d61e10efdf.zip
Updated deployer to accept a list of contract directories as input. Contract directories are namespaced to a void clashes. Also in this commit is a fix for overloading contract functions.
Diffstat (limited to 'packages/deployer/test/deployer_test.ts')
-rw-r--r--packages/deployer/test/deployer_test.ts16
1 files changed, 13 insertions, 3 deletions
diff --git a/packages/deployer/test/deployer_test.ts b/packages/deployer/test/deployer_test.ts
index 9c34d74aa..050cf7d02 100644
--- a/packages/deployer/test/deployer_test.ts
+++ b/packages/deployer/test/deployer_test.ts
@@ -4,7 +4,13 @@ import 'mocha';
import { Compiler } from '../src/compiler';
import { Deployer } from '../src/deployer';
import { fsWrapper } from '../src/utils/fs_wrapper';
-import { CompilerOptions, ContractArtifact, ContractNetworkData, DoneCallback } from '../src/utils/types';
+import {
+ CompilerOptions,
+ ContractArtifact,
+ ContractDirectory,
+ ContractNetworkData,
+ DoneCallback,
+} from '../src/utils/types';
import { constructor_args, exchange_binary } from './fixtures/exchange_bin';
import { constants } from './util/constants';
@@ -13,11 +19,15 @@ const expect = chai.expect;
describe('#Deployer', () => {
const artifactsDir = `${__dirname}/fixtures/artifacts`;
- const contractsDir = `${__dirname}/fixtures/contracts`;
const exchangeArtifactPath = `${artifactsDir}/Exchange.json`;
+ const mainContractDir: ContractDirectory = { path: `${__dirname}/fixtures/contracts/main`, namespace: '' };
+ const baseContractDir: ContractDirectory = { path: `${__dirname}/fixtures/contracts/base`, namespace: 'base' };
+ const contractDirs: Set<ContractDirectory> = new Set();
+ contractDirs.add(mainContractDir);
+ contractDirs.add(baseContractDir);
const compilerOpts: CompilerOptions = {
artifactsDir,
- contractsDir,
+ contractDirs,
networkId: constants.networkId,
optimizerEnabled: constants.optimizerEnabled,
specifiedContracts: new Set(constants.specifiedContracts),