aboutsummaryrefslogtreecommitdiffstats
path: root/packages/migrations/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-05-08 22:02:04 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-05-10 23:47:38 +0800
commit75d24dea0e10d098d3833488a420498410c22991 (patch)
treee079561d372d5480db59f798ebe4d853bd9ab692 /packages/migrations/src
parenta6f72de09d7b2c9738b78d2097baa9906838fbe9 (diff)
downloaddexon-sol-tools-75d24dea0e10d098d3833488a420498410c22991.tar
dexon-sol-tools-75d24dea0e10d098d3833488a420498410c22991.tar.gz
dexon-sol-tools-75d24dea0e10d098d3833488a420498410c22991.tar.bz2
dexon-sol-tools-75d24dea0e10d098d3833488a420498410c22991.tar.lz
dexon-sol-tools-75d24dea0e10d098d3833488a420498410c22991.tar.xz
dexon-sol-tools-75d24dea0e10d098d3833488a420498410c22991.tar.zst
dexon-sol-tools-75d24dea0e10d098d3833488a420498410c22991.zip
Fix linter issues
Diffstat (limited to 'packages/migrations/src')
-rw-r--r--packages/migrations/src/artifacts.ts1
-rw-r--r--packages/migrations/src/migration.ts20
2 files changed, 10 insertions, 11 deletions
diff --git a/packages/migrations/src/artifacts.ts b/packages/migrations/src/artifacts.ts
index 0d3eb68a8..f8913fe52 100644
--- a/packages/migrations/src/artifacts.ts
+++ b/packages/migrations/src/artifacts.ts
@@ -33,7 +33,6 @@ export const artifacts = {
MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress: (MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress as any) as ContractArtifact,
};
-const ARTIFACTS_DIR = '../artifacts/1.0.0';
export class ArtifactWriter {
private _artifactsDir: string;
private _networkId: number;
diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts
index 047a875ed..5b49b9282 100644
--- a/packages/migrations/src/migration.ts
+++ b/packages/migrations/src/migration.ts
@@ -18,33 +18,33 @@ import { tokenInfo } from './utils/token_info';
* Custom migrations should be defined in this function. This will be called with the CLI 'migrate' command.
* Migrations could be written to run in parallel, but if you want contract addresses to be created deterministically,
* the migration should be written to run synchronously.
- * @param provider Provider instance.
- * @param artifactsDir The directory with artifact files.
- * @param defaults Default transaction values to use.
+ * @param provider Web3 provider instance.
+ * @param artifactsDir The directory with compiler artifact files.
+ * @param defaults Default transaction values to use when deploying contracts.
*/
export const runMigrationsAsync = async (provider: Provider, artifactsDir: string, defaults: Partial<TxData>) => {
const web3Wrapper = new Web3Wrapper(provider);
const networkId = await web3Wrapper.getNetworkIdAsync();
const artifactsWriter = new ArtifactWriter(artifactsDir, networkId);
- const tokenTransferProxy = await TokenTransferProxyContract.deploy0xArtifactAsync(
+ const tokenTransferProxy = await TokenTransferProxyContract.deployFrom0xArtifactAsync(
artifacts.TokenTransferProxy,
provider,
defaults,
);
artifactsWriter.saveArtifact(tokenTransferProxy);
- const zrxToken = await ZRXTokenContract.deploy0xArtifactAsync(artifacts.ZRX, provider, defaults);
+ const zrxToken = await ZRXTokenContract.deployFrom0xArtifactAsync(artifacts.ZRX, provider, defaults);
artifactsWriter.saveArtifact(zrxToken);
- const etherToken = await WETH9Contract.deploy0xArtifactAsync(artifacts.EtherToken, provider, defaults);
+ const etherToken = await WETH9Contract.deployFrom0xArtifactAsync(artifacts.EtherToken, provider, defaults);
artifactsWriter.saveArtifact(etherToken);
- const tokenReg = await TokenRegistryContract.deploy0xArtifactAsync(artifacts.TokenRegistry, provider, defaults);
+ const tokenReg = await TokenRegistryContract.deployFrom0xArtifactAsync(artifacts.TokenRegistry, provider, defaults);
artifactsWriter.saveArtifact(tokenReg);
const accounts: string[] = await web3Wrapper.getAvailableAddressesAsync();
const owners = [accounts[0], accounts[1]];
const confirmationsRequired = new BigNumber(2);
const secondsRequired = new BigNumber(0);
- const exchange = await ExchangeContract.deploy0xArtifactAsync(
+ const exchange = await ExchangeContract.deployFrom0xArtifactAsync(
artifacts.Exchange,
provider,
defaults,
@@ -52,7 +52,7 @@ export const runMigrationsAsync = async (provider: Provider, artifactsDir: strin
tokenTransferProxy.address,
);
artifactsWriter.saveArtifact(exchange);
- const multiSig = await MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddressContract.deploy0xArtifactAsync(
+ const multiSig = await MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddressContract.deployFrom0xArtifactAsync(
artifacts.MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress,
provider,
defaults,
@@ -101,7 +101,7 @@ export const runMigrationsAsync = async (provider: Provider, artifactsDir: strin
);
for (const token of tokenInfo) {
const totalSupply = new BigNumber(100000000000000000000);
- const dummyToken = await DummyTokenContract.deploy0xArtifactAsync(
+ const dummyToken = await DummyTokenContract.deployFrom0xArtifactAsync(
artifacts.DummyToken,
provider,
defaults,