aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-05-22 07:44:25 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-05-23 06:20:34 +0800
commit86f17fb466124ad4ecd9e4ac47e7fecde8f585ee (patch)
tree5063effb15a0cd15bc3f0422cae72ab6c33597d1 /packages
parent6aafda45170d77f9e10025ce119d47d9710a87ec (diff)
downloaddexon-sol-tools-86f17fb466124ad4ecd9e4ac47e7fecde8f585ee.tar
dexon-sol-tools-86f17fb466124ad4ecd9e4ac47e7fecde8f585ee.tar.gz
dexon-sol-tools-86f17fb466124ad4ecd9e4ac47e7fecde8f585ee.tar.bz2
dexon-sol-tools-86f17fb466124ad4ecd9e4ac47e7fecde8f585ee.tar.lz
dexon-sol-tools-86f17fb466124ad4ecd9e4ac47e7fecde8f585ee.tar.xz
dexon-sol-tools-86f17fb466124ad4ecd9e4ac47e7fecde8f585ee.tar.zst
dexon-sol-tools-86f17fb466124ad4ecd9e4ac47e7fecde8f585ee.zip
Rename ZeroExArtifactAdapter to SolCompilerArtifactAdapter
Diffstat (limited to 'packages')
-rw-r--r--packages/contracts/test/utils/coverage.ts4
-rw-r--r--packages/metacoin/test/utils/coverage.ts4
-rw-r--r--packages/sol-cov/src/artifact_adapters/0x.ts2
-rw-r--r--packages/sol-cov/src/artifact_adapters/truffle.ts6
-rw-r--r--packages/sol-cov/src/index.ts2
-rw-r--r--packages/sol-cov/test/collect_contracts_data_test.ts4
6 files changed, 11 insertions, 11 deletions
diff --git a/packages/contracts/test/utils/coverage.ts b/packages/contracts/test/utils/coverage.ts
index 52c419ffc..eeb47667f 100644
--- a/packages/contracts/test/utils/coverage.ts
+++ b/packages/contracts/test/utils/coverage.ts
@@ -1,5 +1,5 @@
import { devConstants } from '@0xproject/dev-utils';
-import { CoverageSubprovider, ZeroExArtifactAdapter } from '@0xproject/sol-cov';
+import { CoverageSubprovider, SolCompilerArtifactAdapter } from '@0xproject/sol-cov';
import * as fs from 'fs';
import * as _ from 'lodash';
@@ -16,7 +16,7 @@ export const coverage = {
const defaultFromAddress = devConstants.TESTRPC_FIRST_ADDRESS;
const CONFIG_FILE = 'compiler.json';
const config = JSON.parse(fs.readFileSync(CONFIG_FILE).toString());
- const zeroExArtifactsAdapter = new ZeroExArtifactAdapter(config.artifactsDir, config.contractsDir);
+ const zeroExArtifactsAdapter = new SolCompilerArtifactAdapter(config.artifactsDir, config.contractsDir);
const coverageSubrpovider = new CoverageSubprovider(zeroExArtifactsAdapter, defaultFromAddress);
return coverageSubprovider;
},
diff --git a/packages/metacoin/test/utils/coverage.ts b/packages/metacoin/test/utils/coverage.ts
index 83b56596f..945afb0a7 100644
--- a/packages/metacoin/test/utils/coverage.ts
+++ b/packages/metacoin/test/utils/coverage.ts
@@ -1,5 +1,5 @@
import { devConstants } from '@0xproject/dev-utils';
-import { CoverageSubprovider, ZeroExArtifactAdapter } from '@0xproject/sol-cov';
+import { CoverageSubprovider, SolCompilerArtifactAdapter } from '@0xproject/sol-cov';
import * as _ from 'lodash';
import { config } from './config';
@@ -15,7 +15,7 @@ export const coverage = {
},
_getCoverageSubprovider(): CoverageSubprovider {
const defaultFromAddress = devConstants.TESTRPC_FIRST_ADDRESS;
- const zeroExArtifactsAdapter = new ZeroExArtifactAdapter(config.artifactsDir, config.contractsDir);
+ const zeroExArtifactsAdapter = new SolCompilerArtifactAdapter(config.artifactsDir, config.contractsDir);
return new CoverageSubprovider(zeroExArtifactsAdapter, defaultFromAddress);
},
};
diff --git a/packages/sol-cov/src/artifact_adapters/0x.ts b/packages/sol-cov/src/artifact_adapters/0x.ts
index 87d23b0aa..f61364df6 100644
--- a/packages/sol-cov/src/artifact_adapters/0x.ts
+++ b/packages/sol-cov/src/artifact_adapters/0x.ts
@@ -7,7 +7,7 @@ import { ContractData } from '../types';
import { AbstractArtifactAdapter } from './abstract';
-export class ZeroExArtifactAdapter extends AbstractArtifactAdapter {
+export class SolCompilerArtifactAdapter extends AbstractArtifactAdapter {
private _artifactsPath: string;
private _sourcesPath: string;
constructor(artifactsPath: string, sourcesPath: string) {
diff --git a/packages/sol-cov/src/artifact_adapters/truffle.ts b/packages/sol-cov/src/artifact_adapters/truffle.ts
index e891bb464..b9c9c4d42 100644
--- a/packages/sol-cov/src/artifact_adapters/truffle.ts
+++ b/packages/sol-cov/src/artifact_adapters/truffle.ts
@@ -7,7 +7,7 @@ import * as rimraf from 'rimraf';
import { ContractData } from '../types';
-import { ZeroExArtifactAdapter } from './0x';
+import { SolCompilerArtifactAdapter } from './0x';
import { AbstractArtifactAdapter } from './abstract';
export class TruffleArtifactAdapter extends AbstractArtifactAdapter {
@@ -35,8 +35,8 @@ export class TruffleArtifactAdapter extends AbstractArtifactAdapter {
};
const compiler = new Compiler(compilerOptions);
await compiler.compileAsync();
- const zeroExArtifactAdapter = new ZeroExArtifactAdapter(artifactsDir, this._sourcesPath);
- const contractsDataFrom0xArtifacts = await zeroExArtifactAdapter.collectContractsDataAsync();
+ const solCompilerArtifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, this._sourcesPath);
+ const contractsDataFrom0xArtifacts = await solCompilerArtifactAdapter.collectContractsDataAsync();
rimraf.sync(artifactsDir);
return contractsDataFrom0xArtifacts;
}
diff --git a/packages/sol-cov/src/index.ts b/packages/sol-cov/src/index.ts
index 18031372b..a4d2b027f 100644
--- a/packages/sol-cov/src/index.ts
+++ b/packages/sol-cov/src/index.ts
@@ -1,5 +1,5 @@
export { CoverageSubprovider } from './coverage_subprovider';
-export { ZeroExArtifactAdapter } from './artifact_adapters/0x';
+export { SolCompilerArtifactAdapter } from './artifact_adapters/0x';
export { TruffleArtifactAdapter } from './artifact_adapters/truffle';
export { AbstractArtifactAdapter } from './artifact_adapters/abstract';
export { ContractData } from './types';
diff --git a/packages/sol-cov/test/collect_contracts_data_test.ts b/packages/sol-cov/test/collect_contracts_data_test.ts
index 906b7f4e2..7a0b9fef5 100644
--- a/packages/sol-cov/test/collect_contracts_data_test.ts
+++ b/packages/sol-cov/test/collect_contracts_data_test.ts
@@ -4,7 +4,7 @@ import 'make-promises-safe';
import 'mocha';
import * as path from 'path';
-import { ZeroExArtifactAdapter } from '../src/artifact_adapters/0x';
+import { SolCompilerArtifactAdapter } from '../src/artifact_adapters/0x';
const expect = chai.expect;
@@ -13,7 +13,7 @@ describe('Collect contracts data', () => {
it('correctly collects contracts data', async () => {
const artifactsPath = path.resolve(__dirname, 'fixtures/artifacts');
const sourcesPath = path.resolve(__dirname, 'fixtures/contracts');
- const zeroExArtifactsAdapter = new ZeroExArtifactAdapter(artifactsPath, sourcesPath);
+ const zeroExArtifactsAdapter = new SolCompilerArtifactAdapter(artifactsPath, sourcesPath);
const contractsData = await zeroExArtifactsAdapter.collectContractsDataAsync();
_.forEach(contractsData, contractData => {
expect(contractData).to.have.keys([