aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract-wrappers/test/utils/migrate.ts
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-10-10 04:52:40 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-10-16 04:37:57 +0800
commita48e0a08bf4ea8a8fb0f08cfe5187a6291378afb (patch)
tree10509a92be382c26b0c8dc4891835857c9fbc21b /packages/contract-wrappers/test/utils/migrate.ts
parentecdd6e3303e90cffbc5b63e96cf0ca87c1c83f2b (diff)
downloaddexon-sol-tools-a48e0a08bf4ea8a8fb0f08cfe5187a6291378afb.tar
dexon-sol-tools-a48e0a08bf4ea8a8fb0f08cfe5187a6291378afb.tar.gz
dexon-sol-tools-a48e0a08bf4ea8a8fb0f08cfe5187a6291378afb.tar.bz2
dexon-sol-tools-a48e0a08bf4ea8a8fb0f08cfe5187a6291378afb.tar.lz
dexon-sol-tools-a48e0a08bf4ea8a8fb0f08cfe5187a6291378afb.tar.xz
dexon-sol-tools-a48e0a08bf4ea8a8fb0f08cfe5187a6291378afb.tar.zst
dexon-sol-tools-a48e0a08bf4ea8a8fb0f08cfe5187a6291378afb.zip
Add new runMigrationsOnce method to migrations. Update contract-wrappers to use it.
Diffstat (limited to 'packages/contract-wrappers/test/utils/migrate.ts')
-rw-r--r--packages/contract-wrappers/test/utils/migrate.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/contract-wrappers/test/utils/migrate.ts b/packages/contract-wrappers/test/utils/migrate.ts
new file mode 100644
index 000000000..adcc22b1a
--- /dev/null
+++ b/packages/contract-wrappers/test/utils/migrate.ts
@@ -0,0 +1,13 @@
+import { devConstants } from '@0xproject/dev-utils';
+import { runMigrationsOnceAsync } from '@0xproject/migrations';
+import { ContractAddresses } from '@0xproject/types';
+
+import { provider } from './web3_wrapper';
+
+export async function migrateOnceAsync(): Promise<ContractAddresses> {
+ const txDefaults = {
+ gas: devConstants.GAS_LIMIT,
+ from: devConstants.TESTRPC_FIRST_ADDRESS,
+ };
+ return runMigrationsOnceAsync(provider, txDefaults);
+}