aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract-wrappers/test/utils/migrate.ts
diff options
context:
space:
mode:
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);
+}