aboutsummaryrefslogtreecommitdiffstats
path: root/packages/migrations/src/artifact_writer.ts
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-06-28 06:13:57 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-06-30 08:25:56 +0800
commit6e1a549fcb5cc9257ee984a906db78dd2568042b (patch)
tree08432dbc8a2e12c352030ed40f62f3bd44227f97 /packages/migrations/src/artifact_writer.ts
parent5f0a2953c63c31daa975b587f5c5072b6f7e418c (diff)
downloaddexon-sol-tools-6e1a549fcb5cc9257ee984a906db78dd2568042b.tar
dexon-sol-tools-6e1a549fcb5cc9257ee984a906db78dd2568042b.tar.gz
dexon-sol-tools-6e1a549fcb5cc9257ee984a906db78dd2568042b.tar.bz2
dexon-sol-tools-6e1a549fcb5cc9257ee984a906db78dd2568042b.tar.lz
dexon-sol-tools-6e1a549fcb5cc9257ee984a906db78dd2568042b.tar.xz
dexon-sol-tools-6e1a549fcb5cc9257ee984a906db78dd2568042b.tar.zst
dexon-sol-tools-6e1a549fcb5cc9257ee984a906db78dd2568042b.zip
Use ledger subprovider
Diffstat (limited to 'packages/migrations/src/artifact_writer.ts')
-rw-r--r--packages/migrations/src/artifact_writer.ts26
1 files changed, 0 insertions, 26 deletions
diff --git a/packages/migrations/src/artifact_writer.ts b/packages/migrations/src/artifact_writer.ts
deleted file mode 100644
index 2da5a09dd..000000000
--- a/packages/migrations/src/artifact_writer.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import { BaseContract } from '@0xproject/base-contract';
-import { ContractArtifact } from '@0xproject/sol-compiler';
-import * as fs from 'fs';
-import * as path from 'path';
-
-export class ArtifactWriter {
- private _artifactsDir: string;
- private _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'));
- }
-}