aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/artifacts_test.ts8
-rw-r--r--test/utils/constants.ts1
2 files changed, 7 insertions, 2 deletions
diff --git a/test/artifacts_test.ts b/test/artifacts_test.ts
index 937d2674d..74705a525 100644
--- a/test/artifacts_test.ts
+++ b/test/artifacts_test.ts
@@ -1,3 +1,4 @@
+import * as fs from 'fs';
import * as _ from 'lodash';
import * as chai from 'chai';
import * as BigNumber from 'bignumber.js';
@@ -6,6 +7,7 @@ import {chaiSetup} from './utils/chai_setup';
import {ZeroEx, Order} from '../src';
import {web3Factory} from './utils/web3_factory';
import {FillScenarios} from './utils/fill_scenarios';
+import {constants} from './utils/constants';
chaiSetup.configure();
const expect = chai.expect;
@@ -15,8 +17,10 @@ const TIMEOUT = 10000;
describe('Artifacts', () => {
describe('contracts are deployed on kovan', () => {
- const kovanRpcUrl = 'https://kovan.0xproject.com';
- const mnemonic = 'concert load couple harbor equip island argue ramp clarify fence smart topic';
+ const kovanRpcUrl = constants.KOVAN_URL;
+ const packageJSONContent = fs.readFileSync('package.json', 'utf-8');
+ const packageJSON = JSON.parse(packageJSONContent);
+ const mnemonic = packageJSON.config.mnemonic;
const web3Provider = new HDWalletProvider(mnemonic, kovanRpcUrl);
const zeroEx = new ZeroEx(web3Provider);
it('token registry contract is deployed', async () => {
diff --git a/test/utils/constants.ts b/test/utils/constants.ts
index aa1967f88..8211eea00 100644
--- a/test/utils/constants.ts
+++ b/test/utils/constants.ts
@@ -2,4 +2,5 @@ export const constants = {
NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
RPC_HOST: 'localhost',
RPC_PORT: 8545,
+ KOVAN_URL: 'https://kovan.0xproject.com',
};