aboutsummaryrefslogtreecommitdiffstats
path: root/packages/migrations/src/artifacts.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/migrations/src/artifacts.ts')
-rw-r--r--packages/migrations/src/artifacts.ts23
1 files changed, 0 insertions, 23 deletions
diff --git a/packages/migrations/src/artifacts.ts b/packages/migrations/src/artifacts.ts
index f8913fe52..42eb1c33e 100644
--- a/packages/migrations/src/artifacts.ts
+++ b/packages/migrations/src/artifacts.ts
@@ -1,7 +1,4 @@
-import { BaseContract } from '@0xproject/base-contract';
import { ContractArtifact } from '@0xproject/sol-compiler';
-import * as fs from 'fs';
-import * as path from 'path';
import * as AccountLevels from '../artifacts/1.0.0/AccountLevels.json';
import * as Arbitrage from '../artifacts/1.0.0/Arbitrage.json';
@@ -32,23 +29,3 @@ export const artifacts = {
MultiSigWalletWithTimeLock: (MultiSigWalletWithTimeLock as any) as ContractArtifact,
MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress: (MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress as any) as ContractArtifact,
};
-
-export class ArtifactWriter {
- private _artifactsDir: string;
- private _networkId: number;
- constructor(artifactsDir: string, networkId: number) {
- this._artifactsDir = artifactsDir;
- this._networkId = networkId;
- }
- public saveArtifact(contract: BaseContract): void {
- const contractName = contract.contractName;
- const artifactFile = path.join(this._artifactsDir, `${contractName}.json`);
- const artifact: ContractArtifact = JSON.parse(fs.readFileSync(artifactFile).toString());
- artifact.networks[this._networkId] = {
- address: contract.address,
- links: {},
- constructorArgs: JSON.stringify(contract.constructorArgs),
- };
- fs.writeFileSync(artifactFile, JSON.stringify(artifact, null, 2));
- }
-}