aboutsummaryrefslogtreecommitdiffstats
path: root/packages/migrations/src/migration.ts
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-10-05 08:35:57 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-10-16 04:37:57 +0800
commit17c6661e2d3adf115cdc39371ec33bee1e8cd108 (patch)
treee670b0011d2f3db05750d2fcb37964857546c4e6 /packages/migrations/src/migration.ts
parent141121004c297ca602ae8d445fe45712268095ae (diff)
downloaddexon-sol-tools-17c6661e2d3adf115cdc39371ec33bee1e8cd108.tar
dexon-sol-tools-17c6661e2d3adf115cdc39371ec33bee1e8cd108.tar.gz
dexon-sol-tools-17c6661e2d3adf115cdc39371ec33bee1e8cd108.tar.bz2
dexon-sol-tools-17c6661e2d3adf115cdc39371ec33bee1e8cd108.tar.lz
dexon-sol-tools-17c6661e2d3adf115cdc39371ec33bee1e8cd108.tar.xz
dexon-sol-tools-17c6661e2d3adf115cdc39371ec33bee1e8cd108.tar.zst
dexon-sol-tools-17c6661e2d3adf115cdc39371ec33bee1e8cd108.zip
Cleanup migrations and contracts package. Make contracts private again.
Diffstat (limited to 'packages/migrations/src/migration.ts')
-rw-r--r--packages/migrations/src/migration.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts
index a22c34a23..7c76a7b7b 100644
--- a/packages/migrations/src/migration.ts
+++ b/packages/migrations/src/migration.ts
@@ -1,4 +1,5 @@
-import { artifacts, wrappers } from '@0xproject/contracts';
+import * as wrappers from '@0xproject/abi-gen-wrappers';
+import * as artifacts from '@0xproject/contract-artifacts';
import { assetDataUtils } from '@0xproject/order-utils';
import { ContractAddresses } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
@@ -29,7 +30,7 @@ let _cachedContractAddresses: ContractAddresses | undefined;
* @param provider Web3 provider instance.
* @param txDefaults Default transaction values to use when deploying contracts.
*/
-export async function runMigrationsAsync(provider: Provider, txDefaults: Partial<TxData>): Promise<MigrationsResult> {
+export async function runMigrationsAsync(provider: Provider, txDefaults: Partial<TxData>): Promise<void> {
const web3Wrapper = new Web3Wrapper(provider);
// Proxies
@@ -60,7 +61,6 @@ export async function runMigrationsAsync(provider: Provider, txDefaults: Partial
artifacts.Exchange,
provider,
txDefaults,
- zrxAssetData,
);
// Multisigs
@@ -165,9 +165,13 @@ export async function runMigrationsAsync(provider: Provider, txDefaults: Partial
orderValidator,
};
_cachedMigrationsResult = migrationsResult;
- return migrationsResult;
}
+/**
+ * Returns the addresses of all contracts that were deployed during migrations.
+ * Throws if migrations have not been run yet.
+ * @returns Addresses of all contracts that were deployed.
+ */
export function getContractAddresses(): ContractAddresses {
if (!_.isUndefined(_cachedContractAddresses)) {
return _cachedContractAddresses;