From 3a7bb97ad1182eb9c718797bda8dca5eb5d7f9cd Mon Sep 17 00:00:00 2001 From: Alex Browne Date: Wed, 3 Oct 2018 16:21:17 -0700 Subject: Remove artifacts from migrations package and update contract-wrappers accordingly --- packages/migrations/src/utils/artifact_writer.ts | 26 ------------------------ 1 file changed, 26 deletions(-) delete mode 100644 packages/migrations/src/utils/artifact_writer.ts (limited to 'packages/migrations/src/utils') diff --git a/packages/migrations/src/utils/artifact_writer.ts b/packages/migrations/src/utils/artifact_writer.ts deleted file mode 100644 index ea9c7952d..000000000 --- a/packages/migrations/src/utils/artifact_writer.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { BaseContract } from '@0xproject/base-contract'; -import { ContractArtifact } from 'ethereum-types'; -import * as fs from 'fs'; -import * as path from 'path'; - -export class ArtifactWriter { - private readonly _artifactsDir: string; - private readonly _networkId: number; - constructor(artifactsDir: string, networkId: number) { - this._artifactsDir = artifactsDir; - this._networkId = networkId; - } - // This updates the artifact file but does not update the `artifacts` module above. It will not - // contain the saved artifact changes. - 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, '\t')); - } -} -- cgit v1.2.3